Skip to content

docs: fix four tunnel pages whose examples cannot run, and give two of them task structure - #62

Merged
Mandalorian-Wang merged 1 commit into
boxlite-ai:mainfrom
Mandalorian-Wang:docs/task-structure
Oct 21, 2026
Merged

Mandalorian-Wang merged 1 commit into
boxlite-ai:mainfrom
Mandalorian-Wang:docs/task-structure

Conversation

@Mandalorian-Wang

Copy link
Copy Markdown
Contributor

Started this as the structure half of the user-perspective plan and found a
correctness bug first, so that leads.

Every tunnel example on the site is broken

They all create the box with BoxOptions(image=IMAGE) — no inbound. Since 0.10.5
that is a private box, and a tunnel against a private box is refused. Running the
documented script verbatim:

InvalidStateError: invalid state: Box ZSv4BSXipchI is not public;
set public: true before opening a tunnel

Adding the inbound spec and changing nothing else makes the same script work:

tunnel OK  uri=https://18080-d-6d61765338766e6868464856.proxy.boxlite.ai

Grepped the rest of the site for the same shape, as the rule requires. Four pages
call tunnel() and not one mentioned inbound
: serve-http, port-forwarding,
raw-streams, tunnels.

  • The three with runnable scripts now create the box with
    network=NetworkSpec(inbound=InboundNetworkSpec(mode="enabled")), carry the imports,
    and say so in Prerequisites.
  • tunnels.mdx builds on an existing box rather than creating one, so it gets the
    prerequisite plus a troubleshooting row with the exact error — its table already had
    a row for "box not started", and this is the other half of that same failure.

Verified after the fix

Extracted the repaired serve-http script and ran it as written: the tunnel opens and
returns its URL.

One run hit cannot decrypt peer's message on connect(). A direct comparison on a
fresh box had both connect() and forward() return HTTP 200, so that was
transient — it is not written up as a defect.

Structure (workstream B)

  • port-forwarding.mdx — 118 lines, zero body headings. Now three tasks: publish
    the port
    , choose the listening address, keep it running. Plus the surface it
    never mentioned: boxlite network tunnel <BOX> <PORT> --listen <ADDR> does what the
    entire script does.
  • serve-http.mdx — same treatment, plus a Troubleshooting table. Its CLI
    equivalent is boxlite network tunnel <BOX> <PORT>, which prints the URL and exits.

Still to do

raw-streams, data-across-boxes and cost-controls need the same structure pass.
Their correctness is fixed here where it was broken (raw-streams); the other two
were never broken, only shapeless.

Checks

python3 scripts/lint-docs.py .          → 180 pages checked, no soft promises
python3 scripts/gen-llms-txt.py --check → llms.txt is up to date
python3 scripts/check-structure.py .    → clean
mint broken-links                       → no broken links found
python blocks on changed pages          → all parse
Tabs / Note / Warning nesting           → balanced

Stacked conceptually on #61 (which documents the
boxlite network CLI these pages now reference), but touches disjoint files.

Every box created for this was removed afterwards.

🤖 Generated with Claude Code

…f them task structure

Started this as the structure half of the user-perspective plan and found
a correctness bug first, so that leads.

Every tunnel example on the site creates its box with
`BoxOptions(image=IMAGE)` — no inbound. Since 0.10.5 that is a private
box, and a tunnel against a private box is refused. Running the
documented script verbatim:

  InvalidStateError: invalid state: Box ZSv4BSXipchI is not public;
  set public: true before opening a tunnel

Adding the inbound spec and nothing else makes the same script work:

  tunnel OK  uri=https://18080-d-6d61765338766e6868464856.proxy.boxlite.ai

Grepped the rest of the site for the same shape, as the rule requires.
Four pages call `tunnel()` and none of them mentioned inbound:
serve-http, port-forwarding, raw-streams, tunnels.

- The three with runnable scripts now create the box with
  `network=NetworkSpec(inbound=InboundNetworkSpec(mode="enabled"))`,
  with the imports, and say so in Prerequisites.
- tunnels.mdx builds on an existing box rather than creating one, so it
  gets the prerequisite and a troubleshooting row carrying the exact
  error — its table already had a row for "box not started" and this is
  the other half of that failure.

Verified afterwards by extracting the fixed serve-http script and running
it as written: the tunnel opens and returns its URL. One run hit
`cannot decrypt peer's message` on connect(); a direct comparison on a
fresh box had both `connect()` and `forward()` return HTTP 200, so that
was transient and is not written up.

Structure, from the plan's workstream B:

- port-forwarding.mdx had 118 lines and no body headings. Now three
  tasks — publish the port, choose the listening address, keep it
  running — and the CLI path it never mentioned:
  `boxlite network tunnel <BOX> <PORT> --listen <ADDR>` does what the
  whole script does.
- serve-http.mdx likewise, plus a Troubleshooting table; its CLI
  equivalent is `boxlite network tunnel <BOX> <PORT>`, which prints the
  URL and exits.

raw-streams, data-across-boxes and cost-controls still need the same
structure pass. Their correctness is fixed here where it was broken.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Oct 21, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit f514629.

Approve preview

@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 93731935-233b-4233-87eb-575f3078f6bc
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@Mandalorian-Wang
Mandalorian-Wang merged commit 26cb9d7 into boxlite-ai:main Oct 21, 2026
2 of 3 checks passed
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