Repository navigation
fix(server): stale toolBroker test; activity-label no-op clears + bounded maps (GHE #341, #202, #203) - #149
Draft
johnnyelwailer wants to merge 2 commits into
Draft
johnnyelwailer wants to merge 2 commits into
johnnyelwailer wants to merge 2 commits into
Conversation
Owner
Author
Codex review (refute-first) — 1 confirmed bug + 1 partial; NOT fixed yet, PR stays draft
Verified clean: FIFO cap + eviction tests; timer cancellation on evict/forget; idle/deletion ordering is sequential in one stream fiber. |
Owner
Author
|
Both Codex findings fixed in the 2nd commit (new sibling |
johnnyelwailer
pushed a commit
that referenced
this pull request
Sep 2, 2026
… results after forget() Codex review findings on PR #149: (1) FIFO eviction dropped the pending entry that clear() gated on, so a persisted label was never cleared — a sibling persist tracker now records 'label persisted' independently of pending, clear() persists null whenever a label is persisted, and eviction of such a thread persists the null clear; (2) generation ran detached and did not re-check after await persist — a per-thread epoch bumped by forget() is checked before and after the await. Tests 35/35 (2 new). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Thread transfer impact
This comment will update automatically after the next completed run. |
…persists no-op clears and bounds its maps GHE #341: the "binds generic thread tools without a stored view context" expectation was missing t3team.orchestration.status / .resume, which genericThreadToolIds has bound since 58c8d66 — red on pristine main. GHE #202: summarizer.clear() persisted `thread.meta.update {activityLabel: null}` on every idle-type event even when no label was ever noted for the thread (flag off, no activity). It returns early when there is no pending state, so idle threads stop bumping updatedAt. GHE #203: userGistByThread (reactor) and windowByThread (summarizer) were pruned only on idle; a thread that never idles leaked until restart. Both now use one small sibling createBoundedThreadMap (insert-time FIFO cap of ACTIVITY_LABEL_MAX_TRACKED_THREADS = 500, onEvict hook), and the reactor subscribes to thread.deleted (same pattern as t3team-threadToolContextEvictionReactor) to forget() without persisting. Tests: toolBroker + activityLabelSummarizer + boundedThreadMap — 33/33. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… results after forget() Codex review findings on PR #149: (1) FIFO eviction dropped the pending entry that clear() gated on, so a persisted label was never cleared — a sibling persist tracker now records 'label persisted' independently of pending, clear() persists null whenever a label is persisted, and eviction of such a thread persists the null clear; (2) generation ran detached and did not re-check after await persist — a per-thread epoch bumped by forget() is checked before and after the await. Tests 35/35 (2 new). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
johnnyelwailer
force-pushed
the
fix/toolbroker-test-activity-label-341-202-203
branch
from
September 9, 2026 16:25
00f4612 to
6c4d4d3
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Distro issues: nexplore.ghe.com/pj/nexi-distribution#341, #202, #203.
What
t3team.orchestration.status/.resume(live since 58c8d66); was red on pristine main.clear()skips themeta.updatepersist when the thread never had pending label state.createBoundedThreadMap(new sibling, FIFO cap 500,onEvict) backs both per-thread maps; reactor forgets state onthread.deleted(pattern copied fromt3team-threadToolContextEvictionReactor).Receipts
pnpm exec vp test run src/t3team-toolBroker.test.ts src/t3team-activityLabelSummarizer.test.ts src/t3team-boundedThreadMap.test.ts→ 33/33forget(); a proper split of these two files is separate debt)Codex review pending.
🤖 Generated with Claude Code