fancive_obsidian-parallel-r.../tests
wujunchen 7986f1c308 fix: address codex review — drop false-positive fallback keywords, tighten stream-error detection
Two valid findings from an opposite-model (Codex) review of this branch:

- provider-request: drop bare `unknown`/`unrecognized` from the structured-output
  rejection keywords. They false-positive on model-name errors ("unknown model",
  "unrecognized model ID" from Ollama/Bedrock), triggering a wasted fallback
  retry. The specific feature tokens + bare `schema` still cover real structured-
  output rejections, so true-positive detection is unaffected.
- streaming: streamErrorMessage's OpenAI-style `{error:{...}}` branch now only
  treats the payload as an error when it carries a message/type, so a stray empty
  `error: {}` (or code-only object) in a normal chunk no longer aborts the stream.
  The Anthropic `{type:'error'}` branch still always signals an error.

Declined: Codex's suggestion to convert streaming's HTTP>=400 to ProviderApiError
+ add fallback — the streaming path always sends `structured:false`, so there is
no structured request to fall back from.

Tests updated/added: model-name 400s do not retry; empty/code-only error objects
do not throw.

Change-Id: I413d633c8ce7036365f97e2d8e1287c111e0902f
2026-06-16 10:05:04 +08:00
..
anchor.test.js perf: eliminate per-card document rescans and redundant hashing 2026-05-16 00:33:51 +08:00
architecture.test.js test: split architecture guard tests 2026-04-29 13:53:19 +08:00
backend-test.test.js fix: pass --verbose with stream-json for Claude CLI 2.1.131+ (#3) 2026-05-14 10:15:50 +08:00
cache.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
cards-nav.test.js refactor: split modules.test.js into 12 per-module test files 2026-04-27 15:21:03 +08:00
catalog.json fix: harden CLI backend smoke checks 2026-05-09 11:49:23 +08:00
cli.test.js style: apply biome formatter to cli.test.js 2026-05-14 10:19:46 +08:00
coverage-sourcemap.js test: add c8 coverage harness with source-map remapping 2026-05-16 00:22:31 +08:00
direct-batch.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-cache.test.js test: cover remaining branch gaps in cache.ts and markdown.ts 2026-05-16 00:24:33 +08:00
direct-generation.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-i18n.test.js fix: avoid stringifying locale objects 2026-05-20 13:23:56 +08:00
direct-markdown.test.js test: cover remaining branch gaps in cache.ts and markdown.ts 2026-05-16 00:24:33 +08:00
direct-prompt.test.js feat: provider/lifecycle robustness, onboarding nudge, CI coverage gate 2026-06-16 09:37:59 +08:00
direct-providers.test.js fix: address codex review — drop false-positive fallback keywords, tighten stream-error detection 2026-06-16 10:05:04 +08:00
direct-settings-extra.test.js Expand i18n language support 2026-05-19 13:12:11 +08:00
direct-settings.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-streaming.test.js fix: address codex review — drop false-positive fallback keywords, tighten stream-error detection 2026-06-16 10:05:04 +08:00
direct-test-setup.js test: add c8 coverage harness with source-map remapping 2026-05-16 00:22:31 +08:00
generation-job-manager.test.js feat: provider/lifecycle robustness, onboarding nudge, CI coverage gate 2026-06-16 09:37:59 +08:00
i18n.test.js Expand i18n language support 2026-05-19 13:12:11 +08:00
markdown.test.js refactor: split modules.test.js into 12 per-module test files 2026-04-27 15:21:03 +08:00
obsidian-mock.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
plugin-batch.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
providers.test.js refactor: split main.test.js into focused test files 2026-04-27 19:59:46 +08:00
schema.test.js fix: address 13 review findings (security, UX, i18n) 2026-05-02 12:50:35 +08:00
scroll.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
settings.test.js fix: harden CLI backend smoke checks 2026-05-09 11:49:23 +08:00
streaming.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
test-exports.test.js perf: eliminate per-card document rescans and redundant hashing 2026-05-16 00:33:51 +08:00
test-setup.js test: add c8 coverage harness with source-map remapping 2026-05-16 00:22:31 +08:00
vault-batch.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
view-render.test.js feat: toggle right sidebar instead of detaching tab + component tests 2026-05-02 15:38:41 +08:00