Fix Codex OAuth bridge payload/transport and package helper runtime #1

Open
fislysandi wants to merge 3 commits from fislysandi/fix/codex-oauth-runtime-helper into master
fislysandi commented 2026-03-03 15:21:41 +00:00 (Migrated from github.com)

Summary

  • Fix Codex OAuth bridge payload serialization and helper stdin piping so runtime requests are encoded correctly.
  • Package the Node helper runtime (@mariozechner/pi-ai) and resolve it portably instead of requiring a machine-specific absolute path.
  • Improve helper response extraction and error reporting for current openai-codex runtime result shapes.
  • Auto-load Quicklisp setup in clawmacs-server when available to reduce startup dependency failures.

Validation

  • Ran projects/cl-llm/t/smoke-codex-oauth-helper.sh successfully.
  • Verified bridge round-trip response via cl-llm/codex-oauth-bridge:codex-oauth-bridge-chat in SBCL.
  • Verified local Codex OAuth API request path succeeds after restart with updated bridge/helper.

Imported from GitHub issue/PR. Originally posted by fislysandi on 2026-03-03T15:21:41Z.

## Summary - Fix Codex OAuth bridge payload serialization and helper stdin piping so runtime requests are encoded correctly. - Package the Node helper runtime (`@mariozechner/pi-ai`) and resolve it portably instead of requiring a machine-specific absolute path. - Improve helper response extraction and error reporting for current openai-codex runtime result shapes. - Auto-load Quicklisp setup in `clawmacs-server` when available to reduce startup dependency failures. ## Validation - Ran `projects/cl-llm/t/smoke-codex-oauth-helper.sh` successfully. - Verified bridge round-trip response via `cl-llm/codex-oauth-bridge:codex-oauth-bridge-chat` in SBCL. - Verified local Codex OAuth API request path succeeds after restart with updated bridge/helper. --- Imported from [GitHub issue/PR](https://github.com/Kyvero-Vexus/clawmacs-legacy/pull/1). Originally posted by [fislysandi](https://github.com/fislysandi) on 2026-03-03T15:21:41Z.
chrysolambda-ops commented 2026-03-04 22:07:20 +00:00 (Migrated from github.com)

Triage Review — PR #1

Reviewer: Gensym (automated)

Code Review Summary

All changes reviewed. The PR covers four areas:

  1. codex_oauth_helper.mjs — Portable @mariozechner/pi-ai resolution (replaces hardcoded path), simplified message content format, and robust extractText with deep traversal of various response shapes. Looks good.
  2. codex-oauth-bridge.lisp — Switched payload construction from vector + plist-hash-table to explicit hash-tables (produces cleaner JSON). Fixed critical bug: :input now uses (make-string-input-stream json) instead of passing the string directly, which is required for uiop:run-program stdin piping.
  3. package.json + pnpm-lock.yaml — Packages @mariozechner/pi-ai as a local dependency. Standard.
  4. clawmacs-server — Auto-loads ~/quicklisp/setup.lisp when present before loading the system. Safe — uses probe-file guard.

Security Assessment

All changes are LOW or NEGLIGIBLE risk. No credential handling, no network-facing changes, no eval of untrusted input.

Verdict

Code changes look correct and well-motivated. Ready to merge once conflicts are resolved.

Blocker

⚠️ Merge conflicts — the PR currently has a CONFLICTING merge state. @fislysandi please rebase onto main so we can merge this.


Imported from GitHub comment. Originally posted by chrysolambda-ops on 2026-03-04T22:07:20Z.

## Triage Review — PR #1 **Reviewer:** Gensym (automated) ### Code Review Summary All changes reviewed. The PR covers four areas: 1. **`codex_oauth_helper.mjs`** — Portable `@mariozechner/pi-ai` resolution (replaces hardcoded path), simplified message content format, and robust `extractText` with deep traversal of various response shapes. Looks good. 2. **`codex-oauth-bridge.lisp`** — Switched payload construction from vector + `plist-hash-table` to explicit hash-tables (produces cleaner JSON). Fixed critical bug: `:input` now uses `(make-string-input-stream json)` instead of passing the string directly, which is required for `uiop:run-program` stdin piping. 3. **`package.json` + `pnpm-lock.yaml`** — Packages `@mariozechner/pi-ai` as a local dependency. Standard. 4. **`clawmacs-server`** — Auto-loads `~/quicklisp/setup.lisp` when present before loading the system. Safe — uses `probe-file` guard. ### Security Assessment All changes are **LOW** or **NEGLIGIBLE** risk. No credential handling, no network-facing changes, no eval of untrusted input. ### Verdict Code changes look correct and well-motivated. **Ready to merge once conflicts are resolved.** ### Blocker ⚠️ **Merge conflicts** — the PR currently has a `CONFLICTING` merge state. @fislysandi please rebase onto `main` so we can merge this. --- Imported from [GitHub comment](https://github.com/Kyvero-Vexus/clawmacs-legacy/pull/1#issuecomment-4000602776). Originally posted by [chrysolambda-ops](https://github.com/chrysolambda-ops) on 2026-03-04T22:07:20Z.
This pull request has changes conflicting with the target branch.
  • projects/cl-llm/src/codex-oauth-bridge.lisp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fislysandi/fix/codex-oauth-runtime-helper:fislysandi/fix/codex-oauth-runtime-helper
git switch fislysandi/fix/codex-oauth-runtime-helper
Sign in to join this conversation.
No description provided.