Skip to content

test: catalog-wide statistical fidelity; REP-018 entry login joins hop 1 - #119

Merged
404SecNotFound merged 1 commit into
mainfrom
claude/catalog-fidelity
Oct 19, 2026
Merged

404SecNotFound merged 1 commit into
mainfrom
claude/catalog-fidelity

Conversation

@404SecNotFound

Copy link
Copy Markdown
Owner

Summary

Roadmap 2026-09 item 6, "assert each technique's emitted stream satisfies the quantitative property it claims". v0.10.0 recorded it as shipped, but tests/test_statistical_fidelity.py measured four claims on REP-001, REP-004 and REP-016. This PR closes the gap between the title and the guard.

tests/test_catalog_fidelity.py measures at least one distributions claim for each of the 26 catalog entries that predate the dedicated per-technique files. It runs on the attack stream at every preset over five seeds (390 cases), and each check quotes the catalog text it measures. The claims covered:

  • interval and jitter envelopes (REP-001, REP-012 both modes)
  • byte bands and ratios (REP-005, REP-014, REP-023, REP-024)
  • preset counts, with truncation by the engine ceiling allowed but never exceeded
  • port sets, label lengths, per-label entropy and qtype mix (REP-004, REP-015, REP-016)
  • spike-then-decay (REP-010)
  • geometric source growth (REP-013)
  • heavy-tailed inbound sources (REP-021)
  • severity escalation (REP-022)
  • role-aware joins and ordering (REP-018, REP-043)

The five newest entries (REP-028, REP-046, REP-052, REP-053, REP-054) already measure every claim in their own files, and the suite asserts those files exist. A completeness guard fails when an entry is added with neither.

One claim is listed as not measurable rather than dropped. REP-011's "> 900 km/h" can't be checked because the GeoIP tags are fictional countries with no coordinates.

One engine defect found and fixed. REP-018's entry VPN login named no inside address, so the path a rule follows began at hop 2, and "a login into hop 1" was not observable in the records. The tunnel-up now carries tunnelip set to hop 1, which is the src of the next login. It is the same join REP-011 gained on 2026-10-07. No random draw changed, so every other field of every plan is identical.

Four of the first five failures were the check, not the engine. That is recorded in CLAUDE.md so the next author reads the claim and the builder before calling a failure a defect.

  • The catalog clock is UTC+04:00.
  • ipaddress.is_private is true for the documentation ranges every synthetic external pool uses.
  • REP-008's compressed hour is 3601 s inclusive.
  • REP-014 reports duration per session, growing per share.

A stacked follow-up PR fixes a REP-018 foil defect found while making this change.

Verification

  • Positive controls, each against a deliberately broken builder, then restored:
    • REP-001 jitter tripled: 15 of 15 REP-001 cases failed;
    • REP-004 qtype weighted to A: 15 of 15 failed;
    • REP-023 out bytes widened: 15 of 15 failed;
    • REP-018 entry join removed: 15 of 15 failed (this was also the state of main);
    • REP-030 removed from the registry: the completeness guard failed naming it.
  • Full Python suite green, run after rebasing onto main with fix: inbound traffic direction on PAN-OS and Check Point #118; ruff, black --check, mypy replicant clean. The new file runs in about two minutes.

Documentation impact

  • docs/roadmap-2026-09.md: dated implementation note. It replaces the stale "Nothing here is implemented yet" with the measured status, and says plainly that items 6, 8 and 14 shipped narrower than their titles.

  • CHANGELOG.md Unreleased: the suite, and the REP-018 fix.

  • CLAUDE.md: phase-plan note with the new rule (a new technique needs a measured fidelity claim).

  • README.md: the v0.10.0 line now says the fidelity suite was narrow at first.

  • replicant/data/technique-catalog.yaml: REP-018's path text names the join.

  • tests/test_statistical_fidelity.py: docstring points at the new file.

  • Unaffected: vendor references (no new key; tunnelip renders through the existing optional keys on all three vendors), docs/run-manifest.md, the web UI.

  • Maintained documentation changed alongside the behavior, or unaffected surfaces are explained above.

  • CHANGELOG.md records the operator-visible change.

  • Historical decision records were preserved or received a dated addendum.

  • Documentation claims were checked against the implemented behavior.

Scope boundary

  • This measures that the stream matches its own catalog entry. It does not show that the entry matches real traffic, and it does not show that a rule fires. The launch gate in CLAUDE.md is unchanged.
  • Thresholds are the catalog's own numbers where it states them. Where it gives only a qualitative word ("small", "low variance", "mostly"), the bound chosen is written in the check.

Generated by Claude Code

Roadmap 2026-09 item 6 shipped in v0.10.0 as four checks on three
techniques. tests/test_catalog_fidelity.py measures at least one
distributions claim for every catalog entry at every preset over five
seeds, with a completeness guard that fails when an entry has none. The
five newest entries are covered by their dedicated files.

Its first run found REP-018's entry VPN login named no inside address,
so the chain began at hop 2. The tunnel-up now carries tunnelip = hop 1.
No random draw changed.

Positive controls: REP-001 jitter x3, REP-004 qtype to A, REP-023 wide
bytes and REP-018 without the join each failed 15 of 15 cases; dropping
REP-030 from the registry failed the completeness guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtL63gY2LQZtZwgNwDM8vs
@404SecNotFound
404SecNotFound merged commit eb3ec43 into main Oct 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants