Skip to content

poll: cover every repository we dispatch to, and key on the review state #534

Closed

Description

@cgwalters-bot

From the cutover audit (#528 (comment)), epic #528.

Lines 3 and 4. The poll watches only agentic-job and agent-board (poll.cjs:14): add review, the broker, homegit and this repository. It gates on the review status and the VERDICT comment (poll.cjs:121): key on the pull request review state at the head instead (cgwalters-forge/agentic-job#516).

Generated-by: https://github.com/cgwalters/#llms

Activity

  1. cgwalters-bot commented on Oct 13, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Evidence for this one: after needs-human was removed from cgwalters-forge/agentic-job#522 (review state CHANGES_REQUESTED, submitted as a real review), the poll dispatched nothing in 20 minutes; the fix run was dispatched by hand. Either the label-removal reset from #520 does not fire, or the poll no longer finds a verdict now that reviews are real.

    Generated-by: https://github.com/cgwalters/#llms

  2. cgwalters-bot commented on Oct 13, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Correction to the evidence above: the poll did dispatch a fix for cgwalters-forge/agentic-job#522 after the label was removed, about 25 minutes later. The reset works; it is slow. The by-hand dispatch was a duplicate.

    Generated-by: https://github.com/cgwalters/#llms

  3. cgwalters-bot commented on Oct 13, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Caching requirement from the operator applies here too: #533 (conditional requests, saved last-change times).

    Generated-by: https://github.com/cgwalters/#llms

  4. cgwalters-bot commented on Oct 13, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Operator, 13 Oct (chat), verbatim:

    Hmm GHA may not like an indefinitely running system though so let’s have the poller back off when it detects idle geometrically back down to 4x/day?

    Requirement: when a pass finds nothing changed, the gap to the next pass doubles, up to a floor of four passes a day; any change resets it to the short interval. Today the schedule is a fixed */10 plus self-restart while a pull request is in flight (poll.yml).

    One shape, for the implementer to confirm or replace: scheduled cron drops to every 6 hours as the floor; events we do receive (dispatch run completion, comments and reviews in our own repositories) start a pass at once; while active, the pass chains itself with a doubling delay kept in the saved poll state and stops chaining once the delay passes the floor. Mind that a sleeping job costs runner minutes.

    Generated-by: https://github.com/cgwalters/#llms

  5. cgwalters-bot commented on Oct 13, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Operator: "Hm I think the poller should be a sub component of agent board right?" The build moves to cgwalters-forge/agent-board#40; this issue stays open for the tracker side (poll.yml calling it) until that lands.

    Generated-by: https://github.com/cgwalters/#llms

  6. cgwalters-bot commented on Oct 14, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Conclusion: agent-board's poll is not ready to replace poll.cjs. I compared the 69 poll runs since #550 merged (03:16:20 UTC) up to 09:23 UTC, which gave 340 pull request × pass pairs. They chose the same step in 302 of them. Of the 38 that differ, 24 are a timing artefact, 5 can't be compared, and 9 are real. All 9 real ones have one cause: agent-board only counts a review by the operator (cgwalters, a User). agentic-job's review is submitted by github-actions (a Bot), so agent-board never sees an approval or a change request from it (poll.rs head_review, which says "Fail closed until independently validated job provenance is available"). poll.cjs was right in every real case: agent-board never once chose merge or a review-driven fix.

    Method (measured): I listed the runs of poll.yml with created>=2026-10-14T03:16Z. There are 99. 30 were cancelled while pending and have no jobs. The other 69 each ran both jobs to success. I read both job logs for all 69 and lined up the <repo>#<n> <sha> <step>: <reason> lines. skip and wait both count as "nothing".

    Disagreements

    Timing artefacts (24, measured). In every run, agent-board reads 54–166 s after poll.cjs (median 88 s), because it first builds agent-board with cargo install, which takes about 1 min. So it sees what poll.cjs just did:

    • 10× "poll.cjs: ready / agent-board: wait": agent-board's reason was "no approving review", which it only reaches once the pull request is no longer a draft. In other words, it read the pull request after poll.cjs had already marked it ready.
    • 8× "poll.cjs: needs-human / agent-board: skip labelled needs-human": poll.cjs had already added the label.
    • 2× on agentic-job#564, "poll.cjs: fix / agent-board: fix round 1 is running": agent-board read poll.cjs's new marker.
    • 3× "agent-board: ready / poll.cjs: nothing listed": the pull request was opened between the two reads. agentic-job#560 was created 03:42:39, between 03:41:34 and 03:42:51, and tracker#552 and agentic-job#566 the same way. poll.cjs marked each ready on its next pass.
    • 1× on agentic-job#564 in 38536331649: the label was removed at 08:37:39, between the two reads.

    Not comparable (5). In each case poll.cjs added the pull request to the merge queue, and the queue merged it before agent-board read it:

    Going by the code, agent-board would have waited on all five (inferred).

    Real (9):

    Run Pull request poll.cjs agent-board What happened next Right
    38508440214 agentic-job#560 merge (auto-merge) wait: no approving review Bot approved 246158a at 03:51; merged 03:59 poll.cjs (measured)
    38510683347 agentic-job#561 merge wait merged 04:26 poll.cjs (measured)
    38512491851 agent-board#53 merge wait merged 04:41 poll.cjs (measured)
    38536962371 agent-board#55 merge wait merged 08:44 poll.cjs (measured)
    38538866101 agentic-job#566 merge wait merged 09:05 poll.cjs (measured)
    38534808944 agent-board#55 fix, pool claude (38535101468) wait the fix run succeeded and pushed 68b6204, which the Bot approved and which merged poll.cjs (measured)
    38533223422 agentic-job#564 fix (review CHANGES at 440e7ef; label removed), pool claude (38533247318) needs-human: marked partial work 8beba18 was pushed at 08:23 and approved at 08:29; the bot merged it at 08:46 while it was labelled poll.cjs (inferred: the fix run ended cancelled, so it's not certain its push is 8beba18)
    38533838021, 38534454059 agentic-job#564 wait: fix round 1 running needs-human: partial work as in the row above poll.cjs (inferred)

    In agent-board's decide, the checks happen in the same order as in poll.cjs. #564's divergence comes only from the Bot's CHANGES_REQUESTED review not counting as failing, so agent-board falls through to the partial-work check (inferred from poll.rs#L772-L862).

    Pools. agent-board never chose fix, so there's no pool to compare (measured). A dry run wouldn't print one anyway, because it picks the pool only under --apply (poll.rs#L1175). poll.cjs started 4 fix rounds:

    agent-board has no equivalent of poll.cjs's toil pool (toilFixPool, poll.cjs#L30); it just alternates through --fix-pool (measured, from code).

    Other differences, both choosing "nothing"

    • agent-board#45, in all 69 passes: poll.cjs said "skip: auto-merge already on". agent-board said "wait: no approving review". The pull request is BLOCKED with reviewDecision: CHANGES_REQUESTED, because cgwalters' review at the older head a9444ca still stands (measured, GraphQL).
      • Neither poll notices this. Both count it as in flight forever, which keeps the chain at 5 min (see below).
    • agentic-job#528: poll.cjs's reason changes between passes ("conflicts", and 3× "auto-merge already on"). agent-board's is always "conflicts". Both skip.

    API requests per pass

    Neither poll prints a count (measured: no such line in any of the 138 logs).

    • agent-board: the state saved by 38541419832 holds 16 cached REST GETs. Add one GraphQL query per followed pull request (4), and that's about 20 a pass, mostly 304s (inferred lower bound).
    • poll.cjs: going by the code (/user, one pulls list per repository, then GraphQL + comments + rules per pull request), it's about 14 uncached requests at the idle state seen here (inferred).
    • agent-board's guard that skips the pass when fewer than 650 requests are left never fired (measured).

    Next-due versus actual cadence

    • agent-board: printed next-due-seconds=300 in 69/69 passes. Its idle backoff never engaged, because bcvk: serialize to_base_disk tests; keep virtiofsd log + guest dmesg on to-disk failure #45 counts as in flight (measured).
    • Actual cadence:
      • Gaps between pass starts were 312–324 s (median 315). That's the 300 s sleep plus queueing (measured).
      • 68/69 of the runs that executed were the job's own workflow_dispatch, and 1 was a workflow_run.
      • The */10 schedule produced 1 run in 6 h, and it was cancelled.
    • So the two agree (300 s), but only because a stuck pull request pins both of them.

    Verdict: not ready. What to fix first

    1. Read agentic-job's review. Accept a github-actions APPROVED or CHANGES_REQUESTED review at the head, with whatever provenance check agentic-job#516 settles on. Without that, agent-board never merges and never starts a review-driven fix. This is the only cause of the 9 real disagreements.
    2. Toil pool. Port toilFixPool/toilOnly, or decide to drop it from poll.cjs.
    3. Print the pool in dry runs, so fix steps can be compared.
    4. Print the requests per pass from both polls (agent-board already counts them in spend).
    5. Handle a standing human change request from an older head (agent-board#45): needs-human, or at least not in flight. Otherwise the backoff can't be judged, and the 5-min chain runs indefinitely.
    6. Make the comparison fair: have both read the same snapshot, for example by running agent-board's pass before poll.cjs acts. 24 of the 38 differences here were only read order.

    Not checked: whether agent-board's --apply path writes markers, labels and dispatches the way poll.cjs does. A dry run doesn't exercise that.

    Generated by dispatch · ◷

  7. cgwalters-bot commented on Oct 14, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Not ready to switch the acting poll. #58 landed, but tracker never enables its review-job gate: the preview omits --review-workflow=review.yml. This is a tracker wiring defect, not evidence that #58's implementation failed. All 14 real decision disagreements below have this cause. No switch plan yet.

    I re-read the 09:32 comparison, #58's merged code, and both jobs' logs for every completed poll run created after its 10:50:51 UTC merge, through the 19:58 UTC run-list snapshot on 14 October. There were 163 runs: 102 completed, 59 cancelled without decision lines, and two unfinished (not compared). The last completed pass was 38627246804. Only agentic-job, agent-board and tracker are compared; actions/review coverage added by #575 is outside this historical comparison.

    Pairing by repository + PR + pass, retaining head SHA and treating skip/wait as no action as before: 531 pairs, 471 agree, 60 differ = 37 timing + 9 not comparable + 14 real. Run-level failure is not exclusion: both poll logs were read even when another job failed.

    Real differences (measured): agent-board says wait: no approving review of the head yet in every row; poll.cjs takes the listed action. Each run link contains both decisions.

    PR (repository abbreviated) Pass poll.cjs
    tracker#559 38562386856 fix
    agentic-job#585 38566457246 merge
    agent-board#62 38569995656 merge
    tracker#563 38574443810 fix
    agentic-job#587 38587761624 merge
    tracker#567 38606940097 fix
    agentic-job#588 (f7fd841fb1cb) 38609983377 fix
    agentic-job#588 (3a359dc28c69) 38616003423 merge
    agentic-job#590 38621258892 merge
    agentic-job#591 38622016621 merge
    agent-board#64 38622790184 merge
    agentic-job#594 38625038623 merge
    agentic-job#595 38626511866 merge
    tracker#574 38627246804 merge

    Code cause for all 14: poll.yml's arguments do not name the review workflow; agent-board's verdicts counts a job review only when config.review_workflow.is_some(). Consequently only operator reviews count. By contrast poll.cjs uses the review status. I independently checked #595's approval and its review run: current head, correct workflow, completed pull_request_target, and submission within the run interval. It should pass #58's provenance checks once enabled (inferred from code, not a rerun with changed flags).

    Timing (37): 20 ready→wait, four needs-human→labelled skip, two fix→running wait; ten PRs appeared between reads (nine ready, one needs-human); one #559 changed head while its fix was running and preview chose ready. Decisions/head changes are measured in logs; attributing them to read-order skew is inference, supported by API creation times and the acting job's logged mutations. Examples: new #582, #559 push between reads, ready/label/fix skew. These are not same-snapshot disagreements.

    Not comparable (9): eight tracker PRs were merged from the queue before preview read them: #560 (pass), #562 (pass), #564 (pass), #563 (pass), #566 (pass), #570 (pass), #573 (pass), #575 (pass). I checked their API merge times. The ninth is agent-board#51's rules GET returning 503, not a policy disagreement.

    Before cutover: enable the configured review workflow and repeat preview comparisons before poll.cjs acts (or from a shared snapshot). Do not loosen #58's provenance checks to hide disagreement. Also settle the existing toil-pool policy: agent-board still selects pools only when applying, by round. Then verify queue/auto-merge behavior, marker/reset compatibility, dispatch token wiring and next-due scheduling before making it the sole actor. This audit verifies observed decisions and the missing flag; it does not exercise agent-board's live --apply writes or establish full cutover parity for agent-board#40.

    Generated by dispatch · ◷

  8. cgwalters-bot commented on Oct 14, 2026

    @cgwalters-bot
    CollaboratorAuthor

    #577 fixed the missing review-job gate; this sample has no demonstrated real action disagreement. Still do not switch the sole acting poll yet: agent-board's apply path deliberately omits the merge queue/auto-merge that tracker uses, lacks the toil-pool policy, and does not follow Dependabot. No switch plan yet.

    I read both poll and agent-board logs of every completed poll.yml run created after #577 actually merged at 20:26:19 UTC, through the 21:58:03 UTC run-list snapshot, 14 October. There are 37 runs: 16 with both decision logs, 19 cancelled with no decisions, two unfinished. Failed overall runs are included when both poll jobs logged decisions. The last completed pass is 38643564491. Scope is the five shared repositories (agentic-job, agent-board, tracker, actions, review), cgwalters-bot PRs only; #587 merged at 21:53:38, after those acting decisions, and its Dependabot author expansion is outside this comparison.

    Measured pairing: repository + PR + pass, retaining head SHA, treating skip/wait as no action: 120 two-sided pairs, 90 agree, 30 differ. Adding eight acting-only and three preview-only records gives 131 union records: 90 agreement, 32 timing-classified, nine not comparable, zero demonstrated real action differences. Logs are measured; timing attribution is inference supported by mutation lines and independently read API timestamps, not a shared-snapshot replay.

    • Timing (32): 13 ready→wait, seven merge→already queued/auto-merge skip, three fix→running wait, five wait→merge, one wait→fix, and three newly opened PRs seen only by preview. Examples: ready/merge skew, fix-marker skew, new PR and review arrival. The review arrivals were independently verified: agentic-job#603 approved 21:08:36 (review); tracker#580 21:09:40 (review); review#69 21:14:13 (review); agent-board#70 21:26:03 (review); review#71 requested changes 21:37:25, then its replacement head was approved 21:54:12 (reviews). Each falls after the acting read and before preview's decision output. Preview now demonstrably chooses review-driven fix and merge.
    • Not comparable (nine): eight PRs merged before preview's open-PR scan: review#67 (pass), actions#33 (pass), tracker#580 (pass), review#69 (pass), tracker#583 (pass), tracker#585/runs: Prepare structural tools without breaking current dispatches #586 (pass), tracker#587 (pass). I checked their API merge times. The ninth is agentic-job#600 in 38634130517: acting says already auto-merging, preview says merge at the same head. Both implementations check that field; the logs do not preserve its value at both reads, so I cannot establish a policy defect or prove the intervening state change.

    One real reason-only policy difference persists in all 16 passes: agent-board#45 is acting skip: auto-merge already on, preview wait: no approving review. Both take no action, so this is outside the 30 action differences. Its head approval cites an issue_comment review run, not pull_request_target. Agent-board intentionally rejects that provenance (run validation); poll.cjs accepts the review status (code). Its older human change request also remains outside agent-board's head-only verdict. Do not weaken provenance to erase this difference; settle how standing older-head human objections and manual reviews should be handled.

    Before cutover:

    1. Resolve queue semantics. Agent-board only performs an immediate head-pinned merge, explicitly excluding auto-merge/queue (code and rationale); poll.cjs tries auto-merge, queue, then direct merge. Logs verify tracker PRs use the queue; I have not tested whether agent-board's direct mutation can satisfy tracker branch rules.
    2. Port or explicitly retire toil-pool selection. Agent-board selects only by round under apply; dry-run does not verify pool parity.
    3. Preserve poll: Keep approved dependency updates from waiting on manual merges #587's merge-only Dependabot coverage: tracker configuration now names it, while agent-board's CLI/configuration exposes only the bot author.
    4. Run a preview-before-actor/shared-snapshot comparison and bounded live apply verification (queue, marker/reset, dispatch credentials, saved state and next-due scheduling) before removing poll.cjs. This research verified logs, review/merge timestamps and code, not agent-board's live writes or full agent-board#40 cutover readiness.

    Generated by dispatch · ◷

  9. locked as resolved and limited conversation to collaborators on Oct 18, 2026
  10. cgwalters-bot commented on Oct 18, 2026

    @cgwalters-bot
    CollaboratorAuthor

    ✅ dispatch ended well. Result: #534 (comment)

    (Run status from 2026-10-14T02:38:47Z, re-posted by the bot without the agent's own words. The original job-token comment was removed so this issue counts as collaborator-only input, tracker#738.)

    Generated-by: https://github.com/cgwalters/#llms

  11. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    ✅ dispatch ended well. Result: #534 (comment)

  12. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Mostly done. One gap remains: cgwalters-forge/misctool gets dispatch and fix runs, but the poll does not follow it, so its pull requests are never readied, merged or fixed. A one-line PR with a test closes it. (Triage at tracker 1720f96, 22 Oct 2026.)

    Done since this issue was filed

    Still missing

    • dispatch.toml's second repos list is the repositories under our own review gate (dispatch.toml#L44). fix.toml has the same list (fix.toml#L69). misctool is the only name on either list that follow lacks, and schedule.repositories names it too. Its bot PR misctool#6 has been open since 21 Oct, not a draft and REVIEW_REQUIRED. Nothing will move it.
    • The comment above that list says misctool has no review workflow. That is out of date: misctool's review.yml landed on 17 Oct (b391a34).
    • These targets also go unfollowed, which looks deliberate (my inference): composefs-rs and bootc are forks whose work goes upstream, so auto-merging into the fork would be wrong; board-test is staging and has no open bot PRs. If you want the poll to watch fork PRs without merging them, that is a separate decision.
    {
      "schema": "agent-board/job-plan/v1",
      "repo": "cgwalters-forge/tracker",
      "item": 534,
      "kind": "implement",
      "runner": "hosted",
      "brief": "Make the poll follow cgwalters-forge/misctool, the one repository on our own review gate that it does not follow (triage comment on tracker#534). 1) Add \"cgwalters-forge/misctool\" to `follow` in .github/poll/agent-board.json. 2) In .github/agentic-job/config.test.cjs, add a test: every repository on dispatch.toml's and fix.toml's second `repos` list (the own-review-gate list, near dispatch.toml line 44) must be in agent-board.json's `follow`. This stops the next repository added there from being missed. Forks (composefs-rs, bootc), board-test and bootc-dev/* appear only on the first lists and stay unfollowed. 3) Fix the comment above that list in dispatch.toml (and in fix.toml if it has the same text): misctool now has .github/workflows/review.yml (misctool b391a34, 17 Oct), so the sentence saying only the operator can approve there is out of date. Before you edit it, check whether misctool's main ruleset requires that review. Also check whether anything else keys on `follow` (epics/coordinator `followed`, supervisor-workflow.test.cjs) and say in the PR what changes for misctool epics. Test: `just test` passes; the new test fails if misctool is removed from `follow`. Make no other changes."
    }
    

    Unclear: whether misctool was left out of follow on purpose. Neither the history nor the docs give a reason. Its review workflow arrived after the follow list was last broadened, which suggests an oversight. If it was deliberate, close this issue as completed instead.

    Generated by dispatch · ◷

  13. cgwalters-bot commented on Oct 23, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Board scheduler: outside any epic. A triage run is asked whether this is done; it answers here. Delete this comment to ask again.

  14. cgwalters-bot commented on Oct 23, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Done: the original gaps have been fixed or deliberately superseded since this issue opened (13 October). No implement job is needed.

    • Repository coverage: #549 added tracker; #575 added review. Homegit was frozen and removed from dispatch/fix bounds by #642; the bot-owned broker was likewise removed by #669, because hosted apply could not push there. Those two therefore no longer need poll coverage. The current follow configuration includes tracker and review.
    • Head-review gate: #604 retired the duplicate PR actor and made agent-board the sole actor, requiring authenticated reviews at the head rather than a review status/VERDICT comment. Its same-snapshot comparison and test results are recorded in that PR. The workflow still uses that actor.

    The old defect is not reproducible in the current configuration. I ran node --test .github/poll/poll.test.cjs: all 21 tests passed, including repository coverage and single-actor checks. I did not exercise live merges. Newer intentional exclusions (misctool and the staged composefs-rs/bootc forks) are documented in the coverage test, not unfinished additions from this issue.

    {"request":"f0eaa00a-558f-4e0f-8f39-539b8c11ff0c","verdict":"done"}
    

    Generated by dispatch · ◷

  15. cgwalters-bot commented on Oct 23, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Board scheduler: closed, as a triage run found this done: #534 (comment). Reopen it if that is wrong.

  16. moved this from Todo to Done in Workstreamon Oct 23, 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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions