Skip to content

Event storage proof failures identify their stage - #885

Merged
zlareb1 merged 2 commits into
mainfrom
diag/event-cutover-observability
Nov 18, 2026
Merged

zlareb1 merged 2 commits into
mainfrom
diag/event-cutover-observability

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Related: #841

Changelog category

  • Improvement

Changelog entry

Ordinary-event verification reports its last active proof stage and fixed error fields when it refuses analyst access.

Why

Cutover verification replaces failures with one public refusal. Native policy observers also discard transport and result-validation causes before that boundary. Diagnostics cannot distinguish writer discovery, observer transport, insert drain and census failures.

The existing refusal boundaries report a fixed stage, exception class and numeric database code when available. Native observer diagnostics report the HTTP status separately, without reading a rejected response body. A stage names the last active step, including context-manager cleanup after that step; it does not establish which predicate failed.

Scope and risk

Only cutover and native-observer diagnostics change. The diagnostic fields exclude error text, SQL, policies, credentials, identities and response rows. Logging uses the existing privacy filters. Extraction or logging failures cannot replace the original refusal.

Writer coverage, policy authority, table constraints, the finite insert drain, census, checked sessions, principals, timeouts, cancellation and owned cleanup retain their existing behavior. The change supplies evidence for diagnosis; it does not establish or repair a cause of a live refusal.

Compatibility, rollout and rollback

  • Wire: no operations, fields or defaults change; public refusals are unchanged.
  • Operator steps: none.
  • Rollback: revert the change; no stored data, migration or generated file changes.

Tests

  • Six fake-only regressions first failed because diagnostic records were absent. The same six plus eight existing security and lifecycle controls passed afterward: 14 passed.
  • The controls cover fixed fields, sensitive-text exclusion, rejected-body nonreading, no unchecked replay, cancellation, insert drain, refusal before grants, cleanup and a failing logging sink.
  • Reproduce the new regressions with pytest -q tests/unit/test_event_cutover_diagnostics.py tests/unit/test_ch_observer_diagnostics.py.
  • Scoped Ruff lint and format checks, mypy server/core/ch_observer.py server/insights/store/event_cutover.py and git diff --check passed.
  • Full required suites run in PR CI and must pass before merge. No broad local suite ran.

AI assistance in the code

  • AI-generated: an agent wrote most of the diff. Checked the original refusal paths, unchanged proof controls, cleanup, redaction and causal regression results.

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

Checklist

  • Required formatting, lint, type, unit and integration gates pass in PR CI.
  • No generated files, schema, wire operations or plugin copies change.
  • No migration or plugin version change is required.
  • No frontend files change.
  • No operator steps or documentation changes are required.
  • Repository text contains no deployment details.
  • Commits are signed off.

Keep fixed diagnostic fields before cutover and native observation errors become public refusals.

Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 328fade into main Nov 18, 2026
46 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 18, 2026
6 tasks done
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