Skip to content

feat(c95): CG-C95/1 reference at-most-once gate draft - #218

Merged
EslaM-X merged 3 commits into
mainfrom
feat/cg-c95-1-clean
Dec 3, 2026
Merged

EslaM-X merged 3 commits into
mainfrom
feat/cg-c95-1-clean

Conversation

@EslaM-X

@EslaM-X EslaM-X commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a neutral reference draft, CG-C95/1, for OWASP C9.5-style at-most-once execution semantics. It is a fixture-shaped reference gate, not a protocol answer and not a claim to close C9.5.

Files:

  • packages/cg-c95/index.mjs
  • test/integrations/cg-c95-1.test.mjs

What the draft models

  • Canonical operation identity: authenticated principal, principalRequestId, tool/target/action, intent digest, policy hash, receipt commitment, chain/network/protocol/circuit version.
  • A single reservation via insertIfAbsent; retry, fresh token, or fresh approval cannot mint a second operation.
  • Explicit outcomes: executed | not_executed | unknown.
  • unknown stays unknown; it does not silently become not_executed.
  • No re-sign while in-flight or unknown; resignPermitted=false.
  • Terminal conflict returns RECORD_CONFLICT, no silent overwrite.
  • NEW_PRINCIPAL_REQUEST_REQUIRED / agent-inferred retry does not count as a new request by the principal.

Scope and limits

  • In-memory reference store only; cross-process at-most-once requires a durable atomic store (UNIQUE / transaction). The in-memory store is not that.
  • Caller-supplied approval and authoritative outcome evidence; signature verification and chain/payment verification are not implemented here.
  • not_executed requires authoritative evidence; a timeout is not proof of no effect.
  • This does not replace x402 verification/settlement, a facilitator, a payment API's idempotency, or a reconciliation layer.
  • This does not claim OWASP acceptance, C9.5 closure, production safety, settlement/finality, or CG-ZK proof.

Verification

node --test test/integrations/cg-c95-1.test.mjs => 6/6 pass at this head.

Boundaries

VERIFIED != SAFE, PASS != SAFE, UNKNOWN != VERIFIED, UNKNOWN != NOT_EXECUTED, bindingVerdict=VERIFIED means binding only.

proofBackend=NOT_BUILT, zkClaim=NONE, proofVerdict=NOT_PROVEN, L4=RESEARCH / NOT CLAIMABLE.

No customer, partnership, funding, adoption, merge, or production claim. No PASS=SAFE.

Adds neutral C9.5-inspired reference gate with canonical operation identity,
authenticated principal + approval provenance, atomic insertIfAbsent semantics,
executed/not_executed/unknown outcomes, reconcile-before-retry, no second effect
for duplicate retry/resubmission, and no silent terminal overwrite. In-memory
reference is not durable; no full C9.5/PASS=SAFE/production/CG-ZK claim.
@EslaM-X
EslaM-X marked this pull request as ready for review December 3, 2026 16:51
@EslaM-X
EslaM-X merged commit 7d2ced9 into main Dec 3, 2026
21 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.

1 participant