Skip to content

feat(certification): state binding phase 3 — brick transition replayer + R9 - #207

Draft
IanFrelinger wants to merge 2 commits into
masterfrom
cursor/brick-transition-replayer-1b05
Draft

feat(certification): state binding phase 3 — brick transition replayer + R9#207
IanFrelinger wants to merge 2 commits into
masterfrom
cursor/brick-transition-replayer-1b05

Conversation

@IanFrelinger

Copy link
Copy Markdown
Owner

Summary

Implements Phase 3 of attested state log binding: production Tier-2 replay via certified brick execution.

This branch includes Phase 2 commits (26b4003e) if PR #206 is not yet merged.

Production replayer

  • BrickTransitionReplayer — compiles certified brick source (Roslyn), executes deterministically, compares resultingStateHash
  • CertifiedBrickInstantiator — shared Roslyn loader for replay
  • IBrickTransitionReplayerFactory + DI registration in AddAttestedStateLogTrust()

Witness behaviors

  • Compilable PhaseAdvanceBrick / PhaseReleaseBrick under Nexo.Certified.PhaseWitness/bricks/
  • Regenerated bundled artifacts with real brick source sidecars
  • FileCertifiedBehaviorCatalog path-safe dirs (/_) for base64 content hashes

Tests (cert-gate: 63)

Test Tier Verdict
R9_OutOfBandStateTamperReplayMismatch_Refuses Tier-2 REFUSE — valid schema hash tamper caught only by replay
A3_FullyValidLogWithBrickReplay_IsTrusted Tier-2 TRUSTED — production brick replayer
TrustGate_FromDi_TrustsBundledSampleLogWithBrickReplay Tier-2 TRUSTED — DI factory

Existing R8 (swapped cert) and A2 (fake replayer seam) unchanged.

API

  • StateSchema.StateBindingVersion exposed for replay inputs

Test plan

  • bash scripts/run-cert-gate.sh — 63/63 passed locally
  • AttestedStateLogBindingTests R1–R9, A1–A3, G1
  • AttestedStateLogTrustGateTests Tier-1 + Tier-2
  • CrossProjectStateLogReuseTests (bundled artifacts updated)
Open in Web Open in Cursor 

cursoragent and others added 2 commits June 28, 2026 05:58
…format, project C

- ICertifiedBehaviorCatalog with in-memory and file-backed catalogs
- CertifiedBehaviorCertificateResolver and AttestedStateLogTrustGate + DI
- AttestedStateLogWireFormat JSON round-trip
- Project C cross-project reuse sample with bundled phase-witness artifacts
- A2 Tier-2 admission, catalog/wire/cross-project/trust-gate tests
- cert-gate count 60; evidence ledger section added

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
…r + R9

Implement production Tier-2 replay via BrickTransitionReplayer: Roslyn-compiles
certified brick source, executes deterministically, and compares resulting state
hashes. Add compilable phase witness bricks, path-safe behavior catalog dirs,
IBrickTransitionReplayerFactory DI registration, R9 out-of-band tamper test,
A3 brick replay admission, and trust gate Tier-2 coverage. cert-gate: 63 tests.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
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