Skip to content

Add E/F/G and cyber-boundary controls with reference subjects and adversarial runner tests - #30

Closed
darklordVirtual wants to merge 5 commits into
controls/remora-b5e4c42-repairedfrom
tests/controls-reference-subjects
Closed

darklordVirtual wants to merge 5 commits into
controls/remora-b5e4c42-repairedfrom
tests/controls-reference-subjects

Conversation

@darklordVirtual

Copy link
Copy Markdown
Owner

Stacked on #29 (base controls/remora-b5e4c42-repaired). Tests and catalog only; no runner logic changed.

What is added

Catalog v1.3.0 (controls/aacp-controls-v1/catalog.json, 21 → 38 controls). No existing control changed.

  • A-G gaps: AACP-C-02 (argument substitution under a reused call id), AACP-E-01 (effect reachable with a credential held outside the enforcement point), AACP-F-01..03 (state change after approval, concurrent single-use consumption, expiry not checked at dispatch), AACP-G-01..02 (verified from response status alone; verifier failure reported as verified). Each has a normative_basis quoting SPECIFICATION §2 and a boundary.
  • AACP-CY-* outside A-G, mapped to the Stage 0 JX candidates in docs: expand Stage 0 agent cyber boundary checks #26: instruction promotion (JX-01), approval injection via tool result (JX-02), memory taint on resume (JX-03), runner-seeded canary egress with negative-provenance control (JX-04), cross-tenant cache (JX-05), redirect to forbidden peer (JX-06), policy parser vs connector (JX-08), tool substitution by display name (JX-09/10), verify-then-execute bytes (JX-11/12), self-reported block vs boundary observer (JX-14). Reported, never counted; no cyber verdict or profile.

Reference subjects tests/controls_reference/<id>/{weak.py,repair.json,probe.py}: one minimal subject per new control. tests/test_controls_reference_subjects.py runs all 17 through conformance.controls as a real binding would and requires: OBSERVED + DISCRIMINATES on the weak subject; NOT_OBSERVED + SENSITIVE on the repaired subject with the inverse edit as weakening; NON_VERDICT (exit 3) on a broken subject and on a refuse-everything subject; a report that FAILs exactly the control's property, never PASS; a clean checkout afterwards. Network subjects use runner-owned loopback endpoints whose records override the subject's log. Probe convention: exit 0 observed, 1 not observed, 3 harness error, legitimate workflow exercised first.

Adversarial runner tests tests/test_controls_adversarial.py (36): a probe that rewrites the subject cannot discriminate; a repair that crashes the probe is PROBE_ERROR, not discrimination; structural/partial/false_analog never count; out-of-A-G never yields a FAIL row; a static probe cannot borrow a neighbouring FAIL; an evasive subject gets ANCHOR_ERROR instead of looking protected; claimed_status is recorded, not believed; expected.json edited during the run has no effect; exit-code table for not_observed_exit; no bytecode left behind; two runs are identical apart from the clock; compare names exactly the changed probe and distinguishes subjects.

Runner gaps found (recorded as expectedFailure, left for the runner owner)

  1. A JSON predicate over a non-JSON file raises JSONDecodeError out of the whole run; no result record is written. Expected: probe NON_VERDICT.
  2. Predicate ops are validated only when evaluated; an unknown op over an absent path reads as NOT_OBSERVED. Expected: load_binding rejects it.
  3. Documented, not a gap in the runner: a plain-script probe that crashes exits 1, same as a refusal, so bindings must use the exit-3 convention (docs/CONTROLS.md).

Not established

Reference subjects are templates, not findings about any project. A control is still only comparable across projects to the extent a binding follows its contract. AI-drafted; local checks per AGENTS.md run before merge (see check run on this PR).


Generated by Claude Code

darklordVirtual and others added 5 commits November 8, 2026 14:44
The regeneration test simulated a reproduction with the committed
run's catalog version, so it missed that a catalog change alters the
report; CI caught it. The simulation now uses the committed catalog.

NTI gets a probe for AACP-X-04 (save_to_file then load_from_file),
with a weakening that persists decisions differing from the hashed
ones, so both bindings cover the whole catalog.
Run nti-de08dbd-2026-11-08-author-3 on procedure 7096bc6: the 22
earlier findings unchanged, plus AACP-X-04 not observed and sensitive.
CURRENT and the generated report move to it.
…ersarial runner tests

Catalog v1.3.0: AACP-C-02, AACP-E-01, AACP-F-01..03, AACP-G-01..02 and the
AACP-CY family outside A-G (instruction promotion, approval injection, memory
taint, secret egress, tenant isolation, network policy, tool substitution,
artifact admission, observer precedence), mapped to the Stage 0 JX candidates.

tests/controls_reference/: one minimal subject per new control (weak module,
single-edit repair, probe with the 0/1/3 exit convention), run through the real
runner by tests/test_controls_reference_subjects.py: OBSERVED and DISCRIMINATES
on the weak subject, NOT_OBSERVED and SENSITIVE on the repaired one,
NON_VERDICT on a broken one, FAIL on exactly the control's property, never PASS.

tests/test_controls_adversarial.py: a tampering probe, a probe-breaking repair,
relationship downgrades, out-of-A-G controls, an evasive subject or an edited
expected.json cannot manufacture a FAIL or a PASS; runs are reproducible apart
from the clock; two runner gaps recorded as expected failures.

No existing control, binding or result changed.
Bumping controls/aacp-controls-v1/catalog.json in place changed every
regenerated report ("catalog v1.2.0" -> "v1.3.0") although no finding
changed, so the controls workflow failed for all three bindings.

A catalog file is now frozen once a committed result pins its SHA-256.
1.3.0 lives in controls/aacp-controls-v1.3.0/ and repeats the 1.2.0 controls
unchanged. New tests: every CURRENT result's catalog bytes match the file its
binding names; catalog versions are unique across files; 1.3.0 is a strict
superset of 1.2.0. Both pin tests fail when the in-place bump is reapplied.
The binding template points at 1.3.0. Merges #28's head (author-3 NTI run,
X-04 binding) so the branch carries the current published state.

@darklordVirtual darklordVirtual left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review and status update (AI-drafted, Claude Opus 5.5).

Head bbcfb74, CI 8/8 green including all three real reproduction runs.

The first push broke controls CI: I bumped controls/aacp-controls-v1/catalog.json to 1.3.0 in place. That changed "catalog v1.2.0" → "v1.3.0" in every regenerated report although no finding changed (differences: {}). The fix:

  • 1.2.0 is frozen; 1.3.0 is a new file controls/aacp-controls-v1.3.0/catalog.json that repeats every 1.2.0 control unchanged. Existing bindings keep 1.2.0; a binding moves to 1.3.0 only with a new run.
  • New tests: each CURRENT result's catalog SHA-256 matches the file its binding names; catalog versions are unique across files; 1.3.0 is a strict superset of 1.2.0. With the in-place bump reapplied, 7 tests fail with a message saying to add a new catalog file. I checked that.
  • The template binding points to 1.3.0.

This differs from the policy in #28's 7096bc6 (bump in place, re-run every binding). Under that policy every new control requires new runs against NTI (Rust, disposable environment, execution agreement) and both REMORA bindings before CI is green again. Frozen catalog files decouple adding controls from re-running third-party subjects, the same way the reference vectors are frozen. 7096bc6's test still holds under this scheme. Your call; if you prefer in-place bumps, revert bbcfb74 and re-run the bindings instead.

Also merged #28's head into this branch, so it carries the current published state.

Merge order I'd suggest for the whole set: #27 → #24 → #28 → #29 (updated from main) → #30 → tag v0.3.0a1; #25 + #26 when Gate 0 has dispositions. Simulated in that order: one trivial README conflict (#24/#28), combined tree 490 tests OK.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

Superseded by #31, merged to main with everything from this PR except the NTI binding, report and inspection. The maintainer chose not to publish the NTI report until NTI has seen the draft (SPECIFICATION §8). The NTI material stays on branch docs/nti-source-inspection, which is not deleted. (AI-drafted.)


Generated by Claude Code

darklordVirtual added a commit that referenced this pull request Nov 8, 2026
Land AACP controls (#28, #29, #30) without the NTI binding
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.

1 participant