Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

5.9 KB
Raw Blame

Experiential migration preparation

The current cutover contract retains prompts and responses. Use the live Worker acceptance to test the real Screenpipe request path. These preparation commands remain outside the Worker import graph and do not activate customer routing or move allowance balances.

Inventory and read-only account checks

From packages/ai-gateway:

bun scripts/export-migration-inventory.ts > migration-inventory.json
bun scripts/experiential-preflight.ts > experiential-preflight.json

Load the test credential as EXPLABS_API_KEY from the secret manager into the calling process. Keep credentials out of arguments, logs and generated reports. The inventory records repository model and plan policy; its advertised credits are not deployed spending rules. Preflight reads the authenticated catalog, organization and data controls without changing them. Exit 1 means inspection failed; exit 2 means a report exists but migration checks remain unresolved. Neither command proves cutover readiness.

Synthetic protocol smoke checks

The smoke command now defaults to retention, matching Worker acceptance and the adapter. It requires prompt capture enabled, organization ZDR disabled and the existing no-training routing setting. It sends no ZDR request field or header. An explicit x-gateway-zdr: true response conflicts with this mode and is canceled before content is read, without retry. A successful response is not proof of capture; inspect the captured synthetic request separately.

bun scripts/experiential-smoke.ts --allow-spend gpt-5.4-nano chat
bun scripts/experiential-smoke.ts --allow-spend gpt-5.4-nano stream
bun scripts/experiential-smoke.ts --allow-spend gpt-5.4-nano tools
bun scripts/experiential-smoke.ts --allow-spend gpt-5.4-nano json-schema
bun scripts/experiential-smoke.ts --allow-spend gpt-6-astra responses
bun scripts/experiential-smoke.ts --allow-spend claude-sonnet-5 messages

Each invocation makes one synthetic inference POST, with the existing 64-token probe budget, no retry or model fallback. Streaming validates content, finish, usage and DONE. Tools and JSON schema inspect returned arguments/content. Responses requires a completed assistant answer; Messages requires text and end_turn. Partial answers, reasoning alone and refusals fail. These direct vendor probes do not replace Worker acceptance, image tests or second tool turns. Inline cost does not prove settled billing or allowance enforcement.

Historical ZDR probes require an explicit option:

bun scripts/experiential-smoke.ts --allow-spend --zdr gpt-5.4-nano chat

That mode alone sends provider: {zdr: true}, requires the documented model route and account entitlement, and requires x-gateway-zdr: true before reading JSON or SSE. Current retention testing never selects that option automatically. Astra retains Low reasoning, Standard service (service_tier: "default"), store: false and no previous_response_id in either mode.

Inactive customer adapter

lib/experiential-adapter.ts defaults to inactive. Its isolated-test mode prepares one synthetic SDK request with contentRetention: 'retain' by default. Historical fixtures explicitly choose 'zdr'. Both modes verify the existing server-owned customer binding, current authenticated plan, distinct management and customer keys, exact model UUID and identity-bound destination assignment. The adapter neither provisions those records nor selects production traffic.

bun test src/test/experiential-migration.unit.test.ts src/test/experiential-adapter.unit.test.ts src/test/experiential-sdk-parity.unit.test.ts

The HTTP integration test additionally requires a separately running local platform fixture, selected with SCREENPIPE_EXPERIENTIAL_LOCAL_FIXTURE. It is skipped without one. That fixture is synthetic, not live provider proof. It contains controlBaseUrl, gatewayBaseUrl, managementKey, orgId, provisioningIdentityId, canonicalModelUuid, model, syntheticUpstream and two customers with userId, identityId, customerKey, accountPlan and expectedPlan: {plan_key, plan_version, revision}. Keep it private. Only loopback hosts and gpt-5.4-mini are accepted by this historical fixture.

Customer cutover boundary

Use actual deployed Cloudflare rules, reset windows, settled usage and pending exposure. Repository credit constants and empty destination balances cannot replace them. A direct destination route needs equivalent customer admission, shared total/frontier caps, subscription synchronization and a verified usage handoff in both directions. Native customer plans require platform activation; explicit source periods do not automatically renew themselves.

Encrypted Tinfoil/EHBP, custom GLM, classifier, audio and context-tier pricing models retain their existing routes. Argon and eligible background rescue now have Experiential paths with the no-training dispatch guard; see the acceptance document for their exact transport and rollback behavior. Test provider protocols, images, aliases, cache costs, tool-result turns and rollback through the actual Worker before promoting any routing change. Internal canary success does not establish customer cutover readiness.

Historical intent: #7338 (3d96e77e3f) incorporates Silent's companion commit e57beac7d26ab703328ecd2c5e45e53ed557df9b. Its explicit historical ZDR behavior remains testable; the user's retaining requirement supersedes its default.

Official contracts: