Skip to content

Phase 0 (7/9): Signal/X3DH/KNOCK + isolation conformance corpus - #41

Closed
Pal Lakatos-Toth (pallakatos) wants to merge 1 commit into
phase0/compat-agent-sandbox-designfrom
phase0/conformance-corpus-signal
Closed

Pal Lakatos-Toth (pallakatos) wants to merge 1 commit into
phase0/compat-agent-sandbox-designfrom
phase0/conformance-corpus-signal

Conversation

@pallakatos

Copy link
Copy Markdown
Collaborator

Phase 0 · conformance corpus skeleton

Adds a behavioural-conformance test workspace with 59 it.todo invariants covering the Signal/X3DH/KNOCK stack and sandbox isolation.

tests/conformance/

Why it.todo

Principle §0.2 #8 (no false-green). Real assertions land when each Phase 1 provider impl arrives; the skeleton commits to the shape of the invariants so those impls can't silently drop one.

Verification

  • cd tests/conformance && npm test → 59 todo / 0 pass / 0 fail.

Stack

PR 7/9 — bases on phase0/compat-agent-sandbox-design (PR 6).

Per docs/implementation-plan.md §5.4. Behavioral conformance corpus —
the net that catches 'endpoint returned 200 but skipped the crypto
step' bugs.

tests/conformance/ layout
- package.json / tsconfig.json / vitest.config.ts — own workspace,
  fork-isolated pool so ratchet state doesn't leak across specs.
- README.md — corpus table (9 corpora across Phases 0, 1, 3),
  provider-axis rule (plan §11.3), invariant discipline.
- fixtures/README.md — vendored-source policy per principle §0.2 #10.
- harness/index.ts — empty scaffold; helpers land per-PR.

Phase 0 specs (all 'it.todo', 59 invariants total — vitest reports
59 todo / 0 pass / 0 fail, no false-green):
- signal-x3dh.spec.ts (14) — key-exchange shape, symmetric ratchet
  invariants, base64 input hygiene (vendor patches #3, #4).
- signal-knock.spec.ts (15) — KNOCK happy-path, trust threshold, relay
  disruption, wire-shape parity (vendor patches #5, #7, #8, #1/#2
  timestamps, vendored<->AGT byte-identical KNOCK).
- signal-negative.spec.ts (13) — ciphertext integrity, replay, session
  clobber (vendor patch #10), DoS surfaces.
- sandbox-isolation.spec.ts (17) — seccomp, Landlock, egress-guard,
  router-as-only-network-path. Guarded by CONFORMANCE_E2E=1 (requires
  Kind; compat suite Kind harness wires it in Phase 1).

Principle §0.2 #8 ('solid, not look-alike'): it.todo is a documented
pending assertion, not a silently-passing no-op. Each spec's top
comment cites the vendor patch or production bug it exists to prevent
recurring.

Principle §0.2 #10: every invariant that references an external
protocol cites its upstream source (libsignal, RFC3339 'Z' suffix,
Signal Double Ratchet spec) either inline or in the README.

ci/no-stubs.sh already allow-lists tests/ subtrees; gate remains PASS.
No new dependencies outside the pinned vitest / typescript / @types
dev-deps already used by tests/compat/.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pallakatos

Copy link
Copy Markdown
Collaborator Author

Closing in favor of an integrated validation on the dev branch. This branch has been merged into dev (see origin/dev) and a single dev → main PR will land once CI is green on dev. No code is lost — every commit remains on its phase0/* branch and is reachable from dev.

@pallakatos
Pal Lakatos-Toth (pallakatos) deleted the phase0/conformance-corpus-signal branch April 27, 2026 12:58
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