Skip to content

docs: publish stable API release lines with app promotion - #295

Merged
crandmck merged 5 commits into
mainfrom
crandmck-cpp-docs-release-consistency
Nov 30, 2026
Merged

crandmck merged 5 commits into
mainfrom
crandmck-cpp-docs-release-consistency

Conversation

@crandmck

@crandmck crandmck commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Retain one highest stable patch per selected major/minor in the explicit validated manifest, with numeric ordering, exact-tag aliases and retirement markers. Migrate the existing lines to v0.27.1 and v0.26.19 without historical-line backfill.
  • Publish canonical versions/X.Y/ pages with an X.Y selector and visible exact-patch labels. Preserve previously published exact-tag HTML URLs with equivalent page/query/fragment redirects; removed symbols/pages are not guaranteed.
  • Reconcile all published stable releases through manifest-only GitHub contents API commits, guarded by current file SHA and bounded reread/recompute retries. Older maintenance releases cannot regress patches/defaults; retired lines stay retired. Promotion has no lossy Actions concurrency group.
  • Use the shared organization App through vars.C2PA_DOCS_APP_ID and secrets.C2PA_DOCS_APP_PRIVATE_KEY, minting a repository-scoped Contents-write installation token isolated from dependency installation, generation and deployment. No ordinary-token bypass fallback.
  • Consolidate ci: require successful documentation validation and builds #292: independent trusted-base configuration validation, retained contributor trust gate, HTML preview artifacts, unlabeled reruns, checked-in/malformed-manifest regression tests, and an always-running Documentation checks aggregator that fails on unsuccessful or skipped prerequisites.

Publishing triggers and recovery

Automatic publishing is release-driven only. promote-docs.yml runs on release publication and manual dispatch; there is no hourly or other schedule. It promotes stable releases, excluding prerelease publications from manifest updates. publish-docs.yml builds/deploys current main after successful promotion-workflow completion, even when reconciliation is a no-op, or on its own manual dispatch. Main pushes do not publish; CI validation on main pushes and pull requests remains unchanged.

  • Manual recovery: run Promote API documentation versions to reconcile every page of stable published releases and trigger a build/deployment on successful completion. A later release also reconciles missed releases; there is no scheduled recovery.
  • Manual rebuild only: run Build and publish docs to build/deploy the current manifest without updating it. Use this after manifest/pruning or tooling changes when not waiting for another release.

Build/deploy pairs are serialized, and artifacts superseded by main changes during a build are skipped. A pending release/manual run can rebuild current main; otherwise manually rebuild after main settles. Pages/OIDC write permissions remain limited to deployment. No live workflow dispatch or deployment was performed for this change.

Validation

  • 24 Python documentation/promotion tests passed, including idempotence, numeric ordering, metadata verification, retirement, pagination, concurrent updates, bounded retries, the checked-in manifest and malformed JSON.
  • 6 JavaScript selector tests passed for hosted and local-file roots/line pages.
  • Real Doxygen build succeeded from exact v0.27.1 and v0.26.19 sources and generated the default root. Existing release-README unresolved-link warnings remain. Previously executed all 544 generated alias redirects and verified exact-patch labels, page/query/fragment preservation and root default.
  • Executed the actual isolated workflow validator with current-main legacy code and the standalone validator, including invalid manifests and hostile candidate modules; no candidate Python executed. All 16 configuration/build result combinations were checked: only success/success passes the aggregator.
  • For the release-only update, reran all 24 Python/6 selector tests and parsed/asserted the exact workflow event sets, completion success gate, manual options, App scope/isolation, Pages lock, stale-artifact guard and unchanged independent CI triggers. git diff --check passes.
  • Optional actionlint discovery was previously permission-denied and was not retried; no actionlint result is claimed.

External prerequisites / rollout

Organization App creation alone does not establish repository access or protected-main bypass. Administrators must verify the App installation includes this repository with Contents read/write, organization variable/secret access policies expose the named credentials here, and main protections permit this App's manifest commits. GitHub does not provide file-scoped Contents grants; the updater enforces a fixed manifest-only write endpoint.

Configure branch protection/rulesets to require Documentation checks. During the first rollout, current main lacks scripts/docs_versions.py: the independent configuration check explicitly uses trusted base legacy tag-list validation, not candidate code. The authorized docs build/tests enforce the full new schema now; after this PR lands, the independent check also enforces that schema.

Pages must use GitHub Actions and the github-pages environment must permit deployment. App authentication, protected-main bot writes, workflow chaining and live Pages deployment have not been exercised. No settings/secrets were changed, and no deployment or PR merge was performed.

Human-reviewed pruning removes the selected line and its aliases and adds a retirement marker while retaining at least one active line.

crandmck and others added 3 commits November 13, 2026 09:27
Validate candidate version configuration independently of the contributor trust gate, reuse the base branch validator, and fail the final docs check on skipped builds. Upload generated HTML and add configuration regressions without modifying versions.json.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Validate and reconcile retained release lines, preserve exact-tag redirects, and isolate manifest promotion from Pages builds.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@crandmck crandmck changed the title docs: publish stable API release lines with App promotion docs: publish stable API release lines with app promotion Nov 25, 2026
Merge PR #292 while preserving release-line publishing and App authentication. Load the trusted base's standalone manifest validator directly, with an explicit legacy-validator fallback for the first rollout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@crandmck

Copy link
Copy Markdown
Contributor Author

Consolidated the CI-enforcement work from #292 into this PR in commit 55c1599. The existing stable release-line manifest, exact-tag redirects, expanded test_*docs*.py selection, and organization App publishing flow are preserved.

Additions:

  • An ungated Documentation version configuration job validates candidate manifest data with trusted base-branch code under isolated Python; candidate Python is never imported.
  • The full documentation build retains its contributor trust gate. Maintainers can authorize it with safe to test; unlabeled events also rerun CI.
  • Successful builds upload the generated HTML as the versioned-api-documentation preview artifact.
  • An always-running Documentation checks aggregator fails unless both configuration validation and the full build succeed, including failed, cancelled, or skipped prerequisites.
  • Regression tests cover the checked-in manifest and malformed JSON; README guidance explains the checks and rollout.

First-rollout adaptation: the isolated loader imports trusted scripts/docs_versions.py directly when it exists. Current main does not yet have that module, so this PR uses the trusted base generator’s legacy tag-list validator with an explicit notice. That fallback does not enforce the new alias/retirement/line-order rules; the authorized full build and its tests enforce the complete new schema now. After this PR lands, the independent configuration check also enforces the full schema. No candidate-code fallback is used.

Verification: 24 Python tests, 6 JavaScript selector tests, the real exact-release Doxygen build, and workflow YAML parsing pass. Executed the actual workflow validator with both current-main legacy code and the new standalone validator, including invalid manifests and hostile candidate modules; no candidate Python executed. Executed all 16 configuration/build result combinations: only success/success passes the aggregator.

Administrator follow-up: configure branch protection/rulesets to require Documentation checks. The App installation/repository access, organization variable/secret visibility, protected-main App bypass, and Pages environment authorization remain administrator setup; provisioning the App alone does not establish those. No settings/secrets were changed, and no deployment or PR merge was performed.

The changes from #292 are now included here; #292 can be closed separately after confirming this consolidation.

Remove hourly promotion and main-push publishing triggers. Keep completion-driven release deployment, manual promotion/rebuild, App isolation and stale-artifact safeguards.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@crandmck
crandmck merged commit 1ea43c8 into main Nov 30, 2026
15 of 16 checks passed
@crandmck
crandmck deleted the crandmck-cpp-docs-release-consistency branch November 30, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants