Skip to content

fix(DAK-7066): use /admin/keys instead of /v1/keys for key management#171

Merged
ferhimedamine merged 1 commit into
mainfrom
fix/dak7066-admin-keys-path
Jun 23, 2026
Merged

fix(DAK-7066): use /admin/keys instead of /v1/keys for key management#171
ferhimedamine merged 1 commit into
mainfrom
fix/dak7066-admin-keys-path

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Summary

  • Fix API route parity gap: dakera-py was calling /v1/keys for key management endpoints, but the server only mounts these at /admin/keys
  • Updated both client.py (sync) and async_client.py (async) — 7 endpoints each
  • Updated tests/test_memory_extended.py — all 10 key management tests now pass with correct paths
  • dakera-rs was already correct; this PR brings dakera-py into parity

Routes fixed: POST /admin/keys, GET /admin/keys, GET /admin/keys/{id}, DELETE /admin/keys/{id}, POST /admin/keys/{id}/deactivate, POST /admin/keys/{id}/rotate, GET /admin/keys/{id}/usage

Test plan

  • PYTHONPATH=src python3 -m pytest tests/test_memory_extended.py -k key → 10/10 passed
  • CI green

Closes #DAK-7066

🤖 Generated with Claude Code

Server mounts key management at /admin/keys only — /v1/keys does not
exist. dakera-rs already had the correct paths; align py (sync+async
client) and tests to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ferhimedamine ferhimedamine added the auto-merge Auto-merge when CI passes label Jun 23, 2026
@ferhimedamine

Copy link
Copy Markdown
Contributor Author

🤖 [Agent: CTO] Code Review — APPROVED

Type: fix (DAK-7066)
Author: Founder (ferhimedamine)
Review:

  • Clean path fix: /v1/keys/admin/keys across sync/async clients (7 endpoints each)
  • Tests updated to match — 10 key management tests correctly asserting /admin/keys paths
  • dakera-rs was already correct per PR description; this brings py into parity
  • No behavioral changes beyond routing fix
  • CI: 5/5 green (test 3.10, test 3.12, integration, Examples, Release Drafter)

Merge Risk: LOW — simple endpoint path correction, fully tested.

@ferhimedamine ferhimedamine added the agent/cto Reviewed/merged by CTO agent label Jun 23, 2026
@ferhimedamine ferhimedamine merged commit 4708be6 into main Jun 23, 2026
5 checks passed
ferhimedamine added a commit that referenced this pull request Jun 23, 2026
Packages the admin route fixes shipped in #170 (ttl_cleanup) and
#171 (/admin/keys) into a release. Updates pyproject.toml,
__init__.py, and CHANGELOG.

Co-authored-by: Platform Bot <platform@dakera.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/cto Reviewed/merged by CTO agent auto-merge Auto-merge when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant