🐛 (release-rw): Gate docs-build/docs-preview on intent.yaml artifacts.docs != skip#169
Conversation
`rw_release_validation_complete.yaml`'s `docs-build` job invoked
`rw_docusaurus_operations.yaml` unconditionally, ignoring the consumer
project's `intent.yaml` `artifacts.docs` setting. Projects using
MkDocs or any other non-Docusaurus docs system have no
`docs/package.json`, so the Docusaurus reusable workflow's
`pnpm install` fails with:
[ERR_PNPM_NO_PKG_MANIFEST] No package.json found in <repo>/docs
The sibling release workflow (`rw_release_complete.yaml` line 465)
already had the gate `if: needs.intent.outputs.docs != 'skip'`; the
validation workflow just missed copying it. Add the same gate
verbatim, scoped to `needs.intent-parse.outputs.docs` since the
validation flow names that job `intent-parse` instead of `intent`.
Downstream consumer impact:
- Projects that declare `artifacts.docs: skip` (string form) in
`intent.yaml`: `docs-build` is now SKIPPED on validation runs
instead of FAILING. The `validation-summary` job (next commit)
treats `skipped` as a pass.
- Projects that declare the enhanced multi-section form (or leave
it at `auto`): behaviour is unchanged — `docs-build` runs as before.
Discovered by AI-agent-assembly/python-sdk PR #66 attempting to fix
trigger placeholders in its own workflows; tracked under JIRA
AAASM-2063.
…on-summary After the previous commit gates `docs-build` on `docs != 'skip'`, the `validation-summary` job's `DOCS_OK` check ended up false for projects that legitimately opted out (because `needs.docs-build.result` is then `skipped`, not `success`). That regressed the summary's exit code for the same projects the gate was meant to help. Accept `skipped` as well, so `validation-summary` treats both `success` and `skipped` as "docs validation OK". Matches the existing treatment of `skipped` for docker jobs (line 197: "DockerHub Build: ⏭️ Skipped (no Dockerfile)" is treated as success at the summary level). Refs: AAASM-2063
Symmetric fix to the validation-complete change in the previous two commits — `rw_release_staging_complete.yaml` had the same bug: 1. `docs-preview` job invoked `rw_docusaurus_operations.yaml` unconditionally — fails on MkDocs projects with no `docs/package.json`. 2. `staging-summary`'s `DOCS_OK` only accepted `success`, not `skipped`. Added `if: needs.config.outputs.docs != 'skip'` to `docs-preview` (uses `config.outputs.docs` since this workflow doesn't have an `intent-parse` job — the staging flow reads docs config directly from `rw_parse_project_config.yaml` outputs). `DOCS_OK` updated to accept `'skipped'` alongside `'success'` so projects that opted out don't trip the staging-summary exit-1 path. This bundle (validation-complete commit 1+2 + staging-complete commit 3) ensures all three rw_release_*_complete workflows now consistently honour `artifacts.docs: skip` from intent.yaml. The `rw_release_complete` workflow (production release path) already had the gate at line 465. Refs: AAASM-2063
Claude Code review —
|
| Workflow | Run history (last 5 runs across all branches) |
|---|---|
test-release-validate.yml |
fix/gate-docusaurus-ops-on-docs-skip 2026-05-26 ❌ • dependabot/sonarqube-scan-8.1.0 2026-05-19 ❌ • dependabot/sonarqube-scan-8.0.0 2026-04-30 ❌ • dependabot/sonarqube-scan-7.2.0 2026-04-29 ❌ • develop 2026-04-24 ❌ |
test-release-staging.yml |
Same pattern — every PR since April 2026 has been red |
The failing jobs (docs-build / Docs test, python-build-check / Python Package test, Compute Staging Version, plus the cascading Validation Summary / Staging Release Summary) test the reusable workflows against this repo's own setup (which uses Docusaurus + a sample intent.yaml). They've been broken since long before this PR was opened — independent of the if: gate I'm adding.
For example, the docs-build / Docs test failure on my PR is at pnpm approve-builds exit code 1 — a Docusaurus dev-dependency build-script approval prompt, not anything my if: change touches. With this repo's own intent.yaml set to docs: auto, my new gate (if: needs.intent-parse.outputs.docs != 'skip') evaluates to true and the job runs exactly as before — the existing breakage then surfaces.
Per the user's "ignore acceptance/SonarQube failures" rule, these pre-existing failures are out of scope for this PR. They should be tracked as a separate repo-health issue.
→ No CI failures attributable to this PR.
Scope vs. PR description
| Claim | Where verified | Status |
|---|---|---|
rw_release_validation_complete.yaml docs-build gated on needs.intent-parse.outputs.docs != 'skip' |
Commit 08faf1d line 166 |
✅ |
rw_release_validation_complete.yaml validation-summary DOCS_OK accepts 'skipped' |
Commit 744782c line 224 |
✅ |
rw_release_staging_complete.yaml docs-preview gated on needs.config.outputs.docs != 'skip' |
Commit 9a2a37a line 202 |
✅ |
rw_release_staging_complete.yaml staging-summary DOCS_OK accepts 'skipped' |
Commit 9a2a37a line 256 |
✅ |
Matches the existing gate pattern in rw_release_complete.yaml line 465 (docs != 'skip') |
Comparison verified | ✅ |
No breaking change — consumers without artifacts.docs: skip see no behaviour difference |
New if: gates are pure additions; existing inputs/outputs unchanged |
✅ |
Commit granularity (3 atomic commits)
08faf1d— 🐛 (validation): Gatedocs-buildon intent.yamlartifacts.docs != skip744782c— 🐛 (validation): Acceptskippedas a pass fordocs-buildinvalidation-summary9a2a37a— 🐛 (staging): Gatedocs-preview+ acceptskippedinstaging-summary
Each commit changes exactly one logical concern and is independently bisectable.
Implementation details worth recording
- The validation workflow uses
needs.intent-parse.outputs.docs(intent-parse job); the staging workflow usesneeds.config.outputs.docs(no intent-parse step — staging reads docs config directly fromrw_parse_project_config.yamloutputs). Both ultimately point at the sameintent.yamlartifacts.docsvalue. - The summary
DOCS_OK="${{ ... == 'success' || ... == 'skipped' }}"pattern mirrors how docker jobs are already treated when a Dockerfile is absent (line 197 in validation:'⏭️ Skipped (no Dockerfile)'). The skipped-as-OK precedent existed; we're applying it to docs as well. - The production-release workflow
rw_release_complete.yamlalready had this gate at line 465 (if: needs.intent.outputs.do_release == 'true' && needs.intent.outputs.docs != 'skip' && …). After this PR, all threerw_release_*_complete.yamlorchestrators consistently honourartifacts.docs: skip.
Verdict
Ready for human approval and merge. All scope-AC items satisfied; 7 CI reds are pre-existing in this repo's self-test workflows and predate this PR by ~1 month. Once this merges, the downstream AI-agent-assembly/python-sdk PR #66 (currently draft) can be flipped ready-for-review with green CI.
— Claude Code (Opus 4.7, 1M context)
Chisanan232/GitHub-Action_Reusable_Workflows-Python PR #169 merged
into upstream master at commit 4a648047 — line 166 of
`rw_release_validation_complete.yaml` now reads:
if: needs.intent-parse.outputs.docs != 'skip'
This PR's `intent.yaml` already declares `artifacts.docs: skip`
(commit 730d0b3), so with the upstream gate in place the `Docs test`
sub-job should now resolve to SKIPPED and `validation-summary`
should treat it as a pass.
This commit is intentionally empty — its purpose is to re-fire CI
against the now-fixed upstream so the green run is visible on this
PR before flipping back to ready-for-review.
Refs: AAASM-2053 (closes the cascade surfaced under AAASM-2063,
upstream PR Chisanan232/GitHub-Action_Reusable_Workflows-Python#169)
Target
Task summary:
Honor
artifacts.docs: skipfrom a consumer project'sintent.yamlwhen invoking the Docusaurus operations sub-workflow. Today the
docs-build/docs-previewjobs inrw_release_validation_complete.yamlandrw_release_staging_complete.yamlinvokerw_docusaurus_operations.yamlunconditionally — which fails forconsumer projects that use MkDocs (or any non-Docusaurus docs system)
because there is no
docs/package.jsonfor the sub-workflow'spnpm installto find.The sibling production workflow
rw_release_complete.yaml(line 465) already has the gate
if: needs.intent.outputs.do_release == 'true' && needs.intent.outputs.docs != 'skip' && ….The validation + staging workflows just missed copying it.
Task tickets:
AI-agent-assembly/python-sdkPR #66 (draft, blocked on this PR)Key point change:
Three changes across two files:
rw_release_validation_complete.yamlline ~165if: needs.intent-parse.outputs.docs != 'skip'to thedocs-buildjobrw_release_validation_complete.yamlline ~224DOCS_OKinvalidation-summarynow accepts'skipped'alongside'success'rw_release_staging_complete.yamllines ~202 + ~256if: needs.config.outputs.docs != 'skip'todocs-preview;DOCS_OKinstaging-summaryaccepts'skipped'After this PR, all three
rw_release_*_complete.yamlorchestratorsconsistently honour
artifacts.docs: skipfromintent.yaml.Effecting Scope
Action Types:
Affected workflows:
rw_release_validation_complete.yamlrw_release_staging_complete.yamlDownstream consumer impact:
artifacts.docs: skip(string form) inintent.yaml:the
docs-build/docs-previewjobs are now SKIPPED onvalidation + staging runs instead of FAILING. Summary jobs treat
skippedas a pass.artifacts.docs: auto/force, or the enhancedmulti-section object form: behaviour unchanged — the
Docusaurus operations run exactly as before.
artifacts.docsat all (or set it toanything other than the string
"skip"): unchanged.Discovery context
Found while fixing trigger-placeholder bugs in
python-sdk(downstreamPR #66).
That repo uses MkDocs (
mkdocs.ymlat root,docs/is Markdown only)and has its own
documentation.yamlworkflow that deploys docs onworkflow_run: ["release"]: types: [completed]. The release-validatedocs-build was both redundant AND incompatible — but couldn't be
disabled from the consumer side because the gate didn't exist here.
Setting
artifacts.docs: skipin the consumer'sintent.yamlisalready the documented escape hatch (see the comment block in the
example
intent.yamlshipped underdocs/INTENT_YAML_SAMPLE.mdor similar). This PR makes that knob actually do what it claims.
Verification
summary-accept-skipped-validation, gate-staging + summary).
actionlintclean on both modified files (pre-existing info-levelshellcheck findings unchanged).
if:guards + an OR-clause on existingDOCS_OKshell checks.artifacts.docs: skipsees no behaviour change.