Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9e3b718
experiment: add pinned Graphify review graph
seonghobae Sep 9, 2026
65b33a8
experiment: add pinned Graphify review graph
seonghobae Sep 9, 2026
4351992
Merge remote-tracking branch 'origin/codex/graphify-opencode-owner' i…
seonghobae Sep 9, 2026
7e00e89
fix(review): verify Graphify runtime contract
seonghobae Sep 9, 2026
4ddc23a
test(review): follow central OpenCode config
seonghobae Sep 9, 2026
bff8ba0
Merge remote-tracking branch 'origin/codex/graphify-opencode-owner' i…
seonghobae Sep 9, 2026
1a07073
test(review): permit prepared Graphify MCP
seonghobae Sep 9, 2026
2f38fc6
fix(opencode): permit governed network MCP contracts
seonghobae Sep 9, 2026
cb277ea
test(opencode): align governed network MCP gate
seonghobae Sep 9, 2026
985e333
fix(review): preserve centralized OpenCode budgets
seonghobae Sep 9, 2026
45a90c0
Merge branch 'codex/graphify-opencode-owner' of https://github.com/Co…
seonghobae Sep 9, 2026
49e2490
fix(review): validate Graphify wheel lock changes
seonghobae Sep 9, 2026
4833e6c
docs(gap): trace Graphify review ownership
seonghobae Sep 9, 2026
110a8ed
fix(codeql): preserve active exact dispatch
seonghobae Sep 9, 2026
866b369
revert: keep CodeQL repair in its owner PR
seonghobae Sep 9, 2026
f6e87ff
fix(opencode): sequence Graphify MCP handshake
seonghobae Sep 9, 2026
d919519
fix(opencode): remove direct provider policy duplicates
seonghobae Sep 9, 2026
1a3630f
fix(opencode): align quick gate with gateway ownership
seonghobae Sep 9, 2026
f763fbd
fix(opencode): enforce gateway-only model launcher
seonghobae Sep 12, 2026
36759b5
merge(main): preserve current review contracts
seonghobae Sep 12, 2026
68daf0f
fix(ci): admit OpenCode policy changes
seonghobae Sep 12, 2026
d075aab
fix: advance review sidecar past final-synthesis failure
seonghobae Sep 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 26 additions & 121 deletions .github/workflows/opencode-review-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2594,6 +2594,21 @@ jobs:
"${install_dir}/opencode" --version
echo "$install_dir" >>"$GITHUB_PATH"

- name: Install pinned Graphify review tool
env:
GRAPHIFY_VENV: ${{ runner.temp }}/opencode-graphify-venv
run: |
set -euo pipefail
python3 -m venv "$GRAPHIFY_VENV"
Comment thread
seonghobae marked this conversation as resolved.
"$GRAPHIFY_VENV/bin/python" -m pip install \
--disable-pip-version-check \
--require-hashes \
--only-binary=:all: \
-r requirements-opencode-graphify-hashes.txt
"$GRAPHIFY_VENV/bin/graphify" --help >/dev/null
"$GRAPHIFY_VENV/bin/graphify-mcp" --help >/dev/null
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
Comment thread
seonghobae marked this conversation as resolved.
Outdated
echo "$GRAPHIFY_VENV/bin" >>"$GITHUB_PATH"

- name: Detect central review-process scope
id: central_review_process_fallback_scope
if: needs.coverage-evidence.result == 'success'
Expand Down Expand Up @@ -3544,6 +3559,7 @@ jobs:

- name: Prepare isolated OpenCode review workspace
env:
GRAPHIFY_VENV: ${{ runner.temp }}/opencode-graphify-venv
OPENCODE_REVIEW_WORKDIR: ${{ runner.temp }}/opencode-review-project
OPENCODE_EVIDENCE_FILE: ${{ runner.temp }}/opencode-review-evidence.md
OPENCODE_FAILED_CHECK_EVIDENCE_FILE: ${{ runner.temp }}/opencode-failed-check-evidence.md
Expand Down Expand Up @@ -3891,129 +3907,18 @@ jobs:
cp "$GITHUB_WORKSPACE/ci-review-prompt.md" "${OPENCODE_REVIEW_WORKDIR}/ci-review-prompt.md"
cp "$GITHUB_WORKSPACE/code-reviewer-prompt.md" "${OPENCODE_REVIEW_WORKDIR}/code-reviewer-prompt.md"

jq -n '{
"$schema": "https://opencode.ai/config.json",
"model": "contextual-orchestrator/orchestrator/free",
"small_model": "contextual-orchestrator/orchestrator/free",
"enabled_providers": ["contextual-orchestrator"],
"lsp": false,
"mcp": {},
"permission": {
"edit": "deny",
"bash": "deny",
"read": "allow",
"grep": "allow",
"glob": "allow",
"list": "allow",
"task": "deny",
"webfetch": "deny",
"websearch": "deny",
"lsp": "deny",
"external_directory": "deny"
},
"agent": {
"ci-review": {
"description": "Thorough read-only CI pull request reviewer",
"mode": "primary",
"prompt": "{file:./ci-review-prompt.md}",
"steps": 100,
"permission": {
"edit": "deny",
"bash": "deny",
"read": "allow",
"grep": "allow",
"glob": "allow",
"list": "allow",
"task": "deny",
"webfetch": "deny",
"websearch": "deny",
"lsp": "deny",
"external_directory": "deny"
}
},
"ci-review-fallback": {
"description": "Expanded read-only CI pull request reviewer fallback",
"mode": "primary",
"prompt": "{file:./ci-review-prompt.md}",
"steps": 150,
"permission": {
"edit": "deny",
"bash": "deny",
"read": "allow",
"grep": "allow",
"glob": "allow",
"list": "allow",
"task": "deny",
"webfetch": "deny",
"websearch": "deny",
"lsp": "deny",
"external_directory": "deny"
}
},
"code-reviewer": {
"description": "Use this subagent immediately after code changes, before opening or merging a PR, or when asked to review a diff. Reviews only; never edits code. Focuses on correctness, security, maintainability, tests, and production risk.",
"mode": "subagent",
"prompt": "{file:./code-reviewer-prompt.md}",
"steps": 100,
"color": "#7c3aed",
"permission": {
"edit": "deny",
"read": "allow",
"grep": "allow",
"glob": "allow",
"bash": "deny",
"list": "allow",
"task": "deny",
"webfetch": "deny",
"websearch": "deny",
"lsp": "deny",
"external_directory": "deny"
}
}
},
"provider": {}
}' >"${OPENCODE_REVIEW_WORKDIR}/opencode.jsonc"

gateway_config="${OPENCODE_REVIEW_WORKDIR}/opencode.gateway.jsonc"
jq '
.model = "contextual-orchestrator/orchestrator/free" |
.small_model = "contextual-orchestrator/orchestrator/free" |
.enabled_providers = ["contextual-orchestrator"] |
.provider = {
"contextual-orchestrator": {
"npm": "@ai-sdk/openai-compatible",
"name": "Contextual Orchestrator",
"options": {
"baseURL": "{env:CONTEXTUAL_ORCHESTRATOR_BASE_URL}",
"apiKey": "{env:CONTEXTUAL_ORCHESTRATOR_TOKEN}"
},
"models": {
"orchestrator/free": {
"name": "Orchestrator Free (ZDR-first zero-cost pool)",
"tool_call": true,
"reasoning": true,
"options": {
"reasoningEffort": "high"
},
"variants": {
"high": {
"reasoningEffort": "high"
}
},
"limit": {
"context": 200000,
"output": 32768
}
}
}
}
}
' "${OPENCODE_REVIEW_WORKDIR}/opencode.jsonc" >"$gateway_config"
mv -- "$gateway_config" "${OPENCODE_REVIEW_WORKDIR}/opencode.jsonc"
"$GRAPHIFY_VENV/bin/graphify" extract "$OPENCODE_SOURCE_WORKDIR" \
--code-only \
--no-cluster \
--out "$OPENCODE_REVIEW_WORKDIR"
test -s "${OPENCODE_REVIEW_WORKDIR}/graphify-out/graph.json"

cp "$GITHUB_WORKSPACE/opencode.jsonc" "${OPENCODE_REVIEW_WORKDIR}/opencode.jsonc"
Comment thread
seonghobae marked this conversation as resolved.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Comment thread
seonghobae marked this conversation as resolved.

