Skip to content

fleet gh step 2.2: Queue/GitHub sync verbs for scripted flows (dispatch, claimant, job bodies) #10973

Done

Description

@dezren39

Step 2.2 of #9016 (fleet gh step 2: higher-level sync tools on the token rotation), sequenced second by triage task 18808 (2026-11-17).

Scope

Build the Queue/GitHub sync verbs: the recurring scripted flows that today compose raw gh issue / gh pr calls in job bodies and pm-stack tooling move onto shared fleet verbs over the step-1 rotation (fleet gh, PR #9014), inheriting the rotation, the retry-safety rule, and value-free errors.

Caller set / call sites retired (verified on main, 2026-11-17)

  • pm-stack/dispatch/src/github.ts — raw GitHub call composition in the dispatch service.
  • pm-stack/opencode-claimant/claimant.py — raw gh issue/gh pr composition in the claimant.
  • Job-body flows named by fleet gh step 2: higher-level sync tools on the token rotation #9016: program tending, stewardship verdict posting, pool reviews (cron job bodies composing raw gh calls).

Acceptance

Activity

  1. added
    task/small-fix
    on Nov 17, 2026
  2. developing-today commented on Nov 17, 2026

    @developing-today
    Contributor
  3. removed their assignment
    on Nov 20, 2026
  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Pickup — xaltha lane taking step 2.2 (#10973): building the Queue/GitHub sync verbs over the step-1 fleet gh rotation and retiring the raw-gh composition at the named call sites (pm-stack/dispatch/src/github.ts, pm-stack/opencode-claimant/claimant.py, and the #9016 job-body flows). Branch xaltha/10973-gh-queue-sync from current main. Progress + per-caller evidence to follow here.

  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Progress — xaltha lane: the sync verbs are built and the in-repo callers are retired onto them. PR #13155 (#13155, branch xaltha/10973-gh-queue-sync, commit d142839be) — Refs this issue, not Closes: one acceptance item remains (job-body adoption, below).

    The verbs (new gh_sync.rs in the fleet crate): sync-labels, sync-view, sync-comment, sync-issue-create, sync-issue-get, sync-labels-add, sync-label-ensure, sync-issue-close. Each strictly declares its command line (#3352) and rewrites to the canonical gh call before the close guard / closure layer / metadata create path run, inheriting the step-1 rotation, the retry-safety rule and value-free errors. Registry inventory + pkgs/fleet/docs/verbs.md updated in the same change. Unit tests in the module pin every verb's canonical rewrite and the strict-parsing refusals (including sync-issue-close refusing gh's 'not planned' spelling in favour of the #9221 taxonomy).

    Per-caller evidence:

    • pm-stack/dispatch/src/github.ts — fallback route rewired end-to-end: ensureLabel → sync-label-ensure, createIssue → sync-issue-create, getIssue → sync-issue-get, addLabels → sync-labels-add, closeIssue → sync-issue-close, comment → sync-comment, all via the packaged fleet binary (PM_DISPATCH_FLEET_BIN, default ~/.local/bin/fleet). App REST route untouched. Disclosure: verb closes speak the fleet closure taxonomy — not_planned → cancelled, completed → implemented; GitHub state_reason granularity is not preserved (all live callers close not_planned, for launch compensation).
    • pm-stack/opencode-claimant/claimant.py — label read → sync-labels (fail-closed contract kept); the three agent-note posts deduplicated into one helper over sync-comment. No raw gh composition remains in the file. Its subprocess-boundary tests were updated to the verb argv shapes.
    • pm-stack/opencode-claimant/launch_one.py — hard-stop read → sync-view, launch note → sync-comment --body-file. (Named in the caller set's spirit: same claimant tool, same two operations, extended to PRs; send_to_opencode.py inherits both.)
    • Job-body flows (program tending, stewardship verdict posting, pool reviews) — their GitHub ops are the same comment-post and label/state-read shapes the verbs cover, but their bodies live outside this repo, so adoption happens in their own definitions. That is the remaining acceptance item; evidence for those callers should be appended here as each body adopts the verbs, and linked from fleet gh step 2: higher-level sync tools on the token rotation #9016.

    Verification (remote dispatch only, per the current build rule) — submitted against the PR branch and, at the time of this note, still queued for placement (fleet GitHub-hosted surfaces saturated; the jobs are recorded and will run; ids/URLs to be appended here as they land):

    • Rust: cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet -p fleet-registry — dispatch handle fp_783d9b73c28e881223ebd1dfe0ea78dd
    • Claimant: python3 pm-stack/opencode-claimant/run_hermetic_tests.py — handle fp_371f0a95ed7d942259d32c7671ad4696
    • Dispatch: bun install --frozen-lockfile && bun test test/github.test.ts && bunx tsc --noEmit in pm-stack/dispatch — handle fp_3fdf5efaa63319c5f8a237075227666a

    PR #13155's own CI also runs the caller suites (pm-stack-tests.yml) and the fleet Rust crates. No suites were compiled or run locally or on the laptop; locally only a Python syntax parse of the edited files.

  6. added a commit that references this issue on Nov 24, 2026
  7. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    🤖 Second-pass verdict (task 22057, lane code-f): NOT resolved — verbs merged, adoption remainder routed.

    Fresh revalidation 2026-11-24:

  8. added
    queue/claimed
    work/assigned
    status/in-progress
    on Nov 25, 2026
  9. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 22945 — live claimed task in repo-health-code-pilot
    • Found via: monitor reconciliation
    • Task: Reverse claim/label mismatch repaired: the queue task is claimed with a live lease but the issue lacked the claim labels; labels synced to queue/claimed + work/assigned + status/in-progress to match the live claim.
    • Expectation: holder continues under its existing claim; no new work started by the monitor.
    • Links: queue task above
  10. removed
    status/in-progress
    on Nov 26, 2026
  11. 11 remaining items

  12. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    oc-code-02 adoption recheck — 2026-11-27 ~06:15Z. No remote job-body edits made. Reverified: in-repo callers remain on sync verbs (dispatch github.ts, claimant.py, launch_one.py grep shows only sync- references, no raw gh issue/pr composition); installed fleet binary here predates sync verbs (0.1.0-dev+g74eee89, gh domain lists no sync verbs) so verification is by source grep, not verb execution. The four job-body definitions (program-tending, pool-composition-review, pool-meta-reviewer, stewardship-cycle) remain external laptop goal-store paths (/home/hatch/workspace/goals/...); local mirror /home/user/workspace/goals has no crons directories, only files/designs. fleet shell targets = laptop=false, codespace=false (local/actions reachable), so no writable access. PR #13155 verbs stand; external acceptance remains open. Recheck when laptop/Codespace reachable.

  13. added
    epic/fleet-tool
    primary-parent/fleet-tool
    stray-work
    on Nov 27, 2026
  14. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    Adoption evidence (lane oc-code-01, amd laptop seat)

    Job bodies live in the live goal store (hatch-personal, minute-autocommit repo), not the stale /home/hatch registry paths. Five adoption edits, all autocommitted and working tree clean:

    1. keep-the-four-repos-healthy/hidden_files/tools/lane-share.py — raw gh issue comment 1425 composition replaced with fleet gh sync-comment --repo developing-today/code (+ error surfaces fleet gh sync-comment failed). py_compile clean.
    2. program-tending-instruction.md — GitHub-access section added: all scripted issue/PR reads and comments go through fleet gh sync-*; documented exception: §8 project-reconcile.sh uses Projects API (GH_TOKEN), which has no verb equivalent.
    3. pool-composition-review-instruction.md — flag filing routed via sync-issue-create / sync-comment.
    4. pool-meta-reviewer-instruction.md — issue filing routed via sync verbs.
    5. [email protected] — verdict-posting rule added; documented exception: CONSOLE HOST VERSION read stays raw gh api .../commits/main (no verb equivalent).

    In-repo callers (dispatch github.ts, claimant.py) revalidated clean on origin/main: sync refs only, no raw gh composition.

    Verb contract: cargo test -p fleet --bin fleet gh_sync → 12 passed, 0 failed. gh_sync.rs is merged on origin/main (PR #16216; local diff vs origin is rustfmt-width only). Live read check with a fresh dev-binary build: fleet gh sync-view --repo developing-today/code issue 10973 returns current labels/state correctly.

  15. added
    priority/normal
    and removed
    status/needs-triage
    on Nov 29, 2026
  16. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): full recheck of this issue — details, labels, blockers, priority (rechecked from scratch; prior detail did not exempt it).

    STRENGTHS:

    GAPS FOUND:

    • no priority label
    • no kind label (kind not unambiguous from title/body — left for the picking-up lane to set)

    FIXES I APPLIED:

    • added priority/normal (sound fix/feature with clear value (default band))
    • status/needs-triage -> status/triaged (this census is the triage; see the agent note below)

    REMAINS: nothing — ready for pickup

  17. added
    app/fleet
    effort/m
    on Nov 29, 2026
  18. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Wave-2 residual pass. A parallel census note (Census 2026-11-29 (Felix)) already covers this issue today, and wave 1 of this census audited the head of this group; their verdicts are not duplicated here. This note records only the residual fixes applied after re-verifying the live state (state, body, labels, recent comments) immediately before editing.

    Residual gaps found: no kind/* label (a parallel census note today left it for the picking-up lane; set here from the title/body); no app/*/area/* label although the owning project is clear from the title/body; no effort/* label.

    Actions taken: labels added: kind/enhancement, app/fleet, effort/m.

    Priority: priority/normal retained — matches the work's urgency as evidenced on the issue; no band change in this pass.

  19. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note — claimed by lane 0537-H (Archer seat, alpha DRIVE 2026-11-30 05:37 CST, fallback-band blocker work for rank 125 / #10974), 2026-11-30.

    Claim-scan (live, this lane): issue OPEN, no live claim in the last comments — prior lanes (22945 parks 2026-11-27, oc-code-01 adoption evidence 2026-11-27) are stale/complete, no PR open. Taking the verification-and-close slice: re-verify each named caller against current main / the live goal store (dispatch github.ts, claimant claimant.py, job-body flows), confirm the per-caller evidence is complete against the acceptance, link from #9016, and close if the acceptance is fully met — or record the exact remainder if it is not. Priority validation 2026-11-30 (0537-H): priority/normal concurred. Key: 0537-H

  20. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note — lane 0537-H verification + close (alpha DRIVE 2026-11-30).

    Acceptance re-verified firsthand this run against current main (files fetched via the contents API today) and the live goal store on this seat:

    • pm-stack/dispatch/src/github.ts — raw gh issue/gh pr composition: none (grep of the full file). Every subprocess GitHub call runs a typed fleet gh sync-* verb (sync-issue-create, sync-issue-get, sync-label-ensure, sync-labels-add, sync-issue-close, sync-comment) over the fleet token rotation; the primary route is the pm-stack GitHub App identity, not raw gh. Call site retired/reduced to the verb as required.
    • pm-stack/opencode-claimant/claimant.py — raw composition: none. Uses fleet gh sync-labels and fleet gh sync-comment (annotated code#10973 in source).
    • pm-stack/opencode-claimant/launch_one.py — raw composition: none. Uses fleet gh sync-view and fleet gh sync-comment.
    • Job-body flows (goal store, hatch-personal): tools/lane-share.py posts via fleet gh sync-comment (line 392, verified in the live copy here); program-tending-instruction.md (7 sync- references), pool-composition-review-instruction.md (5), pool-meta-reviewer-instruction.md (4) all route scripted issue/PR work through fleet gh sync-*, re-verified in this seat's goal-store copy today. The fifth adoption edit (stewardship-cycle verdict-posting rule) stands on lane oc-code-01's firsthand laptop-seat record of 2026-11-27 (autocommitted, clean tree) — not independently re-readable from this seat's projection, named here plainly. Documented exceptions stand as recorded there (Projects API in project-reconcile.sh; one gh api .../commits/main version read — no verb equivalents exist).
    • Verb set itself: PR feat(fleet): gh sync verbs for scripted flows (#10973) #13155 merged (sync verbs on main).

    Evidence per caller is on this thread (adoption evidence 2026-11-27 + rechecks 2026-11-27/29) and this note; the closing link is posted from #9016 in the same pass. Closing #10973 as complete. Downstream note for #10974 (step 2.3): one of its two named predecessors is now closed; #10972 remains open on Drew's caller-placement decision, so 2.3 stays premature until that lands. Key: 0537-H

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/fleeteffort/mepic/fleet-toolkind/enhancementprimary-parent/fleet-toolpriority/normalqueue/blockedstatus:in-reviewstray-worktask/small-fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions