Repository navigation
fix: Make export-element content identity authoritative and demote sour… - #5284
Conversation
…f' into batch/polylogue-20260920-100341-e18862be/integration
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details🔇 Additional comments (2)
📝 WalkthroughWalkthroughZIP member replay now distinguishes structural content identities from legacy byte hashes. Valid structural digests disable byte-hash fallback during candidate matching. A unit test verifies that a colliding byte hash does not satisfy a structural identity. ChangesZIP structural identity matching
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description states the intended change and key objective, but it is largely incomplete. It omits the required Problem, Solution, Verification, Changelog, and Risks and Follow-ups sections, and the existing objective is truncated. Resolution Complete the description using the repository template. Add the Problem, Solution, Verification, Changelog, and Risks and Follow-ups sections. Include exact test commands and manual validation results. State whether a changelog entry is required. Complete the truncated reacquisition requirement and explain any remaining risks or follow-ups.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. A rabbit checks the ZIP at night Comment |
## Summary Retires a derived-tier column that reproduces from its own input in **7,403,923 of 7,403,923 live rows, zero exceptions**, costing **178.9 MB**. Bead: polylogue-kc8eq (all five criteria); polylogue-wzgpf not attempted, premise corrected. ## Premise correction Both beads recorded that live-archive measurement is blocked by `SchemaSkewError`. **That is wrong for read-only measurement** — the wall applies to archive-*opening* maintenance routes; a plain read-only `sqlite3` URI connection bypasses it. The census the kc8eq addendum declared impossible was run. ## Measurement (frozen live index, 7,403,923 rows) | carrier | rows | text bytes | share | |---|---|---|---| | `claude_queue_operation` | 57,396 (0.8%) | 519 MB | **20.8%** | | `function_call` | 1,614,517 | 299 MB | 12.0% | | `function_call_output` | 1,614,209 | 263 MB | 10.6% | Exactly one carrier clears the 20% rule, and it is **kept**: it is not a derived projection — it carries queued prompt content that exists nowhere else. Decomposing by *field* ownership found the real redundancy. `session_events.summary` is a write-time render of `payload_json["summary"] or payload_json["text"]`, stored next to its own input. Three independent declarations already said it was not load-bearing: absent from `SESSION_EVENT_PROJECTION_COLUMNS`; listed in `SESSION_EVENT_EXCLUDED_COLUMNS` as *"not read by sync_session_events_batch"*; never selected by `storage/sqlite/queries/session_events.py`; absent from the `SessionEvent` read model. ## A hazard found and fixed before deleting `record_capture_gap` was the **single writer using the column as primary storage** — a prose summary with an empty payload. Deleting the column blind would have silently destroyed that evidence. Its four values now persist as named payload fields, queryable by field rather than by substring. ## Verification ``` devtools verify --quick -> PASSED exit=0 devtools test <8 changed test files> -> 122 passed, 1 failed devtools render all --check -> no "out of sync" ``` The single failure is `tests/unit/demo/test_demo_seed_verify.py::test_seed_demo_embedding_session_is_classified_fresh_not_pending`, which is **pre-existing** — I confirmed it at `cba0480d7`, before any of today's merges, and it is untouched by this branch. Anti-vacuity **executed** through the real production route (`demo/seed.py` -> `record_capture_gap_event`), not a fixture: withholding the summary from the capture_gap payload gives ``` assert "DOM browser-capture fallback" in capture_gap_events[0][1] E TypeError: argument of type 'NoneType' is not a container or iterable ``` ## Schema **Additive-derived** (a derived-tier column removal); `index` carries no version chain, so no migration. Five changed files are **IN** the closure (`archive_tiers_specs.py`, `write.py`, `revision_governance.py`, `ingest_precedence.py`, `input_binding.py`); `demo/constructs.py` is out. Index identity moves `015a941a75ea6903…` -> `01317a7dccde0d6f…`. **Must land before a fresh rebuild starts, never during one.** ## polylogue-wzgpf — not attempted, with a corrected premise AC2 is satisfied pre-existing (#5284), verified at head: `zip_acquisition_replay.py:3` states the hint contract, `:236` passes `source_index` as a hint into structural resolution, `decoder_zip.py:326` emits `source_index=None` on the whole-member path. AC1/AC3/AC4/AC5/AC6 not attempted — corpus reclassification plus a durable migration, and the bead is `write_scope: NONE`. One finding the bead does not record: **the durable side is entirely unmigrated.** Live `raw_sessions` has `source_index` and **no** `addressing_mode` and **no** `content_identity` column, and all 11,803 rows have non-null `source_index` — so **zero of the 43 whole-member blobs have been reclassified**. At head `addressing_mode` exists only on `source_generations`/`source_items`, not per-raw. AC6 is therefore unsatisfied **by schema**, not merely by missing receipts, and its successor is a durable additive migration. No operator data is committed; the measurement was read-only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Data Storage** - Session event summaries are now stored within event payloads rather than a separate database field. - Event details and summaries remain available through payload-based queries. - **Bug Fixes** - Compaction validation now reads summaries from event payloads while continuing to reject failed or errored attempts. - **Tests** - Updated archive, event-processing, replay, and benchmark coverage to reflect payload-based summary storage. - Preserved existing validation, idempotency, and event behavior checks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Batch
polylogue-20260920-100341-e18862beon base36de4728c4b5.polylogue-wzgpf Make export-element content identity authoritative and demote source_index to a hint
Summary by CodeRabbit