Skip to content

feat: add passive prompt-cache controls - #334

Merged
Obed0101 merged 1 commit into
devfrom
codex/beta7-cache
Sep 11, 2026
Merged

Obed0101 merged 1 commit into
devfrom
codex/beta7-cache

Conversation

@Obed0101

Copy link
Copy Markdown
Contributor

Problem

MendCode had no explicit, scoped control over passive provider prompt-cache behavior, and the ChatGPT OAuth adapter used one session-derived value for both transport affinity and cache identity.

Solution

  • Add mendcode cache status|enable|disable with project, session, provider, and exact-model scopes.
  • Preserve legacy provider behavior by default; enable smart cache keys only for verified API-key bindings and supported endpoints.
  • Keep OAuth transport affinity separate from managed cache keys, rotate affinity when instructions change, and consume cache-disable markers locally.
  • Add cache lineage fingerprints and conservative provider observations without keepalive, warm-up, or remote-cache deletion.
  • Keep release contract tests on an isolated in-memory database in CI.

Verification

  • Focused cache/OAuth tests: 210 passed, 0 failed (453 assertions).
  • bun run typecheck: passed.
  • Native candidate build and smoke test (bun run build --single --skip-embed-web-ui --skip-install): passed; --version and --help started successfully.
  • Release-index tests: 3 passed.
  • Release installation/channel/TUI smoke tests with isolated DB: all passed.
  • git diff --check: passed.
  • Full suite: 4616 passed, 12 skipped, 2 todo, 12 failed. The remaining failures are existing baseline/environment failures in session HTTP API, worktree shortcuts, SQLite identifier escaping, tool configuration, patch/freeform, snapshot race, and system-session coverage; this PR remains draft until required CI gates confirm the release path.

Risks and gaps

  • Smart cache-key support is intentionally limited to verified OpenAI/OpenRouter API-key bindings; unsupported, custom, OAuth, and unknown bindings remain conservative.
  • No live provider canary or cache-keeper behavior is introduced.
  • The full-suite baseline failures remain disclosed rather than treated as release-ready evidence.

@Obed0101
Obed0101 marked this pull request as ready for review September 11, 2026 00:53
@Obed0101
Obed0101 merged commit 48c5dd0 into dev Sep 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant