Repository navigation
docs(atlas): per-source delta detection + non-doubling join semantics (#6028) - #8336
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22b93dfe9d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - Each ingested table declares a **watermark column** — a monotonically | ||
| increasing key the store itself maintains (rowid, `updated_at` with a | ||
| tiebreaker key, or an append-only sequence). Detection reads | ||
| `max(watermark)` and the row count cheaply (an index probe, not a | ||
| scan); rows at or below the landed watermark are presumed unchanged. |
There was a problem hiding this comment.
Require an update-sensitive watermark for mutable tables
For a mutable table using the explicitly allowed rowid watermark, updating an existing row does not advance its rowid, so the row remains below the landed watermark and is never selected for hash comparison. The tombstone sweep cannot catch this either because the key still exists. Consequently, edits to existing session records can remain invisible indefinitely. Restrict rowid/append-only watermarks to immutable append-only tables; mutable tables need a watermark that advances on every update or the full row-hash fallback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 66fafaa: the watermark must now be update-sensitive — bare rowid/append-only sequence watermarks are restricted to tables immutable and append-only by construction; mutable tables must declare an update-sensitive watermark (updated_at + tiebreaker, or a store-maintained version that bumps on update) or fall back to hash-every-row. The invisible-edit hole is closed in §2.3.
| ≥ 0.9 covered by spans already landed for the same logical file is | ||
| not embedded as a near-duplicate: it is recorded as an *occurrence* | ||
| of the covering spans (the #5733 ≥ 0.9 dedup edge, #3125 occurrence | ||
| semantics) and the version's span list references those spans with | ||
| this version's offsets. Below 0.9, the non-covered residue is a |
There was a problem hiding this comment.
Preserve the uncovered residue above the dedup threshold
When a new span is 90–99% covered by existing spans, this branch records only occurrences of the covering spans, while literal handling is specified only below 0.9. For example, a 1,000-byte span with 950 reused bytes and 50 genuinely new bytes receives no embedding for those 50 bytes, making the new material unsearchable even though version-text reconstruction can still display it. Suppress the near-duplicate whole-span embedding, but retain literal processing and embedding of the uncovered residue on both sides of the threshold.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 66fafaa: the 0.9 ceiling now suppresses only the near-duplicate whole-span embedding — the non-covered residue is cut and embedded as a literal span at any coverage level, so genuinely new bytes in a 90-99% covered span are searchable content, not just reconstructable text.
| - emit `S`'s bytes from `max(S.start, c)` to `S.end`; set | ||
| `c = S.end`. |
There was a problem hiding this comment.
Clip intersecting spans to the paragraph before emission
When a span crosses a paragraph boundary, step 1 includes it, but this emission rule writes through S.end even when that exceeds P.end. For example, assembling paragraph [0,100) with an intersecting span [50,150) emits bytes through 150, including the next paragraph and violating J1. Intersect each span with the paragraph extent before emission and cursor advancement so the result cannot extend beyond P.end.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 66fafaa: §4.1 assembly now clips intersecting spans to the paragraph extent before emission (emit to min(S.end, P.end); cursor advances to min(S.end, P.end)), so assembly cannot write past P.end — J1 holds by construction.
| rows with an existing key are *edits* (the row's new version lands; | ||
| the old row version is retired, not mutated), rows with new keys are |
There was a problem hiding this comment.
Preserve superseded versions until retention permits retirement
When an existing row is edited before its previous version qualifies for retention, this instruction retires that version immediately. The explicitly adopted content-versioning/retention record (§4.1) permits retirement only when both a retention trigger and the class policy allow it; supersession alone is not a trigger. Since §4.3 here reduces retired-version hits to snippet tombstones, an ordinary edit would prematurely remove historical full-paragraph rendering. Record the successor relationship and leave retirement to the retention policy; the source-deletion rule in §2.1 should likewise create a lineage tombstone rather than automatically retire retained versions.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 66fafaa: the old row version is now superseded, not retired — §2.3 states supersession alone is not a retirement trigger and the superseded version is preserved until the retention record permits retirement (trigger fired AND class policy allows).
) rowid watermarks restricted to immutable append-only tables (mutable tables require an update-sensitive watermark); superseded row versions preserved until the retention record permits retirement (supersession is not a trigger); uncovered residue above the 0.9 dedup ceiling is still cut and embedded as a literal span; join assembly clips intersecting spans to the paragraph extent before emission (J1).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…a-join # Conflicts: # doc/README.md
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Design record for the #6028 remainder (task 14409), companion to the landed #6036 offset-matching record:
Inputs from #6035 (span-table schema), #6037 (chunk-boundary policy v2), and #6040 (CDC feasibility) are stated as parameters, not re-decided.
Refs #6028 — no closing keyword: #6035/#6037/#6040 remain open and the implementation follow-ons are still to be filed, so #6028 stays open.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit