Skip to content

feat(ccv2): implement complete Cloud Portal API sandbox - #7

Merged
anilkreddy merged 10 commits into
mainfrom
feat/ccv2-complete-api-sandbox
Oct 15, 2026
Merged

anilkreddy merged 10 commits into
mainfrom
feat/ccv2-complete-api-sandbox

Conversation

@anilkreddy

Copy link
Copy Markdown
Contributor

The CCv2 Worker previously exposed only service and storage health. This change adds isolated 24-hour sandbox runs, synthetic SAP-style OAuth/JWT authentication, deterministic scenario and fault handling, and stateful implementations for all 52 operations in the independently authored SAP Commerce Cloud Management API 2.0.12 inventory.

Result

  • Preserves the existing Hono Worker and SQLite-backed Ccv2Run Durable Object, including the original run_metadata table.
  • Adds run-scoped control authorization, one-time synthetic credentials, RS256 tokens, public JWKS, deletion, reset, alarms, quotas, request limits, and Cloudflare-native anonymous run rate limiting.
  • Implements deterministic build and deployment lifecycles, valid ZIP logs, blue/green decisions, traffic splits, cancellation, failures, timeouts, and operation/resource-scoped faults.
  • Implements environments, endpoints, backups/restores, scaling, scheduled activities, service properties, synthetic certificate metadata, and role assignments with persistent run isolation.
  • Serves separate Management and mock-control OpenAPI documents and verifies all 52 operation IDs against both the inventory and registered Hono routes.
  • Documents architecture, authentication, scenarios, curl usage, API coverage, limitations, and Cloudflare deployment readiness. SCIM remains explicitly outside the verified Management API scope.

Authoritative reference: SAP Cloud Portal API.

Validation

pnpm run ci passes from the repository root:

  • Wrangler binding/runtime types are current
  • Prettier and ESLint pass
  • strict application and test TypeScript pass
  • both OpenAPI 3.1 documents validate; Management API parity reports 52 operations
  • 46 Cloudflare Workers runtime tests pass, including Durable Object persistence/alarms, JWT security, contracts, failure/timeout flows, and complete build-to-deployment integration
  • Wrangler deployment dry-run succeeds

The production signing-material generator was also executed against a temporary directory and verified to create all four non-empty files without printing their contents.

Required before merge

Provision these existing Worker secrets before allowing Cloudflare Workers Builds to deploy the merge:

  • MOCK_JWT_PRIVATE_KEY
  • MOCK_JWT_PUBLIC_JWK
  • MOCK_JWT_KID
  • RUN_TOKEN_SIGNING_KEY

Confirm rate-limit namespace ID 1001 is unused in the account, and retain the existing CCV2_RUN Durable Object namespace and custom domain. Exact generation and wrangler secret put commands are in apps/ccv2/docs/cloudflare-deployment.md.

This PR does not add a deployment workflow, deploy the feature branch, modify the CommerceKit website, or merge itself.

@anilkreddy
anilkreddy merged commit 79ca8d0 into main Oct 15, 2026
1 check passed
@anilkreddy
anilkreddy deleted the feat/ccv2-complete-api-sandbox branch October 15, 2026 13:14
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