Repository navigation
test: assert absolute-path facts without frozen sentences - #9231
Merged
Merged
Conversation
Sibling path tests now require the field path, invalid_format, and regex expectation, and they record that each negative case ran. NUL rejection follows the argument that contains the byte instead of searching for the word NUL.
Codex Review Summary: ✅ CompletedThis 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. |
Contributor
[Low impact] The PR appears safe to merge; no actionable defects were found in the reviewed changes. SummaryThis test-only PR replaces fixed absolute-path sentences with checks for the affected field, error reason, and expected format.
Reviews (2) · Last reviewed commit: "test: retain actionable NUL path diagnos..." · Reviewed by Greptile |
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sibling tests for host-absolute paths were still green if the explanatory sentence changed, or if a negative loop stopped running. They now require the field path,
invalid_format, andexpected: "regex", and they record that each negative case ran. NUL rejection follows the argument that contains the byte and still names the NUL-specific reason.This stays off #9178, #9179, and #9181 so those admission fixes remain focused.
Problem and expected behavior
Smallest trigger:
tests/boundary/mcp/wasmArtifactMcp.test.tsrequired the sentencemust be an absolute local filesystem patheven though the issue already carriedpath,reason, andexpected.tests/boundary/mcp/absoluteLocalPathSchema.test.tssearched the whole JSON forabsolute, and its handler loop skipped the structured path check wheneverissuePathwas unset.tests/acceptance/tools/localToolContracts.test.tssearched responses for the wordNUL.Expected: a wording change in the absolute-path message still passes, while NUL rejection still explains the invalid byte. Dropping the absolute constraint, reporting the wrong field, or emptying the case list fails. Providers are still not called for the rejected inputs.
Change and scope
The assertions cover the WASM artifact tool, the shared absolute-path MCP catalog, session export and snapshot paths, firmware output directories, Electron file URLs, CLI JSON path normalization, and the local-path unit matrix. Each relative-path case names its field. The NUL catalog derives the issue path from the value that contains
\0and requiresinvalid_format/regexand a NUL-specific reason. Catalog loops assert a known set of cases, so an empty list cannot pass.Contribution scope: ordinary test fix. Maintainer scope decision for new providers or target execution: not applicable.
Not included: packet-capture, Hermes, EVM, and cache-directory tests that use the word absolute for a different constraint. No production schema or handler change. No desktop, debugger, host-effect, or god-file work.
Contract and boundary impact
absoluteLocalPathStringSchemaremains the owner. These tests now read its structured issue instead of a copied sentence.docs/public/product-catalog.json), package, or installation impact: none.No new target interaction. The tests keep their existing in-memory MCP and fixture calls.
Evidence and regression coverage
tests/boundary/mcp/wasmArtifactMcp.test.ts,tests/boundary/mcp/absoluteLocalPathSchema.test.ts,tests/boundary/mcp/sessionMcp.test.ts,tests/acceptance/tools/localToolContracts.test.ts,tests/acceptance/applications/electronInvalidPaths.test.ts,src/cliJsonPaths.test.ts,src/domain/localPath.test.ts.JSON.stringify(result).includes("absolute"). The handler loop's structured check was behindif (issuePath !== undefined), andpathCasenever setissuePath.invalid_requestwithinvalid_formatandexpected: "regex"on the named field.process.platforminside the existing schema. Packet-capture, Hermes, EVM executable, and cache-path prose checks were left in place because they are different constraints.Boundary regression: malformed path admission before provider work. Lifecycle regressions are not applicable.
Validation performed
Follow-up on Node 24: focused local-path and MCP suites passed 23 tests;
check:fast, targeted formatting andgit diff --checkpassed. Tautological loop self-comparisons were removed while the fixed-case controls remain.npm run test:focused -- src/domain/localPath.test.ts src/cliJsonPaths.test.ts tests/boundary/mcp/wasmArtifactMcp.test.ts tests/boundary/mcp/absoluteLocalPathSchema.test.ts tests/boundary/mcp/sessionMcp.test.ts— 43 passed.npm run test:focused -- tests/acceptance/tools/localToolContracts.test.ts tests/acceptance/applications/electronInvalidPaths.test.ts— 11 passed.npm run check:fast— typecheck and lint passed. Pre-pushcheck:fastpassed.npx oxfmton the touched files — formatted.Compatibility, safety, and release
Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.