Skip to content

Fix: include acceptTerms in workspace create body to match generated client - #12

Open
polylane[bot] wants to merge 1 commit into
mainfrom
polylane/autofix/chat/pvyi6prlaw3s-69f7df6
Open

Fix: include acceptTerms in workspace create body to match generated client#12
polylane[bot] wants to merge 1 commit into
mainfrom
polylane/autofix/chat/pvyi6prlaw3s-69f7df6

Conversation

@polylane

@polylane polylane Bot commented Aug 3, 2026

Copy link
Copy Markdown

🟡 Fixes: CI failing: CI on coreplanelabs/cli@main
active for 5m

Lineage Status
◉ Alert issue CI failing: CI on coreplanelabs/cli@main 🟡 active
🗼 ↳ investigated in Investigation thread
🔧 ↳ kicked off Autofix fix_fc511a… succeeded
🔀 ↳ opened this PR open

CI typecheck on main was failing because the workspace create command was sending a request body missing a required acceptTerms field that the generated API client expects. PR #10 removed acceptTerms from the body on the assumption the server rejects unknown fields, but the live OpenAPI spec still declares it as required, and the codegen step in CI regenerates a client with that requirement. This change restores acceptTerms: true to the request body so the typecheck passes and the server records the terms acceptance, consistent with the existing user-facing notice.

What changed

  • src/commands/workspace/create.ts: re-added acceptTerms: true to the CreateWorkspaceBody literal on line 37, matching the generated client's required { name; description?; slug?; link?; acceptTerms: true } shape.

Validation

  • npm run typecheck — codegen + tsc --noEmit passes (exit 0), resolving TS2741 on line 37 of src/commands/workspace/create.ts.
Root cause, safety reasoning, and scoping notes

Root cause

Without this fix, npm run typecheck in CI (and locally after npm run codegen) fails at src/commands/workspace/create.ts:37 with TS2741, blocking all PRs from going green. The spec the server publishes requires acceptTerms; the CLI already prints a terms-acceptance notice on stderr before the call, so populating the field aligns the code with both the contract and the UX.

Why it's safe

Additive-only: re-adds a field the generated client already requires. No schema, interface, or behavior change beyond populating a previously-required field the server expects and records.

Out of scope / follow-ups

  • Did not modify the codegen script, generated client, or OpenAPI spec, per plan constraints. No other commands touched; the existing terms-acceptance stderr notice is unchanged.
1 file changed (+1/-1)
  • src/commands/workspace/create.ts: modified, +1/-1

view-autofix view-investigation view-issue


Generated by Polylane.

…client

Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
@polylane polylane Bot added the polylane label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants