Skip to content

id(cli): module_trust_keys_are_repeatable_and_require_world_mode stack-overflows, aborting the pkgs/id lib test binary #4751

Closed

Description

@dezren39

Problem

The lib test cli::tests::module_trust_keys_are_repeatable_and_require_world_mode in pkgs/id stack-overflows and aborts the whole test binary (SIGABRT), so a cargo test run of the id package cannot complete green.

Evidence (verified 2026-11-03, laptop)

  • On the task 6562 worktree (branch queue/6562-4633-admin-history-bytes, commit e9eae6c): cargo test --manifest-path pkgs/id/Cargo.toml module_trust_keys_are_repeatable → thread 'cli::tests::module_trust_keys_are_repeatable_and_require_world_mode' has overflowed its stack, fatal runtime error: stack overflow, aborting, exit via SIGABRT.
  • Reproduced identically on clean pre-merge main d05c22e7a (first parent of merge 66807e6 / PR fix(id/world): track retained admin-history bytes incrementally (#4633) #4747) in a fresh worktree — pre-existing on main, not caused by PR fix(id/world): track retained admin-history bytes incrementally (#4633) #4747 (which touches only pkgs/id/src/world admin-history accounting).
  • A full cargo test --manifest-path pkgs/id/Cargo.toml world run aborts in the lib binary at this test (487 tests running, process abort), masking the remaining lib results.

Acceptance

  • The named test passes without overflowing the default test-thread stack (fix the unbounded recursion / repeated parsing it exercises, or bound the work it does).
  • cargo test --manifest-path pkgs/id/Cargo.toml lib suite runs to completion on the laptop.

Found by queue worker lane B (task 6562 shift, 2026-11-02) while verifying PR #4747; filed per the file-the-issue rule.

Acceptance criteria

  • The test cli::tests::module_trust_keys_are_repeatable_and_require_world_mode in pkgs/id passes without overflowing the default test-thread stack — the unbounded recursion or repeated parsing it exercises is fixed or the work it does is bounded.
  • cargo test --manifest-path pkgs/id/Cargo.toml lib suite runs to completion (no SIGABRT) on the laptop / in CI.
  • No other pkgs/id test regresses, and the fix does not simply raise the test thread's stack size to mask a genuinely unbounded recursion in production code paths (if the recursion is in production code, the production path is bounded).

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

    @dezren39
    MemberAuthor

    Addendum (same verification pass, 2026-11-03): a second test overflows the same way — cli::tests::test_cli_parse_world_new_and_stats. Running the pkgs/id lib suite with module_trust_keys_are_repeatable_and_require_world_mode skipped proceeds to 486 tests and aborts at this one. So the defect is a cli::tests pattern (tests exercising the CLI world-mode parse path overflow the default test-thread stack), not a single test. Both names verified on the laptop on clean main d05c22e lineage and on the task 6562 worktree.

  3. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Second addendum (2026-11-03): a third overflowing test — cli::world_limits_args_tests::flag_defaults_match_the_built_in_limits. With cli::tests skipped, the lib run (471 tests) aborts there. The overflowing tests all exercise the CLI/world-limits argument-parsing path; the world::tests module itself is clean (160 passed, 0 failed on the task 6562 worktree). This issue now tracks the cli-args test stack overflows as a set.

  4. added
    priority/highImportant and time-sensitive
    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 3, 2026
  5. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Intake review

    • Agent: fleet monitor · repo-fleet-monitor run 2026-11-02 22:12 CST (intake enrichment, protocol §5)

    Liveness check: still live. No merged PR references module_trust_keys as a fix, no duplicate open/closed issue covers this stack overflow, and the only commit the search surfaces is the original F12.17 module-trust feature commit (2026-11-01) that introduced the test — not a fix. The filer's evidence already establishes the overflow reproduces on clean pre-merge main d05c22e7a, so this is pre-existing on main, not a PR #4747 regression.

    Related: PR #4747 (merged; the verification run that surfaced this), issue #1069 (module-trust feature lineage).

    Notes / risks: a SIGABRT in the lib test binary masks every remaining pkgs/id lib result (487 tests were running when it aborted), so the package currently has no complete green test signal — that is why this is priority/high despite a single named test. The likely fault is unbounded recursion or repeated parsing in the repeatable --world-module-trust-key handling the test exercises.

    Suggested approach: reproduce on the laptop with the filer's filtered cargo test command, get a backtrace / recursion site, and bound the recursion at its source. Do not accept a larger test-thread stack as the fix if the recursion lives in production code. CI-first verification per fleet policy: push the branch, read the pkgs/id results on the PR.

    Labels normalized this pass: kind/bug (existing), app/id (existing), priority/high, effort/s, status/needs-triage, source/queue-worker, meta/enriched. An ## Acceptance criteria section was appended to the body (original body preserved verbatim above it).

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

    @dezren39
    MemberAuthor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7445 (triage, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

  8. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: triaged
    task: 7445 (repo-health-code-pilot, repo-worker-code, lane code-o)
    state: REPRODUCED at current main — fix enqueued as task 8955.

    Reproduction (fresh, laptop, 2026-11-04T00:41-00:52Z)

    • Worktree ~/git/fleet/7445 (branch queue/7445-4751-cli-stack-overflow) at main 65c7ff6.
    • cargo test --manifest-path pkgs/id/Cargo.toml --lib module_trust_keys_are_repeatable_and_require_world_mode -- --exact cli::tests::module_trust_keys_are_repeatable_and_require_world_mode compiled (10m14s), then: thread has overflowed its stack; fatal runtime error: stack overflow, aborting; SIGABRT (signal 6), exit 101.
    • So the defect is still live at current main, not a stale report. The two sibling overflowing tests named in the 2026-11-03 addenda (cli::tests::test_cli_parse_world_new_and_stats, cli::world_limits_args_tests::flag_defaults_match_the_built_in_limits) are included in the fix scope as a set.
    • No fix PR exists (search for 4751/module_trust_keys found only unrelated merged PR mcpx: shebang-first interpreter dispatch + script.interpreter + script.cwd (#2167) #2611); no hard-stop labels on this issue.

    Routing: fix task 8955 enqueued (small_fix, priority 50) — bound the recursion/repeated parsing in the CLI/world-limits parse path at the production source; do not merely raise the test-thread stack. This triage task 7445 completes as triaged.

  9. 10 remaining items

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

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: repo-worker-code (lane code-t, direct execution lane)
    • Task: task 8955
    • State: claimed — reproducing on the laptop at current main, locating the unbounded recursion in the CLI/world-limits parse path exercised by the three named tests.
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked — PR open, awaiting PR guard check

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

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  15. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  16. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done
    task 8955 (repo-health-code-pilot), lane code-n, worker repo-worker-code (resuming PR work from task 8953 / lane code-t).
    PR #5329 MERGED at 2026-11-04T08:20:35Z, merge commit fd961f6; this issue auto-closed. Verification: PR body records the three named tests passing and the full pkgs/id lib suite at 2105 passed / 0 failed on the laptop; Codex review completed with no findings and no unresolved review threads. The one failing check (production line limit on pkgs/id/src/world/core.rs, 2515) was verified pre-existing on clean main 62aba6b and is tracked by issue #5358; PR #5329 does not touch that file.

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-sensitivesource/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