Skip to content

fix(ci): add explicit failure check to redis readiness loop - #7842

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
tryeverything24:fix-redis-readiness-loop-failure-check
Jul 21, 2026
Merged

fix(ci): add explicit failure check to redis readiness loop#7842
JSONbored merged 1 commit into
JSONbored:mainfrom
tryeverything24:fix-redis-readiness-loop-failure-check

Conversation

@tryeverything24

Copy link
Copy Markdown
Contributor

Summary

  • .github/workflows/selfhost.yml's Redis readiness wait loop (lines ~148-150) silently fell
    through with no error if Redis never answered PONG within 30s, so a real Redis-startup
    regression would surface later as a misleading generic "container did not become healthy"
    failure from the app health-check loop instead of pointing directly at Redis. This ports the
    exact ok=0/ok=1/explicit-failure idiom already used by the adjacent app-health readiness
    loop 9 lines later (lines 157-160) to the Redis loop: same structure, same ::error:: +
    docker logs + exit 1 on timeout.

Closes #7768

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck (pre-existing failures in packages/loopover-miner/lib/discover-cli.ts and the semver declaration checks, unrelated to this change — this PR touches only .github/workflows/selfhost.yml)
  • npm run test:coverage
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • This is a workflow-YAML-only change to .github/workflows/selfhost.yml (a CI smoke-test step)
    — no src/**, test/**, or apps/** files are touched, so test:coverage (and the
    codecov/patch gate it feeds), test:workers, build:mcp, test:mcp-pack, and all ui:*
    checks have nothing new to exercise; per the linked issue, this class of change is explicitly
    not covered by the Codecov patch gate. Verified instead by confirming the new failure path
    (::error:: message, docker logs, exit 1) matches the adjacent, already-in-production
    app-health loop's shape exactly, in the same job/runner context.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

  • No UI Evidence section — this change has no UI/frontend surface.

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-21 15:12:23 UTC

1 file · 1 AI reviewer · no blockers · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): .github/workflows/selfhost.yml (matched .github/workflows/**).

Review summary
This is a minimal, correct fix that ports the existing ok=0/ok=1/explicit-failure idiom (already used verbatim 9 lines below for the app health-check loop) to the Redis readiness loop, so a Redis PONG timeout now fails fast with ::error:: + docker logs + exit 1 instead of silently falling through to a misleading downstream failure. The change matches the same pattern already proven in scripts/smoke-selfhost.sh's redis_ok block, is scoped to exactly the described lines, and closes the linked issue (#7768). All CI checks passed on this commit.

Nits — 3 non-blocking
  • The variable name `ok` is reused for both the Redis loop and the later app health-check loop (selfhost.yml:149 and :162) — harmless since they're sequential and non-overlapping, but a distinct name like `redis_ok` (as used in scripts/smoke-selfhost.sh) would make the script easier to scan.
  • Consider extracting this repeated readiness-wait pattern into a small reusable shell function or referencing scripts/smoke-selfhost.sh's redis_ok logic directly, since the same idiom now appears in three places (selfhost.yml Redis loop, selfhost.yml app loop, smoke-selfhost.sh) — not required for this fix but worth a follow-up issue if it drifts further.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ⚠️ Gate result — Not blocking (Advisory; not blocking this PR.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7768
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 60 registered-repo PR(s), 25 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor tryeverything24; Gittensor profile; 60 PR(s), 0 issue(s).
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal
Linked issue satisfaction

Addressed
The diff adds the ok=0/ok=1 flag, an explicit timeout check with '::error::' and docker logs before exit 1, mirroring the adjacent app-health loop exactly as requested, and is scoped only to this loop.

Review context
  • Author: tryeverything24
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 60 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 21, 2026
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.37%. Comparing base (17ae3e6) to head (fa3a25f).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7842   +/-   ##
=======================================
  Coverage   91.37%   91.37%           
=======================================
  Files         729      729           
  Lines       74688    74688           
  Branches    22793    22792    -1     
=======================================
  Hits        68246    68246           
  Misses       5396     5396           
  Partials     1046     1046           
Flag Coverage Δ
shard-1 54.49% <ø> (ø)
shard-2 55.20% <ø> (ø)
shard-3 51.32% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@JSONbored
JSONbored merged commit 1402323 into JSONbored:main Jul 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

selfhost.yml's Redis readiness wait loop has no failure check, unlike the identical pattern 9 lines later

2 participants