chore(apps,e2e): sweep Sandbox→Box rename leftovers — regen toolbox client, fix dead env vars + stale refs#723
Merged
Conversation
…lient, fix dead env vars + stale refs - regenerate toolbox-api-client from the (already-renamed) committed daemon swagger: 7.12.0 → pinned 7.23.0 generator, kills the last 4 generated "sandbox entrypoint" doc-comments; missed by #716/#718 which covered only the product clients - add toolbox-api-client to the api-client-drift gate with --excludeTaskDependencies (committed daemon swagger is the contract; daemon-source↔swagger drift stays ungated, needs swag toolchain) - fix nx paths broken since the apps/ workspace flattening: generator -i specs in toolbox/runner client project.json (apps/daemon→daemon, apps/runner→runner — toolbox regen failed outright on the stale path) and nx.json cache inputs (go.work, daemon swagger), which pointed at nonexistent files and never invalidated caches - e2e bootstrap.sh + infra-local api.env wrote ADMIN_MAX_*_PER_SANDBOX but the API reads ADMIN_MAX_*_PER_BOX (configuration.ts:292) with default 0 — admin-org per-box quotas were silently unset - stack-reset.sh and infra-local README TRUNCATE/SELECT table `sandbox`, which migration 1781016743403 renamed to `box`; also /api/sandbox routes → /api/box and {{sandboxId}} → {{boxId}} per the configuration DTO example - sweep remaining sandbox vocabulary from e2e cases, teardown, runner-update-binary.sh, and infra-local docs (comments, docstrings, test function names; no selector references them) - includes 3 files prettier-normalized by the repo's `make lint:fix` pre-commit autofixer (eslint.config.mjs, Sidebar.tsx, Onboarding.tsx) — out of format on main; the hook is repo-wide and re-applies them on every commit until committed Part of #711. Signed-off-by: dorianzheng <xingzhengde72@gmail.com>
|
Important Review skippedToo many files! This PR contains 207 files, which is 57 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (207)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
| // Some imports not used depending on template conditions | ||
| // @ts-ignore | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
| import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; |
This was referenced Jun 10, 2026
Closed
DorianZheng
added a commit
that referenced
this pull request
Jun 10, 2026
…follow-up) (#726) ## What Regenerates the committed API clients against the post-#715 (merged A2 + MVP) API surface — the follow-up that #715's merge commit explicitly deferred: >⚠️ **CI will be red until generated clients are regenerated** against the merged API surface … **Generated clients now carry ZERO diff in this PR** (reset to main in `f9ea0730`) — regenerate upstream against the merged API surface. Since that merge, the **API client drift** check fails on every PR touching `apps/**` (e.g. #725's run 8 minutes after the merge). This PR turns it green again. ## Content **Commit 2 — the regen (`apps/libs/api-client`, `apps/api-client-go`, 231 files).** Pure `openapi-generator` 7.23.0 output, zero hand edits, produced with the exact `api-client-drift.yml` recipe (pinned generator via `openapitools.json`, NestJS spec boot with local Redis, GNU sed for the postprocess script). `analytics-api-client` and `toolbox-api-client` regenerated to **zero diff** (already current since #721/#723). Surface delta (mirrors the A2 + MVP API changes): - **removed:** snapshots / docker-registry / build / backup / archive-lifecycle / quota / usage-overview endpoints and models; `BoxState` build states (`pending_build`, `build_failed`, …); `write:snapshots` + `delete:snapshots` permission values; `listBoxesPaginated`'s `snapshots` filter param - **added:** `SystemRole`, `UpdateOrganizationName` (+ `PATCH /organizations/{organizationId}/name`), admin overview/observability models **Commit 1 — prek lint unblock (34 deleted lines, dashboard).** The Sandbox→Box rename left `LEGACY_*` route enum members byte-identical to the canonical ones — 4 pre-existing `@typescript-eslint/no-duplicate-enum-values` errors at HEAD that fail the repo's prek pre-commit hook (`make lint:fix`) for *every* local commit. The legacy routes are unreachable (identical paths, canonical registrations precede them), so this deletes them plus the orphaned `LegacyBoxRedirect`. No behavior change. Included here because nothing can be committed locally until it lands. ## Verification - `go build ./...` passes in `apps/api-client-go` (standalone), `apps/common-go`, `apps/otel-collector/exporter`. - The **API client drift** check on this PR is the canonical byte-for-byte proof. ## Known follow-up (intentionally split) Per review preference, this PR is generated code only. Three consumers still reference removed APIs and will not compile against the new clients until the prepared follow-up PR lands (branched on top of this one): - `apps/cli` — Dockerfile-build flow (`CreateBuildInfo`, `BOXSTATE_BUILD_FAILED`/`PENDING_BUILD`, `--dockerfile`/`--context`, MCP `buildInfo` arg, `pkg/minio`) - `apps/dashboard` — Registries page + registry hooks, usage-overview wiring in Spending/Limits, `templates` filter arg - `apps/libs/sdk-typescript` — `Box.buildInfo`/`backupState`/`backupCreatedAt`, `getBuildLogsUrl` No CI workflow compiles these consumers on PR today (the drift check is the only `apps/**` gate), so this PR is green-mergeable; the follow-up restores local builds. Note `apps/runner` has a **pre-existing** unrelated compile failure on main (`boxlite.WithPort` undefined in `pkg/boxlite`) — out of scope here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #711 — closes out the "Part 1 of N" remainder. A repo-wide sweep found the rename effectively complete in source (
runner/cli/daemon/dashboard/proxyat zero tokens;apps/apileftovers are historical migrations, correct as-is). What remained is below.Generated client (the bulk of the diff)
toolbox-api-clientregenerated from the committedapps/daemon/pkg/toolbox/docs/swagger.json(which #718 already renamed —git grep "sandbox entrypoint"has zero hits outside the generated client). This kills the last 4 generatedsandbox entrypoint sessiondoc-comments and moves the client from generator 7.12.0 to the pinned 7.23.0, same modernization #721 did for analytics (hence thesrc/docs/*.mdadditions — 7.23 emits them, and the drift gate requires committed == emitted).Determinism verified: regen run twice locally (with and without
--excludeTaskDependencies), byte-identical both times.Drift gate now covers it (
api-client-drift.yml): regen via--excludeTaskDependenciesso the committed daemon swagger is the contract and the job needs no Go/swag toolchain. Daemon-source↔swagger drift stays ungated (the cli/daemon-docs sibling gate noted in #711 remains a follow-up). actionlint + shellcheck clean.Why the toolbox client was never regenerated: broken nx paths
The regen target failed outright:
-i apps/daemon/pkg/toolbox/docs/swagger.jsonresolves relative to the nx workspace root, which isapps/→apps/apps/daemon/...(spec not found). Kept from upstream daytona's repo layout; #716 fixed only the product clients' targets. Fixed here:libs/toolbox-api-client/project.json—-i daemon/pkg/toolbox/docs/swagger.jsonlibs/runner-api-client/project.json— same latent bug (-i runner/...+ its{workspaceRoot}input)nx.json—apiClient/goProductionnamed inputs pointed at{workspaceRoot}/apps/...paths that don't exist, so swagger/go.work changes never invalidated task cachesFunctional config fixes
scripts/test/e2e/bootstrap.sh+apps/infra-local/configs/api.envwroteADMIN_MAX_{CPU,MEMORY,DISK}_PER_SANDBOX, but the API readsADMIN_MAX_*_PER_BOX(apps/api/src/config/configuration.ts:292-294) with default0— admin-org per-box quotas were silently unset.apps/infra-local/scripts/stack-reset.sh+ README runbook snippets ranTRUNCATE TABLE sandbox, .../SELECT ... FROM sandbox— that table was renamed toboxby migration1781016743403, so these failed as written. Also/api/sandbox→/api/box(route is@Controller('box')) and{{sandboxId}}→{{boxId}}(matches theconfiguration.dto.tsexample). infra-local merged in feat(infra-local): BoxLite-based local dev stack (L1 + L2 + M5 native runner) #595 on a pre-refactor: rename Sandbox -> Box (Part 1: apps/api epicenter) #706 vocabulary.Vocabulary sweep (no behavior change)
Comments, docstrings, and three e2e test function names (
test_*_above_per_sandbox_limit_*→per_box; no-kselector, workflow, or Makefile references them) acrossscripts/test/e2e/,scripts/deploy/runner-update-binary.sh, andapps/infra-local/. File/path references verified against the tree (box.service.ts,volume.manager.ts:47,box_sync.go,CREATE_BOXjournal tokens). All three trees now grep-clean forsandbox.Also includes 3 files prettier-normalized by the repo's
make lint:fixpre-commit autofixer (eslint.config.mjs,Sidebar.tsx,Onboarding.tsx) — they were out of format onmainand the repo-wide hook re-applies them on every commit until committed.Verification
actionlint+shellcheckon the workflow;shellcheckon all 6 edited shell scripts (only pre-existing findings on untouched lines);py_compileon all 7 edited Python files