if ! grep -Fq 'contextual-orchestrator/orchestrator/free' "${OPENCODE_REVIEW_WORKDIR}/opencode.jsonc" \
|| ! grep -Fq 'CONTEXTUAL_ORCHESTRATOR_BASE_URL' "${OPENCODE_REVIEW_WORKDIR}/opencode.jsonc"; then
echo '::error::Generated isolated opencode.jsonc is missing the contextual-orchestrator gateway route.'
|| ! grep -Fq 'CONTEXTUAL_ORCHESTRATOR_BASE_URL' "${OPENCODE_REVIEW_WORKDIR}/opencode.jsonc" \
|| ! grep -Fq 'graphify-out/graph.json' "${OPENCODE_REVIEW_WORKDIR}/opencode.jsonc"; then
echo '::error::Central opencode.jsonc is missing its required gateway or Graphify route.'
exit 1
fi
printf 'Prepared isolated OpenCode review workspace: %s\n' "$OPENCODE_REVIEW_WORKDIR"
Expand Down
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Organization edge runtimes use Cloudflare Pingora. Do not add or preserve active
Semgrep hosted scans bind one job-level `SEMGREP_IMAGE` digest for log evidence, manifest inspection, and `docker run`. See [`docs/doctoring/semgrep-image-digest-single-source.md`](docs/doctoring/semgrep-image-digest-single-source.md).
OpenCode may repair only trusted `path:line` bindings on LLM probes that already carry an independent proof and source-line digest. See [`docs/doctoring/opencode-llm-review-publication.md`](docs/doctoring/opencode-llm-review-publication.md).

`opencode.jsonc` is the single OpenCode policy source. The privileged review
workflow copies it into the isolated workspace; do not recreate the config in
YAML or add a sibling `opencode.json`. Graphify must be installed from
`requirements-opencode-graphify-hashes.txt`, run only on the exact PR head with
`--code-only --no-cluster`, and serve only the resulting local
`graphify-out/graph.json` through `graphify-mcp`. A missing install, graph, or
MCP startup is failed evidence, not permission to use an unpinned installer or
send PR content to an external model. Reproduction details are in
[`docs/pr-review-and-merge-procedure.md`](docs/pr-review-and-merge-procedure.md).

Central review routes through the vendored **contextual-orchestrator** gateway
sidecar (`scripts/ci/contextual_orchestrator_review_sidecar.sh`). The five
provider secrets (`BYTEZ_API_KEY`, `NVIDIA_NIM_API_KEY`,
Expand Down
7 changes: 7 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ configuring any such loop.
The repo/Project — not private agent memory — is the source of truth. This file complements those
documents; it does not replace them.

OpenCode review configuration has one source: `opencode.jsonc`. Graphify is
installed from the dedicated hash lock, builds a local code-only graph from the
exact PR head, and serves only that artifact through the configured MCP. Do not
add `.opencode/opencode.json`, an inline workflow copy, unpinned `uvx`,
document/media extraction, or an external Graphify model path. Reproduction and
failure handling live in `docs/pr-review-and-merge-procedure.md`.

## What this repository is

This is the ContextualWisdomLab **organization-wide `.github` special repository**. It has three roles:
Expand Down
23 changes: 23 additions & 0 deletions docs/pr-review-and-merge-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,29 @@ so mechanical branch updates, stale-thread resolution, and merges use the
configured central mutation credential while the trusted implementation still
comes from the central repository.

### Reproduce the Graphify review boundary

The central `opencode.jsonc` is copied unchanged into the isolated review
workspace. Graphify is installed in a runner-temporary virtual environment
from `requirements-opencode-graphify-hashes.txt`; regenerate that lock only
with `./scripts/ci/compile_opencode_graphify_lock.sh`. The workflow then runs
`graphify extract <exact-head-worktree> --code-only --no-cluster --out
<isolated-review-workspace>` and requires a non-empty
`graphify-out/graph.json` before OpenCode starts. This keeps AST extraction
local, excludes document and media semantic passes, and prevents PR package
scripts from becoming executable setup input.

To diagnose a failure, verify the dependency lock installs with
`--require-hashes --only-binary=:all:`, run the same extraction against a
detached exact-head worktree, and start `graphify-mcp
graphify-out/graph.json`. A missing wheel, extraction failure, empty graph, or
MCP startup failure is a failed review prerequisite. Do not replace it with
`uvx`, a floating package version, an inline OpenCode config, or an external
LLM-backed extraction.

Reference: Graphify Labs. (2026). *Graphify* (Version 0.9.56) [Computer
software]. GitHub. https://github.com/Graphify-Labs/graphify/tree/v0.9.56

The scheduler dispatches same-head Strix evidence first, then dispatches
OpenCode for the same PR head when review evidence is missing or stale. This
avoids running PR-head review, CodeGraph, coverage, or PoC code as an
Expand Down
8 changes: 7 additions & 1 deletion opencode.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
"small_model": "contextual-orchestrator/orchestrator/free",
"enabled_providers": ["contextual-orchestrator"],
"lsp": false,
"mcp": {},
"mcp": {
"graphify": {
"type": "local",
"command": ["graphify-mcp", "graphify-out/graph.json"],
"enabled": true
}
},
"permission": {
"edit": "deny",
"bash": "deny",
Expand Down
Loading
Loading