Skip to content

fix(ci): retain safe dirty-source diagnostics for desktop proof - #149085

Merged
vincentkoc merged 3 commits into
mainfrom
test/desktop-source-clean-diagnostics-20260915
Sep 15, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
test/desktop-source-clean-diagnostics-20260915

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Related: #148962

What Problem This Solves

Desktop CI can reject a dirty source checkout without recording which tracked files changed, leaving the failure impossible to diagnose from its public receipt.

User Impact

No product UI or runtime behavior changes. Maintainers get bounded, sanitized source-status evidence when desktop proof refuses a dirty checkout; that refusal remains mandatory.

Why This Change Was Made

Source admission records status before asserting cleanliness and clears stale status before each read. It publishes only safe paths already present in the verified commit, with counts for omitted entries. Untracked files, private staged additions, raw command output, and new rename destinations stay out of the public receipt. The existing source identity and process cleanup checks remain in place.

Evidence

  • Independent source review covered the real runner call site, failure/cleanup ordering, NUL-delimited Git status, privacy limits, and nine added regression cases, including a real Git fixture.
  • Static syntax, targeted formatting, and git diff --check passed. Production delta: +88/-17 (net +71), for the bounded diagnostic projection; tests: +190/-1.
  • Previous head 2209c816800f17e7b659d224573e93b96b5e8969: the hosted build, all tooling groups, and real-gateway desktop proof passed, including four source-admission checks across Node and SSH carriers and final cleanup. The aggregate failed only in two unrelated test groups, whose fixes are included from current main.
  • The three reviewed files are byte-identical after integration with frozen main 6c28739b1aca420df0c753acb79f065085cc7229. Current CI35028796996 passed on 656f29c1: 51 successful jobs, 14 skipped, no failures, including the required aggregate. Build and real-Gateway proof passed; the latter completed 30 files and 60 tests, both Node and SSH carriers, source guards, and cleanup. Native hosted-evidence preparation passed, and this PR was squash-merged as 60c24d7192c1. The native workflow verified the attempted head and retained its completed merge receipt.
  • The review's migration concern does not apply: sourceStatus is an additive field in an existing per-run CI proof receipt. It changes no product state store, SQLite schema, schema version, or upgrade reader.
  • The earlier receipt did not retain dirty paths. They remain unrecoverable; this change improves future failures and does not establish the cause of that earlier failure.

Current signed head: 656f29c1efb0be685569d4bdb23566ac93ff43a9. The inherited fixture line-cap failure is repaired by merged #149423, now incorporated. The superseded CI attempt was cancelled after preserving its completed results and known failure. The feature delta is byte-identical after this main integration; current exact-head hosted qualification passed. The completed current-head ClawSweeper review reports no actionable source finding; its generated migration checkbox is addressed by the per-run artifact explanation above.

@vincentkoc vincentkoc self-assigned this Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 15, 2026, 6:50 PM ET / 22:50 UTC (Revision 3).

ClawSweeper review

What this changes

Records bounded, sanitized tracked filenames and omission counts when desktop CI refuses a dirty source checkout.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this remains a useful, focused diagnostic improvement with no actionable correctness findings. The previous migration blocker is unsupported: the added field belongs to a per-run proof artifact, not persisted product state.

Priority: P3
Reviewed head: 656f29c1efb0be685569d4bdb23566ac93ff43a9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with meaningful privacy and refusal coverage and no actionable defects.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements and does not materially change authority; historical clean desktop runs supplement source review but do not prove dirty-refusal diagnostics.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements and does not materially change authority; historical clean desktop runs supplement source review but do not prove dirty-refusal diagnostics.
Evidence reviewed 8 items Sanitized diagnostics preserve mandatory refusal: The source reader verifies identity, obtains filenames from that commit, reads NUL-delimited status with renames disabled, records a bounded projection, and rejects every nonempty status buffer. Private additions and unsafe names cannot enter the published filename list.
Previous migration concern resolved by source inspection: sourceStatus is added to the existing run-local receipt. The runner saves receipt.json during finalization, retains source-clean as the failure phase, and keeps raw logs under its private temporary directory. The unchanged workflow uploads the public artifact directory; no product storage schema, upgrade reader, or authorization consumer is changed.
Focused regression coverage: Reviewed coverage exercises dirty refusal, empty-status admission, stale-status clearing after failed commands, publication bounds, unsafe names, and a real Git fixture containing staged additions, an untracked file, and a rename destination. Tests were inspected, not executed under this read-only review.
Findings None None.
Security None None.

