Repository navigation
C5: the module boundary rule, and the demo store's version from the seeds - #3
Merged
Merged
Conversation
… a module ADR 0017 §4, plan 006 M5: outside src/modules, a module is imported only by src/config/*.generated.ts, src/verticals/* and the paths some module owns, so removing a module never breaks a file nobody owns. - `npm run generate:modules` also writes src/config/modules.owns.generated.json, the sorted owned paths; the staleness test covers it and .gitattributes marks it generated. - .dependency-cruiser.cjs reads it in the new rule `modules-only-through-composition`, whose message names the fix (add the path to the module's owns and regenerate) and cites ADR 0017 §4. - The bell (the dashboard layout and its notification helpers) imports notifications until M10 composes it from the modules' feeds; it is listed as PENDING_M10, which M10 deletes. - parties now owns its route and e2e (the parties screen, G4), which the rule requires. A planted import of a module from src/config, and the bell left out of PENDING_M10, each fail `npm run depcruise` with that message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eeds' fingerprint
ADR 0017 §8, plan 006 M6 (the store version): a saved session resets when
the snapshot's format or the seeds it was written against change, with no
hand-kept number to bump for a seed change and no pin that a removed
module breaks.
- STORE_VERSION is `${STORE_FORMAT}:${seedFingerprint(seeds)}`, compared
as text. STORE_FORMAT (now 7) is bumped by hand only when the snapshot's
own format changes. The `:` keeps the value text in the existing INTEGER
column, so a session saved under the old numeric version resets once.
- `seedFingerprint` replaces `seedShapeHash`: it covers the seeds'
structure and their row ids, so a module, a collection, a field or a row
that comes or goes resets saved sessions; other values do not.
- The pin of [SCHEMA_VERSION, hash] gives way to store-version.test.ts:
the version is composed this way and never reads as a number, and the
fingerprint moves when a row, a field or a module's collection is added
or removed. "Ignores values" now means values other than ids, as the ADR
asks.
Deploying it resets every saved demo session once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan 009 C5 (plan 006 M5 and M6's store version; ADR 0017 §4 and §8). Two commits, one per task.
M5 — the boundary rule (
build(deps))src/modules, onlysrc/config/*.generated.ts,src/verticals/*and the paths some module owns import a module.npm run generate:moduleswritessrc/config/modules.owns.generated.json;.dependency-cruiser.cjsreads it inmodules-only-through-composition, whose message names the fix and cites ADR 0017 §4.PENDING_M10until M10 composes it from feeds.M6a — the store version (
feat(demo-store))STORE_VERSION = ${STORE_FORMAT}:${seedFingerprint(seeds)}, compared as text;STORE_FORMAT(7) is bumped by hand only for snapshot-format changes.seedFingerprintcovers the seeds' structure and row ids, so a module, collection, field or row that comes or goes resets saved sessions; the pinned hash test gives way tostore-version.test.ts.How verified
tsc,npm test(5943),npm run check,npm run build,docs/mcp/reference.mdunchanged,generate:modulesup to date.src/config, and the bell left out ofPENDING_M10, each failnpm run depcruisewith the rule's message.M6b (seeds split per module, a pure move) is not in this PR.
🤖 Generated with Claude Code