eventlog: gate diagnosis, damage test, dead ceremony - #112
Merged
Conversation
…raint Neither table declares a REFERENCES or FOREIGN KEY clause, so enabling enforcement changed nothing on either backend and implied a relationship the schema does not have. sweep-key: appa-eventlog/src/lib.rs:171:foreign-keys-pragma-guards-nothing Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxjcXD5bidNNnFRPUCnxss
… batch `foreign_batch()` was a single-use helper returning `Vec::new()`; the comment at its only call site already says why the foreign writer takes a position and records nothing. sweep-key: appa-eventlog/src/lib.rs:379-385:foreign-batch-passthrough Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxjcXD5bidNNnFRPUCnxss
`a_damaged_file_is_refused` asserted only `is_err()`, which stays true with the whole `quick_check` probe deleted (the open then fails later at `PRAGMA user_version` as `Storage`). It now matches `OpenError::Damaged`, so removing the damage gate fails the test. sweep-key: appa-eventlog/src/lib.rs:749-755:damaged-test-asserts-is-err-only Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxjcXD5bidNNnFRPUCnxss
A file stamped at this build's schema version whose `logs` and
`policy_files` tables are missing was refused as
`ForeignSchema { found: 1, expected: 1 }`, whose message contradicts
itself and reaches the operator verbatim. The two causes now part ways:
a foreign version stays `ForeignSchema`; our version without our tables
is `Damaged`.
sweep-key: appa-eventlog/src/lib.rs:195-201:stamped-schema-missing-tables-misreported
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DxjcXD5bidNNnFRPUCnxss
The rebinding `let mut connection = connection;` served the pragma that preceded it; with that gone it only restated the binding. sweep-key: appa-eventlog/src/lib.rs:172:stranded-connection-rebinding Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxjcXD5bidNNnFRPUCnxss
arsenyinfo
marked this pull request as ready for review
August 27, 2026 20:53
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.
Sweep of
appa-eventlog(all changes inappa-eventlog/src/lib.rs, cut from17e5c1e).lib.rs:171→PRAGMA foreign_keys = ONenforced nothing: neither table declares a foreign key. Removed. Reviewer: no findings.sweep-key: appa-eventlog/src/lib.rs:171:foreign-keys-pragma-guards-nothing
lib.rs:379-385→foreign_batch()was a single-use, feature-gated helper returningVec::new(). Inlined asencode(&[]); runtime race tests unchanged and green. Reviewer: no findings.sweep-key: appa-eventlog/src/lib.rs:379-385:foreign-batch-passthrough
lib.rs:749-755→a_damaged_file_is_refusedasserted onlyis_err(), which stays true with the wholequick_checkprobe deleted (the open then fails later asStorage). It now matchesOpenError::Damaged; with the probe deleted it fails. Reviewer: no findings.sweep-key: appa-eventlog/src/lib.rs:749-755:damaged-test-asserts-is-err-only
lib.rs:195-201→ a database stamped at this build's schema version but missing its tables was refused asForeignSchema { found: 1, expected: 1 }("is at schema version 1, and this build writes 1"), forwarded verbatim by the runtime. The gate now splits: foreign version →ForeignSchema; our version without our tables →Damaged. New testa_stamped_database_without_its_tables_is_damaged(red before, green after). Reviewer: no findings.sweep-key: appa-eventlog/src/lib.rs:195-201:stamped-schema-missing-tables-misreported
lib.rs:172→let mut connection = connection;re-bound a value that could have beenmutfrom thematch(nothing before the transaction needs it immutable —probeonly borrows it);mutis now bound where the connection is opened. Reviewer: no findings.sweep-key: appa-eventlog/src/lib.rs:172:stranded-connection-rebinding
Assembly review of the full stack: no findings. Validation at tip:
cargo test -p appa-eventlog --all-features16/16,cargo clippy --all-targets --all-features -- -D warningsclean,cargo fmt --checkclean,cargo test -p appa-runtime210/211 (the one failure isexternal::tests::command_descendants_are_terminated_after_success_timeout_and_cancellation, a process-spawn timing wait unrelated to the store; passes 3/3 in isolation).🤖 Generated with Claude Code
https://claude.ai/code/session_01DxjcXD5bidNNnFRPUCnxss