Skip to content

Warning budget and stale-doc fixes (M01-04d stage 1) - #48

Merged
WahdanZ merged 4 commits into
mainfrom
m01-04d-simplification
Nov 18, 2026
Merged

WahdanZ merged 4 commits into
mainfrom
m01-04d-simplification

Conversation

@WahdanZ

@WahdanZ WahdanZ commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Not for auto-merge. Stage 1 of M01-04d. Docs and scripts only; no Swift changes.

Changes

  • scripts/check-warnings.sh + scripts/warnings-baseline.txt: fails on any Swift compiler warning not listed in the baseline. The baseline is the 4 warnings from a clean Release build of main 800c3cd (Insights.swift, Overview.swift x2, Updates.swift; all Swift 6 language-mode diagnostics). Keys are file: message with no line numbers, so code moves don't break it. The budget only goes down: fixed warnings are reported so their lines can be removed.
  • CI: a Warning budget step right after the Release build (reads build/xcodebuild.log written by scripts/xcbuild.sh).
  • Docs: stale ShredEngine / AppEngine.trash mentions in CURRENT_STATE.md and RISK_REGISTER.md (audit text kept, status notes added); M01-04d row in MIGRATION_PLAN.md; CURRENT_STATE.md warnings row points at the new gate.

Checks run

  • Clean Release build in a fresh worktree: BUILD SUCCEEDED, 4 warnings.

  • check-warnings.sh on the real log: OK. Synthetic logs: new warning fails (rc 1), fixed warning reported (rc 0), empty log OK (rc 0), CI-style /Users/runner/... paths and subfolders normalise.

  • package (145 tests, 31 suites) and approval-sites: pass.

  • safety-touch.sh: yes, only because the diff touches ci.yml and the script's own rm -f on its mktemp files. No guard/executor/approval code. No Opus review requested for this stage.

  • Internal review (mc-reviewer): one SHOULD-FIX (grep exit under pipefail broke the zero-warnings case) fixed before this commit.

  • scripts/test-check-warnings.sh (synthetic logs, run in CI first): both toolchain wordings pass, new warning fails, stale entry fails, removing it passes, reintroducing it fails, plus empty-log cases.

Limits

  • CI (Xcode 16.x) and local builds (Xcode 26.x) word two of the four warnings differently (non-sendable vs non-Sendable; an async/await message vs a main-actor message in Updates.swift). The first CI run failed on this; the baseline now lists both wordings per warning (a || b). Count and files are the same on both toolchains.
  • Only warnings that appear in the xcodebuild log are covered (the app and the package as built by it); swift test output is not.

Adds scripts/check-warnings.sh and scripts/warnings-baseline.txt (the 4 Swift
warnings of a clean Release build of main 800c3cd) and a CI step that fails on
any warning not in the baseline. Fixes stale ShredEngine mentions and adds the
M01-04d row to MIGRATION_PLAN. Docs and scripts only.
CI (Xcode 16.x) words two of the four baseline warnings differently from the
local Xcode 26.x build. The baseline now lists both wordings per warning
("a || b"); a warning that matches neither still fails.
… stage 1)

A baseline entry whose warning no longer occurs now fails the check, so a
fixed warning that later returns cannot be waved through. Adds
scripts/test-check-warnings.sh (both Xcode wordings, new warning, stale entry,
removal, reintroduction) and runs it in CI before the real check.
…4d stage 1)

awk's NR==FNR also holds for the log file when the baseline has no entries,
so every warning was taken as an alias and the check passed. Match the
baseline by FILENAME == ARGV[1] instead, and add a regression test: an empty
baseline with one new Swift warning must exit 1.
@WahdanZ
WahdanZ merged commit bd14817 into main Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant