Skip to content

feat(devtools): verify-cross-cuts lint (Phase 1 of #432) - #457

Merged
Sinity merged 1 commit into
masterfrom
feature/feat/cross-cut-verify
Apr 26, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/feat/cross-cut-verify

Conversation

@Sinity

@Sinity Sinity commented Apr 26, 2026

Copy link
Copy Markdown
Owner

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

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Apr 26, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 44 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: eda8d1c0-207c-49ad-b9ee-36653bfd8036

📥 Commits

Reviewing files that changed from the base of the PR and between da7b8f5 and 8b52f6a.

📒 Files selected for processing (6)
  • devtools/command_catalog.py
  • devtools/verify.py
  • devtools/verify_cross_cuts.py
  • docs/devtools.md
  • tests/unit/devtools/test_verify.py
  • tests/unit/devtools/test_verify_cross_cuts.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/cross-cut-verify

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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]>
@Sinity
Sinity force-pushed the feature/feat/cross-cut-verify branch from a927a3b to 8b52f6a Compare April 26, 2026 13:21
@Sinity
Sinity merged commit b15acbf into master Apr 26, 2026
13 checks passed
@Sinity
Sinity deleted the feature/feat/cross-cut-verify branch April 26, 2026 15:44
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread devtools/verify_cross_cuts.py Resolved
@Sinity
Sinity requested a review from Copilot May 1, 2026 01:54
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
Sinity added a commit that referenced this pull request May 7, 2026
## 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]>
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant