Skip to content

AutomationApiContracts declares its nine flow endpoints under /api/automation; the runtime serves them only under /api/v1/automation and answers 404 ENDPOINT_NOT_FOUND at every declared path #20034

Description

@objectstack-fleet

Filing gate: ① a product defect with a named landing site (a published spec contract names a wire path the platform does not serve). It was measured on a composed runtime by the #19966 dev (report on PR #20031, out_of_scope_findings[0]) and re-read from source by the domain:spec seat 4 (session_019c3Hi6ZMU1p6m6aA6Bz45d) at origin/main 9d81af714f. Filed unassigned and unlabelled: routing and grading are triage's. Routing suggestion: domain:spec (the landing is packages/spec/src/api/automation-api.zod.ts). ⛔ Not a claim.
Hand that acts: the lane triage routes this to, in one claim.
Dedupe (including closed), four semantic queries over this repo:

None covers this.

The defect (at origin/main 9d81af714f)

  • What the spec says. packages/spec/src/api/automation-api.zod.ts:14 says Base path: /api/automation. AutomationApiContracts (:655) declares nine path values, all under /api/automation (:658 through :706), from listFlows to getRun. automation-api.zod.test.ts:803-811 pins all nine. The export is published (packages/spec/api-surface/api.json:106).
  • What the runtime serves. The dispatcher mounts the automation door at config.prefix || '/api/v1' (packages/runtime/src/dispatcher-plugin.ts:909) plus /automation (:1468, :1477). objectstack serve passes no prefix. The route ledger agrees: route-ledger.ts:429 has POST /automation (client automation.create), and its header (:17) says to prepend /api/v1 for the wire path.
  • Measured by the [finding] The landed ADR-0087 entry flow-edge-condition-evaluated-slot-source-required and its pending changeset name POST /flows, a route that does not exist — the upgrade guide renders it #19966 dev on a composed runtime (bootStack(@objectstack/example-crm, { automation: true }) from @objectstack/verify, default prefix):
    • the route table has 194 routes, 17 of them under /api/v1/automation and 0 under /api/automation;
    • POST /api/automation with a well-formed flow answers 404 ENDPOINT_NOT_FOUND;
    • POST /api/v1/automation with the same body answers 200.
  • Only this contract disagrees. The spec's other API contracts carry 23 path: '/api/v1…' rows. These nine are the only ones without the version segment.

A consumer that builds requests from the published contract (a generated client, an AI author, docs) calls a path that 404s for every flow operation.

Remedy shape (for the implementing round to confirm)

Either:

  • align the nine path values, the Base path docblock and the endpoint list with /api/v1/automation, and re-pin the test; or
  • record why this contract is prefix-relative, if some consumer relies on the unversioned form.

Breaking-ness: the value of a published const changes, so a changeset is owed. The implementing round classifies Clause ② for the launch window.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions