Skip to content

feat(e10): provider preset templates (--preset, catalog, docs) - #57

Merged
imneov merged 4 commits into
mainfrom
feat/e10-provider-presets
Jul 7, 2026
Merged

feat(e10): provider preset templates (--preset, catalog, docs)#57
imneov merged 4 commits into
mainfrom
feat/e10-provider-presets

Conversation

@imneov

@imneov imneov commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements Epic E10 provider preset templates for v1.1.

Story Mapping

  • E10-S1 — Built-in provider preset catalog

    • Commit: d23ab60 feat(e10-s1): add provider preset catalog
    • Adds closed built-in catalog: moonshot, deepseek, glm, qwen.
    • Catalog entries include canonical name, display name, provider key, base URL, model, supported tool overlays, expected secret field metadata, and no-official-support disclaimer.
    • Lookup is case-insensitive and returns canonical lowercase names.
    • Unknown preset errors list available presets.
    • Secrets are not embedded in preset definitions.
    • Codex owned-key allowlist is explicitly extended only for the four ADR-approved preset provider names; no wildcard provider ownership.
  • E10-S2 — cmd/add --preset profile draft expansion

    • Commit: 955da22 feat(e10-s2): expand presets in add command
    • Adds claudecm add --preset <name> and claudecm add --list-presets.
    • Presets expand into ordinary schema_version: 1 profiles.
    • Non-interactive preset add requires --api-key; missing secret refuses without writing.
    • Generated core fields and Codex overlay fields are visible in dry-run output with secrets redacted by default.
    • Explicit --base-url, --model, --provider, and --set overrides win over preset-generated values.
    • Duplicate name / invalid preset / invalid overrides refuse before profile write.
  • E10-S3 — Preset override, activation, and write-path invariants

    • Commit: 0c79a81 test(e10-s3): verify preset-backed switch write path
    • Adds switch coverage for a preset-backed ordinary profile.
    • Verifies switch pre-apply diff shows generated preset-owned keys.
    • Verifies activation goes through the existing switch path and preserves non-owned Claude Code/Codex keys.
    • No changes to internal/writepath or internal/commit internals.
  • E10-S4 — Preset docs, help text, and no-official-support boundary

    • Commits: 955da22, 77a6ef5 docs(e10-s4): document provider preset templates
    • claudecm add --help documents --preset, --list-presets, convenience-template behavior, override behavior, and no-official-support boundary.
    • README and quickstart include preset examples with generated fields visible and example secrets redacted.
    • Docs state presets are not official provider support, certification, endorsement, or compatibility guarantees.
    • Docs note endpoint/model drift and override options.

Verification

  • go build ./... — pass
  • go vet ./... — pass
  • Targeted changed-package tests with race:
    • go test -race ./internal/presets ./cmd -run 'TestAdd_Preset|TestAdd_ListPresets|TestSwitch_PresetBackedProfileUsesNormalWritePathAndPreservesNonOwnedKeys' -count=1 -timeout=300s — pass
    • go test -race ./internal/adapter/codex -run 'TestOwnedKeys|TestFixtureGoldensAreValidJSON|TestInitPanic|TestValidate' -count=1 -timeout=180s — pass
  • Full suite:
    • go test ./... -timeout=600s — hit environment fsync timeout in parallel package run (stack in storage.AtomicWrite / fsync, not an assertion failure)
    • go test ./... -p 1 -timeout=900s — pass
  • git status --short --branch — clean before push

@imneov
imneov merged commit ba85cbb into main Jul 7, 2026
9 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