Repository navigation
Conversation
Codex Review SummaryThis 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: f43500cbf1
ℹ️ 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".
| if self._is_hermes_database(path): | ||
| return cursor.tail_hash != sqlite_source_revision(path) | ||
| return cursor.tail_hash != sqlite_logical_revision(path) |
There was a problem hiding this comment.
Keep full SQLite scans out of the watcher hot path
For every changed-file decision on a previously ingested Hermes database, this now reads and serializes every logical row before deciding whether work is needed. A frequently committed or large state.db therefore turns the watcher from an O(1) main/WAL metadata check into repeated O(database size) synchronous scans, while each scan also holds a read transaction that can delay WAL checkpointing; retain a cheap change detector in the watcher and reserve the logical digest for acquisition/deduplication.
AGENTS.md reference: AGENTS.md:L103-L109
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3ab2882 - the watcher uses a metadata/WAL fingerprint and reserves logical hashing for acquisition. [review-fix lane]
f43500c to
3ab2882
Compare
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ab2882d05
ℹ️ 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".
3ab2882 to
46b43f4
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46b43f4018
ℹ️ 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".
| order_terms: list[str] = [] | ||
| for name in ordered_column_names: | ||
| quoted_column = '"' + name.replace('"', '""') + '"' | ||
| order_terms.extend((f"typeof({quoted_column}) COLLATE BINARY", f"{quoted_column} COLLATE BINARY")) |
There was a problem hiding this comment.
Canonicalize signed zero before hashing rows
Fresh evidence beyond the storage-class-ordering fix is SQLite's signed-zero equality: REAL -0.0 and 0.0 have the same typeof and tie under this value ordering, while the later JSON encoding distinguishes them. Two tables containing those values in opposite insertion orders therefore receive different logical revisions despite having the same typed row multiset, so canonicalize zero during encoding or add a deterministic representation-aware sort key.
Useful? React with 👍 / 👎.
| if kind == "blob": | ||
| assert isinstance(value, bytes) | ||
| encoded.append(["blob", value.hex()]) |
There was a problem hiding this comment.
Hash large SQLite cells without materializing hex copies
When a valid provider database contains a very large BLOB (or byte-preserved TEXT) cell, the query already materializes the whole cell as bytes, and value.hex() allocates roughly twice its size before json.dumps creates another large buffer. Moving logical hashing out of the watcher hot path does not bound this acquisition-time peak, so a multi-gigabyte auxiliary cell can OOM the daemon and prevent the otherwise streaming snapshot from being retained; hash or encode these values incrementally instead.
Useful? React with 👍 / 👎.
46b43f4 to
b25ecee
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b25ecee6a7
ℹ️ 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".
| for name in column_names | ||
| for quoted_name in ('"' + name.replace('"', '""') + '"',) | ||
| ) | ||
| rows = conn.execute(f"SELECT {selected_columns} FROM {quoted}" + (f" ORDER BY {order}" if order else "")) |
There was a problem hiding this comment.
Include implicit rowids in SQLite logical revisions
For an ordinary rowid table without an explicit INTEGER PRIMARY KEY, this query hashes only declared columns and omits the durable implicit rowid. Deleting and reinserting an otherwise identical row can therefore change identities observed by provider queries while producing the same logical revision; if that commit occurs around an online backup/source cut, the before/after checks can accept a snapshot from the wrong rowid state and suppress carry-forward of the change. Include rowid in both encoding and deterministic ordering for rowid tables, while excluding WITHOUT ROWID tables.
AGENTS.md reference: AGENTS.md:L69-L77
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in e87c489 - SQLite logical revisions include implicit rowids for ordinary rowid tables and exclude WITHOUT ROWID tables. [review-fix lane]
There was a problem hiding this comment.
Fixed in e87c489 - logical revisions include implicit rowids, with a reinsertion regression test. [review-fix lane]
b25ecee to
e87c489
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e87c4891a4
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e87c4891a4
ℹ️ 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".
| selected_column_names = ( | ||
| ["rowid"] if not is_without_rowid and not has_integer_primary_key else [] | ||
| ) + column_names |
There was a problem hiding this comment.
Resolve a non-shadowed alias for the hidden rowid
Fresh evidence beyond the earlier implicit-rowid fix is alias shadowing: when an ordinary rowid table declares a column named rowid, adding "rowid" here selects that declared column a second time rather than the hidden identifier. Two databases with the same declared rows inserted in different orders therefore receive the same logical revision even though queries through _rowid_ observe different identities, so source-cut continuity can suppress a real provider-visible change; select an unshadowed rowid/_rowid_/oid alias, or account for the case where all aliases are shadowed.
AGENTS.md reference: AGENTS.md:L69-L79
Useful? React with 👍 / 👎.
## Summary `.lane/body.md` and `.lane/title` leave the index; `.gitignore` already lists `.lane/`. ## Problem Every merged lane PR rewrote the two tracked files, so every other open lane branch conflicted with master on them (#4509 rebased four times tonight, #4513/#4515/#4516/#4520/#4522 all cycled through the rebase reaction for this alone). The harvest reads the publication text from the worktree, not from the commit. ## Solution Untrack the two files. Lane branches that still carry them conflict once more (delete versus modify) and then never again. ## Verification ``` devtools verify --quick # exit 0 ``` ## Residual risk A lane that force-adds `.lane/` reintroduces the churn for itself only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01YGi8wLWGR2HYBh8p8fXFXz Receipt: session-01YGi8wLWGR2HYBh8p8fXFXz Co-authored-by: Claude Fable 5.1 <[email protected]>
e87c489 to
966b7e0
Compare
Re-land of #4520 (bead polylogue-aex0), flattened onto current master after the original branch was auto-closed by a force-push to master's tree. Content unchanged apart from a docstring naming the current codex header helper. Bead: polylogue-aex0 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01YGi8wLWGR2HYBh8p8fXFXz Co-authored-by: Claude Fable 5.1 <[email protected]>
…on path (#5403) ## Summary Triage of **85 likely-live P1 review findings** anchored in `polylogue/sources/`, from the 2,599-item backlog where **zero review threads have ever been resolved**. **33 STALE (39%) · 1 WONTFIX · 51 LIVE** — 14 fixed here, 37 reported unfixed with reasons. ## How much to trust the filter — the answer for the other 322 **39% stale.** Treat it as a shortlist, not a verdict. Two failure modes dominate and are predictable: 1. **Wholesale refactor.** All seven `watcher.py` findings are stale for *one* reason: the `_flush_pending` / `_pending_paths` / `_debounced_batch` / `_plan_catch_up` machinery no longer exists. **If a cluster names one mechanism, check the mechanism exists before triaging individually.** 2. **Silent follow-up fix.** The `#4520`/`#4662`/`#4663` append-proof cluster was fixed by later PRs that rewrote neighbouring lines and left the anchor byte-identical — several carry comments restating the reviewer's own words, so **grepping HEAD for the finding's key phrase is a fast stale test**. The filter was reliable where the anchor is a self-contained expression: `antigravity.py`, `codex.py`, `origin_specs.py` findings were nearly all still exactly as reviewed. **And LIVE does not mean the reviewer's consequence is right.** `batch.py:2488` reproduces, but the claimed batch abort does *not* happen — a group-level handler catches it. Measured: `failed=2 succeeded=0` → `failed=1 succeeded=1`. **Verify the consequence, not just the code shape.** ## A pre-existing test refuted as vacuous The lane first claimed `test_sqlite_acquisition_failure_is_a_failed_file_not_a_batch_abort` covered the Hermes fix. Removing the fix and running it: **`PASSED exit=0`**. The test offers a *single* file, so chunk and file coincide — it cannot distinguish the defect. Replaced with `test_sqlite_acquisition_failure_does_not_fail_its_healthy_siblings`, which measures the real difference. ## The fourteen, in one line each `batch_support.py:443` an unterminated final line was reported malformed, recording TERMINAL_CORRUPT_INPUT for an ordinary mid-write snapshot · `watcher.py:867` EACCES/EIO escaped with no cursor or debt row · `watcher.py:1222` `excluded=True` alongside the new stat made a path report no-work **forever** · `batch.py:722` a symlink-spelled violation admitted the identical blocked file after restart · `batch.py:4180` two independent opens now bound to one `_file_observation` · `antigravity.py:586` ID-less steps keyed by message count **renamed `step:1` → `step:0`** when an earlier step became malformed · `antigravity.py:985` conflicting `parent_references` asserted an arbitrary durable topology edge · `antigravity.py:830` a null-key trajectory returned zero steps *and* a denominator of 0 · `dispatch.py:1463` GEMINI_CLI resolved sidecars path-independently · `source_acquisition.py:86` a foreign archive root was admitted instead of refused — plus four more. ## Anti-vacuity — all fourteen, one executed reversion `git checkout <base> -- polylogue/`, re-run the reproduction script, restore. Verbatim base → fixed: ``` 1 malformed_record: True -> False 1b terminated: True -> True (opposite pinned) 2 RAISED PermissionError -> recorded, no exception 3 excluded: True -> False; needs_work: False -> True 5 admitted under symlinked block: ['session.jsonl','healthy.jsonl'] -> ['healthy.jsonl'] 9 ['trajectory:step:0'] -> ['trajectory:step:1'] 11 null-key messages: [] -> ['hello'] 11b foreign-key: [] -> [] (opposite pinned) 12 conflicting parents: parent-1 -> None 12b single parent: -> parent-1 (opposite pinned) ``` Three opposite-direction pins are unchanged across the mutation, so a blanket refusal cannot pass. ## Verification ``` devtools test <6 modules> exit 0, 253 passed, git_dirty false devtools test <final sha> exit 0, 43 passed devtools verify --quick exit 0, 25/25 devtools render all --check exit 0, 'out of sync' 0 git merge-tree vs master 0 conflict markers ``` Closure: six `sources/` files **IN**, two `pipeline/services/` **out**. INDEX `ce86c236… → 0936e4a9…`. **Self-corrected**: the commit message quotes an intermediate identity measured before the Drive guard was relocated — the landed value is `0936e4a9…`, and it must be re-measured after rebase. The lane also *moved* its Drive guard rather than grow the closure: placing it in `sources/drive/__init__.py` (IN) added a baseline member for no semantic gain, so it went to `acquisition_streams.py` (OUT) — which is also the reviewer's own preferred site and covers both branches. ## Highest-severity unfixed, filed separately `revision_backfill.py:3668` — a pre-logical-export Codex `state_5.sqlite` **page image** is not in `frozen_codex_state_raw_ids`, reaches the JSON parser, and its exception is promoted to `FrozenSourceRemediationRequiredError`, **aborting the entire index rebuild**. Needs a terminal non-session receipt; naive rejection doesn't provide one. Also reported unfixed with reasons: the parser fingerprint was **never bumped** for two admission-law changes (`#4704`, `#4925`), so unchanged files are skipped forever; sidecar/assembly inputs never re-enrich their owner; the write-hold budget is unenforced outside the full-ingest route. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Reconstructs legacy append frontiers from retained source bytes after ops.db loss and uses transactionally consistent logical SQLite revisions.
Problem
Pre-offset append rows retained durable payloads without usable byte windows, so deleting disposable cursor state forced full capture. SQLite filesystem and page fingerprints changed for logically unchanged databases, and the logical digest could observe mixed WAL commits.
Solution
The planner admits legacy append windows only when the current source bytes and retained blobs prove a contiguous chain from a unique full predecessor. It recomputes offsets and revisions, including multi-append chains, and rejects replacement, truncation, and ambiguity. SQLite logical revisions run in one read transaction, and the watcher uses that identity.
Verification
nix develop --accept-flake-config --command devtools test tests/unit/sources/test_live_append_cursor_resynthesis.py tests/unit/sources/test_source_snapshot.py tests/unit/sources/parsers/test_codex_state.py tests/unit/sources/test_live_watcher.py tests/unit/storage/test_revision_replay.py: 220 passed.nix develop --accept-flake-config --command devtools verify --quick: passed through the registered exact-head jobc588d447-7200-43ed-92bd-f7b43bed286e.Residual risk
Affected verification did not select Python tests. The full corpus and live archive were not run.
Receipt: harvest-3d19b4e7f5f37b4308591c268a823fa4
Bead: polylogue-aex0