Skip to content

docs: clean up nav-validator and redirect-lint baselined violations#21845

Merged
sbvegan merged 11 commits into
developfrom
docs/nav-cleanup
Jul 17, 2026
Merged

docs: clean up nav-validator and redirect-lint baselined violations#21845
sbvegan merged 11 commits into
developfrom
docs/nav-cleanup

Conversation

@claude

@claude claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Requested by Matthew Cruz · Slack thread

What / why

The cleanup half of Option A slice 2 (CI guardrails) of the canonical-homes plan: fixes the nav/redirect violations that were grandfathered when the validators landed, and prunes the corresponding allowlist/baseline entries in the same PR (stale entries are lint errors by design).

The validator tooling merged as #21843. This PR now sits directly on develop, and the diff is cleanup-only: grandfather-file prunes, nav re-homes, and 5 page deletions with redirect coverage.

docs.json lane: this PR holds the docs.json nav/redirects serialization slot; both predecessors in the lane (#21841, #21843) have merged, so there is no remaining merge-order constraint.

Tracks ethereum-optimism/solutions#955

Before / After

Guardrail state Before After
Grandfathered nav orphans 11 0 (2 allowlisted with terminal reasons, see below)
Grandfathered duplicate nav entries 1 (rust/op-reth/cli/op-reth) 0
Grandfathered shadowed redirect sources 1 (/chain-operators/tools/op-deployer/usage/upgrade) 0
Baselined dead internal links 24 occurrences (22 file→target pairs) unchanged — deliberately left (see below)
lint:nav / lint:redirects green (via grandfather files) green (near-empty grandfather files)

Orphans re-homed into the nav (4)

  • op-stack/features/preinstallsOP Stack > Features (two live redirects already point at this page)
  • op-stack/features/experimental/alt-da-modeOP Stack > Features (a live redirect points at it)
  • node-operators/tutorials/node-from-docker-simple-optimism-nodeNode Operators > Archive, alongside the other op-geth-era pages — the page's own warning says simple-optimism-node defaults to end-of-support op-geth and steers new deployments to the docker-compose tutorial
  • rust/kona/glossaryRust > Kona - Introduction (6 live kona pages deep-link its anchors)

Orphans deleted, with redirect coverage in this tree (5 pages / 4 redirects)

  • chain-operators/tools/op-deployer/usage/upgrade.mdx — a 12-line stub whose entire content is a warning pointing at /notices/op-deployer-upgrade-deprecation; the redirect to that notice already existed (it was the shadowed-source violation — one deletion resolves both findings, keep-redirect-drop-page)
  • rust/kona/run.mdx — older, shorter duplicate of the rust/kona/node/run/* chapter, zero inbound links → new redirect to /rust/kona/node/run/overview
  • rust/kona/sdk/fpp-dev/io.mdx — empty title-only stub, zero inbound links → new redirect to /rust/kona/sdk/fpp-dev/intro
  • rust/op-reth/cli/op-reth/db/settings/set/receipts_in_static_files.mdx and ..._transaction_senders_in_static_files.mdx — stale generated pages for the since-renamed receipts / transaction_senders subcommands (the renamed pages are on disk and in the nav); new redirects to the renamed pages

Duplicate nav entry (1)

  • Removed the bare rust/op-reth/cli/op-reth entry directly under "op-reth - CLI Reference"; the page keeps its home as the first entry of the nested op-reth group.

Remaining allowlist entries (2, both with terminal reasons — not grandfathered violations)

  • chain-operators/tutorials/create-l2-rollup/code-setuphanded off to Option C slice C1 (homepage router / flagship-tutorial repair), which owns re-homing it; the C1 PR removes the entry when its nav fix lands.
  • chain-operators/guides/features/sequencer-defined-metering — kept out of the nav deliberately: the page carries hidden: true frontmatter and documents a feature that is not yet live (expected with the Lagoon hardfork). Nav-listing it would announce an unshipped feature; the allowlist reason says to add it to Chain Operators > Guides > Features when the feature ships. This is the one deviation from "empty allowlist" — flagged for reviewer judgment.

Dead internal links: left baselined on purpose

The 24 baselined dead internal links (19 files) are not touched here: they are content-level link repairs that belong to the Option B slice B2 cross-repo link policy + mechanical sweep, which is held until the B2 linter PR merges. Fixing them piecemeal here would collide with that sweep and bloat this docs.json-lane PR.

Verification

  • pnpm lint:nav — OK: 398 pages on disk, 396 distinct nav entries, 2 allowlisted orphans
  • pnpm lint:redirects — OK: 465 redirects, 402 files scanned, 22 grandfathered violations remaining (all dead-link baseline)
  • docs.json parses; every nav entry maps to a file on disk (validator check N2)

Reviewer checklist

  • The four re-homed pages sit in sensible nav groups (especially simple-optimism-node under Archive)
  • The five deletions are acceptable (all superseded/stub pages; every deleted URL is redirect-covered in this tree)
  • Keeping sequencer-defined-metering hidden-by-design is the right call
  • The code-setup handoff to the C1 tutorial-repair PR is acceptable

More context: projects/docs-improver/README.md

🤖 Drafted by the docs-improver agent — review before merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EBBBR8m2V8LjzMvuG7Go2L


Generated by Claude Code

claude added 2 commits July 16, 2026 07:30
Two deterministic lint scripts in docs/public-docs/scripts/lint/ make
docs.json navigation and redirects CI-guarded artifacts (Option A slice 2
of the canonical-homes docs plan):

- validate-nav.ts: every .mdx on disk is in nav or allowlisted with a
  reason; no duplicate nav entries; no nav entries without a file.
- validate-redirects.ts: a page deleted or moved in a PR must gain a
  redirect in the same PR; no chained redirects; no dead redirect
  targets; no duplicate redirect sources; no redirect source shadowing a
  live page; no dead internal links.

CI wiring follows the shell-check precedent: docs-lint runs in the main
workflow and gates merge via ci-gate's terminal requires; the docs-only
fast path runs the same job inside ci-gate-skip, whose ci-gate now
verifies it instead of always succeeding.

Pre-existing violations on develop (11 orphans, 1 duplicate nav entry,
1 shadowed redirect source, 24 dead internal links) are grandfathered in
committed shrink-only allowlist/baseline files, so the checks pass on
current develop and block only NEW violations; the cleanup lands as a
follow-up PR.

Tracks ethereum-optimism/solutions#955

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBBBR8m2V8LjzMvuG7Go2L
Fixes the pre-existing nav/redirect violations grandfathered when the
guardrails were introduced, and prunes their allowlist/baseline entries
in the same PR (stale entries are lint errors by design):

- Re-home 4 orphans into the nav: op-stack/features/preinstalls and
  op-stack/features/experimental/alt-da-mode (OP Stack > Features),
  node-operators/tutorials/node-from-docker-simple-optimism-node
  (Node Operators > Archive, alongside the other op-geth-era pages),
  rust/kona/glossary (Kona - Introduction).
- Delete 5 superseded pages, each covered by a redirect in this tree:
  op-deployer usage/upgrade stub (redirect to the deprecation notice
  already existed; also resolves the shadowed redirect source),
  rust/kona/run (superseded by rust/kona/node/run/*),
  rust/kona/sdk/fpp-dev/io (empty title-only stub),
  and the two stale op-reth CLI pages for the renamed
  db settings set receipts/transaction_senders subcommands.
- Remove the duplicate rust/op-reth/cli/op-reth nav entry.
- Keep sequencer-defined-metering allowlisted as deliberately hidden
  (frontmatter hidden: true, feature not yet live) and code-setup
  allowlisted pending the Option C slice C1 tutorial-repair PR.

Tracks ethereum-optimism/solutions#955

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBBBR8m2V8LjzMvuG7Go2L
@claude
claude Bot requested a review from a team as a code owner July 16, 2026 07:43
@claude claude Bot added docs-improver Opened by the docs-improver agent size:S docs-improver: small change documentation labels Jul 16, 2026
claude added 3 commits July 16, 2026 07:50
Both docs-lint invocations (main workflow and ci-gate-skip) were bare,
unlike every other checkout-with-mise job in this file. Follow the
contracts-bedrock-tests-heavy-fuzz-modified precedent for jobs that diff
against origin/develop and attach circleci-repo-readonly-authenticated-
github-token to both, so mise tool installs and any GitHub API access
run authenticated instead of anonymously rate-limited.

No fetch step is needed: the blobless checkout is a full-ref clone
(git clone --filter=blob:none), and the redirect lint's merge-base
against origin/develop already resolved on this PR's own pipeline.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBBBR8m2V8LjzMvuG7Go2L
Wiz SAST flagged the path.join/path.resolve uses in the docs lint
scripts as potential CWE-22 path traversal. All inputs are
repo-controlled (docs.json, committed baseline files, directory walks),
but add cheap containment hardening anyway: a shared resolveInside()
helper resolves each candidate path and verifies the result stays
inside the docs root before any fs call. Escaping paths are reported
(lint error for the link-scan read, setup error for fixed config
files, skip for walk entries) instead of read. Dependency-free and
behavior-identical for all legitimate inputs; both lints still pass
under bun and tsx, and a synthetic dead-link violation still fails
the redirect lint.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBBBR8m2V8LjzMvuG7Go2L
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

The op-reth-integration-tests failure here is the known flake #20973 (peers_negotiate_eth_69 SIGSEGV on teardown after the test passed) — unrelated to this docs-only diff, and the same job passed on the parent commit. Synced this branch with its base docs/nav-validator-redirect-lint to pick up the lint script hardening; both lints pass locally and the push re-runs CI, which should clear the flake.

claude added 4 commits July 16, 2026 17:04
Revert all .circleci changes to the merge-base state per reviewer
feedback (CI config is a shared hotspot). The nav validator and
redirect lint scripts stay; enforcement moves to a Mintlify
automation (review-gated content-update trigger) plus local runs
documented in DOCS_CONTRIBUTING.md.

Co-Authored-By: Claude <noreply@anthropic.com>
Base automatically changed from docs/nav-validator-redirect-lint to develop July 16, 2026 18:09
# Conflicts:
#	docs/public-docs/scripts/lint/nav-allowlist.json
#	docs/public-docs/scripts/lint/redirect-lint-baseline.json
@mintlify

mintlify Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated (UTC)
Optimism-Docs 🟢 Ready View Preview Jul 16, 2026, 6:16 PM

@mintlify

mintlify Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated (UTC)
Optimism-Docs 🟡 Building Jul 16, 2026, 6:15 PM

sbvegan
sbvegan previously approved these changes Jul 17, 2026
Comment thread docs/public-docs/docs.json Outdated
@sbvegan
sbvegan dismissed their stale review July 17, 2026 01:11

One change needed

@sbvegan sbvegan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're doing this, let's clear out all these archived pages in this section

Removes the Node Operators Archive nav group and deletes its five pages
(op-geth-config, op-geth-json-rpc, node-from-docker-simple-optimism-node,
management/snap-sync, features/snap-sync). Each removed URL gets a redirect
to its nearest live equivalent, and all inbound links now point at the
redirect targets directly.

Co-Authored-By: Claude
@sbvegan
sbvegan added this pull request to the merge queue Jul 17, 2026
Merged via the queue into develop with commit 3f97446 Jul 17, 2026
18 checks passed
@sbvegan
sbvegan deleted the docs/nav-cleanup branch July 17, 2026 04:22
claude Bot pushed a commit that referenced this pull request Jul 17, 2026
Merge-skew resolution alongside the #21845 lint tooling/cleanup now on develop:
- nav-allowlist.json: remove the create-l2-rollup/code-setup orphan entry —
  this branch nav-lists the page, so the allowlist handoff entry is now covered
- redirect-lint-baseline.json: prune two dead-link entries
  (troubleshooting.mdx -> op-reth-setup, index.mdx -> create-l2-rollup)
  that this branch's tutorial repair turned into live links
- docs.json: drop the /app-developers/quickstarts/get-started -> interop
  redirect that shadowed the live quickstart page this branch re-created

Both lints pass: validate-nav.ts, validate-redirects.ts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBBBR8m2V8LjzMvuG7Go2L
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-improver Opened by the docs-improver agent documentation size:S docs-improver: small change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants