Skip to content

fix: extend intent token validity to 1 hour and flush WAL on shutdown#24

Open
Pulkit7070 wants to merge 1 commit into
mainfrom
fix/token-validity-and-wal-flush-on-exit
Open

fix: extend intent token validity to 1 hour and flush WAL on shutdown#24
Pulkit7070 wants to merge 1 commit into
mainfrom
fix/token-validity-and-wal-flush-on-exit

Conversation

@Pulkit7070

Copy link
Copy Markdown
Contributor

Summary

  • validitySeconds: 600 → 3600 — prevents mid-session token expiry blocks in long Codex sessions
  • policy-mcp.mjs SIGTERM/SIGINT: drain remaining WAL rows to backend before clearing the flusher interval, so audit rows queued in the last 5s window before shutdown are never silently dropped

Why

The 10-minute default caused ArmorCodex intent token expired blocks mid-turn when a session ran longer than 600 seconds. The WAL shutdown gap was the same issue armorClaude had before PR #52.

Cross-product parity

Mirrors armorClaude PR #52 — same two fixes applied to the equivalent files in armorCodex (config.mjs, policy-mcp.mjs).

Test plan

  • 74/74 existing tests pass (npm test)
  • Long Codex session (>10 min) no longer hits token expiry blocks
  • On kill -TERM <mcp-pid>, verify remaining WAL rows are shipped before exit

- validitySeconds: 600 -> 3600 to prevent mid-session token expiry
- policy-mcp.mjs: drain remaining WAL rows on SIGTERM/SIGINT before exit
  so audit rows queued in the last flush window are not lost on shutdown.
  Mirrors armorClaude#52 fix for cross-product parity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant