Skip to content

ci: make docs previews production-ready - #2992

Open
UnArbosFive wants to merge 1 commit into
release-v438from
fix/docs-preview-production-readiness
Open

ci: make docs previews production-ready#2992
UnArbosFive wants to merge 1 commit into
release-v438from
fix/docs-preview-production-readiness

Conversation

@UnArbosFive

@UnArbosFive UnArbosFive commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • split untrusted building from trusted deployment so PR-controlled code never runs on a runner holding the Vercel token
  • audit the dedicated preview project before deployment: automatic system variables disabled, OIDC disabled, no protection bypasses or integrations, no Preview environment variables, and the wildcard domain verified
  • disable Git-triggered Vercel deployments for non-main branches on the legacy production project while explicitly preserving main production deployments
  • pin trusted controls to the immutable workflow commit and accommodate the audited Vercel root directory during prebuilt deployment
  • reconcile preview removal on docs reverts and PR closure without path-filter gaps, while treating aliases owned by another project as a safe no-op
  • use Vercel’s documented deployment-list endpoint and add bounded job timeouts plus regression coverage for stale runs, security settings, cleanup, and root-directory handling

Target branch

This PR is rebased onto #2968 and targets its release-v438 branch. That branch contains the docs-preview implementation this production-readiness patch builds on.

The trusted workflow_run half and the Git auto-deployment cutoff are intentionally loaded from the default branch. These controls become active after this version propagates to main.

CI scope

This PR changes only the docs-preview control scripts, workflows, tests, and the website Vercel deployment policy. Failures in SDK formatting, generated documentation drift, TypeScript shard manifests, runtime upgrades, or unrelated end-to-end suites are inherited from #2968 and are outside this PR’s diff.

Validation

  • 62 docs-preview unit and policy tests
  • Ruff, Actionlint, JSON/YAML parsing, and diff checks
  • exact locked Vercel CLI 57.0.0 install and npm audit --audit-level=high --omit=dev: 0 vulnerabilities
  • token-free local Vercel production build: TypeScript passed and 2,486 pages generated
  • 785 MB sealed artifact round trip: validated extraction with zero remaining symlinks
  • exact PR head passed the GitHub security-policy check and the complete secret-free build, seal, and artifact-upload workflow
  • protected follow-up run authenticated and extracted the artifact, audited the configured project, rechecked the PR head, and reached deployment; current main then reproduced the missing root-directory failure fixed here
  • local mock API confirmed the corrected prebuilt CLI reaches POST /v13/deployments with the audited root-directory stub
  • reproduced the linked cleanup failure for a foreign alias and added a regression test proving it is left untouched without failing the workflow

Deployment prerequisite

The dedicated preview project must have automatic system environment variables disabled, OIDC token generation disabled, no protection bypasses, and no attached integrations. The workflow verifies these settings and fails before deployment if any condition is not met.

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
subtensor Ready Ready Preview, Comment Jul 29, 2026 4:23pm

Request Review

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH account-age scrutiny; repository admin with substantive merged history, no Gittensor association; fix/docs-preview-production-readiness → release-v438.

Static analysis found that the PR-specific changes preserve separation between untrusted builds and credential-bearing deployment, pin trusted controls to the workflow commit, and fail closed on stale heads and unsafe Vercel configuration. The AI-review trust-boundary files are unchanged.

Findings

No findings.

Conclusion

No malicious behavior or security vulnerability was found in the PR-specific delta.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

UNKNOWN Gittensor association; very new account but repository admin with substantial merged contribution history, so the CI-boundary changes received heightened scrutiny.

The implementation matches the substantive PR description. It pins trusted controls to the immutable workflow commit, validates the dedicated Vercel project, reconciles obsolete previews without path-filter gaps, preserves main-only production deployments, and adds focused regression coverage.

No runtime/spec-version implications or duplicate open PRs were identified. The reported targeted validation is proportionate to these workflow and control-script changes.

Findings

No findings.

Conclusion

The production-readiness changes are coherent and fail closed at the relevant trust boundaries. No blocking domain issues were found.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive
UnArbosFive force-pushed the fix/docs-preview-production-readiness branch 2 times, most recently from 8fee0ea to 8b41602 Compare July 27, 2026 13:52
@UnArbosFive
UnArbosFive changed the base branch from release-v440 to release-v441 July 27, 2026 13:52
@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive
UnArbosFive force-pushed the fix/docs-preview-production-readiness branch 2 times, most recently from 7eca806 to 6037464 Compare July 27, 2026 14:01
@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive
UnArbosFive force-pushed the fix/docs-preview-production-readiness branch from a6a5a39 to e38d4dd Compare July 29, 2026 16:02
@UnArbosFive
UnArbosFive changed the base branch from release-v441 to release-v438 July 29, 2026 16:02
@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant