Repository navigation
test: land docs drift and test determinism fixes - #10568
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[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. FindingsFix 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.SummaryThis PR updates client setup docs and translated packet-capture caveats, then adjusts fixtures to reduce flaky tests.
Reviews (1) · Last reviewed commit: "docs(readme): retain packet-summary veri..." · Reviewed by Greptile |
| `env`. Doctor accepts only `transport: "stdio"` for that entry; a registration | ||
| that omits `transport` or names another transport is reported as invalid. |
There was a problem hiding this 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.
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!
There was a problem hiding this comment.
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; }`, |
There was a problem hiding this 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.
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.There was a problem hiding this comment.
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.
…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]>
…p roots Fixes #9996 Supersedes #10118 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]>
029c589 to
6e1387a
Compare
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
transport/type(remote entries are unknown, not invalid)#10456's system-tmpdir variant for #9996 is not taken.
Contribution scope: documentation and test-only changes; maintainer scope decision not applicable.
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 withoxfmt: 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 --checkon the changed files: clean.Compatibility, safety, and release
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).