Skip to content

feat(pat): CI mode — PEM from APP_PRIVATE_KEY env - #8

Merged
axisrow merged 1 commit into
mainfrom
feat/pat-ci-mode
Jul 12, 2026
Merged

axisrow merged 1 commit into
mainfrom
feat/pat-ci-mode

Conversation

@axisrow

@axisrow axisrow commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

What

pat now works without Bitwarden — in CI (GitHub Actions) where bw isn't installed, the App private key is supplied via the APP_PRIVATE_KEY env secret and used directly. Same pat binary works locally (Bitwarden) and in CI (env).

Priority: APP_PRIVATE_KEY env > Bitwarden.

Why

The profile-sync automation (axisrow/profile → cross-push to axisrow/axisrow + axisrow.github.io) needs pat inside a GitHub Actions workflow. CI runners don't have Bitwarden; the PEM comes from a repository secret. This unblocks the auto-sync pipeline without a long-lived PAT.

Changes

  • pat_with_pem: env branch — skips pat_bw_ensure_unlocked and the bw field read when APP_PRIVATE_KEY is set.
  • pat_require_deps: bw is only required when APP_PRIVATE_KEY is unset (CI runners without bw work).
  • cmd_install: prints "CI mode" and skips bw-item checks.
  • tests/run_tests.sh: new test signs a JWT from an env PEM with bw unfindable.

Verified

  • Live: APP_PRIVATE_KEY=<pem> pat install → "CI mode: APP_PRIVATE_KEY set (Bitwarden skipped)", App reachable, token minted (ghs_…, 40 chars).
  • 19/19 unit tests (was 18). shellcheck clean (one expected SC2016 false-positive in a test heredoc).

🤖 Generated with Claude Code

pat now works in environments without Bitwarden (e.g. GitHub Actions): when
APP_PRIVATE_KEY is set, it's used directly as the PEM and Bitwarden is skipped
entirely. Priority: APP_PRIVATE_KEY env > Bitwarden.

- pat_with_pem: env branch (no pat_bw_ensure_unlocked / no bw field read).
- pat_require_deps: bw is only required when APP_PRIVATE_KEY is unset, so CI
  runners without bw installed still work.
- cmd_install: prints "CI mode: APP_PRIVATE_KEY set (Bitwarden skipped)" and
  skips the bw-item checks.
- tests: new CI-mode test signs a JWT from an env PEM with bw unfindable.

Same pat binary now works locally (Bitwarden) and in CI (env secret).

Co-Authored-By: Claude <[email protected]>
@axisrow
axisrow merged commit 45a1753 into main Jul 12, 2026
1 check passed
@axisrow
axisrow deleted the feat/pat-ci-mode branch July 12, 2026 12:43
axisrow added a commit that referenced this pull request Jul 20, 2026
… worktree

Updates codex-fork to sha c25698b (1.0.6-fork.4). Changes since fork.3:
- rescue default --background + terminal-on-timeout (#8)
- worktree isolation with leave-branch cleanup (#12, based on openai#137)
- 4 security fixes: symlink guard (#18), symlink neutralize (#20),
  git-dir eliminate (#22), accumulation warn (#23)
- test-teardown: npm test no longer leaks broker processes (#5)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
axisrow added a commit that referenced this pull request Jul 20, 2026
… worktree

Updates codex-fork to sha c25698b (1.0.6-fork.4). Changes since fork.3:
- rescue default --background + terminal-on-timeout (#8)
- worktree isolation with leave-branch cleanup (#12, based on openai#137)
- 4 security fixes: symlink guard (#18), symlink neutralize (#20),
  git-dir eliminate (#22), accumulation warn (#23)
- test-teardown: npm test no longer leaks broker processes (#5)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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