Skip to content

SCA-411: remove unused imports that #12563 landed on main - #12567

Merged
Git-on-my-level merged 1 commit into
mainfrom
fix/app-analyzer-ratchet-unused-imports
Sep 1, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
fix/app-analyzer-ratchet-unused-imports

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

What changed and why

main is red on the Flutter analyzer ratchet because PR #12563 ("Complete the home refresh") merged at 2026-09-01T21:46:43Z with its Dart Analyze & Tests check failing. That landed two unused_import violations onto main (unused_import: 2 found, baseline 0) and is blocking PRs that run the mobile job, including #12564.

Both leftovers are in app/lib/pages/home/home_content.dart: after #12563 deleted the get-started orbs / _startPhoneRecording, the app_snackbar.dart and enums.dart imports were unused. This PR deletes those two import lines and leaves the unused_import baseline at 0.

Closes SCA-411

Product invariants affected

none

How it was verified

Local bash app/scripts/analyze_ratchet.sh at this branch head (Flutter 3.44.5 / Dart 3.12.2):

Running: dart analyze --format=machine .
avoid_print: improved (26 found, baseline 29) — consider running --update-baseline to lock in
curly_braces_in_flow_control_structures: improved (0 found, baseline 6) — consider running --update-baseline to lock in
sort_child_properties_last: improved (1 found, baseline 2) — consider running --update-baseline to lock in
use_super_parameters: improved (5 found, baseline 6) — consider running --update-baseline to lock in
Analyzer ratchet passed.

Baselines for the improved categories were left alone. unused_import is back to 0.

Tests

No new Dart test. The analyzer ratchet (unused_import baseline 0) is the regression guard for this class of failure; a unit test that the import lines are absent would be a static tripwire, not behavioral coverage.

Failure class (fixes)

Failure-Class: new

Failure-class transition narrative (only when needed)

Registering FC-merged-past-red-analyzer-ratchet. Violated contract: a PR whose Dart Analyze & Tests job is red must not merge to main; #12563 did, and the two unused imports it left blocked later mobile PRs. Canonical prevention is already in-tree: app/scripts/analyze_ratchet.sh with unused_import baseline 0, run by .github/workflows/mobile-app-checks.yml. Do not raise that baseline to clear a red check, and do not merge while it is red. evidence_prs cites #12563 as the merged incident; this PR is the first instance fix.

🤖 Generated with Claude Code

Review in cubic

PR #12563 merged with Dart Analyze & Tests red, leaving two unused_import
violations in home_content.dart (app_snackbar and enums leftovers from the
deleted get-started orbs). The unused_import baseline is 0, so this blocked
later PRs that run the mobile job.

Register FC-merged-past-red-analyzer-ratchet for merging past a red
analyzer ratchet. Do not raise the unused_import baseline to clear it.

Failure-Class: new
Co-authored-by: Cursor <[email protected]>
Co-authored-by: multica-agent <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Confidence score: 5/5

  • In .github/failure-classes/FC-merged-past-red-analyzer-ratchet.json, the app/lib/ hint does not match nested Dart files, so prepare will miss this failure class for app/lib/... changes; update the hint to app/lib/**.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/failure-classes/FC-merged-past-red-analyzer-ratchet.json">

<violation number="1" location=".github/failure-classes/FC-merged-past-red-analyzer-ratchet.json:13">
P3: The `app/lib/` hint never matches Dart files below that directory, so `prepare` will not suggest this class for `app/lib/...` changes. Use `app/lib/**` instead.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

],
"evidence_prs": [12563],
"scope_hints": [
"app/lib/",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The app/lib/ hint never matches Dart files below that directory, so prepare will not suggest this class for app/lib/... changes. Use app/lib/** instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/failure-classes/FC-merged-past-red-analyzer-ratchet.json, line 13:

<comment>The `app/lib/` hint never matches Dart files below that directory, so `prepare` will not suggest this class for `app/lib/...` changes. Use `app/lib/**` instead.</comment>

<file context>
@@ -0,0 +1,19 @@
+  ],
+  "evidence_prs": [12563],
+  "scope_hints": [
+    "app/lib/",
+    "app/scripts/analyze_ratchet.sh",
+    "app/analysis_baseline.json",
</file context>
Suggested change
"app/lib/",
"app/lib/**",

@Git-on-my-level
Git-on-my-level merged commit 4390ae2 into main Sep 1, 2026
31 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/app-analyzer-ratchet-unused-imports branch September 1, 2026 22:39
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