Skip to content

test: cover run() wiring of gate_result events (attempt, baseline and broad phases) #3599

Done

Description

@clabonte

Follow-up from FEAT-LOOP-2026-0250 (#3598), item 3 of its "What the loop did NOT verify".

Gap

tests/test_gate_timings.py drives execute_unit_attempt(), build_attempt_gate_events() and build_phase_gate_events() directly. Nothing tests that run() wires them up:

  • loop.py:12478 resets wu.last_gate_results before each attempt.
  • loop.py:12484 extends wu_events with the attempt's gate_result events, so they are flushed with attempt_outcome.
  • loop.py:13508 extends the events with phase: baseline results on the retroactive attribution path.
  • loop.py:12129 does the same for phase: broad after the gate's broad run.

Only the broad half has been seen live (18 events in the feature's own events.jsonl). The attempt and baseline halves have never run on a real dispatch, since every attempt in that feature ran on a build pinned before the change.

Risk

If a refactor drops one of these extend calls or the reset, every unit test still passes and specfuse stats quietly reports "not recorded" (or stale results from a previous attempt), which looks the same as an old corpus.

Done when

A test runs run() end to end on a temporary feature (stubbed agent, real sleep gate commands, as the existing oracle does) and asserts that events.jsonl afterwards holds:

  1. one phase: attempt gate_result per gate per attempt, with the right attempt number, and none carried over from a previous attempt;
  2. phase: broad events after the gate's broad run;
  3. phase: baseline events when a failed attempt triggers the retroactive baseline probe.

Activity

  1. added
    specfuse:follow-up
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    specfuse:follow-up

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions