chore: prevent future doc + diagram drift (file-move, COPY, diagram-pair guards + rules)#113
chore: prevent future doc + diagram drift (file-move, COPY, diagram-pair guards + rules)#113emeraldleaf wants to merge 2 commits into
Conversation
Three more layers on top of cf27628 (parts 2-4 of the file-move prevention loop). Same compounding-loop principle, broader coverage: (a) Broken-COPY audit — Dockerfile* COPY/ADD source paths that don't exist in the build context. Catches the kind of drift that left Dockerfile.catalog referencing the pre-VSA-collapse 4-project layout for months after PR #31. Skips `--from=<stage>` cross-stage copies and wildcards (resolved at build time, not against the repo tree). (b) Diagram-pair audit — every docs/*.excalidraw must have its sibling docs/*.svg and vice versa. Reviewers look at the .svg on github.com to understand the system; .excalidraw is the editable source. If one exists without the other, the diagram review surface is broken. Does NOT verify the .svg matches what would be regenerated from the .excalidraw source (that needs Playwright in CI — separate, heavier gate). The pair-existence check is the cheap mechanical floor. (c) CLAUDE.md "Doc-and-diagram discipline" rule. Sibling to the file-move rule. Encodes that docs and diagrams are the REVIEW SURFACE, not byproducts — when reviewers look at the system, they read docs/architecture.md and look at docs/nextaurora-architecture.svg. If those are stale, every review reasons against a fiction. Names concrete pairings: AppHost.cs ↔ architecture.md/svg, Extensions.cs middleware order ↔ service-request-flow.svg, EF/cache/outbox changes ↔ perf-doc + their sibling diagrams. (d) CodeRabbit path_instructions for NextAurora.AppHost/AppHost.cs and NextAurora.ServiceDefaults/Extensions.cs — when topology or middleware-order code changes, flag missing paired doc/diagram updates at review time. PR-description waivers acceptable when the deferred update is named in a tracking issue. All three new mechanical guards (broken-link from #112, broken-COPY, diagram-pair) smoke-tested locally on the current tree → exit 0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Retracting per user request. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
WalkthroughThis PR establishes three coordinated enforcement layers to maintain repo hygiene: a Claude hook that detects stale references during file moves, a CI audit that validates Dockerfile source paths, and CodeRabbit rules paired with documented discipline standards for file moves and architectural diagram synchronization. ChangesRepository discipline and file-move/reference enforcement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Four-layer prevention loop for the drift class surfaced by PR #112 (CatalogService Clean → VSA collapse fallout that left CLAUDE.md, demo docs, Dockerfile.catalog, and the perf doc referencing files that didn't exist anymore — for months, silently). Plus an extension to treat docs and diagrams as the review surface, not byproducts.
Layers added across two commits on this branch
check-file-moves.shPostToolUse on Bashgit mv/git rmruns.coderabbit.yamlpath_instructions (topology files + file-rename catch-all)What's in here
Commit cf27628 (already on branch):
check-file-moves.shPostToolUse hook on Bash —git mv/git rmtriggers a grep for refs to the old path**path_instruction for file rename/delete reviewCommit 4e1ba94 (this commit):
docs/*.excalidrawmust have its siblingdocs/*.svgand vice versaNextAurora.AppHost/AppHost.cs(topology) andNextAurora.ServiceDefaults/Extensions.cs(middleware order) — flag missing paired doc/diagram updates at review timeVerification
All three mechanical guards smoke-tested locally on current tree:
What's intentionally NOT in this PR
🤖 Generated with Claude Code
Summary by CodeRabbit