Skip to content

fix: harden actionable error-signature reads - #199

Merged
jmagar merged 2 commits into
mainfrom
fix/perf-audit-review-followup-20260819
Aug 19, 2026
Merged

fix: harden actionable error-signature reads#199
jmagar merged 2 commits into
mainfrom
fix/perf-audit-review-followup-20260819

Conversation

@jmagar

@jmagar jmagar commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to the merged systematic audit in #196. The adversarial post-merge review found two remaining items, tracked as AUD-035 and AUD-036 in reopened master issue #194.

AUD-035 — remove dead returned materialization

  • Remove production-dead SignatureRow.normalizer_version from the returned DB row model.
  • Stop selecting/decoding that unused value in unaddressed-error paging and exact signature lookup.
  • Keep normalizer_version load-bearing in primary-key predicates, joins, grouping, writes, and lookup arguments.
  • Remove the obsolete #[allow(dead_code)] from the test-only CortexService::with_os_adapter constructor, which has real test consumers.

AUD-036 — keep the actionable list actually actionable

error_signatures is durable across normalizer versions, but the public list/ack/unack API identifies a signature by hash only and mutations target the active NORMALIZER_VERSION. Previously, a historical/non-current row could therefore appear in unaddressed_errors even though the current API could not acknowledge it.

  • Scope read_unaddressed_page and its recent-window aggregate to the active normalizer version.
  • Preserve historical rows in SQLite for audit/history.
  • Add DB and service regressions proving non-current rows stay durable but never surface in the actionable list.

This branch is based on current main after #196 and Agent Observatory PR #195.

Verification on current head 8b4346a2

  • cargo fmt --all + git diff --check
  • cargo nextest run unaddressed_errors error_signatures -j 1: 11/11 passed
  • new API regression: unaddressed_errors_hides_non_current_normalizer_versions passes
  • DB version-filter regression passes
  • cargo clippy --all-targets --all-features --locked -- -D warnings
  • repository pre-push router: version sync, module-size, strict Clippy all green

Final exact-head verification is complete.

Fixes #194

Final exact-head evidence

  • Durable full nextest: 2953/2953 passed, 2 skipped, exit 0 (852.613s; slow labels were passing load classifications only).
  • cargo clippy --all-targets --all-features --locked -- -D warnings: passed.
  • cargo test --doc: passed warning-free.
  • cargo machete: no unused dependencies.
  • cargo deny check: advisories/bans/licenses/sources all green.
  • cargo audit --ignore RUSTSEC-2023-0071: no additional vulnerabilities.
  • Version sync: all 16 version-bearing files at 3.13.2.
  • Agent Observatory contracts, transcript env validators, plugin validation, formatting, just check, module-size, whitespace and clean-tree checks: passed.
  • GitHub CI is fully green, including CI Gate, MCP Integration, Tests, Clippy, cargo-deny, Formatting, Repository Contract, CodeQL, version sync, and all analysis lanes.
  • Adversarial PR review: zero unresolved review threads; no further source findings after AUD-036.

@jmagar
jmagar requested a lite review from Copilot August 19, 2026 20:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jmagar jmagar changed the title perf: trim unused error-signature materialization fix: harden actionable error-signature reads Aug 19, 2026
@jmagar
jmagar merged commit 64098b3 into main Aug 19, 2026
19 checks passed
@jmagar
jmagar deleted the fix/perf-audit-review-followup-20260819 branch August 19, 2026 22:47
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.

Master audit: Cortex performance, stability, correctness, and cleanup

2 participants