fix(sync): canonicalize dependency import defaults - #468
Open
lifeofgurpreet wants to merge 1 commit into
Open
Conversation
Canonicalize omitted dependency persistence fields before strict import verification and equal-timestamp no-op certification. Preserve explicit values and cover first-import plus second-import behavior.\n\nRefs: beads_rust-w4xl
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.
Problem
Legacy JSONL may omit dependency
created_by,metadata, andthread_id.The importer and SQLite schema persist those omissions as
"import","{}",and
"". Strict post-import verification therefore compared a sparse sourceshape with its hydrated storage shape and could reject a lossless first import.
The equal-timestamp path could also fail to certify the second import as a
no-op and arm
needs_flush.Change
equal-timestamp certification.
get_or_insert_with.values, explicit-value preservation, strict verification, a certified second
no-op, export hashes, and
needs_flush != true.This does not weaken semantic comparison: it compares against the exact values
the existing writer/schema already persist.
Behavioral example
A sparse dependency such as:
{"issue_id":"bd-dependent","depends_on_id":"bd-target","type":"blocks"}is verified against its established persisted representation:
{"created_by":"import","metadata":"{}","thread_id":""}Explicit source values remain byte-for-byte unchanged.
Verification
Passing patch-specific and safety evidence on exact base
d2393c99ddcf337bd77d4ba61ce29ea8cdbe715b:updated 0, skipped 3, export hashes 3,
needs_flush != truecargo check --all-targets --lockedcargo clippy --all-targets --locked -- -D warningsgit diff --checkconverged on first import and certified a second no-op
The full release library run completed with 2,876 passed, 4 failed, and 8
ignored. The four failures are outside the changed behavior:
base
d2393c99RUST_LOGunset because release code returnserrorwhile the untouched testexpects the debug-build filter
failed during the parallel full-suite run due another database opener
UBS v5.3.13 also completed with a clean private ast-grep v0.45.3; its cargo
fmt, clippy, check, and test-build sections passed. Its aggregate exit remains
nonzero on pre-existing whole-file heuristics in these very large modules (232
critical / 4,417 warning), so tracker
beads_rust-w4xlintentionally remainsopen rather than falsely claiming the literal UBS-pass criterion.
Scope boundaries
No schema migration, export-format change, dependency rewrite, verifier bypass,
or Git-side behavior is introduced.
Refs:
beads_rust-w4xl