fix: watchdog override proof enforcement and litigation viewer transcript matching - #105
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix: watchdog override proof enforcement and litigation viewer transcript matching#105cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_typecontaining"override"skipped all approval checks. An executive could logaction_type="override"for an unapproved ruling with nooverride_proof, and the watchdog would pass silently.Root cause: Inverted condition —
"override" not in action_typegated the alert path, so overrides were exempt rather than required to carry proof.Fix: Override actions now alert when
override_proofis missing. Non-override actions still require judicial approval or proof.2. Litigation viewer wrong transcript served (user-facing breakage)
Impact:
viewer.py serveandshowmatched queries withname in stem, so requesting/transcript/barcould return2026-06-01-foo-bar.mdinstead of2026-06-01-bar.mddepending 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 passedtest_run_checks_alerts_on_override_without_prooftest_resolve_transcript_prefers_exact_suffix_over_broader_match