engineering-loop: enable agent-core trace emission via deploy env#308
Conversation
Adds engineering_loop_agent_core_trace_enabled (default off) + sink path under the service state dir, rendered into the vault-agent engineering-loop env, and enables it on the loop host. Makes the merged Phase 3 emitter actually write agent-core TraceEvent/CostUsage on each live loop cycle. Additive; role default stays off. Sink: /var/lib/engineering-loop/agent-core-trace.jsonl (inside the service ReadWritePaths). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5728c1221b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| engineering_loop_noc_lhp_base_url: "http://[{{ peers.noc.ipv6 }}]:8000" | ||
| engineering_loop_lhp_callback_enabled: true | ||
| # Turn agent-core TraceEvent/CostUsage emission on for the live loop cycles. | ||
| engineering_loop_agent_core_trace_enabled: true |
There was a problem hiding this comment.
Bump the loop runtime before enabling tracing
This enables trace emission for the live host, but the same host remains pinned to engineering_loop_version eb37b1c4d1d7c3f349c8c6cdb3bd890f168c2755 on line 7. I checked that pinned AS215932/engineering-loop source tree, and it has no reader for HYRULE_ENGINEERING_AGENT_CORE_TRACE, _PATH, AGENT_CORE, TraceEvent, or CostUsage, so these rendered env vars are ignored and /var/lib/engineering-loop/agent-core-trace.jsonl will not be produced until the pin is moved to a build that contains the emitter.
Useful? React with 👍 / 👎.
…emitter Per codex review on #308: the prior pin (eb37b1c) has no reader for HYRULE_ENGINEERING_AGENT_CORE_TRACE, so enabling emission was a no-op. Bump to 2800630 (engineering-loop main; range = #24 Phase 3 emitter + #25 agent-core dep, nothing else) so the rendered env vars are consumed and the loop emits on apply. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed the codex P2 (the pinned loop runtime had no reader for the trace env):
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Turns on the (already-merged) Phase 3 agent-core emitter for the live engineering-loop
by setting its env in the deploy config. Additive; role default stays off.
roles/engineering_loop/defaults/main.yml:engineering_loop_agent_core_trace_enabled(default
false) +engineering_loop_agent_core_trace_path(
{{ engineering_loop_state_dir }}/agent-core-trace.jsonl).roles/vault_agent/templates/engineering-loop.env.ctmpl.j2: renderHYRULE_ENGINEERING_AGENT_CORE_TRACE+_PATH(outside the secret block).host_vars/loop.yml: enable on the loop host.Sink
/var/lib/engineering-loop/agent-core-trace.jsonlis inside the unit'sReadWritePaths(ProtectSystem=strict).render-all.shis clean (nogenerated/drift).Apply (operator-gated — not done here)
This changes a production host. Per the deploy runbook, an operator applies it with Icinga
pre/post snapshots:
(vault-agent re-renders the env; the next timer cycle emits.) Verify after with:
ssh loop 'tail -f /var/lib/engineering-loop/agent-core-trace.jsonl'.Notes
(
knowledge_loop_timer_enabled: false, your deferred canary) and its live path is theknowledge MCP server, which the emitter doesn't hook yet — so enabling its env now would
be a no-op. Handled separately.
🤖 Generated with Claude Code