Skip to content

fix(ci): use literal ROCKETRIDE_APIKEY in Test step instead of secret#742

Merged
kwit75 merged 1 commit intodevelopfrom
fix/ci-apikey-literal
May 1, 2026
Merged

fix(ci): use literal ROCKETRIDE_APIKEY in Test step instead of secret#742
kwit75 merged 1 commit intodevelopfrom
fix/ci-apikey-literal

Conversation

@kwit75
Copy link
Copy Markdown
Collaborator

@kwit75 kwit75 commented May 1, 2026

Summary

Replace ROCKETRIDE_APIKEY: ${{ secrets.ROCKETRIDE_APIKEY }} with a literal MYAPIKEY in the Test step's env block. Companion fix to #734 — together they clear the two CI/CD failure modes that have been blocking the queue.

Why

PR #712 added the env var to unblock client-python integration tests. Its own inline comment correctly noted that "the secret value itself doesn't matter — it just has to match between server and client in this single CI run". Sourcing it from secrets.ROCKETRIDE_APIKEY introduced an empty-string failure mode:

  1. The secret was created 2026-04-27 and never updated since. If it's set to "" (or rotated to a value the engine no longer accepts), the workflow silently expands the expression to ROCKETRIDE_APIKEY="".
  2. The test client reads it via os.getenv('ROCKETRIDE_APIKEY', 'MYAPIKEY'). os.getenv returns the empty string when the variable is set-but-empty — not the default — so the client authenticates with "".
  3. The server sees the same empty key, returns AuthenticationException, and all 48 client-python tests fail uniformly across Ubuntu / Windows / macOS.

That's exactly the symptom on develop's most recent CI run and on PRs #715, #728, #738.

A literal eliminates the failure mode without changing observable behaviour. The value isn't a secret (the inline comment was always explicit on this), never leaves the runner, and matches the existing MYAPIKEY placeholder used elsewhere (.env.template, the engine's built-in dev key).

Test plan

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

This release contains internal infrastructure updates with no user-facing changes.

Replace \`ROCKETRIDE_APIKEY: \${{ secrets.ROCKETRIDE_APIKEY }}\` with a
literal \`MYAPIKEY\` in the Test step env block.

Why this is unblocking the queue
--------------------------------
PR #712 set up the env var to fix "No authentication configured" failures
in client-python integration tests. Its own inline comment correctly
noted that "the secret value itself doesn't matter — it just has to
match between server and client in this single CI run." Sourcing it
from \`secrets.ROCKETRIDE_APIKEY\` introduced an empty-string failure
mode that we hit:

  1. The secret was created on 2026-04-27, has not been updated since,
     and may be set to "" (or rotated to a value the engine no longer
     accepts).
  2. When that happens, the workflow silently expands the expression to
     \`ROCKETRIDE_APIKEY=""\` for the Test step.
  3. The test client reads it via \`os.getenv('ROCKETRIDE_APIKEY',
     'MYAPIKEY')\`. \`os.getenv\` returns the empty string when the
     variable is set-but-empty — NOT the default — so the client
     authenticates with \`""\`.
  4. The server (running in the same step) sees the same empty key and
     responds AuthenticationException.
  5. All 48 client-python integration tests fail uniformly across
     Ubuntu, Windows, and macOS (which is what's been happening on
     develop's most recent runs and on PRs #715, #728, #738).

Using a literal value eliminates the entire failure mode without
changing observable behaviour: the value still isn't a secret (the
inline comment was always explicit on this), it never leaves the runner,
and it matches the "MYAPIKEY" dev key the engine already recognises
elsewhere in the codebase (\`.env.template\`).

Together with #734 (the sequential test execution flag, already on
develop) this should clear both failure modes that have been blocking
PRs since yesterday.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 79e0487a-f63d-4fa1-83b7-5cc3961c268f

📥 Commits

Reviewing files that changed from the base of the PR and between b149042 and fa10100.

📒 Files selected for processing (1)
  • .github/workflows/_build.yaml

📝 Walkthrough

Walkthrough

The CI workflow's Test job environment configuration is updated to set ROCKETRIDE_APIKEY to a hardcoded literal value (MYAPIKEY) instead of sourcing it from repository secrets. Comments are revised to document the failure mode where an unset, cleared, or rotated secret results in an empty environment variable, causing authentication failures in the Python client.

Changes

Cohort / File(s) Summary
CI Configuration
.github/workflows/_build.yaml
Replaced ${{ secrets.ROCKETRIDE_APIKEY }} with hardcoded literal MYAPIKEY in Test job environment; updated comments to explain secret rotation failure scenarios.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

ci/cd

Poem

🐰 A secret once guarded, now clear as the day,
Hardcoded and steady, no rotations to sway,
When auth keys go missing, the workflow will speak,
No more silent failures—just clarity sleek!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-apikey-literal

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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@kwit75 kwit75 merged commit 26d17ff into develop May 1, 2026
5 of 7 checks passed
@kwit75 kwit75 deleted the fix/ci-apikey-literal branch May 1, 2026 21:31
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI/CD and build system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant