Skip to content

test(mcp): verify recovery before reading retained views - #7029

Merged
gensokyo-dev merged 1 commit into
mainfrom
test/mcp-resource-recovery-20261024
Oct 24, 2026
Merged

gensokyo-dev merged 1 commit into
mainfrom
test/mcp-resource-recovery-20261024

Conversation

@gensokyo-dev

@gensokyo-dev gensokyo-dev commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Problem and outcome

Main push CI intermittently rejects the resource test's recovery request with parent_result_budget_exhausted. Worker recovery was checked after large retained-view queries, conflating worker readiness with the parent heap consumed by those queries. The parent capacity guard is valid and remains unchanged.

Check real recovery immediately after the constrained analysis, then prove its old Evidence remains usable after a different analysis completes. Recovery must still succeed; additionally verify its exact input path and one successfully parsed source. Replace module-page/full-item reads with one existing javascript-facts query requesting identities/provenance only. Keep all 1,500 paths and source hashes, require one shared asset identity, 1,500 unique observation identities, empty unrequested properties and exhausted coverage. Share the duplicated recovery request in one helper. No runtime, heap, timeout, fixture-size, safety-guard or retry changes.

Executed validation

Node 24.22.1 / npm 11.16.0, Linux x64, two CPUs:

  • Final workflow: three fresh-process runs passed at the original 512 MiB parent / 128 MiB worker limits, and three more passed at a diagnostic 480 MiB parent limit. Original ordering at 480 MiB passed twice and reproduced the same capacity failure once; field selection alone also failed once, which is why ordering is part of this fix. All temporary pressure/instrumentation edits were restored.

  • Negative control: malformed recovery source makes the strengthened parsed-file assertions fail, instead of treating any non-error response as recovery. Fixture restored.

  • Rebased on latest 97194c4b: runtime build passed (30.25 s wall / 40.60 s family CPU / 1158.0 MiB sampled family RSS). Five resource/facts MCP tests passed, including actual stdio server/worker processes and retained/portable identity, paging and field selection (58.23 s / 68.99 s CPU / 2115.6 MiB).

  • Final latest-base npm run check and git diff --check passed (23.66 s wall / 44.11 s CPU / 2732.4 MiB).

Latest-main compatibility was additionally checked on local rebased tree 5f2e5fcc over 12f6e097 (including the new shared partial-Evidence delivery). The published 4ce733b6 patch is unchanged (git range-diff reports equality), so its current CI/review remains pinned to that published head. Runtime build and static checks passed (25.99 s / 34.29 s CPU / 1120.3 MiB; 37.74 s / 70.57 s CPU / 2681.4 MiB). The four-file combination had 22 passed and one unchanged facts/schema case hit its 30 s timeout. Testing that complete facts file in isolation then passed both cases (36.10 s / 40.83 s CPU / 2221.0 MiB; slow case 20.19 s). The combined timeout is retained as a failed attempt, not reported green; all recovery/delivery cases passed. No timeout was raised.

Matched timeout tasks, three fresh-process runs each on pinned 422ca5a8, OS caches uncontrolled:

Metric Original Final workflow
tools/call requests 5 4
Re-encoded tools/call result bytes 4,101,046 3,259,279
Median whole-task wall / CPU 14.870 / 18.358 s 15.319 / 19.141 s
Maximum sampled family RSS 889.2 MiB 897.9 MiB

The roughly 20.5% byte reduction counts text and structured results; initialization/catalog/ping bytes and agent tokens were not measured. This is not a latency or peak-memory improvement claim. Each process has a fresh module graph; isolated warm-process costs were not measured. RSS sampling sums descendants around every 100 ms and can double-count shared pages or miss brief/reparented children; it is not a hard aggregate cap. Tests/build had a 3 GiB sampled stop; static checks an 8 GiB stop. No host OOM occurred. These are authored inert fixtures using real CLI/MCP analysis, not new real-provider claims.

Published head 4ce733b6 passed complete selected CI: 32,665 tests passed, zero failed, 233 skipped, all eight built shards and source/static/build/final gates passed. Codex and Greptile reviewed that exact head without actionable findings.

Author readiness

Human owner: @gensokyo-dev

The owner explicitly delegated readiness declarations and agent-managed review. Inspection and execution were performed by Codex; no separate human inspection is claimed.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T17:37:26.207978Z 4ce733b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The changes appear safe to merge.

Summary

Updates the resource tests to check worker recovery before reading large retained views.

  • The resource tests check recovery before reading retained views.
  • The timeout test checks every repeated source with a focused facts query.

Reviews (1) · Last reviewed commit: "test(mcp): verify recovery before readin..." · Reviewed by Greptile

@gensokyo-dev
gensokyo-dev merged commit bc9efc9 into main Oct 24, 2026
43 checks passed
@gensokyo-dev
gensokyo-dev deleted the test/mcp-resource-recovery-20261024 branch October 24, 2026 17:54
shoyann added a commit to shoyann/rea that referenced this pull request Oct 26, 2026
Keep the tested tree unchanged. The first synchronized CI run encountered
the same intermittent parent-result budget failure documented upstream
in morluto#7029 and morluto#5672; main 1173c0a passes its selected CI.

Repeat the existing checks once without changing runtime limits, fixture
size, deadlines, or assertions.
@morluto morluto added the area: mcp MCP server, transport, and tool registration label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants