test: pin OpenCode redirect token boundary - #1613
Conversation
|
Warning Review limit reachedNext included review available in 27 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
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. Comment |
|
@coderabbitai review Please review the exact successor head |
🧩 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
No findings. The successor changes only
|
|
@codex review Review only exact head |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Exact-head review result
|
There was a problem hiding this comment.
💡 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".
| assert "Fetch transport removes" in readme | ||
| assert "cross-origin redirect" in readme |
There was a problem hiding this comment.
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 👍 / 👎.
Current authority — 2026-09-08
develop@042b0c70531b229af3acbd0421a2f23098d848b3codex/agents-pr-lifecycle-knowhow@615be4514add6a21eef743f591a65a5f8fef4dee5ce66c254e0092f383aae7dfc03ce5ae8d905588codex/agents-operating-playbook@1aa5033e0f3f2f371235cb86ec7f7b79cd7032deValid delta and canonical port
This sibling originally added two assertions to
backend/tests/test_release_governance.pyrequiring the README to keep the existing OpenCode transport statement that Fetch removesAuthorizationon 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
Authorizationheader 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 commit1aa5033e0f3f2f371235cb86ec7f7b79cd7032deaddsbackend/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 headcc041222e69dc7fe3bfc17debaae1ae986e65070; 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 passedreceipt 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
developand 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.