Skip to content

id(serve): thread --groups-log into the group-warning watcher (#2778) - #3110

Merged
dezren39 merged 1 commit into
mainfrom
queue/4366-2778-groups-log
Oct 31, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/4366-2778-groups-log

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Closes #2778.

id serve's group-warning watcher (P4.9, PR #1805) hardcoded the default groups.jsonl and never received the global --groups-log option, so operators running serve against a relocated group log silently got no group size/churn warnings (evaluate_group_warnings returns empty on a missing file).

Fix (queue task 4366):

  • ServeOptions gains groups_log: Option<PathBuf>; main.rs passes cli.groups_log through the Serve dispatch (it previously went only to Group/Delegate/Revoke).
  • The watcher (startup pass and the 60s spawned task share the one resolved path) resolves it via the group commands' log_path() semantics — group::log_path is now pub(crate) and serve delegates to it, so there is a single resolution rule. Without --groups-log the default file name is used, unchanged.

Regression tests (fail-first: both new helpers absent before the fix):

  • serve_groups_log_path_honours_override_and_default — override + default resolution.
  • serve_group_warnings_evaluate_custom_groups_log — a 96-member group in a custom-named log fires the size warning through serve's resolved path while no default log exists.

Verified on laptop: commands::serve 10/10, commands::group 7/7, cargo check --all-features clean. Full suite via CI.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

ServeOptions gains groups_log; main passes cli.groups_log through
the Serve dispatch; the watcher resolves it with the group
commands' log_path() semantics (now pub(crate) in group.rs)
instead of hardcoding the default groups.jsonl. Default behaviour
without --groups-log is unchanged.

Regression tests: serve_groups_log_path resolution (override +
default) and warning evaluation over a custom log file holding a
96-member group. Laptop: commands::serve 10/10, commands::group
7/7, cargo check --all-features clean.
@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 15:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T15:18:17.748235Z 9f5f283 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 63752005-0673-47f9-b8c4-45905f04f646
Commits

Reviewing files that changed from the base of the PR and between ab529a2 and 9f5f283.

Files selected for processing: 3
  • pkgs/id/src/commands/group.rs
  • pkgs/id/src/commands/serve.rs
  • pkgs/id/src/main.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39

Copy link
Copy Markdown
Member Author

Correction to the verification line in the PR body: the laptop serve-module count is 15/15, not 10/10 — re-verified by lane F with two fresh runs after the shift (cargo test --all-features --lib commands::serve → 15 passed, 0 failed, including both new #2778 tests; the 10/10 figure came from a garbled tool delivery during the shift). Substantive claim unchanged: all serve tests pass, group suite and cargo check --all-features clean.

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.

id(serve): group-warning watcher ignores --groups-log — serve always reads the default groups.jsonl (PR #1805)

1 participant