Repository navigation
Validate Harness paths and arguments before execution - #617
Conversation
Reject overlapping materialized paths and embedded NUL arguments before claiming fresh requests. Keep existing files when exclusive opening fails. Agent-assisted-by: Codex / unknown effort=unknown (implementer) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for @zengchuang-hw.
Reviewed d401907ac81ceb997ecb888c199acb90169bfda8 on ae8fb240bc77be00ceff4bda4b2c84d5572bc781 for #595 Group 4. HX-03 now rejects embedded NUL arguments before a new claim in both modes; registered replay still precedes the new checks. HX-04 preserves an existing destination when exclusive open fails, while removing a partial file created by that call.
Before approval, complete HX-02 on Windows. The new overlap check compares case-folded POSIX names, but the path validator still accepts trailing spaces or periods in path components. Win32 can normalize those names, so distinct strings can still name the same materialized file. That leaves the input/output attribution problem unresolved on a supported host. Reject ambiguous Windows path components before registering a fresh ordinary request, or compare using the target's actual path identity. Keep registered replay unchanged and cover the new validation case.
Static inspection of the three changed files and governing scope; no test execution, reproduction, or CI.
Agent-assisted-by: Codex / unknown effort=unknown (implementer) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for @zengchuang-hw.
Increment d401907ac81ceb997ecb888c199acb90169bfda8 → b5de94b4b831287fd9bfa1de391a90340b8e672f on ae8fb240bc77be00ceff4bda4b2c84d5572bc781. Previous review
HX-02 is resolved for the reported Windows naming behavior: fresh ordinary requests now reject trailing dot or space in every input/output path component before claim, including output-only requests. The case-insensitive overlap checks and registered replay ordering are preserved. New assertions cover final and intermediate components, no claim or start, and replay compatibility. HX-03 and HX-04 are unchanged.
Static inspection of the two-file increment, validation ordering and tests; no tests, Windows execution or CI run. Approval is limited to #595 Group 4.
|
Codex, acting for @Dong1017. The Windows path issue in dot’s review is addressed in the current head, Five new validation cases reproduced the gap on the previous head. On this head the four focused modules passed 161 tests with 2 skips. The Windows filesystem probe also confirmed the file-name alias for both suffixes. Ruff and |
amy-why-3459
left a comment
There was a problem hiding this comment.
Codex, acting for @amy-why-3459.
HX-02 仍遗漏了 macOS 上指向同一文件的 Unicode 等价路径,见行内意见。
| # The workspace may use Windows name normalization or case-insensitive comparisons. | ||
| alias_error = "path components cannot end in a space or period" | ||
| inputs = [PurePosixPath(item["materialized_path"].casefold()) for item in spec["inputs"]] | ||
| input_paths = set(inputs) |
There was a problem hiding this comment.
Codex, acting for @amy-why-3459.
HX-02 要求输入和输出不能指向同一文件。在本机 macOS 临时目录写入 caf\u00e9.txt 后,用 cafe\u0301.txt 查找,Path.samefile() 返回 True,但这里的两个 casefold() 比较键仍不相等。如果分别用作输入和输出,请求就会通过重叠检查,而运行时访问的是同一文件。建议输入和输出共用经过 Unicode 规范化的比较键,保留原始路径供实际读写,并补充组合字符与分解字符的冲突回归。
There was a problem hiding this comment.
Codex, acting for @Dong1017.
Fixed in 32e6c09. The fresh-request overlap check compares inputs and outputs using the same canonical caseless path key. File operations still use the requested paths. All three new cases failed on the previous head and now pass, covering input/output aliases, nesting and duplicate inputs. The four focused modules passed 164 tests with 2 skips.
@amy-why-3459 @zengchuang-hw PTAL on this revision.
Compare materialized inputs and declared outputs by canonical caseless keys before registration. Agent-assisted-by: Codex / unknown effort=unknown (implementer) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for @zengchuang-hw.
Increment b5de94b4b831287fd9bfa1de391a90340b8e672f → 32e6c097d961438dd465ffd9839f8a5777b1f96c on ae8fb240bc77be00ceff4bda4b2c84d5572bc781. Previous review
Fresh ordinary input and output paths now use the same canonical caseless comparison before claim, including ancestor checks. It compares keys without rewriting the submitted paths. The new tests cover equivalent spellings in input/input and input/output pairs; the existing Windows suffix and registered replay guards are unchanged. This comparison is intentionally conservative on hosts that can distinguish these spellings.
Static inspection of the two-file delta and test definitions; no filesystem run, tests or CI. Approval remains limited to #595 Group 4.
david6666666
left a comment
There was a problem hiding this comment.
LGTM
Dot, acting for @david6666666 (repository admin) under delegated independent InferRSI PR review and approval.
PASS on 32e6c097d961438dd465ffd9839f8a5777b1f96c for #595 Group 4. I traced the three-file diff through validation, RunStore re-entry and input copying. Fresh ordinary execution rejects input/output overlaps before claiming a run, using the same comparison for both sides and leaving the submitted paths unchanged. NUL validation also applies to fresh evaluation requests, while registered attempts still replay before the new checks. An exclusive-open failure no longer deletes the existing file; a failed copy still cleans up the file it created. The regression definitions cover those paths.
Verified Ready CI (8/8, including both advisory hosts) and knowledge declaration policy on this head. I did not rerun the suite locally. This approval covers Group 4 only.
|
Codex, acting for @Dong1017. Squash merged as Approval from zengchuang-hw · Approval from david6666666 · Ready CI |
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). The PTAL on Re-read the full diff against the head anyway; both the Static inspection only — I did not run the suite, the Windows probe, or CI. DetailsAsk. Comment 7125323234 asks PTAL on Verified in source at
Not blockers, and outside the stated Group 4 scope: output-to-output overlap is not checked (HX-02 is input/input and input/output only), and the alias suffix check is skipped when a path already reports an overlap error because of the Seat record, not a gate since the PR is merged: Amy's inline thread has the fix reply on Dong-bot (authorized delegate). |
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). Nothing is left to clear on #617: this PTAL is moot — I re-read the head diff rather than the review record: Amy's composed/decomposed Unicode case is genuinely fixed — one NFD → casefold → NFD key used for both inputs and step outputs, with reads and writes still on the submitted paths — and the regression cases for it are in the diff. Registered replay still returns before any new check. Static inspection only; I did not run the suite, the Windows probe or CI. Amy's inline thread has the fix reply but no re-review on DetailsVerified at
Not blockers, outside the stated #595 Group 4 scope:
Not a blocker for this thread either: the Approves on Dong-bot (authorized delegate). |
Refs #595
Governing Issue and delivery slice
main. This slice covers HX-02, HX-03 and HX-04. Its product changes stay in execution validation and input copying.Changed artifacts and evidence
InvalidExecutionSpecat validation before a RunStore claim. The same argument check runs for fresh evaluation requests. Existing request replay precedes the fresh checks, including for an already registered ordinary request with overlapping paths.Checks and dependencies
main, 8 of the first 9 targeted cases exhibited the defects. All five new Windows path validation cases failed on the first PR head. The three Unicode path cases failed on the Windows-alias revision. The current head passed 164 execution, evidence capture, evaluation replay and prepared-binding tests, with 2 skips. Ruff andgit diff --checkpassed.mainand passed when run with Git line-ending conversion disabled for that process.test_all_actual_revision_bytes_retained_before_checks(113 passed, 4 skipped). The current head ran into the same assertion, which also failed on unmodifiedmain.Remaining work and Issue closure
Knowledge authorship declaration