feat(doctor): --offline-probe to certify the offline build closure#103
Merged
Conversation
`emb doctor --offline-probe --target <t>` certifies a cross target can build with the network denied, without running a build: it resolves the toolchain + sysroot from the store offline (failing closed on a miss), confirms each cargo module is vendored, and — under --strict — that a network namespace is available. Inputs only, so it stays a seconds-scale gate for CI to run after `emb fetch`; a miss exits non-zero with the fix. README updated; probe verdict type unit tested plus native/unknown/json paths on the command. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
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.
Adds the certification gate that proves a cross target can build with zero network — the last major piece of the offline fence (#98/#100/#101/#102).
What
emb doctor --offline-probe --target <name> [<project>]certifies a target's offline build closure is materialized, without running a build:build: cargomodule is vendored;--strict, that a network namespace is available (whatemb cross --offline-strictneeds).It checks inputs only, so it stays a seconds-scale gate for CI to run right after
emb fetchand before the network is cut. A missing input exits non-zero with the fix (emb fetch).--jsonemits the verdict as a{host, offline_probe}envelope.Structure
New
lib/src/cross/offline_probe.dartholds the pureProbeCheck/OfflineProbeverdict types (aggregation +toData);doctororchestrates the checks reusingCrossProject.selectTarget,CrossProvider.forTarget(offline: true),CargoVendor.locate, andnetnsAvailable.Test
dart analyze lib testclean;dart format --set-exit-if-changedclean.offline_probe_test.dart(verdict aggregation,toData);doctor_command_test.dartgains a--offline-probegroup (native passes, unknown target → usage, json envelope).real dpkg-deb/real debugfsenv failures.Docs
README
emb doctorsection documents--offline-probe/--strict, cross-linked from Offline builds (gate on it in CI after fetch).Follow-up