Found while reviewing
feat/v06-batch at 13891f1.
The agreed shape for SETOOLS is: it is license-gated, obtained from Alif, and never redistributed by tan or alp-sdk — the customer installs it themselves and points tan at it, and tan warns clearly when it is missing. python/tan/core/setools.py:98-108 accepts two sources:
flash_args.setools_dir, read from build/system-manifest.yaml;
- the
SETOOLS_DIR environment variable.
Both are broken as the customer's durable answer:
- There is no
--setools-dir flag. tan flash --help offers nothing.
build/system-manifest.yaml is regenerated by tan build (python/tan/commands/build/manifest.py:211), and the alp-sdk emit carries no setools_dir key — so a customer's hand-edit is destroyed by their next build, silently.
SETOOLS_DIR is documented nowhere. git grep SETOOLS_DIR -- docs README.md returns nothing. The only place a customer ever learns the variable exists is unresolved_message(), which they reach by failing first.
Impact
The one supported way to configure a license-gated tool is an undocumented environment variable, discoverable only by triggering an error. The alternative the code offers is a file that gets overwritten. For a first flash to real silicon this is the step most likely to strand someone.
Acceptance criteria
- A
--setools-dir <PATH> flag on tan flash, taking precedence over SETOOLS_DIR, which in turn takes precedence over flash_args.setools_dir. The precedence order is stated in --help.
README.md documents all three, says SETOOLS is obtained from Alif and is not redistributed, and does not link anything login-gated.
unresolved_message() names every accepted source, in precedence order, with the flag first.
- Either
tan build preserves an existing flash_args.setools_dir across a regeneration, or the docs say plainly that the manifest field is build-owned and not the place to put it.
- A test covers precedence with all three set.
Related: #353.
Found while reviewing
feat/v06-batchat13891f1.The agreed shape for SETOOLS is: it is license-gated, obtained from Alif, and never redistributed by tan or alp-sdk — the customer installs it themselves and points tan at it, and tan warns clearly when it is missing.
python/tan/core/setools.py:98-108accepts two sources:flash_args.setools_dir, read frombuild/system-manifest.yaml;SETOOLS_DIRenvironment variable.Both are broken as the customer's durable answer:
--setools-dirflag.tan flash --helpoffers nothing.build/system-manifest.yamlis regenerated bytan build(python/tan/commands/build/manifest.py:211), and the alp-sdk emit carries nosetools_dirkey — so a customer's hand-edit is destroyed by their next build, silently.SETOOLS_DIRis documented nowhere.git grep SETOOLS_DIR -- docs README.mdreturns nothing. The only place a customer ever learns the variable exists isunresolved_message(), which they reach by failing first.Impact
The one supported way to configure a license-gated tool is an undocumented environment variable, discoverable only by triggering an error. The alternative the code offers is a file that gets overwritten. For a first flash to real silicon this is the step most likely to strand someone.
Acceptance criteria
--setools-dir <PATH>flag ontan flash, taking precedence overSETOOLS_DIR, which in turn takes precedence overflash_args.setools_dir. The precedence order is stated in--help.README.mddocuments all three, says SETOOLS is obtained from Alif and is not redistributed, and does not link anything login-gated.unresolved_message()names every accepted source, in precedence order, with the flag first.tan buildpreserves an existingflash_args.setools_diracross a regeneration, or the docs say plainly that the manifest field is build-owned and not the place to put it.Related: #353.