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
Owner
  • #8376: re-binding a repo to another project, or unbinding it, now marks its shape rows on the project it left as vanished, with an unbound event. Their classifications are kept. Each coverage refresh also clears rows left behind by a move made before this fix. A bound repo the forge didn't reach on a refresh still counts. Plugin 2026.12.03.0415.
  • #8321: session start names a .grimoire marker that disagrees with the repo's binding. The remote is looked up beside a marker only when the marker sent the project.
  • #8249: the tool-rules hook and its route agree on every name, checked by running the hook (with a deliberate break and its revert, to show the test can fail). The prior-art and moment contract tests count the session binder as a reader of session_id.

CI is green on dev head f55e263 (run 11333).

🤖 Generated with Claude Code

- **#8376**: re-binding a repo to another project, or unbinding it, now marks its shape rows on the project it left as vanished, with an `unbound` event. Their classifications are kept. Each coverage refresh also clears rows left behind by a move made before this fix. A bound repo the forge didn't reach on a refresh still counts. Plugin 2026.12.03.0415. - **#8321**: session start names a `.grimoire` marker that disagrees with the repo's binding. The remote is looked up beside a marker only when the marker sent the project. - **#8249**: the tool-rules hook and its route agree on every name, checked by running the hook (with a deliberate break and its revert, to show the test can fail). The prior-art and moment contract tests count the session binder as a reader of session_id. CI is green on dev head f55e263 (run 11333). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 7 commits 2026-12-02 23:21:02 -05:00
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
f4d6486255
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>
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
ccee6aeffa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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
451e129731
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>
This reverts commit 451e129731.
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
af5edd5c3f
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>
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
f55e263d7e
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>
bvandeusen merged commit 41085b8a4a into main 2026-12-02 23:21:05 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledGrimoire#240