Skip to content

fix(code-index): reserve callable rewarm dispatch time - #4747

Closed
ScriptedAlchemy wants to merge 1 commit into
masterfrom
fix/4558-callable-rewarm-budget-20261104
Closed

ScriptedAlchemy wants to merge 1 commit into
masterfrom
fix/4558-callable-rewarm-budget-20261104

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Superseded by #4742. Commit e28de398 includes this PR's complete head b484bc84 as its second parent and retains both source files byte-exact. The source branch remains intact. This closes duplicate review scope only; the imported draft source is not claimed validated, fixed for #4558, or merged into master. #4558 remains open.

Root cause

Refs #4558. The earlier merged #4709 reserves response-settlement time for project graph reads, but a separate callable graph path still spends almost all of its remaining request budget waiting for a released engine during seed classification and then again for the catalog. The first tracedecay_callers/graph navigation after a release can consequently reach the enclosing MCP dispatch timeout before returning an unavailable/retryable state.

Change

  • Reuse the existing measured rewarm_wait_budget policy from project graph reads; expose it only within the crate.
  • Probe readiness with a zero-budget check, which starts background re-warming if needed. If measured remaining warm time does not fit with the reserved half-budget, return the callable's existing typed Unavailable result promptly instead of blocking through the dispatch deadline.
  • Apply the bounded path to both seed point classification (engine) and catalog readiness; retain the engine lease during the actual point lookup.
  • Reject a request that no longer has an admitted generation-resolution budget rather than attempting an unretained reader open.

Regression coverage

Adds slow_callable_rewarm_reserves_time_for_seed_and_catalog_reads to exercise the shared budget with a 10-second outer deadline, a measured 17-second cold warm, and a short 2-second warm. The existing a_callers_request_after_park_waits_for_the_graph_to_rewarm integration journey covers the short/ready case, but was not run on this branch.

Validation and limitations

The exact two-file commit diff was independently read against master 02e6467. Rust/Bazel build, formatting and tests could not be executed in this tool environment; there is no claimed test pass or verified 6,219-file timing improvement. Hosted current-head CI, compile and actual release-to-first-call integration are required. No authorization, deadline, integrity, or admission limits are increased.

This is partial progress on #4558. The callable API currently maps the rejected wait to typed Unavailable, not a dedicated Rewarming { retry_after_millis } response. The original 6,219-file release/10-second MCP reproduction and, if needed, precise retry-after propagation remain outstanding. Keep #4558 open.

The larger unrelated integration PR #4742 and release PR #4744 are untouched; the separate PR-repair automation owns CI, repairs, and merge.

@changeset-bot

changeset-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b484bc8

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 added a commit that referenced this pull request Nov 4, 2026
Retain the original strict read-amplification and equal-work assertions.
Publish actual summary lineage for each 64-row batch through the guarded
production authority before measurement; raw messages without that lineage
must not be dropped. Apply exact Bazel rustfmt output for the recent fixes.

Consolidate #4747's complete callable rewarm source as a second parent,
without modifying its two files. The draft source remains unverified.
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