Skip to content

✅ Wait for every Prompt before counting the whole chronology - #863

Merged
taras merged 1 commit into
mainfrom
agent/ci-main-red-repl-observation
Sep 30, 2026
Merged

taras merged 1 commit into
mainfrom
agent/ci-main-red-repl-observation

Conversation

@taras

@taras taras commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Repairs #862. Main is red at f5f4f2d8 (run
36786555733),
and this is the whole of the failure: one test row, no product job.

Not Closes #862: that issue says it closes itself when CI next succeeds on
main, and closing it at merge — before the repaired head has been proven —
is exactly what it asks nobody to do.

Why

The Slice D conversation-order row waits for the two turns that report a
provider conversation, then expects clearing the filter to restore three turn
rows. A turn scripted queued is held before it produces anything: it never
reports a conversation, so it never contributes to that wait — but its row
exists as soon as its Prompt is observed. The row waited for one fact and
depended on the other.

What changes

Before:

  • test-deno (1/15) failed on main, reading two Prompt slots
    (build · streaming, review · completed, recorded) where the row expected
    three. green failed with it.

After:

  • The row waits for all three Prompts to be observed before it counts them, so
    what it proves no longer depends on which <Spawn> the scheduler reached
    first.
     yield* until(
       session,
       "both started turns reporting their conversation",
       () => started(session) === 2,
     );
+    yield* until(session, "all three Prompts being observed", () => observed(session) === 3);

The existing wait stays: the ordering assertions need those two conversations.
The new wait is independent, and says the queued Prompt's slot exists.

What must stay true

  • The conversation-order assertions still concern only the two turns that
    actually reported conversations — this adds a precondition, it does not widen
    what the row accepts.
  • No production file changes. The diff is six lines in one test, five of them a
    comment.

How to verify it

deno task test packages/cli/tests/repl-agent-interface.test.ts   # 9 passed, 31 steps, 0 failed
deno task check                                                  # 0
deno task lint                                                   # 0
git diff --check                                                 # 0

The failing schedule is not reproducible on demand locally — every local run
observed all three spawns first, which is why the row passed through four
review rounds. What this change removes is the dependency on that order, rather
than a defect that can be made to appear at will.

I audited every other toHaveLength(3) in the file: the rest are already gated,
either by observed(session) === 3 or by waiting on all three coroutines
finishing. This row was the only one.

Scope

Included

  • One readiness wait in U1: conversations are ordered by their earliest turn, and selecting one changes only the filter.

Intentionally unchanged

  • Every other row, every fixture, and all REPL production code.
  • test-weights.json, dependencies and deno.lock.

Risks and limitations

  • This restores main health; it does not measure weights. test-weights.json
    is three slices stale and two REPL suites are unmeasured, which is separate
    work.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • The description matches the final diff and test results.

The Slice D conversation-order row waited for the two turns that report a
provider conversation, and then expected clearing the filter to restore three
turn rows. A turn scripted `queued` is held before it produces anything, so it
never reports a conversation and never satisfies that wait — while its row
exists as soon as its Prompt is observed. The two facts are different, and only
one of them was waited for.

On this machine the scheduler always reached all three `<Spawn>` children first,
so the row passed everywhere it was run. On the runner it did not: main CI run
36786555733 read two Prompt slots, `build · streaming` and
`review · completed, recorded`, where the row expected three.

The existing wait stays, because the ordering assertions need those two
conversations. The new one says the queued Prompt has been observed, which is
what counting all three under All actually depends on.

Test-only: no REPL production behavior changes.
@taras taras added the ci-main-red-fix Maintainer-controlled: lands one PR while main is red, only with the full clean-checkout proof label Sep 30, 2026
@taras
taras merged commit 4af3009 into main Sep 30, 2026
85 of 86 checks passed
@taras
taras deleted the agent/ci-main-red-repl-observation branch September 30, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-main-red-fix Maintainer-controlled: lands one PR while main is red, only with the full clean-checkout proof

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant