Skip to content

fix(noema): refresh reviewer App token before publication - #1616

Merged
seonghobae merged 14 commits into
mainfrom
fix/noema-review-token-expiry-20260901
Sep 1, 2026
Merged

seonghobae merged 14 commits into
mainfrom
fix/noema-review-token-expiry-20260901

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

RCA

Closes #1614.

ContextualWisdomLab/naruon#1497@152d1998c4e8024be9dc7026c8789d343c884fd0 ran the trusted central Noema workflow source 5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1. The workflow minted the repository-scoped cwl-noema-review GitHub App installation token around 10:44:52Z, then spent more than an hour in contextual-orchestrator-backed model review. At 12:01:43Z the next GitHub operation failed gh: Bad credentials (HTTP 401); post-job cleanup independently reported Token expired, skipping token revocation. Repository-owned deterministic CI/security checks on the same Naruon head were otherwise successful. This is a central reviewer credential-lifetime defect, not a Naruon product failure.

Current protected main@7ffb7715bd0caac4a931785262f3a265935531ec still mints only one App token before model work and runs model review plus exact-head re-fetch/publication in one Python invocation, so the causal boundary remains present.

Test-first state

Commit 8edf9a7c0da809bfc27ff73ade0892e746ccaffa adds a deterministic RED workflow contract. It requires the trusted Noema path to separate model verdict preparation from publication, mint a second repository-scoped least-privilege App token after model work, re-bind publication to the same exact head, and keep model routing on contextual-orchestrator model orchestrator/free.

Required repair

Implement the smallest production change that turns this contract GREEN while preserving fail-closed semantics. Prefer an action-backed post-model App-token remint rather than broad/long-lived credentials. A refreshed credential must not transfer predecessor evidence: publication must independently re-fetch the live PR and reject a moved/closed head before submitting a review. Do not weaken review, security, coverage, provenance, or exact-head gates. Keep PAT/OIDC compatibility explicitly fail-closed; do not silently substitute author or GITHUB_TOKEN review authority.

Also record the RCA, affected consumer, fix, verification, and any remaining blocker in docs/product-technical-gap-baseline.md plus relevant CHANGELOG/doctoring documentation when present.

Verification target

After the branch is GREEN, rerun Required Noema Review on unchanged naruon#1497@152d1998c4e8024be9dc7026c8789d343c884fd0 and verify its exact-head check completes with a current-head schema-valid review or a typed review-unavailable result, never opaque expired-token 401 and never stale-head publication.


Devin Review

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.

Noema long review outlives reviewer GitHub App token and fails publication with 401

1 participant