Decide how the plugin is verified: unit tests against a mocked fastCRW (framework choice), where and how the three runtime checks run (built-in provider removal, throwing setup, websearch.provider vs editor.default.set precedence, plus install-by-name from the Gitea registry), and the PR check workflow (npm run check + tests) on Gitea Actions. The release workflow itself is already decided.
Map: #1
## Question
Decide how the plugin is verified: unit tests against a mocked fastCRW (framework choice), where and how the three runtime checks run (built-in provider removal, throwing `setup`, `websearch.provider` vs `editor.default.set` precedence, plus install-by-name from the Gitea registry), and the PR check workflow (`npm run check` + tests) on Gitea Actions. The release workflow itself is already decided.
Resolved with the user (all recommendations accepted; runner label ubuntu-latest).
Framework: built-in node --test over test/*.test.ts (Node 24 native type stripping; needs Node >=22.18 in dev/CI). No framework dependency. Plugin engines.node >=20 unaffected.
Layout:src/config.ts (resolve/validate options + env), src/search.ts (request, mapping, errors; fetch as a parameter), src/index.ts (Plugin.define wiring only).
Unit tests (mocked fetch, no HTTP server): precedence options > env > default; each validation throw; limit clamp/fallback; request body/headers (Bearer only when a key exists, lang/tbs omitted when unset); both response shapes; every error path from the result-mapping ticket; abort passthrough; the 30 s timeout.
Runtime checks (manual, once, real opencode v2): (1) built-in providers removable/disableable, (2) throwing setup disables only this plugin, (3) config websearch.provider vs editor.default.set precedence, (4) install-by-name from the Gitea registry with a scoped .npmrc. Results and opencode version recorded in docs/runtime-checks.md. A failed check reopens the design via a new ticket on this map.
Smoke test:npm run smoke runs one real search using CRW_API_URL/CRW_API_KEY, prints shape and results; manual, never in CI. First run records the real response shape (data[] vs data.results) in docs/runtime-checks.md.
PR workflow:.gitea/workflows/check.yml on pull_request to main, runner ubuntu-latest, Node 24: npm ci, npm run check, npm test, npm run build. The workflow's status is then added as a required check on main.
Pre-commit hooks: none; CI enforces formatting, types and tests.
Resolved with the user (all recommendations accepted; runner label `ubuntu-latest`).
- **Framework:** built-in `node --test` over `test/*.test.ts` (Node 24 native type stripping; needs Node >=22.18 in dev/CI). No framework dependency. Plugin `engines.node >=20` unaffected.
- **Layout:** `src/config.ts` (resolve/validate options + env), `src/search.ts` (request, mapping, errors; `fetch` as a parameter), `src/index.ts` (`Plugin.define` wiring only).
- **Unit tests (mocked `fetch`, no HTTP server):** precedence options > env > default; each validation throw; `limit` clamp/fallback; request body/headers (Bearer only when a key exists, `lang`/`tbs` omitted when unset); both response shapes; every error path from the result-mapping ticket; abort passthrough; the 30 s timeout.
- **Runtime checks (manual, once, real opencode v2):** (1) built-in providers removable/disableable, (2) throwing `setup` disables only this plugin, (3) config `websearch.provider` vs `editor.default.set` precedence, (4) install-by-name from the Gitea registry with a scoped `.npmrc`. Results and opencode version recorded in `docs/runtime-checks.md`. A failed check reopens the design via a new ticket on this map.
- **Smoke test:** `npm run smoke` runs one real search using `CRW_API_URL`/`CRW_API_KEY`, prints shape and results; manual, never in CI. First run records the real response shape (`data[]` vs `data.results`) in `docs/runtime-checks.md`.
- **PR workflow:** `.gitea/workflows/check.yml` on `pull_request` to `main`, runner `ubuntu-latest`, Node 24: `npm ci`, `npm run check`, `npm test`, `npm run build`. The workflow's status is then added as a required check on `main`.
- **Pre-commit hooks:** none; CI enforces formatting, types and tests.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Map: #1
Question
Decide how the plugin is verified: unit tests against a mocked fastCRW (framework choice), where and how the three runtime checks run (built-in provider removal, throwing
setup,websearch.providervseditor.default.setprecedence, plus install-by-name from the Gitea registry), and the PR check workflow (npm run check+ tests) on Gitea Actions. The release workflow itself is already decided.Resolved with the user (all recommendations accepted; runner label
ubuntu-latest).node --testovertest/*.test.ts(Node 24 native type stripping; needs Node >=22.18 in dev/CI). No framework dependency. Pluginengines.node >=20unaffected.src/config.ts(resolve/validate options + env),src/search.ts(request, mapping, errors;fetchas a parameter),src/index.ts(Plugin.definewiring only).fetch, no HTTP server): precedence options > env > default; each validation throw;limitclamp/fallback; request body/headers (Bearer only when a key exists,lang/tbsomitted when unset); both response shapes; every error path from the result-mapping ticket; abort passthrough; the 30 s timeout.setupdisables only this plugin, (3) configwebsearch.providervseditor.default.setprecedence, (4) install-by-name from the Gitea registry with a scoped.npmrc. Results and opencode version recorded indocs/runtime-checks.md. A failed check reopens the design via a new ticket on this map.npm run smokeruns one real search usingCRW_API_URL/CRW_API_KEY, prints shape and results; manual, never in CI. First run records the real response shape (data[]vsdata.results) indocs/runtime-checks.md..gitea/workflows/check.ymlonpull_requesttomain, runnerubuntu-latest, Node 24:npm ci,npm run check,npm test,npm run build. The workflow's status is then added as a required check onmain.