Skip to content

🐛 (release-rw): Gate docs-build/docs-preview on intent.yaml artifacts.docs != skip#169

Merged
Chisanan232 merged 3 commits into
masterfrom
fix/gate-docusaurus-ops-on-docs-skip
May 26, 2026
Merged

🐛 (release-rw): Gate docs-build/docs-preview on intent.yaml artifacts.docs != skip#169
Chisanan232 merged 3 commits into
masterfrom
fix/gate-docusaurus-ops-on-docs-skip

Conversation

@Chisanan232
Copy link
Copy Markdown
Owner

Target

  • Task summary:

    Honor artifacts.docs: skip from a consumer project's intent.yaml
    when invoking the Docusaurus operations sub-workflow. Today the
    docs-build / docs-preview jobs in
    rw_release_validation_complete.yaml and
    rw_release_staging_complete.yaml invoke
    rw_docusaurus_operations.yaml unconditionally — which fails for
    consumer projects that use MkDocs (or any non-Docusaurus docs system)
    because there is no docs/package.json for the sub-workflow's
    pnpm install to 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:

    • Task ID: AAASM-2063 (downstream Jira tracking)
    • Relative task IDs:
      • AAASM-2053 — downstream python-sdk PR that surfaced this bug
    • Relative PRs:
      • Surfaced by: AI-agent-assembly/python-sdk PR #66 (draft, blocked on this PR)
  • Key point change:

    Three changes across two files:

    # File Change
    1 rw_release_validation_complete.yaml line ~165 Added if: needs.intent-parse.outputs.docs != 'skip' to the docs-build job
    2 rw_release_validation_complete.yaml line ~224 DOCS_OK in validation-summary now accepts 'skipped' alongside 'success'
    3 rw_release_staging_complete.yaml lines ~202 + ~256 Added if: needs.config.outputs.docs != 'skip' to docs-preview; DOCS_OK in staging-summary accepts 'skipped'

    After this PR, all three rw_release_*_complete.yaml orchestrators
    consistently honour artifacts.docs: skip from intent.yaml.

Effecting Scope

  • Action Types:

    • 🔧 Fixing bug
      • 🟢 No breaking change
  • Affected workflows:

    • rw_release_validation_complete.yaml
    • rw_release_staging_complete.yaml
  • Downstream consumer impact:

    • Projects with artifacts.docs: skip (string form) in intent.yaml:
      the docs-build / docs-preview jobs are now SKIPPED on
      validation + staging runs instead of FAILING. Summary jobs treat
      skipped as a pass.
    • Projects with artifacts.docs: auto / force, or the enhanced
      multi-section object form: behaviour unchanged — the
      Docusaurus operations run exactly as before.
    • Projects that never set artifacts.docs at all (or set it to
      anything other than the string "skip"): unchanged.

Discovery context

Found while fixing trigger-placeholder bugs in python-sdk (downstream
PR #66).
That repo uses MkDocs (mkdocs.yml at root, docs/ is Markdown only)
and has its own documentation.yaml workflow that deploys docs on
workflow_run: ["release"]: types: [completed]. The release-validate
docs-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: skip in the consumer's intent.yaml is
already the documented escape hatch (see the comment block in the
example intent.yaml shipped under
docs/INTENT_YAML_SAMPLE.md
or similar). This PR makes that knob actually do what it claims.

Verification

  • 3 small commits, one logical change each (gate-validation,
    summary-accept-skipped-validation, gate-staging + summary).
  • actionlint clean on both modified files (pre-existing info-level
    shellcheck findings unchanged).
  • No new inputs, no new outputs, no schema changes — purely additive
    if: guards + an OR-clause on existing DOCS_OK shell checks.
  • Backwards-compatible: any consumer not using artifacts.docs: skip
    sees no behaviour change.

`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
@Chisanan232
Copy link
Copy Markdown
Owner Author

Claude Code review — 🐛 (release-rw): Gate docs-build/docs-preview on intent.yaml \artifacts.docs != skip``

CI state

mergeable=MERGEABLE, mergeStateStatus=BLOCKED (branch protection — reviewer required), 27 checks total: 7 SUCCESS / 13 SKIPPED / 7 FAILURE.

All 7 failures are pre-existing in this repo's self-test workflows, not regressions introduced by this PR. Cross-verified by pulling the run history of the two affected workflows:

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)

  1. 08faf1d — 🐛 (validation): Gate docs-build on intent.yaml artifacts.docs != skip
  2. 744782c — 🐛 (validation): Accept skipped as a pass for docs-build in validation-summary
  3. 9a2a37a — 🐛 (staging): Gate docs-preview + accept skipped in staging-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 uses needs.config.outputs.docs (no intent-parse step — staging reads docs config directly from rw_parse_project_config.yaml outputs). Both ultimately point at the same intent.yaml artifacts.docs value.
  • 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.yaml already had this gate at line 465 (if: needs.intent.outputs.do_release == 'true' && needs.intent.outputs.docs != 'skip' && …). After this PR, all three rw_release_*_complete.yaml orchestrators consistently honour artifacts.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 Chisanan232 merged commit 4a64804 into master May 26, 2026
20 of 27 checks passed
Chisanan232 added a commit to ai-agent-assembly/python-sdk that referenced this pull request May 26, 2026
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)
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