Skip to content

fix(code-index): keep progress observation timestamps monotonic - #4740

Closed
ScriptedAlchemy wants to merge 1 commit into
masterfrom
fix/4508-monotonic-progress-observation
Closed

ScriptedAlchemy wants to merge 1 commit into
masterfrom
fix/4508-monotonic-progress-observation

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Problem

Refs #4508 (partial correctness guard, not the capture/graph instrumentation the issue still needs).

The build-progress slot admits snapshots from concurrent producers under one owner epoch. A producer can take its last_progress_micros sample before another producer but acquire the publication lock afterward. Previously, the later publication overwrote the slot's last-observed timestamp with an earlier time even though the slot's progress_epoch advanced. This can make the progress freshness indicator regress.

Change

  • Preserve the maximum observed last_progress_micros across publications belonging to the same generation owner; do not mutate the committed counters, current phase, blocked reason, or ownership checks.
  • Leave replace_generation responsible for clearing the slot. Even an A→B→A remount starts a new timestamp sequence under its new owner epoch.
  • Add a focused regression covering out-of-order timestamps, advancing committed pages and epochs, a later fresh timestamp, and explicit owner replacement.

Validation and remaining work

The master blobs, isolated two-file diff, source-shape anchors, final newlines, and trailing whitespace were checked. Rust compilation, Bazel tests, and host CI have not run in this environment. CI must compile and execute the new regression on this PR's isolated branch; source review is not a test pass. No runtime throughput or latency improvement is claimed.

This is deliberately not a full fix for #4508. Capture/parse progress, actual graph-publication work counters, and a live large-project end-to-end acceptance run still remain. Keep #4508 open. The separate PR-repair automation owns hosted CI repair and any authorized merge.

@changeset-bot

changeset-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2ddac65

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Consolidated into #4742 (integrate/open-pull-requests) at the captured head shown in its description, as requested. Continue review and further fixes on #4742. This closure does not assert CI readiness; the replacement remains draft. Source branch retained.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant