Skip to content

fix: watchdog override proof enforcement and litigation viewer transcript matching - #105

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-issues-6cde
Draft

fix: watchdog override proof enforcement and litigation viewer transcript matching#105
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-issues-6cde

Conversation

@cursor

@cursor cursor Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Nightly critical-correctness scan found two high-severity issues that escaped prior review.

1. Executive watchdog override bypass (security)

Impact: Override actions with action_type containing "override" skipped all approval checks. An executive could log action_type="override" for an unapproved ruling with no override_proof, and the watchdog would pass silently.

Root cause: Inverted condition — "override" not in action_type gated the alert path, so overrides were exempt rather than required to carry proof.

Fix: Override actions now alert when override_proof is missing. Non-override actions still require judicial approval or proof.

2. Litigation viewer wrong transcript served (user-facing breakage)

Impact: viewer.py serve and show matched queries with name in stem, so requesting /transcript/bar could return 2026-06-01-foo-bar.md instead of 2026-06-01-bar.md depending on sort order.

Root cause: Substring matching is ambiguous when multiple transcript stems share a topic token.

Fix: Centralized _resolve_transcript() using exact/prefix/suffix rules; when multiple suffix matches exist, prefer the shortest stem.

Validation

  • python3 -m pytest tests/ -q — 62 passed
  • New regression tests:
    • test_run_checks_alerts_on_override_without_proof
    • test_resolve_transcript_prefers_exact_suffix_over_broader_match
Open in Web View Automation 

…ript matching

- Executive watchdog skipped all checks for action_type containing
  'override', allowing unapproved overrides without cryptographic proof.
  Override actions now require override_proof; non-override actions still
  require judicial approval or proof.

- Litigation viewer HTTP serve and CLI show used substring matching
  (name in stem), serving the wrong transcript when multiple stems share
  a topic token (e.g. bar vs foo-bar). Resolve by suffix/prefix rules and
  prefer the shortest matching stem.

Adds regression tests for both paths.

Co-authored-by: Jack J Burleson // LJM <Exios66@users.noreply.github.com>
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