Skip to content

Commit 9bed20f

Browse files
committed
style(step7): the gate's own source passes its own repository's linter
Three ruff findings, all mine: an unsorted import block, one over-long line inside the witness source, and an unpacked name a control never reads. The long line is inside WITNESS_SOURCE, so wrapping it edits the script the gate runs against the target tree's tools. Hoisting the identity into a local changes nothing it does, and the controls and probes were re-run to say so rather than assumed: 15 merge gate controls pass, host qualification 26/26, and the three real merge probes still come back 0 / 1 / 1 with the same predicates. This is a lint pass only. No predicate, no attack and no message moved, and 30d2f32 is untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018xhcg5opoFbSTdYHpkSXCh
1 parent b72cef5 commit 9bed20f

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎scripts/step7/mergegate.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from __future__ import annotations
3131

3232
import argparse
33-
3433
import json
3534
import re
3635
import subprocess
@@ -154,9 +153,11 @@ def w(name, doc):
154153
CAND = b"candidate bytes"
155154
cand = tmp / "cand.bin"; cand.write_bytes(CAND)
156155
qpath = w("qual.json", QUAL)
156+
IDENT = QUAL["environment_identity_sha256"]
157157
stratum_block = lambda m, extra: {"qualification_sha256": hq.sha256_file(qpath),
158-
"environment_id": "env-1", "host_fingerprint": "sha256:abc",
159-
"environment_identity_sha256": QUAL["environment_identity_sha256"],
158+
"environment_id": "env-1",
159+
"host_fingerprint": "sha256:abc",
160+
"environment_identity_sha256": IDENT,
160161
"candidate_sha256": hq.sha256_bytes(CAND),
161162
"candidate_bytes": len(CAND), "memory_metric": m, **extra}
162163
BINDING = {"kind": eb.BINDING_SCHEMA, "schema": 1,

‎tests/test_step7_mergegate.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def control_complete_tree() -> None:
245245

246246
def control_missing_instrument() -> None:
247247
with tempfile.TemporaryDirectory() as raw:
248-
repo, commit = world(Path(raw))
248+
repo, _commit = world(Path(raw))
249249
# the instrument moves after T0 named it — the exact intermediate state a
250250
# stray merge produces when the repair PR is not in yet
251251
drifted = commit_tree(repo, {eb.INSTRUMENT_SOURCES[0]: "print('older')" + NL})

0 commit comments

Comments
 (0)