Repository navigation
docs: inherit feature states from ancestor routes in the docs sidebar - #31975
Merged
Merged
Conversation
A route's state applies to all of its descendants, so a descendant that repeats an ancestor's state is redundant. docsmanifestgen check now reports each such route with its file, breadcrumb, and the ancestor that already sets the state.
Add a Feature states section to contributing/documentation.md with the inheritance rules, a YAML example of a Premium parent with an early access child, and what the sidebar and the page title show for each route. Link to it from the content guidelines.
Run repeatedStates only when BuildManifest succeeds, so it no longer needs to tolerate undecodable files or guard against repeated includes. Use slices.Clip for copy-on-append, rename the per-route state map, and report a state listed more than once on the same route.
AI Governance sets state: [premium], and External provisioners sets it on its own route, so their descendants inherit it. Remove the repeated values that docsmanifestgen check now rejects.
nickvigilante
marked this pull request as ready for review
November 12, 2026 15:30
nickvigilante
marked this pull request as draft
November 12, 2026 15:30
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
A feature
stateindocs/manifest/now applies to a route and all its descendants, so each state is set once on the highest route it applies to.docsmanifestgen checkrejects a route that repeats an ancestor's state, and the repeated states onmainare removed.State model
Changes
docsmanifestgen check(make lint/docs-manifest) fails when a route repeats an ancestor's state, following include files and overlays, or lists a state twice.It runs only after the manifest builds cleanly.
Table-driven tests in
scripts/docsmanifestgen/state_test.go.state: [premium]on AI Governance and External provisioners only.Remove the 27 states their descendants repeat in
docs/manifest/ai-governance/**anddocs/manifest/install/operate/provisioners.yml, and regeneratedocs/manifest.json.contributing/documentation.md(new "Feature states" section with a YAML example),docs/.style/content-guidelines.md, and the doc-check skill.Important
Inherited pills under the page title and the new sidebar behavior need the matching docs-engine change (DOCS-1440).
Merge this after that ships, or child pages show no state pill until it does.
Testing
go test ./scripts/docsmanifestgen/... ./scripts/docgenenv/...golangci-lint run ./scripts/docsmanifestgen/...GOOS=windowsandGOOS=darwingo vet ./scripts/docsmanifestgen/make lint/docs-manifest,make lint/markdown,make lint/docs-redirectsmake gen/docs-manifestleaves the tree clean.Decision log: rebase onto main after #31645
ai-coder/...redirects.That covered this PR's move commits, link and URL updates, and redirects, which caused the conflicts.
main: the two move commits were dropped, and the four state-tooling and guidance commits were cherry-picked.The manifest cleanup was redone as a new commit against
main's layout, using the new lint's output as the list of repeated states.state: [premium, beta]and no child states, so it needs no change.content-guidelines.mdand the doc-check skill were resolved to keepmain's newer text (Vale word-choice updates and relative redirect syntax) and apply only the feature-states lines.a797f59737.Supersedes #31481, reopened under a human author for attribution.