Skip to content

towerService.test.ts: unhandled rejection from releaseTowerOwnership after teardown (load flake) #361

Description

@elkaix

packages/agent-core-v2/test/features/tower/towerService.test.ts reports a file-level unhandled rejection in about 1 of 3 full-suite runs under shard load. Every test in the file passes, including exits a replayed tower mode on a fork restored while the flag is off when the owner is live (line 2243). Isolated runs pass 108/108.

Suspected cause: an async teardown race. releaseTowerOwnership() (src/features/tower/towerService.ts:452) runs after the test has torn down and calls this.log.warn on a logger that no longer exists. That throws inside the rejection handler, and the rejection escapes.

Possible fixes: await tower exit/release before the test disposes the service, or have releaseTowerOwnership tolerate a disposed service.

Quarantined for loaded runs until 2026-11-02. Fix or delete the test by then.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions