Repository navigation
feat(views): support Antigravity transcript attribution in read_window - #992
SamitHuang wants to merge 2 commits into
Conversation
Add an Antigravity transcript reader (antigravity_search.py) and dispatch to it automatically from codex_search.read_window when the trace starts with Antigravity's step-envelope JSONL schema. - Pair PLANNER_RESPONSE tool calls with ordered GENERIC results for run_command and read_file, reusing existing corpus command/delivery attribution. - Extract assistant decision text from PLANNER_RESPONSE.content. - Mark truncated tool outputs as runtime_truncated and uncertain. - Add unit tests and update the Antigravity plugin guide. Agent-assisted-by: Antigravity / gemini-4-neon-low [effort=low] (author) Signed-off-by: Samit <yhuangch@cse.ust.hk>
Low-cost E2E verification (live Antigravity transcript)Verified
Observed output (paths & conversation ID redacted)Both |
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for zengchuang-hw.
首次检视。Base ed143a77fd1aca61de011147fee748a5c7c38dd5,head 01a72d193d255bba800c153142b89e3cd3332e0e,范围 #991。
Antigravity 适配器给 read_file 合成的 command item 填了 cwd=str(corpus);共享身份解析会用该 cwd 解释相对路径。因此相对读取即使没有可信工作目录,也能被归到 corpus 中的材料。现有读取测试传的是绝对路径,没覆盖此分支。批准前,请仅使用转录提供的可信来源;缺失时标为 uncertain,补一个工作目录与 corpus 含同名文件的静态归属回归,并保留绝对路径正例。#991 的实现范围仍为 proposed。已静态追踪四文件 diff、两个 host 路径与适用技能;未独立重放实时 Antigravity 或 CI。
…aths Never default synthesized command cwd to the target corpus path. Use a working directory only when explicitly recorded in the transcript (or derive a non-corpus root only when file operands are absolute), so relative read_file and run_command calls without a trusted cwd are marked uncertain instead of colliding with same-named corpus files. Add a regression test where workspace and corpus contain same-named files while preserving absolute-path positive coverage. Agent-assisted-by: Antigravity / gemini-4-neon-low [effort=low] (author) Signed-off-by: Samit <yhuangch@cse.ust.hk>
|
Addressed review feedback at head
Ready for re-review. |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).
PR review verdict — PASS
Reviewed base ed143a7 and head 606c848 (first review on open; full diff, diffComplete true).
Prior reviews: no formal Approve on this head is seeded. @zengchuang-hw's COMMENTED review, on the earlier commit 01a72d1, raised one blocker: read_file synthesized command items set cwd to the corpus, so relative reads with no trusted working directory could be attributed to corpus material. No CHANGES_REQUESTED is outstanding. I checked that finding against 606c848:
src/inferrsi/apps/views/antigravity_search.py:_trusted_cwdaccepts only an absolute recorded Cwd/cwd/workdir/WorkingDirectory._parse_read_filefalls back to the parent of an absolutePathonly. Relative reads without a trusted cwd keepcwd=None._parse_run_commanduses/only when every file operand is absolute (_all_file_operands_absolute).src/inferrsi/apps/views/codex_search.pyL453-455:_commandreturns event None with complete False whencwdis None for cat/sed/nl/rg, so no corpus attribution happens and the item is marked uncertain.tests/apps/test_antigravity_search.py:test_antigravity_relative_reads_without_trusted_cwd_do_not_attribute_to_corpuscovers the same-named workspace/corpus case (events == [], uncertain [3, 4]). The absolute-path positive testtest_antigravity_run_command_and_read_file_attributionremains.
Other checks:
codex_search.read_windowdispatch (diff L878+) to the Antigravity reader is a function-local import, which avoids a circular import; the Antigravity reader importscodex_searchlazily too.- Truncation handling (
runtime_truncated, kept inuncertain) matches the wording indocs/guides/plugins/antigravity-plugin.md.
Not verified here:
- Tests were not executed; CI status was not seen.
- No live Antigravity transcript was replayed; the envelope assumptions (step_index, type, tool_calls, GENERIC pairing) follow the test fixtures.
- I read only the current head, not the 01a72d1 to 606c848 delta, and did not read the rest of
codex_search.read_windowor the_delivery/capture paths.
Non-blocking follow-ups (not required for this PASS):
- Tool calls are paired with result rows positionally (FIFO over GENERIC rows, no call ID). An interleaved non-GENERIC result within one planner step would shift the pairing. A test with a mixed step sequence would pin this down.
- A
read_fileresult without the "Showing lines" header, or arun_commandresult without the exit-code line, is skipped silently rather than marked inuncertain. Consider marking it.
|
@zengchuang-hw PTAL |
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for zengchuang-hw.
回应本条 PTAL,从上轮 01a72d19到 606c8484ab5dcf18e12a2f47f5beb3dab626a874。上轮指出的 corpus 默认 cwd 已移除;相对路径只用显式工作目录,没有来源时不会把同名 corpus 文件补作归属。已独立验证当前 3 项 Antigravity CPU 测试,包含绝对路径和同名对照,均通过。
暂不批准的剩余项只有 #991 的交付范围未接受,须由负责人记录接受和验收人;不要用软件回归代替范围授权。本轮未取得真实宿主转录或运行宿主,不能把合成结果当真实会话回放。
|
首次检视 PR #992。本次看的是 base 上轮在 暂不 Approve,原因与 @zengchuang-hw 在当前 head 上的 NO PASS 一致:治理 issue #991 仍是 在范围被接受之前,当前实现还有一处与待定验收项直接相关的行为: inferRSI, acting for @amy-why-3459. |
Governing Issue and delivery slice
Refs #991
src/inferrsi/apps/views/antigravity_search.py: Antigravitytranscript.jsonl/transcript_full.jsonlreader supportingrun_command,read_file, assistantPLANNER_RESPONSE.contentdecisions, trusted-cwdprovenance enforcement (never defaultscwdtocorpus), and truncation detection.src/inferrsi/apps/views/codex_search.py: automatic dispatch inread_windowwhen line 1 matches Antigravity's step-envelope schema.tests/apps/test_antigravity_search.py: unit tests for absolute-pathrun_commandandread_file(ranged), decision extraction, truncated-output uncertainty handling, and same-named workspace/corpus relative-path regression without trustedcwd.docs/guides/plugins/antigravity-plugin.md: updated transcript attribution notes.round_citationssubmission-matching heuristics.Knowledge authorship declaration
Changed artifacts and evidence
read_windowdispatchsrc/inferrsi/apps/views/antigravity_search.py,src/inferrsi/apps/views/codex_search.pypytest tests/apps/test_antigravity_search.py tests/apps/test_antigravity_plugin.py tests/apps/test_codex_search_delivery.py(53 passed)cwdprovenance & same-named file regressionsrc/inferrsi/apps/views/antigravity_search.py,tests/apps/test_antigravity_search.pytest_antigravity_relative_reads_without_trusted_cwd_do_not_attribute_to_corpuspassedruff check src tests tools(All checks passed)docs/guides/plugins/antigravity-plugin.mdtest_antigravity_plugin.pyChecks and dependencies
ruff check src tests tools— passed.pytest tests/apps/test_antigravity_search.py tests/apps/test_antigravity_plugin.py tests/apps/test_codex_search_delivery.py— 53 passed in 28.35s.pytestsuite not run locally (will run in GitHub Actions CI).codex_search._command,_delivery,_detail, andcodex_tool_returns._output_lineswithout changing Codex rollout behavior.Remaining work and Issue closure