How this fits together

Desktop proof CI checks source identity and cleanliness before and after exercising desktop connections. Its public receipt gives maintainers diagnostic facts while raw command output stays in private logs.

flowchart TD
  A[Checked-out source] --> B[Verify commit identity]
  B --> C[Read committed filenames and Git status]
  C --> D[Filter and bound diagnostic entries]
  D --> E[Public CI receipt]
  C --> F{Checkout clean?}
  F -->|Yes| G[Continue desktop proof]
  F -->|No| H[Refuse proof and retain diagnostics]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Tests +189, Other +71. Total +260 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 190 1 +189
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 88 17 +71
Total 3 278 18 +260

Review metrics

Metric Value Why it matters
Diagnostic publication bounds At most 32 entries; only the first 64 KiB of status is eligible The receipt exposes a bounded subset of committed filenames while counting omitted records.

Stored data model

Persistent data-model change detected: unknown-data-model-change: scripts/lib/desktop-resize-proof.mts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep source admission strict while publishing only bounded diagnostic facts through the existing CI receipt.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: a dirty checkout reaches main's cleanliness assertion without adding changed filenames to the public receipt. No runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Yes. The patch extends the existing receipt owner, preserves rejection and cleanup behavior, and avoids publishing private filenames or raw output; no product migration is needed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 14b8ad1d1871.

Labels

Label justifications:

  • P3: This improves internal CI failure diagnostics without changing product behavior or relaxing source admission.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements and does not materially change authority; historical clean desktop runs supplement source review but do not prove dirty-refusal diagnostics.

Evidence

What I checked:

  • Sanitized diagnostics preserve mandatory refusal: The source reader verifies identity, obtains filenames from that commit, reads NUL-delimited status with renames disabled, records a bounded projection, and rejects every nonempty status buffer. Private additions and unsafe names cannot enter the published filename list. (scripts/lib/desktop-resize-proof.mts:387, 656f29c1efb0)
  • Previous migration concern resolved by source inspection: sourceStatus is added to the existing run-local receipt. The runner saves receipt.json during finalization, retains source-clean as the failure phase, and keeps raw logs under its private temporary directory. The unchanged workflow uploads the public artifact directory; no product storage schema, upgrade reader, or authorization consumer is changed. (scripts/test-desktop-resize-real.mts:46, 656f29c1efb0)
  • Focused regression coverage: Reviewed coverage exercises dirty refusal, empty-status admission, stale-status clearing after failed commands, publication bounds, unsafe names, and a real Git fixture containing staged additions, an untracked file, and a rename destination. Tests were inspected, not executed under this read-only review. (test/scripts/desktop-resize-proof.test.ts:595, 656f29c1efb0)
  • Current main still lacks the diagnostic projection: Fetched main still asserts that Git status is empty without recording changed filenames. The three reviewed files have no differences between the pinned base and fetched main. The latest release v2026.9.4 does not contain this desktop proof runner, so it cannot establish that this improvement has shipped. (scripts/test-desktop-resize-real.mts:282, 14b8ad1d1871)
  • Review continuity: The three reviewed files are unchanged from the previous reviewed head. The prior review contained no findings; its migration request is addressed by the artifact-only storage boundary. The pinned introduced diff passes git diff --check, and the checkout remains clean. (656f29c1efb0)
  • Related work is distinct: fix(worktrees): report retained cleanup failures #148962 concerns managed-worktree cleanup outcomes and explicitly identifies this diagnostic work as a separate aid for future desktop proof failures. The merged fix(test): unblock managed update fixture lint #149423 repairs an unrelated fixture lint prerequisite. Neither replaces this change.

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-15T12:49:03.592Z sha 2209c81 :: blocked before merge. :: none
  • reviewed 2026-09-15T21:54:09.840Z sha 88c2ac9 :: blocked before merge. :: none

@vincentkoc
vincentkoc merged commit 60c24d7 into main Sep 15, 2026
108 of 110 checks passed
@vincentkoc
vincentkoc deleted the test/desktop-source-clean-diagnostics-20260915 branch September 15, 2026 23:30
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant