Skip to content

refactor: split observability/events/persistence into per-subdomain package#2262

Merged
Aureliolo merged 7 commits into
mainfrom
refactor/events-persistence-split
Jun 7, 2026
Merged

refactor: split observability/events/persistence into per-subdomain package#2262
Aureliolo merged 7 commits into
mainfrom
refactor/events-persistence-split

Conversation

@Aureliolo
Copy link
Copy Markdown
Owner

Summary

Dissolves the 895-line observability/events/persistence.py junk-drawer (380
persistence.<entity>.<action> logging-event constants spanning ~54 unrelated
sub-domains) into a per-subdomain package observability/events/persistence/, one
module per entity. This is Wave 1 of the package-vertical hardening program (parent
#2051, EPIC #2046), independent of the enum slices.

Closes #2246

What changed

  • New package observability/events/persistence/ with an empty declarative
    __init__.py (no __all__ re-export bag) plus 55 entity modules (task.py,
    cost_record.py, cost_forecast.py, artifact.py, artifact_storage.py,
    connection_secret.py, ...). Each is # module-kind: declarative. The monolith is
    deleted.
  • Partition by string VALUE, not constant name. Several names disagree with their
    values (e.g. PERSISTENCE_ARTIFACT_STORED = "persistence.artifact_storage.stored"),
    so placement follows the value's second dotted segment. This keeps a clean 1:1
    correspondence: each repository imports from exactly the event module that mirrors it.
  • Public module names (task.py, not _task.py): sub-modules ARE the public
    surface; ~129 callsites import directly from them.
  • Gate/baseline/doc cleanup: dropped the file from
    check_no_growth_in_god_modules.py, check_no_central_junk_drawer.py, CLAUDE.md and
    ADR-0006/0008; regenerated data/architecture_report.json. Added a --update-baseline
    flag to check_no_central_junk_drawer.py with tests.
  • Test harness: test_events.py switched to pkgutil.walk_packages so the now-
    fragmented persistence constants stay covered by test_no_duplicates /
    test_follow_dot_pattern; added test_persistence_subpackage_is_walked.

Verification

  • Value-identity check: 380 constants byte-identical, 0 cross-module duplicates.
  • ruff + mypy --strict green; full -m unit suite green.
  • All ~90 pre-push gates passed.

Review

Pre-PR review ran 9 focused agents (persistence / python / code-reviewer / docs /
comment-quality-rot / conventions / test-quality / type-design / logging). Core refactor
got APPROVE from the persistence, python, and code reviewers; 13 findings (stale
references + test-hardening) addressed in 07643623d.

Follow-up (operator action)

The stale events/persistence.py entry in scripts/_central_junk_drawer_baseline.json
is classifier-blocked for the agent. Regenerate locally with:

uv run python scripts/check_no_central_junk_drawer.py --update-baseline

then commit the result onto this branch before merge.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request completes the first wave of a package-vertical hardening initiative by decomposing a large, monolithic observability persistence module into a structured, per-subdomain package. This refactor improves maintainability and architectural clarity by aligning event constant definitions with their respective entities, while also updating the codebase's internal tooling and architectural gates to support the new modular structure.

Highlights

  • Module Decomposition: Dissolved the 895-line monolithic observability/events/persistence.py into a new package observability/events/persistence/ containing 55 entity-specific modules.
  • Import Pattern Update: Updated all internal callsites to import persistence events directly from their respective entity modules rather than the central monolith.
  • Architectural Gate Updates: Updated check_no_growth_in_god_modules.py and check_no_central_junk_drawer.py to remove the persistence module from allowlists and added an --update-baseline flag for easier maintenance.
  • Test Harness Enhancement: Switched test_events.py to use pkgutil.walk_packages to ensure that the newly fragmented persistence constants remain fully covered by existing validation tests.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 7, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 76ad638b-7bfe-4263-98b3-ae1ea77eb4a7

📥 Commits

Reviewing files that changed from the base of the PR and between e3ea2b0 and 9ac69ea.

📒 Files selected for processing (1)
  • .pre-commit-config.yaml
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: Build Backend
  • GitHub Check: Dashboard Build
  • GitHub Check: Dashboard Test
  • GitHub Check: Build Web Assets (melange)
  • GitHub Check: Test Integration (shard 1)
  • GitHub Check: Test Integration (shard 4)
  • GitHub Check: Test Integration (shard 3)
  • GitHub Check: Test Integration (shard 2)
  • GitHub Check: Test Unit (shard 4)
  • GitHub Check: Test E2E
  • GitHub Check: Test Unit (shard 1)
  • GitHub Check: Test Unit (shard 2)
  • GitHub Check: Test Conformance (SQLite)
  • GitHub Check: Test Unit (shard 3)
  • GitHub Check: CodSpeed Python benchmarks
  • GitHub Check: Lighthouse Site
  • GitHub Check: Analyze (python)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-19T07:12:14.508Z
Learning: Applies to src/synthorg/observability/**/*.py : Observability package (observability/): structured logging, correlation tracking, log sinks; event constants organized by domain under observability/events/ (e.g., events.api, events.tool, events.git, events.context_budget, events.backup)
Learnt from: Aureliolo
Repo: Aureliolo/synthorg PR: 2229
File: src/synthorg/persistence/sqlite/fine_tune_repo/_run.py:1-1
Timestamp: 2026-06-05T08:37:41.408Z
Learning: In Aureliolo/synthorg, decomposed repository sub-modules under `src/synthorg/persistence/` (e.g., files inside `approval_repo/`, `subworkflow_repo/`, `conversation_repo/`, `fine_tune_repo/` subpackages) intentionally omit the `# module-kind:` header. `check_module_size_budget.py` defaults headerless files to the `code` tier (500 LOC cap), which is the intended and correct effective cap for these fragments. Only declarative SQL helper modules (e.g., `_sql.py` files) carry an explicit `# module-kind: declarative` header. Do NOT flag missing `# module-kind:` headers on decomposed persistence sub-modules as long as the file is within 500 LOC.
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T12:14:01.668Z
Learning: Applies to src/**/*.py : Always use event name constants from domain-specific modules under `synthorg.observability.events` (e.g., `API_REQUEST_STARTED` from `events.api`)
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-02T07:18:02.381Z
Learning: Applies to src/synthorg/**/*.py : Use event name constants from domain-specific modules under `synthorg.observability.events` (e.g., `API_REQUEST_STARTED` from `events.api`, `TOOL_INVOKE_START` from `events.tool`); import directly from the domain module
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-05T21:11:28.470Z
Learning: Only `src/synthorg/persistence/` may import sqlite/psycopg or emit raw SQL; new repository protocols inherit from generic categories in `persistence/_generics.py` per ADR-0001; bespoke methods permitted only under D7 conditions
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-03T10:44:40.669Z
Learning: Applies to src/synthorg/persistence/**/*.py : Every durable feature MUST define a repository Protocol in `persistence/<domain>_protocol.py`, concrete impls under `persistence/{sqlite,postgres}/`, and be exposed on `PersistenceBackend`
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-18T21:23:23.586Z
Learning: Applies to src/synthorg/**/*.py : Event names: always use constants from the domain-specific module under synthorg.observability.events (e.g., API_REQUEST_STARTED from events.api, TOOL_INVOKE_START from events.tool). Import directly from synthorg.observability.events.<domain>.
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-15T18:38:44.202Z
Learning: Applies to src/synthorg/**/*.py : Always use event name constants from domain-specific modules under `synthorg.observability.events` (e.g., `PROVIDER_CALL_START` from `events.provider`); import directly: `from synthorg.observability.events.<domain> import EVENT_CONSTANT`
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T22:08:13.456Z
Learning: Persistence backend: pluggable PersistenceBackend protocol in `src/synthorg/persistence/`, SQLite initial, SettingsRepository (namespaced settings CRUD).
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-20T11:18:48.128Z
Learning: Applies to src/synthorg/**/*.py : Use event name constants from domain-specific modules under `synthorg.observability.events` (e.g., `API_REQUEST_STARTED` from `events.api`, `TOOL_INVOKE_START` from `events.tool`). Import directly: `from synthorg.observability.events.<domain> import EVENT_CONSTANT`.
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: Read design specification from `docs/design/` page before implementing; deviations need approval as per DESIGN_SPEC.md
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: Present every plan for accept/deny before coding
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: No region/currency/locale privileged; use metric units; British English
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: Every convention PR must ship its enforcement gate
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: After issue completion: branch + commit + push without auto-PR; use `/pre-pr-review` command; `gh pr create` is blocked by `scripts/check_no_pr_create.sh`
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: Commit messages: `<type>: <description>` (feat/fix/refactor/docs/test/chore/perf/ci); commitizen-enforced
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: Signed commits required on protected refs (GPG/SSH or GitHub App via `synthorg-repo-bot`)
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: Branches: `<type>/<slug>` from main; squash merge; PR body becomes squash commit; trailers (`Release-As`, `Closes `#N``) must be in PR body
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: Pre-commit/pre-push hooks configured in `.pre-commit-config.yaml`; tool-call gates in `.claude/settings.json` PreToolUse (`scripts/check_*.sh`/`.py`)
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: After every squash merge → `/post-merge-cleanup`
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-06-07T12:17:49.495Z
Learning: CLI is Docker-only (init/start/stop/status); features go in dashboard + REST API
📚 Learning: 2026-04-26T08:52:54.166Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-26T08:52:54.166Z
Learning: Applies to .pre-commit-config.yaml : Pre-commit hooks: trailing-whitespace, end-of-file-fixer, check-yaml, check-toml, check-json, check-merge-conflict, check-added-large-files, no-commit-to-branch (main), ruff check+format, gitleaks, hadolint (Dockerfile linting), golangci-lint + go vet (CLI, conditional on `cli/**/*.go`), no-em-dashes, no-redundant-timeout, check-single-migration-per-pr, check-no-modify-migration, no-release-please-token, workflow-shell-git-commits. Note: `eslint-web` runs at pre-push only.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-24T20:59:36.323Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-24T20:59:36.323Z
Learning: Pre-commit hooks: trailing-whitespace, end-of-file-fixer, check-yaml, check-toml, check-json, check-merge-conflict, check-added-large-files, no-commit-to-branch (main), ruff check+format, gitleaks, hadolint, golangci-lint + go vet (CLI, conditional on `cli/**/*.go`), no-em-dashes, no-redundant-timeout, check-single-migration-per-pr, check-no-modify-migration.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-24T08:06:06.042Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-24T08:06:06.042Z
Learning: Pre-commit hooks: trailing-whitespace, end-of-file-fixer, check-yaml, check-toml, check-json, check-merge-conflict, check-added-large-files, no-commit-to-branch (main), ruff check+format, gitleaks, hadolint (Dockerfile linting), golangci-lint + go vet (CLI, conditional on cli/**/*.go), no-em-dashes, no-redundant-timeout, check-single-migration-per-pr, check-no-modify-migration.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-03-15T18:17:43.675Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-15T18:17:43.675Z
Learning: Pre-commit hooks: trailing-whitespace, end-of-file-fixer, check-yaml, check-toml, check-json, check-merge-conflict, check-added-large-files, no-commit-to-branch (main), ruff check+format, gitleaks, hadolint (Dockerfile linting).

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-30T10:46:02.441Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-30T10:46:02.441Z
Learning: Pre-push hooks: mypy type-check (affected modules only) + pytest unit tests (affected modules only) + golangci-lint + go vet + go test (CLI) + eslint-web (web dashboard) + `orphan-fixtures` (opt-in) (fast gate before push; skipped in pre-commit.ci). Foundational module changes or conftest changes trigger full runs.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-02T08:47:46.313Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-02T08:47:46.313Z
Learning: Pre-commit hooks enforce: trailing-whitespace, end-of-file-fixer, check-yaml, check-toml, check-json, check-merge-conflict, check-added-large-files, no-commit-to-branch (main), ruff check+format, gitleaks, hadolint, golangci-lint + go vet (CLI, conditional), no-em-dashes, no-redundant-timeout, eslint-web (web dashboard, zero warnings, conditional)

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-02T08:47:46.313Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-02T08:47:46.313Z
Learning: Applies to .pre-commit-config.yaml : Pre-commit.ci: autoupdate disabled (`autoupdate_schedule: never`) — Dependabot owns hook version bumps via `pre-commit` ecosystem

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-24T20:59:36.323Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-24T20:59:36.323Z
Learning: Pre-push hooks: mypy type-check (affected modules only) + pytest unit tests (affected modules only) + golangci-lint + go vet + go test (CLI, conditional) + eslint-web + `orphan-fixtures` (opt-in via `SYNTHORG_CHECK_ORPHAN_FIXTURES=1`).

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-30T10:46:02.441Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-30T10:46:02.441Z
Learning: Applies to tests/**/*.py : Never delete tests, skip tests, or mark them `xfail` to 'fix' slowness. Never use `--no-verify` to bypass pre-push hooks. Never modify `tests/baselines/unit_timing.json`; baseline updates require explicit user approval. When suite time exceeds `baseline * 1.3`: this is a source code regression, not a test bug. The `pytest_sessionfinish` hook in `tests/conftest.py` warns loudly if a regression is detected.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-24T20:59:36.323Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-24T20:59:36.323Z
Learning: Hookify rules in `.claude/hookify.*.md`: `block-pr-create`, `enforce-parallel-tests`, `no-cd-prefix`, `no-local-coverage`.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-05-31T17:59:47.787Z
Learnt from: Aureliolo
Repo: Aureliolo/synthorg PR: 2180
File: data/codebase_map.json:523-524
Timestamp: 2026-05-31T17:59:47.787Z
Learning: In this repository, module-size enforcement is performed by `check_module_size_budget.py` and `check_no_growth_in_god_modules.py`, which honor pre-existing offenders baselined in `scripts/_module_size_baseline.json`; raw `loc`/`loc_cap` pairs in generated `data/codebase_map.json` do not encode those baseline exemptions and can over-flag generated-map refreshes.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-02T08:47:46.313Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-02T08:47:46.313Z
Learning: Pre-push hooks enforce: mypy type-check + pytest unit tests + golangci-lint + go vet + go test (CLI, conditional) + eslint-web (web dashboard, conditional) — fast gate before push, skipped in pre-commit.ci

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-03-15T18:17:43.675Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-15T18:17:43.675Z
Learning: Pre-push hooks: mypy type-check + pytest unit tests + golangci-lint + go vet + go test (CLI, conditional on cli/**/*.go) (fast gate before push, skipped in pre-commit.ci — dedicated CI jobs already run these).

Applied to files:

  • .pre-commit-config.yaml
🔇 Additional comments (3)
.pre-commit-config.yaml (3)

97-100: LGTM!

Also applies to: 128-137, 140-140, 214-222


871-877: LGTM!


879-886: LGTM!


Walkthrough

The PR removes the single monolithic persistence observability module and replaces it with src/synthorg/observability/events/persistence/ containing many per-subdomain modules that declare typed Final[str] event-name constants. It updates imports across API, engine, persistence, and repository code to the new submodule paths, adds a persistence package init with an empty all, adjusts scripts and baselines (module-size gates and central-junk baseline), updates docs and ADRs to reflect the narrowed allowlist, and updates tests to discover and import persistence submodules.

Suggested labels

prio:medium, type:tech-debt

@Aureliolo Aureliolo temporarily deployed to cloudflare-preview June 7, 2026 10:10 — with GitHub Actions Inactive
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 7, 2026

Merging this PR will not alter performance

✅ 33 untouched benchmarks
⏩ 21 skipped benchmarks1


Comparing refactor/events-persistence-split (9ac69ea) with main (62800a3)2

Open in CodSpeed

Footnotes

  1. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (ef7f5c4) during the generation of this report, so 62800a3 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request decomposes the monolithic observability/events/persistence.py god-module into a per-subdomain package under src/synthorg/observability/events/persistence/. The constants are now distributed across individual, declarative subdomain modules, and all imports across the codebase have been updated accordingly. Additionally, the god-module allowlist and central junk-drawer checks have been updated to remove references to the dissolved module, and related documentation, architecture reports, and unit tests have been adjusted. I have no feedback to provide as there are no review comments to evaluate.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@coderabbitai coderabbitai Bot added prio:medium Should do, but not blocking type:tech-debt labels Jun 7, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.92%. Comparing base (62800a3) to head (9ac69ea).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2262   +/-   ##
=======================================
  Coverage   88.91%   88.92%           
=======================================
  Files        2671     2726   +55     
  Lines      139985   140051   +66     
=======================================
+ Hits       124474   124545   +71     
+ Misses      15511    15506    -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CLAUDE.md`:
- Line 20: The Module-Size Budget bullet (the line starting with "**Module-Size
Budget (MANDATORY)**") mixes policy with migration history and an issue
back-reference; remove the migration/history phrasing ("dissolved into a
per-subdomain package", "the five `api/` entries drained once the controller
decomposition brought them under their tier caps") and the `#2052-style`
parenthetical so the bullet is strictly normative, and if needed move any
historical notes or issue references (e.g., mentions of
`observability/events/persistence.py` or `api/` entries) into a separate
changelog/history section instead of the policy text.

In `@docs/decisions/0006-tiered-module-size-policy.md`:
- Around line 73-77: Remove the issue back-references and migration-framing
language from the ADR text: eliminate references like “#2246/#2051” and phrases
implying migration status (e.g., “left the allowlist in `#2246` when it dissolved
into a per-subdomain package”); keep only the rationale and policy wording,
mention the god-module allowlist symbol (core/enums.py) and gate script name
(check_no_growth_in_god_modules.py) as implementation pointers if needed, and
apply the same cleanup to the other edited regions (lines referenced in the
review) so the markdown contains only "why" explanation without reviewer
citations or issue/migration framing.

In `@docs/decisions/0008-controller-decomposition.md`:
- Around line 118-119: The sentence in
docs/decisions/0008-controller-decomposition.md contains reviewer/issue
back-references and migration phrasing; remove the issue IDs and
migration-status wording so it simply states the factual outcome (e.g.,
"core/enums.py remains; observability/events/persistence.py was split into a
per-subdomain package") — edit the line referencing `core/enums.py` and
`observability/events/persistence.py` to drop `#2051`, `#2246` and any "until" /
migration framing and keep only the concise why/what description.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1239ec3d-94cb-4fc1-bf26-3575d3d211af

📥 Commits

Reviewing files that changed from the base of the PR and between a3e1ca1 and 0764362.

📒 Files selected for processing (197)
  • CLAUDE.md
  • data/architecture_report.json
  • data/codebase_map.json
  • data/feature_index.json
  • docs/decisions/0006-tiered-module-size-policy.md
  • docs/decisions/0008-controller-decomposition.md
  • docs/reference/conventions.md
  • scripts/check_no_central_junk_drawer.py
  • scripts/check_no_growth_in_god_modules.py
  • scripts/check_persistence_boundary.py
  • scripts/convention_gate_map.yaml
  • src/synthorg/api/controllers/artifacts.py
  • src/synthorg/api/lifecycle_builder.py
  • src/synthorg/api/lifecycle_helpers/ticket_cleanup.py
  • src/synthorg/api/webhook_cleanup.py
  • src/synthorg/engine/artifacts/service.py
  • src/synthorg/integrations/mcp_catalog/in_memory_installations.py
  • src/synthorg/observability/events/deliverable_receipts.py
  • src/synthorg/observability/events/persistence.py
  • src/synthorg/observability/events/persistence/__init__.py
  • src/synthorg/observability/events/persistence/agent_state.py
  • src/synthorg/observability/events/persistence/api_key.py
  • src/synthorg/observability/events/persistence/artifact.py
  • src/synthorg/observability/events/persistence/artifact_storage.py
  • src/synthorg/observability/events/persistence/audit_entry.py
  • src/synthorg/observability/events/persistence/backend.py
  • src/synthorg/observability/events/persistence/ceremony_state.py
  • src/synthorg/observability/events/persistence/charter.py
  • src/synthorg/observability/events/persistence/checkpoint.py
  • src/synthorg/observability/events/persistence/circuit_breaker.py
  • src/synthorg/observability/events/persistence/codebase_structure_map.py
  • src/synthorg/observability/events/persistence/collab_metric.py
  • src/synthorg/observability/events/persistence/connection.py
  • src/synthorg/observability/events/persistence/connection_secret.py
  • src/synthorg/observability/events/persistence/conversation.py
  • src/synthorg/observability/events/persistence/conversation_turn.py
  • src/synthorg/observability/events/persistence/conversational.py
  • src/synthorg/observability/events/persistence/conversational_proposal.py
  • src/synthorg/observability/events/persistence/cost_claim_dedupe.py
  • src/synthorg/observability/events/persistence/cost_forecast.py
  • src/synthorg/observability/events/persistence/cost_record.py
  • src/synthorg/observability/events/persistence/decision_record.py
  • src/synthorg/observability/events/persistence/dynamic_tool.py
  • src/synthorg/observability/events/persistence/flight_recorder.py
  • src/synthorg/observability/events/persistence/heartbeat.py
  • src/synthorg/observability/events/persistence/knowledge_provenance.py
  • src/synthorg/observability/events/persistence/knowledge_source.py
  • src/synthorg/observability/events/persistence/lifecycle_event.py
  • src/synthorg/observability/events/persistence/mcp_installation.py
  • src/synthorg/observability/events/persistence/meeting_cooldown.py
  • src/synthorg/observability/events/persistence/message.py
  • src/synthorg/observability/events/persistence/migration.py
  • src/synthorg/observability/events/persistence/oauth_state.py
  • src/synthorg/observability/events/persistence/parked_context.py
  • src/synthorg/observability/events/persistence/preset_override.py
  • src/synthorg/observability/events/persistence/principle_override.py
  • src/synthorg/observability/events/persistence/project.py
  • src/synthorg/observability/events/persistence/project_cost_agg.py
  • src/synthorg/observability/events/persistence/project_doc.py
  • src/synthorg/observability/events/persistence/project_environment.py
  • src/synthorg/observability/events/persistence/project_workspace.py
  • src/synthorg/observability/events/persistence/research_run.py
  • src/synthorg/observability/events/persistence/risk_override.py
  • src/synthorg/observability/events/persistence/seen_claims.py
  • src/synthorg/observability/events/persistence/setting.py
  • src/synthorg/observability/events/persistence/ssrf_violation.py
  • src/synthorg/observability/events/persistence/subworkflow.py
  • src/synthorg/observability/events/persistence/task.py
  • src/synthorg/observability/events/persistence/task_metric.py
  • src/synthorg/observability/events/persistence/timescaledb.py
  • src/synthorg/observability/events/persistence/tracked_container.py
  • src/synthorg/observability/events/persistence/user.py
  • src/synthorg/observability/events/persistence/webhook_receipt.py
  • src/synthorg/observability/events/persistence/workflow_def.py
  • src/synthorg/observability/events/persistence/workflow_exec.py
  • src/synthorg/observability/events/project_brain.py
  • src/synthorg/persistence/_conversation_marshalling.py
  • src/synthorg/persistence/_shared/audit.py
  • src/synthorg/persistence/_shared/charter_marshalling.py
  • src/synthorg/persistence/_shared/cost_forecast_marshalling.py
  • src/synthorg/persistence/_shared/workflow_definition_marshalling.py
  • src/synthorg/persistence/_shared/workflow_execution_marshalling.py
  • src/synthorg/persistence/charter_factory.py
  • src/synthorg/persistence/conversational_factory.py
  • src/synthorg/persistence/factory.py
  • src/synthorg/persistence/filesystem_artifact_storage.py
  • src/synthorg/persistence/migration_helpers.py
  • src/synthorg/persistence/migrations.py
  • src/synthorg/persistence/postgres/_backend_accessors.py
  • src/synthorg/persistence/postgres/agent_state_repo.py
  • src/synthorg/persistence/postgres/artifact_repo.py
  • src/synthorg/persistence/postgres/audit_repository.py
  • src/synthorg/persistence/postgres/backend.py
  • src/synthorg/persistence/postgres/backend_connection.py
  • src/synthorg/persistence/postgres/backend_migration.py
  • src/synthorg/persistence/postgres/ceremony_scheduler_state_repo.py
  • src/synthorg/persistence/postgres/charter_repo.py
  • src/synthorg/persistence/postgres/checkpoint_repo.py
  • src/synthorg/persistence/postgres/circuit_breaker_repo.py
  • src/synthorg/persistence/postgres/codebase_structure_map_repo.py
  • src/synthorg/persistence/postgres/connection_repo.py
  • src/synthorg/persistence/postgres/connection_secret_repo.py
  • src/synthorg/persistence/postgres/conversation_repo.py
  • src/synthorg/persistence/postgres/conversational_proposal_repo.py
  • src/synthorg/persistence/postgres/cost_forecast_repo.py
  • src/synthorg/persistence/postgres/cost_record_repo.py
  • src/synthorg/persistence/postgres/decision/_audit.py
  • src/synthorg/persistence/postgres/decision/_cas.py
  • src/synthorg/persistence/postgres/decision/_query.py
  • src/synthorg/persistence/postgres/docs_repo.py
  • src/synthorg/persistence/postgres/flight_recorder_repo.py
  • src/synthorg/persistence/postgres/heartbeat_repo.py
  • src/synthorg/persistence/postgres/hr_repositories.py
  • src/synthorg/persistence/postgres/knowledge_provenance_repo.py
  • src/synthorg/persistence/postgres/knowledge_source_repo.py
  • src/synthorg/persistence/postgres/mcp_installation_repo.py
  • src/synthorg/persistence/postgres/meeting_cooldown_repo.py
  • src/synthorg/persistence/postgres/message_repo.py
  • src/synthorg/persistence/postgres/oauth_state_repo.py
  • src/synthorg/persistence/postgres/parked_context_repo.py
  • src/synthorg/persistence/postgres/preset_override_repo.py
  • src/synthorg/persistence/postgres/principle_override_repo.py
  • src/synthorg/persistence/postgres/project_cost_aggregate_repo.py
  • src/synthorg/persistence/postgres/project_environment_repo.py
  • src/synthorg/persistence/postgres/project_repo.py
  • src/synthorg/persistence/postgres/project_workspace_repo.py
  • src/synthorg/persistence/postgres/provider_audit_repo.py
  • src/synthorg/persistence/postgres/research_run_repo.py
  • src/synthorg/persistence/postgres/risk_override_repo.py
  • src/synthorg/persistence/postgres/seen_claims_repo.py
  • src/synthorg/persistence/postgres/ssrf_violation_repo.py
  • src/synthorg/persistence/postgres/subworkflow_repo/_crud.py
  • src/synthorg/persistence/postgres/subworkflow_repo/_marshalling.py
  • src/synthorg/persistence/postgres/subworkflow_repo/_references.py
  • src/synthorg/persistence/postgres/task_repo.py
  • src/synthorg/persistence/postgres/tool_blueprint_repo.py
  • src/synthorg/persistence/postgres/tracked_container_repo.py
  • src/synthorg/persistence/postgres/user_repo.py
  • src/synthorg/persistence/postgres/webhook_receipt_repo.py
  • src/synthorg/persistence/postgres/workflow_definition_repo.py
  • src/synthorg/persistence/postgres/workflow_execution_repo.py
  • src/synthorg/persistence/sqlite/_backend_accessors.py
  • src/synthorg/persistence/sqlite/agent_state_repo.py
  • src/synthorg/persistence/sqlite/artifact_repo.py
  • src/synthorg/persistence/sqlite/audit_repository.py
  • src/synthorg/persistence/sqlite/backend.py
  • src/synthorg/persistence/sqlite/ceremony_scheduler_state_repo.py
  • src/synthorg/persistence/sqlite/charter_repo.py
  • src/synthorg/persistence/sqlite/checkpoint_repo.py
  • src/synthorg/persistence/sqlite/circuit_breaker_repo.py
  • src/synthorg/persistence/sqlite/codebase_structure_map_repo.py
  • src/synthorg/persistence/sqlite/connection_repo.py
  • src/synthorg/persistence/sqlite/connection_secret_repo.py
  • src/synthorg/persistence/sqlite/conversation_repo/_header.py
  • src/synthorg/persistence/sqlite/conversation_repo/_turns.py
  • src/synthorg/persistence/sqlite/conversational_proposal_repo.py
  • src/synthorg/persistence/sqlite/cost_forecast_repo.py
  • src/synthorg/persistence/sqlite/cost_record_repo.py
  • src/synthorg/persistence/sqlite/decision/_audit.py
  • src/synthorg/persistence/sqlite/decision/_base.py
  • src/synthorg/persistence/sqlite/decision/_cas.py
  • src/synthorg/persistence/sqlite/decision/_query.py
  • src/synthorg/persistence/sqlite/docs_repo.py
  • src/synthorg/persistence/sqlite/flight_recorder_repo.py
  • src/synthorg/persistence/sqlite/heartbeat_repo.py
  • src/synthorg/persistence/sqlite/hr_repositories.py
  • src/synthorg/persistence/sqlite/knowledge_provenance_repo.py
  • src/synthorg/persistence/sqlite/knowledge_source_repo.py
  • src/synthorg/persistence/sqlite/mcp_installation_repo.py
  • src/synthorg/persistence/sqlite/meeting_cooldown_repo.py
  • src/synthorg/persistence/sqlite/message_repo.py
  • src/synthorg/persistence/sqlite/oauth_state_repo.py
  • src/synthorg/persistence/sqlite/parked_context_repo.py
  • src/synthorg/persistence/sqlite/preset_override_repo.py
  • src/synthorg/persistence/sqlite/principle_override_repo.py
  • src/synthorg/persistence/sqlite/project_cost_aggregate_repo.py
  • src/synthorg/persistence/sqlite/project_environment_repo.py
  • src/synthorg/persistence/sqlite/project_repo.py
  • src/synthorg/persistence/sqlite/project_workspace_repo.py
  • src/synthorg/persistence/sqlite/provider_audit_repo.py
  • src/synthorg/persistence/sqlite/research_run_repo.py
  • src/synthorg/persistence/sqlite/risk_override_repo.py
  • src/synthorg/persistence/sqlite/seen_claims_repo.py
  • src/synthorg/persistence/sqlite/ssrf_violation_repo.py
  • src/synthorg/persistence/sqlite/subworkflow_repo.py
  • src/synthorg/persistence/sqlite/task_repo.py
  • src/synthorg/persistence/sqlite/tool_blueprint_repo.py
  • src/synthorg/persistence/sqlite/tracked_container_repo.py
  • src/synthorg/persistence/sqlite/user_repo.py
  • src/synthorg/persistence/sqlite/webhook_receipt_repo.py
  • src/synthorg/persistence/sqlite/workflow_definition_repo.py
  • src/synthorg/persistence/sqlite/workflow_execution_repo.py
  • tests/unit/observability/test_events.py
  • tests/unit/persistence/_shared/test_audit_helpers.py
  • tests/unit/scripts/test_check_no_central_junk_drawer.py
  • tests/unit/scripts/test_check_no_growth_in_god_modules.py
  • tests/unit/scripts/test_check_persistence_boundary.py
💤 Files with no reviewable changes (1)
  • src/synthorg/observability/events/persistence.py

Comment thread CLAUDE.md Outdated
Comment thread docs/decisions/0006-tiered-module-size-policy.md Outdated
Comment thread docs/decisions/0008-controller-decomposition.md Outdated
Aureliolo added 6 commits June 7, 2026 13:46
Remove migration-status framing flagged by CodeRabbit:
- CLAUDE.md Module-Size Budget bullet: drop the issue-style ref and the
  persistence.py/api-entries migration narrative; keep normative policy.
- ADR-0006 / ADR-0008: restate the lines this PR touched as current
  state, dropping the per-subdomain dissolution bookkeeping and now-stale
  events/persistence.py mentions. Pre-existing EPIC/follow-up references
  that form the ADR decision-record structure are kept.
The .test_durations.{unit,integration} timing manifests key durations by
pytest node IDs, which embed credential-detector and em-dash-hook
parametrize labels (PEM begin/end marker text, HTML entities) and omit a
trailing newline. They tripped detect-private-key, no-em-dashes,
end-of-file-fixer, and mixed-line-ending whenever a push range included a
.test_durations refresh from main. Exclude the two generated files from
those four content hooks.
PG01 (postgres.excessive_locks) demands CREATE INDEX CONCURRENTLY. Every
index in the Postgres revisions is built in the same migration that
creates its table, so the table is empty and the build locks nothing.
CONCURRENTLY cannot run inside a transaction, so adopting it would only
make these migrations non-atomic for no availability gain. Exclude the
rule; re-enable when a migration indexes an already-populated table under
live traffic.
@Aureliolo Aureliolo force-pushed the refactor/events-persistence-split branch from 0764362 to e3ea2b0 Compare June 7, 2026 11:52
@Aureliolo Aureliolo temporarily deployed to cloudflare-preview June 7, 2026 11:54 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
.pre-commit-config.yaml (3)

884-884: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove stale file pattern reference to dissolved events/persistence.py.

The file pattern includes observability/events/persistence\.py, which is being removed in this PR. Remove the obsolete pattern.

Suggested fix
-        files: ^(src/synthorg/(core/enums\.py|observability/events/persistence\.py|api/state\.py)|scripts/check_no_central_junk_drawer\.py|scripts/_central_junk_drawer_baseline\.json|\.pre-commit-config\.yaml)$
+        files: ^(src/synthorg/(core/enums\.py|api/state\.py)|scripts/check_no_central_junk_drawer\.py|scripts/_central_junk_drawer_baseline\.json|\.pre-commit-config\.yaml)$
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.pre-commit-config.yaml at line 884, The .pre-commit-config.yaml files regex
still references the removed path "observability/events/persistence\.py"; edit
the pattern string under the affected files entry to remove that obsolete
segment (i.e., delete the `observability/events/persistence\.py` alternative
from the files: ^(... ) pattern) so the regex no longer matches the dissolved
file path while preserving the other listed patterns such as
`src/synthorg/core/enums\.py`, `api/state\.py`, and the scripts.

875-875: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove stale file pattern reference to dissolved events/persistence.py.

The file pattern still includes observability/events/persistence\.py, which is being removed in this PR. Clean up the trigger pattern to remove the non-existent file.

Suggested fix
-        files: ^(src/synthorg/(core/enums\.py|observability/events/persistence\.py)|scripts/check_no_growth_in_god_modules\.py|\.pre-commit-config\.yaml)$
+        files: ^(src/synthorg/core/enums\.py|scripts/check_no_growth_in_god_modules\.py|\.pre-commit-config\.yaml)$
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.pre-commit-config.yaml at line 875, Update the regex in the files entry
that currently includes the stale pattern "observability/events/persistence\.py"
so the pre-commit hook no longer references a removed file; locate the files:
^(src/synthorg/(core/enums\.py|observability/events/persistence\.py)|scripts/check_no_growth_in_god_modules\.py|\.pre-commit-config\.yaml)$
pattern in .pre-commit-config.yaml and remove the
"observability/events/persistence\.py" alternative (adjust the grouped
alternation to "src/synthorg/(core/enums\.py)" or expand as needed) so the regex
only matches existing paths.

872-872: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hook display name to reflect removal of events/persistence.py.

The hook name still lists events/persistence.py as a god-module, but this file has been dissolved into a per-subdomain package per the PR objectives. Only core/enums.py remains as the allowlisted god-module per the updated CLAUDE.md line 20.

Suggested fix
-        name: god-modules must net-shrink (core/enums.py, events/persistence.py)
+        name: god-modules must net-shrink (core/enums.py)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.pre-commit-config.yaml at line 872, Update the pre-commit hook display name
that currently reads "god-modules must net-shrink (core/enums.py,
events/persistence.py)" to reflect removal of events/persistence.py by changing
it to "god-modules must net-shrink (core/enums.py)"; locate the hook entry using
the exact name string in .pre-commit-config.yaml and edit the name value so the
only allowlisted module shown is core/enums.py.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.pre-commit-config.yaml:
- Line 884: The .pre-commit-config.yaml files regex still references the removed
path "observability/events/persistence\.py"; edit the pattern string under the
affected files entry to remove that obsolete segment (i.e., delete the
`observability/events/persistence\.py` alternative from the files: ^(... )
pattern) so the regex no longer matches the dissolved file path while preserving
the other listed patterns such as `src/synthorg/core/enums\.py`,
`api/state\.py`, and the scripts.
- Line 875: Update the regex in the files entry that currently includes the
stale pattern "observability/events/persistence\.py" so the pre-commit hook no
longer references a removed file; locate the files:
^(src/synthorg/(core/enums\.py|observability/events/persistence\.py)|scripts/check_no_growth_in_god_modules\.py|\.pre-commit-config\.yaml)$
pattern in .pre-commit-config.yaml and remove the
"observability/events/persistence\.py" alternative (adjust the grouped
alternation to "src/synthorg/(core/enums\.py)" or expand as needed) so the regex
only matches existing paths.
- Line 872: Update the pre-commit hook display name that currently reads
"god-modules must net-shrink (core/enums.py, events/persistence.py)" to reflect
removal of events/persistence.py by changing it to "god-modules must net-shrink
(core/enums.py)"; locate the hook entry using the exact name string in
.pre-commit-config.yaml and edit the name value so the only allowlisted module
shown is core/enums.py.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1ba63dfe-f761-4bb9-94af-18f1e99337ba

📥 Commits

Reviewing files that changed from the base of the PR and between 0764362 and e3ea2b0.

📒 Files selected for processing (200)
  • .pre-commit-config.yaml
  • .sqlfluff
  • CLAUDE.md
  • data/architecture_report.json
  • data/codebase_map.json
  • data/feature_index.json
  • docs/decisions/0006-tiered-module-size-policy.md
  • docs/decisions/0008-controller-decomposition.md
  • docs/reference/conventions.md
  • scripts/_central_junk_drawer_baseline.json
  • scripts/check_no_central_junk_drawer.py
  • scripts/check_no_growth_in_god_modules.py
  • scripts/check_persistence_boundary.py
  • scripts/convention_gate_map.yaml
  • src/synthorg/api/controllers/artifacts.py
  • src/synthorg/api/lifecycle_builder.py
  • src/synthorg/api/lifecycle_helpers/ticket_cleanup.py
  • src/synthorg/api/webhook_cleanup.py
  • src/synthorg/engine/artifacts/service.py
  • src/synthorg/integrations/mcp_catalog/in_memory_installations.py
  • src/synthorg/observability/events/deliverable_receipts.py
  • src/synthorg/observability/events/persistence.py
  • src/synthorg/observability/events/persistence/__init__.py
  • src/synthorg/observability/events/persistence/agent_state.py
  • src/synthorg/observability/events/persistence/api_key.py
  • src/synthorg/observability/events/persistence/artifact.py
  • src/synthorg/observability/events/persistence/artifact_storage.py
  • src/synthorg/observability/events/persistence/audit_entry.py
  • src/synthorg/observability/events/persistence/backend.py
  • src/synthorg/observability/events/persistence/ceremony_state.py
  • src/synthorg/observability/events/persistence/charter.py
  • src/synthorg/observability/events/persistence/checkpoint.py
  • src/synthorg/observability/events/persistence/circuit_breaker.py
  • src/synthorg/observability/events/persistence/codebase_structure_map.py
  • src/synthorg/observability/events/persistence/collab_metric.py
  • src/synthorg/observability/events/persistence/connection.py
  • src/synthorg/observability/events/persistence/connection_secret.py
  • src/synthorg/observability/events/persistence/conversation.py
  • src/synthorg/observability/events/persistence/conversation_turn.py
  • src/synthorg/observability/events/persistence/conversational.py
  • src/synthorg/observability/events/persistence/conversational_proposal.py
  • src/synthorg/observability/events/persistence/cost_claim_dedupe.py
  • src/synthorg/observability/events/persistence/cost_forecast.py
  • src/synthorg/observability/events/persistence/cost_record.py
  • src/synthorg/observability/events/persistence/decision_record.py
  • src/synthorg/observability/events/persistence/dynamic_tool.py
  • src/synthorg/observability/events/persistence/flight_recorder.py
  • src/synthorg/observability/events/persistence/heartbeat.py
  • src/synthorg/observability/events/persistence/knowledge_provenance.py
  • src/synthorg/observability/events/persistence/knowledge_source.py
  • src/synthorg/observability/events/persistence/lifecycle_event.py
  • src/synthorg/observability/events/persistence/mcp_installation.py
  • src/synthorg/observability/events/persistence/meeting_cooldown.py
  • src/synthorg/observability/events/persistence/message.py
  • src/synthorg/observability/events/persistence/migration.py
  • src/synthorg/observability/events/persistence/oauth_state.py
  • src/synthorg/observability/events/persistence/parked_context.py
  • src/synthorg/observability/events/persistence/preset_override.py
  • src/synthorg/observability/events/persistence/principle_override.py
  • src/synthorg/observability/events/persistence/project.py
  • src/synthorg/observability/events/persistence/project_cost_agg.py
  • src/synthorg/observability/events/persistence/project_doc.py
  • src/synthorg/observability/events/persistence/project_environment.py
  • src/synthorg/observability/events/persistence/project_workspace.py
  • src/synthorg/observability/events/persistence/research_run.py
  • src/synthorg/observability/events/persistence/risk_override.py
  • src/synthorg/observability/events/persistence/seen_claims.py
  • src/synthorg/observability/events/persistence/setting.py
  • src/synthorg/observability/events/persistence/ssrf_violation.py
  • src/synthorg/observability/events/persistence/subworkflow.py
  • src/synthorg/observability/events/persistence/task.py
  • src/synthorg/observability/events/persistence/task_metric.py
  • src/synthorg/observability/events/persistence/timescaledb.py
  • src/synthorg/observability/events/persistence/tracked_container.py
  • src/synthorg/observability/events/persistence/user.py
  • src/synthorg/observability/events/persistence/webhook_receipt.py
  • src/synthorg/observability/events/persistence/workflow_def.py
  • src/synthorg/observability/events/persistence/workflow_exec.py
  • src/synthorg/observability/events/project_brain.py
  • src/synthorg/persistence/_conversation_marshalling.py
  • src/synthorg/persistence/_shared/audit.py
  • src/synthorg/persistence/_shared/charter_marshalling.py
  • src/synthorg/persistence/_shared/cost_forecast_marshalling.py
  • src/synthorg/persistence/_shared/workflow_definition_marshalling.py
  • src/synthorg/persistence/_shared/workflow_execution_marshalling.py
  • src/synthorg/persistence/charter_factory.py
  • src/synthorg/persistence/conversational_factory.py
  • src/synthorg/persistence/factory.py
  • src/synthorg/persistence/filesystem_artifact_storage.py
  • src/synthorg/persistence/migration_helpers.py
  • src/synthorg/persistence/migrations.py
  • src/synthorg/persistence/postgres/_backend_accessors.py
  • src/synthorg/persistence/postgres/agent_state_repo.py
  • src/synthorg/persistence/postgres/artifact_repo.py
  • src/synthorg/persistence/postgres/audit_repository.py
  • src/synthorg/persistence/postgres/backend.py
  • src/synthorg/persistence/postgres/backend_connection.py
  • src/synthorg/persistence/postgres/backend_migration.py
  • src/synthorg/persistence/postgres/ceremony_scheduler_state_repo.py
  • src/synthorg/persistence/postgres/charter_repo.py
  • src/synthorg/persistence/postgres/checkpoint_repo.py
  • src/synthorg/persistence/postgres/circuit_breaker_repo.py
  • src/synthorg/persistence/postgres/codebase_structure_map_repo.py
  • src/synthorg/persistence/postgres/connection_repo.py
  • src/synthorg/persistence/postgres/connection_secret_repo.py
  • src/synthorg/persistence/postgres/conversation_repo.py
  • src/synthorg/persistence/postgres/conversational_proposal_repo.py
  • src/synthorg/persistence/postgres/cost_forecast_repo.py
  • src/synthorg/persistence/postgres/cost_record_repo.py
  • src/synthorg/persistence/postgres/decision/_audit.py
  • src/synthorg/persistence/postgres/decision/_cas.py
  • src/synthorg/persistence/postgres/decision/_query.py
  • src/synthorg/persistence/postgres/docs_repo.py
  • src/synthorg/persistence/postgres/flight_recorder_repo.py
  • src/synthorg/persistence/postgres/heartbeat_repo.py
  • src/synthorg/persistence/postgres/hr_repositories.py
  • src/synthorg/persistence/postgres/knowledge_provenance_repo.py
  • src/synthorg/persistence/postgres/knowledge_source_repo.py
  • src/synthorg/persistence/postgres/mcp_installation_repo.py
  • src/synthorg/persistence/postgres/meeting_cooldown_repo.py
  • src/synthorg/persistence/postgres/message_repo.py
  • src/synthorg/persistence/postgres/oauth_state_repo.py
  • src/synthorg/persistence/postgres/parked_context_repo.py
  • src/synthorg/persistence/postgres/preset_override_repo.py
  • src/synthorg/persistence/postgres/principle_override_repo.py
  • src/synthorg/persistence/postgres/project_cost_aggregate_repo.py
  • src/synthorg/persistence/postgres/project_environment_repo.py
  • src/synthorg/persistence/postgres/project_repo.py
  • src/synthorg/persistence/postgres/project_workspace_repo.py
  • src/synthorg/persistence/postgres/provider_audit_repo.py
  • src/synthorg/persistence/postgres/research_run_repo.py
  • src/synthorg/persistence/postgres/risk_override_repo.py
  • src/synthorg/persistence/postgres/seen_claims_repo.py
  • src/synthorg/persistence/postgres/ssrf_violation_repo.py
  • src/synthorg/persistence/postgres/subworkflow_repo/_crud.py
  • src/synthorg/persistence/postgres/subworkflow_repo/_marshalling.py
  • src/synthorg/persistence/postgres/subworkflow_repo/_references.py
  • src/synthorg/persistence/postgres/task_repo.py
  • src/synthorg/persistence/postgres/tool_blueprint_repo.py
  • src/synthorg/persistence/postgres/tracked_container_repo.py
  • src/synthorg/persistence/postgres/user_repo.py
  • src/synthorg/persistence/postgres/webhook_receipt_repo.py
  • src/synthorg/persistence/postgres/workflow_definition_repo.py
  • src/synthorg/persistence/postgres/workflow_execution_repo.py
  • src/synthorg/persistence/sqlite/_backend_accessors.py
  • src/synthorg/persistence/sqlite/agent_state_repo.py
  • src/synthorg/persistence/sqlite/artifact_repo.py
  • src/synthorg/persistence/sqlite/audit_repository.py
  • src/synthorg/persistence/sqlite/backend.py
  • src/synthorg/persistence/sqlite/ceremony_scheduler_state_repo.py
  • src/synthorg/persistence/sqlite/charter_repo.py
  • src/synthorg/persistence/sqlite/checkpoint_repo.py
  • src/synthorg/persistence/sqlite/circuit_breaker_repo.py
  • src/synthorg/persistence/sqlite/codebase_structure_map_repo.py
  • src/synthorg/persistence/sqlite/connection_repo.py
  • src/synthorg/persistence/sqlite/connection_secret_repo.py
  • src/synthorg/persistence/sqlite/conversation_repo/_header.py
  • src/synthorg/persistence/sqlite/conversation_repo/_turns.py
  • src/synthorg/persistence/sqlite/conversational_proposal_repo.py
  • src/synthorg/persistence/sqlite/cost_forecast_repo.py
  • src/synthorg/persistence/sqlite/cost_record_repo.py
  • src/synthorg/persistence/sqlite/decision/_audit.py
  • src/synthorg/persistence/sqlite/decision/_base.py
  • src/synthorg/persistence/sqlite/decision/_cas.py
  • src/synthorg/persistence/sqlite/decision/_query.py
  • src/synthorg/persistence/sqlite/docs_repo.py
  • src/synthorg/persistence/sqlite/flight_recorder_repo.py
  • src/synthorg/persistence/sqlite/heartbeat_repo.py
  • src/synthorg/persistence/sqlite/hr_repositories.py
  • src/synthorg/persistence/sqlite/knowledge_provenance_repo.py
  • src/synthorg/persistence/sqlite/knowledge_source_repo.py
  • src/synthorg/persistence/sqlite/mcp_installation_repo.py
  • src/synthorg/persistence/sqlite/meeting_cooldown_repo.py
  • src/synthorg/persistence/sqlite/message_repo.py
  • src/synthorg/persistence/sqlite/oauth_state_repo.py
  • src/synthorg/persistence/sqlite/parked_context_repo.py
  • src/synthorg/persistence/sqlite/preset_override_repo.py
  • src/synthorg/persistence/sqlite/principle_override_repo.py
  • src/synthorg/persistence/sqlite/project_cost_aggregate_repo.py
  • src/synthorg/persistence/sqlite/project_environment_repo.py
  • src/synthorg/persistence/sqlite/project_repo.py
  • src/synthorg/persistence/sqlite/project_workspace_repo.py
  • src/synthorg/persistence/sqlite/provider_audit_repo.py
  • src/synthorg/persistence/sqlite/research_run_repo.py
  • src/synthorg/persistence/sqlite/risk_override_repo.py
  • src/synthorg/persistence/sqlite/seen_claims_repo.py
  • src/synthorg/persistence/sqlite/ssrf_violation_repo.py
  • src/synthorg/persistence/sqlite/subworkflow_repo.py
  • src/synthorg/persistence/sqlite/task_repo.py
  • src/synthorg/persistence/sqlite/tool_blueprint_repo.py
  • src/synthorg/persistence/sqlite/tracked_container_repo.py
  • src/synthorg/persistence/sqlite/user_repo.py
  • src/synthorg/persistence/sqlite/webhook_receipt_repo.py
  • src/synthorg/persistence/sqlite/workflow_definition_repo.py
  • src/synthorg/persistence/sqlite/workflow_execution_repo.py
  • tests/unit/observability/test_events.py
  • tests/unit/persistence/_shared/test_audit_helpers.py
  • tests/unit/scripts/test_check_no_central_junk_drawer.py
  • tests/unit/scripts/test_check_no_growth_in_god_modules.py
  • tests/unit/scripts/test_check_persistence_boundary.py
💤 Files with no reviewable changes (1)
  • src/synthorg/observability/events/persistence.py

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 7, 2026
CodeRabbit outside-diff findings: .pre-commit-config.yaml still referenced
the dissolved observability/events/persistence.py. Dropped it from the
no-growth-in-god-modules and no-central-junk-drawer files: triggers,
updated the god-modules hook display name to (core/enums.py), and fixed
the stale comment. The file is now a per-subdomain package and neither
gate script tracks it.
@Aureliolo Aureliolo merged commit 8875aa6 into main Jun 7, 2026
91 checks passed
@Aureliolo Aureliolo deleted the refactor/events-persistence-split branch June 7, 2026 12:29
@Aureliolo Aureliolo temporarily deployed to cloudflare-preview June 7, 2026 12:29 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prio:medium Should do, but not blocking type:tech-debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split observability/events/persistence.py into per-subdomain modules

1 participant