fix(twitch): export clearRegistryForTest for cross-test isolation (#83887)#84309
Conversation
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the narrow registry helper and regression test through the existing automerge path once exact-head checks pass, then close #83887 as fixed. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Is this the best way to solve the issue? Yes. A test-only registry clear helper mirrors the existing TwitchClientManager.clearForTest() pattern and avoids changing production cache semantics. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 00da318350e2. |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
0dbda6b to
fb964fc
Compare
|
ClawSweeper PR egg ✨ Hatched: 🌱 uncommon Brave Diff Drake Rarity: 🌱 uncommon. What is this egg doing here?
|
fb964fc to
d91985b
Compare
…3887) `client-manager-registry.ts` holds a module-level `Map<accountId, RegistryEntry>` for `getOrCreateClientManager`. `TwitchClientManager` in the sibling module already acknowledges that module-level state needs a test escape hatch (`clearForTest`), but the registry lacks the equivalent. Under vitest `--isolate=false` (or any harness that keeps the module graph hot across tests) a test that calls `getOrCreateClientManager('default', loggerA)` leaves its entry behind, and the next test calling the same factory silently gets loggerA's manager — chasing a phantom mock-assertion bug becomes the failure mode. Add an exported `clearRegistryForTest()` that calls `registry.clear()`, mirroring `TwitchClientManager.clearForTest`. No production behavior change — production code never calls this.
…3887) Co-authored-by: hcl <7755017+hclsys@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
d91985b to
38c3fad
Compare
…3887) (#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (#8… Validation: - ClawSweeper review passed for head 38c3fadc91636aeaff0e37397608512d8d713703. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fadc91636aeaff0e37397608512d8d713703 Review: openclaw/openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…3887) (#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (#8… Validation: - ClawSweeper review passed for head 38c3fadc91636aeaff0e37397608512d8d713703. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fadc91636aeaff0e37397608512d8d713703 Review: openclaw/openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…enclaw#83887) (openclaw#84309) Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (openclaw#8… Validation: - ClawSweeper review passed for head 38c3fad. - Required merge gates passed before the squash merge. Prepared head SHA: 38c3fad Review: openclaw#84309 (comment) Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Makes #84244 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.
ClawSweeper 🐠 replacement reef notes:
Inherited issue-closing references from the source PR:
Fixes #83887
Co-author credit kept:
fish notes: model gpt-5.5, reasoning high; reviewed against 0dbda6b.