Skip to content

docs(manual): setup.md mode A can't wire the mock provider it tells testers to use #4105

Closed

Description

@yannickmonney

Summary

services/platform/tests/manual/setup.md mode A ("Deterministic, offline (mock gateway)") can't be followed to a working chat. It says that to chat on a wizard or API-minted org you "add the mock provider's credential under Settings → AI providers first (or mint the org via save-auth-state.ts, which seeds it)".

Neither step works:

  • Settings doesn't offer the mock. Add credential has no E2E Mock Gateway until providers/e2e-mock.yml is copied into that org's config directory, a step the doc never names.
  • save-auth-state.ts doesn't seed it. The script never seeds a provider.

So every mode-A chat box is blocked for a tester who follows the setup file. That includes CHAT-F19, and CHAT-F57/CHAT-F58, whose e2e:empty, e2e:length and e2e:stream-error triggers #4012 added to this same file's trigger table today.

The same paragraph also describes the fixture's connector catalog as "a symlink to the real builtin-configs/connectors". That link, and default/token-sources, have dangled since #2857 removed builtin-configs/ (2026-07-29).

Source and environment

  • Source: origin/main b7d1c1d7ef1b6755fad8a75da122159d8d3a6138.
  • Environment: a local mode-A stack started exactly as setup.md §1.A says, owned by the TALE-358 local-qa occurrence 2026-10-03 00:15 Zurich, run 820db997-15c0-43a4-a678-23bd1714628f:
    • bun lib/mocks/start.ts on 127.0.0.1:4141;
    • bun scripts/dev.ts with TALE_CONFIG_DIR set to a copy of tests/e2e/fixtures/config and TALE_CONFIG_BUILTIN_DIR to its default/, plus TALE_PROVIDER_KEY_E2E_MOCK;
    • backend 127.0.0.1:3656, Vite localhost:3651, this occurrence's own PostgreSQL 127.0.0.1:55370;
    • headless Chromium 145 (Playwright 1.58.2); synthetic accounts.

Impact

A human or AI tester can't start any mode-A chat round from the setup contract. The manual layer says every guide "assumes the environment … this file produces", so the chat suite's mode-A boxes are effectively unrunnable without reading test code. This round needed tests/docs-screenshots/seed-demo-org.ts:969-1070 and the fixture file's own header comment to find the missing step.

Stale statements (setup.md at b7d1c1d7e)

  1. L60-66: "To chat in mode A on a wizard org, add the mock provider's credential under Settings → AI providers first."
    • The vendor catalog doesn't offer E2E Mock Gateway until the provider file is in the org's config dir; see reproduction A below.
    • The fixture's own header says so (tests/e2e/fixtures/config/default/providers/e2e-mock.yml:3-8): "the interim org scaffolder seeds only the domains in lib/shared/config/registry.ts — which exclude providers — so e2e orgs do NOT pick this up automatically yet; a chat e2e rebuild must copy it into the worker org's config dir and connect an env credential (TALE_PROVIDER_KEY_E2E_MOCK), the same two moves tests/docs-screenshots/seed-demo-org.ts makes for the docs org."
  2. L65-66: "(or mint the org via save-auth-state.ts, which seeds it)." tests/manual/scripts/save-auth-state.ts:105-111 only signs up, runs the wizard and waits for the starter project. It copies no provider file and creates no credential.
  3. L49-53: every new org "scaffolds from the hermetic fixtures (the e2e-mock provider, the E2E Assistant agent)", and save-auth-state.ts "wait[s] for 'E2E Assistant'".
    • The provider isn't scaffolded (see 1).
    • The wait is now for the starter project (tests/e2e/helpers/auth.ts:196-221).
  4. L57-58: "The connector catalog in the fixtures is a symlink to the real builtin-configs/connectors."
    • tests/e2e/fixtures/config/default/connectors → ../../../../../../../builtin-configs/integrations and default/token-sources → …/builtin-configs/token-sources both dangle, because feat(platform): rewrite the AI backend on a minimal YAML-config core #2857 (2743ee48e) deleted builtin-configs/.
    • The catalog still renders: Add credential on Settings › Connectors lists Confluence … WebDAV. So the links are dead weight and the sentence is wrong.

Deterministic reproduction

The probe is scripts/c3-provider-catalog.ts, retained with its log and screenshots in the TALE-358 evidence archive TALE-358-local-qa-r20261003T0015-evidence.tar.gz.

  1. Start mode A as in setup.md §1.A. Sign up and create an org (the API door the e2e helpers use, or the wizard), then wait for the scaffold.
  2. Open Settings → AI providers → Add credential.
    • Observed (A): the catalog lists Anthropic, Azure OpenAI, DeepSeek, Gemini, Moonshot AI (Kimi), Nous Portal (Hermes), OpenAI, OpenRouter, Qwen (Alibaba), SpaceXAI, Vercel AI Gateway and Z.ai (GLM). There is no E2E Mock Gateway (mockOffered: 0).
  3. Copy tests/e2e/fixtures/config/default/providers/e2e-mock.yml to $TALE_CONFIG_DIR/<org-slug>/providers/e2e-mock.yml, then reopen Add credential.
    • Observed (B): E2E Mock Gateway is offered (mockOffered: 1).
  4. With it connected as an env credential (E2E_MOCK), mode-A chat works.
    • Control: in the same round, CHAT-F57 (e2e:empty, e2e:length), CHAT-F19 (e2e:error) and a plain prompt all behaved as their boxes say, in EN, DE and FR.

