Skip to content

id(cli): module_trust_keys test stack-overflows on host runs (unbounded recursion), aborts full-lib suite #5216

Open

Description

@dezren39

Observed 2026-11-03 on the laptop (amd-6) while reproducing #5195 — unrelated subsystem, filed so it exists as a tracked problem:

cli::tests::module_trust_keys_are_repeatable_and_require_world_mode stack-overflows and aborts the whole lib test binary on host runs:

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

Evidence:

  • Reproduces in isolation (--exact) on the current-main lib binary and on several pre-existing primary-built lib binaries under ~/git/code/pkgs/id/target/debug/deps/ (id-6ef43893fd006436, id-b87063fabef9c143, id-ba32ff1f3cf2d9e3, id-cf7e07685103fdc8, id-d3684de534d38795, id-d6065620e2eebd91).
  • Still overflows with RUST_TEST_THREAD_STACK_SIZE=67108864 (64 MiB test-thread stack) — the recursion reads as unbounded, not merely deep.
  • Independent of working directory and of test-thread count.
  • Per the id(world_net): inbound_refusal_backpressures test is flaky — intermittent "a pre-auth refusal sheds the stream" #5195 record, the nix build .#id-web sandbox check phase the same day ran 3294 tests / 0 failed, so the trigger is host-environment-specific (something about the host filesystem/HOME the test walks, that the sandbox does not present).

Impact: any full cargo test -p id --lib run on the host aborts mid-suite, so host full-suite verification of the id package is currently impossible without skipping this test.

Acceptance: the test passes on host runs (or terminates with an ordinary failure, never a process abort), with the recursion source named in the closing comment; the nix check phase stays green.

Acceptance criteria

  • cli::tests::module_trust_keys_are_repeatable_and_require_world_mode completes without stack overflow on a host (laptop) run, in isolation (--exact) and inside the full cargo test -p id --lib suite, which runs to completion instead of aborting.
  • The unbounded recursion is identified and bounded at its source (named in the closing comment) — not masked by a larger test-thread stack.
  • The nix build .#id-web check phase stays green (it currently passes; the fix must not regress the sandbox run).

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 4, 2026
  2. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Broader than first filed: the overflow is a family across the whole cli module, not one test. Skipping tests one at a time surfaced, in order:

    • cli::tests::source_only_mode_is_opt_in_and_requires_world_mode — same stack overflow / abort.
    • cli::tests::test_cli_parse_cat_aliases — same (a plain CLI parse test).
    • cli::world_limits_args_tests::flag_defaults_match_the_built_in_limits and cli::world_limits_args_tests::flags_override_each_bound — same.

    Every crasher builds the clap command/args tree, which points at shared CLI-construction code recursing on something host-specific (the sandbox check phase passes these same tests). Full-lib host runs currently need --skip cli:: to complete at all.

  3. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    One more data point, same session: with the whole cli:: prefix skipped, the next crasher is commands::serve::tests::serve_server_config_flag_defaults_to_none — also a clap-tree-building test. The family is "every test that builds the CLI command tree", across cli::tests, cli::world_limits_args_tests, and commands::serve::tests so far. Root cause should be looked for in shared command construction (something it scans or expands on this host that the sandbox does not present).

  4. added
    priority/highImportant and time-sensitive
    effort/sSmall: expected under 2 hours of work
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 4, 2026
  5. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: Found while reproducing #5195 (different subsystem — flaky world_net test).

    Notes: Host-only failure with strong evidence: reproduces in isolation on current-main and on several pre-existing lib binaries, persists at a 64 MiB test-thread stack, while the nix sandbox check phase passed 3294 tests the same day — so the trigger is host-environment-specific (something in the host environment feeds the recursion: config, keyring, or filesystem state the sandbox lacks). No merged PR resolves this (filed 2026-11-04T00:19Z from the #5195 reproduction session; merged-PR search this run: none). Risks: a stack-size bump would mask it — the acceptance bars that. Suggested approach: get a backtrace under gdb/lldb or add a recursion-depth probe, and diff host vs sandbox inputs to the trust-key walk.

    — fleet monitor intake (protocol §5), 2026-11-03 18:12 CST run. Verified still live this run per the notes above.

  6. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 4, 2026
  7. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Agent note — task 9468 triaged

  8. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 4, 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/highImportant and time-sensitivetask/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