fix(host-service): green main — account-env test expectations + lint info from #6645

Closed
KI
3mo ago
+4-4

Main is currently red for every PR's Test and Lint jobs — both from #6645 as it landed (merge skew; its own CI predated the final shape).

What

  1. Test: resolveDefaultAccountEnv injects a SUPERSET_DEFAULT_CLAUDE_CONFIG_DIR twin alongside CLAUDE_CONFIG_DIR (so the wrapper can re-resolve a later account switch without clobbering a user-exported value), but the two buildTerminalAgentLaunch default account env expectations in agents.test.ts still expect the pre-twin command. Updated both — including the pin-beats-default case, where the twin is still expected to point at the host default while the user's pinned CLAUDE_CONFIG_DIR wins.
  2. Lint: the same merge left a FIXABLE useTemplate info in agent-wrappers-claude-codex-opencode.ts, and scripts/lint.sh fails on any diagnostic. Applied biome's fix.

Verified

  • bun test src/trpc/router/agents/agents.test.ts — 27 pass, 0 fail (was 25/2 on pristine 22691eadc)
  • bash scripts/lint.sh . — clean (was Found 1 info → exit 1)

Summary by cubic

Unblocks red CI by aligning test expectations with resolveDefaultAccountEnv now injecting SUPERSET_DEFAULT_CLAUDE_CONFIG_DIR alongside CLAUDE_CONFIG_DIR, and by applying a lint fix in the Claude wrapper. Previously tests expected only CLAUDE_CONFIG_DIR; now they expect both, with a pinned CLAUDE_CONFIG_DIR still winning while the twin points to the host default.

  • In packages/host-service/src/trpc/router/agents/agents.test.ts, update the two default account env expectations to include SUPERSET_DEFAULT_CLAUDE_CONFIG_DIR; in the pinned case, the twin still references the host default.
  • In packages/agent-setup/src/agent-wrappers-claude-codex-opencode.ts, replace string concatenation with a template literal per biome’s useTemplate rule; behavior is unchanged.

Summary by CodeRabbit

  • Bug Fixes
    • Improved Claude agent terminal launches by preserving the default configuration directory alongside any selected agent-specific configuration.
    • Ensured Claude wrapper command behavior remains consistent across supported launch scenarios.