fix(seams): the worktree fork point is selectable via worktree.baseRef #79
No reviewers
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cadence/68-worktree-baseref"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
seams.mdclaimed the parallel-execute worktree's fork point is host-owned and not caller-controllable. It is controllable, via the host'sworktree.baseRef, and the default (fresh, which forks from the remote default branch) is the direct cause of the recorded failure where an executor landed 31 commits behind holding neither the phase CONTEXT nor its ownPLAN-2.md.v1.4.0 restated that claim across several surfaces on the strength of it, so the correction is not confined to one file.
What changed
The claim, corrected in 8 places.
seams.md(the source),agents/cad-executor.md(the<worktree_mode>Reason line only),cadence-core/references/git.md,config.schema.json,workflows/config.md,METHOD.md,branch-decision.mjs's runtime reason string, and.planning/REQUIREMENTS.mdGIT-01. Mentions that make no fork-point or controllability claim were deliberately left alone.A preflight. New read-only seam
cadence-core/bin/worktree-base.mjsresolves the effectiveworktree.baseRefthrough the real settings cascade, rooted at the main checkout viagit rev-parse --git-common-dirso it works from inside a worktree. It emits{ok, baseRef, source, parallelSafe, reason}, skips a malformed layer rather than dying on it, refuses on an unrecognized value, and never writes.execute.md'schoose_pathgate now requires it and falls back to sequential when the value isfresh.A
/cad-configoffer. Shows the file first, merges the single key preserving everything else, never touches managed policy, and does nothing if declined. Offered only whenparallelization.enabledanduse_worktreesare both on.Constraints honoured
cad-executor.md's<worktree_mode>assertion is untouched and stays. A setting the user can change back is not a guarantee.headresolves to that worktree's HEAD, and the prose says so.Judgment call
The issue asked for the preflight in
execute_parallel. The gate that actually decides parallel-vs-sequential ischoose_path, so it lives there with a pointer fromexecute_parallel.Verification
node --test cadence-core/bin/*.test.mjs→ 737 pass, 0 fail (10 new inworktree-base.test.mjs)npx tsc -p tsconfig.ci.json→ exit 0node cadence-core/bin/self-verify.mjs→{"ok":true,...,"problems":[]}Weight budgets regenerated for the three intentionally grown surfaces.
Closes #68