GeezerVison is showing github.com — fleet ctx propagation build 2/5: FLEET_CTX_* env contract + pass-through surfaces (#10357) · Issue #14188 · developing-today/code
fleet ctx propagation build 2/5: FLEET_CTX_* env contract + pass-through surfaces (#10357) #14188DescriptionBuild split from #10357 (automatic context propagation — every fleet action carries its origin). Capture point 2 of 5: the env contract.
Scope
Define the small fixed set of variables (FLEET_CTX_*), set by init/launchers/hooks and passed unchanged through: laptop-agent exec and jobs (daemon records them in the job spool), SSH (AcceptEnv / explicit prefix), the queue broker and secrets broker (logged per trip), and the file-transfer verbs.
Constraints (from #10357, all apply)
Zero model effort; cheap on the hot path (capture once, inherit after — a warm fleet call is ~0.4 s and the context may not add a round trip); no secrets in context; absence representable.
Prove it end-to-end
One context id travels laptop-agent exec -> SSH hop -> queue broker trip with the id byte-identical at each leg's log, asserted by a test that launches all three legs with no model in the loop. Record the test and log excerpts on this issue.
Parent: #10357. Blocks on: the canonical-record decision in the #10357 decision record (env only vs spool file vs both).
{
"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:54:18Z",
"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-05",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activitydeveloping-today commented on Nov 24, 2026 dezren39 commented on Nov 24, 2026 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. dezren39 commented on Nov 24, 2026 🤖 Agent note · triaged — blocker cleared on the recorded default; build is ready to start
- Agent: repo-worker-code, lane code-h
- Task: queue 22337 (triage of fleet ctx propagation build 2/5: FLEET_CTX_* env contract + pass-through surfaces (#10357) #14188)
- Fresh check (2026-11-24): fleet ctx propagation build 2/5: FLEET_CTX_* env contract + pass-through surfaces (#10357) #14188 OPEN, no implementation PR yet. Parent Design: automatic context propagation — every fleet action carries its origin #10357 OPEN. Decision record merged as docs(10357): decision record — automatic context propagation + capture-point split #14192 (
doc/2026-11-24_design_fleet-context-propagation-10357.md).
- Blocker: the issue waited on the canonical-record decision (Q1). That record leaves Q1 DEFERRED to Drew, with a builder default: the env-carried record is canonical, and a spool file keyed by context id is a per-surface cache, never the source of truth. Builds can proceed on that default, which the record says is what the design proceeds on unless Drew overrides it.
- Verdict: the issue is itself the scoped build (env contract, the
FLEET_CTX_* set and pass-through). No separate follow-on is needed, so none is routed. Left open for the implementation.
- Acceptance still owed by the build: the three-leg identity test (exec, SSH, broker) with logs recorded on this issue.
dezren39 commented on Nov 24, 2026 Triage verdict: CONFIRMED, routable as feature_slice (lane code-h, task 22337, 2026-11-24).
dezren39 commented on Nov 24, 2026 Ordering note (lane code-h): task 22337 triage completed with verdict 'no separate follow-on; issue left open for implementation' before the drafted build packet was fixed and enqueued. To keep this actionable issue covered in the queue, feature_slice task 22655 (dedupe_key repo-health:v1:slice:developing-today/code:issue:14188:slice-1) stands as the queued build implementing this issue per the landed #10357 decision record. No second build packet will be filed; claimers should work 22655. dezren39 commented on Nov 25, 2026 Claimed by lane 2, 2026-11-25T01:10Z (queue task 22655, worker claude-lane-2). Building the FLEET_CTX_* contract + pass-through slice on branch lane2/14188-fleet-ctx-env.
Generated by Claude Code dezren39 commented on Nov 25, 2026 Landed in #14704 (squash da3a996).
Proof, from the GitHub-hosted fleet-rust-tests run on the PR head (https://github.com/developing-today/code/actions/runs/45525197760, all suites green):
Running tests/ctx_propagation.rs
test ctx_e2e_helper ... ok
test ctx_propagation_end_to_end_exec_ssh_broker_byte_identical ... ok
test ctx::tests::header_injection_is_impossible_by_grammar ... ok
test ctx::tests::header_round_trip_is_byte_identical ... ok
test ctx::tests::shell_prefix_exports_through_a_real_shell_unchanged ... ok
test client::tests::command_spec_carries_ctx_in_env_and_ssh_leg_exports_it_14188 ... ok
test serve::tests::parse_request_keeps_only_the_valid_fleet_ctx_14188 ... ok
test ssh::tests::remote_line_exports_context_ahead_of_cd_and_command_14188 ... ok
The end-to-end test runs the real UDS queue broker, an exec leg built by command_spec_with_ctx under env_clear, and an ssh leg under a scrubbed /bin/sh with the export prefix, then asserts that FLEET_CTX_ID=task-22655 and the full ctx field string are byte-identical in the exec leg, the ssh leg and the broker's per-trip log line. Contract doc: pkgs/fleet/doc/ctx-env-contract.md.
Left for a later slice: broker to broker forwarding of the caller's ctx, and ctx on GET /file chunk bodies (the client trip log records ctx_id for those).
Generated by Claude Code
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|