mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-23 23:45:12 +00:00
The env-fingerprint fix ships on main via PR #927, but merging the extraction branch as-is would silently drop it: the CLI moved from src/ to packages/cli/ and rename detection does not carry the declaration change across, so PROVIDER_ENV_VARS here declares fewer providers than main. A provider absent from that map is never cache-invalidated when the user changes the env var that relocates its data — codeburn keeps serving cached sessions from a directory the user has since pointed elsewhere, which is the exact defect #920 fixed. The extraction side had nothing #927 lacks, so this is a strict-superset port of the end state. Port the full end state of fork/fix/920-provider-env-fingerprints, not just the nine headline providers: the follow-up commits changed existing declarations too (claude, cursor, goose, crush, ibm-bob gained vars; cursor's entry was corrected from XDG_DATA_HOME to CODEBURN_CURSOR_MAX_BUBBLES), added the vercel-gateway credential declaration with the read-only-refresh rationale, and reworked doctor to skip ambient Windows paths (APPDATA/LOCALAPPDATA) and redact credential values. Declarations added or extended for: codebuff, claude, crush, cursor, goose, grok, ibm-bob, kilo-code, kimi, kiro, mistral-vibe, mux, open-design, vercel-gateway, zerostack. Copilot stays deliberately undeclared (declaring it would force the durable re-parse that loses pruned OTel history); the guard test pins that intent. cline-cli has no counterpart on this branch: the provider file exists only on the sibling fix/rehome-new-files branch, and this branch's cline is a bridged scanner with zero process.env reads, so the CLINE_* vars #927 declared have nothing to attach to here. The ported guard test will fail loudly if/when cline-cli lands, exactly as intended. Tests ported and adapted (paths only): the provider-env-declarations static guard (every process.env read in src/providers must be declared or allowlisted, file-scoped), the #920 fingerprint cases, and the doctor override/redaction/ambient cases. The CODEBURN_VERBOSE allowlist moved from sqlite-session-parser.ts (original) to opencode.ts and kilo-code.ts, where that read lives on this branch. Each test was confirmed FAILING against the pre-port map: 10 fingerprint cases, 4 doctor cases, and 24 guard findings across 12 providers. No cache version bump: computeEnvFingerprint hashes the map at runtime, so the changed map already changes the fingerprint for exactly the affected providers and forces their one-time re-parse; a version bump would re-parse every provider globally for no reason. Verify: npx vitest run tests/session-cache.test.ts tests/doctor.test.ts tests/provider-env-declarations.test.ts --root packages/cli (109 pass); npm test --workspace=@codeburn/core (509 pass). |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| package.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||