Skip to content

fix(noema): consume standard OIDC token envelope - #820

Open
seonghobae wants to merge 5 commits into
mainfrom
fix/noema-oidc-envelope-contract
Open

fix(noema): consume standard OIDC token envelope#820
seonghobae wants to merge 5 commits into
mainfrom
fix/noema-oidc-envelope-contract

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

Fixes the central noema-review.yml OIDC credential path so it consumes Noema's stable success envelope instead of looking for a nonexistent top-level token.

Root cause

Noema returns successful exchanges as:

{"ok":true,"data":{"token":"...","repository":"...","workflow_ref":"...","token_expires_at":"..."},"trace_id":"..."}

The central workflow read .token // empty, so every successful OIDC exchange produced an empty reviewer credential after Noema had already minted it.

Test-first fix

  • added RED workflow-contract tests before changing production YAML;
  • require ok == true and an object-valued data envelope;
  • require a non-empty data.token;
  • bind data.repository to the requested TARGET_REPOSITORY;
  • require non-empty workflow-source and expiry metadata;
  • extract only .data.token after the complete envelope passes;
  • preserve immediate GitHub Actions token masking and the existing empty-token fail-closed fallback;
  • prohibit raw token-response diagnostics;
  • update CHANGELOG.md and add APA 7th doctoring based on RFC 8259 and NIST SP 800-218.

Boundaries preserved

This PR does not change reviewer App keys, PAT fallback, NVIDIA_NIM_API_KEY, model routing, repository permissions, branch protection, merge authority, release authority, or deployment authority. It repairs only the provider/consumer response-schema mismatch in the OIDC path.

Exact source

  • Base: main at e71fdab2ab088001f218765ecb5e3b7fabfee11a
  • Exact head: 43c510bc3b9e16ea6aa80816407cb2d8ee163f64

Do not merge unless the live head is unchanged, required current-head checks and security gates pass, all current review findings are addressed, an eligible independent reviewer approves, and repository rules permit the merge.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 59c908fb-8db0-441d-a8d0-f90e4975a25d

📥 Commits

Reviewing files that changed from the base of the PR and between e71fdab and 43c510b.

📒 Files selected for processing (4)
  • .github/workflows/noema-review.yml
  • CHANGELOG.md
  • docs/doctoring/noema-oidc-exchange-envelope.md
  • tests/test_noema_oidc_exchange_contract.py

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

@opencode-agent

opencode-agent Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 43c510bc3b9e16ea6aa80816407cb2d8ee163f64
  • Workflow run: 31176691387
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch fix/noema-oidc-envelope-contract cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into fix/noema-oidc-envelope-contract, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 820 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:fix/noema-oidc-envelope-contract
# rebase path only: git push --force-with-lease origin HEAD:fix/noema-oidc-envelope-contract
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: noema-review.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs: noema-oidc-exchange-envelope.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["Test: test_noema_oidc_exchange_contract.py"]
  S4 --> I4["regression suite"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 43c510bc3b9e16ea6aa80816407cb2d8ee163f64
  • Workflow run: 31176691387
  • Workflow attempt: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: noema-review.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs: noema-oidc-exchange-envelope.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["Test: test_noema_oidc_exchange_contract.py"]
  S4 --> I4["regression suite"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["targeted test run"]
Loading

Merge Conflict Guidance

  • Current merge state: DIRTY
  • Base branch: main
  • Head branch: fix/noema-oidc-envelope-contract
  • Fix direction: merge or rebase origin/main into fix/noema-oidc-envelope-contract, resolve conflict markers in the changed files, rerun the focused checks, then push the same branch.
  • Repair commands:
gh pr checkout 820 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:fix/noema-oidc-envelope-contract
# rebase path only: git push --force-with-lease origin HEAD:fix/noema-oidc-envelope-contract

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch fix/noema-oidc-envelope-contract cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into fix/noema-oidc-envelope-contract, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 820 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:fix/noema-oidc-envelope-contract
# rebase path only: git push --force-with-lease origin HEAD:fix/noema-oidc-envelope-contract
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: noema-review.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs: noema-oidc-exchange-envelope.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["Test: test_noema_oidc_exchange_contract.py"]
  S4 --> I4["regression suite"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 43c510bc3b9e16ea6aa80816407cb2d8ee163f64
  • Workflow run: 31176691387
  • Workflow attempt: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: noema-review.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs: noema-oidc-exchange-envelope.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["Test: test_noema_oidc_exchange_contract.py"]
  S4 --> I4["regression suite"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["targeted test run"]
Loading

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