feat: shared dual-compiler web gate (dart2js + dart2wasm) - #20
Merged
Conversation
verify_web_gate.sh compiles a consumer's example under both web compilers. dart2js and dart2wasm have different type models, so js-interop code that dart2js accepts (a non-exhaustive JSAny switch, an unsound interop cast) dart2wasm can reject. Nothing in the toolchain caught this: the analyzer and dart2js use the JS model (switch looks exhaustive), and pana's wasm tag is an import heuristic, not a compile. A user hit it (pdf_manipulator web WASM build) while CI stayed green. The gate is added to stamped-files.txt so it's drift-guarded into consumers like the other tool/ gates. Consumers wire verify-web to run it (both compilers, existing web CI rows pick it up).
This comment has been minimized.
This comment has been minimized.
development-standards.md bans ${VAR:-default} env-var fallbacks in scripts —
they create hidden branching where a laptop and CI silently diverge. The gates
now require DART / FLUTTER / EXPECTED_PLATFORMS via :? (crash clear if the caller
didn't set them). The one default lives in the Makefile (FLUTTER ?= fvm flutter),
which passes the values explicitly.
verify_web_gate hardcodes example/ (the fixed Flutter package layout, not a
config value). analyze_core keeps its filesystem auto-detection of ANALYZE_DIRS /
EXAMPLE_DIR — deterministic detection, not an env fallback.
Consumers pass the now-required vars from their Makefile targets on adoption.
This comment has been minimized.
This comment has been minimized.
slopfairy
approved these changes
Jul 6, 2026
slopfairy
left a comment
There was a problem hiding this comment.
Tip
Approved — clean addition of the dual-compiler web gate with required-env hardening across all gate scripts
✅ Checked
tool/verify_web_gate.sh— new shared gate;set -euo pipefail, FLUTTER enforced via:?(no fallback), intentional SC2086 on the multi-word$FLUTTERwith explanatory comment, bash-3.2 portable throughouttool/analyze_core.sh— DART and FLUTTER changed from${VAR:-fvm dart}defaults to:?required; ANALYZE_DIRS and EXAMPLE_DIR auto-detection kept intact (deterministic, not a fallback); header comment updated accuratelytool/platforms_gate.sh— DART and EXPECTED_PLATFORMS changed from defaults to:?required; PANA_VERSION:?guard unchanged; validations moved before the SCRIPT_DIR/cd block so failure is immediatetool/stamped-files.txt—verify_web_gate.shadded to the stamp list; correctdocs/CAPABILITY_ROADMAP.md— two new DONE entries, accurate and readable- No changes to
.github/workflows/,actions/,hooks/, ortool/versions.env— no workflow-security, supply-chain, or injection surfaces touched - All scripts remain bash-3.2 portable (no case-modification expansions, no
mapfile, no associative arrays);shellcheckdisables are all intentional and commented
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.
Two gate changes that re-stamp together.
1. New
verify_web_gate.sh— dual-compiler web gateCompiles a consumer's example under both web compilers (
flutter build web+--wasm), registered instamped-files.txtso it's drift-guarded into consumers. A user hit a dart2wasm compile error on a package whose CI was fully green: dart2js and dart2wasm have different type models, and nothing in the toolchain compiles wasm (the analyzer + dart2js use the JS model, the interop lint misses switch patterns, pana's wasm tag is an import heuristic). This gate is the only honest check.2. Gates require their inputs — no env-var fallback
development-standards.mdbans${VAR:-default}env-var fallbacks in scripts — they create hidden branching where a laptop and CI silently diverge.analyze_core,platforms_gate, and the new gate now requireDART/FLUTTER/EXPECTED_PLATFORMSvia:?(crash clear if unset). The single default stays in the Makefile (FLUTTER ?= fvm flutter), which passes the values explicitly.verify_web_gatehardcodesexample/(fixed Flutter layout, §1.3).analyze_corekeeps its filesystem auto-detection (deterministic, not a fallback).Adoption
Consumers bump their pin to the tag this cuts, re-stamp all three gates, and pass the now-required vars from their
verify-web/analyze/platformstargets. Verified:make lint-shellclean.