Skip to content

docs: expand public workbench API contract - #18

Merged
EstandarMustaq merged 1 commit into
rfc-0002-legacy-batch-orchestrationfrom
docs/public-api-use-cases
Jul 16, 2026
Merged

EstandarMustaq merged 1 commit into
rfc-0002-legacy-batch-orchestrationfrom
docs/public-api-use-cases

Conversation

@EstandarMustaq

@EstandarMustaq EstandarMustaq commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Documents payment jobs, status APIs, regulatory exports, and validation-only legacy imports
  • Publishes durable receipt, rejection, artifact, and delivery schemas
  • Enforces 12-route owner contract coverage

Validation

  • guardian:check passes
  • openapi:check passes
  • 24 tests pass
  • TypeScript build passes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c296079fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +298 to +302
payload:
oneOf:
- $ref: '#/components/schemas/PaymentStartPayload'
- $ref: '#/components/schemas/PaymentSettlementPayload'
- $ref: '#/components/schemas/PaymentReconciliationPayload'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Tie job payload schema to the job type

For clients or gateways that validate requests from this OpenAPI contract, the payload alternatives are independent of type, so {"type":"PAYMENT_CAPTURE","payload":{}} validates via PaymentReconciliationPayload, and PAYMENT_RECONCILIATION can validate with a capture payload. Those requests are accepted by the contract but then either fail later in the worker or run the wrong handler. Model CreateJob as a oneOf of full objects with type constants and the matching payload schema, or add a discriminator mapping.

Useful? React with 👍 / 👎.

Comment on lines +398 to +405
PlatformStatus:
type: object
properties:
service: { type: string }
status: { type: string, enum: [ok, degraded, down] }
timestamp: { type: string, format: date-time }
worker: { type: object, additionalProperties: true }
dependencies: { type: object, additionalProperties: true }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose status sections in the schema

The /api/status response is now bound to PlatformStatus, but this schema omits fields that PlatformStatusService.status() always returns, including queues, schedules, version, environment, started_at, and uptime_seconds. Generated clients will treat the main queue/schedule status sections as unmodelled extras instead of part of the public contract, so the status schema should include the same fields returned by the controller.

Useful? React with 👍 / 👎.

Comment on lines +296 to +297
type: { type: string, enum: [PAYMENT_CAPTURE, PAYMENT_DISBURSEMENT, PAYMENT_SETTLEMENT, PAYMENT_RECONCILIATION] }
queue: { type: string, const: payments, default: payments }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep accepted job types in the contract

When an authenticated caller submits the existing non-payment jobs through /api/jobs (for example queue: "platform" with type: "LEDGER_CORE_EVENT"), JobsController.validateCreateJob() still accepts them because it checks against the full JOB_TYPES list. The new contract narrows the endpoint to payment types and the payments queue, so generated clients or request validators will reject requests that the API still supports; either document the full accepted set or make the controller reject non-payment submissions.

Useful? React with 👍 / 👎.

@EstandarMustaq
EstandarMustaq merged commit 5ab0344 into rfc-0002-legacy-batch-orchestration Jul 16, 2026
1 check passed
@EstandarMustaq
EstandarMustaq deleted the docs/public-api-use-cases branch July 16, 2026 20:26
EstandarMustaq added a commit that referenced this pull request Jul 16, 2026
* feat: orchestrate legacy batch processing

* docs: expand public workbench API contract (#18)
EstandarMustaq added a commit that referenced this pull request Jul 16, 2026
* feat: publish versioned public api contract

* RFC-0002: orchestrate legacy batch processing (#17)

* feat: orchestrate legacy batch processing

* docs: expand public workbench API contract (#18)
EstandarMustaq added a commit that referenced this pull request Jul 16, 2026
* fix: reject cross-tenant domain jobs

* RFC-0002: publish workbench public API contract (#16)

* feat: publish versioned public api contract

* RFC-0002: orchestrate legacy batch processing (#17)

* feat: orchestrate legacy batch processing

* docs: expand public workbench API contract (#18)
EstandarMustaq added a commit that referenced this pull request Jul 16, 2026
* feat: secure worker runtime with OIDC

* RFC-0002: reject cross-tenant domain jobs (#15)

* fix: reject cross-tenant domain jobs

* RFC-0002: publish workbench public API contract (#16)

* feat: publish versioned public api contract

* RFC-0002: orchestrate legacy batch processing (#17)

* feat: orchestrate legacy batch processing

* docs: expand public workbench API contract (#18)
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