Skip to content

P0: Decouple the Review Ledger and the Skills Digest From the Working Tree #1313

Description

@ptr727

Part of #1311. Priority: now. One pull request, Python plus tests.

Why

Two tracked artifacts are renderings rather than state, and both collide between concurrent branches. canonical_review.py record regenerates reports/canonical-review.md, which carries global counts, so two branches each recording one pass merge cleanly to a wrong count and report --check fails an unrelated later pull request (#1290, #1268). .claude-plugin/fleet-skills/.source-digest is one hash over every skill's bytes, so any two concurrent skill edits conflict (#1240). Both make backlog-burndown's no-shared-file rule unsatisfiable, and both cost a merge or a CI failure that no branch caused.

Scope

  • Stop tracking reports/canonical-review.md. Generate it in CI as a job summary or artifact from the JSON ledger, and drop the report --check step from .github/actions/validate/action.yml. The JSON ledger stays tracked, sorted, one entry per unit, since that is real state and it merges.
  • Take a lock around cmd_record's read-modify-write of the ledger, the same shape local_review.py already uses (canonical_review.py record Has No Lock, So Two Concurrent Records Lose One Pass #1151).
  • Replace the single .source-digest with a per-skill digest, or a digest file per skill directory, so two edits to two skills touch two files.
  • Update local-strict-review "The Carried-Content Pass" ordering, which currently commits the ledger before the diff pass because the report is tracked. With only the JSON tracked the ordering stays but the wording that names the .md goes.

Rules that bind this task

  • A rendering is never committed. State that once in scripts/README.md, where the scripts are described, and nowhere else.
  • Every changed gate gets a test that watches it fail: a test that two records applied in either order produce the same ledger, and a test that two skill edits produce disjoint digest changes.
  • Read spec/files.json before touching the digest, since the plugin tree is a declared verbatim tree.

Acceptance

  • Two branches each recording a pass over a different unit merge into develop with no conflict and CI green.
  • scripts/tests/test_canonical_review.py and test_build_dist.py carry the two new cases.

Closes #1268, #1290, #1151. Relates #1240, #1295.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingscriptA defect in hub toolingskillsAgent skill

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions