Repository navigation
fix(app): refuse remote APIs in hermetic tests; add a lane-bootstrap that skips the full backend lock - #14321
Merged
Git-on-my-level merged 3 commits intoSep 17, 2026
Conversation
app/test.sh skipped writing .dev.env when generated files already existed, so a leftover API_BASE_URL or mobile_beta/prod pairing could silently survive. Fail closed at the checker, test.sh, and doctor without rewriting the file. Failure-Class: new Co-authored-by: Cursor <[email protected]>
A linked worktree can run cheap pre-push gates and app/test.sh after one idempotent command: pinned Flutter, shared PUB_CACHE, Python 3.11 via uv, and yaml+dotenv only. An incomplete .venv directory is no longer treated as ready. Failure-Class: none Co-authored-by: Cursor <[email protected]>
Manifest-contract stubs only accepted `import yaml`. The resolver now probes `import dotenv, yaml` so an empty .venv is not treated as ready, and those stubs were skipped. Failure-Class: none Co-authored-by: Cursor <[email protected]>
Git-on-my-level
force-pushed
the
task/msd-harness-v4-v7-bootstrap-hermeticity
branch
from
September 17, 2026 11:37
f9765b6 to
5adcd22
Compare
kodjima33
approved these changes
Sep 17, 2026
kodjima33
left a comment
Collaborator
There was a problem hiding this comment.
Dev/test-harness hardening, not a user-facing bug fix -- treated as approve-only per 'unsure bug vs feature' rule. Flagged author elevated scrutiny -- diff reviewed, no .github/workflows touched, no abuse signals found.
Git-on-my-level
deleted the
task/msd-harness-v4-v7-bootstrap-hermeticity
branch
September 17, 2026 16:54
Git-on-my-level
restored the
task/msd-harness-v4-v7-bootstrap-hermeticity
branch
September 17, 2026 17:02
Git-on-my-level
deleted the
task/msd-harness-v4-v7-bootstrap-hermeticity
branch
September 17, 2026 17:02
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.
Summary
app/test.shandmobile-session doctorfail closed whenapp/.dev.envnames a non-empty non-loopbackAPI_BASE_URL, or when flavor/profile is anything butdev+local_dev. They refuse; they do not rewrite the file.app/test.shused to skip writing.dev.envonce generated files existed, so a leftoverhttps://api.omi.me/(ormobile_beta/prod) survived silently.make lane-bootstrapis the one idempotent command that takes a fresh linked worktree to “cheap pre-push gates can run andbash app/test.shcan run”. It checks Flutter 3.44.5, sharesPUB_CACHE, creates a Python 3.11backend/.venvvia uv (never system 3.14), and installs onlypython-dotenv+PyYAML— notuv pip sync pylock.macos.toml(llvmlite/scipy/av/pyarrow). An incomplete.venvdirectory is no longer treated as ready: the resolver and doctor probeimport dotenv, yamland point atmake lane-bootstrap.make setupstalling ~20 minutes on heavy wheels, andgit pushdying atcheck_desktop_flow_lint_if_neededwith “desktop E2E flow metadata checks require Python 3 and PyYAML” becausebackend/.venvexisted but was empty of extras. Always-on cheap gates are stdlib; desktop-flow-lint needs PyYAML; harness wrappers need python-dotenv.Failure-Class: new
The new class is
FC-hermetic-suite-points-at-remote-api.Product invariants affected
Test plan
bash scripts/dev-harness/run-tests.sh— 285 passed, 7 skippedbash app/scripts/check_hermetic_test_env_test.sh— refuses remote/LAN/mobile_beta/prod/OMI_APP_TEST_USE_PROD_API_DEFAULT=1without rewritingmake lane-bootstrapon this fresh worktree (warm caches): real 37.92s (user 36.08,sys 2.88); idempotent second run real 4.60s; remote.dev.envrefused and file left unchangedbackend/.venv/bin/python -c 'import dotenv, yaml'after bootstrap (Python 3.11.15)mobile-session doctor --platform android --platform iosafter bootstrap:backend-venvready; Androidagent-remediable(ANDROID_HOMEunset); iOS Xcode 27.0 + iOS 26.5 ready; 860.2GiB freescripts/pr-preflight --pr-body-file .local/pr-body-v4-v7.md— 17 checks passed in 96.59sFresh-worktree-to-first-run
Warm-cache target was < 5 minutes. Measured on this host:
make lane-bootstrapmake lane-bootstrapapp/test.shwithout this bootstrap (includes suite)bash app/test.shmake setup-backend/ full pylock sync is still opt-in when the change touches backend code.Part of the mobile self-driving program (Harness lane, packages V4 and V7). Implemented by Cursor
cursor-grok-4.6-high. Coordinator verification on the head commit:bash scripts/dev-harness/run-tests.sh285 passed / 7 skipped;app/scripts/check_hermetic_test_env.shrefuses a remote URL, a loopback-lookalike host (127.0.0.1.evil.example) and a userinfo trick ([email protected]), and accepts empty and loopback;make lane-bootstrapre-run in place completes in 3 s and leaves the tree clean. The 38 s fresh-worktree figure is the lane's own measurement and was not independently re-measured.🤖 Generated with Claude Code