Skip to content

fleet CLI: append-only invocation ledger (subcommand use is inference-only today) #9373

Open

Description

@dezren39

Gap

The PM stack quota "Analytics & projection" section (PR #9363) reports fleet binary use per subcommand, but the only source today is inference: regexing OpenCode session shell transcripts for fleet <subcommand> strings. That misses:

  • fleet invocations from cron/systemd units, scripts run outside sessions, and the sandbox side;
  • invocations whose output never lands in a session transcript;
  • argument-level detail (which repo/task a claim touched) beyond what a shell line shows.

Ask

Give the fleet CLI an append-only invocation ledger of its own — one record per invocation: timestamp, subcommand + sub-subcommand, exit code, duration, host, and a caller tag (session id / cron job / unit name when known). A JSONL under the fleet state dir (rotated) is enough; the aggregator can then read it the way it reads the snapshot store, and the analytics section can drop the "inferred" label for fleet use.

Acceptance

  • Every fleet invocation appends exactly one ledger record, including failures and usage errors.
  • Ledger survives CLI upgrades (append-only file, versioned record shape).
  • pm-aggregator analytics reads the ledger and labels fleet counts as recorded, keeping the transcript inference only as a fallback for pre-ledger history.

Activity

  1. developing-today commented on Nov 13, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Agent note — triage (lane any-j, task 18942)

    State: triaged — the gap is REAL and CURRENT; implementation routed as task 20394.

    Fresh evidence (checked 2026-11-17):

    Triage verdict:

    • Work kind: task/small-fix — a bounded implementation: one best-effort ledger append in the fleet multicall entry path (versioned JSONL, rotated, under the fleet state dir; failures and usage errors included; an append failure must never change an invocation's behavior) plus the aggregator read/label change.
    • Priority: priority/normal — analytics accuracy; nothing is blocked, but pre-ledger history is permanently inference-only, so sooner is worth more.
    • Effort: effort/m — two components (Rust entry path + aggregator) with exactly-one-record tests.
    • Routed: fix packet enqueued as task 20394 (dedupe repo-health:v1:fix:developing-today/code:issue:9373) carrying the issue's own acceptance.
    • Acceptance check for this triage: this note + the on-main verification + task 20394; task 18942 completes as triaged.

    Queue: task 18942 (lane any-j) — claimed, triaged inline per runbook §1c.

  3. added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    status/triagedTriaged and routed (see agent note)
    on Nov 17, 2026
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    kind: parked
    task: 20394
    actor: openchamber scheduled lane code-h (repo-worker-code)
    summary: Picked up and parked before any code. Fresh check: no ledger exists on main. The build (fleet multicall append-only ledger plus aggregator reader with recorded labels, exactly-one-record tests) is too large for this scheduled run. Resume from the task checkpoint brief.

  5. added
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 18, 2026
  6. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked — medium-risk multi-component scope exceeds this scheduled window (task 20394, lane code-j)

  7. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 18, 2026
  8. 17 remaining items

  9. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked_up -> parked
    task: 20394
    lane: code-g (OpenChamber scheduled lane, worker repo-worker-code)
    origin: openchamber-scheduled-lane
    stage: claimed -> verified -> parked

    Claimed and checkpointed task 20394 with origin openchamber-scheduled-lane. Fresh verification: #9373 remains OPEN and Drew-assigned; no matching open PR. Existing branch/worktree (queue/20394-9373-fleet-invocation-ledger, /home/user/git/fleet/20394) is preserved and untouched. The paired fleet producer/aggregator change needs the full 45-minute window; no edits made. Parked for a full-window run; coordinate shared analytics-store.ts ownership with parked task 20392/#9374 before editing.

  10. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up → parked — task 20394 (lane code-g)

  11. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    Agent note — picked up, verified, and parked

  12. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    Queue task 20394 (openchamber scheduled lane code-i, repo-worker-code): picked up, re-verified (OPEN, assigned to dezren39, no open PR), and parked for 6h. Implementation needs explicit release of the saved worktree /home/user/git/fleet/20394 and coordination with paired task 20392 on analytics-store.ts. No code or worktree changes made.

  13. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 18, 2026
  14. added a commit that references this issue on Nov 18, 2026
  15. dezren39 commented on Nov 19, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done
    task: 20394
    worker: repo-worker-code
    lane: oc-code-02
    origin: openchamber-scheduled-lane

    Fresh verification: PR #11817 is MERGED at 203b697 (2026-11-18T16:26:45Z); issue #9373 remains OPEN. Previously recorded targeted Rust and aggregator tests passed. Aggregator typecheck remained unverified due to missing @types/bun (TS2688). Completing task as fixed_merged; no further source changes.

  16. removed their assignment
    on Nov 20, 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

    Labels

    effort/mMedium: expected under 1 day of workpriority/normalOrdinary priority (the default)status/triagedTriaged and routed (see agent note)status:in-reviewtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions