1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python3
"""Backward-compat wrapper around `aperion-shield --diff`.
The behavior-diff explainer is now native Rust as of v0.6.0
(2026-05-18). This script remains in the tree so that CI workflows
or developer aliases originally wired against the Python prototype
keep working unchanged -- it just `exec`'s `aperion-shield --diff`
with the same arguments.
The `--format json` output schema is source-compatible with the
prototype, so callers consuming that JSON do not need to be updated.
Two prototype-only flags are silently dropped because they have no
equivalent in the native mode:
--shield-bin PATH -- the native mode IS the binary; if you need
to pick a non-PATH binary, invoke it
directly: `/path/to/aperion-shield --diff ...`
No other behaviour change. See `aperion-shield --diff --help` for
the full flag set, and `docs/shieldset-as-code.md` Layer 4 for the
PR-review pattern this enables.
"""
=
# Strip the prototype-only flag that the native mode does not
# accept. `--shield-bin PATH` was used to pick which binary to
# shell out to; the native mode IS the binary, so this is moot.
: =
= 0
: | None = None
=
=
+= 2
continue
=
+= 1
continue
+= 1
# Resolve which `aperion-shield` to invoke.
= or
return 2
# Hand off the entire diff invocation to the native mode.
=
# execvp never returns on success; if we get here, raise.
return 2