Repository navigation
Use rtree api-key and canonical API-key routes - #105
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename
rtree keytortree api-keyfor list, create, and delete. API-key management and login validation use/v1/api-keys. Deletion accepts a UUID parsed by Clap before authentication or HTTP requests, and JSON output returnsidinstead ofid_or_token. The old command name and token deletion have no compatibility aliases.This follows the merged platform change https://github.com/rawtreedb/rawtree-platform/pull/2021. Publish the CLI only after the backend serving it supports the canonical routes. The README, CLI help, request-contract tests, login tests, and live Platform test use the new contract.
Validation:
cargo fmt --all -- --checkandcargo test --lockedpassed (304 tests; 11 live Platform tests ignored locally). A deliberate UUID-validation bypass caused the rejection test to fail; it passes after restoration. Quality, simplification, and independent review through P3 found no new issues. The live Compose suite will run in CI.An additional strict Clippy check reports existing warnings in unchanged
tests/storage_contracts.rs,src/client/routing_tests.rs,src/commands/insert.rs, andsrc/commands/query.rs; those files matchmain.Note
Medium Risk
Breaking CLI/API contract: old commands and token-based delete no longer work, and the CLI must ship with a backend that serves /v1/api-keys.
Overview
Renames the CLI surface from
rtree keytortree api-keyand drops aliases forkey,keys, andapi-keys. List, create, delete, and API-key login validation now call/v1/api-keysinstead of/v1/keys.api-key deletetakes a UUID only (uuidis a runtime dependency); Clap rejects tokens and malformed IDs before auth or HTTP. Delete JSON returnsidrather thanid_or_token, and the README documents the new contract. Tests and live Platform coverage were updated to match.Reviewed by Cursor Bugbot for commit 7827508. Bugbot is set up for automated code reviews on this repo. Configure here.
The companion docs and dashboard prompt update is https://github.com/rawtreedb/rawtree-platform/pull/2107; deploy it after publishing this CLI.