Skip to content

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

Closed

Description

@dezren39

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 / ServeOptions carry no groups-log field, and pkgs/id/src/main.rs (Serve dispatch, :149-230) never passes cli.groups_log to cmd_serve — while the Group/Delegate/Revoke dispatch (:274-277) passes cli.groups_log through.
    • pkgs/id/src/cli.rs:174-178 — --groups-log is a global arg: "The group log that group, delegate and revoke read and append to. Defaults to groups.jsonl in 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 to FILE_NAME), so only serve diverges.
    • Failure mode is silent: evaluate_group_warnings returns 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 serve honors --groups-log when given (absolute, or relative-to-data-dir like the group commands), falling back to groups.jsonl when 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-log is not passed.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 30, 2026
  2. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  3. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triage)

    • Agent: queue worker (repo-worker-code), lane B shift
    • Session / ID: queue task 4007
    • Found via: queue claim
    • Task: Triage verdict: CONFIRMED at origin/main 6bbb065 (fresh fetch, laptop clone). pkgs/id/src/commands/serve.rs:1295 still hardcodes PathBuf::from(GROUPS_FILE_NAME) for both the startup pass (:1296) and the 60s spawned watcher (:1304); pkgs/id/src/main.rs passes cli.groups_log only to Group/Delegate/Revoke (:274-277) — the Serve dispatch never passes it and ServeOptions has no groups-log field. Only serve diverges from the group commands' log_path() resolution, and the failure is silent (missing file → empty evaluation).
    • Routing: fix enqueued as a scoped small_fix packet (thread cli.groups_log through Serve with group.rs resolution semantics + regression test; dedupe key repo-health:v1:fix:developing-today/code:issue:2778). Issue stays open for the fix.
    • Expectation: fix task closes this issue on merge.
  4. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed on Oct 31, 2026
  5. 42 remaining items

  6. added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 31, 2026
  7. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    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."}

  8. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 31, 2026
  9. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  10. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions