Skip to content

fix(mcp): rebind fresh callers after checked retirement - #1480

Open
zzet wants to merge 2 commits into
mainfrom
fix/fresh-relations-retirement-rebind
Open

zzet wants to merge 2 commits into
mainfrom
fix/fresh-relations-retirement-rebind

Conversation

@zzet

@zzet zzet commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Retain the bounded checked-retirement correction for fresh get_callers, and capture unresolved first-attempt failures in the existing shared-file 4 Hz and ordinary canonical-retirement fixtures. This PR is not ready to merge while that correctness failure remains unresolved.

The original stable-edit regression could wait for an acknowledged edit, compute correct caller edges, then refuse when the same projection was normally retired into the canonical graph during response decoration. Its correction permits one complete rebound after verified canonical retirement under the original caller deadline and the same 150 ms projection window, started after the initial wait. Physical replacements, source events, unknown owners and exhausted deadlines still refuse.

Refs #1016; this does not close its remaining release acceptance criteria.

Unresolved hosted evidence

The required Ubuntu MCP job ultimately reports success, but its first mcp-25 batch failed the unchanged functional test TestSharedFileOwnReceiptsReachExactRelationsAtFourEditsPerSecond: loaded stream0/edit2 and stream1/edit2 both received get_callers errors, projection not published: superseded. The batch subsequently passed when rerun alone. That later success does not replace either failed first response. Related earlier PR logs also retained this semantic failure before rerun-green results.

The original envelopes do not identify the refusing predicate or prove whether it was checked canonical retirement, a newer physical owner, a source event, or an exhausted request allowance. Later non-atomic snapshots and a fresh=true barrier rider do not establish final projection acceptance. Local diagnostic passes did not reproduce the refusal and do not explain or exonerate it. This is a functional first-response failure, independent of the separate numerical 3x criterion.

Prospective observation result

The instrumented Ubuntu MCP job preserves the original four-worker, prescribed-race, atomic-coverage context and the 4,782-name / 32-batch census. Its final rollup is green, but two first-attempt batches failed and later passed on automatic batch rerun:

  • In mcp-25, all 32 get_callers first replies were non-error and contained the exact own edge. The unchanged own-impact oracle failed for loaded stream0/edit4: the impact response was a non-error, truthfully labelled pending partial after a 248 ms barrier wait, with zero own depth-1 matches. The oracle already permits complete:false when pending and the own match remains present; the missing match is the failing condition. The unflagged impact API permits partial coverage after its default 250 ms wait. This is an explicit request-contract/method question, not evidence of a false-fresh reply or proven producer data loss.
  • In mcp-19, TestRegisteredCallersProjectionTransitionBoundary/raw/canonical_retirement returned superseded after one leaf call and failed its required positive assertion. Its earlier callback deadline check passed, but no actual recovery-time guard/budget record was enabled there. Two budget-expiry records in other successful caller replies do not explain this failure.

Neither rerun-green result clears the first failure. The previous caller-refusal event was not reproduced by this observation and is not retroactively explained. A separate private ordinary-boundary capture candidate has passed its controls and original fixture in both modes; it has not been pushed in this head. No further CI retry, impact-argument change, merge, or RC action follows automatically.

Observation changes

  • Retain bounded, opt-in scalar evidence at the actual existing refusing predicates and separate later recovery checks: stage/guard, hashed owner identities and immutable sequences, evaluated retirement/suspect/event state, actual attempt number, and existing clock comparisons. Unevaluated fields remain UNOBSERVED; no extra owner lookup, source read, stat, registry lock, retry permission or deadline is introduced.
  • Preserve the first refusal and at most three later recovery samples within a strict 2,048-byte metadata envelope. No path, source contents or raw pointer is added to that envelope; rendering cannot replace the original result/error.
  • Enable the existing evidence and post-join raw-first-reply export only inside the already-sequential 4 Hz functional test. Requests, cadence, joins, five-second caller bound, shared 150 ms projection ceiling, and all original assertions remain unchanged.
  • Keep the three new diagnostic control roots and additional registered-capture assertions private to local validation. They are not included in the commit, preserving the existing hosted test census and batch composition. No workflow, worker, coverage, package-selection or automatic batch-rerun policy changes.
  • Use the existing normal PR synchronization workflow for one prospective observation. The instrumented first failure is the sought evidence; neither rerun-green nor a clean observation retroactively identifies the earlier event or authorizes merging/releasing.

Validation of this update

  • Pinned Go1.27.3, safe CGO flags, and prescribed SQLite/libc race exclusions.
  • Fourteen focused roots / 46 named checks passed in each default and acceptance mode, with no skips. These include private short-circuit/publish-subject/cap/budget controls, real registered physical/source-event refusal capture assertions, and the original stable fresh-response contract.
  • Compiled the exact shipping candidate without private controls: all 4,782 native MCP census names match the retained baseline; no new hosted test root is included. The actual Linux hosted census and worker context will be checked in the prospective job.
  • Full-repository go vet passed in default and acceptance modes; pinned golangci-lint2.14.0 reported zero issues in both modes.
  • All seven files in this update pass pinned gofmt -s; whitespace, unchanged-module identity and module verification passed.
  • All owned test/compiler/linter processes, groups, pipes and temporary fixtures were closed before publication.
  • The one prospective hosted run was audited beyond its green rollup: first-attempt own-impact and ordinary canonical-retirement failures remain preserved as described above.
  • Correctness disposition and any separately selected followup remain pending; product merge and RC are blocked.

The focused validation checks diagnostic behavior and preserves the original fresh/physical-refusal contracts; it is not another local 4 Hz replay or full-suite qualification. The earlier R20 default diagnostic compiled and passed its three controls plus all 32 first responses without a refusal, which remains inconclusive for the hosted failure.

Retained correctness validation and limits

The original correction retained actual watcher-wait time across attempts, covered registered raw/facade late retirement with real SQLite publication, and preserved physical-change, source-event, cancellation and deadline refusals. Fixture-owned indexers are closed, and early source-read replies are retained without changing extractor-entry, acknowledged-byte, first-response or deadline assertions.

Earlier default MCP coverage accounts for all 4,782 roots: 4,779 root passes, three explicit root skips, and 9,688 named passes including subtests. It combines retained completed roots with a failed/unrun-only continuation after an operator's temporary path exceeded Darwin's Unix-socket limit; that setup failure remains retained. Acceptance had 50 named passes/no skips; the real watcher first reply was fresh with its own edge and positive actual wait in both modes. A mechanical lint-only switch had 11 affected named passes per mode with an exact inverse to previously validated assertion bytes. These are source-qualified historical checks, not a claim that the new hosted observation or all first CI attempts are clean.

An earlier two-second extractor-entry timeout remains unattributed. Isolated and faithful-prefix comparisons passed on both fixed and parent sources without replacing that failure with a retry-green claim. A separate retained-admission control proves a resource precondition, not the timeout's cause. Existing skips cover a no-longer-tight localization fixture, a Windows-only path distinction, unavailable case-distinct directories, and five unsupported analyzer-kind subcases. An overbroad whole-tree formatting read reported 101 unchanged base files; no unrelated formatting cleanup is included.

No benchmark/performance acceptance, product merge, RC tag, or release action is claimed. Product merge and RC remain blocked pending correctness disposition.

Retry require_fresh caller reads only after verified canonical retirement under the original shared bounds. Preserve actual watcher wait across attempts and cover registered raw/facade retirement and refusal controls. Close owned fixture indexers and retain early source-read evidence. Refs #1016.
@zzet zzet added this to the v0.64.12 milestone Nov 16, 2026
@zzet zzet added this to Gortex Nov 16, 2026
@zzet zzet moved this to In Progress in Gortex Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant