Skip to content

Add regression tests for SegmentScopeMode prompt injection #503

@HenryLach

Description

@HenryLach

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

  1. FULL_TASK prompt must:

    • Include SegmentScopeMode: FULL_TASK
    • NOT include Active segment ID
    • NOT include segment-scoped checkbox block ("Your checkboxes for this step:")
  2. 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)"
  3. Polyrepo single-segment regression:

    • Worker proceeds beyond Step 0 (does not exit after one step)
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions