Ingest ward correlation metadata into agent-proxy traces and logs #38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Let agent-proxy correlate each LLM request with the
ward agent/wardedrun that produced it, so SigNoz can join proxy traces with ward-run logs.Current state
app/main.pyreadsx-request-idand stores it asagentproxy.request_idinRequestTraceContext. That is useful, but it does not preserve the ward run envelope: repo, issue, harness, role, workflow, context level, ward version, or harness-native session ids.Proposed ingest contract
Accept metadata from headers first, with optional OpenAI body
metadataas fallback when a client supports body metadata but not custom headers. Suggested fields:x-request-id->agentproxy.request_idx-ward-run-id->ward.run_idx-ward-container-name->ward.container_namex-ward-role->ward.rolex-ward-harness->ward.harnessx-ward-target-repo->ward.target_repox-ward-issue-ref->ward.issue_refx-ward-workflow->ward.workflowx-ward-context-level->ward.context_levelx-ward-version->ward.versionx-agent-session-id->agent.session_idfor harness ids such asCODEX_THREAD_IDBehavior
RequestTraceContext.extrafor/v1/chat/completions,/v1/completions, and streaming paths.request_log_fields.docs/proxy.mdanddocs/FEATURES.md.Acceptance
A test request with ward headers produces SigNoz spans/logs queryable by
ward.run_id,ward.target_repo,ward.issue_ref,ward.harness, andagentproxy.request_id, while/metricscardinality remains bounded.Related: coilyco-flight-deck/ward#861.
WARD-RESERVATION: held 🔒
reservation details
Holder: container
engineer-codex-agent-proxy-38on hostkais-macbook-pro-2.local.Reserved by
ward agent --harness codex(reserved 2026-07-09T19:31:06Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (1h TTL).--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
run seed context — what this run is carrying (ward#609)
coilyco-flight-deck/agent-proxy#38· branchissue-38· harnesscodex· workflowdirect-to-mainengineer-codex-agent-proxy-38· wardv0.504.0· dispatched2026-07-09T19:31:06ZStatic container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.504.0).
— Codex, via
ward agentWARD-OUTCOME: done ✅
details
workflow: direct-to-main; review summary: review skipped by ~/.ward/config.yaml default
felt: straightforward. wired metadata ingestion through route context, spans, logs, and streaming path.
confidence: high
surprises: none
follow-ups: none