Skip to content

fix(release): generalize release-docs aliases and story pages to any minor line - #7947

Merged
bokelley merged 4 commits into
mainfrom
fix/release-docs-minor-line-story
Oct 6, 2026
Merged

bokelley merged 4 commits into
mainfrom
fix/release-docs-minor-line-story

Conversation

@bokelley

@bokelley bokelley commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

scripts/update-release-docs-nav.mjs hard-coded the 3.2 release story, so a 3.3.0-beta.0 docs snapshot would leave the 3.3 story unrouted and fail the docs-nav check. This generalizes it to any minor line (cut-beta.md now asks for this as a beta.0 precondition).

  • Aliases derive from the release line. /X.Y, /X.Y/try|migrate|sdk, /docs/reference/whats-new-in-X-Y, /docs/reference/X-Y-beta, and /docs/reference/migration/X-(Y-1)-to-X-Y are retargeted to each new snapshot, and only when those redirects already exist in docs.json. The 3.2-only proposal-negotiation alias stays a per-line extra.
  • First preview of a new line gets its story pages. 3.3-beta is cloned from the pinned 3.2 default nav, which cannot carry 3.3 pages (the default nav is parity-checked against origin/3.2.x). The script now inserts whats-new-in-X-Y, X-Y-beta, and the migration guide beside their predecessors when the snapshot has them, also on a direct stable GA with no preview. Without this, docs-nav-validation rejects every new docs/ page in the newest snapshot's nav.
  • Loud warnings (::warning:: in the workflow log) when story pages are missing from the snapshot or have no nav home, and when the banner does not link the new line's story (the docs-nav test requires that once a preview entry exists).
  • CLI input is validated (X.Y.Z[-tag.N], X.Y[-tag]) before it reaches file probes or string replacement.

No change for 3.2 / 3.1 / 3.0 snapshots

I ran the old and new updateDocsConfig against the real docs.json for 3.2.3 3.2, 3.2.2 3.2, 3.1.25 3.1, 3.0.27 3.0, 3.2.0-rc.8 3.2-rc, 3.2.0-beta.12 3.2-beta, 2.5.4 "2.5 (archived)": the output is identical in every case, so existing 3.2 redirects keep pointing where they do today.

One deliberate difference, for a future state that does not exist yet: once a newer line is the docs default, a late patch of an older line retargets that line's short aliases (/3.2) but no longer its clean /docs/reference/... routes. Those belong to the default line's snapshot, and today's code would repoint them away from it.

Left alone (not tripped by a 3.3 beta.0 cut)

  • HISTORICAL_PRERELEASE_RANGES in server/src/addie/mcp/schema-tools.ts and the "stable 3.2" tool descriptions are GA-time edits already listed in cut-minor-ga.md. DOCS_SCHEMA_RELEASES is regenerated by this script (the simulated beta.0 adds '3.3-beta': '3.3.0-beta.0').
  • static/compliance/published-versions.json: npm run version registers 3.3.0-beta.0 through register-published-compliance-version.cjs; the adcp-3.3 npm tag is a GA/SDK-publish step.
  • scripts/promote-release-candidate.mjs and the withdrawn-3.2.0 lists in build-schemas.cjs / schemas-middleware.ts are 3.2-only and unused by a beta.0 cut.
  • release.yml / release-docs.yml branch and version handling already cover 3.3.0-beta.N (3.3-beta); no workflow file is changed.
  • Pre-existing: the workflow interpolates the release version into shell steps unvalidated (security review Info). Only users who can publish a release or dispatch can reach it, and the script now rejects malformed values, but the workflow step itself is unchanged here.

Testing

  • npm run test:release-docs-nav (37 tests; 12 new: 3.3 beta.0, beta.1 retarget, seeded placeholders, 3.2 patch unchanged, older-line guard, direct GA, new-major, missing pages, banner variants, CLI validation, CLI against a copy of the real docs.json).
  • Simulated a 3.3.0-beta.0 snapshot on copies of the real docs.json and schema-tools.ts with a fake dist/docs/3.3.0-beta.0: docs-nav-validation passes except the banner check, which now has a warning. docs-json-field-audit, check-owned-links, and rewrite-dist-links-idempotency tests pass.
  • check-changeset-protocol-scope passes with no changeset (scripts/tests/workflow text only).

Review

code-reviewer and security-reviewer ran; their findings (direct-GA nav, new-major fallback, banner false positives, CLI validation, test seeding) are fixed in the second commit. No Must Fix security findings. The CodeQL regular-expression-injection alert on the banner check is fixed in the third commit by using plain string search instead of building a regex from the CLI-derived line.

Canonical tests (2/4) fails on main for a pre-existing reason (#7416, fix in #7951) and is unrelated to this PR.

🤖 Generated with Claude Code


Open workspace in Conductor

bokelley and others added 2 commits October 6, 2026 09:09
…nor line

Derive the /X.Y, /X.Y/try|migrate|sdk, whats-new-in-X-Y, X-Y-beta and
previous-to-X.Y migration aliases from the release line instead of
hard-coding 3.2, and rewrite them only when they exist in docs.json. Clean
/docs routes of a line older than the docs default stay owned by the default
snapshot. The first preview of a new line now gets its story pages added to
the cloned navigation, and the script warns when the pages or the banner are
missing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…elease-docs tooling

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@aao-secretariat aao-secretariat Bot 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.

Ladon verdict: Escalate to human review

Escalate — gated path requires human/CODEOWNERS approval.

This PR modifies .github/workflows/release-docs.yml, which matches the gated glob .github/workflows/** (gated_paths: true). Because review_decision is REVIEW_REQUIRED (not APPROVED), the hard approval gate (decision rule row 2) is not satisfied and this PR cannot be auto-approved.

No blocking findings. The reviewer traced a clean release-documentation tooling change: generalizing update-release-docs-nav.mjs's hard-coded 3.2 release-story aliases to any minor line, with fail-closed CLI version validation and loud ::warning:: output for missing/unhomed story pages. No protocol surface (static/schemas/source/**, dist/**, tasks) is touched, so no changeset is required. 12 new tests cover the edge cases. No Critical/High/Medium findings.

Escalation reason: Modifies .github/workflows/release-docs.yml — a gated path. Human / CODEOWNERS approval is required before merge. Once review_decision becomes APPROVED, this clean diff falls through to approve.

Why human review

  • Modifies .github/workflows/release-docs.yml, a gated path (.github/workflows/**); review_decision is REVIEW_REQUIRED, so human/CODEOWNERS approval is required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/release-docs.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 6, 2026
… input

Resolves the CodeQL regular-expression-injection alert and drops the
workflow-file text change so the PR no longer touches a gated path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@aao-secretariat aao-secretariat Bot 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.

Ladon verdict: Approve

Approve — clean pass; prior gated-path trigger no longer applies.

The prior run escalated because the diff touched .github/workflows/release-docs.yml, a gated path, with review_decision of REVIEW_REQUIRED. This run's diff touches only two files — scripts/update-release-docs-nav.mjs and tests/update-release-docs-nav.test.cjs — neither of which is a gated path. gated_paths is now false, so row 2 does not fire.

Decision table walk:

  • Row 1 (critical/high): no findings.
  • Row 2 (gated_paths unsatisfied): gated_paths: false — does not apply.
  • Row 3 (deleted high-risk): high_risk: false — no.
  • Rows 4–5 (medium + category/high-risk): no findings.
  • Row 6 (sticky escalation): prior was escalate, but no fresh critical/high/medium finding exists this run — sticky escalation does not persist without new evidence.
  • Row 7 (no-auto-approve team): no match.
  • Row 8 (≥3 medium): zero medium findings.
  • Row 9: approve.

What was checked: The PR generalizes release docs-nav tooling from hard-coded 3.2 handling to any minor line, adding 365 lines of tests. Non-protocol scope — no static/schemas/source/**, no wire shape, and the script is not in PROTOCOL_SCOPED_PATHS, so no changeset is owed. Alias retargeting, story-page insertion, banner-link prefix-collision handling, and CLI validation all traced clean. Build-time synchronous script — no worker/queue/timeout surface. No blocking or medium findings.

@aao-secretariat aao-secretariat Bot 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.

Ladon verdict: Approve

Approve — clean pass, no blocking or Medium findings.

Scope: generalizes scripts/update-release-docs-nav.mjs from hardcoded 3.2 release-story alias/page handling to any minor line, plus 12 new test scenarios in tests/update-release-docs-nav.test.cjs. No protocol surface touched — no static/schemas/source/**, docs/reference/**, dist/** artifacts, or changeset-eligible files — so schema↔docs coherence, changeset scope, oneOf discriminator, and artifact-immutability rules do not apply.

Verified control flow: story-page insertion is anchored+fallback and warn-only with no partial writes; bannerLinksLineStory boundary correctly rejects the 3.30-vs-3.3 prefix collision; the compareVersionLines >= 0 guard prevents a late patch of an older line from retargeting default-owned clean routes; CLI regex validation fail-closes release/label args before they reach file paths.

Gate check: gated_paths false; high_risk false; no no-auto-approve team match; prior decision was approve. No findings. Falls through decision table to row 9.

@bokelley
bokelley merged commit 660fab8 into main Oct 6, 2026
30 checks passed
@bokelley
bokelley deleted the fix/release-docs-minor-line-story branch October 6, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants