Repository navigation
Description
Finding
id serve's group-warning watcher (P4.9, added by PR #1805) always reads the default groups.jsonl, ignoring the global --groups-log option. An operator who runs serve against a shared or relocated group log — the documented use case for --groups-log ("a log shared by several nodes is best given as an absolute path") — gets no group size/churn warnings at all, silently: the watcher either finds no file at the default path (evaluation returns empty) or watches a different, local log than the one id group / delegate / revoke are writing to.
Evidence
- PR: id(serve): wire P4.9 group warning Evaluator into serve (#799) #1805 (
id(serve): wire P4.9 group warning Evaluator into serve (#799)), merged as 3675a47. - Verified on current main dccfec4:
pkgs/id/src/commands/serve.rs:1295—let groups_log = PathBuf::from(GROUPS_FILE_NAME);hardcoded; both the startup pass (:1296) and the 60s spawned task (:1304) use only this path.pkgs/id/src/commands/serve.rs/ServeOptionscarry no groups-log field, andpkgs/id/src/main.rs(Serve dispatch,:149-230) never passes:274-277) passescli.groups_logtocmd_serve— while the Group/Delegate/Revoke dispatch (cli.groups_logthrough.pkgs/id/src/cli.rs:174-178—--groups-logis a global arg: "The group log thatgroup,delegateandrevokeread and append to. Defaults togroups.jsonlin the data directory. A relative path is relative to the data directory, so a log shared by several nodes is best given as an absolute path."pkgs/id/src/commands/group.rs:31-33— the group commands resolve the option with the same default (log_path()falls back toFILE_NAME), so only serve diverges.- Failure mode is silent:
evaluate_group_warningsreturns an empty vec when the path does not exist, by design ("warnings never block serve").
Distinct from #1847 (open), which covers the same watcher's churn detection missing re-add cycles that complete between 60s evaluations; this issue is about which log file is watched at all.
Why it matters
The warnings exist to surface group-size thresholds and device re-add bursts ("each re-add is a compromise recovery, so check the devices"). A shared-log deployment — the exact setup --groups-log documents — silently loses that signal while id group keeps working against the shared log, so nothing looks broken.
Acceptance criteria
-
id servehonors--groups-logwhen given (absolute, or relative-to-data-dir like the group commands), falling back togroups.jsonlwhen absent. - A test covers serve's warning evaluation against a non-default log path (the existing watcher tests in serve.rs pass explicit paths to
evaluate_group_warnings; add coverage that the path serve actually uses comes from the option). - Default behavior unchanged when
--groups-logis not passed.
Activity
dezren39 commentedon Oct 30, 2026
🤖 Agent note · filed
groups.jsonlat serve.rs:1295 on main dccfec4, and neither ServeOptions nor main.rs's Serve dispatch passes the globalcli.groups_logthat group/delegate/revoke honor — so a shared-log deployment (cli.rs:174-178's documented use) silently gets no P4.9 size/churn warnings.dezren39 commentedon Oct 31, 2026
🤖 Agent note · done (triage)
pkgs/id/src/commands/serve.rs:1295still hardcodesPathBuf::from(GROUPS_FILE_NAME)for both the startup pass (:1296) and the 60s spawned watcher (:1304);pkgs/id/src/main.rspassescli.groups_logonly to Group/Delegate/Revoke (:274-277) — the Serve dispatch never passes it andServeOptionshas no groups-log field. Only serve diverges from the group commands'log_path()resolution, and the failure is silent (missing file → empty evaluation).42 remaining items
dezren39 commentedon Oct 31, 2026
agent-note:v1
{"kind":"parked","task_id":4366,"worker":"repo-worker-code","lane":"b","stage":"awaiting_ci","note":"Parked 20m: dispatched id run 41219928109 still QUEUED (fleet runner backlog). Codex clean on head 9f5f283 (no findings), diff verified first-hand this shift (group.rs log_path visibility + serve threading + 2 regression tests), laptop serve suite 15/15 re-verified by lane F. Resume: run green -> merge PR 3110 -> complete."}
dezren39 commentedon Oct 31, 2026
🤖 Agent note · picked up
id(serve): thread --groups-log into the group-warning watcher (#2778) (…
dezren39 commentedon Oct 31, 2026
🤖 Agent note · done