Repository navigation
Keep descendants bound to their original lead assignment (T14) - #254
Merged
Merged
Conversation
erickb336
marked this pull request as ready for review
October 17, 2026 00:46
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #252
Sage task T14
An implementer could regain write permission after its task went from held to briefed, even though its original lead run was blocked. Nested work now keeps the exact issuing lead assignment. Permission checks reject stale descendants after rebriefing or actor reuse. Fresh work still uses its own valid lead assignment.
The checks cover preparation, dispatch, binding, recovery, and both sides of asynchronous policy evaluation. Legacy journals remain readable; nested records without a provable original lead cannot authorize new work. Authentic terminal evidence can still settle old native slots without marking their task successful. Off-mode behavior remains unchanged.
Verification
Candidate: dd3d4da, after merging main ee6b5a9 (#256).
npm run build: built 311 files.npm run check: passed, including 4 marked timing bounds.git diff --check: passed; worktree clean.npm test: tests 1494, pass 1494, fail 0, cancelled 0; 300772 ms.The prior repaired candidate passed all 1,493 local tests and two clean review cycles. Its CI failed only the unchanged CPU cutoff. PR #256 replaced that cutoff with deterministic work checks and passed all 1,480 local and CI tests. This merge carries that repair without changing T14 production code or regressions. Tests and both review cycles passed again on the new commit.
Review found and repaired a compaction-settlement regression: authentic terminal evidence now retains child-target validation without requiring renewed parent authority. Initial and continued-child regressions fail before that repair. The continued-lead fixture also now supplies its actual current native turn; all assertions remain unchanged.
All local tests use fake ps, pgrep and kill first on PATH. Parser attack strings never run in a shell.
Main failure proof
The twelve new T14 tests ran on detached main b5889f6 with candidate tests only. Result: tests12; pass4; fail8. Seven fail on the intended permission behavior: rebrief, evaluator-time revocation, delivered-unbound authority, reused-lead preparation, legacy nested authority, an old bound child after lead reuse, and nested continuation authority. The core-reference test shows feature absence because main rejects the new option. Four cleanup/off-mode/prepared-dispatch controls already pass on main. The two added recovered-completion regressions also fail on detached main at stale permission assertions, and fail on pre-repair 73ad6b6 at terminal settlement. Both pass on the repaired candidate. Combined main results across these disjoint selections: 14 tests, 4 pass, 10 fail; one failure is feature-absence evidence.
Limits
This change revokes stale authority. It does not stop native agents, prove whole-team settlement, serialize task updates with admission, or complete PR-wide ownership. #253 and #239 remain open. Native probes use simulated responses and cannot establish real-model quality or installed automatic hook enforcement. Claude-owned work is unchanged.