Expected

setup.md mode A names every step needed to chat on a fresh org, or a script it points to performs them. Its descriptions of the fixtures match the tree.

Acceptance checks

  1. The provider wiring works from the doc. Either setup.md §1.A documents both moves (copy providers/e2e-mock.yml into tests/e2e/fixtures/config/<org-slug>/providers/, then add an env credential named E2E_MOCK under Settings → AI providers), or save-auth-state.ts performs them the way seed-demo-org.ts does, and the doc says so.
  2. L49-53 and L65-66 are corrected: what scaffolds, and what save-auth-state.ts waits for and seeds.
  3. The dangling links are resolved: default/connectors and default/token-sources are removed or repointed, and L57-58 describe the real catalog source.
  4. The gates stay green: bun run lint:manual, and tests/manual/scripts/check-guide.ts on the touched guide.
  5. A fresh tester can run it: following only the setup file, a tester reaches a mock reply and can run CHAT-F57.

Limits

  • Checked on one local mode-A stack. Mode B (bun run dev) and mode C (docker:dev) weren't started, because this host has no Docker.
  • The connector-link point is documentation and tree hygiene only: the runtime catalog is unaffected (observed).

Activity

  1. added
    docs
    service: platform
    on Oct 2, 2026
  2. yannickmonney commented on Oct 4, 2026

    @yannickmonney
    ContributorAuthor

    Post-merge recheck of #4105 on main 33900e44f: passes. I recommend closing #4105.

    PR #4137 merged on 2026-10-03 at 17:02:51Z (merge commit 9fa2bf23e), at head a0b5c48a0. That is the head agent #3 reviewed and accepted (PR comment 5970266621). Its body refers to #4105 without a closing keyword, so the issue stayed open.

    Checks against the acceptance list

    1. The wiring is in the guide (services/platform/tests/manual/setup.md §1.A on main):

      • Step 3 (:81–89) copies tests/e2e/fixtures/config/default/providers/e2e-mock.yml into tests/e2e/fixtures/config/<org-slug>/providers/.
      • Step 4 (:91–101) adds an Environment variable credential named E2E_MOCK under Settings → AI providers.
      • Terminal 2's boot command sets TALE_PROVIDER_KEY_E2E_MOCK (:40).
    2. The corrected lines are unchanged since acceptance, and so is the code they describe.

      • setup.md and scripts/save-auth-state.ts have no commits after the merge, so they are byte-identical to a0b5c48a0.
      • lib/shared/config/registry.ts, organizations/scaffold.ts and config_store/builtin_catalog.ts have no commits since then either. registry.ts still gives exactly two domains a scaffoldKind (:82 flat, :136 bundle), which matches the guide's "governance/ and skills/".
      • lib/chat/assistant.ts, configs/platform/system/{connectors,providers} and the four environment names shared with playwright.config.ts all exist.
    3. The dangling links stay resolved. No default/connectors or default/token-sources link remains. :60 names the shipped system tree as the catalog source. Every concrete path the guide names exists on main.

    4. The gates pass: bun services/platform/tests/manual/scripts/check-guide.ts services/platform/tests/manual/setup.md gives OK, and bun run lint:manual gives ok (1455 boxes).

    5. A fresh tester can run it. This was verified live at a0b5c48a0 on a fresh mode-A stack: no provider at first, then the wiring, then the canned reply byte for byte, then CHAT-F57 (review record, steps 1–8). What the guide relies on still holds on main:

      • the TALE_PROVIDER_KEY_ prefix is enforced (backend/core/provider_credentials/resolve_credential.ts:550, backend/domains/provider_credentials/service.ts:480);
      • TALE_CONFIG_BUILTIN_DIR is read by builtin_catalog.ts and organizations/scaffold.ts;
      • the fixture's display name is E2E Mock Gateway;
      • every i18n key in step 4 resolves (check-guide).

      Two later changes touch the credential UI, and neither alters step 4's path:

    Limits

    • No live rerun this time. Host IO pressure deferred browser and database work under the 14:14Z resource checkpoint: IO full avg60 was about 24% at 18:15Z.
    • Modes B and C weren't checked, as in the original report.
    • The review's LOW 1 stays optional polish: say to wait until Refresh catalogs finishes.
  3. added
    agent-ready
    on Oct 29, 2026
  4. tale-code-bot commented on Oct 29, 2026

    @tale-code-bot
    Collaborator

    Done by #4137 ("docs(manual): document the mock provider wiring for setup mode A", merged 2026-10-03 as 9fa2bf2), which is on main. It referenced this issue without closing it.

    • At main 9be5cad the issue's checks 1-4 hold: lint:manual and check-guide.ts pass on services/platform/tests/manual/setup.md.
    • Check 5, a live walk to a mock reply, was not run (no database in the worker).
    • Noticed on the way, outside this issue: the trigger table in setup.md section 3 lists 7 of the 11 MOCK_TRIGGERS.

    Closing as completed. Checked by the development cycle (task TALE-59).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readydocsservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions