Skip to content

fix(ci): repair 3 main-branch CI failures after upstream sync 0c5916f - #2

Merged
bbasketballer75 merged 1 commit into
mainfrom
fix/main-ci-after-upstream-sync-2026-08-04
Aug 5, 2026
Merged

fix(ci): repair 3 main-branch CI failures after upstream sync 0c5916f#2
bbasketballer75 merged 1 commit into
mainfrom
fix/main-ci-after-upstream-sync-2026-08-04

Conversation

@bbasketballer75

Copy link
Copy Markdown
Owner

Summary

Fixes the 3 main-branch CI breakages that appeared after the plastic-labs:main sync (merge 0c5916f):

# Job Run ID Root cause Fix
1 Static Analysis 30859200823 basedpyright: implicit string concat in src/routers/conclusions.py:113 (PR #1) explicit + between literals
2 FastAPI Tests with PostgreSQL and uv 30859200793 (a) pg_isready health check defaulted to OS user root instead of postgres; (b) LLM_OPENAI_API_KEY/LLM_ANTHROPIC_API_KEY empty because secrets aren't configured on the fork (a) --health-cmd "pg_isready -U postgres"; (b) `secrets.X
3 Unified Tests (Fly Runner) 30859200927 FLY_API_TOKEN env was bound to secrets.FLY_API_TOKEN_TESTING but the secret isn't configured on the fork Fail-fast check with ::error:: annotations so the missing secret is named clearly instead of dying inside flyctl

Files modified

  • src/routers/conclusions.py — reformat implicit string concatenation at line 113 (4-line ValidationException message → explicit + joins)
  • .github/workflows/unittest.yml — fix pg_isready health check, add API-key fallbacks for fork runs
  • .github/workflows/start-fly-runner.yml — add fail-fast check for FLY_API_TOKEN_TESTING

Manual follow-up for Austin

The workflow references are correct, but several secrets aren't defined on bbasketballer75/honcho. They have to be added manually in Settings → Secrets and variables → Actions before the affected workflows can run end-to-end:

Secret Required for Without it
FLY_API_TOKEN_TESTING Unified Tests (Fly Runner), cleanup-machine New fail-fast step names this exact secret
GH_TOKEN_ACTIONS Start Fly Runner (sets Fly app GH_TOKEN for runner registration) flyctl secrets set step will still run but registration will fail later
OPENAI_API_KEY FastAPI Tests (optional) test-key fallback already lets the suite pass — only add if you want real embedding calls
ANTHROPIC_API_KEY FastAPI Tests (optional) Same as OPENAI_API_KEY

The CI failures were also producing these log noise lines that the pg_isready fix eliminates:

FATAL:  role "root" does not exist
FATAL:  database "test_db_<ts>_<hex>_gwN" does not exist

The role "root" lines were pg_isready reconnect attempts (default user = OS user = root). The database ... does not exist lines are pytest-xdist workers briefly connecting before their per-worker DB was created by the db_engine session fixture — those are benign and shouldn't be silenced.

Verification

$ uv run basedpyright src/routers/conclusions.py
0 errors, 0 warnings, 0 notes

(The full uv run basedpyright run shows one unrelated uvloop error on src/deriver/__main__.py:5 — uvloop is Linux/macOS only; Windows runner. Out of scope for this PR.)

Three run failures were traced back to the plastic-labs:main sync
(merge 0c5916f) and to secrets that are not configured on the fork:

1) Static Analysis (run 30859200823) — basedpyright
   src/routers/conclusions.py:113:13 reported
   'Implicit string concatenation not allowed
    (reportImplicitStringConcatenation)' and exited 1. The four-line
   literal block in query_conclusions() came from PR #1. Replaced
   the implicit concatenation with explicit '+' between literals,
   matching the style used elsewhere in this file.

2) FastAPI Tests with PostgreSQL and uv (run 30859200793)
   The postgres log spammed
     FATAL: role "root" does not exist
   because pg_isready's health check ran without '-U postgres' and
   defaulted to the OS user (root). Tightened the health-cmd to
   'pg_isready -U postgres' so it authenticates against the
   POSTGRES_USER=postgres role defined by the service.

   While there, the actual single-test failure
     tests/crud/test_document.py::TestDocumentCRUD::
       test_duplicate_rejection_reinforces_existing
     src/embedding_client.py:200 ValueError: OpenAI API key is required
   was caused by LLM_OPENAI_API_KEY/LLM_ANTHROPIC_API_KEY resolving
   to empty when secrets are absent on the fork. Added
   '|| "test-key"' fallbacks (matching the existing
   LLM_OPENAI_COMPATIBLE_API_KEY=test-key pattern). The fallback is
   inert for tests that pass embeddings directly and only matters
   when the embedding client is lazily initialized — production
   secrets still win when present.

3) Unified Tests (Fly Runner) (run 30859200927)
   Start Fly Runner / Start Fly Runner failed with
     Error: no access token available. Please login with
     'flyctl auth login'
   because FLY_API_TOKEN was bound but empty. The workflow already
   references secrets.FLY_API_TOKEN_TESTING correctly — the secret
   simply isn't defined on the fork. Added a fail-fast 'Verify
   FLY_API_TOKEN is configured' step that emits ::error:: annotations
   naming the missing secret and exits 1 with an actionable message
   instead of letting flyctl die with the generic auth error.

   Austin must add these secrets to bbasketballer75/honcho (Settings
   > Secrets and variables > Actions) for the Fly Runner suite to
   actually run end-to-end:
     FLY_API_TOKEN_TESTING
     GH_TOKEN_ACTIONS
     OPENAI_API_KEY  (optional — only needed if real embedding calls
                      should be made; the test-key fallback already
                      lets the suite pass)
     ANTHROPIC_API_KEY  (same as OPENAI_API_KEY)
Copilot AI lite review requested due to automatic review settings August 5, 2026 00:30
@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.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Repairs three CI regressions introduced after an upstream sync by adjusting a pyright-triggering Python string, improving PostgreSQL service health checks, and making fork-friendly workflow behavior around missing secrets.

Changes:

  • Fixes basedpyright’s implicit string concatenation warning in query_conclusions by making concatenation explicit.
  • Updates the Postgres service health check to use the postgres user to avoid CI noise/failures.
  • Adds safe defaults / fail-fast behavior in workflows when fork secrets are not configured.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/routers/conclusions.py Makes the ValidationException message use explicit + concatenation to satisfy basedpyright.
.github/workflows/unittest.yml Uses pg_isready -U postgres for service health and provides test-key fallbacks for missing LLM secrets on forks.
.github/workflows/start-fly-runner.yml Adds an early, clear failure when FLY_API_TOKEN_TESTING is not configured to prevent opaque flyctl failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bbasketballer75
bbasketballer75 merged commit ea1326e into main Aug 5, 2026
5 checks passed
@bbasketballer75
bbasketballer75 deleted the fix/main-ci-after-upstream-sync-2026-08-04 branch August 5, 2026 02:49
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.

2 participants