Problem
The SegmentScopeMode prompt injection (FULL_TASK vs SEGMENT_SCOPED) was added to fix workers self-scoping to one step, but there are no focused regression tests verifying the prompt content for each mode.
Tests Needed
-
FULL_TASK prompt must:
- Include
SegmentScopeMode: FULL_TASK
- NOT include
Active segment ID
- NOT include segment-scoped checkbox block ("Your checkboxes for this step:")
-
SEGMENT_SCOPED prompt must:
- Include
SegmentScopeMode: SEGMENT_SCOPED
- Include
Active segment ID
- Include segment-scoped checkbox block
- Include "Other segments in this step (NOT yours)"
-
Polyrepo single-segment regression:
- Worker proceeds beyond Step 0 (does not exit after one step)
-
Legacy/partial marker case:
- Task with markers on some steps but not others — fallback behavior does not silently one-step scope
Files
extensions/tests/segment-scoped-lane-runner.test.ts — add prompt content assertions
extensions/tests/lane-runner-v2.test.ts — update existing segment contracts
References
- Sage review of TP-501 fix
- Polyrepo test failures: workers exiting after Step 0 despite FULL_TASK mode
Problem
The SegmentScopeMode prompt injection (FULL_TASK vs SEGMENT_SCOPED) was added to fix workers self-scoping to one step, but there are no focused regression tests verifying the prompt content for each mode.
Tests Needed
FULL_TASK prompt must:
SegmentScopeMode: FULL_TASKActive segment IDSEGMENT_SCOPED prompt must:
SegmentScopeMode: SEGMENT_SCOPEDActive segment IDPolyrepo single-segment regression:
Legacy/partial marker case:
Files
extensions/tests/segment-scoped-lane-runner.test.ts— add prompt content assertionsextensions/tests/lane-runner-v2.test.ts— update existing segment contractsReferences