singularity-forge/src/tests
Jeremy 9fe13da3f2 fix(pi-coding-agent): resolve model fallback race that ignores configured provider (#3534)
Extension-provided models (e.g. claude-code/*) were unavailable during
findInitialModel() because pendingProviderRegistrations had not been
flushed yet, causing the fallback chain to select Google Gemini even
when the user explicitly configured claude-code as their default.

Three compounding issues fixed:

(A) Flush pendingProviderRegistrations in createAgentSession() before
    findInitialModel() runs, so extension models are in the registry
    when initial model selection happens.

(B) Re-apply the validated model to the session after
    validateConfiguredModel() in both print and interactive CLI paths.
    Previously, validation updated settingsManager but never called
    session.setModel(), leaving the session on the wrong model.

(C) Update defaultModelPerProvider.anthropic from "claude-opus-4-6[1m]"
    to "claude-opus-4-6" — the [1m] variant was removed from the model
    registry when the base model was upgraded to 1M context, causing the
    Anthropic fallback to silently fail and skip to Google.

Closes #3534
2026-04-05 07:14:24 -05:00
..
integration fix: add windowsHide to all web-mode subprocess spawns (#2628) (#3046) 2026-03-30 14:50:13 -06:00
app-smoke.test.ts fix(cli): let gsd update bypass version mismatch gate (#2845) 2026-03-27 14:30:13 -06:00
artifact-manager.test.ts refactor(test): replace try/finally with t.after() in src/tests (a-n) (#2394) 2026-03-24 21:30:00 -06:00
auto-budget.test.ts refactor: extract 7 focused modules from auto.ts (#898) 2026-03-17 11:03:01 -05:00
auto-mode-piped.test.ts fix: route gsd auto to headless runner to prevent hang on piped stdin/stdout (#3057) 2026-03-30 14:44:04 -06:00
auto-piped-io.test.ts fix: redirect auto-mode to headless when stdout is piped (#2732) (#3269) 2026-03-30 13:48:07 -06:00
auto-tool-tracking.test.ts refactor: extract 7 focused modules from auto.ts (#898) 2026-03-17 11:03:01 -05:00
bg-shell-persistence-cwd.test.ts fix(bg-shell): recover from deleted cwd in timers (#2850) 2026-03-27 09:54:31 -06:00
bg-shell-session-cleanup.test.ts refactor(test): replace try/finally with t.after() in src/tests (a-n) (#2394) 2026-03-24 21:30:00 -06:00
blob-store.test.ts refactor(test): replace try/finally with t.after() in src/tests (a-n) (#2394) 2026-03-24 21:30:00 -06:00
bridge-package-root.test.ts fix(web): use safePackageRootFromImportUrl for cross-platform package root (#1881) (#1893) 2026-04-05 07:43:46 -04:00
bundled-extension-paths.test.ts Fix packaging verification and path portability (#378) 2026-03-14 12:28:14 -06:00
create-gsd-extension-paths.test.ts fix(docs): use ~/.pi/agent/extensions/ for community extension install path (#3131) (#3259) 2026-03-30 13:50:25 -06:00
cross-platform-filesystem-safety.test.ts test: add cross-platform filesystem safety static analysis guard (#2541) 2026-03-26 09:24:45 -06:00
docker-template.test.ts perf(test): compile unit tests with esbuild, reclassify integration tests, fix node_modules symlink (#2809) 2026-03-27 14:51:49 -06:00
ensure-workspace-builds.test.ts fix: skip staleness rebuild in npm tarball installs (#2877) (#3250) 2026-03-30 14:17:02 -06:00
extension-discovery.test.ts refactor(test): replace try/finally with t.after() in src/tests (a-n) (#2394) 2026-03-24 21:30:00 -06:00
extension-load-perf.test.ts fix(perf): share jiti module cache across extension loads (#3308) 2026-04-05 07:59:17 -04:00
extension-model-validation.test.ts fix: defer model validation until after extensions register (#3089) 2026-03-30 14:38:10 -06:00
extension-smoke.test.ts fix: google-search OAuth test mock and Windows path separator in smoke test 2026-03-16 11:56:46 -06:00
fetch-test-helpers.ts test: fix Assertion Roulette, Eager Test, and contract test regressions (#1938) 2026-03-21 21:24:15 -06:00
file-watcher.test.ts fix: prevent ensureGitignore from adding .gsd when tracked in git (#1364) (#1367) 2026-03-19 17:06:01 -06:00
footer-component.test.ts feat: managed RTK integration with opt-in preference and web UI toggle (#2620) 2026-03-26 09:33:07 -06:00
google-search-auth.repro.test.ts fix: correct OAuth fallback request shape for google_search (#2963) (#3272) 2026-03-30 13:46:38 -06:00
google-search-oauth-shape.test.ts fix: correct OAuth fallback request shape for google_search (#2963) (#3272) 2026-03-30 13:46:38 -06:00
gsd-web-launcher-contract.test.ts feat(web): browser-based web interface (#1717) 2026-03-21 12:16:54 -06:00
headless-cli-surface.test.ts fix: Accept flags after positional command in headless arg parser 2026-03-27 15:49:16 -06:00
headless-detection.test.ts fix: headless mode exits early on progress notifications containing 'complete' (#879) (#888) 2026-03-17 09:11:34 -06:00
headless-events.test.ts fix(headless): match "completed" status from RPC v2 in exit code mapper 2026-03-27 17:04:31 -06:00
headless-progress.test.ts feat: stream full text and thinking output in headless verbose mode (#2934) 2026-03-27 21:57:11 -06:00
headless-v2-migration.test.ts fix(headless): skip execution_complete for multi-turn commands (auto/next) 2026-03-27 17:38:18 -06:00
initial-gsd-header-filter.test.ts feat(web): browser-based web interface (#1717) 2026-03-21 12:16:54 -06:00
llm-context-tavily.test.ts refactor(test): replace try/finally with t.after() in src/tests (a-n) (#2394) 2026-03-24 21:30:00 -06:00
marketplace-discovery.test.ts refactor(test): replace try/finally with t.after() in src/tests (a-n) (#2394) 2026-03-24 21:30:00 -06:00
mcp-client-oauth.test.ts feat(mcp-client): add OAuth auth provider for HTTP transport (#3295) 2026-04-05 01:05:10 -04:00
mcp-client-schema.test.ts fix(mcp): preserve args for mcp_call tool invocations (#1354) 2026-03-19 15:29:19 -06:00
mcp-server.test.ts fix: resolve CI failures in VS Code extension PR 2026-03-16 16:53:34 -05:00
native-search.test.ts fix(search): enforce hard search budget and survive context compaction 2026-03-25 21:35:09 -05:00
node-modules-symlink.test.ts refactor(test): replace try/finally with t.after() in src/tests (a-n) (#2394) 2026-03-24 21:30:00 -06:00
non-extension-library.test.ts refactor(test): replace try/finally with t.after() in src/tests (a-n) (#2394) 2026-03-24 21:30:00 -06:00
offline-mode.test.ts feat: complete offline mode support (#2429) 2026-03-24 22:35:45 -06:00
postinstall.test.ts feat: managed RTK integration with opt-in preference and web UI toggle (#2620) 2026-03-26 09:33:07 -06:00
provider-help-text.test.ts docs: add provider setup guide for third-party LLM providers (#3294) 2026-04-05 00:48:19 -04:00
provider-manager-remove.test.ts test(tui): update provider-manager tests for confirmation-based removal 2026-04-01 16:24:14 -05:00
provider.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
pty-chat-parser.test.ts fix: chat mode misrepresents terminal output, looks stuck, omits user messages (#3092) 2026-03-30 14:36:21 -06:00
read-tool-offset-clamp.test.ts fix(read-tool): clamp offset to file bounds instead of throwing (#3007) (#3042) 2026-03-30 14:48:01 -06:00
resolve-ts-loader.test.ts feat: managed RTK integration with opt-in preference and web UI toggle (#2620) 2026-03-26 09:33:07 -06:00
resource-loader-conflicts.test.ts fix(extensions): use bundledExtensionKeys for conflict detection instead of broken path heuristic (#3305) 2026-04-05 01:04:50 -04:00
resource-loader.test.ts fix(resource-sync): prune removed bundled subdirectory extensions on upgrade (#1972) 2026-04-05 07:44:51 -04:00
resource-sync-staleness.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
rtk-execution-seams.test.ts test(gsd): harden suite-level stability for RTK, worktree, and git bootstrap (#2786) 2026-03-26 20:02:41 -06:00
rtk-session-stats.test.ts feat: managed RTK integration with opt-in preference and web UI toggle (#2620) 2026-03-26 09:33:07 -06:00
rtk-test-utils.ts test(gsd): harden suite-level stability for RTK, worktree, and git bootstrap (#2786) 2026-03-26 20:02:41 -06:00
rtk.test.ts feat: managed RTK integration with opt-in preference and web UI toggle (#2620) 2026-03-26 09:33:07 -06:00
search-loop-guard.test.ts fix(search): enforce hard search budget and survive context compaction 2026-03-25 21:35:09 -05:00
search-provider-command.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
search-tavily.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
secret-scan.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
security-overrides.test.ts fix(security): add configurable overrides for command allowlist and SSRF blocklist 2026-04-02 13:45:05 +02:00
startup-model-validation.test.ts fix(pi-coding-agent): resolve model fallback race that ignores configured provider (#3534) 2026-04-05 07:14:24 -05:00
startup-perf.test.ts perf: startup optimizations — pre-compiled extensions, compile cache, batch discovery (#2125) 2026-03-23 10:02:30 -06:00
tavily-helpers.test.ts test: fix Assertion Roulette, Eager Test, and contract test regressions (#1938) 2026-03-21 21:24:15 -06:00
terminal-cmux.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
token-counter.test.ts feat: add GitHub API client, diff-aware context, tiktoken token counting 2026-03-16 13:50:00 -05:00
tool-bootstrap.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
ttsr-manager.test.ts fix: add barrel files for remote-questions, ttsr, and shared extensions (#1048) 2026-03-17 18:48:32 -06:00
ttsr-rule-loader.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
tui-non-tty-render-loop.test.ts fix: skip TUI render loop on non-TTY stdout to prevent CPU burn (#3095) (#3263) 2026-03-30 13:49:55 -06:00
update-check.test.ts refactor(test): replace try/finally with t.after() in src/tests (o-z) (#2392) 2026-03-24 21:30:29 -06:00
url-utils.test.ts refactor(test): consolidate regression and override tests into #666 test files 2026-04-02 14:06:19 +02:00
web-subprocess-runner.test.ts refactor(web): consolidate subprocess boilerplate into shared runner (#1899) 2026-04-05 07:44:32 -04:00
welcome-screen.test.ts feat(splash): add remote channel indicator to welcome screen tools row 2026-03-28 12:38:33 -05:00
xterm-theme.test.ts fix(web): improve light theme terminal contrast (#2819) 2026-03-27 14:47:44 -06:00