Skip to content

Commit 10b1176

Browse files
committed
fix(spec): the cursor-retirement upgrade entry names the served /api/v1 runs path
Patch round 1 on the AutomationApiContracts path fix: - The ADR-0087 D3 entry automation-runs-cursor-retired named GET /api/automation/:name/runs three times; it now names GET /api/v1/automation/:name/runs, the path the contract publishes and the dispatcher mounts. registry.ts regenerated with gen:migration-registry; gen:upgrade-guide and gen:spec-changes re-run with no byte change (the entry is in step 18). - Two comments (runtime query-param.ts, service-automation run-list-truncation.test.ts) quote the same path in the v1 form. - The changeset declares Clause-② no: no key added, no accept set widened, no export grown. The level stays minor. Claude-Session: https://claude.ai/code/session_019c3Hi6ZMU1p6m6aA6Bz45d Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4c21656 commit 10b1176

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎.changeset/20034-automation-contract-api-v1-paths.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
The dispatcher mounts the automation door at its `prefix` plus `/automation`, the prefix defaults to `/api/v1`, and `objectstack serve` passes none. So all nine declared paths answered `404 ENDPOINT_NOT_FOUND` on the default composition while the same requests under `/api/v1/automation` answered `200`, and the generated API reference printed the nine unserved paths as the endpoints. Every other `*ApiContracts` map in `@objectstack/spec/api` already carried `/api/v1`; this one was the only outlier. The runtime is unchanged — only the declaration moves.
88

9-
Clause-②: yes
9+
Clause-②: no
1010

1111
**What moved on the published surface**
1212

‎packages/runtime/src/query-param.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export function parseIntegerParam(
176176

177177
/**
178178
* A CLOSED-SET parameter — a filter whose declared values are an enum on the
179-
* wire (`?status=failed` on `GET /api/automation/:name/runs`, whose
179+
* wire (`?status=failed` on `GET /api/v1/automation/:name/runs`, whose
180180
* `ListRunsRequestSchema` bounds it to `ExecutionStatus` itself — the enum
181181
* rather than a copy of its members, so the bound is whatever that vocabulary
182182
* declares rather than a count fixed on the day this line was written. #7359

‎packages/services/service-automation/src/run-list-truncation.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* #19543 — `AutomationEngine.listRunsPage` and the truncation boundary.
55
*
6-
* `GET /api/automation/:name/runs` used to answer `{ runs, hasMore: false }`
6+
* `GET /api/v1/automation/:name/runs` used to answer `{ runs, hasMore: false }`
77
* with the `false` written as a literal, beside a list the engine had already
88
* cut with `.slice(0, limit)`. A caller asking for one row of a thousand was
99
* handed one row and told that was all of them, with a `200` and nothing in

‎packages/spec/src/migrations/entries/semantic/18.automation-runs-cursor-retired.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const entry: SemanticMigration = {
88
// code span AND a table cell.
99
surface:
1010
'api.listRuns cursor — the pagination query parameter of '
11-
+ 'GET /api/automation/:name/runs declared by ListRunsRequestSchema, its slot on '
11+
+ 'GET /api/v1/automation/:name/runs declared by ListRunsRequestSchema, its slot on '
1212
+ 'IAutomationService.listRuns, and its option on all three @objectstack/client run-list '
1313
+ 'surfaces (automation.runs.list, automation.listRuns, environment().automation.listRuns). '
1414
+ 'The limit parameter of the same door is NOT part of this retirement and is unchanged, '
@@ -40,7 +40,7 @@ export const entry: SemanticMigration = {
4040
+ "the Console's flow-runs page sends it today. Retiring it would have been a "
4141
+ 'regression, and its `.default(20)` stays with it. '
4242
+ 'The same card computes `hasMore`, which is the half a bare retirement would have left '
43-
+ 'lying. `GET /api/automation/:name/runs` shipped a literal `hasMore: false` beside a '
43+
+ 'lying. `GET /api/v1/automation/:name/runs` shipped a literal `hasMore: false` beside a '
4444
+ 'list the engine had already truncated with `.slice(0, limit)`, so a caller asking for '
4545
+ 'one row of a thousand was handed one row and told that was all of them. The engine '
4646
+ 'now reports truncation to the door through a new optional contract member, '
@@ -69,7 +69,7 @@ export const entry: SemanticMigration = {
6969
+ '#6361 retired the notifications `cursor`: the client dropped the option and recorded '
7070
+ 'the removal in its docblock. ADR-0049 / ADR-0087, #19543.',
7171
acceptanceCriteria:
72-
'No caller sends `cursor` to `GET /api/automation/:name/runs`, and that is true of every '
72+
'No caller sends `cursor` to `GET /api/v1/automation/:name/runs`, and that is true of every '
7373
+ 'channel this repo ships rather than of the schema alone. Writing it on a '
7474
+ '`ListRunsRequest` is a `tsc` error (the input type is `never`), and any value reaching a '
7575
+ 'parse raises the prescription rather than a generic unrecognized-key issue. The option is '

‎packages/spec/src/migrations/registry.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5940,7 +5940,7 @@ const step18: MigrationStep = {
59405940
// code span AND a table cell.
59415941
surface:
59425942
'api.listRuns cursor — the pagination query parameter of '
5943-
+ 'GET /api/automation/:name/runs declared by ListRunsRequestSchema, its slot on '
5943+
+ 'GET /api/v1/automation/:name/runs declared by ListRunsRequestSchema, its slot on '
59445944
+ 'IAutomationService.listRuns, and its option on all three @objectstack/client run-list '
59455945
+ 'surfaces (automation.runs.list, automation.listRuns, environment().automation.listRuns). '
59465946
+ 'The limit parameter of the same door is NOT part of this retirement and is unchanged, '
@@ -5972,7 +5972,7 @@ const step18: MigrationStep = {
59725972
+ "the Console's flow-runs page sends it today. Retiring it would have been a "
59735973
+ 'regression, and its `.default(20)` stays with it. '
59745974
+ 'The same card computes `hasMore`, which is the half a bare retirement would have left '
5975-
+ 'lying. `GET /api/automation/:name/runs` shipped a literal `hasMore: false` beside a '
5975+
+ 'lying. `GET /api/v1/automation/:name/runs` shipped a literal `hasMore: false` beside a '
59765976
+ 'list the engine had already truncated with `.slice(0, limit)`, so a caller asking for '
59775977
+ 'one row of a thousand was handed one row and told that was all of them. The engine '
59785978
+ 'now reports truncation to the door through a new optional contract member, '
@@ -6001,7 +6001,7 @@ const step18: MigrationStep = {
60016001
+ '#6361 retired the notifications `cursor`: the client dropped the option and recorded '
60026002
+ 'the removal in its docblock. ADR-0049 / ADR-0087, #19543.',
60036003
acceptanceCriteria:
6004-
'No caller sends `cursor` to `GET /api/automation/:name/runs`, and that is true of every '
6004+
'No caller sends `cursor` to `GET /api/v1/automation/:name/runs`, and that is true of every '
60056005
+ 'channel this repo ships rather than of the schema alone. Writing it on a '
60066006
+ '`ListRunsRequest` is a `tsc` error (the input type is `never`), and any value reaching a '
60076007
+ 'parse raises the prescription rather than a generic unrecognized-key issue. The option is '

0 commit comments

Comments
 (0)