Skip to content

docs: exclude internal-only envd endpoints (fixes mintlify dev ENAMETOOLONG) - #331

Closed
beran-t wants to merge 2 commits into
mainfrom
fix/exclude-internal-envd-endpoints
Closed

docs: exclude internal-only envd endpoints (fixes mintlify dev ENAMETOOLONG)#331
beran-t wants to merge 2 commits into
mainfrom
fix/exclude-internal-envd-endpoints

Conversation

@beran-t

@beran-t beran-t commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Problem

mintlify dev crashes on macOS before serving anything:

erro ENAMETOOLONG: name too long, open 'src/_props/docs/api-reference/envd/freeze-the-guest-rootfs-fifreeze-before-a-filesystem-only-pause-...-the-orchestrator-thaws-only-on-the-pause-failure-path.mdx'

Mintlify generates one API-reference page per OpenAPI operation and derives the filename from the operation summary. Six internal-only envd endpoints leaked into the generated openapi-public.yml whose summary fields are multi-sentence engineering notes. /fsfreeze's summary produces a filename over the 255-byte macOS limit, aborting the whole build.

Why these endpoints should not be here anyway

The generator's own docstring states the envd spec comes from the curated public copy in e2b-dev/E2B, which is supposed to exclude internal-only endpoints like /freeze, /collapse, /files/compose. The SDKs never call them. They slipped through because filter_paths()'s excluded_exact only listed /init, and their auth scheme is not one of the internal markers, so the admin-auth filter did not drop them.

Fix

  • scripts/generate_openapi_reference.py: add the six internal envd paths (/freeze, /unfreeze, /collapse, /fsfreeze, /fsthaw, /files/compose) to excluded_exact in filter_paths().
  • openapi-public.yml: regenerated effect - those six path blocks removed (227 lines). YAML re-validated (55 paths, anchors intact, legitimate /files kept).

Both change together on purpose: openapi-public.yml is regenerated weekly by .github/workflows/api-reference-validation.yml, so without the generator patch the weekly run would re-add the leaked paths.

Verification

mintlify dev now boots with the full docs.json (API-reference anchor included), zero ENAMETOOLONG, and API-reference pages render.

Follow-up (not in this PR)

The upstream curated envd spec in e2b-dev/E2B appears to still carry these internal endpoints. Worth fixing there too so the exclusion here is defense-in-depth rather than the only guard.

Six internal-only envd endpoints (/freeze, /unfreeze, /collapse,
/fsfreeze, /fsthaw, /files/compose) were leaking into the generated
openapi-public.yml. The SDKs never call them and the generator docstring
already states they should not appear in public docs.

Their summaries are multi-sentence engineering notes. Mintlify derives an
API-reference page filename from each operation's summary, and /fsfreeze's
summary produces a >255-byte filename that macOS rejects with ENAMETOOLONG,
aborting 'mintlify dev' entirely.

They slipped through because filter_paths()'s excluded_exact only listed
/init and their auth scheme is not flagged internal, so the admin-auth
filter did not catch them. Add them to excluded_exact and regenerate the
spec (227 lines removed). mintlify dev now boots with the API-reference
anchor and no ENAMETOOLONG.
@mintlify

mintlify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
e2b 🟢 Ready View Preview Aug 5, 2026, 3:27 PM

Preview was torn down when the PR was closed; reopen re-ran the GitHub
checks but did not rebuild the Mintlify preview. Empty commit to kick a
fresh deployment. No content change.
@beran-t

beran-t commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #334. Reopening this PR did not rebuild the Mintlify preview (empty-commit push was skipped as a no-op deploy). #334 is an identical fix on a fresh branch off current main and triggers a clean preview deployment.

@beran-t beran-t closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant