Repository navigation
fix(apps): close six review defects in host, compare, delivery and views - #605
Conversation
CUDA inspection matched the requested model as a substring, so L4 accepted an L40S. Inspection and qualification now share one whole-token match. compare --action status read every trial's job without error handling, so one damaged or locked job failed the command. An unreadable job now blocks only its trial, the same reading report already applies. after_final passed the unresolved session path to the exporter, which refuses symlinked ancestors; a session reached through a symlink committed its final but never published delivery. The path is resolved first. The service-reuse dashboard page lacked the generator tag the writer checks before replacing a page, so a second write was refused. The Codex search import unwrapped only [shell, -c, script]. Shell options before -c and a leading env are now unwrapped; other shells and script files count as incomplete coverage instead of no retrieval. The read agent listed the workspace before its failure handler, so a missing task or a symlinked workspace emitted no agent.failed event. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for @zengchuang-hw
Independent first review: 214fb400b678db7f03f2d865e3b80c1fbf97d6bd..5d6c96231c05af38e9952b92680781df463cd42f, #595 Group 2 only.
Before approval (AE-04): after_final now resolves the session path before its presentation error handler. Harness has already committed the execution result by then. If the workspace is temporarily unavailable and resolution raises, the CLI can report failure instead of returning the committed result with delivery.status=error and execution_preserved=true. Prefer passing through the same canonical session root used by execution; at minimum keep normalization inside the guarded presentation path. Add a regression that simulates a resolution error after commit and asserts the execution result remains intact.
The other five changes match their scoped fixes by static inspection: exact CUDA SKU detection, per-trial comparison status, the service dashboard marker, incomplete coverage for unreadable shell forms, and retained pre-transport failure events. Non-blocking: document that old unmarked service dashboards need a fresh output location; keep the overwrite guard for unrelated HTML.
I checked the actual diff, affected callers and regression definitions. I did not run tests, a service, or CI. This is not #595 acceptance.
david6666666
left a comment
There was a problem hiding this comment.
One cross-host completeness issue on the current head.
| multiline = False | ||
| if (Path(argv[0]).name in _SHELLS and len(argv) == 3 | ||
| and argv[1] in ("-c", "-lc", "-ic", "-ilc")): | ||
| shell = Path(argv[0]).name.lower().removesuffix(".exe") |
There was a problem hiding this comment.
Could we parse the executable basename using the recorded path's separators, not the reader's OS? On POSIX, Path(...).name leaves a full Windows C:\...\pwsh.exe unchanged, so this branch misses the shell and can report complete provenance with no retrieval even when the opaque command contains rg. Please normalize both slash styles, including any env wrapper, and add a Windows-recorded / POSIX-read fixture.
There was a problem hiding this comment.
Fixed in ef8cda3. Program names are now read by _program(), which splits on both / and \ and drops a trailing .exe, for both the env check and the shell check.
test_codex_search_shell_forms.py covers the Windows-recorded forms:
- Decode like the plain form:
C:\Program Files\Git\bin\bash.exe -lc,C:\...\env.exe bash -lc. - Stay incomplete:
C:\...\pwsh.exe -Command,C:\Tools\env.exe C:\...\pwsh.exe -Command.
On H200 (Linux), all four fail against the previous source and pass with the fix.
david6666666
left a comment
There was a problem hiding this comment.
One additional finding on the current head.
| for word in words: | ||
| if word in ("-o", "+o"): | ||
| next(words, None) | ||
| elif word.startswith("-") and not word.startswith("--") and "c" in word[1:]: |
There was a problem hiding this comment.
Please stop scanning shell options at --. A later -c can be a script filename rather than an inline-code flag. The current loop can read the following argument as inline code and report complete provenance even though it never saw the script. Please retain the incomplete status for this form and add a regression.
There was a problem hiding this comment.
Fixed in ef8cda3. _shell_script() now stops at -- and returns no inline script, so bash -- -c ... is recorded as incomplete.
Two regressions cover it:
test_dash_c_after_double_dash_names_a_script_filechecks_recorded_argvdirectly. It failed against the previous source on H200: that source decodedrg -n needle docsas inline code.- The end-to-end case in
test_unreadable_shell_forms_stay_incompletealso covers this form.
… forms after_final resolved the caller's session path again before its guarded export; if that path became unavailable after Harness committed final, the command failed instead of returning the committed result. Delivery now exports from the resolved session root that the committed result already carries, so nothing outside the export can fail. The Codex search import read the program name with the reader's path rules, so a Windows path recorded for env, bash or pwsh and read on POSIX was not recognized. Program names are now split on both separators. A -c after -- is a script file name, not inline code, so that form is recorded as incomplete. The changelog records the six fixes and that a service-reuse dashboard written before the marker existed needs a new output path or removal. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for @zengchuang-hw
增量:5d6c96231c05af38e9952b92680781df463cd42f → ef8cda3be8f570c4ad257c26de16030c6f8d1ada,base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd。上轮。
AE-04 已修复。 交付从 Harness 返回的 canonical session 根目录导出,避免 final 已提交后再次解析调用方路径;导出失败仍保留执行结果。新增回归覆盖提交后路径解析失败。
AVI-02 仍有检索覆盖误报。 当前已能解开 Windows bash/env 包装,-- 后的脚本也会标为不可读。但 _command 对内层工具仍用宿主的 Path(...).name,没有去掉 .exe。这样记录中的 C:/tools/rg.exe 不会识别成 rg,在读取输出前便被当作无检索且覆盖完整。请统一工具名归一化,或在不支持时标为覆盖不完整,并补一条到 _command 的跨平台记录回归,不只测试外层包装。
本轮静态核对五文件增量、#595 和调用链。未执行测试、实际导出、设备或 CI。
|
Pushed AE-04, The new test Non-blocking note. The two shell-form points are answered on their inline threads. The PR body has the updated evidence. |
david6666666
left a comment
There was a problem hiding this comment.
One additional completeness case on the current head.
| multiline = False | ||
| if (Path(argv[0]).name in _SHELLS and len(argv) == 3 | ||
| and argv[1] in ("-c", "-lc", "-ic", "-ilc")): | ||
| shell = _program(argv[0]) |
There was a problem hiding this comment.
Could a shell still present after one unwrap remain opaque? A direct shell that runs an unread script is now incomplete, but wrapping that same shell command in an outer shell can leave the inner shell in argv; the caller then reports complete/no retrieval without reading the script. Please mark an undecoded inner shell incomplete and test direct vs wrapped parity.
There was a problem hiding this comment.
Fixed in a00314b. After one unwrap, _recorded_argv checks every command position, meaning the first word and each word after |, ||, &&, ;, >, >> or <. If any of them is a shell, an opaque interpreter or env, the command is recorded as incomplete. That is the same result the command gets when run directly.
A shell name used as an argument is still decoded normally, for example rg -n bash docs.
Tests:
test_a_wrapped_shell_reads_like_the_same_shell_run_directlychecks parity for three forms, each run directly and wrapped inbash -lc:bash search.sh,bash -- -c ...andpwsh -Command ....test_unreadable_shell_forms_stay_incompleteadds the wrapped cases.test_a_shell_name_as_a_search_pattern_is_not_a_nested_shellguards the pattern case.
On H200, all the wrapped cases fail against the ef8cda3 source.
After one shell unwrap, a shell, env or opaque interpreter in command position still runs code the import never decoded; the same command run directly was already incomplete, and now the wrapped form is too. A shell name used as a search pattern is not affected. The inner tool name used the reader's path rules and kept .exe, so a recorded C:/tools/rg.exe was not read as rg and counted as complete with no retrieval. Tool names now go through the same program-name normalization as the outer shell. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for @zengchuang-hw.
增量:ef8cda3be8f570c4ad257c26de16030c6f8d1ada → a00314b12d211cbbd4f8eda6413c4ba8dabdb0c4,base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd。上轮检视。
已解决: 工具名统一经 _program 归一化,Windows 记录里的 rg.exe 不再漏记;直接 argv 的三种路径拼法已有回归。AE-04 保持已修复。
批准前必做: AVI-02 的多行脚本仍可能把未知检索算成完整覆盖。解析链路把换行压成空白,只保留一个 multiline 标志。检查命令位置时只看首个 token 和显式运算符之后;因此第二行如果启动不透明脚本,且没有字面出现受支持的检索工具,仍会走到 complete=True。请保留多行命令边界,或对无法确认的多行包装保守返回 incomplete,并补一个普通首行、次行不透明的 _command 回归。支持的单行 Windows 包装端到端用例可另作非阻塞补充。
静态核对两文件增量、#595 AVI-02、解析链与用例。未运行测试、实际导出或 CI。
|
Pushed AVI-02, inner tool names (zengchuang-hw).
Nested shells (david6666666, inline). The fix and its tests are described in the inline reply. Evidence (H200, Linux, Python 3.12).
|
The shell script reader joined lines into one token stream and kept only a multiline flag, so only the first word and words after explicit operators were checked as command positions. A second line that started an opaque shell, such as "cd docs" followed by "bash search.sh", was counted as complete coverage. An unquoted newline between commands is now a ";" token, so the first word of every line is checked. A newline inside quotes, or at the start or end of the script, is not a boundary. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for @zengchuang-hw.
增量:a00314b12d211cbbd4f8eda6413c4ba8dabdb0c4 → 071cb6aefbf06f35550ae22c87b402adbcd437d3,base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd。上轮检视。
已解决: AVI-02 解析器保留未引用的行间边界。普通命令之后另起一行启动不透明 shell 时,_recorded_argv 能看到新的命令位置,_command 返回 incomplete,不再把无法读取的脚本记作完整覆盖。新增回归覆盖空行、&& 后换行、引号内换行和 Windows 包装读取。AE-04 和已修复的 Windows 工具名归一化在本轮未倒退。
无批准前必做项。非阻塞:PR 描述的 Windows 工具名剩余限制与当前 _program 实现和用例不一致,可同步修正。
独立核对了两文件增量、#595 Group 2 范围、解析链和回归断言;未运行测试、实机导出或 CI。这是代码检视,不是 #595 整体验收。
|
Pushed AVI-02, multi-line scripts (zengchuang-hw). Tests in
Evidence (H200, Linux, Python 3.12).
|
david6666666
left a comment
There was a problem hiding this comment.
The newline regressions are fixed. I found one remaining completeness case in the unwrapped shell path.
| return None, False | ||
| # A shell or env in command position after one unwrap runs code this reader did | ||
| # not decode, exactly as the same shell run directly would. | ||
| starts = [0, *(index + 1 for index, word in enumerate(argv) if word in _SHELL_OPERATORS)] |
There was a problem hiding this comment.
This still misses an opaque shell after a shell keyword or wrapper. On this head, _command() returns (None, True, None) for a recorded bash -lc 'if true; then bash search.sh; fi', even though it cannot inspect search.sh. command bash search.sh on a later line has the same result. Could we mark these unparsed forms incomplete and add a regression through _command()? The direct nested-shell and newline fixes should stay intact.
There was a problem hiding this comment.
Codex, acting for @Dong1017.
I reproduced this through _command() at 071cb6aefbf06f35550ae22c87b402adbcd437d3, using recorded commands as fixture data. if true; then bash search.sh; fi, a second line of command bash search.sh, and (bash search.sh) each reported complete coverage without a retrieval. The direct bash search.sh control reported incomplete, and rg -n bash . still decoded as rg with complete coverage. I did not execute the recorded commands.
This confirms the self-review finding on the current head. The correction and re-review can stay on this PR.
There was a problem hiding this comment.
Fixed in 08cecd8. _recorded_argv now reads each simple command on its own and finds its program after reserved words and NAME=value words. A shell, env, a code builtin or a non-supported program handed a shell there is recorded as incomplete. A command substitution or subshell makes the script incomplete too.
if true; then bash search.sh; fi, cd docs\ncommand bash search.sh and (bash search.sh) each return incomplete through _command. rg -n if docs and rg -n bash docs still decode as rg, and cd docs && ls still counts as no retrieval.
Cases and the H200 comparison are in the general reply on this PR. A program named only through a variable or alias (S=bash; $S search.sh) is still not caught; the PR body lists it as the remaining gap.
|
Codex, acting for @Dong1017. @david6666666 @Bounty-hunter PTAL on head 071cb6a when available. Checks are green and one independent approval is recorded on this head. The last change and regression evidence cover the shell parsing findings in this Apps audit slice. |
…ions The command-position check looked only at the first word and the word after an explicit operator. A shell behind a reserved word, a NAME=value prefix, a wrapper such as nohup or command, a code builtin such as source, eval or ".", or a background "&" was not seen, so the command counted as complete coverage although it ran a script the import cannot read. A command substitution or a subshell had the same gap. Each simple command's program is now found after reserved words and assignments. A shell, env or code builtin there is incomplete, and so is a program outside the supported tools that is handed a shell. A command substitution or subshell in the script is incomplete. A compound command with neither a shell nor a supported tool still counts as no retrieval. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Reviewed base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd and head 071cb6aefbf06f35550ae22c87b402adbcd437d3 (five-file source slice plus tests, docs/knowledge-model-policy.md-protected paths untouched).
This is the posting account's own PR, so it is a self-review: post_review records a COMMENT, not an independent approval.
One blocker remains, and it is in AVI-02 — the requirement the last three rounds were about. The line-boundary fix at :67-86 is good and does what the body claims. The command-position set one layer up is still incomplete, so a keyword-introduced opaque shell can be recorded as complete coverage with no retrieval.
Blocker — AVI-02: keyword and builtin command positions are not checked
src/inferrsi/apps/views/codex_search.py:267-274 at 071cb6ae:
starts = [0, *(index + 1 for index, word in enumerate(argv) if word in _SHELL_OPERATORS)]
if any(index < len(argv) and _program(argv[index]) in (*_SHELLS, *_OPAQUE_SHELLS, "env")
for index in starts):
return None, Falsestarts is only the first word and the word after |, ||, &&, ;, >, >>, <. A shell keyword (if, then, elif, else, do, while, until, !, time, case) and a command-running builtin (command, exec, builtin) also open a command position, and neither is in _SHELL_OPERATORS.
Trace of the case @david6666666 reported inline at :269, on this head:
["bash", "-lc", "if true; then bash search.sh; fi"]→_shell_script(["-lc", ...])returns the script (:239-240)._shell_argv(script, separate_lines=True)→["if", "true", ";", "then", "bash", "search.sh", ";", "fi"],multiline=False. That;becomes its own token is execution-backed: the PR's owntest_a_multi_line_script_keeps_its_line_boundariesasserts the same shape for the newline form.starts = [0, 3, 7]; those words areif,then,fi, so the guard at:270passes andbashat index 4 is never examined.compound=True,tool="if"is not in_TOOLS, and no word's program is in_TOOLS, so_command(:285-288) returns(None, True, None).
(None, True, None) is "no decoded retrieval, coverage complete" — the exact AVI-02 defect signature. Run directly, the same command is conservative: ["bash", "search.sh"] hits _shell_script → None (an operand, so a script file) at :241-242 and returns (None, False).
Same root cause, two more forms I traced statically:
command bash search.shon a later line:["cd", "docs", ";", "command", "bash", "search.sh"],starts = [0, 3],commandis not a shell →(None, True, None).- A subshell:
(bash search.sh)→word_startat:69treats(as a separator butpunctuation_chars=";&|<>"at:82does not split it, so the token is"(bash",_program("(bash")is"(bash",compound=False, no_TOOLSword →(None, True, None).
The over-conservative direction is unaffected (if ...; then rg -n needle docs; fi stays incomplete, because rg is in _TOOLS), and rg -n bash docs correctly stays a plain decode. Only the undecodable-shell direction leaks.
Fix: add the command-opening keywords and the command/exec/builtin unwind to the position set in starts, or split (/) in the lexer so subshell positions become visible; keep value positions unjudged so test_a_shell_name_as_a_search_pattern_is_not_a_nested_shell stays green.
Regression: through _command, not _recorded_argv: bash -lc 'if true; then bash search.sh; fi', bash -lc 'cd docs\ncommand bash search.sh', bash -lc '(bash search.sh)', each expected (None, False, None).
Checked this round by reading (unchanged, no new blocker)
- AE-02
cuda.py:10-13.\b+re.escapeis a whole-token, case-insensitive match:L4no longer matchesNVIDIA L40S,H10no longer matchesH100throughqualify_devices. Both call sites now share one rule. - AE-03
benchmark_compare.py:337-345. The synthesised blocked view keeps thestate/native_sessionkeys_statusreads at:348and:366, so a damaged job routes toinspect_retained_host_evidenceinstead of raising;json.JSONDecodeErroris aValueError, so it is covered too. - AE-04
delivery/__init__.py:272-293. Export now comes fromresult["session"]and the guardedexport_bundleis the only thing after the commit. Residual detail, non-blocking:session = Path(result["session"])sits one line above thetry, so it is safe only as long as every final result carries that key; the tests cover the benchmark CLI path, not the service-reuse one (see limit below). - AVI-01
dashboard.py:347-352. TheInferRSI dashboardgenerator tag is in the service page, so_write_view_documentrecognises its own output and rewrites in place. - AVI-04
anthropic_agent.py:469-475with the existing handler at:550-552.exposed_filesfailures now land in theexcept AgentErrorbranch and emitagent.failedwithworkspace_symlink/missing_taskbefore any transport call.
Non-blocking
- The PR body's AVI-02 "Remaining gap" cell still says Windows-recorded executables outside the shell/
envcheck keep the reader-OS behaviour, which contradicts_program()at:216-218andtest_a_windows_recorded_tool_is_read_as_that_tool. Same stale line @zengchuang-hw flagged on approval. CHANGELOG.mdcorrectly warns that a pre-fix service dashboard needs a new output path. Keep the unrelated-HTML overwrite guard as is.
Verification limits
I read the head diff, codex_search.py:36-34x and its _command consumers, _status/_trial_result, after_final, and run_agent's failure handler. I did not run the test suite, a service, the CLI, or CI, and I did not reproduce the trace by execution — the tokenisation step is corroborated by the PR's own passing assertion, the position logic by reading. The real service-reuse test is not runnable on the H200 host per the body, so AVI-01's campaign path and AE-04's service path rest on the hosted CI run, not on my check.
@zengchuang-hw's APPROVED on this head (22:50Z) predates @david6666666's COMMENTED (23:53Z) and the inline case at :269, so it is evidence about the newline fix, not a settlement of this item. No other file in the six-fix set needs to change for it.
I will re-read the incremental diff once the author pushes.
Self-review: the PR author and the posting account are the same, so this review is not an independent approval.
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for @zengchuang-hw.
增量:071cb6aefbf06f35550ae22c87b402adbcd437d3 → 08cecd8909c4709b8178472ce118bd2bd06de20b;base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd。上轮。仅检视 #595 第 2 组;本次只改 AVI-02 解析及其测试。
批准前必修:区分后台运算符与字面 &。 新增扫描在分词后把任何值为 & 的参数都当作命令边界。分词已丢掉引号/转义信息,所以 rg 搜索带引号的字面 &,甚至原生 argv 里直接传入的字面 &,都会走 compound 分支,丢失原本可解码的检索事件并被标为 incomplete。只对 shell 源码中的未引用、未转义运算符分段;直接 argv 不作此解释。保留后台执行的回归,并补字面值两类正向回归。
新增的保留字、赋值、包装器和子命令路径已按静态源码核对;其他五项没有本轮改动。未执行测试或读取 CI 结果。
david6666666
left a comment
There was a problem hiding this comment.
Dot, acting for @david6666666 under delegated PR review.
The earlier opaque-shell cases are now covered. One literal-argument regression remains below.
| command = [] | ||
| elif command or not (word in _SHELL_KEYWORDS or _ASSIGNMENT.match(word)): | ||
| command.append(word) | ||
| compound = multiline or any(word in _SHELL_OPERATORS or word == "&" for word in argv) |
There was a problem hiding this comment.
Dot, acting for @david6666666 under delegated PR review.
This marks a literal & as compound even in direct argv such as ['rg', '-n', '&', 'docs'] or in rg -n '&' docs inside the decoded shell. _command then drops valid retrieval evidence as incomplete. Could you keep unquoted shell separators distinct from literal arguments and cover both spellings while preserving the new background-command check?
There was a problem hiding this comment.
Fixed in 3876021. A lone & is now a separator only when the script reader sees it unquoted and unescaped, and it is not part of &&, &>, >&, <& or |&. A direct argv is not read as shell source, so ['rg', '-n', '&', '.'] keeps its rg event and complete coverage, and so do rg -n '&' ., rg -n \& . and rg -n "a & b" ..
cd docs & bash search.sh is still incomplete, and rg -n needle docs & cd . is still read as two commands. The regressions and the H200 comparison are in the general reply on this PR.
|
Confirming this stands at For a direct tool call the recorded argv is returned untouched — Two changes would close it without losing the new background-command check:
A regression pair would pin both directions: |
…mmands A lone "&" word was treated as a background operator after tokenization, which had already dropped the quoting. A search for a literal "&", in a direct argv or as '&' in a script, was marked compound and lost its decodable retrieval event. The script reader now turns only an unquoted, unescaped "&" that is not part of "&&", "&>", ">&", "<&" or "|&" into a command separator before tokenizing, as it already does for newlines. A direct argv is not read as shell source, so a literal "&" there stays an argument. A background command between two commands is still a command boundary. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for @zengchuang-hw.
增量 08cecd8909c4709b8178472ce118bd2bd06de20b → 3876021c5881a667847434962ecbac967f39178e;base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd。上轮检视。范围是 #595 第 2 组 的 AVI-02,两文件增量,其他五项未改。
已解决: 原生 argv、引号和转义中的字面 & 保留为参数;真正的后台分隔符仍会识别为命令边界。
批准前必做: 本轮新增的相邻运算符分支保留了重定向/管道 token,但下游的复合判定没有识别这些保留下来的运算符,仍可能把重定向目标或其他命令参数送进普通 rg 解码,生成错误的检索范围或完整性标记。新增回归只断言没有变成分号,不验证最后产出的证据。对无法解码的 shell 组合应保守标为不完整,并补 _command 层断言,避免误报;不要求增加完整的 shell 支持。
静态核对了精确增量、扫描到归因的调用链、相关回归和 Issue 范围;未运行测试或读取 CI。
|
Pushed Fixed in Fixed in Tests in
Not covered. A program named only through a variable or alias, such as Evidence (H200, Linux, Python 3.12).
Locally: 53 passed in |
Bounty-hunter
left a comment
There was a problem hiding this comment.
deepseek-v4.1-flash (agent), acting for @Bounty-hunter.
PR review verdict — DO NOT PASS
Reviewed base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd and head 3876021c5881a667847434962ecbac967f39178e; the review covers the two-file delta 08cecd89 → 3876021 for #595 group 2 (AVI-02), not the other five fixes.
Blocker — redirect/pipe operator runs are left for a consumer that does not recognize them. In the new _shell_argv branch an unquoted & next to >, <, | or & is deliberately not rewritten, on the comment's assumption that &&, &>, >&, <& and |& are "other operators" (src/inferrsi/apps/views/codex_search.py:97-101). But _SHELL_OPERATORS (:28) contains none of &>, >&, <&, |&, and shlex returns each run as a single token. _recorded_argv therefore neither splits on them (:305-311) nor sets compound (:312); the tokens and their targets fall through into _rg_args as ordinary operands.
I ran the module's own _shell_argv, _recorded_argv and _command functions extracted from this head, with a corpus containing docs/a.md:
bash -lc 'rg -n needle docs 2>&1'→ scope["docs", "2", ">&", "1"],complete=Truebash -lc 'rg -n needle docs &> out.txt'→ scope["docs", "&>", "out.txt"],complete=Truebash -lc 'rg -n needle docs |& cat'→ scope["docs", "|&", "cat"],complete=True
_material (:109-114) maps any in-corpus path without an existence check, so the provenance event records redirect targets and the next pipeline command as searched scopes — the wrong-scope/wrong-completeness result the previous review asked to avoid.
Required before approval: resolve these runs while the quoting information still exists, inside _shell_argv(for_commands=True); normalize an unquoted &>, >&, <& or |& to the corresponding operator token (> / |) or to a dedicated operator token added to _SHELL_OPERATORS, so _recorded_argv takes the conservative incomplete path. Quoted literals must remain arguments. Add _command-level assertions for the three forms above (expected scope and complete), not only for the token shape.
Optional: tests/test_codex_search_shell_forms.py:145-148 asserts only that ; is absent and argv[0] == "rg"; it passes on the wrong event, so it does not pin the fix.
Scope, prior art, and what I checked
The same three inputs also mis-parse at 08cecd89: this delta inherits the wrong scope rather than introducing it. I still treat it as blocking because the new branch states that these runs are operators, and the regression added with it asserts only the token shape, so AVI-02's recorded evidence remains wrong on the head proposed for approval. The correction is local to the parser this PR is already iterating and does not require new shell support.
I statically read the exact two-file delta, _SHELL_OPERATORS, _recorded_argv, _command, _rg_args, _material, #595 group 2 and the related earlier reviews. I did not run the repository test suite or CI, and did not review the other five fixes in this PR.
…l script An unquoted redirection or pipe operator such as "2>&1", "&>" or "|&" was left as one token that the operator set does not list. The command was then read as a plain search whose scope included the redirection target or file descriptor, and it counted as complete coverage. The script reader now handles these operators while quoting is still known. A run of adjacent operator characters that is not already a supported operator becomes one plain operator: a run with "|" becomes "|", one with ">" becomes ">", one with "<" becomes "<". The command is then compound and its target is not read as a search scope. A quoted or escaped "&>", "2>&1" or "|&" stays an argument, and a lone "&" is still a command boundary. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for @zengchuang-hw.
增量 3876021c5881a667847434962ecbac967f39178e → 8ffb1536de588ade8b1bf39c6a7bfabee5510fa6,base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd。上轮,范围 #595 第 2 组 的 AVI-02;本轮只改解析器和回归。
上轮阻塞已解决。未引用的重定向和管道现在进入复合命令判定;涉及检索时不会把重定向目标当成搜索范围,也不会标记为完整覆盖。字面参数和真正的后台命令边界仍各按原义处理。新增回归验证了 _command 的最终归因,而不只检查分词。没有批准前必做项。
已静态核对精确两文件差异、消费方对不完整证据的处理及回归断言;未运行测试、查看 CI 或合入。这不是 #595 整体验收。
Bounty-hunter
left a comment
There was a problem hiding this comment.
LGTM
deepseek-v4.1-flash (agent), acting for @Bounty-hunter.
PR review verdict — PASS
Reviewed base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd and head 8ffb1536de588ade8b1bf39c6a7bfabee5510fa6; this is the delta 3876021c5881a667847434962ecbac967f39178e → 8ffb1536 for #595 group 2 (AVI-02), two files, not the other five fixes.
The blocker from my review at 3876021 is resolved. The new _operator_runs groups adjacent unquoted operator characters and rewrites a run that is not already a supported operator into one plain operator, while quoting is still known (src/inferrsi/apps/views/codex_search.py:43, :110-127). A lone & still becomes a command boundary; &&, ||, |, >, >>, < and ; are left alone.
I ran the head's _shell_argv, _recorded_argv and _command against a corpus containing docs/a.md, and the three forms from my blocker now take the conservative path instead of reporting a wrong scope:
bash -lc 'rg -n needle docs 2>&1'→ argv["rg","-n","needle","docs","2",">","1"], compound;_commandreturns(None, False, None).bash -lc 'rg -n needle docs &> out.txt'→[..., ">", "out.txt"], compound;(None, False, None).bash -lc 'rg -n needle docs |& cat'→[..., "|", "cat"], compound;(None, False, None).
Quoted and escaped forms remain arguments: '&>', '2>&1' and '|&' are returned as literal argv words with compound=False, and rg -n needle docs & cd . still yields the ; boundary. The added test_a_redirection_is_not_decoded_as_search_scope (tests/test_codex_search_shell_forms.py:176) asserts the final _command attribution rather than only the token shape, so the optional gap I noted at 3876021 is closed.
Scope, checks, and what I did not verify
I ran the head's tests/test_codex_search_shell_forms.py in an isolated harness built from the exact head codex_search.py with the unrelated InferRSI imports stubbed: 67 passed. I did not run the repository test suite or Windows/Chromium; at submission eight of ten checks were success and both full-check lanes were still in_progress, so merge must wait for them. I statically read the exact two-file delta, the new grouping/conversion branch, the downstream compound path in _recorded_argv/_command, and the added regression assertions. I did not review the other five fixes in this PR, and this PASS is not #595 overall acceptance.
|
Pushed AVI-02, redirection and pipe operators. The fix follows Bounty-hunter's suggestion and works while quoting is still known, inside Tests in
Cost of the change. A search that redirects stderr, such as Evidence (H200, Linux, Python 3.12).
Locally: 67 passed in |
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 — reviewed 8ffb1536de588ade8b1bf39c6a7bfabee5510fa6 against the PR base 214fb400b678db7f03f2d865e3b80c1fbf97d6bd and checked the relevant changes since it.
Review evidence and limits
I reviewed the updated shell attribution with the previously reviewed host, delivery, and comparison changes. Redirects and pipes now make the recorded search incomplete rather than expanding its scope; the tests cover both real operators and quoted literals. The earlier reviewer approved the fix on this head. This is not a claim to interpret arbitrary shell expansion.
Ready CI passed all eight jobs including both advisory hosts. The required knowledge policy is green. No merge or Issue acceptance is implied.
Brings the branch up to date after #630 landed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
358372e
There was a problem hiding this comment.
LGTM
deepseek-v4.1-flash (agent), acting for @Bounty-hunter.
PR review verdict — PASS
Reviewed base 5d1dd2878e9e9d27fa8f1ea6bb69b70127c6962e and head 358372eacc8b5570a34c142a8105eb65c174f412; this re-review covers the AVI-02 parser delta and what the two merge commits did to the PR-owned files, not the other five fixes.
The AVI-02 change is byte-identical to the head I passed at 8ffb1536: src/inferrsi/apps/views/codex_search.py (blob a57a527977ee) and tests/test_codex_search_shell_forms.py (blob 35f3efa05cb7) did not change across the merges. The grouping branch at codex_search.py:43 and :110-127 still turns an unquoted 2>&1, &> or |& into a compound command, and the _command-level regression at tests/test_codex_search_shell_forms.py:176 is unchanged.
The merges bring main to 5d1dd28 and touch one PR code file, benchmark_compare.py. Against the new base the PR delta is still the guarded agent_sessions.status(job) call (:498-503), and its regression in tests/benchmark/test_benchmark_compare.py is present. CHANGELOG.md keeps the six-fix entry, and the four Apps test files moved with main's rename while carrying the PR edits. All changed Python files compile, and none contains a conflict marker.
At submission full-check (3.10/3.11) was still running; the macOS compatibility job passed at 00:08:12Z and every other check is green. Merge must wait for full-check. knowledge-model-policy reports success with "Not applicable" on this head. I did not review the other five fixes, and this PASS is not #595 overall acceptance.
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
OpenAI Dot, acting for @zengchuang-hw.
Reviewed base 5d1dd2878e9e9d27fa8f1ea6bb69b70127c6962e and head 358372eacc8b5570a34c142a8105eb65c174f412 for #595 Group 2. The sync is 12567c89d0c4d0092e633f462c9c40c454d69f9a..358372eacc8b5570a34c142a8105eb65c174f412; see the previous review. The two parents are the prior sync and main's landed #630.
Compared all 15 net patches before and after this sync. After mapping the six relocated test files, the added and deleted lines match in order. The retrieval parser and its shell-form regression file are unchanged, so redirection targets are still excluded from search scope and incomplete compound retrieval stays marked incomplete. No new behavior or approval blocker in this sync.
Static diff, ancestry, and test relocation verified. I did not rerun tests, inspect CI, or assess #595 as a whole.
Governing Issue and delivery slice
Refs #595
Knowledge authorship declaration
No path protected by
docs/knowledge-model-policy.mdchanges. The declaration below is disclosure only.Changed artifacts and evidence
L4for anL40Sapps/host/platforms/cuda.py: one_names_modelwhole-token, case-insensitive match used by bothinspect_devicesandqualify_devicestest_inspection.py::test_cuda_model_must_be_a_whole_token_of_the_reported_name;test_module_boundaries.py::test_cuda_qualification_accepts_campaign_supplied_count_and_skugains anH10vsH100caseparsed_tool_facts); not in #595compare --action statusfails on one unreadable jobapps/workflows/benchmark_compare.py_status:OSError/ValueErrorfrom one job'sagent_sessions.statusmarks that trialblockedwith the error type, the same readingreportalready appliestest_benchmark_compare.py::test_bad_native_receipt_keeps_verified_arm_in_report(six damage cases) now also callscompare.statusand expects the same next action asreportapps/delivery/__init__.pyafter_finalexports fromresult["session"], the resolved root Harness committed final under, and does not touch the caller's path again (review: resolving it could fail after the commit)test_project_optimization.py::test_final_delivery_publishes_through_a_symlinked_session_pathreaches the session through a directory symlink;test_final_delivery_never_resolves_the_session_path_after_commitmakes the session path fail to resolve once final is committed and expects the committed result plus a published delivery. The root cause is OS-independent, so Linux and Windows reproduce the macOS/tmpcase.apps/views/dashboard.py: the service page carries theInferRSI dashboardgenerator tag the writer checks.CHANGELOG.mdnotes that a page written before this fix has no marker and needs a new output path or removaltest_dashboard_service_page.pywrites the page twice;test_project_service_reuse.py::test_knowledge_and_dashboard_never_enter_legacy_fingerprint_readersnow callswrite_dashboardtwice on a real service campaignapps/views/codex_search.py: options before-cand a leadingenv NAME=valueare unwrapped;pwsh/powershell/cmd/fish, script files, a-cafter--andenvoptions this reader cannot interpret are recorded as incomplete. Program names, including the inner tool name, are split on both/and\without.exe, so a Windows-recorded command reads the same on POSIX; a shell, opaque interpreter orenvin command position after one unwrap is incomplete, as the same command run directly is; an unquoted newline in a script is a command boundary, so each line's first word is checked; each simple command's program is found after reserved words (if,then,do,!, ...) andNAME=valuewords, and a shell,env, a code builtin (eval,source,.,exec,command,builtin) or a non-supported program handed a shell (nohup bash x) there is incomplete; an unquoted, unescaped lone&separates commands; any other unquoted run of&, `,<,>that is not already a supported operator (&>,>&,<&,,>agent.failedformissing_taskorworkspace_symlinkapps/integrations/anthropic/anthropic_agent.pyrun_agent:exposed_filesruns inside the existing failure handlertest_anthropic_agent.py::test_missing_task_is_retained_as_a_failure_before_transport;test_symlink_workspace_is_rejected_before_transportnow asserts the eventChecks and dependencies
git archivetrees of main3b1b4ce(old) and5b2127a(cand) over the related test files:test_codex_*,test_dashboard*,test_anthropic*,test_inspection,test_mlx_discovery,test_module_boundaries,test_benchmark_compare,test_project_optimization,test_project_service_reuseandtest_*delivery*.--no-lazy-fetch, and service-reuse precheck deadlines are too short there.src: all 17 new or changed regression cases failed.5d6c962. It differs from5b2127aonly bytests/test_dashboard_service_page.py. Locally on Windows with Python 3.13, that file passes, and it fails with main'sdashboard.py.ef8cda3(H200, Linux, Python 3.12). Manifest-verified trees of the previous head5d6c962(old) and7c43817(cand) over the same related files withouttest_project_service_reuse: old 3 failed, 696 passed; cand 3 failed, 702 passed; candidate-only failures 0 (the 3 shared are the host's git 2.34 and non-macOS MLX cases). The cand tests against the old source: the delivery-after-commit test and four Windows-path shell cases fail.ef8cda3differs from7c43817only bytest_dash_c_after_double_dash_names_a_script_fileintests/test_codex_search_shell_forms.py; that file, copied into both trees, gives cand 12 passed and old source 5 failed (the four Windows-path cases and the--case).ruff check(0.14.10) on all changed files passed.git diff --checkis clean.a00314b(H200, Linux, Python 3.12). Manifest-verified trees ofef8cda3(old) anda00314b(cand) overtest_codex_*,test_round_citations*,test_*search*andtest_dashboard*: old 389 passed, cand 400 passed; candidate-only failures 0. The 9 new cases fail against theef8cda3source.071cb6a(H200, Linux, Python 3.12). Manifest-verified trees ofa00314b(old) and071cb6a(cand) over the same files as the second round: old 400 passed, cand 407 passed; candidate-only failures 0. Against thea00314bsource, 3 of the 7 new cases fail: the two scripts that start a shell on a later line and the line-boundary test. The other 4 also pass there; they guard behavior that already held (&&before a newline, quoted and trailing newlines, the Windows wrapper).08cecd8(H200, Linux, Python 3.12). Manifest-verified trees of071cb6a(old) and08cecd8(cand) over the same files as the third round: old 407 passed, cand 422 passed; candidate-only failures 0. The new test file run against the071cb6asource: 12 cases fail, the 12 new unreadable-form cases. The other new cases guard behavior that already held (rg -n if docs, a quoted$(...)argument,cd docs && lsas no retrieval).3876021(H200, Linux, Python 3.12). Manifest-verified trees of08cecd8(old) and3876021(cand) over the same files as the earlier rounds: old 422 passed, cand 430 passed; candidate-only failures 0. The new test file run against the08cecd8source: 4 cases fail, the three literal-&cases and the background-boundary case. The other new cases guard behavior that already held.8ffb153(H200, Linux, Python 3.12). Manifest-verified trees of3876021(old) and8ffb153(cand) over the same files as the earlier rounds: old 430 passed, cand 444 passed; candidate-only failures 0. The new test file run against the3876021source: 13 cases fail, the nine_commandcases and the four normalization cases; the three quoted-argument cases also pass there.test_knowledge_and_dashboard_never_enter_legacy_fingerprint_readers) fails on both trees on H200 and on this laptop, before it reaches the new assertion, because the service precheck exceeds its deadline. Hosted CI runs it._runtime_identity()changes, so existing sessions are unaffected.Remaining work and Issue closure
🤖 Generated with Claude Code