Skip to content

[codex] Structure mobile native static-check failures#3302

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/native-static-check-error
Jun 20, 2026
Merged

[codex] Structure mobile native static-check failures#3302
juliusmarminge merged 1 commit into
mainfrom
codex/native-static-check-error

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the message-only native static-check failure with a schema-backed command error
  • retain the requested command, arguments, working directory, and exit code as structured context
  • keep non-zero exits cause-free because they are process results rather than thrown failures
  • add focused coverage for the error shape and derived message

Validation

  • vp test run scripts/mobile-native-static-check.test.ts (1 test)
  • vp run lint:mobile
  • vp check
  • vp run typecheck

Note

Low Risk
Localized change to a dev CLI script’s error modeling and tests; no runtime product or security surface.

Overview
Replaces the generic message-only native static-check failure with a schema-backed NativeStaticCheckCommandError that carries command, args, cwd, and exitCode when swiftlint / ktlint / detekt exit non-zero.

The error’s human-readable text is derived from those fields (e.g. which command failed and the exit code). A small Vitest file asserts the structured shape and message.

Reviewed by Cursor Bugbot for commit c1595e4. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Structure mobile native static-check failures into NativeStaticCheckCommandError

Replaces NativeStaticCheckError (a Data.TaggedError) with NativeStaticCheckCommandError built using Schema.TaggedErrorClass in mobile-native-static-check.ts. The new error exposes structured fields (command, args, cwd, exitCode) and a message getter that formats them. Adds a test in mobile-native-static-check.test.ts asserting both the structured fields and the computed message. Behavioral Change: callers now receive a different error type and a different message format when a spawned command exits non-zero.

Macroscope summarized c1595e4.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4991d283-e744-4328-b8a1-79dc3e66621b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/native-static-check-error

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This PR refactors an internal error class in a development script to use structured fields instead of a plain message string, with an accompanying unit test. No production runtime behavior is affected.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge
juliusmarminge merged commit 86db35c into main Jun 20, 2026
15 checks passed
@juliusmarminge
juliusmarminge deleted the codex/native-static-check-error branch June 20, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant