Skip to content

fix(gits): unblock the automode queue and stop false continuation provenance - #207

Open
Ecko95 wants to merge 2 commits into
gitsfrom
fix/automode-queue-and-provenance
Open

Ecko95 wants to merge 2 commits into
gitsfrom
fix/automode-queue-and-provenance

Conversation

@Ecko95

@Ecko95 Ecko95 commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Two independent correctness fixes in the guided-autopilot proposal path, each with a
regression test. No behaviour is added — both narrow a case where the current code
does something the design does not intend.

1. A scheduled goal stalls the whole queue

AutomodeDriver picked the FIFO winner with oldestQueued(...) and then checked that
goal's notBefore:

const next = oldestQueued(snapshot.goals);
if (next.notBefore !== null && Date.parse(next.notBefore) > now) { ...; return; }

So a single goal scheduled for tonight, sitting at the head of the queue, blocks every
due goal behind it
until its time arrives — the driver returns on each tick without
looking any further.

notBefore is now filtered inside the selection, so it parks one goal rather than the
queue. Reproduced first as a failing test (dispatches a due goal queued behind a not-yet-due one); the existing keeps a proposal queued until its not-before time test
still passes unchanged.

2. A card can claim a source thread it never touched

The sweep offers an unfinished thread to Hermes as a hint ("propose the smallest safe
continuation if it is still relevant"), and Hermes is free to ignore it and propose
something unrelated. sourceThreadId was stamped onto the card regardless, so the
proposal — and the goal it becomes — durably recorded a source thread with no connection
to its content.

It is now stamped only when the proposal output cites the id, via a small pure helper
(citedSourceThreadId) with three unit tests. It is also dropped entirely from the
preflight-blocked card, where Hermes was never spawned, so the claim could never be true.

Verification

  • bun run fmt:check (repo-pinned oxfmt), bun run lint (0 errors), bun run typecheck (14/14)
  • Full bun run test green across all 22 packages

🤖 Generated with Claude Code

Ecko95 and others added 2 commits September 19, 2026 12:06
notBefore was checked on the winner of oldestQueued(), so a goal scheduled
for later sitting at the head of the FIFO queue blocked every due goal
behind it until its time arrived. Filter not-due goals out of the selection
instead, so notBefore parks one goal rather than the whole queue.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The sweep offers an unfinished thread as a hint, but Hermes may ignore it
and propose something unrelated; sourceThreadId was stamped regardless, so
the card (and the goal it becomes) durably claimed a thread it never
touched. Stamp it only when the proposal output cites the id, and drop it
entirely from the preflight-blocked card, where Hermes never ran at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant