0.22.0: provable round: wire negotiation, differential oracle, tx lifetime, derived link cardinality - #200
Open
zvndev wants to merge 4 commits into
Open
0.22.0: provable round: wire negotiation, differential oracle, tx lifetime, derived link cardinality#200zvndev wants to merge 4 commits into
zvndev wants to merge 4 commits into
Conversation
… oracle, tx lifetime bound, derived link cardinality The sprint that builds the machines that would have caught our shipped bugs, then gets caught by them and fixed before merge. Sprint contents: - Wire protocol version negotiation (hello blocks on Connect/ConnectOk, error class 10, cross-language conformance vectors run by both codecs in CI). Verified backward compatible against the published 0.21.0 npm client and server binary in all pairings. - powdb-oracle: differential testing vs bundled SQLite (219 cases, 2,369 comparisons per run) with a strict known-divergences ledger, stale-entry detection, and entry-free policing twin shapes. - Transaction max lifetime (POWDB_TX_MAX_LIFETIME_MS, default 5 min): a reaped transaction rolls back, releases the write gate, and closes the connection; write budgets on the reply path. - Link cardinality derived live from target-key uniqueness everywhere; the catalog byte is advisory and no engine surface reads it. - ~7,900 lines of new parity/matrix/proptest coverage plus fuzz_execute and fuzz_catalog_open corpora; five new required CI gates with fail-closed guard scripts. Review-and-fix round on top (multi-agent, all verified red to green): - Prepared UPDATE no longer silently loses writes under non-unique or non-int indexes; the fast path is gated to its provably-correct case. - Public Engine::execute_plan now lowers plans; embedders get text-identical answers. - Materialized views: unparseable stored sources are typed errors, union views refresh, and dirty views refresh through every fast path. - Int and Float compare numerically in filters on every access path; all six known-divergence pin lists are empty. - The write-side reap never writes after a failed frame and every connection exit gets a bounded flush; guard tests catch refusals hidden behind helpers. - Bench comparator fingerprint now includes a measured arch field; the laptop-spoof hole is closed and the selftest proves it. - CHANGELOG populated; errors.md documents class 10; POWQL documents the numeric comparison rule. Workspace: 2,072 tests / 0 failures, fmt and clippy clean, TS client 68/68. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
The node addon suite caught the widened rule at its edge: i64::MAX as f64 rounds up to 2^63, so `.v = 9223372036854775808.0` matched a row holding i64::MAX on the interpreted path while the exact index machinery matched nothing, and the answer depended on the access path. The filter rule is now exact numeric comparison (the SQLite approach), in one helper (eval::int_f64_cmp) used by the generic evaluator and both compiled JSON scalar leaves. The compiled float leaf and the float-lane index probe decline int literals whose widening is not exact (past 2^53, and literal 0, where total_cmp disagrees with numeric zero equality) and fall back to the exact generic path. New coverage: an int_f64_cmp truth table (2^53 neighbors, 2^63, -0.0, NaN, fractions) and an engine-level access-path parity sweep at extreme magnitudes. The oracle's new content anchors caught the LIKE code moving +50 lines and were re-pointed; docs updated from "lossy above 2^53" to the exact rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…exer The PR fuzz job pulled `` `:` `` from the corpus: a valid statement (a table scan of a table named ":") whose canonical text stopped parsing, because the fuzz target's own printer wrote Ident/DotIdent/Param tokens bare. It now asks the lexer which spelling reads back as the same token (bare, then backtick-quoted, else unrenderable), the same rule the engine's stored-view writer applies. The crashing input is pinned as a seed so the deterministic replay gate holds the case forever. Also re-points the two oracle ledger anchors that rustfmt shifted by two lines after they were first re-pointed; the content-anchor check caught it both times. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fuzz_execute's first CI run found a client-reachable abort: a materialized view's backing column types were derived from the first result row only, while a projection is typed per row. A json-then-int column (`.tags ?? 0`) hit the row encoder's unreachable (an abort under the shipped panic=abort profile), and a mixed int/float column was worse: both are fixed 8-byte columns, so one type's bits were stored and decoded as the other, turning 7 into 3.5e-323 silently. - derive_view_schema now unifies each column's type across every row; null never constrains it, an all-null column stores as str, and a projection that genuinely mixes types in one column is a typed error before any backing table exists - refresh_view validates fresh rows against the frozen backing schema before the destructive delete, so a type flip in the source is a typed error that keeps the view's previous contents, not an abort mid-replace; the access_path_equivalence pin for the old abort now asserts the clean error on every read shape - pinned fuzz seed: materialize over the fixture's nullable json column CI robustness, all three from the same round: - fuzz_wal_replay's harness retries fs ops on EINTR: libFuzzer's SIGALRM landing inside fs::copy surfaced as a fake crash - the ping-flood reap test accepts a clean EOF at a frame boundary as the reap (the closing flush is time-bounded and a flooded socket can hold it up, which is the documented contract); a torn frame still fails - fuzz-corpus-replay guards its cargo install: the job cache restores ~/.cargo/bin without cargo's install-tracking metadata, so an unconditional install hard-fails on the restored binary Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
The 0.22.0 sprint plus a full multi-agent review-and-fix round on top. Everything below was verified red before fixing and green after.
Sprint contents
Connect/ConnectOk, error class 10, cross-language conformance vectors decoded and re-encoded by both first-party codecs on every CI run. Backward compatibility verified against the published 0.21.0 npm client and the released 0.21.0 server binary in all pairings (byte-identical legacyConnectOk).publish = false, zero new external dependencies.POWDB_TX_MAX_LIFETIME_MS, default 5 minutes,0disables): reap rolls back, releases the write-admission gate, closes the connection; write budgets on the reply path with a bounded closing flush.fuzz_execute+fuzz_catalog_opencorpora, five new required CI gates with fail-closed guard scripts.Review-and-fix round (all verified red to green)
updateno longer silently loses writes under non-unique or non-int indexes.Engine::execute_planlowers plans; embedders get text-identical answers.unionviews refresh, dirty views refresh through every fast path.archfield; the laptop-spoof hole is closed and the selftest proves it.Verification
cargo test --workspace: 123 binaries, 2,072 passed, 0 failedcargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warnings: clean🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.