Shape rows of a repo that left a project stop counting (#8376); marker/binding fixes (#8321); hook contract tests (#8249) #240

Merged
bvandeusen merged 7 commits from dev into main 2026-12-02 23:21:05 -05:00
7 Commits
Author SHA1 Message Date
bvandeusenandClaude Opus 5.5 f55e263d7e fix(8376): a repo that leaves a project takes its shape rows out of that project's accounting
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / TypeScript typecheck (push) Successful in 32s
CI & Build / Python tests (push) Successful in 2m19s
CI & Build / integration (push) Successful in 2m19s
CI & Build / Build & push image (push) Successful in 20s
A coverage refresh walks only the repos bound to a project, but its readout
counts every live row, so the rows of a repo unbound or re-bound to another
project were never synced again and kept counting: in the total, the gap
list, and every reader of live rows (proposer, divergence, stamp review).
Re-binding a repo to another project and unbinding it now stamp its rows on
the project it left as vanished, and each refresh sweeps any rows still left
under a repo nobody binds to the project. A bound repo the forge did not
serve this time stays live. Each stamped row gets an `unbound` event and
keeps its judgment, so binding the repo back revives it like any vanished
row. Plugin version bumped for the shape-accounting skill's event list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 23:15:24 -05:00
bvandeusenandClaude Opus 5.5 af5edd5c3f test(8249): the prior-art and moment contract tests count the session binder as a reader of session_id
CI & Build / Plugin hooks (push) Successful in 16s
CI & Build / Python lint (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / integration (push) Successful in 2m17s
CI & Build / Python tests (push) Successful in 2m31s
CI & Build / Build & push image (push) Successful in 18s
They subtracted session_id from what the hook sent, and their failure message
still listed it. The binder that runs before every plugin route reads it, so
it is passed to route_query_args beside the handler and the scope helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 16:49:53 -05:00
bvandeusen 1a9057e875 Revert "test(8249): DELIBERATE BREAK, the tool-rules route reads seen_rulings instead of seen_ruling_systems"
This reverts commit 451e129731.
2026-12-02 16:49:45 -05:00
bvandeusenandClaude Opus 5.5 451e129731 test(8249): DELIBERATE BREAK, the tool-rules route reads seen_rulings instead of seen_ruling_systems
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 22s
CI & Build / TypeScript typecheck (push) Successful in 41s
CI & Build / Python tests (push) Failing after 2m41s
CI & Build / integration (push) Successful in 2m57s
CI & Build / Build & push image (push) Skipped
Reverted in the next commit. CI must fail test_the_route_reads_every_name_the_hook_sends here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 16:44:50 -05:00
bvandeusenandClaude Opus 5.5 d5a9e0f8c8 test(8249): the tool-rules hook and its route agree on every name, checked by running the hook
The old test read the hook script, the shared helpers and the route source
and compared parameter names as text. It now runs grimoire_tool_rules.sh
against a local listener, in a repo with a remote and every session ledger
holding something, and checks that every key the hook sent is one the route,
its project-scope helper or the session binder reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 16:44:50 -05:00
bvandeusenandClaude Opus 5.5 ccee6aeffa fix(8321): the remote is looked up beside a marker only when the marker sent the project, not again after it resolved the project itself
CI & Build / TypeScript typecheck (push) Successful in 36s
CI & Build / Plugin hooks (push) Successful in 16s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Successful in 2m23s
CI & Build / integration (push) Successful in 2m7s
CI & Build / Build & push image (push) Successful in 21s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 13:29:17 -05:00
bvandeusenandClaude Opus 5.5 f4d6486255 fix(8321): a .grimoire marker that disagrees with the repo's binding is named at session start
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / Python lint (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 32s
CI & Build / Python tests (push) Failing after 1m58s
CI & Build / integration (push) Successful in 1m58s
CI & Build / Build & push image (push) Skipped
A marker copied along with a repo outlived the project it was written for:
the Throne folder's marker still named project 38 after the split, so every
hook held the session to Cartographer and writes to Throne stopped on the
project fence, with nothing saying why.

The SessionStart hook now sends the remote beside a marker's project_id. The
marker still decides the project; /context also resolves the remote's binding,
and when it names a different project the context says which project each
names and how to fix the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 13:22:50 -05:00