Skip to content

Session protection proof failures identify their stage - #841

Merged
zlareb1 merged 9 commits into
mainfrom
fix/session-proof-observability
Nov 18, 2026
Merged

zlareb1 merged 9 commits into
mainfrom
fix/session-proof-observability

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Related: #864
Related: #861
Related: #854

Changelog category (leave one):

  • Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Session protection proof failures log their stage, exception class and numeric database code without logging exception bodies.

Why

A refused privacy proof returns one public error. Internal stage labels distinguish a failed engine, latch, Keeper or nonce check without exposing session content, credentials or database error text.

Scope and risk

The product change is confined to the mirror-latch store and its unit tests. The branch also includes the already-merged test changes from #861 and #864; all three supporting files exactly match main. Diagnostic logging is best effort: extraction or logging errors cannot replace the existing refusal. Stage labels identify the last active proof step; a deadline or context-manager exit can fail after that step. Privacy conditions, public errors, timeouts and owned nonce cleanup retain their behavior.

Compatibility, rollout and rollback

  • Wire: no op, field or default changes.
  • Operator steps: none. Logs take effect with the server build.
  • Rollback: reverting removes the diagnostics; there are no schema changes or stored records.

Tests

  • Three new privacy diagnostic cases fail against the original store; those cases and the existing cancellation-after-commit cleanup case pass. They check exact diagnostic arguments, redaction, unchanged public refusal and owned cleanup.
  • All six unit shards and coverage, floors and offline benchmarks pass in current-head CI. All 13 selected privacy, inventory, harness and clock cases pass without skips in the uploaded unit results.
  • The final five-case local privacy/inventory cohort was not started because its supervisor refused an unknown test process. Both privacy blobs match the version whose five direct cases passed CI. The diagnostics use proof_stage; the LLM stage inventory and model registry are unchanged.
  • Four focused harness checks and four focused coalescer checks pass. The timing judge, parser limits, retries, generated inputs, GC handling and native CPU exclusion are unchanged. The coalescer assertions, values, byte budget and SDK limits are unchanged. Earlier hosted failures remain recorded; no scaling fix or exact hosted expiry timeline is claimed.
  • Ruff lint and formatting, the store's statement limit and git diff --check pass.
  • All 46 current-head checks and all four applicable workflows pass, including native and Postgres integrations, rolling upgrades, SDKs and the Quickstart. No broad suite ran locally. Fresh independent whole-change and actual-main composition reviews have no findings.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (Codex wrote most of the diff); the complete diff, refusal paths, cleanup, redaction assertions and focused results were checked.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed.
  • Generated files are regenerated where applicable; this change adds no generated contract.
  • No migration is changed.
  • No plugin behavior is changed.
  • No frontend files are changed.
  • This description names operator steps and wire changes.
  • Repository text has no deployment details or private content.
  • Commits are signed off.

Record only a fixed proof stage, exception class and numeric database code so backend uncertainty can be diagnosed without exposing error bodies. Keep the public refusal and owned cleanup unchanged.

Signed-off-by: zlareb1 <[email protected]>
The model-stage inventory recognizes literal assignments to stage. Use proof_stage for privacy diagnostics so the model registry stays limited to model calls.

Signed-off-by: zlareb1 <[email protected]>
Keep diagnostics attached to the naturally attempted shape and size so a cost failure identifies its own incomplete parse or walk. Keep the original timing judge, inputs and limits.

Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>

# Conflicts:
#	tests/unit/test_code_regex_cost.py
Signed-off-by: zlareb1 <[email protected]>

# Conflicts:
#	tests/unit/test_code_regex_cost.py
Hold the existing single-window premise with the manual loop clock and flush explicitly. Keep the budget, batch limits, inputs and all assertions.

Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit cc6b791 into main Nov 18, 2026
46 checks passed
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