Repository navigation
feat(devtools): verify-cross-cuts lint (Phase 1 of #432) - #457
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 29 minutes and 44 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds the sixth evidence-driven structural lint after #429 (topology), #435 (file-size), #437 (test-ownership), #434 (migrations). The cross-cut tags in docs/plans/topology-target.yaml are auto-generated from module-name conventions (e.g. _runtime -> lifecycle: runtime). The lint asserts that any tag present matches the expected value derived from the filename. Catches: - Manual edits that break tag-name consistency. - Rule changes in build_topology_projection.py that miss a hand-edited row. - Future cross-cut rule additions whose first sweep leaves stale tags. All 95 currently-tagged rows pass; the lint protects against regression. Phase 2 (cross-architectural-rule enforcement, e.g. "no sync API module imports an async-only module") deferred until the cross-cut tag set reaches sufficient coverage. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
a927a3b to
8b52f6a
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b15acbf9a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
## Summary Phase 1 of #432. Adds the sixth evidence-driven structural lint, following the pattern from #429 (topology), #435 (file-size), #437 (test-ownership), #434 (migrations). ## Problem The `cross_cut` tags in `docs/plans/topology-target.yaml` are generated by `build_topology_projection.py` from module-name conventions (e.g. `_runtime` suffix → `lifecycle: runtime`). 95 rows in the projection currently carry tags. Three failure modes are unprotected today: - **Manual edits** to the YAML that change a tag without renaming the module. - **Rule changes** in `build_topology_projection.py` that miss a previously hand-edited row. - **Future tag additions** whose first sweep leaves some rows stale. Each silently invalidates downstream consumers (#432 Phase 2 cross-architectural-rule enforcement, the dashboard). ## Solution `devtools verify-cross-cuts` reads the YAML and asserts every present `cross_cut` tag matches what the module's filename suggests: | Filename pattern | Expected tag | | --- | --- | | `*_runtime.py` | `lifecycle: runtime` | | `*_models.py` | `lifecycle: model` | | `*_reads.py` | `layer: read` | | `*_writes` / `*_write_*` | `layer: write` | | `sync*.py` / `sync.py` / `sync_bridge.py` | `api: sync` | | `facade*.py` | `api: async` | Mismatches are blocking; missing-tags are informational. Wired into `devtools verify --quick`. Phase 2 (cross-architectural-rule enforcement, e.g. "no sync module imports an async-only module") is deferred until tag coverage is wider. ## Verification ``` $ devtools verify-cross-cuts cross-cut tags: clean $ devtools verify --quick verify: all checks passed (incl. all 9 lints) $ pytest tests/unit/devtools/test_verify_cross_cuts.py 9 passed ``` ## Pattern reuse Sixth lint following the established pattern (declarative YAML + lint + tracked exceptions). The pattern is now stable; future architectural axes (#433 layering rules, #444 MCP authz) can reuse it. ## Related - #432 — evidence-driven structural specification umbrella. - #429 — pattern source. - #401 — post-renewal consolidation umbrella. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Phase 1 of #432. Adds the sixth evidence-driven structural lint, following the pattern from #429 (topology), #435 (file-size), #437 (test-ownership), #434 (migrations).
Problem
The
cross_cuttags indocs/plans/topology-target.yamlare generated bybuild_topology_projection.pyfrom module-name conventions (e.g._runtimesuffix →lifecycle: runtime). 95 rows in the projection currently carry tags. Three failure modes are unprotected today:build_topology_projection.pythat miss a previously hand-edited row.Each silently invalidates downstream consumers (#432 Phase 2 cross-architectural-rule enforcement, the dashboard).
Solution
devtools verify-cross-cutsreads the YAML and asserts every presentcross_cuttag matches what the module's filename suggests:*_runtime.pylifecycle: runtime*_models.pylifecycle: model*_reads.pylayer: read*_writes/*_write_*layer: writesync*.py/sync.py/sync_bridge.pyapi: syncfacade*.pyapi: asyncMismatches are blocking; missing-tags are informational. Wired into
devtools verify --quick.Phase 2 (cross-architectural-rule enforcement, e.g. "no sync module imports an async-only module") is deferred until tag coverage is wider.
Verification
Pattern reuse
Sixth lint following the established pattern (declarative YAML + lint + tracked exceptions). The pattern is now stable; future architectural axes (#433 layering rules, #444 MCP authz) can reuse it.
Related
🤖 Generated with Claude Code