Skip to content

feat: the precheck watches a parked item; nothing waits in the sandbox (6.17.0) - #55

Merged
jezekra1 merged 1 commit into
fix/item-branch-ahead-not-donefrom
feat/precheck-watches-parked
Nov 10, 2026
Merged

jezekra1 merged 1 commit into
fix/item-branch-ahead-not-donefrom
feat/precheck-watches-parked

Conversation

@dam-application

@dam-application dam-application Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What

A parked pull request no longer has a waiter in the sandbox. park ends the turn with nothing running. The tick's precheck already reads every open pull request every ten minutes, at no model cost. It now also watches parked items, and sends the parked session a message when something lands after its last round: a review, a person's comment, a failed check, a conflict or the merge. The session then runs start and handles it, as it did after a waiter woke it.

  • park records watched: precheck on the item lock and says to end the turn. The sweep and locks.dead() count that as alive, so a restart does not hand the item on.
  • The precheck sends the message through the same path the sweep used (send_session_message, logged as messaged, held 15 minutes). If the message is not queued, or the session does not come back in time, the item goes to a fresh run, as before. A message alone exits 1, so it costs no tick turn. It makes no new GitHub calls, except one pr view to confirm a merge when a parked pull request leaves the open list.
  • The Stop hook lets a watched parked turn end with nothing running.
  • Every slot in use: start keeps the item parked and watched, and the precheck asks again once a slot is free.
  • The waiter (wait --park) stays where no tick runs: a person's session, or schedules without tick.

Back-compat

No upgrade step. An item parked by an older version moves over by itself. A waiter that still runs hands the item to the precheck when it ends (or at once, when started again). A waiter lost to a restart is watched instead of messaged.

Why

Last week, 272 turns started only because a waiter's two-hour limit ran out with nothing new. Each turn made 3 to 5 model calls to start the waiter again, but first had to reload a large session context: about $373 in total. About $15 more went to sweep messages to restart waiters after sandbox restarts. Both go away. The cost is reaction time: a review now wakes the session within ten minutes (one tick), not about one minute.

Checks

  • npm run check in app/: typecheck, lint, 177 tests pass. New tests cover: a watched parked item survives the sweep after a restart; the precheck messages the session for a review, a comment, a failed check, a conflict and a merge, once, and exits 1; a message not queued or not answered in time hands the item to a fresh run; the Stop hook lets a watched parked turn end; a waiter-parked item is handed over.
  • bash scripts/validate-definition.sh .: 0 fail. The one warning is the existing CLAUDE.md length; this change makes it shorter.
  • PRECHECK_PROBE=1 precheck against the real repository: reads it and lists work.

Rebased (2026-11-10)

Part of a GitHub stack (#40 → #54 → #55), based on #54. GitHub retargets each pull request onto main as the one below it merges, so merge them bottom to top. This one is now 6.17.0.
allDone gained a branch argument in #54, and its fetch is not for the precheck: the precheck's merge confirmation now calls prsClosed, the pull-request part alone, so it adds no git fetch.

Written by this agent — https://dam-dev.apps.dam-cl.fmaas.res.ibm.com/a/agent-677ca492fbca62dd?s=f42516a0-17b7-44a5-b080-d81ae6a2d458

🤖 Generated with Claude Code

@dam-application
dam-application Bot force-pushed the feat/precheck-watches-parked branch from 5d31ae3 to d17930c Compare November 10, 2026 12:52
@dam-application dam-application Bot changed the title feat: the precheck watches a parked item; nothing waits in the sandbox (6.16.0) feat: the precheck watches a parked item; nothing waits in the sandbox (6.17.0) Nov 10, 2026
…x (6.17.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dam-application
dam-application Bot force-pushed the feat/precheck-watches-parked branch from d17930c to 5a034c8 Compare November 10, 2026 13:05
@dam-application
dam-application Bot changed the base branch from main to fix/item-branch-ahead-not-done November 10, 2026 13:05
@dam-application
dam-application Bot added this pull request to stack #56 November 10, 2026 13:05
@jezekra1
jezekra1 merged commit 1d588f8 into main Nov 10, 2026
3 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