Skip to content

fix(audit): fail closed after reload errors - #7179

Merged
houko merged 4 commits into
mainfrom
fix/audit-reload-fail-closed
Aug 14, 2026
Merged

houko merged 4 commits into
mainfrom
fix/audit-reload-fail-closed

Conversation

@houko

@houko houko commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Changes

  • turn unknown persisted audit actions into row decode failures instead of coercing them to ToolInvoke
  • detach the SQLite backend after any incomplete reload so an uncertain sequence/tip cannot be persisted
  • keep decoded audit rows and in-memory recording available for inspection while integrity verification remains failed
  • skip anchor comparison, initialization, and updates when the durable backend was detached
  • cover malformed rows and future action values with real SQLite regressions

Verification

  • cargo fmt --all
  • CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=/tmp/librefang-target-audit-reload cargo test -p librefang-runtime-audit (41 passed)
  • CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=/tmp/librefang-target-audit-reload cargo clippy -p librefang-runtime-audit --all-targets -- -D warnings
  • CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=/tmp/librefang-target-audit-reload cargo check --workspace --lib
  • git diff --check

Out of scope

  • narrowing mutex scope around synchronous SQLite retention operations remains separate work
  • anchor temporary-file naming and timestamp retention comparison remain separate findings

@github-actions github-actions Bot added area/runtime Agent loop, LLM drivers, WASM sandbox size/M 50-249 lines changed labels Aug 14, 2026
@houko
houko enabled auto-merge (squash) August 14, 2026 03:41
@houko
houko merged commit 9886b8a into main Aug 14, 2026
35 checks passed
@houko
houko deleted the fix/audit-reload-fail-closed branch August 14, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/runtime Agent loop, LLM drivers, WASM sandbox size/M 50-249 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant