storage(lifecycle): use RegisterCLICommand pattern#855
Conversation
|
[SC-187336] |
8a6f696 to
52f758e
Compare
quentinalbertone
left a comment
There was a problem hiding this comment.
good idea ! Do you think that you can move the storage_bucket_lifecycle* into a subpackage ? You can find an example in the aiservices package
I've just signed off, 🚇-typing, but the idea is that we can drive the people using "AI" for external contributions with the AGENTS.md, (#856) file sitting now at the root of the repo. Ironically-speaking, I precisely gave the AI services as an example to develop rule for the LLM to grasp the structure / pattern, and it didn't pick it on its own 😂, I will further adjust the rules there so that next time it picks it up. Good catch anyway, thanks! Addressed |
PR #855 refactored storage_bucket_lifecycle* in place, keeping the flat layout in cmd/storage/. Review feedback asked for them to be moved into a subpackage along the lines of cmd/aiservices/deployment/. Add a paragraph to AGENTS.md that names the legacy flat groups and points the agent at the cmd/aiservices/... subpackage layout, with the storage_bucket_lifecycle case as the worked example.
PR #855 refactored storage_bucket_lifecycle* in place, keeping the flat layout in cmd/storage/. Review feedback asked for them to be moved into a subpackage along the lines of cmd/aiservices/deployment/. Three small tweaks so a future agent picks this up automatically: - Folder layout: add an anti-pattern callout naming the legacy flat groups (cmd/storage, cmd/dns, cmd/dbaas), the cmd/aiservices/deployment subpackage as the canonical pattern, and the storage_bucket_lifecycle case as a worked example. Wording is imperative ("MUST promote"). - Command pattern: cross-ref to Folder layout so an agent starting from the struct pattern doesn't miss the placement cue. - File header rule: parametrize the model name (<model>) instead of hard-coding claude-sonnet-4.6.
52f758e to
ead38f6
Compare
# Description Follow-up to #856. PR #855 refactored `storage_bucket_lifecycle*` in place; review asked to move them into a subpackage per `cmd/aiservices/deployment/`. AGENTS.md missed the placement cue: 3 tweaks so a future agent picks this up automatically: - **Folder layout**: anti-pattern callout naming the legacy flat groups (`cmd/storage`, `cmd/dns`, `cmd/dbaas`), `cmd/aiservices/deployment/` as the canonical subpackage, and `storage_bucket_lifecycle*` as a worked example. Wording imperative (`MUST promote`). - **Command pattern**: cross-ref to Folder layout so an agent starting from the struct pattern doesn't skip placement. - **File header rule**: parametrize the model name (`<model>`) instead of pinning to `claude-sonnet-4.6`. ## Checklist (For exoscale contributors) * [ ] Changelog updated (under *Unreleased* block, and add the Pull Request #number for each bit you add to the `CHANGELOG.md`) * [ ] Testing ## Testing Docs-only. --- > [!NOTE] > AI assistance: PR description.
Description
Rewrites the lifecycle commands to use the struct-based
RegisterCLICommandpattern, consistent with newer commands likecmd/aiservices/deployment/.Changes:
set,show,deleteconverted to typed structs withRegisterCLICommandChecklist
(For exoscale contributors)
CHANGELOG.md)Testing
Build and full test suite pass (
make build && make test-verbose). Lint clean.