Skip to content

V16-ARCH-D5a: move diagnosis commands out of main.rs - #704

Merged
mergify[bot] merged 3 commits into
mainfrom
cursor/w5-v16-arch-d5a-diagnosis-cmds
Oct 8, 2026
Merged

mergify[bot] merged 3 commits into
mainfrom
cursor/w5-v16-arch-d5a-diagnosis-cmds

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Das Paket V16-ARCH-D5a zieht die Diagnose-Befehle aus der Hauptdatei in ein eigenes Modul um. Für dich ändert sich am Verhalten nichts, aber künftige Änderungen an der Diagnose müssen nicht mehr in der überfüllten Hauptdatei gesucht werden. Die Review-Anmerkungen wurden eingearbeitet.

Report

Package: V16-ARCH-D5a (PLAN Z3), seam src-tauri/src/main.rs only. Base origin/main ec4ba35.

What changed

  • Moved 7 diagnosis commands (get_log_path, get_panic_notice, get_reason_catalog, export_diagnosis, reveal_log_path, get_stuck_after_minutes, set_stuck_after_minutes) from main.rs into a new diagnosis_cmds module.
  • The function names and JSON shapes stay identical.
  • Added a new architecture-drift rule DIAGNOSIS_COMMANDS_MOVED to prevent these commands from being re-added to main.rs.
  • Removed orphaned section headers in main.rs.

Evidence

  • bash scripts/ci/gates.sh lane prepush → exit 0
  • Red-first test via architecture-drift.test.mjs asserting the contract (commands moved to diagnosis_cmds.rs, exported, and listed in generate_handler!).
  • Measured by Root on 2026-10-08 at head d147226: main.rs has 5131 lines before and 5041 after (−90). git diff --numstat gives 2 92 src-tauri/src/main.rs; the whole PR is 144 + 93 = 237 lines.
  • Acceptance gap, disposed: PLAN expected about −150 for main.rs; this PR delivers −90. All seven diagnosis commands are moved and the diagnosis group is complete; both delta reviews confirm this. The −150 was an estimate. The missing reduction comes with D5b (settings commands), which follows next on the mn seam. Root disposition 2026-10-08.
  • Secret scan before commit: clean.

NICHT ABGEDECKT

  • Windows half: the #[cfg(windows)] tests and the Windows arms of clippy did not run (Linux server); the Windows lane runs in the merge queue.
  • Browser smoke, frontend build and workflow gates run only in the linux lane, not in prepush.

Review

ID Source Severity Finding Disposition
R704-O1 OpenAI medium Test checks only 1 of 7 names Accepted, test expanded to check all 7 names, exact export format and generate_handler list.
R704-A4 Anthropic medium Test doesn't verify new location Accepted, test now verifies export in diagnosis_cmds.rs.
R704-A2 Anthropic low Orphaned section headers left in main.rs Accepted, headers removed.
R704-A1, A3 Anthropic low Correct numbers to measured ones, state expected vs delivered Fixed by Root in the PR text: −90 measured, 237 lines total, gap disposed (see above).
R704-A4 Anthropic / OpenAI low Scanner test still uses only get_reason_catalog Anthropic delta: FIXED via the contract test. OpenAI delta: open for the scanner itself. Root: follow-up, low; the contract test covers all 7 names.

Delta review at d147226:

  • OpenAI (gpt-6-astra): approve with conditions. R704-O1 FIXED, R704-A2 FIXED; the remaining A1/A3 were text only and are now corrected.
  • Anthropic (Sonnet 5.5): approve with conditions. Code and tests are fine; the open points were PR text only and are now corrected.

Root acceptance: 2026-10-08 20:07Z.

Cuarroc and others added 3 commits October 8, 2026 18:30
Test-First: scripts/ci/architecture-drift.test.mjs::rejects diagnosis commands in main.rs
Co-authored-by: Cursor <cursoragent@cursor.com>
This extracts get_log_path, get_panic_notice, get_reason_catalog,
export_diagnosis, reveal_log_path, get_stuck_after_minutes, and
set_stuck_after_minutes from main.rs into a new diagnosis_cmds.rs
module to shrink main.rs.

No-Test: covered by the previous commit's architectural rule
Co-authored-by: Cursor <cursoragent@cursor.com>
- Expand architecture-drift test to check the exact new location and generate_handler! export for all 7 diagnosis commands.
- Remove orphaned section headers in main.rs.

Test-First: scripts/ci/architecture-drift.test.mjs::contract: all 7 diagnosis commands are properly moved to diagnosis_cmds.rs and exported in main.rs
Co-authored-by: Cursor <cursoragent@cursor.com>
@Cuarroc
Cuarroc marked this pull request as ready for review October 8, 2026 20:06
@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 8, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T20:08:21.629722Z d147226 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mergify mergify Bot mentioned this pull request Oct 8, 2026
30 of 46 tasks
@mergify mergify Bot added the queued label Oct 8, 2026
@mergify
mergify Bot merged commit fc85e3d into main Oct 8, 2026
17 checks passed
@mergify
mergify Bot deleted the cursor/w5-v16-arch-d5a-diagnosis-cmds branch October 8, 2026 20:27
@mergify

mergify Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-08 20:14 UTC · Rule: default · triggered by merge protections
  • ✅ Checks passed · on draft merge queue: checking #704 on main (e1fd462) #715
  • ✅ Merged — 2026-10-08 20:27 UTC · at fc85e3da33d163b9fd64c4f0163e1872940dae74 · merge

This pull request spent 13 minutes 26 seconds in the queue, including 13 minutes 10 seconds running CI.

Required conditions to merge
  • check-success = gates (linux)
  • check-success = gates (windows)
  • check-success = red-first
  • github-review-approved [🛡 GitHub repository ruleset rule main-pr-required-checks]
  • label != do-not-merge
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (linux)
    • check-neutral = @github-actions/gates (linux)
    • check-skipped = @github-actions/gates (linux)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (windows)
    • check-neutral = @github-actions/gates (windows)
    • check-skipped = @github-actions/gates (windows)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/red-first
    • check-neutral = @github-actions/red-first
    • check-skipped = @github-actions/red-first
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections

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

Labels

review-ok Pipeline: review disposition complete, no open high finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant