Repository navigation
Fix shed_commit_object to read effective_arrival, not raw destination - #1077
Conversation
Lane: openxfactory-5 (openXfactory-5) shed_commit_object() walked the gitlink chain through MOUNTS[row["destination"]] and returned row["destination_path"] directly, so a re_destined row (RULED Q6: a moved row whose placement a later ruling corrected) would resolve at its ORIGINAL destination instead of the ruling's effective one; source() already reads the same row through effective_arrival(row) for exactly this reason (line 616), and shed_commit_object had not followed. Latent today: no re_destined row names a shed member, so no caller has hit it. Fixed by computing destination, destination_path = effective_arrival(row) once and reading both from it, including in the CarveReachUnavailable message. Added a regression in tests/carve_manifest/test_carve_manifest.py that re-destines a fixture row across two different legs entirely (openxdox_code to opendox_code) and asserts the resolver walks the EFFECTIVE leg; proven failing against the unfixed function (resolved at the original leg) and passing after. Refs #1062 Co-Authored-By: Claude Sonnet 5 <[email protected]>
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 1 day and 3 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideUpdates shed_commit_object to route gitlink traversal, returned paths, and diagnostics through effective_arrival(row), preventing re-destined rows from resolving to their original destination. Adds a focused regression test that distinguishes the effective leg from the original and confirms the corrected result. Sequence diagram for effective arrival commit resolutionsequenceDiagram
participant Caller
participant Resolver as shed_commit_object
participant Arrival as effective_arrival
participant Mounts as MOUNTS
participant Git as _git_object_id
Caller->>Resolver: shed_commit_object(commit, path)
Resolver->>Arrival: effective_arrival(row)
Arrival-->>Resolver: destination, destination_path
Resolver->>Mounts: MOUNTS[destination]
loop gitlink segments
Resolver->>Git: _git_object_id(repo, revision, segment)
Git-->>Resolver: gitlink commit
end
Resolver-->>Caller: repo, revision, destination_path
Flow diagram for re-destined shed resolutionflowchart LR
A[re_destined row] --> B["effective_arrival(row)"]
B --> C[Effective destination leg]
B --> D[Effective destination path]
C --> E["Traverse MOUNTS[destination] gitlinks"]
E --> F[Return repo, commit, destination_path]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
🟢 Approval recommended
The functional fix and regression test are correct; only a minor stale docstring remains.
Pull request overview
Updates shed commit resolution to honor effective_arrival() for re-destined rows.
Changes:
- Uses effective destination and path in
shed_commit_object. - Adds regression coverage across different destination legs.
File summaries
| File | Description |
|---|---|
scripts/carved_reach.py |
Resolves effective arrival data. |
tests/carve_manifest/test_carve_manifest.py |
Tests re-destined shed resolution. |
Review details
- Files reviewed: 2/2 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.
Lane: openxfactory-5 (openXfactory-5) Copilot review of PR #1077 (comment 4031093476): the docstring still said the function answers "the row's own destination_path" after the fix routed the actual read through effective_arrival(row), so the contract text named the wrong leg/path for a re_destined row. Updated the sentence to name effective_arrival(row)'s destination_path and spell out the re_destined divergence, matching source()'s own docstring precedent at line 557. No behavior change. Refs #1062 Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
|
Lane: openxfactory-5 (openXfactory-5) Landing-ready on the lane's side, held for Brett Heap's word. Head Lane: openxfactory-5 (openXfactory-5) |
|
Lane: openxfactory-5 (openXfactory-5) LANDING — lane openXfactory-5, session 651195c7-1854-491e-894a-e6542ef5e9f4@Eagle, 2026-09-17T12:06:45Z, PR #1077 into opensoft/openxFactory main |
Lane: openxfactory-5 (openXfactory-5) module()'s docstring still described the dotted name as derived from a MOVED row's own destination_path, inaccurate now that the previous commit routes the read through effective_arrival(row); the docstring now says a re_destined row's to_path wins instead, on shed_commit_object()'s own docstring fix in #1077. Refs #1079 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Sonnet 5 <[email protected]>
Refs #1079. module() and shed_relpath() resolve a re_destined row at effective_arrival(row) instead of the raw destination, completing the class #1077 fixed for shed_commit_object; one regression per function with a re-destined fixture row. Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]>
`#1077`'s `shed_commit_object` fix and this branch's rewrite of the same walk are the whole conflict, and they compose: main reads `effective_arrival(row)` so a `re_destined:` row (RULED Q6) resolves at the leg the ruling names rather than at the raw `destination`, and this branch added the mount tracking, `_tree_entry_absent`, `_leg_object_store` and the store-completeness probe around that same loop. Resolved as BOTH — the loop walks `MOUNTS[destination]`, the return answers `destination_path`, and all three `CarveReachUnavailable` messages name `destination` rather than the raw `row['destination']` they were written against, so a re-destined row that cannot be read is refused about the leg it actually names. And the SEMANTIC reconciliation the textual merge could not see, the same one the previous merge needed: `#1077`'s new case `test_the_exact_commit_resolver_reads_the_effective_arrival_of_a_re_destined_row` builds four bare `.git` DIRECTORIES, not repositories, and was written against the pre-`#1048` walk that had no completeness probe — so the real `cat-file -e <gitlink>^{commit}` answers no and the walk refused `CarveReachUnavailable` for an INCOMPLETE STORE at `openDox` before the case could measure anything. `_git_ok` is stubbed exactly as `_git_object_id` beside it already was, and for the same reason: what that case measures is WHICH LEG the walk reaches, and git is not the question. Its assertion is untouched, and it still leaves the original leg materialized on purpose so that a resolver reading the raw `destination` answers wrongly rather than raising. Lane: openxfactory-2 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>



Lane: openxfactory-5 (openXfactory-5)
What
scripts/carved_reach.py'sshed_commit_objectwalked the gitlink chain throughMOUNTS[row["destination"]]and returnedrow["destination_path"]directly, instead of routing both througheffective_arrival(row)the waysource()already does at line 616. Are_destinedrow (RULED Q6: a moved row whose placement a later ruling corrected to a different leg) would therefore resolve at its ORIGINAL destination: the function would walk the wrong leg's gitlink chain end to end and hand back a perfectly well-formed(repo, commit, path)at a leg the row no longer names, rather than raising. Latent today because nore_destinedrow names a shed member. Fixed by computingdestination, destination_path = effective_arrival(row)once at the top of the function and reading both from it everywhere the function used to read the row directly, including theCarveReachUnavailablemessage text.Regression
Added
test_the_exact_commit_resolver_reads_the_effective_arrival_of_a_re_destined_rowtotests/carve_manifest/test_carve_manifest.py, beside the existingshed_commit_objectretired-row test. The fixture row carves toopenxdox_codeand isre_destined(RULED Q6 form) toopendox_code: two different legs entirely, not merely two paths at the same leg, so a resolver reading the rawdestinationwalks the wrong gitlink chain end to end rather than failing to resolve at all. Both legs are materialized in the fixture on purpose, so the bug's signature is a wrong-but-well-formed answer, not a raised error._git_object_idis monkeypatched to a constant so the assertion isolates which mount key and whichdestination_paththe function used.Failing against the unfixed function:
Passing after the fix:
Full local runs after the fix (submodules
openDox/openXdoxinitialized):Validators that import
carved_reach, run with.as the tree:The third validator's failure is pre-existing and unrelated: identical 3
evidence-required-property errors againsttests/ideation-dashboard/fixtures/base-repo/ideation/cross-reference.yamlon unmodifiedorigin/main(confirmed withgit stash), about the ideation cross-reference schema, nothing this change touches.Not widened
Two sibling call sites in the same module read a row's raw
destination/destination_paththe same wayshed_commit_objectused to, and are NOT touched here because issue #1062 names onlyshed_commit_object:module(), line 663:relative = row["destination_path"]shed_relpath(), lines 700-701:mount = MOUNTS[row["destination"]]...androw["destination_path"]Both are latent for the same reason
shed_commit_objectwas: nore_destinedrow currently names a shed member. Filing or fixing either is left to a separate act rather than folded in here.Refs #1062
Lane: openxfactory-5 (openXfactory-5)
🤖 Generated with Claude Code
Summary by Sourcery
Use effective arrivals when resolving shed commit objects so re-destined rows resolve to their current destination.
Bug Fixes:
Documentation:
Tests: