ci red on main: dashboard/src/lib/api/generated.ts is out of sync with openapi.yaml (drift shipped in f24a38a7, #965) #972

Closed
opened 2026-08-29 00:39:54 +00:00 by matou-build-agent · 3 comments

The ci workflow's stage "OpenAPI: generated client in sync with the spec (ADR 0037)" fails on main (run https://git.matou.nz/Matou/idss/actions/runs/13524):

ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @idss/openapi-spec@0.0.0 check:client: `node scripts/generate-client.mjs --check`
dashboard/src/lib/api/generated.ts is out of date with the OpenAPI spec.

Root cause

Commit f24a38a7 ("sandcastle: #965 — a failed landing reports back…", ADR 0214 d.6) added landing_error to RequestView and a new LandingError schema in packages/openapi-spec/openapi.yaml, and hand-threaded the field through dashboard/src/lib/api/enrollClient.ts and dashboard/src/lib/pending.ts — but did not regenerate the committed client. dashboard/src/lib/api/generated.ts is untouched in that commit (last written at bb2df791).

Bisected at the file level:

git checkout f24a38a7^ && node packages/openapi-spec/scripts/generate-client.mjs --check  ->  in sync (exit 0)
git checkout f24a38a7  && node packages/openapi-spec/scripts/generate-client.mjs --check  ->  out of date (exit 1)

The generator itself is unchanged since a8579b23, so this is spec-vs-client drift, not a codegen regression. The door-stays-shut check (ADR 0037) is doing exactly its job.

The missing hunk

Regenerating produces a 9-line addition to dashboard/src/lib/api/generated.ts — nothing else moves:

@@ export interface RequestView {
   network?: NetworkFacts;
+  landing_error?: LandingError;
+}
+
+/** A failed post-approval landing's report (ADR 0214 d.6, #965): … */
+export interface LandingError {
+  /** The device's own sentence for the failed landing. */
+  message: string;
+  /** When the control plane recorded the failure (server-authoritative). */
+  at: string;
 }

Fix

pnpm --filter @idss/openapi-spec run generate:client

commit dashboard/src/lib/api/generated.ts, and confirm pnpm --filter @idss/openapi-spec run check:client is green. While there, check whether enrollClient.ts / pending.ts should now read the generated LandingError type rather than a hand-written shape.

main CI stays red until this lands, so every downstream run inherits the failure.


Filed by the swarm healer (incident signature d641b082e763). Classified product-class: the fault is in packages/ + dashboard/ sources, outside the healer's repair boundary.

The `ci` workflow's stage **"OpenAPI: generated client in sync with the spec (ADR 0037)"** fails on `main` (run https://git.matou.nz/Matou/idss/actions/runs/13524): ``` ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @idss/openapi-spec@0.0.0 check:client: `node scripts/generate-client.mjs --check` dashboard/src/lib/api/generated.ts is out of date with the OpenAPI spec. ``` ## Root cause Commit `f24a38a7` ("sandcastle: #965 — a failed landing reports back…", ADR 0214 d.6) added `landing_error` to `RequestView` and a new `LandingError` schema in `packages/openapi-spec/openapi.yaml`, and hand-threaded the field through `dashboard/src/lib/api/enrollClient.ts` and `dashboard/src/lib/pending.ts` — but **did not regenerate the committed client**. `dashboard/src/lib/api/generated.ts` is untouched in that commit (last written at `bb2df791`). Bisected at the file level: ``` git checkout f24a38a7^ && node packages/openapi-spec/scripts/generate-client.mjs --check -> in sync (exit 0) git checkout f24a38a7 && node packages/openapi-spec/scripts/generate-client.mjs --check -> out of date (exit 1) ``` The generator itself is unchanged since `a8579b23`, so this is spec-vs-client drift, not a codegen regression. The door-stays-shut check (ADR 0037) is doing exactly its job. ## The missing hunk Regenerating produces a 9-line addition to `dashboard/src/lib/api/generated.ts` — nothing else moves: ```diff @@ export interface RequestView { network?: NetworkFacts; + landing_error?: LandingError; +} + +/** A failed post-approval landing's report (ADR 0214 d.6, #965): … */ +export interface LandingError { + /** The device's own sentence for the failed landing. */ + message: string; + /** When the control plane recorded the failure (server-authoritative). */ + at: string; } ``` ## Fix ``` pnpm --filter @idss/openapi-spec run generate:client ``` commit `dashboard/src/lib/api/generated.ts`, and confirm `pnpm --filter @idss/openapi-spec run check:client` is green. While there, check whether `enrollClient.ts` / `pending.ts` should now read the generated `LandingError` type rather than a hand-written shape. `main` CI stays red until this lands, so every downstream run inherits the failure. --- *Filed by the swarm healer (incident signature `d641b082e763`). Classified product-class: the fault is in `packages/` + `dashboard/` sources, outside the healer's repair boundary.*
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=13460
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=13460 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #972 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 02d5d7b0 is not a valid commit object (fabricated, or never pushed)
  • changed_files: 'dashboard/src/lib/api/generated.ts' is not in the diff of the claimed commits
envelope
{
  "issue": 972,
  "status": "success",
  "commits": [
    "02d5d7b0"
  ],
  "changed_files": [
    "dashboard/src/lib/api/generated.ts"
  ],
  "tests": [
    {
      "command": "CI=true pnpm --filter @idss/openapi-spec run check:client",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm --filter @idss/openapi-spec run test",
      "exit_code": 0
    }
  ],
  "criteria": {
    "generated client back in sync with openapi.yaml (ADR 0037 check green)": "Ran `pnpm --filter @idss/openapi-spec run generate:client`; `check:client` now exits 0 ('generated client is in sync with the OpenAPI spec'). Commit 02d5d7b adds the exact 9-line hunk to dashboard/src/lib/api/generated.ts.",
    "the missing hunk is present (RequestView.landing_error + LandingError interface)": "git diff shows `landing_error?: LandingError;` on RequestView and a new `LandingError { message: string; at: string }` interface — matching the issue's stated missing hunk verbatim.",
    "checked enrollClient.ts / pending.ts for generated-type reuse": "Reviewed: enrollClient's WirePendingView is a hand-written camelCase runtime mirror (all-optional, distinct from the snake_case generated type) and pending.ts uses a flat `landingError?: string`; reusing the generated LandingError would break that local pattern and mismatch optionality, so the minimal correct fix is the regeneration alone."
  },
  "summary": "Regenerated the OpenAPI TypeScript client so dashboard/src/lib/api/generated.ts carries the LandingError drift from #965, turning main's ADR 0037 check:client stage back to green.",
  "reason": "",
  "blockers": []
}
**close-report** for #972 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 02d5d7b0 is not a valid commit object (fabricated, or never pushed) - changed_files: 'dashboard/src/lib/api/generated.ts' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 972, "status": "success", "commits": [ "02d5d7b0" ], "changed_files": [ "dashboard/src/lib/api/generated.ts" ], "tests": [ { "command": "CI=true pnpm --filter @idss/openapi-spec run check:client", "exit_code": 0 }, { "command": "CI=true pnpm --filter @idss/openapi-spec run test", "exit_code": 0 } ], "criteria": { "generated client back in sync with openapi.yaml (ADR 0037 check green)": "Ran `pnpm --filter @idss/openapi-spec run generate:client`; `check:client` now exits 0 ('generated client is in sync with the OpenAPI spec'). Commit 02d5d7b adds the exact 9-line hunk to dashboard/src/lib/api/generated.ts.", "the missing hunk is present (RequestView.landing_error + LandingError interface)": "git diff shows `landing_error?: LandingError;` on RequestView and a new `LandingError { message: string; at: string }` interface — matching the issue's stated missing hunk verbatim.", "checked enrollClient.ts / pending.ts for generated-type reuse": "Reviewed: enrollClient's WirePendingView is a hand-written camelCase runtime mirror (all-optional, distinct from the snake_case generated type) and pending.ts uses a flat `landingError?: string`; reusing the generated LandingError would break that local pattern and mismatch optionality, so the minimal correct fix is the regeneration alone." }, "summary": "Regenerated the OpenAPI TypeScript client so dashboard/src/lib/api/generated.ts carries the LandingError drift from #965, turning main's ADR 0037 check:client stage back to green.", "reason": "", "blockers": [] } ``` </details>
Author
Member

close-report for #972 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 972,
  "status": "success",
  "commits": [
    "02d5d7b7695a01eca3c8b789d3487a9fff472fbf"
  ],
  "changed_files": [
    "dashboard/src/lib/api/generated.ts"
  ],
  "tests": [
    {
      "command": "CI=true pnpm --filter @idss/openapi-spec run check:client",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm --filter @idss/openapi-spec run test",
      "exit_code": 0
    }
  ],
  "criteria": {
    "generated client back in sync with openapi.yaml (ADR 0037 check green)": "Ran `pnpm --filter @idss/openapi-spec run generate:client`; `check:client` now exits 0 ('generated client is in sync with the OpenAPI spec'). Commit 02d5d7b adds the exact 9-line hunk to dashboard/src/lib/api/generated.ts.",
    "the missing hunk is present (RequestView.landing_error + LandingError interface)": "git diff shows `landing_error?: LandingError;` on RequestView and a new `LandingError { message: string; at: string }` interface — matching the issue's stated missing hunk verbatim.",
    "checked enrollClient.ts / pending.ts for generated-type reuse": "Reviewed: enrollClient's WirePendingView is a hand-written camelCase runtime mirror (all-optional, distinct from the snake_case generated type) and pending.ts uses a flat `landingError?: string`; reusing the generated LandingError would break that local pattern and mismatch optionality, so the minimal correct fix is the regeneration alone."
  },
  "summary": "Regenerated the OpenAPI TypeScript client so dashboard/src/lib/api/generated.ts carries the LandingError drift from #965, turning main's ADR 0037 check:client stage back to green.",
  "reason": "",
  "blockers": []
}
**close-report** for #972 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 972, "status": "success", "commits": [ "02d5d7b7695a01eca3c8b789d3487a9fff472fbf" ], "changed_files": [ "dashboard/src/lib/api/generated.ts" ], "tests": [ { "command": "CI=true pnpm --filter @idss/openapi-spec run check:client", "exit_code": 0 }, { "command": "CI=true pnpm --filter @idss/openapi-spec run test", "exit_code": 0 } ], "criteria": { "generated client back in sync with openapi.yaml (ADR 0037 check green)": "Ran `pnpm --filter @idss/openapi-spec run generate:client`; `check:client` now exits 0 ('generated client is in sync with the OpenAPI spec'). Commit 02d5d7b adds the exact 9-line hunk to dashboard/src/lib/api/generated.ts.", "the missing hunk is present (RequestView.landing_error + LandingError interface)": "git diff shows `landing_error?: LandingError;` on RequestView and a new `LandingError { message: string; at: string }` interface — matching the issue's stated missing hunk verbatim.", "checked enrollClient.ts / pending.ts for generated-type reuse": "Reviewed: enrollClient's WirePendingView is a hand-written camelCase runtime mirror (all-optional, distinct from the snake_case generated type) and pending.ts uses a flat `landingError?: string`; reusing the generated LandingError would break that local pattern and mismatch optionality, so the minimal correct fix is the regeneration alone." }, "summary": "Regenerated the OpenAPI TypeScript client so dashboard/src/lib/api/generated.ts carries the LandingError drift from #965, turning main's ADR 0037 check:client stage back to green.", "reason": "", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#972
No description provided.