fix(cli): carry sdk.discovery-divergent into the text channel, and give tan run a --confirm - #833
Merged
Merged
Conversation
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Aug 16, 2026
alpCaner
force-pushed
the
fix/799-809-envelope-run
branch
from
August 17, 2026 00:25
fe83560 to
1e12c1e
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Aug 17, 2026
added 6 commits
August 17, 2026 01:12
… give run --confirm Fixes #799: size/image/clean/run/validate each constructed their Envelope only inside `if json_mode:` and rendered text from a local issues/text list built strictly before that -- so the sdk.discovery-divergent warning Envelope.__init__ appends at its one shared seam reached --format json and stayed silent on the default text channel. pinmux_cmd.py was already correct (builds the envelope once, unconditionally, renders text from envelope.issues); this applies the same pattern to the other five, diffing each command's pre-envelope issues against envelope.issues so only what the seam actually added is rendered. Fixes #809: `run` had no way to arm the flash confirm gate, so a hardware target (e.g. E1M-AEN801 Flow D) always landed every slice as `planned` and exited 1 with flash.nothing-flashed -- whose own remedy names --confirm, a flag `run` rejected. Adds --confirm to `run` and threads it into flash_cmd._run as confirm_flag, and updates the README quickstart, walkthrough step, and Common-commands table to show and explain the gate. The gate itself stays gate-by-default, unchanged.
… close the help gap, scope the envelope build, pin the divergence text Adds the missing tests for #809's --confirm plumbing (run --flash --confirm reaches flash_cmd._run with confirm_flag=True, defaults to False when omitted, and --confirm is on run's --help), amends --flash's own help text to name the second opt-in it gates, scopes validate_cmd's now-unconditional Envelope/data construction to the TEXT/JSON branches so sarif/diagnostic-v1 stop paying for _with_sdk_divergence's filesystem walk, and pins the narrow-text-channel divergence assertion to a stable phrase plus the warning: severity prefix instead of just the two checkout paths.
…rm on the parser (tan-cli#799/#809)
…ious rebase pass The previous rebase's merge-resync entry double-counted growth in clean_cmd.py/size_cmd.py/validate_cmd.py that is already fully accounted for by this branch's own three tan-cli#799 ledger entries directly above it. origin/dev never touches those three modules, so there was no genuine merge growth left to resync; the line was a stale artifact of the earlier rebase pass, not a real regen event.
alpCaner
force-pushed
the
fix/799-809-envelope-run
branch
from
August 17, 2026 01:15
1e12c1e to
c8bfddf
Compare
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
#799 —
sdk.discovery-divergentnever reached the text channel.The warning is appended inside
Envelope.__init__(via_with_sdk_divergence), butsize,image,clean,runandvalidateeach construct the Envelope only inside theirif json_mode:branch and render text from a pre-envelopeissueslocal. So a user running any of those five without--format jsonwas never told that two alp-sdk checkouts resolve from their directory and both reportsourceTier "discovery"— the exact condition the warning exists to surface.pinmux_cmd.pywas already correct: it builds the Envelope once, unconditionally, and renders text fromenvelope.issues. The five commands now follow that pattern.#809 — the README quickstart's
tan run --flashcould not arm the confirm gate.The quickstart, the walkthrough step and the Common-commands table all document
tan run --flash, andgrep -n -i confirm README.mdreturned zero hits. Butrunhad no--confirmoption and never passedconfirm_flag, so on an E1M-AEN801 Flow D target every slice came backplanned,flash.nothing-flashedfired, and the command exited 1 — while printing a remedy whose first suggestion is--confirmon the command line, a flagtan runrejects. The only working command-line route was the separatetan flash --confirmsubcommand.runnow accepts--confirmand threads it through asconfirm_flag, so the printed remedy is self-consistent, and the README documents the gate at all three places. The gate itself is unchanged and still closed by default — this only givesruna way to arm it explicitly, plus honest docs.--flash's own help now names the second opt-in too, rather than promising a write it cannot perform alone.Test plan
python -m pytest tests/gates -qfrompython/: 465 passed, 9 skipped.origin/devunder identical conditions: 22 vs 22, difference empty in both directions. Collect-only diff: +10 tests, 0 removed.run_cmd.pyreddens the four new run tests plus the[run]divergence case; revertingclean_cmd/image_cmd/size_cmd/validate_cmdreddens[clean] [image] [size] [validate].python python/scripts/assemble_changelog.py --checknow lists both fragments (7 pending).Two defects caught in review, recorded because they were nearly shipped
Both were tests that could not fail — worth knowing about, since one was on a
flash-pathflag:"warning:"assertion shipped red for thevalidateparametrization: the other four commands printf"{issue.severity}: {issue.message}"butvalidate_cmdwrote a baref"{issue.message}". Fixed by giving validate's seam-addedsdk.*lines the severity prefix, so all five commands are consistent.--confirm-on-help assertion was vacuous — deleting the entiretyper.Option(False, "--confirm", …)block and the call-site forward left it green, because the amended--flashhelp text itself contains the literal string--confirm. It now asserts against the real parser, verified red-green by removing the option and watching it fail.Closes #799.
Closes #809.