Skip to content

eventlog: gate diagnosis, damage test, dead ceremony - #112

Merged
arsenyinfo merged 5 commits into
mainfrom
sweep/eventlog-20260827
Aug 27, 2026
Merged

eventlog: gate diagnosis, damage test, dead ceremony#112
arsenyinfo merged 5 commits into
mainfrom
sweep/eventlog-20260827

Conversation

@arsenyinfo

@arsenyinfo arsenyinfo commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Sweep of appa-eventlog (all changes in appa-eventlog/src/lib.rs, cut from 17e5c1e).

  • lib.rs:171PRAGMA foreign_keys = ON enforced 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-385foreign_batch() was a single-use, feature-gated helper returning Vec::new(). Inlined as encode(&[]); runtime race tests unchanged and green. Reviewer: no findings.
    sweep-key: appa-eventlog/src/lib.rs:379-385:foreign-batch-passthrough
  • lib.rs:749-755a_damaged_file_is_refused asserted only is_err(), which stays true with the whole quick_check probe deleted (the open then fails later as Storage). It now matches OpenError::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 as ForeignSchema { 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 test a_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:172let mut connection = connection; re-bound a value that could have been mut from the match (nothing before the transaction needs it immutable — probe only borrows it); mut is 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-features 16/16, cargo clippy --all-targets --all-features -- -D warnings clean, cargo fmt --check clean, cargo test -p appa-runtime 210/211 (the one failure is external::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

arsenyinfo and others added 5 commits August 27, 2026 22:17
…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 arsenyinfo changed the title sweep(eventlog): open() gate diagnosis, damage test, dead ceremony eventlog: gate diagnosis, damage test, dead ceremony Aug 27, 2026
@arsenyinfo
arsenyinfo marked this pull request as ready for review August 27, 2026 20:53
@arsenyinfo
arsenyinfo merged commit f01d5d5 into main Aug 27, 2026
14 of 15 checks passed
@arsenyinfo
arsenyinfo deleted the sweep/eventlog-20260827 branch August 27, 2026 20:54
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