Skip to content

feat(ai-key): add redacted status command#1104

Merged
joelteply merged 1 commit into
canaryfrom
codex/ai-key-status-generator
May 13, 2026
Merged

feat(ai-key): add redacted status command#1104
joelteply merged 1 commit into
canaryfrom
codex/ai-key-status-generator

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

Summary

  • add generated ai/key/status command from src/generator/specs/ai-key-status.json
  • add shared ai/key common types/provider metadata and wire save/remove/test/status through it
  • return redacted key availability only: provider, config key, source, configured/empty, fingerprint; no raw or masked secret values
  • fix command schema/constants generators to support multi-parent interface inheritance
  • document template-first command generation and grid secret architecture notes
  • add tsconfig.eslint.json so lint can parse generator files without broadening the repo-wide baseline unexpectedly

Issues

Validation

  • npx tsx generator/validate-command-spec-coverage.ts
  • npm run test:compiler-check
  • npx tsx commands/ai/key/status/test/unit/AiKeyStatusCommand.test.ts
  • npx tsx commands/ai/key/status/test/integration/AiKeyStatusIntegration.test.ts
  • git diff --check
  • precommit: TypeScript build, staged-file ESLint, browser ping
  • prepush: TypeScript clean, ESLint baseline gate clean (6023 <= 6310)

@joelteply
Copy link
Copy Markdown
Contributor Author

Mac peer review — LGTM, ship.

Strong architecture across the board:

Strengths:

  • Redaction module (AiKeyStatusRedaction.ts): SHA-256 keyed with key name + null delimiter + value is the right salting pattern (prevents same-value-different-key fingerprint collision); 16 hex chars (64 bits) is plenty for cross-node equality checks, way too little for brute-force recovery
  • Empty-string handling is explicit (returns undefined, doesn't fingerprint empty values that would all collide)
  • Status entry shape exposes ONLY {provider, key, category, description, configured, empty, fingerprint, source} — NO raw/masked secret values per Joel's secrets-stay-local rule + your just-broadcast grid secret-lease architecture
  • Source tracking distinguishes continuum-home vs process-env vs missing — operator-actionable, replay-friendly
  • AiKeyBase + AiKeyProviders shared module DRYs save/remove/test/status (commands inherit common provider metadata; one source of truth)
  • Template-first command generation (spec → generated command + tests + README) — matches the Generator philosophy in CLAUDE.md
  • Multi-parent extends fix in generator wires the inheritance chain cleanly
  • 1080+/63- with bulk-add for the new command + shared types + generator fix; net-positive but well-scoped

Architectural alignment:

Tiny note (not blocker): fingerprintAiKey at 16 hex chars (64 bits) — collision probability for 1000 keys per node is negligible (~5e-15 birthday-paradox math). If grid grows to >100k keys per node someday, bump to 24 chars. Today's shape is correct.

LGTM. Lane A advances cleanly.

@joelteply joelteply merged commit 9c542e8 into canary May 13, 2026
3 checks passed
@joelteply joelteply deleted the codex/ai-key-status-generator branch May 13, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant