Skip to content

ci(docs): skip releases without docs source - #17656

Merged
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:codex/docs-source-guard
Aug 31, 2026
Merged

ci(docs): skip releases without docs source#17656
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:codex/docs-source-guard

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

Guard the release-backed docs deployment against stable tags cut before docs/site existed.

The release gate now checks the resolved immutable tag commit for docs/site/package.json (with retries) and skips deployment before requesting the protected docs-production environment when the source is absent. This keeps old releases such as v1.4.193 from entering a production job that cannot build the docs app.

Testing

  • actionlint .github/workflows/docs.yml
  • git diff --check

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds a release gate that checks the resolved tag commit for the docs package before requesting the protected production environment.

  • Retries the GitHub contents API request three times.
  • Skips docs deployment when the source probe does not succeed.
  • Currently conflates a confirmed missing file with transient or operational API failures.

Confidence Score: 4/5

This PR should not merge until the source probe distinguishes a confirmed missing package from GitHub API failures that should fail the gate.

A repeated API error on a valid release is converted into a successful deploy=false result, silently preventing the production docs deployment.

Files Needing Attention: .github/workflows/docs.yml

Important Files Changed

Filename Overview
.github/workflows/docs.yml Adds the historical-release docs-source gate, but suppresses legitimate deployments when the contents API fails for reasons other than a missing file.

Sequence Diagram

sequenceDiagram
  participant R as Release gate
  participant G as GitHub Contents API
  participant P as Production docs job
  R->>G: Check package.json at resolved commit
  alt Request succeeds
    G-->>R: File exists
    R->>P: "deploy=true when other checks pass"
  else Any error after retries
    G-->>R: 404, 403, 5xx, or network failure
    R->>R: "deploy=false and exit successfully"
    R--xP: Production job skipped
  end
Loading

Reviews (1): Last reviewed commit: "ci(docs): skip releases without docs sou..." | Re-trigger Greptile

# requesting the protected production environment.
docs_source_available=false
for attempt in 1 2 3; do
if gh api "repos/$GITHUB_REPOSITORY/contents/docs/site/package.json?ref=$commit_sha" >/dev/null 2>&1; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 API failures suppress deployment

When the GitHub contents API returns repeated rate-limit, authorization, service, or network errors for a valid release, this check treats them as proof that the docs source is absent and exits successfully with deploy=false, causing the production docs deployment to be silently skipped.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation release gate checks whether the resolved release commit contains docs/site/package.json. It retries the GitHub API check up to three times. If the source is absent, the workflow sets deploy=false and stops before production deployment authorization.

Merge Risk: 🔵 Low · up to 0edda

The release workflow now skips deployment when the docs source is absent, but other API failures may also be treated as missing source and cause a valid release deployment to be skipped. The change is mergeable with explicit owner follow-up to distinguish missing files from other errors.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the workflow change and includes testing commands, but it omits most required template sections, including ELI5, What Changed, Why, Linked Issue, Visual Proof, AI Disclosure, … Update the description to use the required headings. Add an issue link after "Fixes #", provide the required visual proof or state "N/A" with a reason, complete the testing checkboxes, address AI disclosure and review details, complete the …
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: the documentation CI workflow skips releases that do not contain the docs source.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the workflow change and includes testing commands, but it omits most required template sections, including ELI5, What Changed, Why, Linked Issue, Visual Proof, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist.

Resolution

Update the description to use the required headings. Add an issue link after "Fixes #", provide the required visual proof or state "N/A" with a reason, complete the testing checkboxes, address AI disclosure and review details, complete the Agent skill upstream boundary section, add Notes for security and compatibility impact, and complete the Checklist.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bdd993ea-ec7f-4f6d-a863-327dcdc34308

📥 Commits

Reviewing files that changed from the base of the PR and between 649c188 and 0edda5e.

📒 Files selected for processing (1)
  • .github/workflows/docs.yml

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.

# requesting the protected production environment.
docs_source_available=false
for attempt in 1 2 3; do
if gh api "repos/$GITHUB_REPOSITORY/contents/docs/site/package.json?ref=$commit_sha" >/dev/null 2>&1; then

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

printf '%s\n' '--- repository conventions ---'
for f in /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/*/*.md; do
  [ -f "$f" ] && { printf '\n### %s\n' "$f"; head -80 "$f"; }
done
printf '%s\n' '--- workflow files ---'
git ls-files .github/workflows/docs.yml
printf '%s\n' '--- relevant workflow section ---'
sed -n '145,215p' .github/workflows/docs.yml

Repository: stablyai/orca

Length of output: 49672


🏁 Script executed:

printf '%s\n' '--- gh api contract ---'
if command -v gh >/dev/null 2>&1; then
  gh help api 2>&1 | sed -n '1,180p'
else
  printf '%s\n' 'gh executable unavailable'
fi
printf '%s\n' '--- workflow shell context ---'
sed -n '1,35p' .github/workflows/docs.yml

Repository: stablyai/orca

Length of output: 9073


🏁 Script executed:

if command -v gh >/dev/null 2>&1; then
  gh help exit-codes 2>&1 | sed -n '1,160p'
else
  printf '%s\n' 'gh executable unavailable'
fi

Repository: stablyai/orca

Length of output: 662


Treat only a missing file as an absent docs source.

The gh api command returns a non-zero exit code for failures. After three failed attempts, this workflow treats every failure as a missing file and can silently skip valid deployments. Handle 404 as the skip condition and fail the gate for other errors.

@pullfrog pullfrog 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.

ℹ️ No critical issues — one minor robustness suggestion inline.

Reviewed changes

  • Docs source guardrelease_gate now checks the resolved immutable tag commit for docs/site/package.json (3 attempts) and skips the protected production deployment when absent, so stable releases cut before the docs app existed no longer fail in the production job.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Comment on lines +181 to +187
for attempt in 1 2 3; do
if gh api "repos/$GITHUB_REPOSITORY/contents/docs/site/package.json?ref=$commit_sha" >/dev/null 2>&1; then
docs_source_available=true
break
fi
[[ "$attempt" -eq 3 ]] || sleep "$((attempt * 5))"
done

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.

The >/dev/null 2>&1 check conflates every gh api failure with "source absent": a 404 (correctly skip) is indistinguishable from a rate limit, network blip, or 5xx, which would silently skip a legitimate stable release's deployment after the retries exhaust. The sibling loops in this same step treat a final failure as ::error:: + exit 1 rather than a quiet skip. Consider only skipping on a definitive 404 (e.g. capture the API output and check for 404: Not Found / HTTP 404) so transient outages surface loudly instead of being misreported as "does not contain docs/site".

@nwparker
nwparker merged commit e22c4ee into stablyai:main Aug 31, 2026
32 of 33 checks passed
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