Skip to content

test: pin OpenCode redirect token boundary - #1613

Draft
seonghobae wants to merge 1 commit into
codex/agents-pr-lifecycle-knowhowfrom
codex/pr1564-transport-security
Draft

test: pin OpenCode redirect token boundary#1613
seonghobae wants to merge 1 commit into
codex/agents-pr-lifecycle-knowhowfrom
codex/pr1564-transport-security

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Current authority — 2026-09-08

Valid delta and canonical port

This sibling originally added two assertions to backend/tests/test_release_governance.py requiring the README to keep the existing OpenCode transport statement that Fetch removes Authorization on a cross-origin redirect.

Fresh canonical-owner verification found that #1566's README already contains that contract on current owner lineage: local OpenCode uses the fixed contextual-orchestrator loopback endpoint, an owner-issued short-lived token, and the Fetch transport removes the standard Authorization header on a cross-origin redirect. The missing piece in #1566 was only focused executable coverage.

Rather than merge a second writer for backend/tests/test_release_governance.py, ordinary descendant #1566 commit 1aa5033e0f3f2f371235cb86ec7f7b79cd7032de adds backend/tests/test_opencode_redirect_transport_docs.py. That focused regression carries the same two semantic assertions (Fetch transport removes, cross-origin redirect) inside the canonical governance lane. The commit is one ordinary commit ahead of prior canonical head cc041222e69dc7fe3bfc17debaae1ae986e65070; no force update, rebase, source copy from another repository, or gate change was used.

Evidence boundary

The source-level succession is now explicit, but protected succession is not complete. #1566 remains Draft on unmerged prerequisite #1564, and the new exact head currently has no repository-owned PR workflow runs. The predecessor-local 36 passed receipt on #1613 is historical and is not transferred to #1566. Fresh hosted checks and qualifying independent review must be obtained on the unchanged canonical owner head after normal stack admission.

Do not merge #1613 as a second governance-test owner and do not close it merely because its valid delta was ported. Keep it open/Draft until #1566 or a verified successor normally integrates through protected develop and a protected-tree audit proves the redirect credential-boundary regression is present with no unique valid #1613 delta remaining.

No force-push, destructive rebase, self-approval, review fabrication/dismissal, dummy/no-op requeue, synthetic status, admin bypass, central-workflow copy, or gate weakening.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 364a41fc-0ef0-4067-94c2-66f215731e00

📥 Commits

Reviewing files that changed from the base of the PR and between 615be45 and 5ce66c2.

📒 Files selected for processing (1)
  • backend/tests/test_release_governance.py

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

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

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the exact successor head 5ce66c254e0092f383aae7dfc03ce5ae8d905588 only. Verify the OpenCode Authorization transport boundary, fixed loopback endpoint, cross-origin redirect behavior, and whether the added governance assertions match the source-backed contract. Do not transfer predecessor review evidence.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='5ce66c254e0092f383aae7dfc03ce5ae8d905588'

echo '== checked-out commit =='
git rev-parse HEAD
echo '== target commit =='
git rev-parse "${target}^{commit}"
echo '== target metadata =='
git show -s --format='commit=%H%nparent=%P%nsubject=%s' "$target"

echo '== commit-local changed files =='
git diff-tree --no-commit-id --name-status -r "$target"
echo '== commit-local diff =='
git diff "${target}^" "$target" -- .

echo '== candidate files =='
fd -HI -t f . | rg -i '(opencode|release_governance|readme)'

echo '== OpenCode, loopback, redirect, Authorization references =='
rg -n -i -C 4 '(opencode|authorization|cross-origin|redirect|loopback|127\.0\.0\.1|localhost)' \
  -g 'README*' -g '*.py' -g '*.ts' -g '*.tsx' -g '*.js' -g '*.mjs' -g '*.json' .

echo '== outlines for candidate Python test/source files =='
while IFS= read -r f; do
  ast-grep outline "$f" --items all 2>/dev/null || true
done < <(fd -HI -t f . | rg '(test_release_governance\.py$|\.py$)' | head -n 80)

Length of output: 194795


🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='5ce66c254e0092f383aae7dfc03ce5ae8d905588'

echo '== identity =='
printf 'HEAD='; git rev-parse HEAD
git show -s --format='target=%H%nparent=%P%nsubject=%s' "$target"

echo '== changed paths at target =='
git diff-tree --no-commit-id --name-status -r "$target"

echo '== changed diff at target =='
git diff --no-ext-diff --unified=80 "${target}^" "$target" -- \
  'README*' 'backend/tests/test_release_governance.py'

echo '== OpenCode references at target =='
git grep -n -i -C 5 'opencode' "$target" -- \
  'README*' 'backend' 'frontend' || true

echo '== targeted transport terms at target =='
git grep -n -i -C 4 -E 'Authorization|redirect: "manual"|redirect.*manual|127\.0\.0\.1:4096|localhost:4096|cross-origin' \
  "$target" -- 'README*' 'backend' 'frontend' || true

echo '== governance test relevant sections at target =='
git show "${target}:backend/tests/test_release_governance.py" |
  grep -n -i -C 12 -E 'opencode|Authorization|redirect|loopback|4096' || true

echo '== source candidates from OpenCode references =='
git grep -l -i 'opencode' "$target" -- 'backend' 'frontend' | while IFS= read -r f; do
  echo "--- $f ---"
  git show "${target}:$f" | grep -n -i -C 12 -E 'opencode|Authorization|redirect|loopback|4096|fetch\(' || true
done

echo '== whitespace check for target =='
git diff --check "${target}^" "$target"

Length of output: 201686


🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='5ce66c254e0092f383aae7dfc03ce5ae8d905588'

echo '== commit identity and changed paths =='
git show -s --format='HEAD? %H%nparents: %P%nsubject: %s' "$target"
git diff-tree --no-commit-id --name-status -r "$target"

echo '== exact successor diff =='
git diff --no-ext-diff --unified=20 "${target}^" "$target" -- README.md backend/tests/test_release_governance.py

echo '== OpenCode config =='
git show "${target}:opencode.jsonc"

echo '== README OpenCode context =='
git show "${target}:README.md" |
  grep -n -i -C 14 -E 'CONTEXTUAL_ORCHESTRATOR|OpenCode|127\.0\.0\.1:8100|Fetch transport|cross-origin redirect'

echo '== .env.example context =='
git show "${target}:.env.example" |
  grep -n -C 4 'CONTEXTUAL_ORCHESTRATOR_TOKEN'

echo '== governance test contract block =='
git show "${target}:backend/tests/test_release_governance.py" | sed -n '35,82p'

echo '== all target OpenCode references, excluding tests =='
git grep -n -i 'opencode' "$target" -- \
  ':!backend/tests/*' ':!frontend/**/test*' ':!frontend/tests/*' || true

echo '== target whitespace check =='
git diff --check "${target}^" "$target"

Length of output: 31855


@seonghobae Reviewed exact head 5ce66c254e0092f383aae7dfc03ce5ae8d905588 only.

No findings.

The successor changes only backend/tests/test_release_governance.py. The added assertions match the contract in opencode.jsonc, .env.example, and README.md:

  • OpenCode uses the fixed loopback endpoint http://127.0.0.1:8100/v1.
  • OpenCode sends CONTEXTUAL_ORCHESTRATOR_TOKEN in Authorization.
  • The token applies to OpenCode only.
  • README documents that Fetch removes Authorization on a cross-origin redirect.
  • git diff --check passed.
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex review

Review only exact head 5ce66c254e0092f383aae7dfc03ce5ae8d905588 as a stacked successor to #1564. Check the Authorization transport boundary, fixed loopback endpoint, redirect behavior, and whether the governance assertions are source-backed. Do not transfer predecessor approval or treat skipped checks as approval.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T11:32:27.509560Z 5ce66c2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head review result

  • reviewed head: 5ce66c254e0092f383aae7dfc03ce5ae8d905588
  • CodeRabbit inspected the successor-only change in backend/tests/test_release_governance.py and reported no findings. It confirmed the assertions match opencode.jsonc, .env.example, and README.md.
  • This is recorded as review evidence only, not a qualifying approval: the base is a non-default stacked branch and CodeRabbit also reported review-rate limiting.
  • Required hosted Checks remain absent; protected merge is still not authorized.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ce66c254e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +71 to +72
assert "Fetch transport removes" in readme
assert "cross-origin redirect" in readme

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exercise the redirect instead of checking documentation text

These assertions only prove that two phrases remain somewhere in README.md; they never exercise the configured OpenCode transport or show that the redirected request omits Authorization. If OpenCode or @ai-sdk/openai-compatible changes its fetch implementation, the test remains green while a cross-origin redirect can carry the gateway token. Add a transport-level regression that sends the token to the fixed loopback origin, follows a redirect to a distinct origin, and inspects the second request rather than treating prose as security evidence.

AGENTS.md reference: AGENTS.md:L204-L206

Useful? React with 👍 / 👎.

@seonghobae seonghobae added maintenance priority: high High-priority or P1 work type: maintenance Maintenance, build, dependency, or operational upkeep labels Sep 8, 2026 — with ChatGPT Codex Connector
@seonghobae
seonghobae marked this pull request as draft September 8, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance priority: high High-priority or P1 work type: maintenance Maintenance, build, dependency, or operational upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant