docs: clear navigation audit findings and audit redirect coverage - #400
docs: clear navigation audit findings and audit redirect coverage#400dangrondahl wants to merge 4 commits into
Conversation
Phase 0 of #393, part of #394. No navigation changes. Rewrite the /getting_started/service-accounts link in tutorials/working_with_controls.mdx to its real target, /getting_started/authenticating_to_kosli. A redirect already covered the URL, but mint broken-links does not follow redirects, so the link itself had to change. mint broken-links now reports zero broken links. Audit every docs.kosli.com URL referenced from kosli-dev/cli and kosli-dev/server (45 unique, all file types, not just .go and .py) against config/navigation.json, config/redirects.json and production. Every URL compiled into a released CLI binary resolves today. Six 404 in production; add redirects for the three that have a target in this repo: - /kosli_overview/what_is_audit_trail -> /understand_kosli/what_is_kosli - /implementation_guide/phase_2/sso_configuration{,/entra_id_setup,/okta_setup} -> /administration/authentication/single_sign_on (SSO docs shipped in #392 under administration/authentication/, not the path the server runbooks send customers to) - /kosli-logo-dark-main.svg -> /logo/kosli-logo-dark-main.svg (referenced as the API reference logo from server routes_swagger.py:19) The remaining three need upstream fixes and are reported separately.
Phase 0 of #393, part of #394. Navigation labels and shape only: no page files move, no URLs change, no redirects needed. scripts/audit_navigation.py goes from 32 shape findings to 3, with integrity clean and the page count unchanged at 207. Dissolve 14 groups that wrapped a single entry and returned nothing for the click, promoting their children in place: - Documentation > Tutorials: Evaluation, Multi-flow workflows, Controls, Repositories, and Security > Detecting Terraform drift (which was also 3 containers below its tab, over the limit of 2) - Documentation > FAQ - Documentation > Administration: Managing Environments and Managing Custom Attestation Types, whose group labels duplicated the page titles verbatim - Implementation Guide: Roles & Responsibilities into Phase 1, and Plan Organizational Structure into Phase 2 - Reference: GitHub Action, Provider, Templates, and Helm Charts (which also fixes Kubernetes Reporter being 3 containers deep) - Changelog > Changelog: the tab now points at changelog/index directly Sentence-case the remaining Title Case labels per CLAUDE.md, keeping the existing `&` convention from Users & roles. Because dissolving the two Administration groups promotes their pages into the sidebar, sentence-case those page titles too, plus Managing Tags alongside them. Heading slugs are lowercased, so no anchor changes. Three findings are left deliberately: - Implementation Guide > Phase 2: configure Kosli wraps one group, but both labels carry meaning and the pages under it are titled only "Overview", "Attestation Types" and "Flows and Trails". - Reference > Terraform Reference > List resources parallels Resources and Data sources in the provider's own taxonomy, and will gain siblings. - Inconsistent tab icons are left to Phase 1 (#395), which decides the final tab set. Reference > CLI Reference is untouched: update-cli-nav.py regenerates that subtree from the CLI command tree on every release.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Claude encountered an error after 5m 45s —— View job Doc reviewAll three findings from the previous pass are fixed at
|
| File | Line |
|---|---|
getting_started/enforce_policies.md |
155 |
tutorials/rotating_api_keys.mdx |
107 |
changelog/index.mdx |
1210 (×2), 1357, 1404 |
The two live doc pages are worth changing to /helm/k8s_reporter/overview. The changelog entries are historical prose and reasonable to leave.
This also reconciles a loose end in the PR body: if mint broken-links genuinely does not follow redirects, these five should have been reported alongside the service-accounts link. Since the run came back clean, it evidently does consult config/redirects.json — which means the link check will never surface this class, and only a grep will.
implementation_guide/phase_1/roles_and_responsibilities/overview.md:26
Improvement — in the Stakeholders list, Sponsors is the only one of the four not linked to its page. Dissolving Roles & Responsibilities promotes all five pages to siblings under Phase 1: initial discovery, which makes this page the hub for the other four, so the one dead entry is more visible than before. The target is known-good — administration/managing_users/mapping_users_to_roles.md:33 already links /implementation_guide/phase_1/roles_and_responsibilities/sponsors.
implementation_guide/phase_1/roles_and_responsibilities/overview.md:13,28,69
Suggestion — the same page keeps three Title Case headings (Phases of Implementation, RACI Matrix, Connecting Responsibilities to Permissions) against CLAUDE.md's sentence-case rule, now sitting under a title this PR sentence-cased. Slugs are unaffected by the fix — ## RACI matrix still slugs to raci-matrix — so no anchors move. The other pages this PR retitled (managing_tags.md, both administration/managing_*/overview.md) are already sentence-cased throughout, so this is the only page where the title and its own headings now disagree.
Upstream — does not block this merge
helm/k8s_reporter/overview.mdx:2is titledKubernetes Reporter Helm Chart, and now sits directly under the sentence-cased group labelKubernetes reporter(config/navigation.json:472), so the two render adjacent in the sidebar with different conventions. The page is generated byhelm-docs, so a fix here is reverted on the next release — it belongs inkosli-dev/cli→charts/k8s-reporter/mintlify/overview.md.gotmpl. Its seven siblings are already sentence-cased.
Notes
- Restoring the
Providergroup in268720freintroduces a single-child group, soaudit_navigation.pyshape findings should now read 4, not the 3 the PR body and its "Three findings left deliberately" section claim. Worth correcting before docs: rewrite navigation into seven job-based tabs #395 is stacked on this, since that PR inherits the baseline. - The PR body's durability claim holds:
update_navigation(scripts/update-cli-nav.py:144-166) matchesitem['item'] == 'CLI Reference'and only reassigns that item'sgroups, and CLI Reference is still keyedgroupsat head — the fourgroups→pagesconversions are outside its reach. - I could not run
audit_navigation.py,pytest tests/,mint broken-links,gh pr checks, or fetch the Mintlify preview in this environment (Bash and WebFetch approvals were declined), so all counts above come from reading the tree, and the preview-sidebar confirmation the previous pass asked for is still only the author's. If you want those run here, the review job needs--allowedToolswidened forpython3,gh, andWebFetch.
2 Improvements, 1 Suggestion, 1 upstream note. Advisory — nothing here blocks the merge.
· branch docs/nav-audit-hygiene
Addresses the doc-review findings on #400. A Mintlify `groups` array holds group objects; only a `pages` array accepts bare page paths alongside nested groups. Four dissolves in the previous commit left a page string inside a `groups` array, so `faq/faq`, `github-action-reference/setup_cli_action`, `terraform-reference/index` and `template-reference/flow_template` sat in a container that cannot hold them. The Changelog tab was converted from `groups` to `pages` correctly; this applies the same shape to the other three containers. Nested group objects are valid inside `pages`, so nothing else moves. Nothing caught this: audit_navigation.py walks `groups` and `pages` identically (scripts/audit_navigation.py:87-96), so all four pages still counted toward the 207 total and --check stayed green, and both mint broken-links and the Mintlify preview build passed. Terraform Reference keeps its `Provider` group rather than being converted. Provider / Resources / Data sources / List resources is the provider's own taxonomy - the same reason List resources is kept - and dissolving it would have promoted an agent-synced Title Case title, "Kosli Terraform Provider", into the sidebar. terraform-reference/ is synced from kosli-dev/terraform-provider-kosli, so editing that title here would drift. Two page titles that dissolving did promote into the sidebar: - template-reference/flow_template: "Flow Template" -> "Flow template", replacing the sentence-case group label `Templates` it inherited from. - github-action-reference/setup_cli_action needs no change; its title, "GitHub Action", is the label its group already used. Also restore the FAQ icon that the dissolve dropped, as `icon: circle-question` in faq/faq.md front matter, so it does not render as the one bare link among the Documentation tab's icon-bearing groups.
|
Doc review findings addressed in 268720f. 1. Bare page strings inside The review's point about why nothing caught it is the useful part:
2. Promoted Title Case titles — fixed for the one that needed it. 3. FAQ icon — fixed. Re-verified: One note on scope: finding 2 does not apply to #401 stacked on top, which dissolves the |
| "implementation_guide/phase_1/roles_and_responsibilities/sponsors" | ||
| ] | ||
| } | ||
| "implementation_guide/phase_1/roles_and_responsibilities/overview", |
There was a problem hiding this comment.
Improvement — dissolving Roles & Responsibilities leaves a page titled just "Overview" sitting directly under the phase.
The sidebar under Phase 1: initial discovery now reads: Overview / Platform Engineers / Application Developers / Security and Compliance / Sponsors. "Overview" now looks like an overview of the whole phase, but implementation_guide/phase_1/roles_and_responsibilities/overview.md is specifically the roles overview — RACI matrix, role-by-role expectations — and is linked elsewhere as exactly that (administration/managing_users/mapping_users_to_roles.md:29: "Implementation Guide: Roles and Responsibilities").
This is also the opposite call from Phase 2 in the same commit, where the middle wrapper (Plan Organizational Structure) was dissolved and the meaningful inner label (Naming conventions) kept.
Cheapest fix that keeps the phase symmetry: retitle the page rather than restore the group —
title: Roles and responsibilitiesIts description already says "Define roles and responsibilities for Kosli implementation", and the heading slugs on the page don't change, so no anchors move.
Addresses the remaining doc-review findings on #400. Dissolving `Roles & Responsibilities` promoted a page titled just "Overview" to lead `Phase 1: initial discovery`, which is the opposite call from Phase 2 in the same commit, where the meaningful inner label was kept. Retitle the page to "Roles and responsibilities" so the label survives without restoring the group. Also update the link text in getting_started/environments.md, which named the page by its old Title Case title, "Managing Tags".
Phase 0 of #393. Closes #394.
Navigation labels, shape, and redirect coverage. No page files move, no URLs change. Bottom layer of a two-layer stack; Phase 1 (#395) builds the seven-tab rewrite on top of this.
URL impact
Redirects are added for URLs that already 404 in production. No existing URL changes.
What this does
1. Fixes the one broken internal link
tutorials/working_with_controls.mdxlinked/getting_started/service-accounts. A redirect covered it, butmint broken-linksdoes not follow redirects, so the link itself had to change — now/getting_started/authenticating_to_kosli, which matches the "Get a Kosli API token" link text.mint broken-linksreports zero broken links.2. Audits every docs URL referenced from outside this repo
Grepped
kosli-dev/cliandkosli-dev/serveracross all file types, not just*.goand*.pyas #394 suggested — real references also live in*.html,*.tsx,*.ymland*.gotmpl. That found 45 unique URLs, checked againstconfig/navigation.json,config/redirects.jsonand production over HTTP.Every URL compiled into a released CLI binary resolves. That was the live risk in #394 and it isn't one. Six 404 in production; redirects added for the three with a target here:
/kosli_overview/what_is_audit_trail/understand_kosli/what_is_kosliserver/docs/old/*.txt/implementation_guide/phase_2/sso_configuration(+entra_id_setup,okta_setup)/administration/authentication/single_sign_onserver/docs/sso_configuration.md/kosli-logo-dark-main.svg/logo/kosli-logo-dark-main.svgserver/src/app/routes_swagger.py:19The other three need upstream fixes and are filed as kosli-dev/server#6837 — two doubled-slash URLs the SSO runbooks paste to customers, and the broken API-reference logo.
/tutorials/snykis a test fixture incli/internal/docgen/mintlify_test.gothat never existed here, so deliberately no redirect.3. Clears the navigation audit
scripts/audit_navigation.py: 32 shape findings → 3. Integrity clean, page count unchanged at 207.Dissolved 14 groups that wrapped a single entry — more than the 8 #394 listed, since the audit reports more than the issue captured. All 3 over-deep groups are gone, two as a side effect of dissolving their parents.
Two of those groups,
Managing EnvironmentsandManaging Custom Attestation Types, wrapped a single page whose title was the group label verbatim. Dissolving them promotes those titles into the sidebar, so their page titles are sentence-cased here too, plusmanaging_tags.mdalongside them. Heading slugs are lowercased, so no anchors move.Remaining Title Case nav labels are sentence-cased per
CLAUDE.md, keeping the existing&convention fromUsers & roles.Four findings left deliberately
Implementation Guide > Phase 2: configure Kosliwraps one group. Both labels carry meaning, and dissolving the inner one would leave a bare "Overview" that is not a Phase 2 overview.Reference > Terraform Reference > Provideris kept, not dissolved.Provider/Resources/Data sources/List resourcesis the provider's own taxonomy, and dissolving it would promote an agent-synced Title Case title,Kosli Terraform Provider, into the sidebar — which the next upstream sync would undo if corrected here.Reference > Terraform Reference > List resources, for the same taxonomy reason, and it will gain siblings.So the audit goes 32 → 4, and the
Providerentry is an accepted exception rather than a fix — it was converted back deliberately after review, to avoid a schema-shaped fix that traded one problem for another.Reference > CLI Referenceis untouched.update_navigationinscripts/update-cli-nav.py:144-166only replacesitem['groups']for that one menu item, so everything else here survives the next CLI release.Follow-up worth adding to #398
The Title Case problem is roughly twice what #394 implies.
audit_navigation.pyinspects only navigation labels, but 21 hand-authored pages carry Title Case front-matter titles —Environment Policies,Platform Engineers,Lab 3: Build Controls,Rego Policy— and each renders as a sidebar label. Not swept here: some are product names (Magic Link,Kosli Actions) and the lab titles are a judgment call. The enforcement fix belongs in #398: check page titles, not just nav labels.Verification
python3 scripts/audit_navigation.py --check— exit 0python3 -m pytest tests/— 44 passedmint broken-links— zero broken linkskosli-dev/cliandkosli-dev/servereither resolves or is covered by a new redirect, except the three filed upstream