Skip to content

id(test): test_cli_parse_world_new_and_stats stack-overflows under default libtest stack — abort hides all lib test results #4327

Open

Description

@dezren39

Problem

Lib test cli::tests::test_cli_parse_world_new_and_stats (pkgs/id/src/cli.rs) stack-overflows and aborts the whole lib test binary when run under the default libtest thread stack in a local debug build:

thread 'cli::tests::test_cli_parse_world_new_and_stats' has overflowed its stack
fatal runtime error: stack overflow, aborting

Evidence (2026-11-02, queue worker lane D, task 5655)

  • Reproduced on the laptop in two independent worktrees: ~/git/fleet/5655 (branch queue/5655-3144-new-subcommand) and ~/git/fleet/5215 (an unrelated branch state) — cargo test --manifest-path pkgs/id/Cargo.toml --no-default-features --features web --lib test_cli_parse_world_new_and_stats. The 5215 reproduction shows it is pre-existing, not caused by the task 5655 change.
  • Neighboring parse tests for issue id(find/search/show/peek): a zero count is accepted everywhere — '--first 0'/'--last 0' report 'no matches found' for queries that do match, and 'peek --lines 0' renders a preview with no content lines #3059 in the same module already wrap their bodies in std::thread::Builder::new().stack_size(8 * 1024 * 1024) for exactly this reason (deep clap command-tree build/parse recursion vs the 2MiB test thread stack); test_cli_parse_world_new_and_stats calls Cli::parse_from directly and never got the workaround. The new task 5655 parse tests needed the same treatment.
  • Because the overflow aborts the process (SIGABRT), one overflowing test hides the results of every other test in the same filtered run.

Acceptance

Acceptance criteria

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 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Second data point (2026-11-02, task 5515 verification): also stack-overflows and aborts the lib test binary under the default libtest stack on the laptop, in a run at PR #4288's head — after every world_doctor test itself had passed. Same fix pattern applies: big-stack thread like the #3059 tests.

  3. added
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    source/queue-workerFiled or worked by the queue/worker pilot
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 2, 2026
  4. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Intake review

    🤖 Agent note · filed

    Related: issue #3059 (existing spawned-thread pattern in the same file).
    Notes: Still live — independently re-confirmed 2026-11-02T12:20Z by a queue lane: the full id lib test binary aborts on this pre-existing stack overflow on binaries without other changes. It blocks trusting full-suite local tallies, which is why priority is normal rather than low.
    Risks: Low; test-harness change. Do not weaken the test's assertions to make it fit.
    Suggested approach: Run the test body on a spawned thread with an explicit large stack, following the #3059 pattern already in pkgs/id/src/cli.rs.

  5. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · evidence added

  6. 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
  7. 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

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

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked up (task 8383, triage)
    Agent: repo-worker-code (openchamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727)
    Task: triage at current main — verify the stack overflow still reproduces or is already handled, then scope the fix or close with evidence.

  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (task 8383)
    Agent: repo-worker-code — OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727
    Found via: current-main triage of queue task 8383

    Revalidated open at current main (origin/main 3e363c9); no active PR for #4327. The defect is still present in source: test_cli_parse_world_new_and_stats (cli.rs:4745) and test_cli_parse_world_boot_window (4375) call Cli::parse_from on the default libtest thread; additional world parse tests from about line 4130 onward likewise parse directly. The existing parse_normalized helper (2582) uses a 32 MiB spawned thread, but the world tests do not use it.

    Fix path is scoped: run the exposed world CLI parse test bodies on a larger-stack thread, following the existing helper / #3059 pattern; extend to the exposed direct-parse world test family, not only the originally named test. Preserve assertions. Verify the named test, then cargo test -p id --lib cli:: and the full id lib suite. This lane's --features web attempt could not compile because clean main lacks generated pkgs/id/web/dist; a world-only reproduction retry was started. Prior issue evidence (and task 6562) already reports clean-main reproductions for this family. No code fix or competing PR was created.

  11. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  12. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
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)queue/parkedQueue task is parked (waiting on CI, time, or an event)source/queue-workerFiled or worked by the queue/worker pilotstatus/parkedDeliberately paused with a recorded resume conditiontask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions