Skip to content

refactor(box): drop the dead userId field from the runner payload#757

Merged
DorianZheng merged 1 commit into
mainfrom
chore/drop-runner-userid
Jun 13, 2026
Merged

refactor(box): drop the dead userId field from the runner payload#757
DorianZheng merged 1 commit into
mainfrom
chore/drop-runner-userid

Conversation

@DorianZheng

@DorianZheng DorianZheng commented Jun 13, 2026

Copy link
Copy Markdown
Member

userId was a required-but-unused field in the runner CreateBoxDTO/RecoverBoxDTO — nothing reads it; the runner keys off organizationId. Removed from the Go DTOs + stub, the v2/v0 adapter payloads, the generated runner-api-client DTOs, and the swagger docs (json/yaml/docs.go). Auth/User userId is untouched.

Summary by CodeRabbit

  • Refactor
    • Removed userId field from box creation and recovery operations, streamlining the API request structure.
    • Updated API documentation and schemas to reflect the simplified contract.

userId was a required-but-unused field in the runner CreateBoxDTO/RecoverBoxDTO — nothing reads it; the runner keys off organizationId. Removed from the Go DTOs + stub, the v2/v0 adapter
payloads, the generated runner-api-client DTOs, and the swagger docs (json/yaml/docs.go). Auth/User userId is untouched.
@DorianZheng DorianZheng requested a review from a team as a code owner June 13, 2026 10:16
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e11483f8-6141-4213-b336-d2089ab8be1c

📥 Commits

Reviewing files that changed from the base of the PR and between 6f96da3 and a34c6cb.

📒 Files selected for processing (9)
  • apps/api/src/box/runner-adapter/runnerAdapter.v0.ts
  • apps/api/src/box/runner-adapter/runnerAdapter.v2.ts
  • apps/libs/runner-api-client/src/models/create-box-dto.ts
  • apps/libs/runner-api-client/src/models/recover-box-dto.ts
  • apps/runner/pkg/api/docs/docs.go
  • apps/runner/pkg/api/docs/swagger.json
  • apps/runner/pkg/api/docs/swagger.yaml
  • apps/runner/pkg/api/dto/box.go
  • apps/runner/pkg/boxlite/stubs.go
💤 Files with no reviewable changes (7)
  • apps/libs/runner-api-client/src/models/create-box-dto.ts
  • apps/runner/pkg/api/dto/box.go
  • apps/api/src/box/runner-adapter/runnerAdapter.v0.ts
  • apps/libs/runner-api-client/src/models/recover-box-dto.ts
  • apps/api/src/box/runner-adapter/runnerAdapter.v2.ts
  • apps/runner/pkg/boxlite/stubs.go
  • apps/runner/pkg/api/docs/swagger.yaml

📝 Walkthrough

Walkthrough

Removes the userId field from box creation and recovery DTOs across the TypeScript client, Go server DTO contracts, OpenAPI documentation, and adapter implementations that populate these request payloads during box creation and recovery workflows.

Changes

Box creation and recovery userId removal

Layer / File(s) Summary
Go DTO struct contract updates
apps/runner/pkg/api/dto/box.go
CreateBoxDTO and RecoverBoxDTO structs remove the UserId field and its associated JSON and validation tags.
TypeScript DTO interface contract updates
apps/libs/runner-api-client/src/models/create-box-dto.ts, apps/libs/runner-api-client/src/models/recover-box-dto.ts
CreateBoxDTO and RecoverBoxDTO interfaces remove the userId property; CreateBoxDTO adds an optional volumes field.
Swagger and API documentation updates
apps/runner/pkg/api/docs/docs.go, apps/runner/pkg/api/docs/swagger.json, apps/runner/pkg/api/docs/swagger.yaml
OpenAPI and Swagger schema definitions for CreateBoxDTO and RecoverBoxDTO remove userId from the required constraints and delete it from the defined properties.
TypeScript adapter payload updates
apps/api/src/box/runner-adapter/runnerAdapter.v0.ts, apps/api/src/box/runner-adapter/runnerAdapter.v2.ts
createBox and recoverBox methods in both v0 and v2 adapters no longer set the userId field in request payloads.
Go service box recreation update
apps/runner/pkg/boxlite/stubs.go
RecoverBox removes the UserId assignment from the CreateBoxDTO struct when recreating a box.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • law-chain-hot

Poem

🐰 A field once passed with care and might,
Now fades away, no longer in sight.
From adapters clean to schemas bright,
userId departs—the docs align just right! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing an unused userId field from runner payloads. It is specific, directly related to the changeset, and captures the primary intent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/drop-runner-userid

Comment @coderabbitai help to get the list of available commands and usage tips.

@DorianZheng DorianZheng merged commit d035ad2 into main Jun 13, 2026
29 of 31 checks passed
@DorianZheng DorianZheng deleted the chore/drop-runner-userid branch June 13, 2026 10: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