Repository navigation
Warning budget and stale-doc fixes (M01-04d stage 1) - #48
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ofmain800c3cd (Insights.swift, Overview.swift x2, Updates.swift; all Swift 6 language-mode diagnostics). Keys arefile: messagewith 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.Warning budgetstep right after the Release build (readsbuild/xcodebuild.logwritten byscripts/xcbuild.sh).ShredEngine/AppEngine.trashmentions inCURRENT_STATE.mdandRISK_REGISTER.md(audit text kept, status notes added); M01-04d row inMIGRATION_PLAN.md;CURRENT_STATE.mdwarnings row points at the new gate.Checks run
Clean Release build in a fresh worktree: BUILD SUCCEEDED, 4 warnings.
check-warnings.shon 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) andapproval-sites: pass.safety-touch.sh: yes, only because the diff touchesci.ymland the script's ownrm -fon itsmktempfiles. No guard/executor/approval code. No Opus review requested for this stage.Internal review (mc-reviewer): one SHOULD-FIX (grep exit under
pipefailbroke 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
non-sendablevsnon-Sendable; anasync/awaitmessage 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.swift testoutput is not.