Skip to content

sweep: the stall ladder spares a seat waiting on a human and a stale stamp ends nothing; #59 re-land confirmed; #60 reviewed (7.183.0) - #245

Merged
SSFSKIM merged 3 commits into
mainfrom
sweep-api-followups
Oct 18, 2026
Merged

SSFSKIM merged 3 commits into
mainfrom
sweep-api-followups

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Board tickets #58, #59 and #60, decided by the owner on 2026-10-18.

#59: the PR #153 re-land is complete. Each of the eight commits on origin/qa/59-review-wave-1-fixes (head a114651f) is on main through #242's merge dc29ec69. Each has exactly one main commit carrying its cherry picked from trailer, with an identical git patch-id --stable. No commit since has touched _sweep_api.sh or test-sweep-resume.sh.

qa/59 commit on main as patch-id
e356965c index read 551ac760 equal
bc770fd3 no follow-tags b0d1bf42 equal
16d92eab process-group deadline 23a951df equal
67bd53a9 re-filled seat c2151acd equal
da7074cf detached HEAD c06d3e96 equal
eb7c4fef no base ref 6a8cbc68 equal
95ffa8a1 second reclaim 469ab63b equal
a114651f pinned reset eeda4a1f equal

#58: two defects PR #151's review left live, both still on main (fb6b08fd, _sweep_api.sh and test-sweep-stall.sh).

  • A seat waiting on a human read as a dead turn. sminos renders the last assistant message that carries text and appends the pending-AskUserQuestion or harness-prompt marker after it. It also records an ended-blocked turn as idle. So a worker woken after a 429, whose next turn stopped at a prompt, rendered as the 429 followed by the marker. The tick nudged it, which interrupts the call the human is being asked about, and charged a rung. Either marker anywhere in the turn is now a human verdict that marks, clears and charges nothing. The suite also pins both marker openings at sminos's source.
  • A stale hand-off stamp ended a working run. phase_stall read idle outside the registry lock, and _stall_step re-checked only run_id under it. phase_renew's hand-off arm ended the run on the stamp alone, with no sync and no idle re-check. That took the run from a worker woken after its stamp. It also took it from one that had answered as itself and gone idle again, because phase_renew runs before phase 1b can clear the stamp.
    • Now _stall_step re-reads the status under the lock.
    • phase_renew syncs first.
    • The arm (_handoff_due) re-decides an idle seat's turn through _stall_step: spent hands off, clear keeps the run and clears the ladder, and human, busy or an unreadable turn keep the run for this tick. A session the harness no longer has is handed off as before.
  • Drills (u-askq, u-hprompt, u-midladder, u-gap, u-revived, u-recovered, u-waiting): against main's script, 17 of the 20 new behavioural assertions fail. The other three only show each drill reaches its shape, and no existing assertion fails. u-endfail gains the turn its stamp describes, because the arm now reads one.

#60: review of PR #158, which merged without one. I ran reviewer-medium on the merge's first-parent range (74a981c0^1..74a981c0):

Verification

Left open: the review notes that a native wake can still land after the sync, or after _stall_step releases its lock, and race a nudge or a run-end. The change narrows that window; closing it would need a protocol between sminos and the tick.

Version 7.183.0.

…board-answer (dp#60 review)

PR #158 (dp#60) merged without review. Its review (reviewer-medium on the
merge's first-parent range, 2026-10-18) found that _liveness reads every
status outside working/blocked/idle/error as dead, which at the time took the
lease from a worker parked with `sminos mark awaiting-human`. `mark` and its
judgment statuses left in 7.125.0 (#185), so nothing writes that status now and
no live run can be affected; what remains is board-answer.sh still accepting
it. Logged as row 33 rather than fixed. The review's other finding, the merge
shipping under its first parent's version, was superseded long ago.
… stale hand-off stamp ends nothing (dp#58) (7.183.0)

Two defects PR #151's review left live, both on main.

A SEAT WAITING ON A HUMAN READ AS A DEAD TURN. sminos renders the last
assistant message that carries text and APPENDS the pending-AskUserQuestion
or harness-prompt marker after it, and maps an ended-blocked turn to status
idle. A worker woken after a 429 whose next turn stopped at a prompt before
writing a word therefore rendered as the 429 then the marker; _stall_step
matched the first line, nudged (interrupting the very call the human is asked
about) and charged a rung — the case dp#58's Shape names as one to leave
alone. Either marker, line-anchored anywhere in the turn, is now a `human`
verdict decided before the lock: nothing is marked, cleared or charged, so a
standing ladder neither advances nor resets while the seat waits. The
_stall_reply comment that claimed sminos already kept these from reading as
errors is corrected, and the suite pins both marker openings at sminos's
source so a rewording there fails a test instead of reopening this.

A STALE HAND-OFF STAMP ENDED A WORKING RUN. phase_stall reads `idle` outside
the registry lock and _stall_step re-checked only run_id under it, so a wake
landing in between got a rung charged or the hand-off stamped on it. And
phase_renew's arm ended the run on the stamp alone, with no sync and no idle
re-check — since the hand-off ends the run and retires the meta, a worker
woken after its stamp lost its run mid-turn. The same arm also ended a worker
that had answered as itself and gone idle again, because phase_renew runs
before phase 1b can clear the stamp. Now _stall_step re-reads status under
the lock (`busy`: nothing written), phase_renew syncs first (the liveness
call, which promotes a natively woken seat) and its arm asks _handoff_due:
a gone session hands off as before; otherwise the seat must read idle and its
turn goes back through _stall_step — `spent` hands off, `clear` keeps the run
and clears the ladder and the ticket's cycles as phase 1b would, and `human`,
`busy` or an unreadable turn keep it for this tick.

Drills (test-sweep-stall.sh): u-askq, u-hprompt and u-midladder for the
markers; u-gap, a wake in the window between the candidate read and the step;
u-revived, u-recovered and u-waiting for the arm. u-endfail's fixture gains
the turn its stamp describes, since the arm now reads one. Against main's
_sweep_api.sh, 17 of the 20 new behavioural assertions fail (6 of 7, 2 of 3,
9 of 10; the rest show each drill reaches its shape) and no existing one
does. Suite: 133 ok, PASS.
@SSFSKIM
SSFSKIM merged commit 02f425f into main Oct 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant