Repository navigation
fix(projection): remove SQLite TEMP preflight ownership table - #4812
ScriptedAlchemy wants to merge 4 commits into
Conversation
|
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
Refs #4152 — independently reviewed the isolated one-file preflight replacement at 1c3344e against the old materialized ownership flags and the current indexed provenance/staged-output predicates. The boolean conditions preserve the important cases: absent output requires staged creation; a present output can differ only if exclusively created by the current projector. The committed-foreign-body regression executes all three preflight paths plus rollback/integrity and has a nonvacuous passed line in this head's Linux Bazel log (observation_projection::rebuild::activation_tests::output_preflight_rejects_unowned_changes_without_retaining_temp_storage ... ok, run 42454900873, Test Linux fleet).
Not an approval/merge clearance: that same Linux job is red: //crates/tracedecay-global-db:unit_test times out after 300 s in the concurrent 499-test target; automation scheduler and native integration tests also fail outside this diff. Windows is still running and macOS was skipped in this workflow. Keep the checks intact and resolve/attribute those failures through their owners; do not inflate timeouts or treat one test pass as a green target.
This isolated fix stops one persistent TEMP ownership table, but PRAGMA temp.page_count only tests TEMP-database allocation on that writer: it does not census separate unlinked sort files, prove reclaimed bytes on connection retirement, or reproduce the original in-memory SQLite page overwrite. These are still outstanding acceptance requirements. Keep Refs #4152 and the issue open until the remaining spill/reclamation/corruption evidence is actually proven on master. Mixed #4776 remains DRAFT/no merge/no auto-merge.
Refs #4152 Exercise MEMORY and FILE TEMP databases under the shipped allocator. Check live main/TEMP pages and exact committed bodies across rollback, cross-thread frees, allocator collection, sorting and connection close. Verify real Linux unlinked files against the production spill census. Keep the glibc routing control and run integrity checks on other Unix hosts. The local SQLite 3.46.1 SQL/FD probe passed both modes; repository Bazel, mimalloc and native macOS execution remain pending.
Refs #4152 Unchanged compacted foreign outputs were compared against their shortened placeholders instead of their full staged bodies. Hydrate canonical body candidates through the existing verified reader in bounded keyset pages, without restoring connection-local TEMP materialization or trusting only a stored hash. Preserve existing ownership and Hermes collision rules. Add a registered-SQLite regression for 129 matching canonical bodies, a later-page conflict, corrupt and missing persisted bodies, and rollback preserving committed messages and database integrity. The independent SQLite SQL/hydration probe passes these scenarios. Repository Bazel and native macOS execution remain pending.
Published source repair and real storage regressions — Refs #4152Pushed two commits personally, each by an exact expected-old-head, nonforce fast-forward. Current head: Production defect fixed: compacted bodies were compared with snippets
The preflight now pages candidate identities using the staged output key and hydrates only compacted protected bodies through the existing verified The added registered-SQLite regression commits 129 actual compacted messages before rebuilding, accepts matching bodies across the page boundary, rejects a changed tail on the final message even though its snippet is unchanged, and refuses a corrupted or missing persisted body behind an unchanged hash. Faults are savepoint-scoped; foreign keys are deferred, not disabled. After rollback, a fresh snapshot verifies every committed message and its metadata, no abandoned generation, all integrity-check results, and foreign-key integrity. This is a regression for the verified preflight defect, not a reproduction of the original allocator corruption. Real allocator / TEMP / sorter lifetime coverage
Verification actually performed
These probes are supporting mechanism evidence, not Rust/Bazel, mimalloc, or native-macOS test passes. This environment has neither a repository checkout nor Bazel. No Cargo was used. Exact-head workflow 42464926379 is queued; its Required Bazel verification on this head: bazel test //crates/tracedecay-cli:c_library_allocator --test_output=all
bazel test //crates/tracedecay-global-db:unit_test --test_arg=output_preflight --test_output=allConfirm the named tests actually execute with nonzero counts, then run the affected target and applicable platform checks. Prior full-target timeouts and unrelated CI failures are not claimed fixed by these commits. #4152 remains open: original in-memory corruption causality, remaining runtime spill/reclamation acceptance, native evidence, and master acceptance are still outstanding. #4776 is still DRAFT and unmerged; no merge/auto-merge, release, infrastructure, credentials, tags, or schedule changes were made. |
Refs #4152 Match the Bazel rustfmt check on both issue-specific files without changing the production preflight or altering test assertions.
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
Refs #4152 — exact-head source/behavior review (a9c68c2). Inspected the current rebuild preflight against master ownership predicates and the canonical LCM reader. The indexed keyset loop drops its result cursor before verified per-body hydration, keeps the current-projector/foreign-projector decision ahead of mutation, and rejects absent outputs without staged creation. For compacted inline content, message_body_from_record_row verifies bytes against the canonical hash; the new 129-message regression covers a beyond-first-page changed tail, missing/corrupt canonical rows and transactional rollback. The allocator test exercises real FILE/MEMORY TEMP pages, unlinked sorter lifetime and exact durable data after rollback/reopen, without changing production allocator routing.
Not an approval or merge clearance. The current exact-head run 42468670167 is still queued; the two new Rust regressions have no nonzero Bazel result on this head, nor a native macOS pass. The prior Linux full target timed out, despite one preflight test passing on an older head. This PR does not prove recurrence/causation of the original in-memory page overwrite or bound all long-lived sorter/TEMP spills; the separate retained/cleared TEMP cache change remains held on mixed DRAFT #4776 and must not be moved to bypass its hold. Keep Refs #4152, issue OPEN, and do not merge until applicable exact-head checks/reviews and master acceptance are established.
|
Refs #4152 — fresh exact-head Bazel evidence for The Linux fleet job in run 42468670167 executed and passed, without a
The fleet command used New exact-head CI blocker: the same Linux fleet job is red on three other targets, none modified in this PR:
Do not weaken CI or expand this issue's source ownership to chase those failures without a regression-backed attribution. The other Linux job is queued, Windows remains in progress, and macOS was skipped on this run. No full CI-green or merge clearance is claimed. The separate retained/cleared TEMP tables still live on |
|
Refs #4152 — new exact-head validation blocker at CI run 42468670167 has now finished failed. Its Windows job was cancelled during Bazel build, after logging Read current root AGENTS.md, the issue and all three discussions, master accepted allocator/sort-spill/census code, current PR review/threads and overlapping PRs. No new issue-specific code defect was established by CI, so no speculative edit, gate weakening, timeout increase or merge was made. The remaining TEMP retained/cleared table removal and physical-inode-deduplicated spill census are present on held DRAFT #4776 only; master still lacks them. The maintenance footprint file also overlaps open #4799. Do not copy held work or overwrite that owner. Issue #4152 remains OPEN: original memory-overwrite causality, remaining spill/reclamation acceptance and master-proven behavior are unresolved. #4776 and Kev/decision work stay DRAFT/unmerged; release #4763 and all schedules remain untouched. |
|
Refs #4152 — verified safe-reclamation blocker on the still-held projection writer TEMP schema (not a new source fix). I ran an isolated SQLite 3.46.1 file-backed probe, without touching operator data:
Therefore an in-place I independently retried only the previously cancelled Windows CI job on PR #4812's unchanged head |
Issue-specific source repair — Refs #4152
This PR remains partial and does not close #4152. It supersedes historical #4802's commitlint-broken history with a clean branch based on
master; no commits were rewritten and all later updates were exact expected-old-head, nonforce fast-forwards.Production changes
observation_projection_rebuild_preexisting_outputs, an ephemeral ownership table that was allocated on the long-lived projection writer and could retain unlinked SQLite TEMP pages even after being dropped. The collision preflight reads staged output and current/foreign ownership from the existing indexed durable tables, before clearing ownership.content = NULLand a derived snippet while its complete body lives insession_canonical_bodies. Comparing the snippet to a staged complete body falsely rejects unchanged foreign/shared outputs. The preflight now walks matching candidates in bounded keyset pages, hydrating compacted protected bodies through the existing hash-verifying reader. Missing/corrupt bytes fail closed; ordinary inline collision and Hermes ownership rules remain in effect. No new TEMP table or shadow cache is introduced.Regressions
PRAGMA integrity_checkremains clean. This test previously passed nonvacuously in the Linux Bazel log for run 42454900873, though the full target timed out.Verification and remaining work
//crates/tracedecay-cli:c_library_allocatorand the namedoutput_preflightregressions under//crates/tracedecay-global-db:unit_test, then affected full targets and platform checks. There is no Bazel executable or working repository checkout in this run environment. No Cargo was used.No production or infrastructure actions, tags, credentials, release #4763 changes, CI weakening, or schedule changes.