Repository navigation
Add scoped report email drafts and redacted evidence packs - #1881
MeatChen21 wants to merge 10 commits into
Conversation
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review: #1881 at a05588d (base d4103c2)
This PR adds two local flows: the terminal report panel can preview the exact report.md and diagnostics.json from a plan before generation, and can open a prepared email draft that contains only the selected purpose and the ZIP digest. The evidence packer turns an exported Timeline into a two-file pack with deterministic stand-ins, a local review file, an audit pass, and a local receipt. I reviewed the full main...head diff, the Report and evidence-pack contracts, and the complete existing thread history.
Verdict: APPROVE. I found no blocking defect at this head. The merge tree with origin/main at d4103c2 is clean; the generated module graph passes; the targeted tests below pass. CI verify was still running when I checked.
What holds
- Report preview and email. The panel starts with redaction on (
crates/dim-cli/src/ui/report_panel.rs:82), and the first plan is created redacted (crates/dim-report/src/draft.rs:233-234). Toggling redaction or editing options clears the old plan and requests a new one before the preview can be shown (crates/dim-cli/src/ui/report_panel.rs:300-318). Generation is available only with a current draft; the email path requires the generated files to equal the planned files (crates/dim-cli/src/ui/report_panel.rs:131-144). The draft contains the scope and SHA-256 only, never report text or a local path in the URI (crates/dim-cli/src/report.rs:227-253;crates/dim-cli/src/ui/report_panel.rs:402-432). - Redaction and bounding. Conversation selection uses a 32-event window, at most six excerpts, 2048 bytes each, and 8192 bytes total (
crates/dim-report/src/conversation.rs:12-14,crates/dim-report/src/conversation.rs:179-209);appendenforces the 64 KiB source cap before matching. CRLF and lone CR are normalized before rendering (crates/dim-report/src/conversation.rs:226-229), which closes the earlier #1826 line-ending blocker. Recognized credentials are masked in both redaction modes, and a failed replacement shows[excerpt withheld], never the original as a redacted result (crates/dim-report/src/conversation.rs:193-204). The conversation appears only inreport.md;diagnostics.jsonand both sharing bodies omit it (crates/dim-report/src/render.rs:233-252,crates/dim-report/src/render.rs:277-293). - Evidence pack. One trusted
dimcode evidence-redactprocess handles all matching (benchmarks/usercases/pack.py:866-890); the packer never sends originals to another service. The packer preserves session links, unit identity, and stream boundaries; the audit rereads the written Timeline and checks content, identifiers, placeholders, stream joins, and secrets (benchmarks/usercases/pack.py:682-775). The local review file lists kept content, replacements and candidates, omitted units, external files, and the exact manifest (benchmarks/usercases/pack.py:797-847). Rebuilds verify the receipt, refuse extra files or symlinks, and follow the documented "clear the verified old pack, then generate" order (benchmarks/usercases/pack.py:930-962;docs/eval/evidence-pack.md:230).
Optional P3 notes
P3-1: A text unit that begins with NUL can collide with an object unit
Scan stores text units under their raw content and object units under "\0" + canonical(value) (benchmarks/usercases/pack.py:431-450). A user or model message that begins with U+0000 followed by the canonical JSON of a typed object therefore shares one key. Packer.visit then applies that unit's keep or stub decision to the text (benchmarks/usercases/pack.py:623-629), and review and audit treat every NUL-prefixed key as an object and call json.loads on it (benchmarks/usercases/pack.py:688-690, benchmarks/usercases/pack.py:810-812). If the text after the NUL is not valid JSON, a valid export ends with a JSON error after the timeline was written; if it is valid JSON, the text can inherit the object's decision. This needs unusual input, so it is optional; separate the two namespaces or escape text keys.
P3-2: report.md still passes C0 control characters through
conversation::guarded normalizes CRLF and lone CR but leaves ESC and other C0 controls unchanged (crates/dim-report/src/conversation.rs:226-229), and report.md writes each excerpt line raw (crates/dim-report/src/render.rs:242-243). A model response containing an ANSI or OSC sequence can reach the file; inspecting it with unzip -p ... report.md or cat lets the terminal interpret the sequence. This is the same optional note that remained open on #1826 after its CR fix. Escape C0 controls other than newline and tab, or strip them, and cover one ESC case in the ZIP flow test.
Tests and CI
Ran with isolated HOME, TMPDIR, XDG paths, and CARGO_TARGET_DIR under dim-pr1881-data:
cargo build --locked -p dimcode: passed.cargo test --locked -p dim-report: 5 passed.cargo test --locked -p dim-cli --lib: 740 passed.cargo test --locked -p dimcode --test cli_flow report: 75 passed, 1 ignored; the ignored case requires a running production App Server.DIM_EVIDENCE_DIMCODEpointing at the built debugdimcode:python3 -m unittest benchmarks.usercases.pack_flow_test: 52 passed.cargo fmt --all -- --check: clean.cargo clippy --locked -p dim-report --all-targets -- -D warnings, and the same fordim-clianddimcode: clean.cargo run --locked -p xtask -- check: 744 modules and 4531 edges; plugin documents, service catalog, declarations, locks, and comment links passed.node scripts/adr-check.mjs: ADR freeze passed (22 changed files).- Mutation check: removing the receipt verification from
clear_previousmadetest_a_receipt_does_not_authorize_unknown_or_modified_filesfail with "Refused not raised"; the file was restored and the worktree is clean.
CI at a05588d: changes, dependencies, web, and windows-cli pass; acp-registry is skipped; verify is in progress. I did not wait for it.
Previous threads
There are no review threads or issue comments at this head, so there is nothing to reply to.
Unverified
- The pending CI
verifyjob and the full workspace test suite. - A real PTY run of both terminal modes, a real mail handler, and actual GitHub or Discord sharing; I checked the state transitions and URL construction, and ran the synthetic flow tests.
- Non-macOS platforms and a Windows build; CI reports windows-cli passing, but I did not build that target locally.
- A live session with a real vendor export and real credential material; the pack tests use synthetic data and a locally built
dimcode. - Crash or power-loss behavior around the packer receipt; I read the recovery checks but did not inject failures at those points.
eric8810
left a comment
There was a problem hiding this comment.
Reviewed at head a05588d.
This continues #1826 the way that change set it up. The preview shows the exact local files in both interfaces and the redaction toggle applies replacements to the same bounded excerpts, so what a user reads is what the ZIP will contain; recognized credentials are masked in either mode, which is the right default — turning redaction off should not start leaking a token that the detector already knows.
The email draft stays narrow: it is opened only on request and carries the selected purpose and the attachment digest, not the conversation and not a local path. That matters because the draft leaves the machine through a mail client's query string, and a path or an excerpt there would be a second egress path the report contract never sanctioned.
The evidence packer is the part I read most closely, and it fails the way a tool that rebuilds a directory of anonymized sessions has to: consent_of refuses a missing or malformed consent block, refuses provider entries that look like credentials, refuses a regression pack with no provider named, and refuses an expiry that is malformed, not a real date, or already past. Refusing to remove files it cannot verify during a rebuild is the same posture — an unverified file is evidence, and deleting it silently would destroy the thing the pack exists to preserve.
Blocking: none.
Checks are green at this head. I read the draft construction, the mailto composition, the consent validation and the preview/redaction path; I did not read the whole packer or its Python tests, and I ran nothing.
Non-blocking: none.
zerob13
left a comment
There was a problem hiding this comment.
The default report inclusion and the evidence pack's level-one classification need to preserve their disclosure boundaries. The email flow also needs a recovery path for the already generated attachment. Details are inline.
I checked the current head and merged it locally with the current main tip. The merge was clean and the affected code was unchanged. GitHub PR check 44508332017 passed. The 52 offline pack flow tests passed using a helper compiled from this head's Rust redaction source, and a separate synthetic run confirmed the classification finding. The default-report and email recovery findings follow from the source call chains.
codoggy
left a comment
There was a problem hiding this comment.
Reviewed a05588dbd2b385d6ff4b4380bad63f7e7f41041d against merge-base d4103c2cd8981b4ca8f47bad49dedbc326d03168.
The three blocking findings below are already present as unresolved threads from zerob13; I am consolidating them here rather than opening duplicate inline comments.
[P1] Preserve the diagnostics-only default from #1826. crates/dim-report/src/render.rs:131-134 includes conversation excerpts whenever Timeline evidence is present, even with the default redacted plan. The generated report.md writes those excerpts at render.rs:233-243. With the untouched default /report flow and Timeline selected, recent conversational prose is included even though identifier/credential redaction does not make arbitrary confidential prose safe to disclose. Require an explicit user choice before including conversation excerpts. Existing thread: discussion_r4628090399.
[P1] Omit submit-check/runtime context from level-one packs by default. crates/dim-report/../../benchmarks/usercases/pack.py:440-450 keys text units by raw text regardless of semantic source. The input queue appends injected runtime blocks after the operator’s own user.content; visit then applies the higher-precedence user-input keep decision at pack.py:623-629. A normal input containing a runtime/hook block can therefore retain that injected context in both the user message and later model-request copies, contrary to the level-one disclosure boundary. Classify injected blocks before applying unit precedence and add a regression that both copies are omitted unless explicitly kept. Existing thread: discussion_r4628090424.
[P1] Keep an email recovery action after generation or Save failure. crates/dim-cli/src/ui/report_panel.rs:334-344 exposes only Save/Preview/share/Close controls on the generated-result page, while the email path saves the ZIP inside open_email at report_panel.rs:407-414. If saving fails after Open email draft, or the user generates/saves/inspects before deciding, the result page can retry Save ZIP but cannot reopen the email/manual-composition flow with the same attachment. Keep an email action available while the generated files still match the plan, reuse the saved attachment, and make manual details reopenable. Existing thread: discussion_r4628090439.
GitHub checks currently show verify, ci-ok, web, windows-cli, dependencies, and changes successful; acp-registry skipped. This is a consolidation of existing blocking findings, not three new duplicate threads. Validation was read-only merge-base diff, call-path, tests, review history, and CI inspection; I did not run PR code, builds, tests, or TUI/mail handlers.
codoggy
left a comment
There was a problem hiding this comment.
Reviewed current head b410496751a4fa74179f6dea99bf9ba2280d0b60 against its actual merge base df0482c2ebcca67d1ffe0e45f193c57b8f3abea2. The PR is still open, non-draft, and authored by a MEMBER.
[P1] Keep ordinary conversation out of the default report
With Timeline evidence selected, render.rs still selects conversation excerpts and writes them into report.md even when the default plan has redaction enabled. This makes ordinary confidential prose part of the attachment without an explicit inclusion choice; redaction of identifiers/credentials does not make arbitrary conversation safe to disclose. The changed RPC test also expects the prompt in both the default plan and generated report. Please default conversation inclusion to off independently of redaction, and assert that the prose is absent from both preview and ZIP until the user opts in. See the existing thread: #1881 (comment)
[P1] Do not classify injected runtime blocks as operator input
input_queue.rs appends recognized runtime blocks to user.content, while benchmarks/usercases/pack.py classifies the entire field as user-input. The level-one precedence and later text lookup therefore keep the injected block in both the user message and model-request copies. Classify runtime blocks position-aware before assigning unit precedence, and add a regression proving operator prose remains while both injected copies are omitted unless explicitly kept. Existing thread: #1881 (comment)
[P1] Preserve the email recovery action after a save/generation failure
After generation, the report panel drops the draft and retains the generated report even if email preparation fails. If ZIP saving fails before composition details are set, the result page can retry Save but cannot open email afterward; Generate → inspect → Save has the same dead end. Keep an email/manual-composition action while the generated files still match the plan, reuse the saved ZIP when available, and cover save failure → successful retry → compose with the same digest. Existing thread: #1881 (comment)
[P1] Use identical Unicode folding for redaction rules and input
Rule construction lowercases the whole string, so İ expands to i plus a combining dot, while the input scanner emits one folded character per source character. A home path or account name containing İ can therefore miss its own rule, and the residue check repeats the same matcher. Use one folding procedure on both sides while preserving source offsets, and add a regression proving neither original sensitive value remains. Existing thread: #1881 (comment)
These findings are supported by the current source paths and existing review evidence; I did not run PR code, builds, tests, or a mail handler locally. GitHub Actions currently reports changes, dependencies, web, and windows-cli successful, acp-registry skipped, and verify queued/pending at the time of inspection. This is a REQUEST_CHANGES review bound to commit b410496751a4fa74179f6dea99bf9ba2280d0b60.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review: #1881 at b410496 (origin/main df0482c)
The PR adds a preview-first report flow, a local email draft, and an offline evidence packer that shares the report's redaction rules. The new head b410496 merges current main df0482c into the branch. The PR's own delta against df0482c is 22 files, +4562/-424. The merge resolution changes only crates/dim-report/src/evidence.rs, where it adopts DEFAULT_BRANCH_ID and keeps the branch's conversation module. The behavior is otherwise the code reviewed at a05588d.
Verdict: REQUEST_CHANGES. Four blocking findings remain at this head. My approval at a05588d missed them; this review supersedes that approval.
P1: Redaction misses home paths with Unicode case expansions
Problem. crates/dim-report/src/redaction.rs:191 lowercases each rule form as a whole. A capital dotted İ (U+0130) expands to i plus a combining dot (U+0307), so the folded rule has two characters for that source character. The input scanner at :245-249 folds one source character to one character, and its fold map maps İ to a single i. The rule and input lengths never match. has_residue at :305-307 uses the same matcher, so the residue check does not catch the original value.
Failure scenario. A user whose home is /Users/İsmail runs a report with the default redaction on. The generated report.md keeps the original home path and the account name. The redacted preview and the residue check both report success, so the user can save or email a ZIP that still contains the personal path.
Evidence. crates/dim-report/src/redaction.rs:191-209, :245-249, :305-307. A local probe against the public Replacements API replaced /Users/alice but left /Users/İsmail unchanged; the probe was removed after the run.
Fix. Apply one folding procedure to both the rule and the input while retaining source offsets, rather than lowercasing the rule as a whole. Add a regression with a home path and account name containing İ, asserting that neither the original path nor the account name appears in the redacted output. This is the same path as codoggy's thread r4630894519.
P1: The default report includes conversation excerpts with redaction on
Problem. crates/dim-report/src/render.rs:131-135 adds conversation excerpts whenever Timeline evidence is present, independent of an inclusion choice. The default plan is prepared at prepare time, before the redaction toggle is applied. crates/dim-cli/src/ui/report_panel.rs:82 starts redaction checked, but redaction only replaces identifiers; it does not change which messages are selected. The only omit directive that drops conversation is omit timeline at render.rs:90, so a user cannot keep Timeline records and exclude prose.
Failure scenario. The old contract on main (docs/design/plugins/Report.md:57) promised that with redaction on, Generate then Save ZIP produces diagnostics only. At this head, Report.md:57 and :70 instead document that the default plan includes excerpts and that redaction does not change the selection. A user who runs /report, accepts the default plan, and saves or emails the ZIP now attaches up to six recent user and assistant messages. Identifier replacement does not make arbitrary confidential prose safe to disclose, and the default no longer preserves the diagnostics-only boundary from #1826.
Evidence. crates/dim-report/src/render.rs:131-135, :90; crates/dim-report/src/conversation.rs:24-30; crates/dim-cli/src/ui/report_panel.rs:82; docs/design/plugins/Report.md:57, :70. Existing thread r4628090399.
Fix. Add an explicit conversation inclusion choice that defaults to off, independently of redaction. Assert in the report flow test that the prose is absent from both the preview and the ZIP until the user opts in. This is the boundary zerob13 and codoggy describe.
P1: Injected runtime blocks are kept as operator input in level-one packs
Problem. benchmarks/usercases/pack.py:200-201 maps input/message.user.content through content("user-input"), and content at :88-90 classifies every text block in the list as user-input. crates/dim-agent-capabilities/src/input_queue.rs:611-627 appends submit-check context blocks after the operator's own content, inside the same user.content list. Those blocks are runtime marker elements by the producer's precondition. The unit rank at pack.py:431-450 keeps the highest-precedence kind, and user-input outranks injected, so the injected text survives in a level-one pack and in later model-request copies.
Failure scenario. A hook or submit check adds a runtime block containing a working directory, home path, environment detail, or other context to an operator input. A level-one evidence pack keeps that block without an explicit keep decision, even though the packer already classifies the separate blocks field as injected and omits it by default. The pack then carries context the operator did not write and did not approve for disclosure.
Evidence. benchmarks/usercases/pack.py:88-90, :200-201, :431-450; crates/dim-agent-capabilities/src/input_queue.rs:611-627. Existing thread r4628090424.
Fix. Classify content blocks position-aware before applying unit precedence: the first block is operator input, later runtime marker blocks are injected. Alternatively strip runtime_context blocks from user.content before the walk. Add a regression where an input with a runtime block keeps the operator prose but omits both injected copies unless explicitly kept. This is the boundary zerob13 and codoggy describe.
P2: The generated result page cannot reopen the email flow
Problem. crates/dim-cli/src/ui/report_panel.rs:334-344 gives the generated result page Save, Preview, GitHub or Discord after save, and Close. It has no email action. open_email at :402-433 is reachable only before generation through focus 4 at :314-321, or through email_pending when generation completes at :139-144. If save_zip fails inside open_email, the note reports the save failure and the generated report stays, but the result page can only retry Save. After a successful retry it still has no email action. Generate, inspect, then Save has the same dead end.
Failure scenario. A user selects Open email draft, the ZIP save fails because of a full disk or a permissions problem, and the user retries Save successfully. The user can no longer open the mail composer or see the manual composition details for the same generated ZIP without starting a new report and regenerating it.
Evidence. crates/dim-cli/src/ui/report_panel.rs:128-144, :300-321, :334-344, :402-433. Existing thread r4628090439.
Fix. Keep an email or manual-composition action on the result page while the generated files still match the plan, reuse the saved ZIP when present, and show the manual details after a save or handler failure. Cover save failure, successful retry, and compose with the same digest. This is the recovery path zerob13 and codoggy describe.
Merge and cross-PR checks
- The merge commit's parents are a05588d and df0482c; the merge base is df0482c.
git diff df0482c2..HEADis 22 files, +4562/-424. - The branch merge conflicts in
crates/dim-report/src/evidence.rs. The resolution differs from a clean merge only in that file: it adoptsDEFAULT_BRANCH_IDand keeps the branch's replacement of main'scapture_conversationhelper withconversation.rs. No references to the removed helper remain. git merge-tree --write-tree HEAD origin/mainequals HEAD's tree28bc666a(clean).- No conflict with the open PRs checked. #1858 is the only other open PR that touches
docs/design/plugins/Report.md; it adds a pre-migration note at the top, andgit merge-tree --write-tree b4104967 origin/pr-1858is clean (tree4cc20b9f). The generated module graph passes xtask, so it is fresh for the merged tree.
Verification
cargo fmt --all -- --check --config error_on_line_overflow=true: exit 0.cargo test --locked -p dim-report: 5 passed.cargo test --locked -p dimcode --test cli_flow report: 76 passed, 1 ignored.python3 -m unittest ... pack_flow_test.py: 52 passed.cargo run --locked -p xtask -- check: passed (744 modules, 4557 edges).node scripts/adr-check.mjs --base origin/main: ADR freeze passed (22 changed files).git diff --check: clean.- CI at b410496: changes, dependencies, web and windows-cli pass; verify is pending; acp-registry skips.
Optional P3 notes
benchmarks/usercases/pack.py:431-450: a text unit is keyed by raw text while an object unit is keyed by NUL plus canonical JSON, so a text beginning with NUL and canonical JSON can collide with the object key. Unusual input, optional.crates/dim-report/src/render.rs:242-243:report.mdwrites conversation lines raw.guardednormalizes CR but not other C0 controls or ESC, so a terminal that displays the saved file can interpret an escape sequence. The preview escapes controls, but the ZIP member does not.
Threads
I agree with zerob13 and codoggy on the conversation default, the injected block boundary and the email recovery. The Unicode finding is confirmed by the probe above. The existing threads cover the same lines, so this review adds no duplicate inline comments and no reply.
Unverified
- The pending verify job.
- A real mail handler and the full TUI end-to-end flow.
- The full workspace suite beyond the targeted report, CLI report and pack tests.
eric8810
left a comment
There was a problem hiding this comment.
Reviewed at head b410496.
The delta since a05588db is main merged in plus the one adaptation that merge required: crates/dim-report/src/evidence.rs now names the root through DEFAULT_BRANCH_ID instead of the "main" literal, in the two places it reads the tree. That is the right constant for it — the report anchors on the root's line, not on a Session's movable default — and it is the substitution #1848 exists to make mechanical.
Nothing else in the change moved: the redaction defaults, the draft carrying the purpose and digest rather than the conversation or a path, and the packer's consent validation are as I read them at a05588db, where my review stands.
Blocking: none.
Checks are green at this head. I read the merge's only own-file hunk; I did not re-read the rest of the diff or run anything.
Non-blocking: none.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review at b8e3e77e (origin/main 31d100f4).
The PR adds a preview-first report flow, a local email draft, and an offline evidence packer that shares the report's redaction rules. The new head b8e3e77e merges main 31d100f4 into b4104967. The PR's own delta remains 22 files, +4562/-424. The merge does not touch the code finding sites; their diffs from b4104967 are empty. It adds a pre-migration note at the top of docs/design/plugins/Report.md and unrelated main changes; the cited contract lines are unchanged. The merged tree adds modules and edges, and the generated catalog was not regenerated.
Verdict: REQUEST_CHANGES. The four prior blocking findings remain, and the merged tree has stale generated architecture files.
P1: Redaction misses home paths with Unicode case expansions
Problem. crates/dim-report/src/redaction.rs:191 lowercases each rule form as a whole. A capital dotted İ (U+0130) expands to i plus a combining dot (U+0307), so the folded rule has two characters for that source character. The input scanner at :245-249 folds one source character to one character, and its fold map maps İ to a single i. The rule and input lengths never match. has_residue at :305-307 uses the same matcher, so the residue check does not catch the original value.
Failure scenario. A user whose home is /Users/İsmail runs a report with the default redaction on. The generated report.md keeps the original home path and the account name. The redacted preview and the residue check both report success, so the user can save or email a ZIP that still contains the personal path.
Evidence. crates/dim-report/src/redaction.rs:191-209, :245-249, :305-307. The code is unchanged from b4104967, where a probe against the public Replacements API replaced /Users/alice but left /Users/İsmail unchanged.
Fix. Apply one folding procedure to both the rule and the input while retaining source offsets, rather than lowercasing the rule as a whole. Add a regression with a home path and account name containing İ, asserting that neither the original path nor the account name appears in the redacted output. This is the same path as codoggy's thread r4630894519.
P1: The default report includes conversation excerpts with redaction on
Problem. crates/dim-report/src/draft.rs:233 calls render::review(&snapshot, true, ""), and crates/dim-report/src/render.rs:131-135 includes conversation whenever Timeline evidence is present, independent of an inclusion choice. crates/dim-cli/src/ui/report_panel.rs:82 starts redaction checked, but redaction only replaces identifiers; it does not change which messages are selected. The only omit directive that drops conversation is omit timeline at render.rs:90, so a user cannot keep Timeline records and exclude prose.
Failure scenario. Main's contract at docs/design/plugins/Report.md:59 promises that with redaction on, Generate then Save ZIP produces diagnostics only. At this head, the same paragraph at Report.md:59 instead documents that the dialog previews the selected excerpts, :72 says redaction does not change which messages are selected, and :80 says conversation is selected at prepare time. The test at crates/dim-report/tests/report_flow.rs:789-803 now asserts that the default report.md contains the prompt. A user who runs /report, accepts the default plan, and saves or emails the ZIP now attaches up to six recent user and assistant messages. Identifier replacement does not make arbitrary confidential prose safe to disclose, and the default no longer preserves the diagnostics-only boundary from #1826.
Evidence. crates/dim-report/src/draft.rs:233; crates/dim-report/src/render.rs:131-135, :90; crates/dim-report/src/conversation.rs:24-30; crates/dim-cli/src/ui/report_panel.rs:82; docs/design/plugins/Report.md:59, :72, :80; crates/dim-report/tests/report_flow.rs:789-803. Existing thread r4628090399.
Fix. Add an explicit conversation inclusion choice that defaults to off, independently of redaction. Assert in the report flow test that the prose is absent from both the preview and the ZIP until the user opts in. This is the boundary zerob13 and codoggy describe.
P1: Injected runtime blocks are kept as operator input in level-one packs
Problem. benchmarks/usercases/pack.py:200-201 maps input/message.user.content through content("user-input"), and content at :88-90 classifies every text block in the list as user-input. crates/dim-agent-capabilities/src/input_queue.rs:611-627 appends submit-check context blocks after the operator's own content, inside the same user.content list. Those blocks are runtime marker elements by the producer's precondition. The precedence table at pack.py:43-45 ranks user-input above injected, and unit at :431-438 keeps the highest-precedence kind, so the injected text survives in a level-one pack and in later model-request copies.
Failure scenario. A hook or submit check adds a runtime block containing a working directory, home path, environment detail, or other context to an operator input. A level-one evidence pack keeps that block without an explicit keep decision, even though the packer already classifies the separate blocks field as injected and omits it by default. The pack then carries context the operator did not write and did not approve for disclosure.
Evidence. benchmarks/usercases/pack.py:88-90, :200-201, :43-45, :431-438; crates/dim-agent-capabilities/src/input_queue.rs:611-627. Existing thread r4628090424.
Fix. Classify content blocks position-aware before applying unit precedence: the first block is operator input, later runtime marker blocks are injected. Alternatively strip runtime_context blocks from user.content before the walk. Add a regression where an input with a runtime block keeps the operator prose but omits both injected copies unless explicitly kept. This is the boundary zerob13 and codoggy describe.
P2: The generated result page cannot reopen the email flow
Problem. crates/dim-cli/src/ui/report_panel.rs:334-344 gives the generated result page Save, Preview, GitHub or Discord after save, and Close. It has no email action. open_email at :402-433 is reachable only before generation through focus 4 at :314-321, or through email_pending when generation completes at :139-144. If save_zip fails inside open_email, the note reports the save failure and the generated report stays, but the result page can only retry Save. After a successful retry it still has no email action. Generate, inspect, then Save has the same dead end.
Failure scenario. A user selects Open email draft, the ZIP save fails because of a full disk or a permissions problem, and the user retries Save successfully. The user can no longer open the mail composer or see the manual composition details for the same generated ZIP without starting a new report and regenerating it.
Evidence. crates/dim-cli/src/ui/report_panel.rs:128-144, :300-321, :334-344, :402-433. Existing thread r4628090439.
Fix. Keep an email or manual-composition action on the result page while the generated files still match the plan, reuse the saved ZIP when present, and show the manual details after a save or handler failure. Cover save failure, successful retry, and compose with the same digest. This is the recovery path zerob13 and codoggy describe.
P2: The merged tree has stale generated architecture files
Problem. After the main merge, target/debug/xtask check fails with docs/architecture/rust-agent/generated/catalog.md: catalog table is stale; run cargo run -p xtask -- graph. The merged code has 745 modules and 4565 edges, up from 744 and 4557 at the prior head. catalog.md:63 still lists sqliteStorage as a data face with the old method set, and :102 still lists treeCommands with defaultBranch and setDefaultBranch; docs/architecture/rust-agent/generated/app-server/services.json is also stale. The PR diff updates modules.json and modules.mmd but not these files.
Failure scenario. The CI verify job runs xtask check and will fail on the stale catalog, so the PR cannot merge until the generated files are committed. A reader of catalog.md also sees the pre-merge service surface, which no longer matches the merged code.
Evidence. target/debug/xtask check at b8e3e77e: catalog.md: catalog table is stale; 745 modules, 4565 edges. Running xtask graph at this head changes the sqliteStorage and treeCommands rows in catalog.md (four diff lines) and removes six service entries from app-server/services.json; no other generated file changes. I restored those files after inspection.
Fix. Run cargo run -p xtask -- graph after merging main and commit the updated catalog.md and app-server/services.json with the PR.
Merge and cross-PR checks
- The merge commit
b8e3e77ehas parentsb4104967and31d100f4; the merge base is31d100f4. The PR's own delta is 22 files, +4562/-424. git diff b4104967..HEADfor the four finding sites is empty. The main merge only adds the pre-migration note indocs/design/plugins/Report.mdand unrelated main changes.git merge-tree --write-tree HEAD origin/mainis clean (cf77ec36).- No overlap with open #1891, #1895 and #1896; their files do not touch the report, redaction or packer paths.
git diff --checkis clean.
Threads
The existing threads 4628090399, 4628090424, 4628090439 and 4630894519 cover the first four findings, and none is addressed at this head. I added no duplicate inline comments and no reply; the main merge does not change their lines.
Verification
cargo fmt --all -- --check --config error_on_line_overflow=true: passed.git diff --check: clean.git merge-tree --write-tree HEAD origin/main: clean (cf77ec36).target/debug/xtask check: fails on stalecatalog.md(745 modules, 4565 edges).node scripts/adr-check.mjs --base origin/main: passed (22 changed files).- CI at
b8e3e77e:changes,dependencies,webandwindows-clipass;verifyis pending;acp-registryskips. The localxtask checkmeansverifywill fail unless the graph is regenerated. - I did not rerun the report, CLI report or pack tests at this head. The four code finding sites are unchanged from
b4104967, wherecargo test -p dim-report(5),cargo test -p dimcode --test cli_flow report(76 passed, 1 ignored) and the pack flow tests (52) passed. The new stale-graph finding is a generated-file failure, not a test failure.
Optional P3 notes
The two optional notes from the prior review remain unchanged and are not blocking: benchmarks/usercases/pack.py:431-450 can collide a text unit beginning with NUL plus canonical JSON with an object key, and crates/dim-report/src/render.rs:242-243 writes raw C0 and ESC controls into report.md while the preview escapes them.
Unverified
- The pending
verifyandwindows-clijobs. - A real mail handler and the full TUI end-to-end flow.
- The full workspace suite beyond the prior targeted report, CLI report and pack tests.
codoggy
left a comment
There was a problem hiding this comment.
The current head still has blocking disclosure and recovery issues, and the post-merge generated architecture artifacts are stale. This review is for the new head b8e3e77e2f4e9d3398e6cea27cc11b427d0bc322, after the branch merged main; it supersedes my earlier review on b410496751a4fa74179f6dea99bf9ba2280d0b60.
[P1] Keep ordinary conversation out of the default report
With Timeline evidence selected, crates/dim-report/src/render.rs:131-135 still includes conversation excerpts independently of the default redaction setting. The default report plan is prepared with redaction enabled, but redaction replaces identifiers; it does not make arbitrary confidential prose safe to disclose. The default /report flow can therefore put recent user/assistant prose into report.md without an explicit inclusion choice. Please make conversation inclusion an explicit option that defaults off, and assert that the prose is absent from both preview and ZIP until opted in. Existing thread: #1881 (comment)
[P1] Do not classify injected runtime blocks as operator input
crates/dim-agent-capabilities/src/input_queue.rs:611-627 appends runtime/submit-check blocks into the same user.content list as operator text, while benchmarks/usercases/pack.py:88-90,200-201 classifies every text block there as user-input. The level-one precedence then keeps injected context in both the user message and later model-request copies. Classify runtime blocks as injected before applying precedence, and add a regression that omits both copies unless explicitly kept. Existing thread: #1881 (comment)
[P1] Preserve the email recovery action after generation or save failure
crates/dim-cli/src/ui/report_panel.rs:334-344 gives the generated-result page no email/manual-composition action. open_email saves the ZIP as part of the pre-generation path (:402-433); after a save failure, or after Generate → inspect → Save, the page can retry Save but cannot reopen email with the same generated attachment. Keep the action while the generated files still match the plan, reuse the saved ZIP when present, and cover failure → retry → compose with the same digest. Existing thread: #1881 (comment)
[P1] Use identical Unicode folding for redaction rules and input
In crates/dim-report/src/redaction.rs:191-209, whole-string lowercasing expands capital dotted İ to i plus a combining dot, while the input scanner at :245-249 folds each source character to one character. A home path or account name containing İ can miss the rule, and has_residue at :305-307 uses the same matcher. Apply one folding procedure to both sides while retaining source offsets, and add a regression proving the original path and account name cannot remain in redacted output. Existing thread: #1881 (comment)
[P2] Regenerate the architecture catalog after merging main
The merged tree adds module/service changes, but the current generated architecture files are stale: docs/architecture/rust-agent/generated/catalog.md and docs/architecture/rust-agent/generated/app-server/services.json need regeneration (the stale catalog still describes the pre-merge sqliteStorage/treeCommands surfaces). Run the repository's canonical graph generation command and commit the resulting generated files.
Checks: On this head, changes, dependencies, web, and windows-cli passed; acp-registry was skipped; verify was still in progress when reviewed. Tests were not run locally, and I did not run PR code or build scripts. The four P1 findings remain on the current head; the generated-file issue is additionally introduced by the merge with main.
eric8810
left a comment
There was a problem hiding this comment.
Reviewed at head b8e3e77.
The change is unchanged since I approved it at b4104967: the only new commits are two merges of main into the branch. The redaction defaults, the draft carrying the purpose and digest rather than the conversation or a local path, and the packer's consent validation are as I read them, where that review stands.
verify and ci-ok failed on this head, in the test phase after the build and the rest of the suite, and the failing tests are not this PR's:
tests/integration/tests/minimal_execution.rs:462
an_occupying_burst_settles_while_a_background_job_runs
occupying_task_settles_when_the_output_bursts_past_the_retained_window
timed out waiting for both ends: settlement did not arrive by the 60 s ceiling;
1016588 bytes written, the last growth was this same poll
Both are the occupying-burst settlement pair: output past the retained window, settlement expected within 60 s, and the poll still growing when the ceiling hit. Nothing in crates/dim-report is on that path, so I read this as the burst tests being sensitive to a loaded runner or to a merge interaction rather than a defect this change introduced — and main's latest completed run (44670195469) is green, so it is not a settled failure there either. I am not calling it flaky without evidence and not approving over it: a re-run that comes back green at this head is what would settle it, and the prompt_guide assertion class of failure that #1914 hit is not present here.
Not approving while a required check is red.
Non-blocking: none beyond the above.
b8e3e77 to
c8400a9
Compare
eric8810
left a comment
There was a problem hiding this comment.
Reviewed at head c8400a9.
The delta since b8e3e77e is one merge of main; the report content is unchanged from the head I approved at b4104967, and that review stands.
verify and ci-ok failed on this head, at the architecture check and before the workspace tests:
web/src/chat-ui/WebChatTimeline.vue:34: `"main"` names neither the root nor the default branch;
write `ROOT_BRANCH_ID` or `DEFAULT_BRANCH_ID`, or name the use in `UNRELATED`
web/src/chat-ui/WebChatTimeline.vue:328: same
Neither line is this PR's: the file arrives from main, and the hit at 34 is variant?: "main" | "panel", a render variant rather than a branch. This is the repository-wide failure I described on #1920 — main has had no green run since 574861f3 — so every branch that includes main inherits it. The smallest fix is to rename the variant ("inline" / "panel"), which needs no UNRELATED entry.
I am not re-reviewing the report code for this, and not approving over a red check that is not about the change.
Non-blocking: none.
codoggy
left a comment
There was a problem hiding this comment.
Review summary
I reviewed the merge-base diff for c8400a90dfd90430a05d8ea1223000275620bf6e, focusing on what leaves the report by default, how the evidence pack classifies runtime text, and whether an email draft can reuse the attachment the user inspected. I found no blocking issues in that scope.
The four product issues from my previous review are addressed. The default preview and ZIP exclude conversation until the user opts in. The packer classifies recognized submit-check blocks after the operator’s input as injected, including copies in model requests. The result page retains email and manual composition after a save failure and verifies the saved ZIP against the generated bytes before reuse. The redactor now folds the rule and input consistently for /Users/İsmail without losing source offsets.
My earlier assessment that this PR introduced stale service-catalog artifacts was incorrect. The previous head’s CI checked the same tree as that head and reported service catalog passed; the current run reports that too. I’m withdrawing that concern.
Checks: Static inspection of the 23-file diff from 31d100f4, including the packer’s projection and output cleanup, the preview/ZIP opt-in assertions, the injected-block omission/explicit-keep tests, the save-retry/email flow, and the Unicode span and residue assertions. CI: changes, dependencies, windows-cli, and web passed. verify built and linted Rust and passed the module-boundary and service-catalog checks, then failed on two layout literals in WebChatTimeline.vue, outside this PR’s diff. The compiled workspace tests were skipped and ci-ok failed. Tests not run locally.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review at c8400a90 (origin/main dccb94fe, PR base fc460807).
The PR adds a preview-first report flow, a scoped local email draft and an offline evidence packer that shares the report's redaction implementation. The head is one commit on 31d100f4. It fixes the four code findings from the prior review and the generated-file failure. I found no remaining blocking defect.
Verdict: APPROVE.
Prior findings
The Unicode redaction finding is fixed. Replacements::new and matches now decode encoded scalars and fold both rule forms and input with fold_key (crates/dim-report/src/redaction.rs:254-272, :274-312, :314-363); has_residue reuses the matcher at :382-384. The İ special case maps all four I variants to one scalar, and the tests cover exact, encoded and boundary forms (crates/dim-report/tests/report_flow.rs:36, :101). cargo test -p dim-report passes 7 tests.
The conversation default finding is fixed. prepare calls render::review(&snapshot, true, false, "") (crates/dim-report/src/draft.rs:235); review includes conversation only when include_conversation is true (crates/dim-report/src/render.rs:132-136). The plan request has a default-false flag (draft.rs:140), the CLI sends it only when needed (crates/dim-cli/src/session_host/report.rs:47-49), and accept_plan rejects a plan with conversation when the user did not opt in (crates/dim-cli/src/ui/report_panel.rs:211-216). Tests cover the diagnostics-only default and the opt-in preview and ZIP (crates/dim-report/tests/report_flow.rs:927, crates/dim-cli/src/ui/tui.rs:19588).
The pack runtime-block finding is fixed. USER_CONTENT now walks input/message.user.content position-aware: the first block is user-input, later text blocks that open a runtime marker are injected (benchmarks/usercases/pack.py:265-273, markers at :81-86). The test covers the submitted copy, model-request copies, boundary variants, an image first block and explicit keep (benchmarks/usercases/pack_flow_test.py:373-437). python3 -I pack_flow_test.py with DIM_EVIDENCE_DIMCODE set passes 55 tests.
The email recovery finding is fixed. The generated result page keeps Email while the plan and generated files match, and MailDetails after a save (crates/dim-cli/src/ui/report_panel.rs:373-389). email saves if needed, reads back the saved ZIP and compares it to the generated bytes, then invalidates the page action on a missing or changed file (:456-505). The flow test covers preview save, save retry and same-digest composition (crates/dim-cli/src/ui/tui.rs:19857). cargo test -p dim-cli report passes 32 tests.
The generated-file finding is fixed. A clean cargo run -p xtask -- check passes with 745 modules and 4565 edges, including service catalog passed, service declarations passed, plugin locks passed and literal main passed (11 unrelated uses). The CI log at the merge commit also shows service catalog passed. The earlier catalog.md failure does not reproduce at this head.
CI and merge order
verify fails at this head's merge commit in the literal-main check, not in the PR code:
web/src/chat-ui/WebChatTimeline.vue:34: "main" names neither the root nor the default branch
web/src/chat-ui/WebChatTimeline.vue:328: "main" names neither the root nor the default branch
The file is not in this PR's diff. The base branch contains it, and the scanner allowlist still names the old path. Open #1924 updates xtask/src/literal_main.rs for the renamed file; its verify passes. ci-ok fails only because verify failed; changes, dependencies, web and windows-cli pass. Land #1924 first and let GitHub rebuild this PR's merge ref, or include its scanner change, before merging. This is a base-wide merge-order blocker, not a defect in this PR.
Verification
git diff --check origin/main...HEAD: clean.git merge-tree --write-tree HEAD origin/main: clean (db7bb35d).cargo fmt --all -- --check: passed.node scripts/adr-check.mjs --base origin/main: passed (23 changed files).cargo test -p dim-report: 7 passed.cargo test -p dim-cli report: 32 passed.cargo test -p dimcode --test cli_flow report: 76 passed, 1 ignored.python3 -I pack_flow_test.pywithDIM_EVIDENCE_DIMCODEset: 55 passed.cargo run -p xtask -- check: passed (745 modules, 4565 edges).- CI at
c8400a90:changes,dependencies,webandwindows-clipass;verifyandci-okfail on the literal-main issue above;acp-registryskips. - I did not open a real mail handler or run the full TUI end-to-end flow. I did not run the full workspace suite.
Optional notes
These do not block this PR.
- P3:
Replacements::addreturns when the lowercased original equals the lowercased label (crates/dim-report/src/redaction.rs:274-276). The home stand-in isprefix + "user".repeat(n)(:217-220), so a home such as/Users/useruserproduces an identical stand-in: neither the home rule nor the account rule is registered, andhas_residuereports the output clean. This needs an account name that is exactlyuserrepeated; choose a stand-in that differs even then, or register the account inunreplaced_accountsso the pack review warns about it instead of treating it as replaced. - The prior optional note remains: a text unit key beginning with NUL plus canonical JSON can collide with an object key (
benchmarks/usercases/pack.py:460-467). - The prior optional note remains:
report.mdwrites raw C0 and ESC controls from excerpts (crates/dim-report/src/render.rs:243-244) while the preview escapes them (crates/dim-cli/src/report.rs:143-151).
Verdict: APPROVE.
c8400a9 to
91e9cfd
Compare
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review at 91e9cfd4 (origin/main 68043df9, PR base 499d5906, merge base 31d100f4).
The PR adds the preview-first report flow, the scoped local email draft and the offline evidence packer. The head is the tree approved at c8400a90 plus one hunk in xtask/src/literal_main.rs; no product code changed. The prior fixes still hold and the targeted tests pass. I found no blocking defect.
Verdict: APPROVE.
The literal_main change
It is a CI unblock, not a product change. web/src/chat-ui/WebChatTimeline.vue comes from main and has two layout-variant "main" literals; the branch's scanner allowlist still names the removed TimelineView.vue path. The new entries at xtask/src/literal_main.rs:113-121 accept those two literals, and the array grows from 9 to 11 (:72). Nothing reads these entries at runtime.
I ran the merge-ref check on both trees GitHub may use:
- merge ref
c5da0d94(treec8529fe8, head into main499d5906):cargo run -p xtask -- checkpasses,literal main passed (11 unrelated uses). - merge with current main
68043df9(treea6c937ab): the same check passes, andcargo test -p xtask literal_mainpasses 36 tests.
Merge-order update and duplicate entries (P3, optional)
#1924 merged to main at 07:07:57 UTC as 68043df9 while this review ran, and its diff rewrites the two TimelineView.vue entries to WebChatTimeline.vue. The branch still carries the old entries at xtask/src/literal_main.rs:103-112 and now adds the same two new entries at :113-121, so the current-main merge tree has four WebChatTimeline.vue entries and no old path.
This is inert, not a failure. UNRELATED entries are matched per literal, and check never validates that an entry names an existing file or use, so stale and duplicate entries neither fail nor broaden a match. The merge is clean, the scanner tests pass, and the full check passes. The cost is dead configuration.
Failure scenario: if the PR merges as-is, main keeps two duplicate entry pairs; a later cleanup has to remove them, and a re-created TimelineView.vue would silently be covered by the stale entries. There is no current runtime effect.
Fix: when rebasing onto 68043df9, drop this hunk (main now passes the scanner on its own); if the PR is merged as-is, remove the duplicate pair in a follow-up. Do not block on it.
Scanner test coverage (P3, optional)
The focused test still uses the old path: xtask/src/literal_main.rs:2242 and :2249 call bounded("web/src/features/chat/TimelineView.vue", ...), and the fixture at :1891 does too. The new entries are exercised only by the repository-wide check, which I ran on both merge trees. #1924 updates the test path. This is a test-gap note, not a defect.
Prior findings rechecked
- Redaction: rules and input share the scalar decode and fold path (
crates/dim-report/src/redaction.rs:254-272,:314-363); the I variants share the special case at:258-261, andhas_residuereuses the matcher at:382-384.cargo test -p dim-reportpasses 7 tests, including the/Users/İsmailand encoded-form cases. - Conversation:
preparerenders withinclude_conversationfalse (crates/dim-report/src/draft.rs:235); the plan flag is#[serde(default)](:140) and only the request value is used (:319-324);reviewgates excerpts on it and on Timeline presence (crates/dim-report/src/render.rs:132-136). The CLI sends the flag only as needed (crates/dim-cli/src/session_host/report.rs:47-49), and the panel rejects a plan carrying conversation without the opt-in (crates/dim-cli/src/ui/report_panel.rs:211-216). - Pack:
USER_CONTENTclassifies the first block as operator input and later runtime-marker text blocks asinjected(benchmarks/usercases/pack.py:265-273); the test covers the submitted and model-request copies, an image first block and explicit keep (benchmarks/usercases/pack_flow_test.py:373-437). 55 pack tests pass. - Email: the result page keeps Email while plan and generated files match, and MailDetails after a save (
crates/dim-cli/src/ui/report_panel.rs:373-390);emailsaves if needed, verifies the saved bytes against the generated ZIP and invalidates the action on a mismatch (:456-506).report_result_email_reuses_zip_after_preview_save_or_save_retrypasses. - Generated files: the current-main merge tree reports 745 modules and 4565 edges, with
service catalog passed,service declarations passed,plugin locks passedandliteral main passed.
Optional P3 notes that remain
crates/dim-report/src/redaction.rs:274-276skips a rule when the lowercased original equals the lowercased label. For a home/Users/useruser, the stand-in is the same path, so neither the home nor the account rule is registered andhas_residuereports the output clean. Still pathological and nonblocking; choose a stand-in that differs even then, or report the account inunreplaced_accounts.benchmarks/usercases/pack.py:475and:651key text units by raw content while object units use"\0"plus canonical JSON. A text unit beginning with NUL that matches an object's canonical JSON collides;auditandreviewthen calljson.loadson it (:713-715,:836-837). The realistic outcome is a refused or crashed build, not a silent leak. Unchanged.crates/dim-report/src/render.rs:243-244writes excerpt lines with raw C0 and ESC controls intoreport.md, while the TUI preview escapes controls atcrates/dim-cli/src/report.rs:143-151. The saved file can carry terminal escapes when opened with another tool. Unchanged and optional.
Verification and CI
git diff --check origin/main...HEAD: clean.git merge-tree --write-tree HEAD origin/main(main68043df9): clean, treea6c937ab.cargo fmt --all -- --check: passed.node scripts/adr-check.mjs --base origin/main: passed (24 changed files).cargo test -p xtask literal_main: 36 passed; on thea6c937abmerge tree: 36 passed.cargo run -p xtask -- checkon the current-main merge tree: passed (745 modules, 4565 edges).cargo test -p dim-report: 7 passed.cargo test -p dim-cli report: 32 passed.cargo test -p dimcode --test cli_flow report: 76 passed, 1 ignored.python3 -I benchmarks/usercases/pack_flow_test.pywithDIM_EVIDENCE_DIMCODE: 55 passed.- CI at
91e9cfd4:changes,dependencies,webandwindows-clisuccess;acp-registryskipped;verifywas still queued when I stopped, soci-okis not reported yet. I did not wait. The check that failed at the prior head (literal main) passes locally on both merge trees. - I did not run the full workspace suite or a real mail handler.
Verdict: APPROVE.
codoggy
left a comment
There was a problem hiding this comment.
Review summary
I reviewed the merge-base diff for 91e9cfd4b2daa6f7f4ef3638ba98c90ec4f1e66e, focusing on default report disclosure, evidence-pack classification, email recovery, and the change since my previous review. I found no blocking issues in that scope.
Non-blocking note: The new entries at xtask/src/literal_main.rs:113–121 recognize the renamed component’s two layout literals. Live main now recognizes them too: the upstream fix moved the existing entries and updated their tests. When refreshing the branch, keep the upstream form so the report change does not need its own allowlist entries.
Checks: Static inspection: the 23 previously reviewed files have unchanged blobs; only the literal checker differs from the prior head. I rechecked the opt-in for conversation in preview and ZIP, omission of injected blocks from level-one packs, reuse of a verified attachment after a save failure, and consistent Unicode folding in the redactor. The previous fixes still hold. CI: changes, dependencies, windows-cli, and web passed; verify was queued when checked. Tests not run locally.
eric8810
left a comment
There was a problem hiding this comment.
Reviewed at head 91e9cfd.
This head is not the one I approved, and the deltas are in the direction the report contract wants. The conversation excerpts are now opt-in: PlanRequest carries includeConversation (defaulted false) and render::review only takes the excerpts when the client asks and a timeline exists, so the default report no longer carries the conversation at all — a smaller egress surface than the one I approved at b4104967, where redaction was the only gate.
The redaction side grew in the same spirit: an HTML-escaped form added to forms, and encoded_scalar decoding \uXXXX (including surrogate pairs) so a credential written as an escape sequence is recognised rather than passing as plain text. That is the direction a masking rule has to move — an escaper is a way to write the same secret — and it stays inside the existing term-and-form substitution rather than adding a second detector with its own rules.
I did not verify every line of the 77 added redaction lines or the packer's reworked flow, and I did not run anything; what I checked is that the two files that differ from my earlier approval changed in these two directions and not against them.
Blocking: none.
Checks are green at this head.
Non-blocking: none.
Keep the obsolete module graph snapshots removed while retaining live architecture checks.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review: #1881 at 1c535e2 (origin/main ffd3e11)
The PR adds the preview-first report flow, the session-scoped local email draft and the offline evidence packer that shares the report redaction code. The head merges the approved tree at 91e9cfd with main at 2537795. The merge preserved the PR content: the 22 files common to both deltas have identical patch IDs, and the tree still merges cleanly with ffd3e11.
Verdict: REQUEST_CHANGES. The product code, tests and merge are unchanged from the approved head. Two new eval documents contradict their own verification status; the fixes are documentation only. One review-aid gap remains optional.
P2: Evidence-pack contract contradicts its test status
docs/eval/evidence-pack.md:286 says compaction, images and sub-agents "在任何输入上都还没有试过" (not tried on any input). The same document at :272 says compaction trigger/result and collaboration recipients are checked at level one. The added flow test does check them: benchmarks/usercases/pack_flow_test.py:554 covers context/compaction and collaboration/*, and :427 covers an image block. Failure scenario: a maintainer reading the contract cannot tell which cases are covered and may under-test them or repeat work. Fix: rewrite the known-uncertainty sentence to say the synthetic flow test covers these event kinds and name the real-export gaps.
P2: Pipeline contract claims a test that does not exist
docs/eval/usercases-pipeline.md:325 says the four-row reading table and the eight-cell conclusion table are covered by a report flow test. At :284 the same document says this layer is not implemented. benchmarks/report/flow_test.py has no root-case reading test; no test reads source_issue or the k/k tables. Failure scenario: a maintainer assumes the analysis layer has coverage and relies on it. Fix: remove the bullet or mark it as a requirement for the future benchmarks/report implementation.
P3: Review candidates miss folders under a generic home
crates/dim-report/src/redaction.rs:202-216 skips a home whose account is generic (root, ubuntu, ...) before r.homes.push. review builds folder candidates only from replacements.homes (benchmarks/usercases/pack.py:845-846), while docs/eval/evidence-pack.md:162 promises directory names under the home. With home /home/ubuntu, a kept prompt containing /home/ubuntu/acme-customer/src leaves acme-customer out of the candidate list. Section 1 still shows the kept text, so this is a review-aid gap, not a silent release. Fix: collect folders from scan.homes as well as the stand-ins.
P3: Merge artifact, duplicate scanner entries
xtask/src/literal_main.rs:113-121 adds two WebChatTimeline.vue entries that main's #1924 now supplies at :103-112. The head has four entries for the same two literals. xtask check passes because entries are matched per literal, but the duplicates are dead configuration. Fix: drop the two added entries.
Prior optional notes
crates/dim-report/src/redaction.rs:274-276still skips a rule when the lowercased original equals the lowercased label. A home such as/Users/useruserproduces the same stand-in, so neither the path nor the account rule is registered andhas_residuereports the output clean. A short name such as/Users/usalso loses the path rule, but the account is at least listed inunreplaced_accounts. Pathological and optional.benchmarks/usercases/pack.py:475and:651still key text units by raw content while object units use NUL plus canonical JSON. A text unit beginning with NUL that equals an object's canonical JSON collides. The realistic outcome is a refused build, not a silent leak. Optional.crates/dim-report/src/render.rs:243-244still writes raw C0 and ESC controls intoreport.mdwhile the TUI preview escapes them (crates/dim-cli/src/report.rs:143-151). This code predates the PR; the PR changed the section heading, not the writing. Optional.
Merge and verification
git diff 253779557 1c535e2dshows only the 22 PR files. The 22 files common to both deltas have identical patch IDs; the approved delta's two generated module files are gone from main. No conflict markers. Main'stui.rs,docs/INDEX.md,Cargo.lockandxtask/src/literal_main.rschanges are present.git merge-tree --write-tree HEAD ffd3e116is clean. On the merged tree,cargo metadata --lockedandcargo check -p dim-report -p dim-clipass with rutis 0.23. The mergeddocs/INDEX.mdhas ADR 025/026 and both eval entries;Cargo.lockhas the regex dependencies and rutis 0.23.cargo check --all-targetson the merged tree did not finish because the target directory ran out of disk. This is an environment limit, not a code error.- Head tests:
cargo test -p dim-report7 passed;cargo test -p dim-cli report32 passed;cargo run --locked -p xtask -- checkpassed (745 modules, 4569 edges,literal main passed (11 unrelated uses));cargo fmt --all -- --checkclean;node scripts/adr-check.mjs --base origin/mainpassed (22 files);python3 -I benchmarks/usercases/pack_flow_test.pywith the builtdimcode55 passed. - CI at 1c535e2: changes, dependencies, web and windows-cli succeeded; acp-registry skipped; verify was still running when I checked.
- Not run: full workspace suite, TUI tmux suite, a real mail handler, and the merged-tree test-target compile.
Old findings
Withdraw the scanner-test-coverage P3 from the 91e9cfd review: main's #1924 updated the literal-main tests to WebChatTimeline.vue, and the head tests use the new path. Withdraw the merge-order blocker from the c8400a9 review: main's scanner fix is in the base and the head check passes. Keep the duplicate-entry P3: the merge kept both pairs. The redaction, conversation-default, pack-classification and email-recovery findings are fixed and still hold. The three optional notes above are unchanged, not newly real.
| 已知的不确定: | ||
|
|
||
| - 方法只对照过一份真实会话,它是单分支,没有 before trace、压缩、图片和子 agent。多分支与 | ||
| before trace 在合成输入里覆盖;压缩、图片与子 agent 在任何输入上都还没有试过。子 agent 的 |
There was a problem hiding this comment.
P2. This sentence contradicts the verification list at docs/eval/evidence-pack.md:272, which says compaction trigger/result and collaboration recipients are checked at level one. The added flow test does cover them: benchmarks/usercases/pack_flow_test.py:554 covers context/compaction and collaboration/*, and :427 covers an image block. A reader cannot tell which cases are covered and may under-test them. Fix: state that the synthetic flow test covers these kinds and name the real-export gaps.
| - 一个带合成材料的证据包走完撤回的四步,之后在任务树、结果目录和存储里都找不到它的内容。 | ||
| - 打包的验证见[证据包打包](evidence-pack.md#verification)。 | ||
| - 区分度证明的四种结果各有一个真实或构造的例子,结论与 §构建的表一致。 | ||
| - 读法表的四行与结论表的八格各由报告的 flow test 覆盖;输入是固定的结果文件,不调用模型。 |
There was a problem hiding this comment.
P2. This claims coverage for the reading and conclusion tables, but docs/eval/usercases-pipeline.md:284 says the layer is not implemented, and benchmarks/report/flow_test.py has no root-case reading test; no test reads source_issue or the k/k tables. A maintainer may assume the analysis layer is tested. Fix: remove the bullet or mark it as a requirement for the future implementation.
| | "codespace" | ||
| | "node" | ||
| ) { | ||
| continue; |
There was a problem hiding this comment.
P3. This continue skips the home before r.homes.push, so review's folder candidates (benchmarks/usercases/pack.py:845-846) never include directories under a generic home such as /home/ubuntu. docs/eval/evidence-pack.md:162 promises directory names under the home as candidates. A kept prompt with /home/ubuntu/acme-customer/src leaves acme-customer out of the list; section 1 still shows the text, so this is a review-aid gap, not a silent release. Fix: collect folders from scan.homes as well as the stand-ins.
| "variant?: \"main\" | \"panel\"", | ||
| "a layout variant's type", | ||
| ), | ||
| ( |
There was a problem hiding this comment.
P3. Main's #1924 now supplies these two WebChatTimeline.vue entries at xtask/src/literal_main.rs:103-112; these two added entries make four entries for the same two literals. xtask check passes because entries match per literal, but the duplicates are dead configuration. Fix: drop these two entries; main's pair is enough.
The preview, email draft and share strings were present in zh_cn only or in the other locale tables only, so the locale coverage check rejected the merged tree. Add the missing keys to every table.
eric8810
left a comment
There was a problem hiding this comment.
Reviewed at head e9bc91a.
Approving. The gate I named at 8cb7bd01 is closed: the one commit since then adds the report and email strings to all ten locales — de, es, fr, id, ja, ko, pt_br, pt_pt, zh_hant — and zh_cn gains the four that were missing there. static-checks, verify (linux), windows-cli and ci-ok are green at this head.
At this head I re-read the part that carries the risk, and it holds up. redaction.rs masks credentials first, then replaces each fact through six forms — the raw term and five encoded variants produced by encoded_scalar, scalars and step — so a session id that appears percent- or escape-encoded is removed too, not only its literal spelling. That is the difference between a redaction that reads well and one that holds when the evidence pack is opened by someone else. evidence.rs captures through capture/capture_session, gates the completed model output on include_completed_model, and gives each record a summary and a failure code from its event kind, so the pack says what kind of failure it is rather than only that one happened.
Blocking: none.
Checks are green at this head. Scope of what I read: the redaction.rs and evidence.rs shapes, the locale delta and the file list. I did not re-read the whole 30-file diff at this head, nor the locale strings themselves line by line, and ran nothing.
Non-blocking: none.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review: #1881 at e9bc91a (origin/main 82a91e6)
The PR adds the preview-first report flow, the Session-scoped email draft with a purpose and SHA-256 only, and the offline evidence packer that shares the report redaction code. This head is 8cb7bd0 plus one commit, e9bc91a, which completes the report and email strings in the nine non-zh_cn locales and restores four dropped keys to zh_cn.
Verdict: REQUEST_CHANGES. The locale blocker is fixed and every required check is green. One blocking finding remains: the conversation credential guard is a denylist, not fail-closed, and recognizable credentials still reach report.md and the ZIP in both redaction modes.
Blocking
P1. The credential guard still passes recognizable credentials (thread 4677997050)
Problem: guarded (crates/dim-report/src/conversation.rs:237-286) recognizes a credential by a field-name regex (:17-22) and a short SECRET regex (crates/dim-report/src/redaction.rs:14-21). Both modes use its output (conversation.rs:204-230), and the redacted path only adds the known home, session and identifier replacements plus SECRET residue detection (redaction.rs:390-392). A value that matches neither denylist is kept verbatim. docs/design/plugins/Report.md:81 promises that neither mode includes recognizable credentials.
Failure scenario: A user pastes a Stripe-style key (sk_...), a URL with userinfo credentials (https://alice:<secret>@internal.example/api) or a provider API key (AIza...) into a message, runs /report, opts into Include conversation, and saves or emails the ZIP. With Redact on or off, report.md and the ZIP contain the value. has_residue reports no residue, so the preview looks clean and the user can send an archive that holds a live secret.
Evidence: crates/dim-report/src/conversation.rs:237-286, :17-22, :204-230; crates/dim-report/src/redaction.rs:14-21, :390-392; docs/design/plugins/Report.md:81. A temporary unit test at this head (reverted) called guarded with a sk_... key, the URL above, a 40-character base64 secret and a bare Bearer token. All four came back unchanged and has_secret returned false; only the Authorization: header line was withheld. The locale-only commit does not touch this code.
Fix: Make the credential scrub an independent, fail-closed step that redact cannot relax, as thread 4677997050 asks. Withhold [excerpt withheld] when a line cannot be classified as safe, and add URL userinfo, sk_-prefixed keys and generic high-entropy token shapes to the trigger. Add regressions for these forms in both modes and in the plan files, the generated files and the ZIP member.
Fixed at this head
P1 locale parity (4679532855): fixed
Each of the ten chrome.rs tables now holds the same 622 keys. The nine non-zh_cn locales gained the 31 report keys, and zh_cn regained the four keys the branch had dropped (Default: current-session diagnostics only., Email the ZIP to {email}, and the two Redact warnings). There are no extra keys and no duplicate arms; every {placeholder} set matches its source key; none of the 35 touched values is an English copy. cargo run --locked --offline -p xtask-check reports i18n keys passed (10 tables, 1110 literal keys, 67 key arguments without a literal). cargo test -p dim-cli --lib ui::i18n::tests passes 11 tests, and CI at e9bc91a is green on static-checks, verify (linux), windows-cli and ci-ok.
The four restored keys are unused at this head because the report panel rewrite replaced their call sites. Keeping them matches main and passes the check; removing them across all ten tables is a follow-up cleanup, not a blocker.
Prior opinions
Withdrawn:
- 4679532855 and the round 9 locale P1: fixed in e9bc91a.
- 4654171983 (folded credential continuation): fixed in 8cb7bd0 and unchanged here.
- Round 8 merge and Session default branch: fixed in 8cb7bd0;
crates/dim-report/src/evidence.rs:60and:201readtree.default_branch(). - 4628090399 (default conversation), 4628090424 (injected runtime blocks), 4628090439 (email recovery) and 4630894519 (Unicode folding): fixed and verified in earlier rounds.
- 4642567198, 4642567207 (eval document contradictions), 4642567215 (review folder candidates) and 4642567221 (duplicate literal entries): fixed at 77fbbf7.
- The b410496 stale generated catalog P2, the 91e9cfd scanner-test-coverage P3 and the c8400a9 merge-order blocker: fixed or withdrawn in earlier rounds.
- The b7136c2 cli_flow optional note: resolved; the branch has no net diff in those files.
Still open, optional:
- 4644159177 Windows folder candidates:
benchmarks/usercases/pack.py:846-847still appends only/, andcrates/dim-report/src/redaction.rs:233still pushes only the native-separator stand-in. - 4644159193 full case folding:
crates/dim-report/src/redaction.rs:272still usescase_fold_simple. - 4644159204 cookie hints and audit:
benchmarks/usercases/pack.py:54and:840-842still have no cookie field. - The older optional notes remain: the NUL text/object key collision at
benchmarks/usercases/pack.py:475and:651, raw C0/ESC inreport.mdatcrates/dim-report/src/render.rs:244, and the same-lowercase stand-in atcrates/dim-report/src/redaction.rs:283.
Report flow properties
The head adds no product code beyond locales. At e9bc91a, conversation remains opt-in and off by default (crates/dim-report/src/render.rs:132-136, crates/dim-cli/src/ui/report_panel.rs:211-217); preview and generation render the same files (crates/dim-report/src/draft.rs:146-169, :353); the mail URI carries only the selected purpose and the ZIP SHA-256 (crates/dim-cli/src/report.rs:214-256); and email re-reads the saved ZIP and compares it with the generated bytes (crates/dim-cli/src/ui/report_panel.rs:456-503).
Verification
Ran with LC_ALL=en_US.UTF-8 and isolated HOME, TMPDIR and XDG paths under dim-pr1881-data, with CARGO_TARGET_DIR under the same data directory:
cargo fmt --all -- --check: clean.cargo run --locked --offline -p xtask-check: passed.cargo clippy --locked --offline -p dim-cli --all-targets -- -D warnings: clean.cargo test -p dim-cli --lib ui::i18n::tests: 11 passed.cargo test -p dim-cli report: 37 passed.cargo test -p dim-report --test report_flow: 7 passed.- Locale audit: 622 keys per table, identical sets, no duplicate arms, placeholder sets match, no English copies among the 35 touched keys.
- CI at e9bc91a:
changes,dependencies,macos-native,scripts,static-checks,verify (linux),web,windows-cliandci-okpass;acp-registryis skipped. - The credential probe test was removed;
git statusis clean and no processes remain. - Pack flow tests were not rerun:
benchmarks/usercases/pack.pyandpack_flow_test.pyare unchanged since b7136c2, where 56 passed.
Merge and cross-PR
git merge-tree --write-tree origin/main HEADexits 0 at origin/main 82a91e6. The branch's last main merge is decc589, so main has moved since.- #2003 merges clean (
git merge-tree --write-tree HEAD refs/heads/review-pr2003exits 0). - #2095 rewrites
docs/design/plugins/Report.mdand conflicts there; whichever lands second needs a rebase. docs/INDEX.mdis also touched by #2155, #2141 and #2002, andCargo.lockby #2154 and #1306; no code conflict was found.
Unverified
- A real mail handler and a full TUI session; the mail path is covered by synthetic tests only.
- A real Windows or non-ASCII home for the packer.
- The full workspace suite.
Add Stripe, Google and AWS key prefixes to the shared secret pattern and withhold URL userinfo and long bearer tokens as credential-like lines. The shared pattern also covers the evidence packer. Unlabelled high-entropy strings stay out of the denylist because they are indistinguishable from hashes and identifiers; the preview remains the review boundary.
zerob13
left a comment
There was a problem hiding this comment.
This head adds coverage for the previously reported Stripe-style, Google, and AWS credentials, URL userinfo, and standalone bearer tokens. A standard proxy authentication header still reaches both report modes. Static review at d7165255.
| const WITHHELD: &str = "[excerpt withheld]"; | ||
| static CREDENTIAL_FIELD: LazyLock<Regex> = LazyLock::new(|| { | ||
| Regex::new( | ||
| r#"(?i)(?:^|[^a-z0-9_-]|\\[rn])(?:set-)?(?:cookie|authorization|x-api-key|api[_-]?key|[a-z0-9_-]*(?:password|passwd|credential|secret|token))(?:\\?["'`])?[ \t]*[:=]"#, |
There was a problem hiding this comment.
[P2] Withhold Proxy-Authorization credentials in both report modes. A copied Proxy-Authorization: Basic … line passes this guard. The hyphen before Authorization prevents the field match, and a Basic credential is outside the bearer and provider-token patterns. The same guarded() output feeds the preview and ZIP with redaction on or off, so the line can be shared verbatim. Recognize proxy-authorization as a credential field and extend recognized_credentials_are_withheld_from_both_conversation_modes to cover a synthetic Basic proxy header in the plan and archive.
There was a problem hiding this comment.
Fixed in 41ac8a2. Proxy-Authorization and PROXY-AUTHORIZATION are withheld in both modes, and the fixture at crates/dim-report/tests/report_flow.rs:1370 includes a synthetic Basic proxy header. Withdrawing the P2.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review: #1881 at d716525 (origin/main 82a91e6)
The PR adds the preview-first report flow, the Session-scoped email draft with a purpose and SHA-256 only, and the offline evidence packer that shares the report redaction code. This head is e9bc91a plus one commit, d716525, which adds credential prefixes, URL userinfo and bearer recognition to the conversation guard plus one regression test.
Verdict: REQUEST_CHANGES. The enumerated round 10 shapes are fixed, and the new test is a real regression, but the guard still passes labelled high-entropy credentials on common field names, so docs/design/plugins/Report.md:81 remains false for both modes.
Blocking
P1. The guard still passes recognizable labelled secrets (thread 4677997050)
Problem: guarded (crates/dim-report/src/conversation.rs:244-295) recognizes a credential line through CREDENTIAL_FIELD (:17-22) and masks SECRET values (crates/dim-report/src/redaction.rs:14-24). The field pattern requires the keyword (secret, token, credential, ...) to be the last word before the separator. Common names put a suffix after the keyword, so aws_secret_access_key = ..., AWS_SECRET_ACCESS_KEY=..., "aws_secret_access_key": "...", secret_key = ..., private_key = ... and provider-env names such as GROQ_API_KEY=gsk_... match neither the field pattern nor SECRET. Proxy-Authorization: Basic ... also misses because the authorization alternative needs a boundary that is not -. Both modes derive from guarded (:211-237), so those lines reach evidence.conversation, report.md and the ZIP verbatim, and has_residue (redaction.rs:392-394) reports clean.
Failure scenario: A user pastes an .env fragment or the AWS credentials file into a message, opts into Include conversation, and saves or emails the ZIP. Both redaction modes include aws_secret_access_key = <40-character secret> (also the JSON and environment spellings), secret_key = ..., private_key = ... or GROQ_API_KEY=gsk_... in the preview and the attachment. The field name labels the value as a credential, so this is not the unlabelled high-entropy case the commit declines.
Evidence: crates/dim-report/src/conversation.rs:17-22, :244-295, :271-278; crates/dim-report/src/redaction.rs:14-24, :26-32, :392-394; docs/design/plugins/Report.md:81. A temporary unit test at this head (reverted) called guarded with each line above; all came back unchanged, while x-api-key, X-Auth-Token and the new sk_/AIza/ASIA/userinfo/Bearer fixtures are withheld or masked. crates/dim-report/tests/report_flow.rs:1331 covers the enumerated shapes in both modes, in the plan, in the generated files and in the ZIP; it fails on e9bc91a at plan leaked <Stripe-shaped key> with redact=false, so the test is a genuine regression for those shapes, not for the labelled ones.
Fix: Match the keyword as an _-delimited segment and allow suffixes before the separator, or mirror benchmarks/usercases/pack.py:54; add explicit private[_-]?key, signing[_-]?key and proxy-?authorization coverage. Add the AWS, secret_key, private_key and provider-env shapes to the new fixture and assert they are withheld in both modes, in the plan, in report.md and in the ZIP.
Prior opinions
Withdrawn at this head:
- The strict fail-closed demand in 4677997050. Withholding every line that cannot be proven safe would empty the opt-in conversation feature; the documented boundary is recognized credentials plus preview review. Withdrawn as a mechanism, not as a coverage requirement.
- The claim that redaction off bypasses the credential guard:
guardednow feeds both vectors (crates/dim-report/src/conversation.rs:211-237), and the new test asserts both modes and the ZIP. - Three of the round 10 probe shapes: the Stripe-style key, URL userinfo and the long bare Bearer are now recognized, and the commit also adds Google
AIzaand AWSASIA. The unlabelled 40-character base64 remains by design. Fixed for the recognized shapes. - 4679532855 locale parity: fixed at e9bc91a and unchanged;
cargo run -p xtask-checkreports 10 tables, 1110 literal keys and 67 key arguments, and the i18n tests pass 11. - 4654171983 folded credential continuation: fixed at 8cb7bd0 and unchanged;
crates/dim-report/src/conversation.rs:257-292and the fixtures atcrates/dim-report/tests/report_flow.rs:1078-1081still pass. - The round 8 merge and Session default branch: fixed at 8cb7bd0;
crates/dim-report/src/evidence.rs:60,:201. - 4628090399, 4628090424, 4628090439, 4630894519, 4642567198, 4642567207, 4642567215, 4642567221, the b410496 stale catalog P2, the 91e9cfd scanner-test P3, the c8400a9 merge-order blocker and the b7136c2 cli_flow note: fixed or withdrawn in earlier rounds; no net change in this head.
Still open, optional:
- 4644159177 Windows folder candidates:
benchmarks/usercases/pack.py:846-847andcrates/dim-report/src/redaction.rs:233. - 4644159193 case folding:
crates/dim-report/src/redaction.rs:274(shifted by this commit); an uppercase sharp-s spelling still misses. - 4644159204 cookie hints:
benchmarks/usercases/pack.py:54and:840-842still have no cookie field; the report path masks Cookie lines atcrates/dim-report/src/conversation.rs:17-26and:266. - The older optional notes remain: the NUL text/object key collision at
benchmarks/usercases/pack.py:475and:651, raw C0/ESC inreport.mdatcrates/dim-report/src/render.rs:244(the preview escapes atcrates/dim-cli/src/report.rs:136-152), and the same-lowercase stand-in atcrates/dim-report/src/redaction.rs:285(shifted). - New optional:
(?:sk|rk)_(?:live|test)_atcrates/dim-report/src/redaction.rs:16has no left boundary, so a benign token such asdisk_live_20240101120000is masked as a credential. Over-masking is the safe direction; a leading boundary would avoid it.
Report flow properties
At d716525, conversation remains opt-in and off by default (crates/dim-report/src/render.rs:132-136, crates/dim-cli/src/ui/report_panel.rs:211-218); preview and generation render the same files (crates/dim-report/src/draft.rs:156-168, :353); the mail URI carries only the selected purpose and the ZIP SHA-256 (crates/dim-cli/src/report.rs:221-257); and email re-reads the saved ZIP and compares it with the generated bytes (crates/dim-cli/src/ui/report_panel.rs:456-503). No over-withholding bug was found: URL and bearer matches withhold the whole line by design, and the regression keeps the following line intact.
Verification
Ran with LC_ALL=en_US.UTF-8 and isolated HOME, TMPDIR and XDG paths under dim-pr1881-data, with CARGO_TARGET_DIR under the same data directory:
cargo fmt --all -- --check: clean.cargo run --locked --offline -p xtask-check: passed (module boundaries 765/4714; plugin documents 26; i18n keys 10 tables, 1110 literal keys, 67 key arguments; literal main 11).cargo clippy --locked --offline -p dim-cli -p dim-report --all-targets -- -D warnings: clean.cargo test -p dim-report --test report_flow: 8 passed, including the new test.cargo test -p dim-cli report: 37 passed.cargo test -p dim-cli --lib ui::i18n::tests: 11 passed.python3 -I benchmarks/usercases/pack_flow_test.pywith the headdimcode: 56 passed.- The new test against e9bc91a (test file from this head, old sources): fails at
plan leaked <Stripe-shaped key> with redact=false, as intended. - The credential probe and test edit were reverted;
git statusis clean and no processes remain. - CI at d716525:
changes,dependencies,macos-native,scripts,static-checks,webandwindows-clipass;verify (linux)was still in progress when checked;acp-registryis skipped. GitHub reportsmergeStateStatus=BLOCKED(changes requested).
Merge and cross-PR
git merge-tree --write-tree origin/main HEADexits 0 at origin/main 82a91e6. The branch's last main merge is decc589.- #2003, #2141, #2155, #2002 and #2154 merge clean. #2095 still rewrites
docs/design/plugins/Report.mdand conflicts there; whichever lands second rebases. #1306 conflicts onCargo.lockand the workspaceCargo.toml.
Unverified
- A real mail handler and a full TUI session; the mail path is covered by synthetic tests only.
- A real Windows or non-ASCII home for the packer.
- The full workspace suite; only the targeted packages were run.
| const WITHHELD: &str = "[excerpt withheld]"; | ||
| static CREDENTIAL_FIELD: LazyLock<Regex> = LazyLock::new(|| { | ||
| Regex::new( | ||
| r#"(?i)(?:^|[^a-z0-9_-]|\\[rn])(?:set-)?(?:cookie|authorization|x-api-key|api[_-]?key|[a-z0-9_-]*(?:password|passwd|credential|secret|token))(?:\\?["'`])?[ \t]*[:=]"#, |
There was a problem hiding this comment.
P1. This field pattern only matches a credential keyword that is the last word before : or =. Common labelled secrets put a suffix after the keyword, so aws_secret_access_key = <value>, AWS_SECRET_ACCESS_KEY=<value>, "aws_secret_access_key": "<value>", secret_key = <value>, private_key = <value> and GROQ_API_KEY=gsk_... match neither this pattern nor SECRET; Proxy-Authorization also misses because the boundary excludes -. Both modes derive from guarded, so those lines reach evidence.conversation, report.md and the ZIP verbatim, and has_residue is false.
Evidence: a temporary probe at d716525 returned each of those lines unchanged, while x-api-key and the new sk_/AIza/ASIA/userinfo/Bearer fixtures are withheld or masked. docs/design/plugins/Report.md:81 says neither mode includes recognizable credentials, and a field name labels these values as credentials, so the unlabelled high-entropy limitation does not apply.
Fix: match the keyword as an _-delimited segment and allow suffixes before the separator, or mirror benchmarks/usercases/pack.py:54; cover private_key, signing_key and proxy-authorization. Add the AWS, secret_key, private_key and provider-env shapes to the regression at crates/dim-report/tests/report_flow.rs:1331 and assert they are withheld in both modes, in the plan, in report.md and in the ZIP.
There was a problem hiding this comment.
Fixed in 41ac8a2. A probe at this head returns WITHHELD for every shape named here, including AWS_SECRET_ACCESS_KEY=, the JSON form, secret_key, private_key, signing_key, GROQ_API_KEY and Proxy-Authorization, and the new fixture covers the plan, report.md and the ZIP in both modes. Withdrawing the P1. The compact-name regression in 4689679422 is a separate defect introduced by the same rewrite.
eric8810
left a comment
There was a problem hiding this comment.
Reviewed at head d716525.
Approving. The commit hardens the redaction I approved at e9bc91a5 in the direction that matters for an evidence pack: a conversation excerpt is now withheld when it carries a credential the code recognises, rather than scrubbed and included. Two new patterns do the recognising — URL userinfo (scheme://user:pass@, the ordinary way a token rides along in a connection string) and a bearer token of at least twenty characters after Bearer, with a boundary before it so the word in prose does not trip it. They join the existing cookie, private-key, JWT and AKIA checks at the same place, so every withholding rule stays in one decision rather than growing a second gate.
redaction.rs widens the credential set itself: Stripe sk/rk live and test keys, Google AIza, and temporary AWS ASIA keys alongside the permanent AKIA form. Those are the shapes a coding session's logs actually leak.
Withholding rather than masking is the right choice for an excerpt, which is optional content: a mask can miss a form, and a missing excerpt costs the reader nothing they cannot reproduce.
Blocking: none.
Checks are green at this head. I read the conversation.rs and redaction.rs hunks and the commit message; I did not read the 101 lines added to report_flow.rs, and ran nothing.
Non-blocking: none.
Match credential keywords as delimiter-separated segments so names such as aws_secret_access_key, secret_key, private_key, signing_key and GROQ_API_KEY are recognized, and treat Proxy-Authorization as a field. Cover the environment, JSON and proxy-header spellings in the shared conversation regression without withholding ordinary prose.
zerob13
left a comment
There was a problem hiding this comment.
The new credential-field pattern and flow fixture cover the earlier Proxy-Authorization finding. The same pattern change drops coverage for some previously recognized credential fields. I compared the two patterns with synthetic values. See the inline finding.
| static CREDENTIAL_FIELD: LazyLock<Regex> = LazyLock::new(|| { | ||
| Regex::new(concat!( | ||
| r#"(?i)(?:^|[^a-z0-9_-]|\\[rn])"#, | ||
| r#"(?:[a-z0-9]+[_-])*"#, |
There was a problem hiding this comment.
[P2] Preserve withholding for compact credential field names. The previous pattern matched accessToken and clientSecret as compound fields ending in token and secret. The new prefix group requires a separator, so both fields now miss and an opaque value on either line reaches the preview and ZIP in both redaction modes. The token-shape matcher does not cover ordinary opaque values. Keep the former matching for those credential suffixes alongside the new separated prefix and suffix cases, and extend the existing two-mode flow test with a synthetic JSON accessToken or clientSecret. Keep the new proxy and prose checks.
There was a problem hiding this comment.
Still present at 41ac8a2. A probe returns KEPT for accessToken, clientSecret, authToken, refreshToken, idToken, sessionToken, csrfToken, bearerToken, mysecret and authorizationToken; all were WITHHELD at d716525. An end-to-end fixture that adds accessToken: <opaque> to recognized_credentials_are_withheld_from_both_conversation_modes passes at d716525 and fails at 41ac8a2 at plan leaked <value> with redact=false, so the value reaches both modes and the ZIP. The fix is to keep the old [a-z0-9_-]*(?:password|passwd|credential|secret|token) alternative alongside the new prefix and suffix groups; do not wrap the keywords in \w*, because Secretary: available must stay visible (crates/dim-report/tests/report_flow.rs:1366).
There was a problem hiding this comment.
Fixed in ff9825d. The guard keeps the former [a-z0-9_-]*(?:password|passwd|credential|secret|token) alternative alongside the new prefix and suffix groups (crates/dim-report/src/conversation.rs:22). A probe returns WITHHELD for accessToken, clientSecret, authToken, refreshToken, idToken, sessionToken, csrfToken, bearerToken, mysecret and authorizationToken, and the two-mode fixture now covers a JSON accessToken, an unquoted clientSecret and an =-separated refreshToken in the plan, report.md and the ZIP. Withdrawing the P2.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review: #1881 at 41ac8a2 (origin/main 08d4b00)
The PR adds the preview-first report flow, the Session-scoped email draft with a purpose and SHA-256 only, and the offline evidence packer that shares the report redaction code. This head is d716525 plus one commit, 41ac8a2, which rewrites the conversation credential-field pattern for separated prefixes and suffixes and extends the two-mode regression.
Verdict: REQUEST_CHANGES. The round 11 labelled-field P1 and the Proxy-Authorization P2 are fixed, and the new test fails on d716525, but the rewritten pattern drops the compact names the old one withheld. Common OAuth fields such as accessToken and clientSecret reach both modes again.
Blocking
P1. The rewritten field pattern drops compact credential names (thread 4689679422)
Problem: CREDENTIAL_FIELD (crates/dim-report/src/conversation.rs:17-26) now requires _ or - between every piece of a name: the prefix repeats [a-z0-9]+[_-] and the suffix repeats [_-][a-z0-9]+. The old alternative [a-z0-9_-]*(?:password|passwd|credential|secret|token) matched any name ending in a keyword, with or without separators. accessToken, clientSecret, authToken, refreshToken, idToken, sessionToken, csrfToken, bearerToken, mysecret and authorizationToken were withheld at d716525 and now pass guarded (:248-299) unchanged. Both vectors come from guarded (:215-241; crates/dim-report/src/render.rs:132-133), so the values reach evidence.conversation, report.md and the ZIP in both modes, and has_residue (crates/dim-report/src/redaction.rs:392-394) is false. Agree with zerob13 on 4689679422.
Failure scenario: A user pastes an OAuth token response or an SDK config with "accessToken": "<opaque>", "refreshToken": ... or clientSecret into a message, selects Include conversation, and saves or emails the ZIP. Redaction on does not help because the token shape matcher does not cover ordinary opaque values. The values ship in the plan, report.md and the archive. These same lines were withheld at d716525, so the fix commit regresses a protection that already worked.
Evidence: A temporary probe at both commits returned WITHHELD for every name above at d716525 and KEPT at 41ac8a2. An end-to-end fixture that adds accessToken: <opaque> to recognized_credentials_are_withheld_from_both_conversation_modes (crates/dim-report/tests/report_flow.rs:1332) passes at d716525 and fails at 41ac8a2 with plan leaked <value> with redact=false (:1414). The new fixture at :1368-1375 covers only the separated forms. docs/design/plugins/Report.md:81 says neither mode includes recognizable credentials.
Fix: Keep the old [a-z0-9_-]*(?:password|passwd|credential|secret|token) alternative alongside the new prefix and suffix groups. Do not wrap the keywords in \w*: the fixture pins Secretary: available as visible (crates/dim-report/tests/report_flow.rs:1366), and a blanket word match would withhold it. Add accessToken, clientSecret and refreshToken to the fixture and assert them in both modes, in the plan, in report.md and in the ZIP. Keyword-first camelCase (secretKey, SecretAccessKey) leaks at both heads; a follow-up can extend the same treatment, but it is not the regression this commit introduced.
Prior opinions
Withdrawn at this head:
- Round 11 P1, labelled credential fields with suffixes: fixed in 41ac8a2. A probe withholds
aws_secret_access_keyin env, uppercase and JSON forms,secret_key,private_key,signing_key,GROQ_API_KEYandProxy-Authorizationin both modes; the new fixture asserts the plan,report.mdand the ZIP; the fixture fails on d716525 atplan leaked aws-secret-fixture with redact=false. - zerob13's Proxy-Authorization P2 (thread 4689201021): fixed in 41ac8a2; the proxy line is withheld and the new fixture covers it.
- The inline P1 at 4689273084: fixed in 41ac8a2 for every shape named there.
- The enumerated shapes in 4677997050: fixed in 41ac8a2. The fail-closed mechanism stays withdrawn as in round 11. The compact-name regression above is a new gap, not the old one.
- 4679532855 locale parity, 4654171983 folded continuation, the round 8 merge and Session default, 4628090399, 4628090424, 4628090439, 4630894519, 4642567198, 4642567207, 4642567215, 4642567221, the b410496 stale catalog P2, the 91e9cfd scanner-test P3, the c8400a9 merge-order blocker and the b7136c2 cli_flow note: fixed or withdrawn in earlier rounds; no net change in this head.
Still open, optional:
- 4644159177 Windows folder candidates:
benchmarks/usercases/pack.py:846-847andcrates/dim-report/src/redaction.rs:235. - 4644159193 case folding:
crates/dim-report/src/redaction.rs:274. - 4644159204 cookie hints:
benchmarks/usercases/pack.py:54and:840-842; the report path withholds Cookie lines atcrates/dim-report/src/conversation.rs:17-26and:270. - The older optional notes remain: the NUL text/object key collision at
benchmarks/usercases/pack.py:475and:651, raw C0/ESC inreport.mdatcrates/dim-report/src/render.rs:244(the preview escapes atcrates/dim-cli/src/report.rs:136-152), and the same-lowercase stand-in atcrates/dim-report/src/redaction.rs:285. (?:sk|rk)_(?:live|test)_atcrates/dim-report/src/redaction.rs:16still has no left boundary, so a benign token such asdisk_live_20240101120000is masked as a credential. Over-masking is the safe direction; a leading boundary would avoid it.
Report flow properties
At 41ac8a2, conversation remains opt-in and off by default (crates/dim-report/src/render.rs:132, crates/dim-cli/src/ui/report_panel.rs:212-216); preview and generation render the same files (crates/dim-report/src/draft.rs:353); the mail URI carries only the selected purpose and the ZIP SHA-256 (crates/dim-cli/src/report.rs:230-236, :239-257); and email re-reads the saved ZIP and compares it with the generated bytes (crates/dim-cli/src/ui/report_panel.rs:456-506). No new over-withholding bug: Secretary: available and the discussion line stay visible, and a line such as x-cookie: example is now withheld because the prefix group recognizes a cookie field, which is the safe direction. The guard remains independent of redaction mode.
Verification
Ran with LC_ALL=en_US.UTF-8 and isolated HOME, TMPDIR and XDG paths under dim-pr1881-data, with CARGO_TARGET_DIR under the same data directory:
cargo fmt --all -- --check: clean.cargo run --locked --offline -p xtask-check: passed (module boundaries 765/4714; plugin documents 26; i18n keys 10 tables, 1110 literal keys, 67 key arguments; literal main 11).cargo clippy --locked --offline -p dim-report -p dim-cli --all-targets -- -D warnings: clean.cargo test -p dim-report --test report_flow: 8 passed.cargo test -p dim-cli report: 37 passed.cargo test -p dim-cli --lib ui::i18n::tests: 11 passed.- The new test from 41ac8a2 run against d716525 sources: fails at
plan leaked aws-secret-fixture with redact=false, as intended. - The labelled-shape probe and the temporary test edits were reverted;
git statusis clean at 41ac8a2 and no processes remain. - CI at 41ac8a2:
changes,dependencies,macos-native,scripts,static-checks,web,windows-cli,verify (linux)andci-okpass;acp-registryis skipped. GitHub reportsmergeStateStatus=BLOCKEDfrom the reviews.
Merge and cross-PR
git merge-tree --write-tree origin/main HEADexits 0 at origin/main 08d4b00.- #2095 still rewrites
docs/design/plugins/Report.mdand conflicts there; whichever lands second rebases. #1306 still conflicts onCargo.lockand the workspaceCargo.toml, and it keeps the generated module docs this branch removed. No other open PR touches this PR's files.
Unverified
- A real mail handler and a full TUI session; the mail path is covered by synthetic tests only.
- A real Windows or non-ASCII home for the packer.
- The full workspace suite; only the targeted packages were run.
| r#"(?:[a-z0-9]+[_-])*"#, | ||
| r#"(?:cookie|authorization|api[_-]?key|private[_-]?key|signing[_-]?key"#, | ||
| r#"|password|passwd|credential|secret|token)"#, | ||
| r#"(?:[_-][a-z0-9]+)*(?:\\?["'`])?[ \t]*[:=]"#, |
There was a problem hiding this comment.
P1. This suffix group and the prefix group above require a _ or - between every piece of a field name. The old pattern matched any name ending in password, passwd, credential, secret or token, so compact OAuth and SDK names were withheld: accessToken, clientSecret, authToken, refreshToken, idToken, sessionToken, csrfToken, bearerToken, mysecret, authorizationToken. They now pass guarded unchanged. Both modes use that output (crates/dim-report/src/conversation.rs:215-241), so the values reach evidence.conversation, report.md and the ZIP, and has_residue (crates/dim-report/src/redaction.rs:392-394) is false. docs/design/plugins/Report.md:81 says neither mode includes recognizable credentials.
Evidence: a probe at d716525 returns WITHHELD for every name above and at this head returns KEPT. An end-to-end fixture that adds accessToken: <opaque> to recognized_credentials_are_withheld_from_both_conversation_modes (crates/dim-report/tests/report_flow.rs:1332) passes at d716525 and fails here at plan leaked <value> with redact=false (:1414).
Fix: keep the old [a-z0-9_-]*(?:password|passwd|credential|secret|token) alternative alongside the new groups, and add accessToken, clientSecret and refreshToken to the fixture in both modes and the ZIP. Do not wrap the keywords in \w*: the fixture pins Secretary: available as visible (crates/dim-report/tests/report_flow.rs:1366).
There was a problem hiding this comment.
Fixed in ff9825d. A probe at this head returns WITHHELD for all ten names in this thread in lower, upper and JSON shapes, and for x-access-token, X-Api-Key, Proxy-Authorization and the labelled forms. The fixture at crates/dim-report/tests/report_flow.rs:1366-1377 adds accessToken, clientSecret and refreshToken and asserts both modes, the plan, report.md and the ZIP (:1390-1473); it fails on 41ac8a2 at plan leaked compact-access-fixture with redact=false. Secretary: available stays visible. Withdrawing the P1.
The separated prefix and suffix groups stopped matching names such as accessToken, clientSecret and refreshToken, which the previous pattern withheld. Keep the old keyword-suffix alternative alongside the new groups and cover the compact JSON and assignment forms in the two-mode regression.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review: #1881 at ff9825d (origin/main bf42e64)
The PR adds the preview-first report flow, the Session-scoped email draft with a purpose and SHA-256 only, and the offline evidence packer that shares the report redaction code. This head is 41ac8a2 plus one commit, ff9825d, which restores the compact credential-field alternative in the conversation guard and adds three compact names to the two-mode regression.
Verdict: APPROVE. No blocking finding remains.
Round 12 P1: fixed
Problem: CREDENTIAL_FIELD (crates/dim-report/src/conversation.rs:17-26) required _ or - between every name segment, so compact OAuth and SDK names passed guarded unchanged and reached both report modes.
Failure scenario: a user pastes "accessToken": "<opaque>", clientSecret or refreshToken into a message, selects Include conversation, and saves or emails the ZIP. Redaction does not help because the token-shape matcher does not cover opaque values.
Evidence: the keyword group at crates/dim-report/src/conversation.rs:22 again carries [a-z0-9_-]*(?:password|passwd|credential|secret|token). A probe at this head returns WITHHELD for all ten names from last round (accessToken, clientSecret, authToken, refreshToken, idToken, sessionToken, csrfToken, bearerToken, mysecret, authorizationToken) in lower, upper and JSON shapes; all were KEPT at 41ac8a2. The guard feeds both vectors (:215-241, :248-299), so both modes are covered. The fixture adds accessToken, clientSecret and refreshToken at crates/dim-report/tests/report_flow.rs:1366-1368 and :1376-1377; it asserts the plan in both modes (:1390-1424) and the generated files and ZIP (:1442-1473), with archive decoding the ZIP and comparing it byte-for-byte (:1449-1450). At 41ac8a2 the same fixture fails at plan leaked compact-access-fixture with redact=false (:1422), so it discriminates.
Fix: keep the old alternative alongside the prefix and suffix groups. The labelled forms, x-access-token, X-Api-Key, Proxy-Authorization, aws-secret-access-key, secret-key and the JSON and uppercase forms stay withheld. No over-withholding: Secretary: available (crates/dim-report/tests/report_flow.rs:1369), credential-fixture-visible-tail, tokenizer, tokens and passwordless stay visible; x-cookie stays withheld, which is the safe direction.
Prior opinions
Withdrawn at this head:
- Round 12 P1, compact credential field names (thread 4689851802): fixed in ff9825d.
- zerob13's P2 on the same regression (thread 4689679422): fixed in ff9825d.
- The round 12 note that the fixture covered only the separated forms: superseded by the three compact names above.
- 4677997050 labelled shapes, 4689201021 Proxy-Authorization, 4689273084 inline P1, 4679532855 locale parity, 4654171983 folded continuation, and the earlier fixed or withdrawn items: unchanged at this head.
- The round 12 example for the missing
(?:sk|rk)_left boundary was too short to match the 16-character suffix. The finding stands with a valid example, below.
Still open, optional (P3):
- Keyword-first camelCase (
secretKey,SecretAccessKey,tokenValue) still passes both modes. It is unchanged from d716525 and 41ac8a2, not introduced here. A case-insensitive keyword-first match would also withholdSecretary: available, so the cheapest follow-up is to name the limit next toCREDENTIAL_FIELDor add explicit names. - 4644159177 Windows folder candidates:
benchmarks/usercases/pack.py:846-847appends only/, andcrates/dim-report/src/redaction.rs:235pushes only the native-separator stand-in. - 4644159193 case folding:
crates/dim-report/src/redaction.rs:274usescase_fold_simple, so an uppercase spelling of a sharp-s home has no span andhas_residuereports clean. - 4644159204 cookie hints:
benchmarks/usercases/pack.py:54and:840-842have no cookie field; the report path withholds Cookie lines atcrates/dim-report/src/conversation.rs:17-26and:270. - The NUL text/object key collision at
benchmarks/usercases/pack.py:475and:651; raw C0 and ESC inreport.mdatcrates/dim-report/src/render.rs:244(the preview escapes atcrates/dim-cli/src/report.rs:136-157); the same-lowercase stand-in skip atcrates/dim-report/src/redaction.rs:285. (?:sk|rk)_(?:live|test)_atcrates/dim-report/src/redaction.rs:16still has no left boundary, so a benign identifier containingsk_live_orsk_test_followed by 16 alphanumerics is masked as a credential. Over-masking is the safe direction.
Report flow properties
Unchanged at this head. Conversation remains opt-in and off by default (crates/dim-report/src/render.rs:132, crates/dim-report/src/draft.rs:235); preview and generation render the same files (crates/dim-report/src/draft.rs:353); the mail URI carries only the selected purpose and the ZIP SHA-256 (crates/dim-cli/src/report.rs:230-236, :239-256); and email re-reads the saved ZIP and compares it with the generated bytes (crates/dim-cli/src/ui/report_panel.rs:456-507). The guard is independent of the redaction mode: guarded produces the unredacted vector, and the redacted vector applies the replacement rules to that same output (crates/dim-report/src/conversation.rs:215-241).
Verification
Ran with LC_ALL=en_US.UTF-8 and isolated HOME, TMPDIR and XDG paths under dim-pr1881-data, with CARGO_TARGET_DIR under the same directory:
cargo fmt --all -- --check: clean.cargo run --locked --offline -p xtask-check: passed (module boundaries 765/4714; plugin documents 26; i18n keys 10 tables, 1110 literal keys, 67 key arguments; literal main 11).cargo clippy --locked --offline -p dim-report -p dim-cli --all-targets -- -D warnings: clean.cargo test -p dim-report --test report_flow: 8 passed.cargo test -p dim-cli report: 37 passed.cargo test -p dim-cli --lib ui::i18n::tests: 11 passed.- The fixture from this head run against the 41ac8a2 guard: fails at
plan leaked compact-access-fixture with redact=false, as intended. - Probe logs and the temporary test edits were reverted;
git statusis clean at ff9825d and no processes remain. - CI at ff9825d:
changes,dependencies,macos-native,scripts,static-checks,webandwindows-clipass;acp-registryis skipped;verify (linux)is still running. GitHub reportsmergeStateStatus=BLOCKEDfrom the reviews.
Merge and cross-PR
git merge-tree --write-tree origin/main HEADexits 0 at origin/main bf42e64.- #2095 is now closed, so the earlier
docs/design/plugins/Report.mdoverlap is gone. - #1306 still touches
Cargo.lock, which this branch also changes; whichever lands second regenerates or rebases. No other open PR touches this PR's files.
Unverified
- A real mail handler and a full TUI session; the mail path is covered by synthetic tests only.
- A real Windows or non-ASCII home for the packer.
- The Python packer suite; it is unchanged in this commit and was not rerun.
- The full workspace suite; only the targeted packages were run.
Simon-He95
left a comment
There was a problem hiding this comment.
Direction and architecture
Reviewed head ff9825d2. The report stays in dim-report, the mail draft is client-only (purpose and SHA-256, no report text or local path), the packer exchanges JSONL with the trusted dimcode and delegates redaction to the Rust owner (evidence-redact), and no App Server RPC is removed or renamed. That is the right direction and keeps one replacement implementation.
Blocking compatibility question on the Session method face: PlanRequest.include_conversation is #[serde(default)] false (crates/dim-report/src/draft.rs:133-141), and conversation is now added only when that flag is true (crates/dim-report/src/render.rs:132-136). Before this PR, session.report.plan with redact: false included the recent conversation excerpt. dim-electron's SessionReportPlanParams (packages/desktop/packages/shared/src/protocol/rpc.ts) sends redact only, and its dialog (packages/desktop/packages/renderer/src/session/dialogs/SessionReportDialog.vue) has no Include conversation control. After this merges, unchecking Redact in Desktop silently produces a diagnostics-only report while the UI still says recent activity is included. That is a user-visible behavior change for an existing client, not just an additive field.
Please choose and state one:
- make the field
Option<bool>and treat an absent value as the old!redactbehavior (the new CLI already sends an explicitfalsewhere it needs the opt-out), or - coordinate the dim-electron change that adds the toggle and advertise the capability before sending the field, and record the break in
Report.mdand the PR description.
With that resolved, the TUI flow, the redaction owner, and the packer direction look right. Not approving until the compatibility decision is explicit.
zerob13
left a comment
There was a problem hiding this comment.
Reviewed ff9825d2 (delta after 41ac8a2a). Request changes — the credential leak I reported is fixed, but one compatibility blocker remains.
The P2 is resolved. crates/dim-report/src/conversation.rs:22 again matches compact names ending in password/passwd/credential/secret/token, so accessToken, clientSecret and refreshToken are withheld. The flow test now covers a JSON accessToken, an unquoted clientSecret and an =-separated refreshToken in both redaction modes, including report.md and the ZIP. The previously recognized forms still match, and Secretary: available stays visible.
Blocking: include_conversation changes what existing clients get. On main, session.report.plan with redact: false includes the recent conversation excerpt (crates/dim-report/src/draft.rs:317-324 at the merge base). At this head it is included only when includeConversation is true (draft.rs:140, render.rs:132), and the flag defaults to false. A client that sends only redact therefore gets a diagnostics-only report while its UI still says recent activity is included. There is no protocol-version check, so the server cannot distinguish an old client from a new one. This is a user-visible behavior change for an existing client, not an additive field.
Fix: make the field Option<bool> and treat an absent value as the old !redact behavior. The CLI already sends an explicit value when the distinction matters, so the new opt-in semantics stay intact for callers that know about it. Otherwise, land a linked dim-electron change first and state that a Desktop release must ship with this.
Merge conflict: the PR is dirty against main. git merge-tree finds exactly one conflict, docs/design/plugins/Report.md; Rust and i18n files merge cleanly. Resolve it before merge.
Non-blocking: compact plural/infix names (accessTokens, clientSecrets, secretAccessKey, tokenValue) still miss; that is pre-existing and a reasonable trade-off against keeping Secretary: available visible. The optional notes from other reviewers (Cookie hint in pack.py, Windows-home suggestions, sharp-s folding) also remain optional.
Checked: the two-file delta, the merge-base and origin/main behavior of plan, PlanRequest/render at this head, the targeted dim-report regression (passed), and git merge-tree against origin/main. I did not run the full workspace or TUI suite, and dim-electron is not checked out locally, so Simon-He95's description of the Desktop client is taken from his review rather than re-read here.
Summary
Related: #1701, #1319, #1729. Builds on the already-merged #1826. See the report contract and evidence pack contract.
Design rule checklist
Documentation
Verification
git diff --checkpassed. Both generated module graphs match the integrated source.