Skip to content

fix(noema): validate stable OIDC exchange envelope - #834

Open
seonghobae wants to merge 37 commits into
mainfrom
fix/noema-oidc-envelope-current-main-20260808
Open

fix(noema): validate stable OIDC exchange envelope#834
seonghobae wants to merge 37 commits into
mainfrom
fix/noema-oidc-envelope-current-main-20260808

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

RCA

Protected main reads Noema's stable OIDC exchange response from a nonexistent
top-level .token. Noema publishes the credential under data.token together
with repository, workflow, expiry, and trace evidence, so the consumer
misdiagnoses a producer/consumer schema mismatch as a missing credential.

Current-main repair

  • require ok: true, object-valued data, and a non-empty visible-ASCII
    data.token without trimming or normalization;
  • require the exact requested repository and executing GITHUB_WORKFLOW_REF;
  • require canonical future data.token_expires_at with zero to three
    fractional-second digits and a non-empty trace_id;
  • extract and mask the token only after the complete envelope validates;
  • keep malformed responses and credential material out of diagnostics;
  • preserve App/PAT fallbacks, token scopes, reviewer identities, provider
    routing, permissions, and merge authority.

The effective diff is limited to the workflow, its executable regression
contract, APA 7 doctoring, one changelog entry, and removal of one unused
test-only import. The regression executes the production shell body and proves
valid acceptance plus fail-closed rejection of the old top-level token, wrong
repository/workflow, expired, offset, calendar-invalid, malformed, or
over-precision timestamps, missing trace evidence, and CR/LF/space/non-ASCII
token bytes.

Governance

This replaces the stale #822 implementation but inherits none of its checks,
reviews, or approvals. Merge remains prohibited until every required check is
terminal on the unchanged exact head, all valid threads are resolved, and a
qualifying independent current-head approval satisfies protected-branch policy.
Local green evidence and mergeability are not approval.

After protected integration, execute one real Noema exchange and confirm the
bound response reaches masked token export without exposing the credential.

Current exact-head evidence

Head: ff25d7a67c3b82c0389b8eaa2f913f990a2940ed
Base: 7b1a028e704a98ae8a807bb827f44aeaee0399af
Ancestry: regular merge history, 0 behind / 22 ahead, five-file effective diff.

  • Exact-head check inventory: 34 checks — 4 success, 18 cancelled, and 12 skipped.
  • Cancelled evidence includes Security Scan, SAST, CodeQL, Python Security, OSV,
    Secret Scan, Scorecard, SBOM, Strix changed-path quality, Required OpenCode,
    Required Noema, scheduler, close-empty, and bootstrap paths. Cancelled and
    skipped evidence is non-passing.
  • No exact-current-head formal review or qualifying approval exists.
  • Unresolved review threads: 0.
  • Protected main@7b1a028e704a98ae8a807bb827f44aeaee0399af still reads the
    nonexistent top-level .token, so this consumer repair remains required.
    Merge is nevertheless prohibited until fresh exact-head review, security,
    provenance, and quality evidence is terminal-clean on one unchanged head.

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Noema OIDC 교환 응답에 fail-closed 검증을 추가했습니다. 워크플로는 저장소에 바인딩된 data.token만 추출합니다. 테스트와 문서는 응답 계약, 오류 처리, 토큰 비노출을 검증합니다.

Changes

Noema OIDC 응답 검증

Layer / File(s) Summary
OIDC 응답 envelope 검증
.github/workflows/noema-review.yml, docs/doctoring/noema-oidc-exchange-envelope.md
워크플로가 성공 상태, data 객체, 저장소 일치 여부, workflow reference, 만료 시각과 비어 있지 않은 data.token을 검증합니다. 응답 계약과 토큰 비노출 규칙을 문서화했습니다.
계약 회귀 검증
tests/test_noema_oidc_exchange_contract.py, CHANGELOG.md
표준 성공 응답 소비, 잘못된 응답 오류 처리, 토큰 마스킹과 GitHub Actions 출력 기록을 검증합니다. 변경 사항을 changelog에 기록했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant NoemaOIDC
  participant GitHubWorkflow
  participant jq
  NoemaOIDC->>GitHubWorkflow: OIDC 교환 응답 반환
  GitHubWorkflow->>jq: 응답 envelope 및 저장소 메타데이터 검증
  jq-->>GitHubWorkflow: 검증 결과와 data.token 반환
Loading

Possibly related PRs

Suggested reviewers: opencode-agent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 Noema OIDC 응답 봉투 수정이라는 주요 변경 사항을 정확히 나타내며, 현재 main 기준으로 재적용한 변경임을 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/noema-oidc-envelope-current-main-20260808

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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the unchanged exact head 97276da73c3b5d7312ce01eb88f8260ff75f3930 against protected-base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. Focus on the bounded four-file Noema OIDC response-envelope repair; do not infer evidence from predecessor #822.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

@seonghobae I will review exact head 97276da73c3b5d7312ce01eb88f8260ff75f3930 against protected-base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. I will limit the review to the four-file Noema OIDC response-envelope repair. I will not use evidence from #822.

⚠️ 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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Re-review only the unchanged exact head 97276da73c3b5d7312ce01eb88f8260ff75f3930 against protected base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. The previous request was rate-limited several hours ago. Review only the bounded four-file Noema OIDC success-envelope repair and do not reuse evidence from superseded #822.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

@seonghobae I will review exact head 97276da73c3b5d7312ce01eb88f8260ff75f3930 against protected base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

I will limit the review to the four-file Noema OIDC response-envelope repair. I will not use evidence from superseded PR #822.

⚠️ 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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Re-review only unchanged exact head 97276da73c3b5d7312ce01eb88f8260ff75f3930 against protected base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. All exposed exact-head machine gates are terminal-success and there are zero review threads. Prior review attempts were capacity-limited; this request is sent only after the published cooldown window elapsed. Limit review to the four-file Noema OIDC success-envelope repair and do not use predecessor #822 evidence.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

@seonghobae I will review exact head 97276da73c3b5d7312ce01eb88f8260ff75f3930 against protected base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

I will limit the review to the four-file Noema OIDC success-envelope repair. I will not use evidence from superseded PR #822.

✅ Action performed

Review finished.

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.

coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@cwl-noema-review @opencode-agent Review only exact current head 7e3c9e581f981bd2ceaa37c7b9bde16b452b899b. All exact-head deterministic/security/supply-chain workflows are successful and both prior CodeRabbit threads are resolved/outdated. Verify the OIDC response envelope requires ok:true, object data, repository identity, workflow source, expiry, and non-empty data.token; top-level .token is rejected quote-independently; token masking occurs before any $GITHUB_OUTPUT write; the raw response is never printed; and App/PAT fallback plus reviewer/model/permission boundaries are unchanged. Review only; do not modify, merge, retarget, or alter credentials.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

@seonghobae I will review exact head 7e3c9e581f981bd2ceaa37c7b9bde16b452b899b only.

I will verify the specified OIDC envelope validation, token handling, diagnostic safety, and unchanged fallback and permission boundaries. I will not modify, merge, retarget, or alter credentials.

⚠️ Action not completed

Already reviewed.

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.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Evaluate exact current head 7e3c9e581f981bd2ceaa37c7b9bde16b452b899b against independently resolved live main 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. All nine observed exact-head pull-request workflows are terminal-success, GitHub reports the ready head mergeable, and unresolved threads are zero. Review the Noema OIDC envelope replay, token audience/subject binding, and fail-closed credential-exchange behavior only on this head. Submit only a current-head semantic verdict; keep automated judgment separate from qualifying independent human approval, merge authority, and protected-main operational acceptance.

Copy link
Copy Markdown
Contributor Author

Exact-current-head review request for 7e3c9e581f981bd2ceaa37c7b9bde16b452b899b over protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

Review the bounded four-file Noema OIDC consumer repair: accept only ok: true with object-valued data; require non-empty data.token, exact target repository identity, and workflow-source/expiry metadata; extract only .data.token after full envelope validation; mask before writing to GITHUB_OUTPUT; never reflect the raw response; and preserve existing GitHub App/PAT fallbacks, reviewer identities, model routing, NVIDIA behavior, permissions, and merge/release authority. Both CodeRabbit contract findings are addressed and resolved. Strix Changed Path Quality CI, CodeQL PR, Python Security, Security Scan, SAST Semgrep, Secret Scan, OSV-Scanner PR, Scorecard PR, and SBOM Generation are terminal-success on this exact head.

Keep the exact head unchanged. Do not transfer #822 evidence, synthesize author approval, accept the old top-level token shape, expose response/token data, alter credential fallbacks or reviewer identity, update the branch, merge, release, or bypass protection. After protected integration, operational acceptance still requires a real OIDC exchange proving the validated envelope reaches extraction without disclosure.

@coderabbitai review
@opencode-agent review
@cwl-noema-review review
@strix review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

head_sha='7e3c9e581f981bd2ceaa37c7b9bde16b452b899b'
base_sha='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

echo '== revision verification =='
git rev-parse HEAD
git cat-file -e "${head_sha}^{commit}"
git cat-file -e "${base_sha}^{commit}"
git merge-base --is-ancestor "$base_sha" "$head_sha"
git diff --name-status "$base_sha" "$head_sha"
echo
echo '== bounded diff =='
git diff --no-ext-diff --unified=80 "$base_sha" "$head_sha" -- \
  .github/workflows/noema-review.yml \
  tests/test_noema_oidc_exchange_contract.py \
  docs/doctoring/noema-oidc-exchange-envelope.md \
  CHANGELOG.md
echo
echo '== workflow outline =='
ast-grep outline .github/workflows/noema-review.yml --items all || true
echo
echo '== test outline =='
ast-grep outline tests/test_noema_oidc_exchange_contract.py --items all || true
echo
echo '== workflow references relevant to credentials, outputs, diagnostics, and OIDC =='
rg -n -i -C 8 \
  '(oidc|noema|token|github_output|github app|app[_ -]?token|pat|permissions|reviewer|nvidia|model|curl|jq)' \
  .github/workflows/noema-review.yml
echo
echo '== contract test source =='
cat -n tests/test_noema_oidc_exchange_contract.py

Length of output: 35934


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
pr_number='834'
head_sha='7e3c9e581f981bd2ceaa37c7b9bde16b452b899b'

echo '== response-contract references =='
rg -n -C 5 \
  '(token_expires_at|workflow_ref|target_repository|response envelope|data\.token)' \
  . \
  -g '!docs/doctoring/noema-oidc-exchange-envelope.md' \
  -g '!tests/test_noema_oidc_exchange_contract.py' \
  -g '!CHANGELOG.md' \
  -g '!**/.git/**' || true

echo
echo '== PR identity and exact-head state =='
gh api "repos/${repo}/pulls/${pr_number}" \
  --jq '{number, state, draft, mergeable, merge_commit_sha, base_sha: .base.sha, head_sha: .head.sha, changed_files, review_comments, commits}'

echo
echo '== check runs attached to exact head =='
gh api --paginate "repos/${repo}/commits/${head_sha}/check-runs?per_page=100" \
  --jq '.check_runs[] | {name, status, conclusion, details_url, head_sha}' || true

echo
echo '== statuses attached to exact head =='
gh api --paginate "repos/${repo}/commits/${head_sha}/status?per_page=100" \
  --jq '.statuses[] | {context, state, target_url, updated_at}' || true

echo
echo '== unresolved PR review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' \
  -F name='.github' \
  -F number="$pr_number" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      headRefOid
      reviewThreads(first: 100) {
        nodes { isResolved isOutdated comments(first: 1) { nodes { author { login } body path line } } }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest | {
    headRefOid,
    unresolvedThreads: [
      .reviewThreads.nodes[]
      | select(.isResolved == false)
      | {isOutdated, comment: .comments.nodes[0]}
    ]
  }' || true

Length of output: 63301


@seonghobae No blocking findings in the bounded review.

I verified exact head 7e3c9e581f981bd2ceaa37c7b9bde16b452b899b against base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. The diff contains the specified four files only.

The OIDC consumer now requires ok == true, object-valued data, a non-empty data.token, exact data.repository, and non-empty workflow_ref and token_expires_at metadata. It extracts only .data.token after the envelope validation.

The workflow masks app_token before it writes token to GITHUB_OUTPUT. The inspected OIDC step does not print token_response. The App/PAT fallback order, reviewer identity, model routing, NVIDIA behavior, permissions, and merge authority remain unchanged.

GitHub reports this exact head as mergeable with zero unresolved review threads. The inspected security and supply-chain checks are associated with this head and have successful conclusions where applicable. I did not treat skipped or neutral jobs as passing evidence.

The expiry field has presence and string-type validation. A real post-integration exchange is still required to verify the provider envelope, extraction path, and token non-disclosure in the GitHub Actions environment.


🧠 Learnings used
Learnt from: seonghobae
Repo: ContextualWisdomLab/.github PR: 0
File: :0-0
Timestamp: 2026-08-05T13:44:10.007Z
Learning: For PR `#782`, only successful checks associated with the exact current head are valid merge evidence. Do not treat queued, in-progress, cancelled, predecessor-head, temporary-workflow, or administrative-bypass results as passing evidence. Before a formal approval, verify that the direct security and supply-chain workflows, the permanent hourly NVIDIA NIM contract, current-head reviews, unresolved-thread checks, and an independent approval have completed successfully.

Learnt from: CR
Repo: ContextualWisdomLab/.github PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-07-29T06:47:25.581Z
Learning: Applies to opencode.jsonc : All reviewer agents in `opencode.jsonc` must keep `"edit": "deny"`; reviewers must never implement changes.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

Live sole-collaborator canary for the OIDC response-envelope repair

EmbedRelay PR #3 at exact head 88e54a3b934e2fa255305d3a1e9ecfe68aaf5b3f is ready for independent review after successful SAST/Security checks and resolved CodeRabbit findings. The repository collaborators API returns only the author, seonghobae; there is no independent human collaborator to request through the standard review-request endpoint.

The supported non-author review path therefore depends on the installed Noema/OpenCode reviewer App chain. This makes the .data.token envelope repair operationally material: a successfully minted token that is read from the wrong JSON path leaves a sole-collaborator repository unable to satisfy independent-review policy even though every code and security gate is green.

After this PR reaches protected central main, use EmbedRelay #3 as an exact-head end-to-end canary together with the mention-concurrency repair. Acceptance requires a formal review submission from the reviewer identity, not merely a successful workflow status or comment. Preserve review-only authority; do not grant contents write, merge, release, or deployment permissions.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review @coderabbitai review

Review-only request for exact current head 7e3c9e581f981bd2ceaa37c7b9bde16b452b899b against protected base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. All nine observed exact-head quality, security, and supply-chain workflows are terminal-success; both CodeRabbit findings are resolved/outdated. Verify the stable ok:true / object-valued data envelope, exact repository binding, workflow/expiry metadata, .data.token extraction, immediate masking before output, and unchanged review-only credential authority. Do not mutate or merge. Submit a formal non-author APPROVE only if this unchanged exact head is clean.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

head_sha='7e3c9e581f981bd2ceaa37c7b9bde16b452b899b'
base_sha='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
repo='ContextualWisdomLab/.github'
pr_number='834'

echo '== revision and scope =='
printf 'checked-out HEAD: '; git rev-parse HEAD
git cat-file -e "${head_sha}^{commit}"
git cat-file -e "${base_sha}^{commit}"
git merge-base --is-ancestor "$base_sha" "$head_sha"
git diff --name-status "$base_sha" "$head_sha"
git diff --no-ext-diff --unified=80 "$base_sha" "$head_sha" -- \
  .github/workflows/noema-review.yml \
  tests/test_noema_oidc_exchange_contract.py \
  docs/doctoring/noema-oidc-exchange-envelope.md \
  CHANGELOG.md

echo '== workflow relevant context =='
rg -n -i -C 12 \
  '(oidc|noema|token_response|app_token|data\.token|github_output|github app|app[_ -]?token|pat|permissions|reviewer|nvidia|model|curl|jq)' \
  .github/workflows/noema-review.yml

echo '== contract tests =='
ast-grep outline tests/test_noema_oidc_exchange_contract.py --items all
cat -n tests/test_noema_oidc_exchange_contract.py

echo '== reviewer edit boundary =='
if [ -f opencode.jsonc ]; then
  rg -n -C 4 '"edit"\s*:\s*"(deny|allow)"' opencode.jsonc
else
  echo 'opencode.jsonc is absent'
fi

echo '== exact-head PR state, check runs, and review threads =='
gh api "repos/${repo}/pulls/${pr_number}" \
  --jq '{state, draft, mergeable, base_sha: .base.sha, head_sha: .head.sha, changed_files, review_comments}'

gh api --paginate "repos/${repo}/commits/${head_sha}/check-runs?per_page=100" \
  --jq '.check_runs[] | {name, status, conclusion, head_sha}' || true

gh api graphql \
  -F owner='ContextualWisdomLab' \
  -F name='.github' \
  -F number="$pr_number" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      headRefOid
      reviewThreads(first: 100) {
        nodes {
          isResolved
          isOutdated
          comments(first: 1) { nodes { author { login } body path line } }
        }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest | {
    headRefOid,
    unresolvedThreads: [
      .reviewThreads.nodes[]
      | select(.isResolved == false)
      | {isOutdated, comment: .comments.nodes[0]}
    ]
  }'

Length of output: 44773


@seonghobae No blocking findings in this review.

I verified exact head 7e3c9e581f981bd2ceaa37c7b9bde16b452b899b against protected base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. The PR changes only the four requested files.

The OIDC exchange accepts only ok == true and object-valued data. It requires a non-empty string data.token, exact data.repository binding to TARGET_REPOSITORY, and non-empty string data.workflow_ref and data.token_expires_at metadata. It extracts only .data.token after validation.

The workflow applies ::add-mask:: before it writes the token to GITHUB_OUTPUT. The OIDC step does not print token_response.

The GitHub App and PAT fallback order is unchanged. The reviewer/model routing, NVIDIA behavior, workflow permissions, and reviewer "edit": "deny" boundary are unchanged.

GitHub reports this exact head as mergeable. The current-head review threads are resolved. The inspected terminal-success checks belong to this exact head. I did not count skipped or neutral checks as passing evidence.

A real post-integration OIDC exchange remains necessary to prove the provider response, extraction path, and token non-disclosure in GitHub Actions.

This request invoked @coderabbitai review. A formal approval requires the separate explicit @coderabbitai approve command. I used the repository review-evidence guidance from the retrieved learnings.


🧠 Learnings used
Learnt from: seonghobae
Repo: ContextualWisdomLab/.github PR: 0
File: :0-0
Timestamp: 2026-08-05T13:44:10.007Z
Learning: For PR `#782`, only successful checks associated with the exact current head are valid merge evidence. Do not treat queued, in-progress, cancelled, predecessor-head, temporary-workflow, or administrative-bypass results as passing evidence. Before a formal approval, verify that the direct security and supply-chain workflows, the permanent hourly NVIDIA NIM contract, current-head reviews, unresolved-thread checks, and an independent approval have completed successfully.

Learnt from: CR
Repo: ContextualWisdomLab/.github PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-07-29T06:47:25.581Z
Learning: Applies to opencode.jsonc : All reviewer agents in `opencode.jsonc` must keep `"edit": "deny"`; reviewers must never implement changes.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

Fresh policy RCA is tracked in #948. Protected main requires two qualifying approvals, but the repository currently has only the author as a human collaborator and the Noema review identity repaired by this PR is not yet operational. This exact head has successful observed checks and resolved review threads, but cannot bootstrap its own second independent approval. Do not weaken the ruleset or self-approve; a minimally privileged independent human/team reviewer or a separate review-only App identity is required.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Re-evaluate exact current head 526e7c284c4cb60979516935f3fb930319aed5de. 리뷰 확인 for the bounded-include increment; do not treat Checks wait as a blocker.

@seonghobae
seonghobae marked this pull request as draft August 14, 2026 08:35
auto-merge was automatically disabled August 14, 2026 08:35

Pull request was converted to draft

seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Current owner-boundary checkpoint (freshly revalidated 2026-08-30 KST): existing .github#834 remains the canonical central consumer lane. Protected central main is now GitHub-verified 1d8e872487838e16a003e96e76df9300c388e258; #834 remains exact head b3a78a914675892002054eca625000977c012e1a on historical base 3a7941aa92de00b8b39fd11cbe7bf3da2fbbeddc, open / Ready / non-mergeable. Its predecessor checks cannot become current-base authority without a non-destructive owner-side convergence and fresh exact-head gates/review.

The causal producer/consumer defect is still present in protected central truth: .github/workflows/noema-review.yml@1d8e872... extracts jq -r '.token // empty' from the OIDC exchange response. Protected Noema main@b86ae1f0614a31c2282e3eea7eac67ce9c6186af still defines the stable success envelope as { ok: true, data, trace_id }; /exchange credential metadata remains nested under data, including token/repository/workflow_ref/token_expires_at. No Noema-local producer-schema workaround is correct.

Preserve the repairs already present on #834 while converging: consume only validated .data.token; keep exact repository and GITHUB_WORKFLOW_REF binding, future canonical expiry and non-empty trace validation; independently reject non-canonical credential bytes before ::add-mask:: or $GITHUB_OUTPUT; mask/export only after full envelope validation; never log raw response/token material. Smallest owner path remains: merge current protected central main into this existing branch without history rewrite, regenerate focused/full exact-head quality/security/review evidence, resolve only still-valid findings, and integrate only under live central governance.

Noema-side acceptance after protected central integration remains one real OIDC exchange using the then-current audited central workflow SHA, proving the data.token consumer contract, repository/workflow/expiry/trace binding, masked output, and absence of credential disclosure. This Noema writer did not mutate central source, refs, workflows, or PR source state; only the existing owner checkpoint was refreshed with exact current evidence.

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 13:07

Copy link
Copy Markdown
Contributor Author

@coderabbitai review
@opencode-agent review
@cwl-noema-review review
@strix review

Review only exact current head 526e7c284c4cb60979516935f3fb930319aed5de against live protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. The OIDC success-envelope consumer now requires ok: true, object-valued data, exact repository identity, non-empty workflow source/expiry metadata, extracts only data.token, and masks the token before output. All prior CodeRabbit threads are resolved and all directly observed exact-head PR workflows were terminal-success before the Ready transition; any newly queued Ready-cycle checks are not acceptance. Review read-only; do not mutate source, synthesize author approval, expose credentials, weaken protection, or merge.

@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 could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 4becf4275f274723e52c25eb6729950c587a7ba1.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

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 --> R1["Review risk: Workflow: noema-review.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Repository file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Repository file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: noema-oidc-exchange-envelope.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: noema-oidc-exchange-envelope.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test: test_noema_oidc_exchange_contract.py (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_noema_oidc_exchange_contract.py (2 files)"]
  R4 --> V4["targeted test run"]
Loading

@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 could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 4becf4275f274723e52c25eb6729950c587a7ba1.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

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 --> R1["Review risk: Workflow: noema-review.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Repository file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Repository file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: noema-oidc-exchange-envelope.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: noema-oidc-exchange-envelope.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test: test_noema_oidc_exchange_contract.py (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_noema_oidc_exchange_contract.py (2 files)"]
  R4 --> V4["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

Fresh Noema downstream revalidation evidence (no foreign source mutation from the Noema writer): protected central main is now 7b1a028e704a98ae8a807bb827f44aeaee0399af; #834 exact head 4becf4275f274723e52c25eb6729950c587a7ba1 is 21 ahead / 4 behind that live base, with merge base 1cbb6aaf0a24c3628d24c3dd6d9dcaa8a7eec0c5. Protected noema-review.yml@7b1a028... still extracts .token // empty, while Noema's stable producer envelope remains data.token, so the owner defect is still live on protected central source. The latest central movement 1186a9f... -> 7b1a028... changes only .github/workflows/opencode-review-dispatch.yml; the protected noema-review.yml blob remains 064c4e5aeedcbb188196bd4800a0b918abd6da27. Noema protected main is dd6ff2aa46f8daa8aa9a4e19e0d6825f4a98f383; active Noema #527 exact head f3a25f42ab1c74cbe4fbad169a9a22474cdcc1c2 has already rolled its immutable caller-source pin to current protected central 7b1a028.... Owner-path acceptance remains: non-destructively converge #834 onto current protected central, regenerate every exact-head required gate/review, integrate only under live central governance, then run a real Noema exchange canary proving validated data.token reaches masked token export without credential bytes in diagnostics. After that central integration, Noema must re-audit the new protected central commit and regenerate its own exact-head trust/canary evidence; predecessor #527 evidence is not transferable.

Copy link
Copy Markdown
Contributor Author

Fresh exact-head evidence after non-force main convergence:

  • protected base: 7b1a028e704a98ae8a807bb827f44aeaee0399af
  • current head: ff25d7a67c3b82c0389b8eaa2f913f990a2940ed
  • ancestry: 0 behind; effective scope remains exactly 5 files
  • mergeable, unresolved review threads: 0
  • current-head formal reviews/approvals: 0

The new execution is non-passing. Of 34 exact-head check runs, only 4 succeeded; 18 were cancelled and 12 skipped. Security, SAST, CodeQL, Python Security, OSV, Secret, Scorecard, SBOM, Strix path-quality, Required OpenCode, Required Noema, close-empty, scheduler, and bootstrap evidence were all cancelled. There is no queued replacement currently bound to ff25d7a6.

Predecessor CHANGES_REQUESTED and predecessor successes do not transfer to this head. Keep #834 open until a fresh unchanged-head chain produces terminal-clean security/review/provenance evidence and an exact-head formal verdict; protected main still reads the nonexistent top-level .token, so the five-file OIDC repair remains required.

Copy link
Copy Markdown
Contributor Author

Exact-state refresh after protected-main movement

Protected main is now 9b57e4bb95b1a6efe9976a208fe7ca2c0d36dfec; this PR remains at ff25d7a67c3b82c0389b8eaa2f913f990a2940ed with recorded base 7b1a028e704a98ae8a807bb827f44aeaee0399af.

Live comparison is now diverged / 22 behind / 1 ahead, and GitHub reports mergeable=false, mergeable_state=dirty. Exact-head checks are 34 total: 4 success, 4 queued, 14 cancelled, 12 skipped. There is no exact-head approval or formal verdict.

The protected-main workflow still consumes top-level jq -r '.token // empty'; it does not yet consume the stable nested data.token envelope. This remains non-passing and must not be merged until the existing owner branch is safely reconciled with the live base and all exact-head governance gates are terminal-clean.

devin-ai-integration[bot]

This comment was marked as resolved.

@opencode-agent

opencode-agent Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: d28c626ea1b89c6291a94f72bfd26bd9849d270b

Copy link
Copy Markdown
Contributor Author

Fresh Noema consumer canary / owner handoff (2026-09-03): protected .github/main is now 4f95abce674463ed8bc970e650a62f1a866055c6, while the protected noema-review.yml at that exact commit still extracts the OIDC exchange credential with jq -r '.token // empty'. Noema protected source continues to expose the stable success envelope under data.token; Noema is not reshaping that producer contract as a workaround.

This PR is currently d28c626ea1b89c6291a94f72bfd26bd9849d270b, base snapshot 035269a76ffa6e176ee467f452467cbf4c2158a8, open/Ready but non-mergeable against current protected main. Treat the stale base as a repair finding: preserve the four-file effective envelope-validation delta, non-force restack/reconstruct it on current protected main, then regenerate exact-current-head required evidence. Predecessor cancelled/skipped checks do not transfer.

Downstream acceptance remains: after protected integration, Noema must execute a real OIDC exchange canary bound to the then-current protected central workflow source and prove validated data.token extraction/masking without credential bytes in diagnostics. The current organization Actions concurrency ceiling is separately tracked by #712; queue latency is non-passing but is not justification to weaken this schema repair.

Copy link
Copy Markdown
Contributor Author

Fresh downstream Noema consumer revalidation against protected .github/main@aee42923a92e12f7e254c13a9b2f1fa1d5d37e04: protected noema-review.yml still extracts the OIDC response with jq -r '.token // empty', while Noema's stable success envelope remains data.token. The defect is therefore still live on protected truth.

Current #834 authority is now head@d28c626ea1b89c6291a94f72bfd26bd9849d270b, while its merge base remains 035269a76ffa6e176ee467f452467cbf4c2158a8; comparison to current protected main is diverged (26 branch-side commits / 279 protected-side commits). Noema writer will not mutate this foreign source/ref. Owner-side next step should non-destructively reconcile the five-file effective envelope repair with current protected main, re-run exact-head required review/security/provenance gates, then after protected integration execute one real OIDC exchange and verify masked data.token export. Noema-side acceptance is the protected central workflow consuming the stable envelope without changing Noema's producer schema or weakening exact workflow-source authentication.

Only CHANGELOG.md conflicted (both branches independently appended distinct
Fixed bullets) -- kept both. noema-review.yml auto-merged cleanly with the
data.token envelope fix intact and verified present in the merged file.

Confirmed this fix is not superseded: main's current noema-review.yml still
reads the nonexistent top-level `.token` from the OIDC exchange response
(the bug this PR describes), so the repair remains genuinely needed.

Verified post-merge: coverage run -m pytest tests -q (2778 passed, 1 skipped,
21 subtests), coverage report --fail-under=100 (100%), interrogate (100%).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Resolved the merge conflict against current `main` (previous CHANGES_REQUESTED was `mergeStateStatus: DIRTY` only). New head `50219fb2` merges cleanly — only `CHANGELOG.md` had a real content conflict (both branches independently appended distinct `### Fixed` bullets); kept both. `noema-review.yml` auto-merged cleanly and the `data.token` envelope fix is confirmed present and intact in the merged file.

Confirmed this bug is not fixed some other way: main's current `noema-review.yml` still reads the nonexistent top-level `.token` from the OIDC exchange response, so this repair remains genuinely needed.

Post-merge verification: `coverage run -m pytest tests -q` → 2778 passed, 1 skipped, 21 subtests; `coverage report --fail-under=100` → 100%; `interrogate` → 100%.

🤖 Generated with Claude Code

@seonghobae seonghobae closed this Sep 4, 2026
@seonghobae seonghobae reopened this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: auth Authentication, authorization, identity, or tenant isolation priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant