Found while reviewing
feat/v06-batch at 13891f1.
python/tan/core/flash_plan.py:1325-1328, beside the one write that can brick slot0:
A .hex, or an ELF with no sibling .bin, still hits the refusal below untouched.
is_raw_bin("zephyr.hex") is false, so :1331-1333 swaps in zephyr.bin and :1334 passes. The .hex does not hit the refusal. a4ef232's commit message repeats the same false claim.
#353's own acceptance text is explicit: "#311's guard stays exactly as strict for anything that is genuinely not a raw image — it should refuse a .hex".
And python/tests/commands/test_flash_command.py:2247:
def test_a_hex_artefact_is_refused_even_with_a_sibling_bin(...):
"""... the guard's job is to refuse anything that is not a raw image, and a
`.hex` ... is exactly that. Resolving it would silently flash a DIFFERENT
artefact than the manifest named ..."""
...
assert "zephyr.bin 0x80010000" in script
The body asserts the .hex is not refused. A green test under that name is affirmative evidence for a fact that is false — the worst shape a test can take, because it makes the next reader stop looking.
Why it matters beyond tidiness
The resolution is stem-based and extension-agnostic: any foo.<anything> next to a foo.bin silently becomes foo.bin. A manifest naming zephyr.hex gets zephyr.bin written to MRAM without a word. That may well be the behaviour we want — but three places currently document the opposite of what one line of code does, and the disagreement sits next to loadbin.
Acceptance criteria
Pick one and make all four agree — code, comment, commit-message claim, test name:
(a) is the smaller behavioural surface and matches what was agreed on #353; state the reason for whichever is chosen.
- The refusal or the resolution names the artefact it received AND the one it will actually write.
- The test's name, docstring and body agree.
Related: #311, #353.
Found while reviewing
feat/v06-batchat13891f1.python/tan/core/flash_plan.py:1325-1328, beside the one write that can brick slot0:is_raw_bin("zephyr.hex")is false, so:1331-1333swaps inzephyr.binand:1334passes. The.hexdoes not hit the refusal.a4ef232's commit message repeats the same false claim.#353's own acceptance text is explicit: "#311's guard stays exactly as strict for anything that is genuinely not a raw image — it should refuse a
.hex".And
python/tests/commands/test_flash_command.py:2247:The body asserts the
.hexis not refused. A green test under that name is affirmative evidence for a fact that is false — the worst shape a test can take, because it makes the next reader stop looking.Why it matters beyond tidiness
The resolution is stem-based and extension-agnostic: any
foo.<anything>next to afoo.binsilently becomesfoo.bin. A manifest namingzephyr.hexgetszephyr.binwritten to MRAM without a word. That may well be the behaviour we want — but three places currently document the opposite of what one line of code does, and the disagreement sits next toloadbin.Acceptance criteria
Pick one and make all four agree — code, comment, commit-message claim, test name:
.hexas flash: an AEN801 slot0 flash needs four values nothing in the chain emits -- no ATOC signing step, an ELF artefact, no probe selection #353's acceptance text says: restrict the sibling resolution to artefacts that are plausibly ELF (no extension,.elf,.out), leave everything else to the refusal.(a) is the smaller behavioural surface and matches what was agreed on #353; state the reason for whichever is chosen.
Related: #311, #353.