Skip to content

id(cli): test_cli_parse_cat stack-overflows in the pkgs/id test binary (pre-existing, parse path) #3438

Closed as not planned

Description

@dezren39

Problem

In the pkgs/id test binary, cli::tests::test_cli_parse_cat aborts with a stack overflow, even run in isolation:

$ id-<hash> cli::tests::test_cli_parse_cat --exact --test-threads=1
thread 'cli::tests::test_cli_parse_cat' has overflowed its stack
fatal runtime error: stack overflow, aborting

Found 2026-11-01 by queue task 5262 (lane F) while running the full pkgs/id suite on the laptop from PR 3420's head (74c1a6e). The PR's diff touches only pkgs/id/src/commands/serve.rs (is_process_alive + its test), which the CLI parse path does not call — so this failure is pre-existing relative to that change, not caused by it. All commands::serve tests pass (15/15).

Acceptance

  • Reproduce on clean main and confirm the overflow is in the parse path (likely clap derive recursion / large nested subcommand graph exceeding the test-thread stack).
  • Fix so test_cli_parse_cat passes in the normal test-thread configuration (e.g. parse on a spawned thread with a larger stack in the test, or reduce parse recursion), or document the required RUST_MIN_STACK if that is the intended configuration.
  • Full pkgs/id test binary run completes without aborting.

Acceptance criteria

  • test_cli_parse_cat runs to completion in the pkgs/id test binary without a stack overflow (pass, or a normal assertion failure if the underlying parse behavior is separately wrong).
  • The root cause is identified in the PR: either the recursive parse path gains a depth bound / iterative shape, or the test's input is shown to be invalid and corrected — not merely a larger test-thread stack.
  • The rest of the pkgs/id test suite stays green in CI.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 1, 2026
  2. developing-today commented on Nov 1, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Refinement from the filing lane (queue task 5262 follow-up, noted during task 5356): pkgs/id/.cargo/config.toml sets RUST_MIN_STACK = "8388608" under [env]. The stack overflow in the original report was observed running the compiled test binary directly, which bypasses that config; under cargo test the env applies and the test may pass. Whoever picks this up: first reproduce via cargo test --lib cli::tests::test_cli_parse_cat (with the config env in force) before treating it as a code defect — the fix may be documentation (the binary is only supported via cargo test) rather than a parser change. The serve-module results in the original filing are unaffected (they passed in the same direct run at far shallower stack depth).

  4. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: filed by lane F during its 2026-11-01 shift and noted there as pre-existing on main. No merged PR references this issue as of this run. Sibling context: the pkgs/id monolith split is #3447.

    Notes: a stack overflow in a parse path is worth treating as a potential product bug (unbounded recursion on adversarial input), not just a test bug — the intake expectation is that the worker determines which one it is before fixing. Risk: medium until that determination is made; effort/s assumes the parse-path guard shape.

    Suggested approach: reproduce under the test binary, bisect the input that drives the recursion, then bound the recursion or convert it to an explicit stack.

    🤖 Agent note · done

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-11-01T10:12Z
    • Found via: monitor reconciliation
    • Task: intake enrichment (protocol §5) — acceptance criteria appended, labels normalized, this review posted
    • Expectation: effort as labelled; done = acceptance criteria on the issue met by a fix PR
  5. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    source/queue-workerFiled or worked by the queue/worker pilot
    on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Second test in this family, found 2026-11-01 during queue task 2952 work on #168: cli::tests::source_only_mode_is_opt_in_and_requires_world_mode also stack-overflows the pkgs/id test binary (fatal runtime error: stack overflow, SIGABRT), reproduced in isolation on clean main bda855c66 with all local changes stashed — pre-existing, not a regression of the #168 change. It aborts the full --lib suite at that point, so suite runs stop there until this is fixed.

  7. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Data point from queue task 4859 (2026-11-01): the sibling test cli::tests::test_cli_parse_world_caps_ceiling also aborts the pkgs/id test binary with fatal runtime error: stack overflow (SIGABRT) when run alone with --exact on clean main b4c4a99 (laptop). This is why a bare world_caps test filter aborts: it substring-matches this cli test. The world_caps:: module tests themselves pass 16/16. Same parse-path family as test_cli_parse_cat.

  8. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  9. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  10. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: picked_up
    task: 8258 (repo-health-code-pilot, repo-worker-code — OpenChamber scheduled lane)
    state: claimed; fresh issue state OPEN; no held, user/owned, do-not-merge, or do-not-auto-edit labels
    at: 2026-11-03T21:08Z
    next: refresh main in task worktree, reproduce with cargo config active, and check for an existing fix PR before routing.

  12. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: triaged → closed (not planned)
    queue: repo-health-code-pilot
    task: 8258 (repo-worker-code — OpenChamber scheduled lane)
    at: 2026-11-03T21:24Z

    Triage finding (current main f34b6fd)

    The report is reproducible only when the compiled test harness is run directly without RUST_MIN_STACK: env -u RUST_MIN_STACK target/debug/deps/id-cf7e07685103fdc8 cli::tests::test_cli_parse_cat --exact --test-threads=1 aborts with stack overflow. The supported Cargo invocation from pkgs/id, cargo test --lib cli::tests::test_cli_parse_cat -- --exact --test-threads=1, passes (1 passed, 0 failed); running the same test binary with RUST_MIN_STACK=8388608 also passes (1/1). Current pkgs/id/.cargo/config.toml sets that value, and existing project docs (docs/2026-10-18T00-00-00Z_reference_platform_state/...) explain that the id tests require it and must be run from pkgs/id. The direct executable invocation bypasses Cargo config; no source/parser defect was reproduced in the supported test path. No relevant PR is linked to this issue.

    Disposition: not planned as a code fix; use the documented Cargo test command. If direct test-binary execution becomes a supported requirement, reopen with that requirement and address the test-thread stack usage explicitly.

  13. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: post-disposition current-main refresh
    task: 8258 (completed)
    at: 2026-11-03T21:27Z

    After the triage comment, the primary clone refreshed to main dcca6cd510866556a00dedb2c92b7d21cf817e2b. The eight commits since tested base f34b6fd4e do not change pkgs/id/src/cli.rs, pkgs/id/.cargo/config.toml, or the cited test-stack documentation; the relevant finding and disposition are unchanged.

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)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilottask/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