engineering-loop: logrotate for the agent-core trace sink (Closes #309)#312
Conversation
Bounds /var/lib/engineering-loop/agent-core-trace.jsonl (weekly OR 20M, keep 8, compress, copytruncate, su loop loop) so the additive emission sink cannot grow unbounded under ProtectSystem=strict. Installed via the engineering_loop role on apply; missingok covers the sink-not-yet-created case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ed5bb90e1
ℹ️ 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".
PR Code Suggestions ✨No code suggestions found for the PR. |
Address codex review on #312: use maxsize with weekly rotation so weekly cadence is preserved, and use normal rename/create rotation instead of copytruncate because the emitter reopens the trace path per write.
|
@codex review Addressed both inline findings in 0f58c91:
Local render check: |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
Bounds the additive agent-core trace sink so it can't grow unbounded under the unit's
ProtectSystem=strict/ReadWritePathsconfinement.roles/engineering_loop/templates/agent-core-trace.logrotate.j2→/etc/logrotate.d/engineering-loop-agent-core-traceweeklyORsize 20M,rotate 8,compress/delaycompress,copytruncate,su loop loop(sink lives in the loop-owned state dir),missingok/notifempty.engineering_looprole on apply (one newtemplatetask).render-check clean. Low-velocity sink (
max_runs_per_day: 2), so this is headroom, not urgent.Closes #309.
🤖 Generated with Claude Code