Skip to content

A01: establish foundation contracts - #13

Merged
kapustazh merged 1 commit into
developfrom
milestone/a01-foundation-contracts
Sep 7, 2026
Merged

kapustazh merged 1 commit into
developfrom
milestone/a01-foundation-contracts

Conversation

@kapustazh

@kapustazh kapustazh commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Establishes A01's independently runnable contract foundation so Coder B and C can build against one frozen package. Adds strict runtime parsers, generated OpenAPI/JSON Schema/TypeScript artifacts, validated v1 fixtures, and a deterministic domain simulator that preserves one intent and at most one synthetic external submission.

Scope and acceptance criteria

  • The change is limited to the stated milestone or issue.
  • Acceptance criteria are listed and satisfied.
  • No unrelated cleanup is included.
  • Locked pnpm workspace, strict TypeScript, ESLint, Prettier, Vitest, and build scripts.
  • Branded IDs, canonical integer-string money, exhaustive result unions, and fail-closed parsers.
  • Complete versioned OpenAPI contract with deterministic generated artifacts and CI drift checks.
  • Nine safe synthetic v1 fixtures plus malformed, sensitive, float-money, and unknown-result rejection tests.
  • Injected-clock/ID simulator with deterministic zero-or-one external submission behavior.

Product and security invariants

  • Tenant isolation remains fail-closed.
  • Sponsor authorization, auditability, and daily caps remain enforced where applicable.
  • Recipients cannot modify sponsor controls or access sponsor-only data.
  • No secret, token, production identifier, or personal data is committed or pasted into review prompts.
  • Any non-applicable invariant is explained below.

Invariant notes:

A01 defines boundaries and fixtures; persistence, tenant policy, sponsor controls, and provider SDKs start in later milestones. Unknown contract variants fail closed, no API endpoint grants settlement retry, and the simulator will not submit from UNKNOWN.

Validation

Commands and results:

pnpm install --frozen-lockfile: PASS
pnpm format:check: PASS
pnpm lint: PASS
pnpm typecheck: PASS
pnpm check:generated: PASS
pnpm validate:fixtures: PASS (9 fixtures)
pnpm test: PASS (4 files, 30 tests)
contracts.schema.json SHA-256: 4436ED9992662D749A9E41779453513E2A3DAFCF3B4306146D87593132BB6297

Independent review evidence

Gate A — exact candidate tree before push

  • Base commit SHA: 8be8d09b8ab5da19031af28fcee9da128a16f82b

  • Candidate tree SHA: cb06d193aa2a53e5c7f14137ed0a164602f88e2d

  • Candidate commit SHA: e9e95032cf2fa2403c1d672e141c9f5a801a0ba4

  • Reviewer tool: Antigravity CLI

  • Reviewer model: Gemini 3.8 Flash (Medium)

  • Verdict: VERDICT: PASS

  • Findings or residual risks: no blockers; provider/recovery fixture variants remain additive follow-up work.

  • The reviewed tree equals the committed tree.

Gate B — exact remote PR head

  • Pull request URL/number: A01: establish foundation contracts #13

  • Remote head commit SHA: e9e95032cf2fa2403c1d672e141c9f5a801a0ba4

  • Remote head tree SHA: cb06d193aa2a53e5c7f14137ed0a164602f88e2d

  • Reviewer tool: Antigravity CLI

  • Reviewer model: Gemini 3.8 Flash (Medium)

  • Verdict: VERDICT: PASS

  • Findings or residual risks: no blockers; provider-specific live behavior remains deferred. Cloudflare Workers build is non-required and non-applicable because A01 has no deployable Worker.

  • Gate B reviewed the current remote head and matches Gate A's approved tree.

  • Agent policy / repository-policy and all applicable CI checks pass.

Risk and rollback

  • Residual risks: provider-specific fixture variants are intentionally deferred to their owning milestones.
  • Rollback or recovery plan: revert commit e9e95032cf2fa2403c1d672e141c9f5a801a0ba4 before consumers adopt contracts-v1.

Human merge

  • A human owner has reviewed the evidence and will perform the merge.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
oneshot e9e9503 Sep 07 2026, 02:02 PM

@kapustazh
kapustazh marked this pull request as ready for review September 7, 2026 14:06
@kapustazh
kapustazh merged commit c3ab0ca into develop Sep 7, 2026
3 of 4 checks passed
@SuPuHe
SuPuHe deleted the milestone/a01-foundation-contracts branch September 7, 2026 21:15
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