Repository navigation
Subpoena v0.1.0-alpha.3
Pre-release
Pre-release
·
38 commits
to main
since this release
Tagged v0.1.0-alpha.3 and python/v0.1.0a3. Python gains network
absence, lint, cross-examination with layer groups, session cgroups, the
production exporter, invariants by name and a pytest plugin. Running a
witness and registry-drift stay Go only.
- Python pytest plugin. Installing
subpoenaregisters a pytest11
plugin withsubpoena_harness,subpoena_watch_spawnsand
subpoena_sinkholefixtures, so a test no longer wiresHarness,
addfinalizeror the sinkhole's teardown by hand. - Python network absence (W6).
subpoena.witness.Sinkholeis the
loopback network witness: it records every connection that reaches it,
drains its accept queue onstop(), and reports health only once stopped.
subpoena.harnessgainsno_dial,require_no_dial,check_no_dialand
dial_to, under the same verdict rules as Go'sNoDial, plus
check_no_spawn.docs/ports.mdmakes network absence part of the port
contract. - Python invariants by name.
subpoena.invariants.load(name)reads
invariants/<name>.traceqlfrom the nearestinvariants/above the
caller (or a given directory), as Go'sinvariants.Loaddoes; an unknown
or path-shaped name raisesInvariantError.names()lists them. - Python
Trace.queryreturns aResultwithmatches,completeand
count(), as in Go; iterating orlen()still goes over the matches.
Trace.spans(trace_id)returns one trace's spans. - Python session cgroups (W2).
subpoena.cgroupportspkg/cgroup, so
a Python service can run a session's processes in
<root>/<trace id>, the cgroup the witness attributes by. On a real cgroup
the child places itself between fork and exec (Python has no
CLONE_INTO_CGROUP). Otherwise the PID is written after start, and a
failed placement comes back asplace_errso the caller can fall back to
lineage. - Python production tiers.
subpoena.productionportspkg/production:Exporterwraps a span exporter and removes test-tier attributes from spans, events and links without mutating the originals;collector_configemits the same collector transform processor as Go.test_tier_keyslists the test-tier keys. - Python lint (L1).
subpoena-lint <dir>(console script,
subpoena.lint) runs the eightinternal/lintrules over Python source
withast, resolving imports and aliases, so a renamedrequire_absent
is still the harness call. Unreadable files, invalid Python, missing
explicit configuration and star imports fail the run with exit 2.
Registry-drift stays a Go-only subcommand. - Python cross-examination catches up with Go. Layer groups with a
reviewedcross-masked.txt, parallel mutant runs (-j),-selectwith a
clean-baseline fallback to the full suite, and a per-result evidence file
under-evidence-dir. A grouped survivor never counts as killed, and a
masked layer stays listed.