Repository navigation
update-shape.py: the apply commit names the root's manifest, not project.yaml - #47
Conversation
…ect.yaml On a family root the commit message said "project.yaml's `shape:` block" though the pin was mirrored into family.yaml. commit_on_branch now takes the root's Kind and names kind.manifest. Test: a family-root apply's commit message names family.yaml and not project.yaml. Closes #44 Lane: xFactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 20 hours and 24 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdate update-shape.py to derive commit and refusal messaging from the root's Kind, correctly naming family.yaml for FAMILY roots while preserving project.yaml behavior for PROJECT roots, with regression tests covering both cases. Sequence diagram for kind-specific shape update and commit messagingsequenceDiagram
participant Apply as cmd_apply
participant Rewrite as rewrite_manifest
participant Commit as commit_on_branch
participant Git as Git
Apply->>Rewrite: rewrite_manifest(text, commit, tree, kind)
Rewrite-->>Apply: updated manifest or Refusal using kind.manifest
Apply->>Commit: commit_on_branch(root, branch, paths, target, upstream, count, kind)
Commit->>Git: git commit
Git-->>Commit: commit message names kind.manifest
Commit-->>Apply: committed branch update
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
There was a problem hiding this comment.
🟡 Changes recommended
The updated rewrite_manifest refusal still hard-codes validate-manifest.py in remediation text, which is incorrect for FAMILY roots and should be made kind-aware while this area is being touched.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes update-shape.py apply to reference the correct root manifest (project.yaml vs family.yaml) in apply-commit messages and in rewrite_manifest refusal messages, aligning tool output with the root kind abstraction.
Changes:
- Thread
kind: Kindintocommit_on_branch()so apply-commit messages name{kind.manifest}instead of hard-codingproject.yaml. - Thread
kind: Kindintorewrite_manifest()so refusal messages name{kind.manifest}instead of hard-codingproject.yaml. - Extend tests to assert commit messages mention
family.yamlfor family roots and still mentionproject.yamlfor project roots.
File summaries
| File | Description |
|---|---|
| update-shape.py | Passes kind into commit/refusal message generation so messages name the correct manifest for family vs project roots. |
| tests/test_update_shape.py | Adds assertion that project-root apply commit messages still mention project.yaml. |
| tests/test_update_shape_add.py | Applies with --branch for a family holder and asserts the commit message mentions family.yaml and not project.yaml. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "Remediation: `validate-manifest.py` requires one; add it, or " | ||
| "re-scaffold.") |
|
(lane xFactory-1, 2026-09-05T17:30:36Z) LANDED — squash |



Lane: xfactory-1 (xFactory-1)
Claim: #44 (comment)
Closes #44
What
update-shape.py applywrites one commit per root viacommit_on_branch.On a FAMILY root (holder carrying
family.yaml, noproject.yaml), thepin is correctly mirrored into
family.yaml, but the commit message stillhard-coded
"project.yaml's \shape:` block now record "`, naming afile the root does not have.
Fix:
commit_on_branchnow takes the root'sKind(already computed byprepare()/cmd_apply) and writes{kind.manifest}'s \shape:` blockin the message.cmd_apply's existing call site passeskindthrough (update-shape.py:1124`).While tracing this,
rewrite_manifest's twoRefusalmessages(
update-shape.py:781,804) turned out to have the same defect: thefunction is called generically at
update-shape.py:1101withmanifest_path = root / kind.manifest, so it runs on family roots too, andits "no
shape:block" / "block has N lines" refusals also hard-codedproject.yaml. Threadedkind: Kindintorewrite_manifestand its callsite the same way.
Not changed
update-shape.py:1170and:1181(insideopen_pull_request) areproject-only by construction — they sit behind the
elsebranch ofif kind is FAMILY_KIND, which readsproject.yaml'slegs:to find arepository to open a PR against; a family has no legs, so this branch
never runs for a family root. Left alone as instructed.
validate-manifest.pyrequires one"wording in
rewrite_manifest's no-shape:-block refusal — that names thewrong validator for a family root too (
validate-family.pyis the onethat actually requires it), but it's a separate defect from the
project.yamlspelling this issue is about, so left it out of scope forthis PR.
update-shape.py:10,:25) narrates the original2026-09-03 incident, which genuinely was a
project.yamlcase; left ashistorical narrative, not user-facing tool output.
Tests
Extended
tests/test_update_shape_add.py::test_a_family_holder_takes_its_own_additionto apply with
--branchand assert the resulting commit message (read viagit log -1 --format=%B, matching the existing test style) containsfamily.yamland does not containproject.yaml.Added a cheap companion assertion to the existing project-root branch test
tests/test_update_shape.py::test_apply_on_a_branch_commits_only_what_it_wroteconfirming a PROJECT root's commit message still names
project.yaml.python3 -m pytest tests -qfrom the clone root: 496 passed (0 failed).🤖 Generated with Claude Code
https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T
Summary by Sourcery
Ensure update-shape reports the correct manifest name for each root kind when rewriting manifests and creating apply commits.
Bug Fixes:
Tests: