Skip to content

fix(reusable-ci): repair runaway YAML indentation breaking all consumers#8

Merged
chitcommit merged 1 commit into
mainfrom
fix/reusable-ci-yaml-indentation
Jun 10, 2026
Merged

fix(reusable-ci): repair runaway YAML indentation breaking all consumers#8
chitcommit merged 1 commit into
mainfrom
fix/reusable-ci-yaml-indentation

Conversation

@chitcommit

Copy link
Copy Markdown
Member

Summary

  • The reusable CI pipeline at .github/workflows/reusable-ci-pipeline.yml had runaway indentation introduced in e5f2e19, producing invalid YAML.
  • Every consumer repo (e.g. chittyos/chittyentity PRs #430, #441-#444) shows ci.yml failing in 0 seconds with "workflow file issue" — GitHub refuses to schedule any job.
  • This PR rewrites the file with correct 2-space indentation. No semantic changes to inputs/secrets/jobs.

Root cause

In e5f2e19 ("Align reusable CI pipeline with ChittyOS SOPs - add security scanning"), nested keys under inputs: were over-indented progressively, causing secrets: and jobs: to land inside inputs: instead of at the top level. The YAML parser fails, so GitHub Actions rejects the workflow before scheduling any runner — hence the 0-second "workflow file issue" failure on every PR in every consumer repo.

Latent bug also fixed

Original used if: secrets.SNYK_TOKEN != '' and if: secrets.ANTHROPIC_API_KEY != '' at the step level. The secrets context is not available in step-level if: expressions. Switched to the canonical pattern: expose secret to env: and check env.X != ''. (Would have silently never-run those steps even after YAML parse succeeded.)

Impacted repos

Any repo whose ci.yml calls uses: chittyfoundation/.github/.github/workflows/reusable-ci-pipeline.yml@main. Confirmed: chittyos/chittyentity. Likely others across the foundation/portfolio.

Test plan

  • python3 -c "import yaml; yaml.safe_load(...)" parses cleanly with all 7 inputs, 2 secrets, 5 jobs present.
  • After merge, re-run a failing check on chittyos/chittyentity PR (e.g. #444) and confirm jobs actually schedule and produce real output (pass or fail with real logs, not 0s "workflow file issue").

The previous commit (e5f2e19) introduced broken indentation where each
successive line accumulated additional leading whitespace, producing
invalid YAML. GitHub Actions could not parse the workflow, so every
consumer repo's `ci.yml` (which references this file via
`uses: chittyfoundation/.github/.github/workflows/reusable-ci-pipeline.yml@main`)
failed in 0 seconds with "workflow file issue" and never scheduled a job.

Symptom: chittyos/chittyentity PRs #430, #441-#444 (and any other repo
consuming this reusable workflow) show ci.yml failing instantly with
zero jobs run, zero log output.

Root cause: malformed YAML — `inputs:` and every nested key were
progressively over-indented; `secrets:` and `jobs:` ended up nested
inside `inputs:` instead of at top level.

Fix: rewrite the file with correct, consistent 2-space indentation.
No semantic changes to inputs, secrets, or job definitions, with two
small correctness fixes that were latent in the original:

- Step-level `if: secrets.X != ''` is not a valid expression context
  (the `secrets` context is not available in step `if:`). Replaced
  with the canonical pattern of exposing the secret to `env` and
  checking `env.X != ''`.

Impacted repos (any with a caller pointing at
`chittyfoundation/.github/.github/workflows/reusable-ci-pipeline.yml@main`):
- chittyos/chittyentity (confirmed)
- any other consumer using the same caller pattern

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@chitcommit, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 31 minutes and 31 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f62435a8-420e-4575-93fe-64c022e39328

📥 Commits

Reviewing files that changed from the base of the PR and between 8cd6fe0 and 825c7bf.

📒 Files selected for processing (1)
  • .github/workflows/reusable-ci-pipeline.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/reusable-ci-yaml-indentation

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 and usage tips.

@chitcommit chitcommit merged commit c730cb6 into main Jun 10, 2026
1 of 2 checks passed
@chitcommit chitcommit deleted the fix/reusable-ci-yaml-indentation branch June 10, 2026 02:28
chitcommit added a commit that referenced this pull request Jun 10, 2026
…#9)

Step-level env: is materialized too late to be visible in that same step's
if: expression. After #8 unblocked YAML parsing, consumer runs began
hitting startup_failure because the security and ai-review jobs declared
SNYK_TOKEN / ANTHROPIC_API_KEY only at step level while gating the step
with `if: env.X != ''`.

Hoist those env: blocks to job scope (canonical pattern) so the gate
resolves correctly. No behavior change when the secret is present; when
absent, the gated step is skipped instead of failing the run.

Also adds the missing actions/setup-node step to the security job so
`npm audit` has a node toolchain.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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