Repository navigation
docs(manual): document the mock provider wiring for setup mode A - #4137
Merged
Merged
Conversation
The mode-A fixture's default/connectors and default/token-sources links have dangled since #2857 deleted builtin-configs/. Nothing reads either of them. Connectors and AI-provider vendors come from configs/platform/system/, and the org scaffold seeds only the registry's domains. The links survived only behind an export-ignore pair in .gitattributes, which the setup-cli archive test pinned as the one allowed exclusion. Drop both links and the export-ignore block, and let the archive test hold the plain invariant: the source ZIP carries every tracked file, and every link in it resolves inside the snapshot.
Mode A told testers to add the mock provider under Settings > AI providers, or to mint the org with save-auth-state.ts, "which seeds it". Neither works. The vendor catalog offers E2E Mock Gateway only once providers/e2e-mock.yml sits in the org's config dir, and the script seeds no provider, so every mode-A chat box was blocked for a tester following the setup file (TALE-358 local QA, 2026-10-03). setup.md now spells out the two moves the docs-screenshot seed makes. Wait for the starter project, because the org-create scaffold empties the config dir first. Read the slug from the organization switcher, copy the provider file, then add an Environment variable credential named E2E_MOCK. It also says what a mode-A org really scaffolds (governance and skills from the fixture, no provider, no agent file; the chat assistant is built in) and that save-auth-state.ts waits for "Getting started" and wires nothing. The connector and provider catalogs come from configs/platform/system/, the fixture definition is e2e-mock.yml, and mode C names the env credential and the current OpenRouter definition instead of the deleted builtin-configs file. The same wrong advice goes from not-a-finding.md, chat and governance point at the setup steps, and the stale comments in save-auth-state.ts and playwright.config.ts now match.
A read-only review of the first round found the following, each checked in source before this change: - Mode C's exported key never reached the credential reader. The docker:dev override forwards the shell env to the web-tier platform container only, while backend-api and backend-worker resolve credentials and read the repo-root .env. The bullet now says to add an API key credential, or to put the variable in .env and add the env credential. - "No restart, just reopen Add credential" missed the browser cache. The page keeps the vendor list it first loaded (staleTime Infinity), so a page opened before the copy needs a reload or Refresh catalogs. - An org-defined provider's credential field reads Provider name, prefilled with the provider's display name, not Name. - A colliding wizard org deletes the tracked fixture dir rather than overwriting files, and docs-demo is tracked too. Mode B names the page AI providers. - Stale mock-provider comments remained in playwright.config.ts (the port note named e2e-mock.json, "loaded verbatim"), onboarding.spec.ts (a seeded mock provider) and search.spec.ts (an https-only schema).
Contributor
Author
|
Independent review of PR #4137 at
Your item 1: the four Wire-the-mock-provider steps are accurate and complete.
Your item 2: the mode-C bullet is correct. I checked it against source only, because there is no Docker here.
Your item 3: the simplified archive test is still a meaningful guard.
LOW
INFO
Verified correct
Environment. Everything was local:
Merge: accepted at exact head |
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
services/platform/tests/manual/setup.mdmode A couldn't be followed to a working chat. It said to add the mock provider under Settings → AI providers "or mint the org viasave-auth-state.ts, which seeds it". Neither works:providers/e2e-mock.ymlsits in the org's config dir.This PR documents the wiring and corrects the fixture descriptions (#4105).
setup.md§1.ANew "Wire the mock provider" block. These are the two moves
ensureMockProviderintests/docs-screenshots/seed-demo-org.tsmakes, plus the two facts a tester needs to make them:cleanFirst: true) empties<slug>/before it seeds, so a file copied earlier is lost.@<slug> · <role>.cp default/providers/e2e-mock.ymlintotests/e2e/fixtures/config/<slug>/providers/.E2E_MOCK. Each control names its i18n key.Catalog caching. The backend re-reads the provider file on every request, but the page keeps the vendor list it first loaded. If AI providers was open before the copy, reload it or press Refresh catalogs first.
What a mode-A org really scaffolds. Only the registry's scaffold domains (
governance/,skills/, both empty in the fixture). No provider, and no agent file: the chat assistant is built in (lib/chat/assistant.ts). The wrong "E2E Assistant" and "thee2e-mockprovider" claims are gone.Real catalog source. Connectors and AI-provider vendors come from
configs/platform/system/. This replaces "a symlink to the realbuiltin-configs/connectors".Fixture file name. The sync note now names
e2e-mock.yml; the retirede2e-mock.jsonis gone.Mode C. The bullet linked the deleted
builtin-configs/providers/openrouter.jsonand said to export the key in the invoking shell. That env reaches only the web-tierplatformcontainer (scripts/docker-dev-env-override.ts), not thebackend-api/backend-workerservices that resolve credentials. It now says:TALE_PROVIDER_KEY_OPENROUTERin the repo-root.env(theirenv_file) and add the env credentialOPENROUTER.The seed creates none. Mode B's page name is now AI providers.
§2.
save-auth-state.tswaits for the starter project and wires no provider; in mode A, run steps 2–4 next.Same advice elsewhere
reference/not-a-finding.md: same wrong advice, fixed.suites/chat.mdandsuites/governance.mdnow point at the setup steps.Stale mock-provider comments fixed:
save-auth-state.ts;playwright.config.ts(the port note'se2e-mock.json, "seeds every new org with … the mock provider",secretsEnv/Convex);tests/e2e/specs/onboarding.spec.ts(a "seeded mock provider");tests/e2e/specs/search.spec.ts(an "https-only" provider schema).All are comment-only edits.
Dangling links (separate commit)
tests/e2e/fixtures/config/default/connectorsanddefault/token-sources; both point into the deletedbuiltin-configs/. Nothing reads either path..gitattributesexport-ignore block that existed only to keep them out of source archives.tools/cli/scripts/action-archive.test.tsnow holds the plain invariant: the source ZIP carries every tracked file and every link resolves. The two-path exclusion list is gone.No product strings, no migrations, no secrets. The
TALE_PROVIDER_KEY_E2E_MOCKvalue in the docs is the existing fixed test key.How I verified it
bun run lint:manual: ok (layout, suites, runs, references; 1432 boxes).check-guide.tsonsetup.md,suites/chat.md,suites/governance.mdandreference/not-a-finding.md: all OK.setup.mdwith a bogus key (navigation.orgSwitcher.nopeLabel) fails withMISSING i18n, so the gate does read the new keys.Every relative link in the touched guides resolves.
Source-archive invariant, from a streamed
git archive --worktree-attributes --format=tar HEAD(piped, so no file is written):docs-demo/{agents,automations,skills}) resolve;find -xtype lfinds 0 dangling.cp -rLof the extracted tree succeeds.2bd3905f0: both removed links are DANGLING.Not run locally:
bun test tools/cli/scripts/action-archive.test.ts. This sandbox's hardRLIMIT_FSIZEis 512 MiB, andgit archiveis killed with SIGXFSZ writing the ~539 MB archive, for any head. CI's CLI job runs it.oxfmt --checkandoxlinton the five changed TypeScript files: clean.Read-only adversarial review of the first round (a subagent, source reading only). It found:
I checked each in source and fixed it in
a0b5c48a0. The same review confirmed the step-1 ordering, the registry/scaffold facts, the slug menu, the i18n keys, theTALE_PROVIDER_KEY_prefix field, and that nothing else is needed for a reply: the first credential becomes the default, Auto picks a model, and no access policy applies.Read from source, not from a running app. The steps and the mode-C bullet were checked against source and
en.yml. This sandbox runs no stack, browser or Docker.What the reporting run observed live: steps 3–4 and the chat that follows (TALE-358 run
820db997:mockOffered0 → 1, then CHAT-F57/F19 in EN/DE/FR).Left open
Refs, notCloses.scripts/docker-dev-env-override.tsforwards the invoker's env toplatformonly. Its header still describes the deleted Convex sync.compose.dev.ymlsetsTALE_DEV_SEED_USER/TALE_ALLOW_OPEN_SIGN_UPonly on the web-tierplatformservice, while the backend reads them. Mode C's seeded login may depend on.env.playwright.config.tsstill cites the deletedscripts/sync-convex-env-from-dotenv.tsforENCRYPTION_SECRET_HEX.Refs #4105