Skip to content

test: land docs drift and test determinism fixes - #10568

Merged
N0zoM1z0 merged 9 commits into
mainfrom
fix/docs-drift-test-determinism
Nov 14, 2026
Merged

N0zoM1z0 merged 9 commits into
mainfrom
fix/docs-drift-test-determinism

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Docs drift and test-determinism fixes, each from a contributor PR with authorship kept, plus two sibling follow-ups. Merge with rebase to keep per-commit authorship.

Fixes #7650
Fixes #8685
Fixes #9996
Fixes #10366
Fixes #7655

Issue Change From
#7650 Client-configuration docs cover the Cursor, Windsurf and Command Code targets, rebased onto the moved docs. Review follow-up: the Command Code paragraph now matches how doctor reads transport/type (remote entries are unknown, not invalid) #7750, ayobamiseun
#8685 The iNES mutation test makes same-size prefix changes visible on filesystems with coarse timestamps #8689, Hafeez Shaikh
#9996 The inspector cancellation fixture stays out of underscored temp roots. Follow-up: the sibling Node discovery fixtures do the same #10118, MuhammadFaizan-prog
#10366 The desktop SIGTERM-release test waits for the synthetic application's children to be ready. Follow-up: the synthetic app fails visibly when its children never get ready, instead of the readiness loop giving up silently, and (after review) the test's session requests throw on that failure so it surfaces at once #10455, LexLuthorPrimero
#7655 The 16 translated READMEs keep the "verified on Linux" caveat on the packet-capture row, applied to the moved pcap guide links. While rebasing, an extra empty table cell in 9 locales was removed #7972, wunianze666-netizen

#10456's system-tmpdir variant for #9996 is not taken.

Contribution scope: documentation and test-only changes; maintainer scope decision not applicable.

  • Read existing files or captured data.

Evidence and regression coverage

Test-only and docs changes; no product behaviour changes. DesktopApplicationCapture.test.ts: 32 passed after the review fixes. The README tables were checked with oxfmt: each pcap row now has the same three cells as main.

Validation performed

  • npm run test:focused -- on the changed test files when the batch was prepared: passed. The branch was rebased onto current main without conflicts.
  • npm run check:fast (pre-push): passed. oxfmt --check on the changed files: clean.

Compatibility, safety, and release

  • Breaking changes: none.

Author readiness

Human owner: N0zoM1z0 (PR author, exempt from the declaration per CONTRIBUTING.md).

Supersedes #7750, #8689, #10118, #10455 and #7972. After merge, also close #10456 and #10026 (alternative fixes for #9996).

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T15:16:04.453556Z
We couldn’t complete this review. Comment @codex review to try again.
029c589 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@N0zoM1z0 N0zoM1z0 changed the title fix: land docs drift and test determinism fixes test: land docs drift and test determinism fixes Nov 14, 2026
@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5 Tier: plus

[Low impact] The PR's effects stay within setup documentation and test runs.

The PR appears safe to merge, with non-blocking fixes recommended for the Command Code docs and readiness failure reporting.

Findings

  1. P2 Command Code guidance is inaccurate ▶
  2. P2 Readiness failures leave tests waiting ▶
Fix with agent prompt
### Issue 1
docs/getting-started/client-configuration.md:536-537
Doctor does not enforce the rules described here. `admitClientStdioConnection` accepts an omitted `transport`, falls back to `type`, and reports remote connections as `unknown`, not `invalid`. Update this paragraph to match those rules so users do not change working registrations or expect the wrong diagnostic.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 2
src/application/desktop/DesktopApplicationCapture.test.ts:148
The new `exit 97` stops `fakeapp`, but does not promptly fail the waiting test. If a child never reports ready, `state.ini` stays unchanged and the fake window stays open. `nextRequest` keeps returning `undefined`, so capture waits for its 60-second limit or the test timeout instead of surfacing the readiness error. Pass this failure back to the test while letting capture release its children.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR updates client setup docs and translated packet-capture caveats, then adjusts fixtures to reduce flaky tests.

  • The setup guide explains where Cursor, Windsurf, and Command Code keep their settings.
  • The desktop process test waits until both child processes are ready before stopping them.
  • Inspector fixtures use temporary paths that Node can report without changing them.
  • The iNES mutation test ages its fixture so quick rewrites are visible on coarse-clock filesystems.
  • Translated README tables say packet-capture support was checked on Linux.

Reviews (1) · Last reviewed commit: "docs(readme): retain packet-summary veri..." · Reviewed by Greptile

Comment on lines +536 to +537
`env`. Doctor accepts only `transport: "stdio"` for that entry; a registration
that omits `transport` or names another transport is reported as invalid.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Command Code guidance is inaccurate

