docs(dynamic-ci): add a Dynamic CI page gated to the dynamic-ci group - #318
Merged
Conversation
Mintlify serves a page naming `groups` in its frontmatter only to readers whose JWT lists one of them, and 404s it for everyone else — hidden from navigation, search, and the Assistant. This is the first page to use that, so it doubles as the end-to-end test of the handshake trunk2 mints at `/mintlify-login`. `public: true` at the top level keeps the rest of the site open once authentication is switched on in the Mintlify dashboard: the default becomes "public", and only pages that name a group are gated. Without it, turning on authentication would gate all of docs.trunk.io at once. Content is Dynamic CI's private beta, sourced from the action's own README so the two cannot disagree on the contract — the `!= 'false'` rule and the merge-queue guarantee especially, since both are load-bearing for correctness rather than style. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
|
Docs PR opened: #319 Added a changelog entry announcing the Dynamic CI private beta, synced changelog navigation, and fixed a prior entry's frontmatter. |
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.
What
Adds
dynamic-ci/index.mdx— a Dynamic CI overview — carryinggroups: ["dynamic-ci"]in its frontmatter, plus theDynamic CInav tab and a top-level"public": trueindocs.json.This is the first gated page on docs.trunk.io, and it exists as much to prove the gate as to document the product. It pairs with trunk-io/trunk2's
/mintlify-loginroute, which signs the JWT that carries the group.How the gating works
Mintlify serves a page naming
groupsonly to a reader whose JWT lists one of them. Everyone else gets a 404, and the page is absent from navigation, search, and the Assistant — so it reads as "doesn't exist" rather than "you're locked out", which is what we want for an unreleased product.The group comes from trunk2, not from here.
/mintlify-loginevaluatesshowDynamicCI(LaunchDarkly projectfrontend-web-2) through the same helper the app's own gates use, and emits["dynamic-ci"]when it's on. It deliberately does not key onciOptimizerDynamicCiEnabled(projectbackend-services) — that's the engine kill switch, and gating docs on it would delete a customer's documentation during the incident that flipped it.Why
"public": trueat the top levelAuthentication is configured in the Mintlify dashboard, not in
docs.json; the only thing this file controls is what stays open. Mintlify's default once authentication is enabled is that every page requires a login."public": trueinverts that to "public by default, gated only where a page names a group", so switching authentication on doesn't put all of docs.trunk.io behind a login.The alternative — marking each of the five existing tabs public — is the same outcome with five places to forget when a tab is added.
Content
Sourced from
trunk-io/dynamic-ci-filter's README rather than written fresh, so the docs and the action can't drift on the contract. Two parts are load-bearing for correctness rather than style, and are called out as warnings:!= 'false', never== 'true'. A job with no verdict emits no output at all;== 'true'would silently skip the whole suite the first time the service degraded.trunk-merge/prefix check, before any recommendation work), so users must not addgithub.event_name != 'pull_request'— draft queue PRs arrive aspull_requestevents. GitHub's native merge queue is not covered and needs its own gate.The page is marked private beta up front.
Blocked on
Group-based access is a Mintlify Enterprise feature. Until the plan is upgraded and a signing key is generated:
/mintlify-loginanswers503— its secret is unprovisioned and degrades to an empty key, so nothing breaks in the meantime.Once the plan lands: generate the key in the dashboard, set the login URL to
https://app.trunk.io/mintlify-login, set site visibility to Private, and store the key in themintlify-docs-authsecret in both accounts.Testing
Toggle
showDynamicCIfor a test user and confirm the page appears and disappears — including from search and the nav, not just on direct navigation. Note groups are snapshotted into the JWT at login with a one-dayexpiresAt, so a flag flip needs a re-auth against the docs to take effect.docs.jsonvalidates clean againsthttps://mintlify.com/docs.json.