Skip to content

code-index: status publishes no progress during capture, parse, and graph publication #4508

Open

Description

@ScriptedAlchemy

Observed

Cold first generation of a 6,136-file clone of this repository (isolated profile, fastbuild of origin/master, host load ~40), status polled every 3 s by the init --wait lane (PR #4494):

  • 0-430 s: code_index_freshness.worktree.progress is absent while files are captured and parsed.
  • 430-620 s: progress advances 0 -> 6136 files.
  • 620-966 s (graph publication): progress_epoch and last_progress_micros do not move.
  • rebuild_in_flight=true throughout.

On the live daemon (release build) the same phase gap shows as phase: graph_publication with a frozen epoch for minutes.

Why it matters

No client can tell a slow healthy build from a hung one: init --wait (and any other waiter) can only trust rebuild_in_flight, so a pass that hangs while still reporting in flight is waited on forever, and progress-based stall detection would fail healthy builds twice per cold index.

Expected

The daemon publishes monotonic progress for every phase of a pass (capture, parse, link, text projection, graph publication: pages/segments written), so last_progress_micros advances while work advances.

Activity

  1. ScriptedAlchemy commented on Nov 8, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Progress on #4508: focused partial repair PR #4795 now at f5a079c93b6e2d6304647838943eb7b7274148be. The build-progress slot fences wrong-generation and out-of-order committed text counters/terminal phase reports, deduplicates identical blocked states, and — crucially — recognizes a verified new SQLite staging attempt so an actual rebuild may reset committed counts rather than freeze behind the old attempt. The same-owner progress timestamp remains monotonic across that restart. Three nonzero regression tests were added without weakening old tests. Exact-head nonforce updates, Refs #4508 only.

    Unresolved: capture/parse have no pre-seal progress producer, graph still lacks real page/segment progress (phase projection alone freezes epoch and clock), cold/restart end-to-end acceptance remains unproven. Hosted PR CI on this head has no confirmed native Rust pass (native=none was reported on the previous workflow); independent review and Bazel execution remain required. Do not close #4508 or treat this PR as a full fix; keep #4776 decision-model/Kev draft excluded from merges.

    2026-11-08 follow-up: commit d62e730b65c7 on PR #4795 suppresses duplicate phase/batch reports during idle retry wakes, while allowing Ready to clear a previous refusal. A fourth production-path nonzero regression exercises duplicate reports, a true phase change, resumed text completion, and readiness cleanup. This is a published code change, not validated Bazel execution. CI for this exact head is queued as native=none; source capture/parse and actual graph page/segment reports, full cold/resume journey, and independent review are still outstanding.

    2026-11-08 CI repair: PR #4795 was closed as superseded, with its branch and five commits preserved unchanged, because hosted Repository gates failed lint on immutable commit 9dca677 (75-character header; limit 72). The identical two-file source and regression content has been safely reapplied as one normal, compliant commit e287f491 from current master, on the single active replacement PR #4800. No force/rebase/rewrite/deletion or test weakening. Fresh CI is queued (native=none in title); native Bazel proof is still absent. #4508 remains open: pre-seal capture/parse, actual graph page/segment progress, end-to-end cold/resume status, and independent review are unfinished. #4776 remains protected draft and excluded from merge.

    Further 2026-11-08 source fix: On active PR #4800, commit 8270bfcd81e1 now fences the immutable source digest and daemon/producer incarnations even when a verified SQLite staging restart clears the committed snapshot. Added a fifth nonzero regression covering all three foreign-identity cases both before and after restart, legal restart-at-zero, and a new-owner replacement. This is published but not yet Bazel-executed; exact-head hosted CI is queued. Capture/parse and graph-work progress, full cold/resume acceptance, and independent review are still outstanding.

    2026-11-08 idle-boundary correctness: commit 6dc0f5804450 on active PR #4800 rejects an unchanged full progress snapshot even when elapsed time, rate estimates, or latency samples differ. Previously those idle re-samples renewed last_progress_micros and progress_epoch, hiding a stall despite the phase retry fix. Sixth falsifiable regression covers idle retries versus source work, phase changes, durable commits, refusal and recovery. Exact-head nonforce update published; hosted CI #42433641129 is queued and no Bazel/native pass or independent review can be claimed. First-capture/parse and native graph-write milestones and cold/resume end-to-end evidence are still outstanding. Issue and PR stay open; Refs #4508 only.

  2. ScriptedAlchemy commented on Nov 8, 2026

    @ScriptedAlchemy
    OwnerAuthor

    #4508 acceptance blocker discovered in the native graph write path (2026-11-08). The existing progress slot reports sealed lexical/text boundaries, not native graph writes. In crates/tracedecay-graph-db/src/registry/publication.rs, sealed-code-generation replays with no dependencies take direct_seal first (selection at lines 1510–1542; call around 1900); apply_generation_unverified_with_digest_observed and its durable, receipted per-page staging callbacks run only on the fallback path. The normal eligible direct path builds a SealedCompactRows container then calls GrafeoDB::write_compact_container once in sealed_store.rs around lines 1925–2010. Therefore instrumenting only staging page commits cannot solve the cold first-build graph stall. Neither a read-side Ready → GraphPublication projection nor retry heartbeat is a real committed milestone.

    The production fix must surface authentic work boundaries from both the direct-seal writer and fallback staging (distinguishing in-progress physical work from durable completion, rather than mislabeling row emission as committed pages). It must also add a separately typed, per-pass attempt authority for pre-seal capture and parse, where generation_id and sealed_source_digest do not exist yet; only then can the daemon's freshness read carry truthful epochs and times through CLI/MCP/dashboard. Cold first-build, interrupt/restart-resume, frozen/no-progress stall, and blocked/recovered integration tests remain required.

    Current active review surface remains #4800 at 29c1258b8f491def3cf34c5cd6e4b4a6b5e194f6 when inspected. Exact-head CI remains queued; no Bazel/native pass or independent review was observed. No new fix or CI green is claimed here. Keep Refs #4508, issue/PR open; protected draft #4776 and read-only release #4763 untouched.

  3. 55 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions