Skip to content

refactor(code-index): type the freshness observation ladder - #1517

Closed
ScriptedAlchemy wants to merge 4 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/foundational-freshness-ladder-d0e7
Closed

ScriptedAlchemy wants to merge 4 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/foundational-freshness-ladder-d0e7

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Foundational-thinking review of feat: TraceDecay V2 delivery (PR8–PR13) + daemon performance, memory, and reliability overhaul #707: the freshness ladder was two copied string ladders, and terminal publication authority was a worker-local bool beside the shared park slot.
  • One projector in tracedecay-contracts now owns staleness, coverage, and rebuild_in_flight. A park with retries_on_wake = false cannot look like a racing rebuild.
  • The worker reads that shared park slot, so a park planted by another actor suppresses later wakes.

This lands into codex/tracedecay-total-redesign-plan-reopened (#707). It does not target master.

Motivation

Types and shared state had not converged. Callers matched English tokens ("fresh", "verifying", "complete"), and two serving-read paths could drift. The worker-local publication_authority_terminal flag was a second latch that admission did not share.

Changes

  • CodeIndexStalenessStateV1 and CodeIndexFreshnessCoverageV1 are the wire vocabulary (same snake_case tokens).
  • Both serving reads call CodeIndexFreshnessLadderV1::project.
  • Worker suppression uses publication_authority_is_terminal on the shared slot.
  • Absorbed feat: TraceDecay V2 delivery (PR8–PR13) + daemon performance, memory, and reliability overhaul #707 tip 3e6167b265: dropped the removed changes.reused list, kept the single NotApplicable admission arm, kept tip clippy clone_into on park remediation.
  • Regenerated dashboard and SDK schemas so the ladder is not a free string.

Test plan

  • cargo check -p tracedecay-contracts -p tracedecay-code-index-runtime -p tracedecay-mcp -p tracedecay-dashboard-api -p tracedecay-cli -p tracedecay --tests
  • cargo clippy on those packages --all-targets -- -D warnings
  • cargo test -p tracedecay-contracts --lib code_index_freshness::tests (12 passed)
  • cargo test -p tracedecay-code-index-runtime --lib planted_terminal_publication_park_suppresses_later_wakes (1 passed)
  • MCP status parked projection and dashboard freshness route tests
  • npm run contracts:check and SDK codegen diff limited to the staleness enum
  • Dashboard IndexFreshness / CompareView / observatory unit tests (41 passed)
  • Full cargo nextest run --workspace not run here

Checklist

  • CHANGELOG.md updated (wire tokens unchanged; new closed variants only)
  • No secrets, credentials, or .env files included
  • Breaking changes documented: JSON tokens are unchanged; unknown staleness/coverage strings now fail deserialize
Open in Web Open in Cursor 

cursoragent and others added 4 commits September 17, 2026 01:48
One projector owns staleness, coverage, and rebuild-in-flight so the two
serving reads cannot diverge, and a terminal publication park is the shared
slot rather than a worker-local bool.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 102d163

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

Integrated or superseded directly on the #707 branch at ff36c4f; follow-up compile/typecheck regressions were fixed on that branch.

@ScriptedAlchemy
ScriptedAlchemy deleted the cursor/foundational-freshness-ladder-d0e7 branch October 11, 2026 00:00
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.

2 participants