GeezerVison is showing github.com — Phase 5: persisted incremental tag index · Issue #183 · developing-today/code
Phase 5: persisted incremental tag index #183DescriptionThe tag fold and index are rebuilt on every call by scanning all events with a signature check (src/tag_claims.rs, src/tag_index.rs). Needed before P5.5 search. Persist the fold and update it incrementally as events are kept. Activitydezren39 commented on Oct 24, 2026 id train triage (2026-10-24): too-big-needs-design — persisted incremental tag index; the fold/index is rebuilt each call by full scan + signature check (src/tag_claims.rs, src/tag_index.rs). dezren39 commented on Oct 29, 2026 🤖 Agent note · picked up
- Agent: queue worker (repo-worker-code), lane D
- Session / ID: queue task 2024
- Found via: queue claim
- Task: Triage issue Phase 5: persisted incremental tag index #183 — verify persisted incremental tag index claim against current main, then route as scoped follow-up or close with evidence
- Expectation: s — triage verdict backed by code citation at HEAD
- Links: n/a yet
dezren39 commented on Oct 29, 2026 🤖 Agent note · done
- Agent: queue worker (repo-worker-code), lane D
- Session / ID: queue task 2024
- Found via: queue claim
- Task: Triage verdict for Phase 5: persisted incremental tag index #183 — CONFIRMED at current main
- Expectation: done — verdict below, follow-up routed
Verdict: CONFIRMED — the fold and index are rebuilt on every call at HEAD a3cdf6c9a35df1ff8b88b7a02d62e5c04ca4c94a, and nothing is persisted.
Evidence (fresh gh api reads of current main, not the issue text):
pkgs/id/src/event_store/claims.rs — tag_claims() iterates the whole EVENTS table, decodes every stored event, builds the parents map for every event, and folds compacted_claims; tag_index() is exactly TagIndex::new(&self.tag_claims()?) — a full rebuild per call.
pkgs/id/src/search.rs module header states it outright: "The index is rebuilt on each call, as [EventStore::tag_index] rebuilds it (Phase 5: persisted incremental tag index #183). Nothing is persisted here." — so P5.5 search, the consumer this issue said it was needed before, has already landed on top of the rebuild behaviour; the cost now grows with every event the store keeps.
pkgs/id/src/tag_index.rs module header: "The index is local and rebuilt from the store's live claims." TagIndex is two in-memory BTreeMaps built by TagIndex::new(claims).
No competing work: no open PR implements a persisted tag index (open PR #1806 is the unrelated author-index search).
Routing: the 2026-10-24 triage comment on this issue called this "too-big-needs-design", so the follow-up packet pins the design instead of leaving it open: persisted fold state in the store's existing redb database (parents / live claims / α+Ω index tables + a meta row with schema version and an EVENTS-position watermark), an incremental fold_new_events() path that folds only rows past the watermark while preserving the causal-past clear semantics exactly, and the existing full scan kept as the rebuild/reference fallback on version mismatch or corruption. Enqueued as queue task 2974 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:183, packet queue-packets/packet-183-fix.json). This issue stays open and is labelled queue/queued for that task.
dezren39 commented on Nov 14, 2026 🤖 Agent note · picked up
- Agent: repo queue worker, lane code-a (repo-worker-code)
- Session / ID: cron repo-queue-worker-shift-code-a run 2026-11-14; task 16663
- Task: task 16663 for issue Phase 5: persisted incremental tag index #183 — persisted incremental tag index (corrected packet from triage task 15161: per-author or ingest-time fold maintenance; no single scalar watermark). Execution-lane assignment returned direct.
- Fresh check: issue Phase 5: persisted incremental tag index #183 OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit absent).
- Next: read
pkgs/id search/store code at current main, create the task worktree on the laptop, implement the persisted fold with equivalence + persistence + fallback tests.
- Links: task 16663 · issue Phase 5: persisted incremental tag index #183
dezren39 commented on Nov 14, 2026 🤖 Agent note · done — fixed and merged (task 16663)
- Agent: repo queue worker, lane code-a (repo-worker-code)
- Session / ID: cron repo-queue-worker-shift-code-a run 2026-11-14; task 16663
- Outcome: PR feat(id): persisted tag-claims fold with per-author fingerprint (#183) #10059 merged at 2026-11-14T14:37:57Z, merge commit 14e13e3; this issue was closed by the merge.
- What landed: the tag-claims fold is now persisted in the event store. A new
tag_fold redb table holds the folded claims beside a fingerprint of the fold's inputs — per-author change tracking (each author's event count + highest seq in events; no single scalar watermark, per the corrected packet from triage task 15161) plus length-and-key hashes of the auxiliary tables the resolution and group projection read (actions, device_ops, forks, proof_headers, groups, chains, hashes, applied). tag_claims serves the persisted claims while the fingerprint holds (key-only scans, no event decode/resolve); any mismatch, missing row, or undecodable row rebuilds the fold in full and repopulates. Old stores gain the table on first rebuild — no format change.
- Tests: five new tests in
event_store::claims with the full fold over the same store as oracle — persisted==rebuild equivalence, survival across store reopen, invalidation on new sets/clears, corrupt-row fallback with repopulation, encoding round-trip. Suites: cargo test -p id-events -p id-store → 316 + 204 + 12 passed, 0 failed; cargo fmt --check clean. Codex review was at its usage limit (no findings posted); no inline review findings were open at merge.
- Links: task 16663 · PR feat(id): persisted tag-claims fold with per-author fingerprint (#183) #10059 · branch queue/16663-183-persisted-tag-index · issue Phase 5: persisted incremental tag index #183
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|