Repository navigation
Description
Out of scope
- Do not change credential routing, production environment admission, offline guards or assertion deadlines.
- Do not require a real credential or contact a provider.
Context
While verifying #2739, bun run test packages/ui-sdk packages/ui-server packages/core packages/ui-backend-pi packages/ui-backend-claude failed autonomous Claude envelope > an API profile without a credential refuses before a relay or worker exists: the call did not throw the expected has no inference credential error (packages/ui-backend-claude/tests/autonomous-envelope.test.ts:97-100). The invoking environment contained an ANTHROPIC_API_KEY variable. No value is included here.
The fixture passes an empty profile environment, while turnEnv combines the admitted host snapshot with that environment (packages/ui-backend-claude/src/sdk-options.ts:71-76). The negative control therefore depends on the terminal having no admitted API credential, and it creates a relay when that assumption is false.
Scope
- Reproduce using only a fictional
ANTHROPIC_API_KEY=sk-odysseus-fixtureenvironment variable and the named focused test. - Make the fixture explicitly control the credential variables needed by its absence assertion, restoring their original presence and values afterward.
- Check the other credential-absence cases in the same suite for the same assumption.
Acceptance criteria
- The named test passes with both an absent key and a fictional inherited key, while still proving that the assembled turn has no admitted inference credential.
- The fixture restores every changed environment variable after success and failure.
- Removing the fixture isolation reproduces the named missing-throw assertion with the fictional inherited key.
- The package suite remains offline with the normal test guard enabled.
Verification
Run env ANTHROPIC_API_KEY=sk-odysseus-fixture bun run test packages/ui-backend-claude/tests/autonomous-envelope.test.ts, then repeat with that variable unset. Retain the failing mutation and restored results.
Contract impact
None. Test fixture isolation only.
Activity
schlessera commentedon Oct 23, 2026
Closing as a duplicate of #1996, which covers the same test (
an API profile without a credential refuses before a relay or worker exists) and the same cause: the fixture inherits an ambientANTHROPIC_API_KEYthroughturnEnv. #1996 now carries this report's observation from #2739's verification, the audit of the sibling credential-absence cases, and the offline-suite criterion.Milestone 0.44.0 records when this was resolved; it does not claim a fix shipped.
schlessera commentedon Oct 24, 2026
Claim
bk044-2749-a9f58eea: implementing the credential-absence fixture isolation on branchtest/2749-hermetic-credentials-044for milestone 0.44.0. #2749 is closed as a duplicate of #1996; this claim covers that same scoped fix. Will stop at a draft PR with local receipts and draft gates, leaving #2769 untouched.