Skip to content

feat: Initial scaffold for the v2 microservice operator CLI#1375

Draft
sitabulaixizawaluduo wants to merge 6 commits into
mainfrom
feat/cli-scaffold
Draft

feat: Initial scaffold for the v2 microservice operator CLI#1375
sitabulaixizawaluduo wants to merge 6 commits into
mainfrom
feat/cli-scaffold

Conversation

@sitabulaixizawaluduo
Copy link
Copy Markdown
Collaborator

@sitabulaixizawaluduo sitabulaixizawaluduo commented May 28, 2026

Description

Initial scaffold for the v2 microservice operator CLI:

  • areal console-script with four namespaces (inf, agent, train, weight-update); no verbs implemented yet

Related Issue

Related #1374

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation update
  • ♻️ Refactoring
  • ⚡ Performance improvement
  • ✅ Test coverage improvement

Checklist

  • I have read the Contributing Guide
  • Pre-commit hooks pass (pre-commit run --all-files)
  • Relevant tests pass; new tests added for new functionality
  • Documentation updated (if applicable; built with ./docs/build_all.sh)
  • Branch is up to date with main
  • Self-reviewed via /review-pr command
  • This PR was created by a coding agent via /create-pr
  • This PR is a breaking change

Breaking Change Details (if applicable):

Additional Context


Need help? Check the Contributing Guide or ask in
GitHub Discussions!

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
with open(tmp, "w") as f:
with open(tmp, "w", encoding="utf-8") as f:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant