Conversation
|
Blocked pending a released OpenCode run: passing generated-string tests does not establish that the returned hooks are discovered or invoked. Install the plugin, open two repositories, then trigger a session, file edits and a commit in each; verify the active directory, single refresh invocation and bounded completion of the awaited update and pre-commit commands. The local 18-test result establishes template output only. |
|
This no longer merges into git fetch origin && git merge origin/staging
# resolve, then
uv run pytest tests/ -q
uv run ruff check code_review_graph/
uv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional
git pushWhen resolving:
A large integration branch landed on PRs now target |
|
This no longer merges into All of it is prose, so taking staging's text and re-applying your lines on top should be the whole job. git fetch origin
git merge origin/staging
# resolve, then
uv run pytest tests/ -q
uv run ruff check code_review_graph/
uv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional
git pushI have not reviewed the change itself yet. That comes once it merges and the checks run against the merged state, since staging has moved a long way and the result is what matters. |
Pull Request
Linked issue
Closes #947
What & why
OpenCode's current plugin API calls a plugin factory with its context and expects the factory to
return a hooks object. The generated CRG plugin instead called the removed
app.on(...)API, soOpenCode failed to load it on every startup and none of its three behaviors registered.
This change:
file.editedandsession.createdthrough OpenCode's genericeventhook;tool.execute.beforehook and reads the currentinput.tool/output.args.commandarguments;helper that would have escaped a whole command as one executable name;
directorythrough--repoon every command, so a global plugin cannotupdate or query the process cwd or another repository;
app.on(and pins the returned-hooks shape.console.logstatus remains user-visible console output; this PR does not claim or add model-contextinjection.
Because the plugin now loads for the first time, its existing per-file update behavior and awaited
pre-commit analysis are also live for the first time. Debouncing updates and bounding pre-commit
latency are follow-up hardening work, not changes to this compatibility fix; the anchored
git commitmatcher is likewise preserved from the existing generator.How it was tested
Runtime checks on OpenCode 1.18.25:
status,update --skip-flows, anddetect-changes --brief;no
app.on is not a functionload error occurred;PATHwith a status canary and confirmed the status line appears in theopencode runconsole;as
status --repo <active-directory>.The full suite on Windows reported
2,914 passed, 60 failed, 21 skipped, 2 xpassed. The failures areoutside the touched OpenCode generator/tests and are Windows/environment cases (path separator
expectations, unavailable symlink privilege, WSL
/bin/bash, and file-mode behavior). The focusedOpenCode suite, package lint, type check, and live client checks are green.
Checklist
uv run pytest tests/ --tb=short -q— Windows/environment failures disclosed aboveuv run ruff check code_review_graph/uv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optionalCHANGELOG.mdand generator docstring/comments)