Skip to content

feat: productionize Corner Store compliance and RFQ stack - #89

Merged
0xMuang merged 9 commits into
mainfrom
feature/sdk-productization
Sep 3, 2026
Merged

feat: productionize Corner Store compliance and RFQ stack#89
0xMuang merged 9 commits into
mainfrom
feature/sdk-productization

Conversation

@0xMuang

@0xMuang 0xMuang commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

This consolidated delivery PR contains the complete production-readiness stack previously reviewed as #84#88:

  • durable RFQ nonce, idempotency, inventory reservation and reorg reconciliation
  • authenticated and rate-limited RFQ host with freshness, signer verification, PII-free audit and incident hooks
  • provider-neutral TA/KYC evidence with fail-closed outage handling
  • production ERC-3643 onboarding, Safe proposal export and post-deployment verification
  • immutable Element/Recipe versions, canonical recipe keys and compiled enforcement plans
  • independently packable CLI, Toolkit and RFQ SDK release boundaries

Verification

  • GitHub Actions CI passed on every component branch before consolidation
  • Foundry full suite: 870/870 passed
  • registry: 86/86; ComplianceEngine: 37/37; RegD integration: 6/6
  • Anvil reg-d and buidl-like E2E passed
  • Toolkit, CLI and RFQ package tests passed
  • Node 20 clean-project package install/build/conformance passed

Delivery

Supersedes component PRs #84, #85, #86, #87 and #88 after the author requested a reduced open-PR surface. Their branches and discussion remain available for audit history.

Production gaps

Public npm publish, production RPC execution, Safe submission, and live venue/maker/signer/inventory activation were not performed.

…d reorgs

Constraint: RFQ service remains SDK/reference code without adding a production database dependency.
Rejected: In-memory nonce and inventory reservation only | unsafe across server restart and multi-instance concurrency.
Confidence: high
Scope-risk: moderate
Directive: Production deployment must supply an HA transactional database adapter and keep the bundled file store reference-only.
Tested: npm RFQ, forge 857, RFQ E2E, diff, init race
Not-tested: scripts/check fails pre-existing forge fmt in script/DeployProductionCore.s.sol and script/DemoScenarios.s.sol
…observable host boundary

Constraint: Demo backend remains unchanged and no new runtime dependency was added.
Rejected: Hardening the demo backend | mixes local-only and production boundaries.
Confidence: high
Scope-risk: moderate
Directive: Production deploy must replace reference bearer auth, in-memory limiter, and file store with operator auth, shared limiter, transactional DB, TLS, and WORM audit.
Tested: RFQ/host/demo tests, hostile auth/rate/freshness/signer/audit/reserved recovery, diff
Not-tested: scripts/check blocked by pre-existing forge fmt drift in script/DeployProductionCore.s.sol and script/DemoScenarios.s.sol; E2E skipped to preserve untracked deployments.
…r failing open

Constraint: ERC-3643/ONCHAINID remain issuer-controlled external trust boundaries and no vendor API is assumed.
Rejected: Vendor-specific adapter/mock promotion | would couple core to unverified provider contracts.
Confidence: high
Scope-risk: moderate
Directive: Production must supply authenticated provider adapter, transactional HA store/WORM audit, and issuer-approved claim writer.
Tested: compliance-data npm, AcquisitionSource 8, BUIDLLikeFlow 7, identity/claim Elements 8, hostile 8, diff
Not-tested: scripts/check blocked by pre-existing forge fmt drift in script/DeployProductionCore.s.sol and script/DemoScenarios.s.sol; E2E skipped to preserve deployments.
…rvice open

Constraint: Live ERC-3643/ONCHAINID wiring must remain read-only verified before operator activation, and local demo/untracked deployments stay untouched.
Rejected: Direct service activation from unchecked config | would bypass Safe/operator review and fail-closed live wiring gates.
Confidence: high
Scope-risk: moderate
Directive: Production operators must review generated calldata and Safe proposal, execute externally, then run live verification before enabling venue, maker, signer, and inventory.
Tested: toolkit npm, CLI npm, staged diff/secret/scratch scan, independent review.
Not-tested: scripts/check blocked by pre-existing forge fmt drift in script/DeployProductionCore.s.sol and script/DemoScenarios.s.sol; E2E skipped to preserve untracked deployments and because no live production RPC was provided.
Constraint: Preserve legacy numeric RecipeBinding compatibility and existing local Anvil plus GIWA testnet flows.

Rejected: Runtime-mutable recipe aliases without compiled enforcement plans | it leaves production policy behavior mutable after activation.

Confidence: high

Scope-risk: broad

Directive: Treat recipeKey as canonical and version-independent; never rebind activated Element IDs, recipe key/version slots, or compiled token policy plans.

Tested: Element/Recipe/TokenPolicy registry targeted tests; ComplianceEngine targeted tests; RegD integration; full forge suite; toolkit and CLI smoke tests; isolated scripts/check; local Anvil E2E profiles for reg-d and buidl-like.

Not-tested: External production RPC execution, Safe transaction submission, and live venue/maker/signer approvals.
Constraint: Preserve existing Anvil, GIWA and generated-project compatibility without adding dependencies or publishing credentials.

Rejected: Treating repository-relative Toolkit output as package validation | it does not prove a clean external consumer can install the artifact.

Confidence: high

Scope-risk: narrow

Directive: Keep npm versions separate from persisted schema and capability versions; incompatible schemas require explicit adapters and migration tests.

Tested: Toolkit, RFQ and CLI package tests; Node 20 clean-project SDK product smoke including packed Toolkit import, RFQ conformance, CLI doctor/deploy and packaged Foundry contract build; shell syntax; git diff check.

Not-tested: Public npm registry publish, release credentials, or live production deployment; scripts/check stops at pre-existing Solidity formatting drift.
Constraint: The source CLI intentionally compiles sibling Toolkit sources, whose package-local dependencies are absent in a fresh runner until Toolkit installation.

Rejected: Relying on developer node_modules hoisting | clean CI does not resolve ethers from the sibling CLI package.

Confidence: high

Scope-risk: narrow

Directive: Keep source-checkout dependency installation ordered before compiling cross-package source imports.

Tested: scripts/check.sh shell syntax and git diff check; failure reproduced in PRs #87-#89 as TS2307 for Toolkit ethers resolution.

Not-tested: GitHub CI rerun pending push.
Constraint: PR #88 is stacked on #87 and must include the clean-runner Toolkit installation order.
Confidence: high
Scope-risk: narrow
Directive: Preserve stacked branch ancestry when correcting shared CI prerequisites.
Tested: Merge completed without conflicts; downstream CI pending.
Not-tested: GitHub CI rerun pending push.
Constraint: PR #89 is stacked on #88 and must inherit the clean-runner Toolkit installation prerequisite.
Confidence: high
Scope-risk: narrow
Directive: Preserve stacked branch ancestry when shared CI prerequisites change.
Tested: Merge completed without conflicts; downstream CI pending.
Not-tested: GitHub CI rerun pending push.
@0xMuang 0xMuang changed the title feat: productize SDK package releases feat: productionize Corner Store compliance and RFQ stack Sep 3, 2026
@0xMuang
0xMuang changed the base branch from feature/compliance-core-production-hardening to main September 3, 2026 17:42
@0xMuang
0xMuang merged commit 9fc0283 into main Sep 3, 2026
1 check 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