Skip to content

fix(core): align command reload pipeline and repair plugin fixture - #39171

Merged
kitlangton merged 2 commits into
v2from
command-align
Jul 27, 2026
Merged

kitlangton merged 2 commits into
v2from
command-align

Conversation

@kitlangton

@kitlangton kitlangton commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

What

Two repairs in the config-reload area:

  1. Aligns the command reload pipeline (feat(core): reload commands from config change feed #39160) with the refinements that landed in the agent plugin (feat(core): reload agents from config change feed #39167), so both config.changes consumers share one shape.
  2. Fixes the long-red PluginSupervisor config > reloads an auto-discovered plugin when its file changes test: the consolidation refactor (8db7487) moved @opencode-ai/plugin's entrypoint from src/index.ts to src/promise/index.ts, and this test generates its plugin in a tmpdir where the bare package specifier cannot resolve — the absolute file URL it builds pointed at the deleted path, so the plugin never loaded. One-line path fix; the reload mechanism itself was never broken.

How

  • ConfigCommandPlugin: one merged trigger stream (Stream.merge(sourceChanges, configUpdates) → one debounce → one runForEach) replaces the two separate forks, eliminating duplicate load() scans on correlated bursts and the stale-scan overwrite window on loaded.documents.
  • isCommandSource uses FSUtil.contains (Windows-robust, same helper Config's reconcile uses) driven by a sourceDirectories constant.
  • command.test.ts drops its inline settle/advance/drain copies in favor of test/lib/clock.ts from feat(core): reload agents from config change feed #39167, and renames the Config.Test binding to configTest to stop shadowing the bun:test import.
  • plugin.test.ts: mutablePlugin imports ../../../plugin/src/promise/index.ts.

Testing

  • Command + agent matrices: 21/21, stable across 5 consecutive runs.
  • test/config/plugin.test.ts: 11/11 (previously 10/11), stable across 3 consecutive runs — this removes the last inherited test/config failure from base CI.
  • bun typecheck clean.

@kitlangton kitlangton changed the title refactor(core): align command reload pipeline with agent plugin fix(core): align command reload pipeline and repair plugin fixture Jul 27, 2026
@kitlangton
kitlangton merged commit 1b39d36 into v2 Jul 27, 2026
9 of 11 checks passed
@kitlangton
kitlangton deleted the command-align branch July 27, 2026 19:29
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant