Repository navigation
[UNFY-411] Upgrade flutter_lints and raise the SDK floor - #273
Conversation
Bump flutter_lints to 6 and raise the package to Flutter 3.47.7 / Dart 3.13. Apply the null-aware element fixes the new lint set asks for. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Reviewer's GuideImplementationApply null-aware element syntax to message ID parsing and nullable method-channel arguments without changing behavior.
UISwitch the example app’s Flutter Material imports to material_ui for Flutter 3.50 compatibility.
ConfigurationRaise the package and example SDK floors, upgrade and pin lint dependencies, pin the platform-interface dev dependency, and add material_ui to the example.
Update ignore configuration to allow the newly committed lockfiles to be tracked.
DocumentationDocument the new SDK floor, lockfile workflow, and breaking-release requirement.
TestsAdopt null-aware element syntax in test fixtures and update the commented example test import.
Lock files and vendored codeCommit the package and example dependency lockfiles resolved for the updated SDK and dependency constraints.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="pubspec.yaml" line_range="19" />
<code_context>
environment:
- sdk: ^3.12.0
- flutter: ">=3.47.0"
+ sdk: ^3.13.0
+ flutter: ">=3.47.7"
</code_context>
<issue_to_address>
**Documented SDKs cannot resolve package**
When contributors follow the SDK versions in AGENTS.md or consumers use Dart 3.12 or Flutter 3.44, pub rejects the raised Dart and Flutter constraints during dependency resolution, so contributors cannot complete setup or run checks and consumers cannot resolve the package or example at the documented minimum versions.
Restore the Dart `^3.12.0` and Flutter `>=3.44.0` constraints in `pubspec.yaml`.
Also at `example/pubspec.yaml:8-9`, `pubspec.yaml:20`.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: pubspec.yaml:19
SZ Code ReviewVerdict: FAIL Review boundary
Findings1. Canon blocker
Finding The updated flutter_lints dependencies in both manifests use ^6.0.0, and neither package has a committed lockfile. This violates CQS-DEP-02 and leaves the upgraded lint baseline unpinned. Required fix Pin flutter_lints to an exact version in both manifests and commit the corresponding lockfiles. 2. Canon blocker
Finding The SDK floor changes to Dart 3.13 and Flutter 3.47.7, but AGENTS.md line 54 still documents Dart ^3.12.0 and Flutter >=3.44.0. This introduces documentation drift contrary to DOC-RPO-06. Required fix Update the SDK requirements in AGENTS.md to match both changed manifests. 3. Canon blocker
Finding The current PR title starts with chore(UNFY-411), whereas TCA-BRN-04 requires the Linear identifier in brackets at the start. Required fix Rename the PR to start with [UNFY-411], followed by the change description. Auto-merge (shadow): eligible; the human still merges. |
There was a problem hiding this comment.
Reviewed head: abd19d93db7ed1a589ff40ad60d6a0f585ab631f
Comparison commit: 1887a279a93862353a7045b2a7dbc5d7c28b53cf
Revision: 1
SZ Code Review
Verdict: FAIL
Findings: 3
Review boundary
- Mode: full
- Scope: all
- Lifecycle: commit
- Base commit:
1887a279a93862353a7045b2a7dbc5d7c28b53cf - Reviewed commit:
abd19d93db7ed1a589ff40ad60d6a0f585ab631f - Reviewed changes: the whole branch since
1887a279a93862353a7045b2a7dbc5d7c28b53cf - Revision: 1
- Review cycle: 1 of 3
- Pre-push authoritative: yes
Findings
1. Canon blocker
- Location:
reference/simple-zen-code-quality-standard.md:255 - Evidence: documentation
- Canon document:
reference/simple-zen-code-quality-standard.md
Finding
The updated flutter_lints dependencies in both manifests use ^6.0.0, and neither package has a committed lockfile. This violates CQS-DEP-02 and leaves the upgraded lint baseline unpinned.
Required fix
Pin flutter_lints to an exact version in both manifests and commit the corresponding lockfiles.
2. Canon blocker
- Location:
reference/simple-zen-documentation-standard.md:332 - Evidence: documentation
- Canon document:
reference/simple-zen-documentation-standard.md
Finding
The SDK floor changes to Dart 3.13 and Flutter 3.47.7, but AGENTS.md line 54 still documents Dart ^3.12.0 and Flutter >=3.44.0. This introduces documentation drift contrary to DOC-RPO-06.
Required fix
Update the SDK requirements in AGENTS.md to match both changed manifests.
3. Canon blocker
- Location:
reference/simple-zen-toolchain-architecture.md:115 - Evidence: documentation
- Canon document:
reference/simple-zen-toolchain-architecture.md
Finding
The current PR title starts with chore(UNFY-411), whereas TCA-BRN-04 requires the Linear identifier in brackets at the start.
Required fix
Rename the PR to start with [UNFY-411], followed by the change description.
Flutter 3.50 deprecates package:flutter/material.dart; the example moves to material_ui. AGENTS.md states the new SDK floor. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every dev dependency is pinned exactly. simple_query_platform_interface comes from simple-query, so this repo's release tooling does not rewrite it as an internal package, and the caret range is not needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. The environment comment explained only the old 3.44 floor, the interface dev pin now says when to raise it, material_ui no longer sits under a stale Cupertino Icons comment, and the commented-out template test imports material_ui. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SZ Code ReviewVerdict: FAIL Review boundary
Findings1. Canon blocker
Finding Both manifests now pin flutter_lints to 6.0.0, but neither pubspec.lock nor example/pubspec.lock is committed. CQS-DEP-02 requires committed lockfiles as well as exact versions. Required fix Generate and commit the root and example lockfiles. 2. Canon blocker
Finding The diff adds material_ui 1.11.1 and migrates five example imports to it, but the supplied PR description does not mention or justify this new dependency, violating CQS-DEP-01. Required fix Explain the material_ui dependency and import migration in the PR description, including why it is required. Auto-merge (shadow): held for human review — gate/canon. |
There was a problem hiding this comment.
Reviewed head: 9b2327ead3ca0a6738d42a17666cfcef0ecc00a2
Comparison commit: 1887a279a93862353a7045b2a7dbc5d7c28b53cf
Revision: 1
SZ Code Review
Verdict: FAIL
Findings: 2
Review boundary
- Mode: full
- Scope: all
- Lifecycle: commit
- Base commit:
1887a279a93862353a7045b2a7dbc5d7c28b53cf - Reviewed commit:
9b2327ead3ca0a6738d42a17666cfcef0ecc00a2 - Reviewed changes: commits since the completed review of
abd19d93db7ed1a589ff40ad60d6a0f585ab631f - Revision: 1
- Review cycle: 1 of 3
- Pre-push authoritative: yes
Findings
1. Canon blocker
- Location:
reference/simple-zen-code-quality-standard.md:255 - Evidence: documentation
- Canon document:
reference/simple-zen-code-quality-standard.md
Finding
Both manifests now pin flutter_lints to 6.0.0, but neither pubspec.lock nor example/pubspec.lock is committed. CQS-DEP-02 requires committed lockfiles as well as exact versions.
Required fix
Generate and commit the root and example lockfiles.
2. Canon blocker
- Location:
reference/simple-zen-code-quality-standard.md:251 - Evidence: documentation
- Canon document:
reference/simple-zen-code-quality-standard.md
Finding
The diff adds material_ui 1.11.1 and migrates five example imports to it, but the supplied PR description does not mention or justify this new dependency, violating CQS-DEP-01.
Required fix
Explain the material_ui dependency and import migration in the PR description, including why it is required.
Raising the floor to Flutter 3.47.7 / Dart 3.13 drops SDKs the current releases accept, so the next release is a major version (the next minor for 0.x packages). The Unreleased entries now say so, for whoever dispatches the release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SZ Code ReviewVerdict: FAIL Review boundary
Findings1. Canon blocker
Finding Root and example lockfiles remain uncommitted, contrary to CQS-DEP-02. The PR's claimed published-library exception has no completed ADR and does not establish an exception for the unpublished example app. Required fix Commit both lockfiles, or obtain explicit operator approval and complete the required exception ADR covering each omitted lockfile. Auto-merge (shadow): held for human review — gate/canon. |
There was a problem hiding this comment.
Reviewed head: 62fd9079010adff018b7103690d1bbdd97ae864a
Comparison commit: 1887a279a93862353a7045b2a7dbc5d7c28b53cf
Revision: 1
SZ Code Review
Verdict: FAIL
Findings: 1
Review boundary
- Mode: full
- Scope: all
- Lifecycle: commit
- Base commit:
1887a279a93862353a7045b2a7dbc5d7c28b53cf - Reviewed commit:
62fd9079010adff018b7103690d1bbdd97ae864a - Reviewed changes: commits since the completed review of
9b2327ead3ca0a6738d42a17666cfcef0ecc00a2 - Revision: 1
- Review cycle: 1 of 3
- Pre-push authoritative: yes
Findings
1. Canon blocker
- Location:
reference/simple-zen-code-quality-standard.md:255 - Evidence: documentation
- Canon document:
reference/simple-zen-code-quality-standard.md
Finding
Root and example lockfiles remain uncommitted, contrary to CQS-DEP-02. The PR's claimed published-library exception has no completed ADR and does not establish an exception for the unpublished example app.
Required fix
Commit both lockfiles, or obtain explicit operator approval and complete the required exception ADR covering each omitted lockfile.
CQS-DEP-02 requires a committed lockfile. Stop ignoring pubspec.lock and commit every package's and the example's lockfile, regenerated on Flutter 3.50 the way CI resolves them (the tracked pubspec_overrides.yaml links). pub leaves pubspec.lock out of published archives, and Deploy's hosted pub get only rewrites the runner's copy. AGENTS.md says when to commit lockfile changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review stopped after 3 complete reviews retained unresolved findings. Operator direction is required before another review. Outstanding unresolved findings1. canon finding
|
Part of UNFY-408 (dependency upgrade across Unify and the simple plugins). Closes UNFY-411.
What changed
flutter_lints5 → 6 in the package and the example, pinned exactly (6.0.0). The dev dependencysimple_query_platform_interfaceis pinned exactly too (0.2.2).use_null_aware_elements.dart fixapplied its six findings (if (x != null) 'k': x→'k': ?x) in twolib/files and two tests. Behaviour is unchanged.Flutter 3.50
Stable moved to Flutter 3.50 while this PR was open, and CI runs on stable. 3.50 deprecates
package:flutter/material.dart, so the example importspackage:material_ui(1.11.1).Merge order
CI checks out
simple-permissionsandsimple-queryatmain. Merge jake-dev-99/simple-permissions#71 and jake-dev-99/simple-query#78 first. This branch was verified locally against those branches.Verification (local, Flutter 3.50.0)
./scripts/verify_mms_migration.sh: passed.flutter analyze --no-fatal-warnings: no issues (package and example).flutter test: 404 tests pass.flutter pub publish --dry-run: 0 warnings.flutter build apk --debugin the example, then./gradlew :simple_sms_native:testDebugUnitTest: BUILD SUCCESSFUL.pubspec.lockin any published archive.python3 -m unittest discover -s tool -p 'test_*.py': 158 tests OK, 4 skipped.Not fixed here:
example/test/widget_test.darthas nomainand fails to load, the same as onmain. Tracked in UNFY-416.Reviews
Simple Zen canon review (
sz-code-review, quick then full, at this head): PASS, no findings.The first full review flagged the caret on
simple_query_platform_interface, and it is now pinned exactly. I had wrongly told the reviewer that the release tooling needs ranges for it. The tooling only rewrites packages from this repo, and this package comes from simple-query.Lockfiles (CQS-DEP-02): fixed. Every package's and the example's
pubspec.lockis now committed, regenerated on Flutter 3.50 the way CI resolves it (through the trackedpubspec_overrides.yamllinks and sibling checkouts). Trade-off: CI now tests the locked versions instead of the newest versions the constraints allow, so newer dependencies arrive through a committedflutter pub upgrade. pub leavespubspec.lockout of published packages, and Deploy'spub getagainst hosted packages only rewrites the runner's copy.osv-scannerfinds no advisories in the committed lockfiles. AGENTS.md now says when to commit lockfile changes.One item is left to a canon amendment Jake is handling outside this PR (not a repo ADR): published libraries keep caret ranges for runtime dependencies. Dev dependencies are pinned exactly.
/code-reviewran on every commit. Outcomes:material_uisat under a stale "Cupertino Icons" comment → fixed.flutter/material.dart→ fixed.0.2.2interface pin can lagsimple_query's own floor → kept, as the operator ruled (exact dev pins). The pin now carries a comment saying when to raise it. Dev dependencies never reach consumers.material_uiis pinned exactly in an unpublished example → refuted. Examples are apps, and apps pin exactly.Review conversations
🤖 Generated with Claude Code
Summary by Sourcery
Upgrade linting and example compatibility while raising the package SDK floor to match the Unify app.
Enhancements:
Build:
Documentation:
Summary by CodeRabbit