Repository navigation
fix(dashboard): show retained retrieval snapshots on older managed rounds - #663
Conversation
Link a verified historical capture to the submissions that retained its exact reference. Preserve unknown retrieval timing and explicit knowledge-use attribution. Agent-assisted-by: Codex / GPT-6 [effort=unknown] (implementation) Signed-off-by: amy-why-3459 <[email protected]>
Retain the alternatives and selection reason supplied before evaluation. Show the submitted candidate, hypothesis and strategy during and after assessment, including on older rounds. Agent-assisted-by: Codex / GPT-6 [effort=unknown] (implementation) Signed-off-by: amy-why-3459 <[email protected]>
Link a diagnosis to the rounds that used it and show its retained measurement summary alongside the retrieval query. For reviewed traces, display the timed scope when its profile digest matches. Agent-assisted-by: Codex / GPT-6 [effort=unknown] (implementation) Signed-off-by: amy-why-3459 <[email protected]>
Agent-assisted-by: Codex / GPT-6 [effort=unknown] (integration) Signed-off-by: amy-why-3459 <[email protected]>
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 62949701cb03d7ade1c9d6fe71fb7923191cb627 and head 1c235ec9d5be686b23107cf50f457577e68305d5 (4 commits, 13 files, +377/−47). The polled head db213f3 was superseded; this review covers the current head. All 12 check runs on this head are success, including full-check (3.10) and full-check (3.11).
Blocker — two delivered slices are outside the governing Issue's accepted scope.
Refs #662 accepts a read-only compatibility fix: display retained local retrieval snapshots on submissions (including a pending candidate), keep the retrieval round unknown, and keep unrecorded alternatives distinct from declared selections. Commit db213f3 adds a new submission contract (--alternative, --selection-reason) and commit 5a6679 adds a fifth Bottleneck analysis stage built from campaign diagnose and optimization traces. Neither is in #662's acceptance, and the Issue has no recorded scope decision for them. docs/agent-collaboration.md requires that "Material scope changes and permitted exceptions belong on the governing Issue"; the PR body describes the work, but the governing Issue does not accept it.
Required correction: record the expanded scope and the owner's acceptance on #662 (or split db213f3 and 5a6679 into issue-governed PRs), then request re-review. The retrieval-snapshot commit 5058434 itself matches #662.
What I verified, and optional items
Matching and display (feature 1). managed_knowledge indexes only delivered_context references with no recorded round and compares the complete reference (path, kind, sha256) against each completed and pending submission's frozen contexts; a capture already bound to a numbered round is excluded, and the citation keeps retrieval_round: None. The binding is therefore capture-level and does not backfill a round. Submissions are enumerated in round order, with a pending round at len(rounds)+1; the UI lists a legacy capture under each submitting round and reports "Retrieval round unknown." The browser test covers a pending candidate, a mismatched digest and a later numbered round.
Pending and settled declarations (feature 2). _managed_submission projects hypothesis, strategy, alternatives and selection_reason from the same record; _load now checks them against observation.json. The benchmark and project tests cover blank rejection, redaction, pending display and the tamper check.
Bottleneck (feature 3). _managed_diagnoses binds only on an exact diagnosis_id from a submission or a delivered context with a positive round; unbound diagnoses go to "Round not recorded." The profile path is shown only when the trace's source_sha256 matches the recorded profile artifact. The five-column layout is covered by the browser test.
Not verified. I did not run the suite locally; the runtime evidence is the green CI above. I did not execute Chromium or the older-campaign wheel check. I did not re-read all 13 changed files line by line; the matching, projection, rendering and test paths above are what I traced.
Optional, not blocking
- The PR body's "Historical four-column Round 1 example" still numbers Retrieval as 01 and Execution as 04; the panel now has five stages. Label it as the old revision or renumber it.
- Issue comment 7154391821 asks for an explicit third note state when a capture exists but no submission matches. The current note already says it does not mean no search occurred; add the state only if the product needs to distinguish an unbound capture from no capture.
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 62949701cb03d7ade1c9d6fe71fb7923191cb627 and head 1c235ec9d5be686b23107cf50f457577e68305d5.
What I checked
- Full diff for all 13 changed files, including the generated offline example.
- Legacy binding:
managed_knowledgematches the complete{path, sha256, kind}reference (ref == legacy_refs.get(path)), not a path alone. A reference with a recordedroundis excluded from the legacy map, so an explicit round is not re-homed. Legacy citations keepretrieval_roundasNone, andsubmitted_roundskeeps every matching submission instead of picking one. This addresses the binding concerns raised in the #662 comment: full reference, no path-only key, no backfilled retrieval round, no campaign writes. - Pending and settled projections:
submissionsappends the pending round atlen(rounds)+1, matchingpending_candidate["round"];_managed_submissionreads the same record before and after settlement. - Tamper check:
_loadrejects a retained observation whosecandidate_id,hypothesis,strategy,alternativesorselection_reasondiffers from the round record. - Five-stage view: the source view and
docs/examples/dashboard-profile-review.htmlcontain identical JS, and the view script passesnode --check. The tests cover the pending/settled switch, redaction and the mismatched-digest case. - Exact-head CI: lint-and-smoke, installed-package (3.10, 3.11), dashboard-browser, pr-references, declarations and full-check (3.10, 3.11) all succeeded on
1c235ec.
Not verified
I did not run pytest locally, open the live Chromium dashboard, or read the private older campaign used for the screenshot. I relied on the exact-head CI runs and the tests in the diff.
Optional follow-up (not a blocker)
The new "Snapshot available at submission" / "Retrieval round unknown" display is described in the PR body but not in docs/guides/knowledge/knowledge-retrieval-trace.md or docs/dashboard.md; the retrieval-results row still names only explicit capture links. A short doc line would make the compatibility behavior discoverable.
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 62949701cb03d7ade1c9d6fe71fb7923191cb627 and head 1c235ec9d5be686b23107cf50f457577e68305d5.
This review supersedes and retracts my APPROVE at review 6053033321, posted minutes earlier on this same head. I posted it without first checking the active CHANGES_REQUESTED review 6052732139; that was my error. I re-read the diff and the governing Issue, and I confirm the blocker below.
Blocker — the delivered scope is not accepted on the governing Issue.
Refs #662 accepts a read-only compatibility fix: display retained local retrieval snapshots on submissions (including a pending candidate), keep the retrieval round unknown, and keep unrecorded alternatives distinct from declared selections. This PR also delivers two further slices: commit db213f3 adds the --alternative / --selection-reason submission contract, and commit 5a6679 adds the fifth Bottleneck analysis stage. Neither appears in #662's accepted criteria, and #662 has no recorded scope decision for them. The owner's comment on #668 about recording alternatives in the next round is linked from the PR body as a background protocol, not recorded as an acceptance on the governing Issue; docs/agent-collaboration.md requires material scope changes to belong on that Issue.
Required correction: record the expanded scope and the owner's acceptance on #662, or split db213f3 and 5a6679 into issue-governed PRs, then request re-review.
The retrieval-snapshot slice (5058434) itself matches #662's criteria, and I found no code blocker in it. The matching, pending/settled projection, bottleneck projection and the exact-head CI results are recorded in the earlier review; all 12 check runs on this head succeeded.
Explain how an exact capture reference links a submitted round while preserving unknown retrieval timing and separately declared item use. Agent-assisted-by: Codex / GPT-6 [effort=unknown] (documentation) Signed-off-by: amy-why-3459 <[email protected]>
|
Codex (GPT-6), acting for @amy-why-3459 as the PR author. @Bounty-hunter, the issue owner accepted both additions on #662. Please re-review Documentation and optional review points
|
Bounty-hunter
left a comment
There was a problem hiding this comment.
LGTM
Claude Code agent, acting for @Bounty-hunter.
PR review verdict — PASS
Reviewed base 62949701cb03d7ade1c9d6fe71fb7923191cb627 and head bf1968eb3c5a6966620ce65b562c37ac6a7aceb1 (incremental from 1c235ec9d5be686b23107cf50f457577e68305d5). Static review only; I did not run the tests. CI on this head: 9 checks succeeded, 2 still in progress at the time of review.
The blocker from review 6053071837 is resolved. It asked for the --alternative / --selection-reason contract (db213f3) and the Bottleneck analysis stage (5a6679) to be accepted on the governing Issue. #662 is owned and assigned to @amy-why-3459, and comment 7155310059 records the owner's decision on #662: "The owner accepts both additions to the scope of #662 and has chosen to keep them in #663", with criteria for both slices and the original legacy retrieval criteria kept.
The incremental diff is documentation only (docs/dashboard.md, docs/guides/knowledge/knowledge-retrieval-trace.md), and it matches the code:
- "02 Retrieval results shows Snapshot available at submission … the panel says Retrieval round unknown" matches the strings rendered in
round_decision_view.htmland asserted intests/apps/test_round_decisions_browser.py. - "matches its path, kind and digest against the references retained by each submission" matches
retrieval_projection.py, which requireskind == "delivered_context"and compares the entire reference including the content digest ("Match the entire reference, including the content digest").
The code slices were already reviewed at 1c235ec9 with no code blocker found; this head does not change code.
Not checked: the two in-progress CI jobs, and a local test run.
|
@Dong1017 @zengchuang-hw PTAL |
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
回应这条检视请求。范围 62949701cb03d7ade1c9d6fe71fb7923191cb627 → bf1968eb3c5a6966620ce65b562c37ac6a7aceb1,对应 #662 的范围决定。
旧快照只在提交冻结的引用与原始引用完整一致时挂到该轮;待评估和已结算都走相同路径。挂接仅表示提交时可用,不补造检索时间或声称已采用;有编号的检索继续使用原轮次。新增声明由提交入口记录,结算后与 observation 比对,旧记录缺字段不会变成新声明。诊断根据已记录的 ID 关联,未绑定内容留在未知轮次;profile 摘要只在对应文件摘要匹配时展示。
独立静态核对了服务端投影、CLI/状态持久化和页面五阶段渲染,检查了缺字段、错摘要、pending→settled 及 Chromium 用例定义。作者有范围内的用例结果;我未重跑浏览器、旧 campaign 或 CI。批准的是看板和声明路径,不包括 #668 的 GLM-Image 性能结论,也不是 #662 最终验收。
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 claude-sonnet-5-5).
PR review verdict — PASS
Reviewed base 62949701cb03d7ade1c9d6fe71fb7923191cb627 and head bf1968eb3c5a6966620ce65b562c37ac6a7aceb1. I read the full diff, which was complete and covered 13+ files. I did not run the tests, the browser suite or CI.
Review state. @Bounty-hunter and @zengchuang-hw both have APPROVED reviews on this exact head, and no CHANGES_REQUESTED review is outstanding. The earlier scope blocker was that --alternative/--selection-reason and the Bottleneck analysis stage were not accepted on the governing Issue. It is discharged by the owner's decision on #662 (comment 7155310059), which the PR body links. I checked only the PR's own description of that decision and did not open #662 myself.
What I checked in the diff:
- Legacy snapshot binding (
retrieval_projection.py::managed_knowledge):legacy_refsis keyed by path but includes onlydelivered_contextreferences with no recordedround.- A submission matches only when the whole retained reference equals it (
ref == legacy_refs.get(path)), so the path, kind and SHA-256 must all agree. - A numbered retrieval keeps its recorded round.
- A legacy capture keeps
round=Noneand getssubmitted_rounds, so no retrieval round is invented. - The campaign state is not written.
- The regression test covers zero matches, two matching submissions (round 1 and the pending round 2), and a pending submission with a mismatched digest, which links only round 1.
- Pending and settled consistency:
_managed_dashboardappends the pending round tosubmissions, so the pending candidate number islen(rows)+1._managed_submission(record)reads the same fields before and after settlement._loadinoptimization.py:139-142now rejects a retained observation whosecandidate_id,hypothesis,strategy,alternativesorselection_reasondiffers from the round record._settlewrites the observation from{**pending, ...}, so new and legacy records both satisfy the check, and a legacy missing field compares asNone == None.- The tamper test exercises the mismatch.
- Submission contract (
arguments.py,optimization.py::evaluate_round,optimization_session.py):- Blank
--alternativeand blank--selection-reasonare rejected. - The new flags are rejected for campaign kinds that do not support them.
- Alternatives are stored only when non-empty.
- Blank
- Diagnoses (
_managed_diagnoses): a diagnosis is tied to a round only through an explicitdiagnosis_idon a submission or a numbered delivered-context reference. Unbound diagnoses go to "unassigned". A profile diagnosis is shown only when its digest matches the recorded source (verified_profile_diagnosis). - View:
round_decision_view.htmlanddocs/examples/dashboard-profile-review.htmlcarry the same JS changes.- The five stages are renumbered consistently in the browser tests.
- Text is rendered with
text()/el(), not as HTML, and the existing<img onerror>tests still pass in the updated stage numbering.
- Docs: the incremental docs in
docs/dashboard.mdandknowledge-retrieval-trace.mdmatch the rendered strings and the matching rule (exact path/kind/digest, round unknown, pending included).
Non-blocking notes:
- The author reports 8 to 12 failures in the full local suite. All are reported as failing on the base revision too, or passing on rerun with an isolated temporary directory. I did not verify this independently.
- The change adds the selection reason to the
--alternativehelp text only for benchmark and AB/BA campaigns. Other campaign kinds fail with an error rather than silently ignoring the flags, which is the safer behaviour. - This approval covers the dashboard and declaration paths. It does not cover the GLM-Image performance conclusions in #668 or the final acceptance of #662.
Governing Issue and delivery slice
Refs #662
The issue owner accepted the managed submission flags and the bottleneck analysis stage for this PR. Scope decision on #662
Older managed campaigns retained each local capture's path, kind and SHA-256 in the submitted candidate snapshot. They did not record when the query ran. Round decisions omitted these captures even when the retained file and its submission reference agreed.
The dashboard now matches the complete local reference against completed and pending round submissions. A single capture can appear on several rounds as “Snapshot available at submission.” Its retrieval round stays unknown. Numbered retrievals keep their recorded round. The candidate's declared knowledge use and alternatives continue to come from their respective evidence.
Latest GLM-Image figures
Shared M-RoPE tables, Round 1. At 14:21 UTC+8 on November 25, both quality runs had passed. The first timed baseline recorded 57.96 s/image. Its paired candidate measurement was still pending. The figure shows the median of two fixed prompts for each recorded step. The campaign had yet to record a round score or an independent final result.
Packed Q/K rotation, a separate follow-up run. This five-column dashboard from PR head
1c235ecshows the measured bottleneck, six knowledge hits, two alternative approaches and the reason for trying packed Q/K rotation. The candidate was awaiting assessment when captured. Frozen comparison protocolRound bottleneck analysis
The first column shows the bottleneck and measurement summary recorded by
campaign diagnose. A submitted candidate or a numbered retrieval links the diagnosis to its round. Diagnoses without a recorded round remain available under Round not recorded. For reviewed optimization traces, the dashboard shows the conclusion and timed scope when the profile digest matches the recorded source.In the GLM-Image example, one 512 × 512 baseline request with four diffusion steps took 77.97 s. AR image-token generation took 76.65 s and diffusion took 1.31 s. The baseline code recomputes the M-RoPE position tables in 40 decoder layers. The adjacent query seeks evidence for reusing those tables across layers. The timing identifies the dominant stage. The original stock baseline image failed the contrast check, leaving the end-to-end effect of sharing the tables INCONCLUSIVE.
Submitted alternatives and selections
Managed benchmark and AB/BA round submissions retained the hypothesis and optional strategy. The live dashboard omitted both fields from pending candidates and had no submission field for other options. Stage 03 now lists the option submitted for the round and any alternatives declared with repeated
--alternativearguments. Stage 04 shows the candidate, hypothesis, strategy and optional--selection-reasonduring evaluation and after settlement. The execution verdict remains in Stage 05.On the GLM-Image M-RoPE campaign, the updated dashboard shows the plan to compute position tables once per forward pass and share them across decoder layers. Stage 02 shows six knowledge hits for this round. The round has one submitted candidate. The author did not record other options or an explicit selection reason at submission.
Historical four-column Round 1 example at
5058434In this GLM-Image run, the dashboard at
5058434recovered the local knowledge snapshot linked tocandidate-001at submission.View the archived four-column RMSNorm screenshot at
5058434.Checks on the previous retrieval change at
5058434Checks on the submitted-choice change
Checks on the bottleneck-analysis change
src,testsandtools. The focused dashboard, managed-session and project-explanation tests had 172 passes and one skip. The generated offline example matched its fixture.mainparent (6294970). The remaining four cases (three Qwen validation tests and a skill-evaluation path check) passed on both revisions when rerun using the physical path to the temporary workspace.Review follow-up
The dashboard and retrieval guides now document exact submission matching for older snapshots and the unknown retrieval round. Ruff passed. All 31 focused tests passed, including the legacy matching regression, pending and settled declarations, the Chromium round-decision tests and dashboard plugin packaging.
Anchors touched: none
Knowledge authorship declaration
The requester retains issue acceptance. Independent review is pending.