feat: Initial scaffold for the v2 microservice operator CLI#1375
feat: Initial scaffold for the v2 microservice operator CLI#1375sitabulaixizawaluduo wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a lightweight, scaffolded areal command-line interface (CLI) for the v2 microservice control plane, supporting subcommands for inf, agent, train, and weight-update. It also adds cross-cutting state management helpers and updates the package configuration to expose the areal console script. A review comment suggests explicitly specifying the UTF-8 encoding when writing state files to prevent platform-dependent encoding issues.
| """ | ||
| path.parent.mkdir(parents=True, exist_ok=True) | ||
| tmp = path.with_suffix(path.suffix + ".tmp") | ||
| with open(tmp, "w") as f: |
There was a problem hiding this comment.
When writing text files, especially those containing JSON data (which is strictly UTF-8 per RFC 8259), it is highly recommended to explicitly specify encoding="utf-8". Otherwise, Python will fall back to the system's default encoding (which may vary across environments and platforms), potentially leading to UnicodeEncodeError or corrupted state files when handling non-ASCII characters.
| with open(tmp, "w") as f: | |
| with open(tmp, "w", encoding="utf-8") as f: |
Description
Initial scaffold for the v2 microservice operator CLI:
arealconsole-script with four namespaces (inf,agent,train,weight-update); no verbs implemented yetRelated Issue
Related #1374
Type of Change
Checklist
pre-commit run --all-files)./docs/build_all.sh)main/review-prcommand/create-prBreaking Change Details (if applicable):
Additional Context
Need help? Check the Contributing Guide or ask in
GitHub Discussions!