Skip to content

docs(infra-local): box boot via the API is verified#884

Closed
law-chain-hot wants to merge 2 commits into
mainfrom
docs/infra-local-box-boot-verified
Closed

docs(infra-local): box boot via the API is verified#884
law-chain-hot wants to merge 2 commits into
mainfrom
docs/infra-local-box-boot-verified

Conversation

@law-chain-hot

@law-chain-hot law-chain-hot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What

Corrects a stale caveat in apps/infra-local/README.md. The doc said "Box boot is unverified on this stack" — that's no longer true.

Evidence (verified 2026-06-29 on the local stack)

End-to-end, API-only:

  1. POST /api/v1/boxes (no image) → default-resolves ghcr.io/boxlite-ai/boxlite-agent-base:v0.1.0 → box boots creating → started.
  2. POST /api/v1/boxes/:id/stopstopped.
  3. Proxy call on the stopped box (POST /api/v1/boxes/:id/exec, also /metrics) → desiredState flips STOPPED → STARTEDbox_sync auto-boots it back to started.
  4. exec on the auto-started box → returns an execution_id (success).

Scope

  • Docs only. No code change.
  • The dashboard "Create Box" UI is still incomplete (image picker removed / PostHog-gated) — that caveat is kept; only the box-boot claim is updated, with the API-direct path called out.

Discovered while running the exec-autostart e2e for #861; this fix is intentionally separate from that PR.

Summary by CodeRabbit

  • Documentation
    • Updated troubleshooting guidance for box creation and execution workflows.
    • Clarified the expected box state flow when starting and stopping a box.
    • Noted that the dashboard create-box experience remains incomplete; API-based creation should be used instead.
    • Refined what happens when no image is provided, including the default image reference behavior.

…ified)

Verified 2026-06-29 on the local stack: POST /api/v1/boxes (no image
default-resolves to agent-base) creates a box that boots creating -> started,
POST .../stop stops it, and a proxy call (POST .../:id/exec) on a stopped box
auto-starts it. The dashboard "Create Box" UI is still incomplete (image picker
removed / PostHog-gated), but the box-boot caveat itself was stale.
@law-chain-hot
law-chain-hot requested a review from a team as a code owner June 29, 2026 08:40
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

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: 1ec409f0-31ed-4e33-8de5-9c3c6c9a53a1

📥 Commits

Reviewing files that changed from the base of the PR and between 43e2f88 and 61a6dad.

📒 Files selected for processing (1)
  • apps/infra-local/README.md
✅ Files skipped from review due to trivial changes (1)
  • apps/infra-local/README.md

📝 Walkthrough

Walkthrough

apps/infra-local/README.md updates the troubleshooting note to describe the verified POST /api/v1/boxes flow, default image selection when image is omitted, the creating → started state transition, POST .../stop, and the incomplete dashboard “Create Box” UI.

Changes

Infra-local README update

Layer / File(s) Summary
Box boot troubleshooting note
apps/infra-local/README.md
Replaces the unverified box boot note with verified POST /api/v1/boxes flow, default image selection behavior, creating → started state transitions, POST .../stop, and the dashboard UI limitation note.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • boxlite-ai/boxlite#792: Shares the POST /api/v1/boxes create-box flow and default image behavior described in this README update.

Suggested reviewers

  • DorianZheng

Poem

🐇 Hop hop, the boxes now know the way,
From API call to started day.
Default image twirls on its curated track,
And stop closes boxes neatly back.
The dashboard hutch still has a few seams,
But this note now matches the real-life dreams.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the docs-only change to verify infra-local box boot via the API.
Description check ✅ Passed The description covers the change, verification steps, and scope, with no rollout risks to note.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/infra-local-box-boot-verified

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43e2f8896a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/infra-local/README.md Outdated
> **Box boot via the API works** (verified 2026-06-29). `POST /api/v1/boxes` with
> no `image` default-resolves to `ghcr.io/boxlite-ai/boxlite-agent-base:v0.1.0`,
> creates the box, and it boots `creating → started`; `POST .../stop` stops it,
> and a proxy call (`POST .../:id/exec`) on a stopped box auto-starts it. The

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the explicit start step before stopped-box exec

When the box has actually reached state=stopped, desiredState=stopped, this documented flow sends users to POST .../:id/exec, but that endpoint is only a proxy (BoxliteProxyController.proxyExecproxyToRunner, apps/api/src/boxlite-rest/boxlite-proxy.controller.ts:45-53 and 177-213) and never calls BoxService.start; the desired-state flip to STARTED is done by the explicit start endpoint (apps/api/src/boxlite-rest/boxlite-box.controller.ts:177, apps/api/src/box/services/box.service.ts:816-819). The runner also classifies stopped execs as a conflict (apps/runner/pkg/api/controllers/boxlite_exec.go:76-86), so API-only validation will fail unless callers POST /api/v1/boxes/:id/start before exec.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 61a6dad. The "proxy exec auto-starts a stopped box" behavior is from #861 (ensureStartedForProxy/startHint), which isn't merged to main yet, so it doesn't hold on this base branch. Dropped that clause; the doc now states only what's true on main (create → boot → stop via the API).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/infra-local/README.md`:
- Around line 92-98: The README’s default box image is stale and does not match
the API fallback used by box creation. Update the documentation in the box boot
section to reflect the current default from curated-images.constant.ts and the
create-box path in the API, keeping the rest of the verification notes intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 59ceb5b0-674e-4825-8762-e38d4f6b4d8c

📥 Commits

Reviewing files that changed from the base of the PR and between a140a76 and 43e2f88.

📒 Files selected for processing (1)
  • apps/infra-local/README.md

Comment thread apps/infra-local/README.md Outdated
… autostart claim

Address review on #884:
- CR (Major): documented default `v0.1.0` is stale. main's
  curated-images.constant.ts resolves no-image creates to
  boxlite-agent-base:20260605-p0-r3, and the tag rotates — reference the constant
  instead of pinning a value that goes stale.
- Codex (P2): the "proxy exec auto-starts a stopped box" behavior comes from #861
  (not yet merged); main's proxyExec doesn't trigger it. Dropped that clause so
  the doc states only what's true on main: create -> boot -> stop via the API.
@law-chain-hot
law-chain-hot enabled auto-merge June 30, 2026 02:20
auto-merge was automatically disabled July 3, 2026 13:33

Pull request was closed

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