Skip to content

fix(ci): run main-branch jobs that depend on the PR-only filter job - #58

Merged
olamide226 merged 1 commit into
mainfrom
fix/ci-main-push-skipped
Sep 11, 2026
Merged

fix(ci): run main-branch jobs that depend on the PR-only filter job#58
olamide226 merged 1 commit into
mainfrom
fix/ci-main-push-skipped

Conversation

@olamide226

Copy link
Copy Markdown
Collaborator

Every push to main has been skipped since eb542e7 (2026-02-25). No docs deploy, no Go tests, and no SDK tests have run on the default branch for roughly six months. PR checks were unaffected, which is why it went unnoticed.

Root cause

Two conditions interact in all three workflows:

  changes:
    if: github.event_name == 'pull_request'   # skipped on push

  build-and-deploy:            # (or `ci:`)
    needs: changes
    if: |
      github.event_name == 'push' || ...      # ← true on a merge

On a push, changes is skipped by its own if. The dependent job's if evaluates true, yet the job still skipped — an if with no status-check function carries an implicit success() requirement on needs, and a skipped dependency does not satisfy it.

Evidence from run 34610222508 (the merge of #57, event=push):

Detect changes:        completed/skipped
Build and Deploy Docs: completed/skipped
Docs Status:           completed/skipped

Last five push runs per workflow — all skipped:

Workflow Push runs
docs.yml skipped ×5 (back to 2026-03-05)
gateway.yml skipped ×5
sdk.yml skipped ×5

workflow_dispatch could not be used to recover, because it was skipped for the same reason.

Fix

Wrap each condition in !cancelled() so the job evaluates its own if rather than being gated by the skipped dependency — the same shape the *-status jobs already use correctly:

    if: |
      !cancelled() && (
        github.event_name == 'push' ||
        needs.changes.outputs.should_run == 'true'
      )

!cancelled() rather than always() so a genuine failure of changes still stops the job: should_run is then empty and the remaining clauses are false on pull_request events. gateway.yml and sdk.yml have no workflow_dispatch trigger, so their conditions keep their existing two clauses.

Also: broken gateway download URLs

rep-protocol.dev is currently serving content from before #56, including an install guide whose download command 404s:

gateway/v0.1.2 linux: 404
v0.1.7 linux:         200

Two problems — GoReleaser publishes archives on the bare version tag (v0.1.7), not the gateway/v0.1.7 release, and the documented version was 0.1.2. Fixed, plus a snippet that resolves the current release instead of pinning a version that goes stale again. Verified end to end:

resolved VERSION=v0.1.7 -> rep-gateway_0.1.7_linux_amd64.tar.gz
download: 200

The CLI's postinstall.js:74 already builds the correct URL, so npm i -g @rep-protocol/cli was never affected.

Verification

Merging this is itself a push to main touching .github/workflows/docs.yml and docs/**, both in the on.push.paths filter. So the merge is the test: Build and Deploy Docs either runs and ships the backlog to production, or reproduces the skip. The docs/** change also guarantees a real content update rather than a no-op deploy.

All three workflow files parse as valid YAML and the docs build passes locally.

Every push to main has been skipped since eb542e7. The `changes` job is
gated `if: github.event_name == 'pull_request'`, so it is skipped on a
push; the `ci` / `build-and-deploy` jobs that declare `needs: changes`
were then skipped too, even though their own `if` evaluates true on a
push.

An `if` with no status-check function carries an implicit `success()`
requirement on `needs`, and a skipped dependency does not satisfy it.
Wrapping each condition in `!cancelled()` lets the job evaluate its own
`if` instead. `!cancelled()` rather than `always()` so a genuine failure
of `changes` still stops the job: `should_run` is then empty and the
remaining clauses are false on pull_request events.

Consequences of the bug: no docs deploy, no Go tests and no SDK tests
have run on main for roughly six months. rep-protocol.dev is serving
content from before #56, and `workflow_dispatch` could not be used to
recover because it was skipped for the same reason.

Also fixes the gateway download URLs in the installation guide, which
returned 404 — GoReleaser publishes archives on the bare version tag
(`v0.1.7`), not the `gateway/v0.1.7` tag release, and the documented
version was 0.1.2. Adds a snippet that resolves the current release
rather than pinning a version that goes stale.
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

Greptile Summary

No merge-blocking issues found. The updated workflow conditions allow the documentation, gateway, and SDK jobs to run for main-branch pushes while retaining pull-request path filtering. The documentation site now serves the advertised Markdown mirrors and indexes, with alternate links and deployment header rules in place.

Confidence Score: 5/5

Safe to merge.

The reviewed workflow behavior and rendered documentation routes completed their expected before-and-after checks without identifying an actionable defect.

Files Needing Attention: None.

T-Rex T-Rex Logs

What T-Rex did

  • Captured the pre-capture state and executed the executable harness to verify status-check behavior across docs, gateway, and SDK; the harness output shows all scenarios pass and the results were uploaded as artifacts.
  • Validated the updated contract by capturing downstream conditions and exercising main-branch work, manual runs, matching and nonmatching PRs, failed filter jobs, and cancellation flows to ensure only eligible runs proceed.
  • Built and rendered the baseline and updated documentation sites, and confirmed key pages are available and that the nested documentation page advertises a working Markdown alternate link; deployment headers were observed to set mirrors to plain text with CORS and caching rules.
  • Compared docs mirrors before and after the PR and confirmed all four routes now respond with 200 and generated content; Cloudflare headers explicitly set text/plain, CORS, and cache rules for the checked mirrors.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix(ci): run main-branch jobs that depen..." | Re-trigger Greptile

@olamide226
olamide226 merged commit 36eea74 into main Sep 11, 2026
10 checks passed
@olamide226
olamide226 deleted the fix/ci-main-push-skipped branch September 11, 2026 15:29
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