Add gated live smoke check for delegate parent-task linkage#57
Merged
Conversation
A TANGLEBRAIN_LIVE-gated test routes a delegation-inducing prompt through the real router → orchestrator → delegate_local and asserts each delegate record's parent_task_id matches the parent task's task_id — a standing guard for the load-bearing assumption that the orchestrator forwards TANGLEBRAIN_TASK_ID to the MCP child it spawns. Skips (never fails) if the orchestrator doesn't delegate that run, since delegation is emergent. Verified passing live against the real claude→MCP-delegate boundary.
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.
What
A
TANGLEBRAIN_LIVE-gated test (LiveDelegateLinkageTest) that routes a delegation-inducing promptthrough the real router → orchestrator →
delegate_localand asserts every delegate record'sparent_task_idmatches the parent task'stask_id.Why
The per-parent-task tree (#52, PR #54) depends on the orchestrator forwarding
TANGLEBRAIN_TASK_IDto the MCP delegate child — a load-bearing assumption verified manually once but not guarded by any
standing test. This turns that one-time spike into a reproducible check. Closes #55.
It skips, never fails, if the orchestrator doesn't call the delegate tool on a given run (emergent
behavior), so it can't become a flaky failure — but when delegation does happen, it enforces the linkage.
Test plan
TANGLEBRAIN_LIVE-gated (skipped in CI).TANGLEBRAIN_LIVE=1 python -m unittest tests.test_live.LiveDelegateLinkageTest→ OK (claude delegated; parent + delegate records shared the same id).
Closes #55.