Skip to content

fleet ctx propagation build 5/5: attribution at the stores — log the context id (#10357) #14191

Backlog

Description

@dezren39

Build split from #10357 (automatic context propagation — every fleet action carries its origin). Capture point 5 of 5: attribution at the stores.

Scope

Secrets lookups, KV reads/writes (sibling design), and broker trips log the context id, joining the observability already present (atlas session corpus via fleet search, broker trip logs) into one traceable web. Uses the context id as the single join key across brokers' trip logs, job spools, and atlas (per the #10357 decision record).

Constraints (from #10357, all apply)

Zero model effort; cheap on the hot path; no secrets in context (ids only — the context is logged widely by design); absence representable.

Prove it end-to-end

One context id joins a secrets-broker trip log row, a queue broker trip, and an atlas session-corpus hit for the same originating task — same id in all three, no model involvement. Record the queries and excerpts on this issue.

Parent: #10357. Siblings: #14186 (1/5 init sourcing), #14188 (2/5 env contract), #14189 (3/5 session hooks), #14190 (4/5 MCPX passthrough).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T07:55:34Z",
    "session_id": "ses_e5df380901affeA00VKjJyEOvl",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code",
      "repo": "developing-today/code",
      "branch": "oc-code-06/design-10391-iroh-transport",
      "sha": "9c2b4ad096e30beb45358cbde674ed4c8a52434e"
    },
    "auth_subject": "oc-code-06",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Acceptance criteria

  • Secrets lookups, KV reads/writes and broker trips log the context id, using it as the single join key across broker trip logs, job spools and the atlas session corpus.
  • End-to-end proof recorded on this issue: one context id joins a secrets-broker trip log row, a queue broker trip, and an atlas session-corpus hit for the same originating task — the same id in all three, with no model involvement.
  • The Design: automatic context propagation — every fleet action carries its origin #10357 constraints hold throughout: zero model effort, cheap on the hot path, ids only (no secrets) in the logged context, absence representable.

Blockers

The end-to-end proof was routed to run once siblings #14186 and #14189 read closed. #14189's implementation has landed (opencode fork PR #2844) though its issue is still open awaiting owner close; #14186 remains open. status/blocked + queue/blocked already on the issue match this.

Activity

  1. added
    epic/fleet-orchestration
    on Nov 24, 2026
  2. developing-today commented on Nov 24, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Triage (oc-code-07, task 22397), fresh GitHub state checked 2026-11-24.

    Verdict: needs-implementation, not a small fix. Checked the tree: no context-id logging in the secrets, KV or broker-trip paths (pkgs/fleet matches for context-id are unrelated). Design record #14192 is merged. The build depends on sibling capture points #14186 to #14190 landing first, and the prove-it step needs a live secrets trip, queue trip and atlas hit, which is more than a 20-minute timebox.

    Route: leave open as a real build item, sequenced after #14186 to #14190. No code changed in this triage.

  4. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Decision record for the parent design merged as #14192 — see §4 for this split's place and §§2–3 for the constraints and deferred-question defaults it builds under.

  5. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Second-pass verify (lane code-h, task 22758), fresh state 2026-11-24:

    Verdict: needs-implementation, sequenced after siblings — not resolved.

  6. dezren39 commented on Nov 25, 2026

    @dezren39
    MemberAuthor

    Claimed by lane 1, 2026-11-25T02:40Z, for the queue event store leg.

    Fresh state: #14188 (env contract, with per-trip FLEET_CTX_ID lines in both brokers) and #14190 (MCPX passthrough) are merged, so the broker trip legs of the join already exist. What this slice adds: while the queue broker serves a request that carried X-Fleet-Ctx-* headers, every events row it writes gets ctx_id in its detail, so repo-queue events <task> joins the trip logs on the same id. The atlas session-corpus leg depends on the session hooks in #14189, which are still open, so this PR will reference the issue rather than close it.


    Generated by Claude Code

  7. dezren39 commented on Nov 25, 2026

    @dezren39
    MemberAuthor

    Lane 1: the queue-event leg merged in PR #14805. Broker-written queue events (event() and events.append) now carry the serving request's ctx_id in detail, scoped per request on both the UDS and TCP broker paths, and events written outside a request carry none.

    Proof (remote run 45534659604 at 48c246c, GitHub-hosted Linux): cargo test -p fleet-queue --features queue-broker,secrets-broker --lib 724 passed, 0 failed, including ctx_scope::* and events_carry_the_serving_requests_ctx_id_14191; cargo check -p fleet finished clean.

    The atlas corpus leg is still open (it waits on #14189), so this issue stays open.


    Generated by Claude Code

  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 · attention: missing agent note

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-11-25 01:14 CST; queue task 22881
    • Found via: monitor reconciliation (Duty 4 protocol check)
    • Task: This issue is claimed by a queue worker (task 22881, worker repo-worker-code) and now carries queue/claimed + work/assigned + status/in-progress, but no comment on the issue contains the required agent-note:v1 footer. The holding agent did not leave the required agent note — this protocol gap needs a human/Muse review of why the protocol was not followed.
    • Expectation: holder posts a standard agent note at its next transition.
  10. added
    user/review
    meta/protocol-gap
    on Nov 25, 2026
  11. 6 remaining items

  12. added
    queue/blocked
    status/blocked
    and removed
    work/assigned
    on Nov 25, 2026
  13. dezren39 commented on Nov 25, 2026

    @dezren39
    MemberAuthor

    Decided: Clear meta/protocol-gap after recording the required progress and blocked notes on this run, treating the missing earlier footer as repaired operationally.
    Why: The issue now has an agent-note:v1 record for each transition in this run, and the dependency block has a fresh successful recheck. This run provides no evidence explaining the earlier holder's omission.
    Undo: Reapply the label if a later reconciliation finds a required transition without its agent note.
    By: agent-next-19-local

  14. added
    priority/normal
    and removed
    meta/protocol-gap
    on Nov 25, 2026
  15. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (lane CEN-C14)

    Verified firsthand (body + all comments). State: two of the proof's legs have landed — queue events carry ctx_id end to end (PR #14805, merged, dispatch-verified) and the KV operation log stamps ctx_id at the single dispatch chokepoint (PR #14928, merged; targeted test verified in run 45572893781). The remaining work is the end-to-end proof itself: one scripted op producing one id readable on every surface.

    Blocker (named, updated): the proof was routed to run once siblings #14186 and #14189 close. Since then #14189's implementation landed (opencode PR #2844, 2026-11-27) though its issue is still open awaiting owner close; #14186 remains open. When both read closed, this proof is a single scripted run.

    Census action: added priority/normal. Verdict: blocked (sibling closes).

  16. added
    kind/feature
    on Nov 29, 2026
  17. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): rechecked in full (body, labels, comments, edges).

    STRENGTHS: Capture point 5/5 names its proof in one sentence (one context id joins a secrets-broker trip log row, a queue broker trip, and an atlas session-corpus hit for the same originating task) and inherits the #10357 constraints explicitly (ids only — the context is logged widely by design; absence representable). The blocked state is real: its queue task recorded blocked on the typed-context substrate from the earlier capture points.

    GAPS: No priority/* and no kind/* label. The dependency on the earlier #10357 build points is prose-only (the sibling build issues, e.g. #14189 for 3/5, carry no native edges either) — I record the chain here rather than guessing edge targets per sibling.

    FIXES I APPLIED: Added priority/normal (default band) and kind/feature.

    REMAINS: Nothing for Drewry. Runs last in its chain by construction (5/5).

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

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Gaps found

    • No kind/* label, no app//area/ label, no effort/* label at census time.
    • No ## Acceptance criteria section; the proof obligation sits under a 'Prove it end-to-end' heading.

    Strengths

    Blocker recorded

    Actions taken by this census

    • Labels added: kind/infrastructure, app/fleet, effort/m.
    • Appended an ## Acceptance criteria section to the body (original text unchanged), plus a short ## Blockers note.
  20. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    P1.3 tranche 2 (lane 0640-PS, Refs #17071): wired the native blockedBy edge the record states in prose. Body and census comments 7257415405 / 7258477806: "the end-to-end proof was routed to run once siblings #14186 and #14189 read closed." Census comment 7258086129 flagged this dependency as prose-only. #14186 has since closed (verified live this pass), leaving #14189 as the sole open gate.

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-orchestrationkind/featurekind/infrastructurepriority/normalqueue/blockedstatus/blockeduser/review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions