fix(micromate): fixture metadata separates the measured firmware line from the version
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
1 parent
93349ed040
commit
f47b908a27
9 files changed
+21
-8
No files matched your search
@@ -73,6 +73,9 @@ def main() -> None:
|
||||
if len(reqs) != len(rsps):
|
||||
raise SystemExit(f"{slug}: {len(reqs)} requests vs {len(rsps)} responses")
|
||||
exchanges = []
|
||||
lines = {rp.firmware_line for rp in rsps}
|
||||
if len(lines) != 1 or lines & {"unknown"}:
|
||||
raise SystemExit(f"{slug}: responses report firmware lines {sorted(lines)}")
|
||||
for rq, rp in zip(reqs, rsps):
|
||||
sub = request_sub(rq)
|
||||
if rp.sub != 0xFF - sub or not rp.checksum_valid:
|
||||
@@ -83,7 +86,8 @@ def main() -> None:
|
||||
"source": str(bw.relative_to(REPO)),
|
||||
"source_sha256": {"bw": hashlib.sha256(bw.read_bytes()).hexdigest(),
|
||||
"s3": hashlib.sha256(s3.read_bytes()).hexdigest()},
|
||||
"unit": "UM12947", "firmware_line": "11.0CB",
|
||||
"unit": "UM12947", "firmware_version": "11.0CB",
|
||||
"firmware_line": lines.pop(),
|
||||
"exchanges": exchanges,
|
||||
}
|
||||
(OUT / f"{slug}.json").write_text(json.dumps(doc, indent=1) + "\n")
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"s3": "5b15f219ff58a64e61c8b2123034dfcc766465534479a61c1447ea6d66ffd878"
|
||||
},
|
||||
"unit": "UM12947",
|
||||
"firmware_line": "11.0CB",
|
||||
"firmware_version": "11.0CB",
|
||||
"firmware_line": "blastware",
|
||||
"exchanges": [
|
||||
{
|
||||
"sub": 91,
|
||||
|
||||
+2
-1
@@ -5,7 +5,8 @@
|
||||
"s3": "dd78a64ac15d1d93492d0db7e3bafceddc1533ad0b6e7f8a5d19bffd83ecce66"
|
||||
},
|
||||
"unit": "UM12947",
|
||||
"firmware_line": "11.0CB",
|
||||
"firmware_version": "11.0CB",
|
||||
"firmware_line": "blastware",
|
||||
"exchanges": [
|
||||
{
|
||||
"sub": 91,
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"s3": "f26370a1bc880dfb08afdf1f3199f9f2811f49bc43ca9d4c9d3dc2b3cabfdbef"
|
||||
},
|
||||
"unit": "UM12947",
|
||||
"firmware_line": "11.0CB",
|
||||
"firmware_version": "11.0CB",
|
||||
"firmware_line": "blastware",
|
||||
"exchanges": [
|
||||
{
|
||||
"sub": 91,
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"s3": "0fc85cd78df4002d97d9e9a1e6e94d9c1d99bc22935e3b2d1e72a552032c1b84"
|
||||
},
|
||||
"unit": "UM12947",
|
||||
"firmware_line": "11.0CB",
|
||||
"firmware_version": "11.0CB",
|
||||
"firmware_line": "blastware",
|
||||
"exchanges": [
|
||||
{
|
||||
"sub": 91,
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"s3": "d35497ca0ccf554e7bacd464723f3db1c052e2768785ef00b3689784b6e346bd"
|
||||
},
|
||||
"unit": "UM12947",
|
||||
"firmware_line": "11.0CB",
|
||||
"firmware_version": "11.0CB",
|
||||
"firmware_line": "blastware",
|
||||
"exchanges": [
|
||||
{
|
||||
"sub": 91,
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"s3": "d49a4fd199f5a32df2fc2ccdaaf27aaff9a11804dd54a2250efbc0a9e636d786"
|
||||
},
|
||||
"unit": "UM12947",
|
||||
"firmware_line": "11.0CB",
|
||||
"firmware_version": "11.0CB",
|
||||
"firmware_line": "blastware",
|
||||
"exchanges": [
|
||||
{
|
||||
"sub": 91,
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"s3": "4ef5db0c8b804ac646c61151366e52df3bda1d96a492d4b420cb8fe6934dcedb"
|
||||
},
|
||||
"unit": "UM12947",
|
||||
"firmware_line": "11.0CB",
|
||||
"firmware_version": "11.0CB",
|
||||
"firmware_line": "blastware",
|
||||
"exchanges": [
|
||||
{
|
||||
"sub": 91,
|
||||
|
||||
@@ -27,6 +27,8 @@ def test_all_seven_sessions_are_present():
|
||||
def test_every_request_is_a_valid_frame_and_every_response_answers_it(path):
|
||||
doc = json.loads(path.read_text())
|
||||
assert doc["source_sha256"]["bw"] and doc["exchanges"]
|
||||
assert doc["firmware_line"] in {"blastware", "thor"} # measured from response flags
|
||||
assert doc["firmware_version"] # the 09-30 audits' "11.0CB"
|
||||
for ex in doc["exchanges"]:
|
||||
wire = bytes.fromhex(ex["request"])
|
||||
assert request_sub(wire) == ex["sub"]
|
||||
|
||||
Reference in new issue
Block a user