Skip to content

feat(runtime): log refused session, terminal and chat requests - #77

Merged
guohai merged 1 commit into
mainfrom
feat/log-refusals
Oct 17, 2026
Merged

guohai merged 1 commit into
mainfrom
feat/log-refusals

Conversation

@guohai

@guohai guohai commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Logs every refused session-family request to runtime.log: HH:MM:SS atem runtime: refused <family>/<op>[ kind=<kind>] <code>[ session=<sid>][ (<reason>)].

  • Never logs content: no payload values, prompt or command text. Serde errors are sanitized down to their category and field name.
  • Covers session, terminal and chat errors, rejected receipts, oversize drops and full-inbox busy.
  • Rate-limited per link: at most 20 lines per 10 s, then one "… N more refusals suppressed" line.

Motivation: in the live test, Astation's rule Revoke never took effect, and Atem left no trace of whether the request arrived, failed to decode or was refused.

Tests: unit and runtime tests, including a check that a planted marker value never appears in any line. Full cargo test passed twice (1669 unit tests plus every binary suite), runtime_fixtures_binary passed 3/3, and clippy has no new warnings.

Generated with SMT smt@agora.build

Every inbound session-v1, terminal-v1 or chat-v1 request answered with an
error (or a rejected receipt), plus oversize and full-inbox drops, gets one
line: `refused <family>/<op>[ kind=<kind>] <code>[ session=<sid>][ (<reason>)]`.
Never content: ops outside the protocol vocabulary show as `?`, decode
failures keep only the serde category and field name. At most 20 lines per
10 s per link, then one "… N more refusals suppressed" line.

🤖 Built with SMT <smt@agora.build>
@guohai
guohai merged commit 976e154 into main Oct 17, 2026
1 check passed
@guohai
guohai deleted the feat/log-refusals branch October 17, 2026 19:01
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