Skip to content

jobs: log which check rejects a manifest - #3060

Open
colinmegill wants to merge 1 commit into
edgefrom
jobs-log-manifest-rejection-check
Open

colinmegill wants to merge 1 commit into
edgefrom
jobs-log-manifest-rejection-check

Conversation

@colinmegill

Copy link
Copy Markdown
Member

Observable change

When the job daemon refuses a claimed attempt's output manifest, it now writes one polis_jobs.manifest_reject/1 log line naming the specific check that failed — a manifest-validator field (e.g. the manifest is too large, or a bad embedding-spool descriptor), a result-staging check (the embedding spool, a family spool, a digest, a byte bound, a receipt), or a finalize-time invalid_output. The attempt's transition reason and the poison code are unchanged (manifest_invalid); this is an additional, additive diagnostic line on a distinct schema, kept out of the transition stream its readers parse.

Why

A refused manifest was recorded only as manifest_invalid, with every distinct cause collapsed to that one opaque reason and nothing else logged. When a large conversation's result manifest was refused, it was not possible to tell from the daemon's log which check rejected it. This line makes a rejection diagnosable from the log alone.

Scope / safety

  • No bound, schema, or transition field changes. Poison detection (is_poison_code) and the polis_jobs.transition/1 schema are untouched; the stored pq_fail reason stays manifest_invalid.
  • The new line is emitted only on the rejection paths; a successful attempt logs nothing new.
  • The participation path (votes, comments, next statement) is not touched.

Tests

  • cargo fmt --check, cargo clippy --all-targets -D warnings (default and jobs-integration), cargo test (unit + the jobs_integration suite). The refused-manifest integration test now asserts the daemon log names a check.
  • The production-import proof at ~102 MB (9,500 384-dim comments; codec family 102,767,341 bytes) and the real-model embeddings-table proof both pass unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s

When a claimed attempt's output manifest is refused, the daemon records
the transition reason `manifest_invalid` but collapses every distinct
cause to that one opaque reason and logs nothing more: a validator field
(too large, a bad embedding-spool descriptor, a schema field), any
result-staging check (embedding spool, a family spool, a digest, a byte
bound, a receipt), and a finalize-time invalid_output all look the same
in the log. So an operator cannot tell which check refused a specific
conversation's output.

Emit one additive `polis_jobs.manifest_reject/1` line naming the failing
check next to the unchanged transition. The stored reason and the poison
code stay `manifest_invalid`, so poison detection and the transition
schema are unchanged, and a distinct schema keeps the line out of the
transition stream its readers parse. The integration test for refused
manifests now asserts the log names a check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s

This branch has not been deployed

No deployments
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