fix(next): crash-safety base red: constant regexes without try!, one process-info return
Summary
check-crash-safety.sh failed on feat-cmux-next (Crash safety, in cmux-next checks) with 12 try! and one tuple returned from both an awaiting do and its catch. All 13 are gone, with no change for a pattern that compiles:
VerificationMessageParser,ErrorNormalizerandLogLineParsercompile their constant regexes withtry?. A pattern that ever failed to compile would find nothing instead of crashing the app.ErrorRedactorfails closed: if any pattern is missing, it returns<redacted>for the whole text instead of journaling half-scrubbed text.LiveWorkspaceCreation.runningPrograms(cnx-ios) assigns theprocess-inforesult to a local and returns once (swiftlang/swift#92698 drops the tuple's first element at -O).
The regex half follows #22360's approach; that PR bundles many other fixes and conflicts with the base, so this lands the crash-safety part alone.
Testing
bash scripts/cmux-next/check-crash-safety.sh Packages/macOS/CmuxNext:
- base 2cd6ae166f69:
check-crash-safety: 13 violation(s)(the 13 above), exit 1. - head:
check-crash-safety: ok.
Observed / Not run
- The step stays red after this for a different reason: with the
try!exit gone,crash_ratchet.pynow runs and reports a backlog of 35 modules/crates over its absolute baseline (bannedunowned,assumeIsolated,iuo,index_subscripthits and counted classes) that the early exit was hiding. This PR adds none of them; the per-pushcmux-next crash ratchetguard (relative to the base) stays green. Clearing or re-baselining that backlog needs the crash lead's sign-off on allowlist entries and is not in this PR. - Swift was not compiled locally (Linux). The fleet compile-check (
cmux-ci compile-check --package CmuxNext) failed twice at source checkout (fatal: repository 'manaflow-ai/cmux' does not exist), so the PR's own CI compile lanes are the compile evidence.
Changelog
none
๐ค Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the 13 crash-safety violations that check-crash-safety.sh reports on feat-cmux-next: 12 constant regexes compiled with try! and a tuple returned from both an awaiting do and its catch.
VerificationMessageParser,ErrorNormalizer, andLogLineParsercompile their constant regexes withtry?; a pattern that ever failed to compile now matches nothing instead of crashing.ErrorRedactorfails closed: if any rule fails to compile,redact(_:)returns<redacted>for the whole text rather than journaling half-scrubbed output.LiveWorkspaceCreation.runningProgramsassigns theprocess-inforesult to a local and returns it once, avoiding the Swift optimizer issue (swiftlang/swift#92698) that drops a tuple's first element at -O.
The regex changes follow #22360's approach, scoped here to the crash-safety part since that PR bundles other fixes and conflicts with the base. check-crash-safety.sh goes from 13 violations to ok; the step stays red only because crash_ratchet.py now reports a pre-existing backlog of 35 modules โ this PR adds none of them.