Doctor does not enforce the rules described here. admitClientStdioConnection accepts an omitted transport, falls back to type, and reports remote connections as unknown, not invalid. Update this paragraph to match those rules so users do not change working registrations or expect the wrong diagnostic.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/getting-started/client-configuration.md
Line: 536-537

Comment:
**Command Code guidance is inaccurate**

Doctor does not enforce the rules described here. `admitClientStdioConnection` accepts an omitted `transport`, falls back to `type`, and reports remote connections as `unknown`, not `invalid`. Update this paragraph to match those rules so users do not change working registrations or expect the wrong diagnostic.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid. Rewritten in the latest push to match admitClientStdioConnection: the transport is read from transport, falling back to type, case-insensitively. http/sse or a url-only entry selects a remote connection and is reported as unknown, and only a non-text tag is invalid.

`setsid sh -c 'trap "touch ${join(root, "setsid-term")}; exit 0" TERM; touch "${join(root, "setsid-ready")}"; ${loop}' &`,
// Wait for both children to install their traps before writing state.ini.
// Fail loudly rather than continue when a child never reports ready.
`ready=; for i in $(seq 1 500); do if [ -f "${join(root, "group-ready")}" ] && [ -f "${join(root, "setsid-ready")}" ]; then ready=1; break; fi; sleep 0.01; done; [ -n "$ready" ] || { echo "synthetic children did not report ready" >&2; exit 97; }`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Readiness failures leave tests waiting

The new exit 97 stops fakeapp, but does not promptly fail the waiting test. If a child never reports ready, state.ini stays unchanged and the fake window stays open. nextRequest keeps returning undefined, so capture waits for its 60-second limit or the test timeout instead of surfacing the readiness error. Pass this failure back to the test while letting capture release its children.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/application/desktop/DesktopApplicationCapture.test.ts
Line: 148

Comment:
**Readiness failures leave tests waiting**

The new `exit 97` stops `fakeapp`, but does not promptly fail the waiting test. If a child never reports ready, `state.ini` stays unchanged and the fake window stays open. `nextRequest` keeps returning `undefined`, so capture waits for its 60-second limit or the test timeout instead of surfacing the readiness error. Pass this failure back to the test while letting capture release its children.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid. The fake application now touches a children-not-ready marker before exit 97, and both tests' nextRequest throw when it exists. Capture still releases its children, and the test fails at once with that reason instead of waiting for the capture limit.

ayobamiseun and others added 9 commits November 14, 2026 15:54
…de targets

The client configuration reference had no entries for three clients that
the installation guide lists as supported and sends readers here for.
Add a section for each naming the configuration file setup writes, the
mcpServers.rea entry key, the entry fields, and the shared skill root, as
defined in src/application/SupportedClients.ts and
src/application/ClientConfigurationDocument.ts.

Fixes #7650
Supersedes #7750

Co-Authored-By: gensokyo-dev <[email protected]>
The changed-prefix regression rewrote its fixture at the same size within
milliseconds of creating it. Linux stamps mtime/ctime from a coarse clock,
so both writes can share every stat field the target guard compares, and the
classifier parsed the rewritten header without seeing a change. Age the
fixture's timestamps before the mutation so the rewrite is observable on any
filesystem while the test still requires a changed-input refusal.

Fixes #8685

Supersedes #8689

Co-Authored-By: gensokyo-dev <[email protected]>
…re exercising sigterm release

Fixes #10366
Supersedes #10455

Co-Authored-By: gensokyo-dev <[email protected]>
The readiness wait from the previous commit continued after its bound
even when a child had not installed its TERM trap, so a slow runner
would reintroduce the race silently. It now exits with an error after
five seconds, and the state line keeps its original escaping.

Refs #10366

Co-Authored-By: gensokyo-dev <[email protected]>
…rscored roots

Use createNodeDiscoveryTempDirectory for the target-location and
runtime-observation fixtures too, so a TMPDIR containing `_` cannot make
them fail for the same reason as the cancellation test.

Refs #9996

The sibling sites are the ones #4484 switched.

Co-Authored-By: gensokyo-dev <[email protected]>
README.md's packet-summary row says tshark/capinfos support is
Linux-verified, but sixteen translations omitted that caveat.

Fixes #7655
Supersedes #7972

The translated phrases are from #7972, reapplied to the moved pcap
guide links; simplified Chinese, which #7972 did not cover, follows the
traditional Chinese wording.

Co-Authored-By: gensokyo-dev <[email protected]>
…nsport

Doctor reads transport, falling back to type, and reports a remote http/sse or
url-only entry as unknown rather than invalid; only a non-text tag is
invalid.

Refs #7650

Co-Authored-By: gensokyo-dev <[email protected]>
The fake application now leaves a marker when its children never report
ready, and the tests' session requests throw on it, so capture releases the
children and the test fails at once instead of waiting for its deadline.

Refs #10366

Co-Authored-By: gensokyo-dev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification

Projects

None yet

7 participants