Skip to content

feat(config): impl daemon group#442

Merged
jdx merged 1 commit into
jdx:mainfrom
gaojunran:feat-daemon-group
May 17, 2026
Merged

feat(config): impl daemon group#442
jdx merged 1 commit into
jdx:mainfrom
gaojunran:feat-daemon-group

Conversation

@gaojunran

Copy link
Copy Markdown
Contributor

No description provided.

@greptile-apps

greptile-apps Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR implements a --group flag for the start, stop, and restart commands, allowing users to operate on named sets of daemons defined in pitchfork.toml under a [groups.<name>] section. It also refactors the ID-resolution path into a single resolve_ids_and_group helper that reads the merged config once and deduplicates across positional IDs and group members.

  • Adds GroupEntryRaw / GroupEntry types, group parsing during config load, serialization round-trip, and all_merged merge support in src/pitchfork_toml.rs.
  • Introduces --group <GROUP> to start, stop, and restart, with appropriate clap conflicts_with declarations (local/global/all), updated ensure! guards, and consistent empty-result early-exits.
  • Updates CLI reference docs (commands.json, *.md) and the usage KDL to reflect the new flag.

Confidence Score: 5/5

The change is well-scoped and additive; no existing resolution paths were altered, and the new group logic is exercised only when --group is explicitly passed.

The dedup, namespace resolution, missing-daemon validation, and serialization round-trip all follow existing patterns in the codebase. The three CLI commands are symmetric and handle the empty-result case consistently. No data loss or correctness issues were identified.

No files require special attention.

Important Files Changed

Filename Overview
src/pitchfork_toml.rs Adds GroupEntryRaw/GroupEntry types, group parsing/serialization during config load, merge support, and the new resolve_ids_and_group helper that consolidates dedup logic into a single all_merged() call.
src/cli/start.rs Adds --group flag, updates ensure! guard, replaces resolve_ids call with resolve_ids_and_group, and adds a new ids.is_empty() early-exit with a warning.
src/cli/stop.rs Adds --group flag and updates ensure! guard and resolve call, consistent with start.rs; the empty-ids guard was already present.
src/cli/restart.rs Adds --group flag and updates ensure! guard and resolve call, consistent with stop.rs; the empty-ids guard was already present.
pitchfork.usage.kdl Adds --group flag declarations and updated long_help strings for start, stop, and restart commands.
docs/cli/commands.json Auto-generated CLI reference updated with --group flag entries and updated help_long strings for start, stop, and restart.
docs/cli/start.md Docs updated with --group flag usage example and flag description.
docs/cli/stop.md Docs updated with --group flag usage example and flag description.
docs/cli/restart.md Docs updated with --group flag usage example and flag description.

Reviews (3): Last reviewed commit: "feat(config): impl daemon group" | Re-trigger Greptile

Comment thread src/pitchfork_toml.rs
Comment thread src/cli/start.rs Outdated
@gaojunran gaojunran force-pushed the feat-daemon-group branch from f1bf883 to e95d894 Compare May 17, 2026 12:05
@gaojunran gaojunran force-pushed the feat-daemon-group branch from e95d894 to 6bcf78f Compare May 17, 2026 12:13
@gaojunran gaojunran marked this pull request as ready for review May 17, 2026 12:36
@jdx jdx merged commit 7f565ed into jdx:main May 17, 2026
5 checks passed
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.

2 participants