Repository navigation
fix(automation): react on review-comment mentions without fail-close #989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
cd75aa3
fix(automation): dispatch review-comment and review-body agent mentions
seonghobae 7db1c29
fix(automation): keep mention dispatch when eyes reaction 403s
seonghobae dc2d29a
docs(automation): cite CWE-755 for mention reaction 403
seonghobae a9debe4
fix(automation): keep OpenCode mention payload at 10 keys
seonghobae d450fc8
fix(automation): ignore pending and dismissed review mentions
seonghobae 686a484
fix(automation): grant reactions:write for mention eyes
seonghobae 55578c3
fix(automation): react on review-comment mentions without fail-close
seonghobae 23b5099
fix(automation): react on submitted review-body mentions via GraphQL
seonghobae f4586dd
fix(automation): treat already-reacted review eyes as success
seonghobae 8e58158
fix(coverage): accept only bounded relative requirement includes
seonghobae 316cc8d
fix(automation): drop invalid reactions:write mention permission
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ __pycache__/ | |
| .coverage | ||
| .pytest_cache/ | ||
| .codegraph/ | ||
| .venv/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Architecture — ContextualWisdomLab `.github` | ||
|
|
||
| This repository is the organization control plane. It is not naruon and it | ||
| does not own product data. Sibling products remain standalone modules; this | ||
| repo publishes org profile assets, reusable required workflows, and the | ||
| review/merge schedulers those products consume. | ||
|
|
||
| ## System context | ||
|
|
||
| ```mermaid | ||
| flowchart LR | ||
| Buyer["Commercial buyer / reviewer"] | ||
| Agents["Agents on AGENTS.md"] | ||
| Project["GitHub Project #1"] | ||
| Hub["This repo: org .github"] | ||
| Products["Owned products<br/>naruon · orchestrator · engines"] | ||
| Runner["Required workflows in each repo context"] | ||
|
|
||
| Buyer --> Hub | ||
| Agents --> Project | ||
| Agents --> Hub | ||
| Project --> Hub | ||
| Hub --> Runner | ||
| Runner --> Products | ||
| Products -->|"standalone or as module"| Buyer | ||
| ``` | ||
|
|
||
| ## Review-agent mention surfaces | ||
|
|
||
| ```mermaid | ||
| flowchart TD | ||
| Surfaces["issue comment · review comment · submitted review body"] | ||
| Trust{"OWNER/MEMBER/COLLABORATOR, non-bot, exact handle, open PR?"} | ||
| Dispatch["Queue exact-head review dispatch"] | ||
| Eyes{"Optional eyes reaction 403?"} | ||
| Receipt["Post conversation receipt"] | ||
| Drop["Ignore the mention"] | ||
|
|
||
| Surfaces --> Trust | ||
| Trust -->|"no"| Drop | ||
| Trust -->|"yes"| Dispatch | ||
| Dispatch --> Eyes | ||
| Eyes -->|"yes"| Receipt | ||
| Eyes -->|"no"| Receipt | ||
| ``` | ||
|
|
||
| The local job grants `reactions: write` so the optional eyes reaction is | ||
| an allowed write. CWE-755: a leftover 403 must not look like a missed | ||
| dispatch. Review agents stay `edit: deny` and bind `NVIDIA_NIM_API_KEY`. | ||
|
|
||
| ## Control-plane data flow | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| participant PR as Pull request | ||
| participant RW as Required workflows | ||
| participant OC as OpenCode reviewer | ||
| participant SV as sandboxed_verify / web E2E | ||
| participant MS as Merge scheduler | ||
|
|
||
| PR->>RW: pull_request_target on trusted base | ||
| RW->>OC: bounded evidence + NVIDIA NIM / OpenCode | ||
| OC->>SV: PoC command in isolated copy | ||
| SV-->>OC: redacted stdout/stderr + command metadata | ||
| OC-->>PR: APPROVE or request changes | ||
| MS->>PR: merge only on current-head approval + green checks | ||
| ``` | ||
|
|
||
| ## Trust boundaries | ||
|
|
||
| - Required review workflows execute **base-branch** scripts. A PR that edits | ||
| those workflows cannot widen its own `pull_request_target` token. | ||
| - Reviewer agents stay `edit: deny`. They judge; they do not implement. | ||
| - Sandbox helpers copy the workspace, drop secret environment values unless | ||
| explicitly allowlisted by **name**, and run subprocesses with `shell=False`. | ||
| - Logs and review receipts redact credential shapes (tokens, bearer values, | ||
| known provider prefixes). They do not mask operational PII that the | ||
| control plane must process. | ||
| - LLM and scheduled agents bind `NVIDIA_NIM_API_KEY` (env may be | ||
| `NVIDIA_API_KEY`). They never use `COPILOT_GITHUB_TOKEN`. Existing | ||
| review-agent key schemes stay unchanged. | ||
| - Rust remains the psychometric arithmetic owner. | ||
|
|
||
| ## Quality gates | ||
|
|
||
| `scripts/ci/` ships with 100% statement/branch coverage and 100% docstrings. | ||
| CI installs Python tools only with `pip install --require-hashes`. Contract | ||
| tests pin workflow structure and governance prose so drift fails closed. | ||
|
|
||
| ## Related durable documents | ||
|
|
||
| - [`docs/CWL-MASTER-CONTEXT.md`](docs/CWL-MASTER-CONTEXT.md) — mission and | ||
| ecosystem. | ||
| - [`docs/agent-github-project-protocol.md`](docs/agent-github-project-protocol.md) | ||
| — Project #1 operation. | ||
| - [`PR_GOVERNANCE_AUDIT.md`](PR_GOVERNANCE_AUDIT.md) — live review/merge | ||
| contract. | ||
| - [`docs/doctoring/review-agent-mention-surfaces.md`](docs/doctoring/review-agent-mention-surfaces.md) | ||
| — current increment's mention-surface decision and APA 7th citations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.