Skip to content

fix(apps): close six review defects in host, compare, delivery and views - #605

Open
Dong1017 wants to merge 2 commits into
mainfrom
impl/595-apps
Open

Dong1017 wants to merge 2 commits into
mainfrom
impl/595-apps

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #595

Knowledge authorship declaration

No path protected by docs/knowledge-model-policy.md changes. The declaration below is disclosure only.

{"schema_version":1,"head_sha":"ef8cda3be8f570c4ad257c26de16030c6f8d1ada","human_only":false,"material_ai_authors":[{"tool":"Claude Code","model_id":"claude-opus-5-5","effort":"xhigh","role":"author"}]}

Changed artifacts and evidence

Requirement (#595) Actual change Regression test (fails on main, passes here) Remaining gap
AE-02: CUDA inspection accepts L4 for an L40S apps/host/platforms/cuda.py: one _names_model whole-token, case-insensitive match used by both inspect_devices and qualify_devices test_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_sku gains an H10 vs H100 case Ascend/ROCm still use their normalized substring rule (parsed_tool_facts); not in #595
AE-03: compare --action status fails on one unreadable job apps/workflows/benchmark_compare.py _status: OSError/ValueError from one job's agent_sessions.status marks that trial blocked with the error type, the same reading report already applies test_benchmark_compare.py::test_bad_native_receipt_keeps_verified_arm_in_report (six damage cases) now also calls compare.status and expects the same next action as report none
AE-04: delivery fails when the session path has a symlinked ancestor apps/delivery/__init__.py after_final exports from result["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_path reaches the session through a directory symlink; test_final_delivery_never_resolves_the_session_path_after_commit makes 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 /tmp case. none
AVI-01: the service-reuse dashboard cannot be rewritten apps/views/dashboard.py: the service page carries the InferRSI dashboard generator tag the writer checks. CHANGELOG.md notes that a page written before this fix has no marker and needs a new output path or removal test_dashboard_service_page.py writes the page twice; test_project_service_reuse.py::test_knowledge_and_dashboard_never_enter_legacy_fingerprint_readers now calls write_dashboard twice on a real service campaign none
AVI-02: wrapped shell searches count as "no retrieval, complete" apps/views/codex_search.py: options before -c and a leading env NAME=value are unwrapped; pwsh/powershell/cmd/fish, script files, a -c after -- and env options this reader cannot interpret are recorded as incomplete. Program names are split on both / and \, so a Windows-recorded command reads the same on POSIX (review) test_codex_search_shell_forms.py: five wrapped forms decode like the plain form, including Windows paths for bash.exe and env.exe; six unreadable forms stay incomplete, including Windows pwsh.exe with and without env.exe and bash -- -c; test_dash_c_after_double_dash_names_a_script_file checks the -- form directly Executables recorded as Windows paths outside the shell/env check (for example C:\...\rg.exe) keep the existing reader-OS behavior
AVI-04: the read agent emits no agent.failed for missing_task or workspace_symlink apps/integrations/anthropic/anthropic_agent.py run_agent: exposed_files runs inside the existing failure handler test_anthropic_agent.py::test_missing_task_is_retained_as_a_failure_before_transport; test_symlink_workspace_is_rejected_before_transport now asserts the event none

Checks and dependencies

  • Checks actually run (result and tested scope):
    • H200 (Linux, Python 3.10). Ran manifest-verified git archive trees of main 3b1b4ce (old) and 5b2127a (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_reuse and test_*delivery*.
      • old: 85 failed, 696 passed.
      • cand: 85 failed, 705 passed.
      • Candidate-only FAILED/ERROR/SUBFAILED lines: 0.
      • The 85 shared failures come from the host: git 2.34 lacks --no-lazy-fetch, and service-reuse precheck deadlines are too short there.
    • H200, new tests against the old source. The candidate's tests were run against main's src: all 17 new or changed regression cases failed.
    • Head 5d6c962. It differs from 5b2127a only by tests/test_dashboard_service_page.py. Locally on Windows with Python 3.13, that file passes, and it fails with main's dashboard.py.
    • Review fixes, head ef8cda3 (H200, Linux, Python 3.12). Manifest-verified trees of the previous head 5d6c962 (old) and 7c43817 (cand) over the same related files without test_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. ef8cda3 differs from 7c43817 only by test_dash_c_after_double_dash_names_a_script_file in tests/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).
    • Other local checks. ruff check (0.14.10) on all changed files passed. git diff --check is clean.
  • Failed, skipped, timed-out or not-run checks (if applicable):
    • The real service-reuse test (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.
    • No macOS run; the AE-04 test does not depend on the OS.
  • Dependencies / shared interfaces / integration assumptions (if applicable): No file in _runtime_identity() changes, so existing sessions are unaffected.

Remaining work and Issue closure

🤖 Generated with Claude Code

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>
@Dong1017 Dong1017 added area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters kind:task Bounded delivery task with a delegated slice labels Nov 23, 2026

@zengchuang-hw zengchuang-hw left a comment

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.

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 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One cross-host completeness issue on the current head.

Comment thread src/inferrsi/apps/views/codex_search.py Outdated
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")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

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.

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 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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:]:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

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.

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_file checks _recorded_argv directly. It failed against the previous source on H200: that source decoded rg -n needle docs as inline code.
  • The end-to-end case in test_unreadable_shell_forms_stay_incomplete also 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 zengchuang-hw left a comment

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.

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。

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Pushed ef8cda3 for the review findings on 5d6c962. No approval existed on 5d6c962, so none was voided.

AE-04, after_final (zengchuang-hw). after_final no longer touches the caller's path. It exports from result["session"], which is the root Harness resolved before it committed final. Both the benchmark and the service final results carry that field (status() and _service_status()). Nothing outside the guarded export can fail after the commit now.

The new test test_final_delivery_never_resolves_the_session_path_after_commit covers this. It makes the session path raise on resolution once state.json records final, then expects exit 0, the completed state and a published delivery. With the previous after_final, the same test fails with argument_parser.error (exit 2) on H200.

Non-blocking note. CHANGELOG.md now has a Fixed entry for the six fixes. It says that a service-reuse dashboard written before the marker existed needs a new output path or removal. The overwrite guard for unrelated HTML is unchanged.

The two shell-form points are answered on their inline threads. The PR body has the updated evidence.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants