Skip to content

fix(consumer): propagate managed Jarvis backend config#806

Merged
artemgetmann merged 1 commit into
mainfrom
codex/managed-utilities-runtime-config-20260528
May 28, 2026
Merged

fix(consumer): propagate managed Jarvis backend config#806
artemgetmann merged 1 commit into
mainfrom
codex/managed-utilities-runtime-config-20260528

Conversation

@artemgetmann
Copy link
Copy Markdown
Owner

Review Fast Path

  • User path fixed: Activate Jarvis -> Managed Telegram setup now persists managed backend config so managed utilities route through Jarvis instead of local BYOK fallback.
  • Proof: Swift activation/setup tests passed; Node managed-client/config/secret tests passed in focused runs.
  • Shared-state footgun removed: account token stays in macOS Keychain and config stores only an exec SecretInput ref for runtime resolution.
  • Still hurts: no live Telegram proof; shared/default runtime was intentionally not touched.

Why This Matters

Managed Telegram bots need Jarvis backend routing for Firecrawl, Brave Search, Google Places, and Gemini image. Before this, onboarding could save Telegram config without the Jarvis managed mode/base URL/token bridge the Node runtime needs.

Scope Boundary

  • Changed Swift activation/setup persistence for Jarvis managed config and keychain token refs.
  • Changed Node secret runtime collection for jarvis.backend.accessToken and jarvis.backend.accountAccessToken.
  • Changed managed utility auth to use the resolved account token when no backend token is configured.
  • Did not change PR fix(jarvis): restore managed telegram bootstrap flow #802/bootstrap behavior.
  • Did not touch or restart shared/default runtime.

Verification

  • pnpm install passed in this worktree.
  • pnpm vitest run --config vitest.unit.config.ts --pool=forks src/consumer/jarvis-backend-client.test.ts --maxWorkers 1 passed: 7 tests.
  • pnpm vitest run --config vitest.unit.config.ts --pool=forks src/consumer/jarvis-backend-client.test.ts src/consumer/gemini-image-generation.test.ts src/consumer/google-places-search.test.ts src/config/config.jarvis.test.ts --maxWorkers 2 passed: 4 files, 16 tests.
  • pnpm vitest run --config vitest.unit.config.ts --pool=forks src/secrets/runtime.test.ts -t "resolves Jarvis backend token refs" --maxWorkers 1 passed: 1 test, 60 skipped.
  • pnpm vitest run --config vitest.unit.config.ts --pool=forks test/scripts/verify-public-package-secrets.test.ts --maxWorkers 1 passed: 3 tests.
  • cd apps/macos && swift test --filter JarvisAccountActivationTests passed: 6 tests.
  • cd apps/macos && swift test --filter TelegramSetupBootstrapTests passed: 19 tests.
  • git diff --check passed.

Known Test Runner Note

  • The repo pnpm test -- ... parallel wrapper hung after one shard in this worktree, so I killed that test process and reran the same coverage as split direct Vitest commands.
  • A combined direct Vitest run over all requested files also stayed silent for roughly two minutes, so I killed it and kept the split passing evidence above.

AI Assistance

  • AI-assisted
  • Testing degree: targeted

- What: persist managed Jarvis backend config and keychain-backed account token refs during activation and managed Telegram setup.
- What: resolve Jarvis SecretInput refs in the Node runtime snapshot and allow managed utility calls to use the resolved account token.
- Why: managed Telegram bots need Firecrawl, Brave Search, Google Places, and Gemini image calls routed through Jarvis instead of local BYOK fallback.
- Risk: changes token resolution and managed utility auth; covered by focused Swift and Node tests, with no shared runtime touched.
@artemgetmann artemgetmann marked this pull request as ready for review May 28, 2026 10:28
@artemgetmann artemgetmann merged commit abb4ed6 into main May 28, 2026
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant