Skip to content

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

Merged
beran-t merged 1 commit into
mainfrom
docs/hide-internal-envd-endpoints
Aug 6, 2026
Merged

docs: exclude internal-only envd endpoints (fixes mintlify dev ENAMETOOLONG)#334
beran-t merged 1 commit into
mainfrom
docs/hide-internal-envd-endpoints

Conversation

@beran-t

@beran-t beran-t commented Aug 6, 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(), with a comment explaining why.
  • openapi-public.yml: remove those six path blocks and the two now-orphaned schemas (CollapseResult, ComposeRequest). Verified: 61 -> 55 paths, no broken $refs, YAML anchors intact, no unrelated upstream churn.

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.

Notes

Follow-up (not in this PR)

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

Six envd/orchestrator internals (/freeze, /unfreeze, /collapse, /fsfreeze,
/fsthaw, /files/compose) leak in from the upstream envd spec. The SDKs never
call them - they are internals of the pause/resume path. Their multi-sentence
summaries also exceed the macOS 255-byte filename limit Mintlify derives from
'summary' (notably /fsfreeze), which aborts the whole API-reference build.

Add them to excluded_exact in filter_paths() so a re-add upstream cannot
re-leak them, and drop the six path blocks plus the now-orphaned CollapseResult
and ComposeRequest schemas from openapi-public.yml (both must change together
or the weekly regen re-adds them).
@mintlify

mintlify Bot commented Aug 6, 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 6, 2026, 1:25 PM

@beran-t
beran-t merged commit 900186b into main Aug 6, 2026
8 checks passed
@beran-t
beran-t deleted the docs/hide-internal-envd-endpoints branch August 6, 2026 13:34
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.

2 participants