Skip to content

Adversarial suite for AUTO mode (#104) - #106

Merged
hsliuustc0106 merged 1 commit into
mainfrom
feature/auto-adversarial
Oct 4, 2026
Merged

hsliuustc0106 merged 1 commit into
mainfrom
feature/auto-adversarial

Conversation

@hsliuustc0106

Copy link
Copy Markdown
Contributor

Implements #104. AUTO has been the default since #67; these 10 tests pin the boundary semantics the gated suite doesn't: parametrized exact-match authority (target/scope/task/expired/revoked derive nothing, zero capability rows), the standing marker's non-wildcardness (it lives only on grants; derived children bind real payload digests; mutated payloads cannot ride them), scope-change killing derived-but-unexecuted capabilities, quota day-boundary accounting with next-day recovery, and once-only visibility of grant-less skips.

One honest expectation correction vs the issue text: an action mismatch raises WriteForbidden from the mode gate rather than returning None — stricter than proposed, so it was kept and documented in the test.

718 tests pass (+10), demo 8/8.

…p visibility (#104)

AUTO is the default mode (#67); these pin its boundary semantics:

- Exact-match authority, parametrized: target/scope/task mismatch or an
  expired/revoked standing grant derives nothing and creates no
  capability rows; an unavailable action fails louder — WriteForbidden
  from the mode gate before any grant is consulted.
- The standing marker is not a wildcard: it lives only on the GRANT
  (empty hash); consuming a standing grant id directly misses, the
  derived child binds the payload's real digest, and a mutated payload
  cannot ride it.
- A capability derived before a scope edit never executes after it
  (grants die with the scope change; the flow refuses).
- Quota day boundary: check before midnight + consume after lands in the
  new day; exhaustion blocks today and recovers tomorrow without a
  restart (FakeClock across midnights).
- Grant-less skips are recorded exactly once — a broken authorize path
  is diagnosable from the log, never silent.

One expectation correction vs the issue text: action mismatch raises
WriteForbidden (mode gate) rather than returning None — stricter, kept.
718 tests pass; demo 8/8.
@hsliuustc0106
hsliuustc0106 merged commit 819317e into main Oct 4, 2026
4 checks passed
@hsliuustc0106
hsliuustc0106 deleted the feature/auto-adversarial branch October 4, 2026 03:26
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