Skip to content

Subpoena v0.1.0-alpha.3

Pre-release
Pre-release

Choose a tag to compare

@nickhenggeler nickhenggeler released this 01 Nov 12:47
· 38 commits to main since this release
0207ff0

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 subpoena registers a pytest11
    plugin with subpoena_harness, subpoena_watch_spawns and
    subpoena_sinkhole fixtures, so a test no longer wires Harness,
    addfinalizer or the sinkhole's teardown by hand.
  • Python network absence (W6). subpoena.witness.Sinkhole is the
    loopback network witness: it records every connection that reaches it,
    drains its accept queue on stop(), and reports health only once stopped.
    subpoena.harness gains no_dial, require_no_dial, check_no_dial and
    dial_to, under the same verdict rules as Go's NoDial, plus
    check_no_spawn. docs/ports.md makes network absence part of the port
    contract.
  • Python invariants by name. subpoena.invariants.load(name) reads
    invariants/<name>.traceql from the nearest invariants/ above the
    caller (or a given directory), as Go's invariants.Load does; an unknown
    or path-shaped name raises InvariantError. names() lists them.
  • Python Trace.query returns a Result with matches, complete and
    count(), as in Go; iterating or len() still goes over the matches.
    Trace.spans(trace_id) returns one trace's spans.
  • Python session cgroups (W2). subpoena.cgroup ports pkg/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 as place_err so the caller can fall back to
    lineage.
  • Python production tiers. subpoena.production ports pkg/production: Exporter wraps a span exporter and removes test-tier attributes from spans, events and links without mutating the originals; collector_config emits the same collector transform processor as Go. test_tier_keys lists the test-tier keys.
  • Python lint (L1). subpoena-lint <dir> (console script,
    subpoena.lint) runs the eight internal/lint rules over Python source
    with ast, resolving imports and aliases, so a renamed require_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
    reviewed cross-masked.txt, parallel mutant runs (-j), -select with 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.