Repository navigation
test(mod): read only this plugin's part of the drawn band; mock the clock - #1177
Merged
Merged
Conversation
…lock Claude Code 2.1.325 draws every plugin's part of a surface side by side and tags each with part.plugin. The test harness adds its own default part, the word "engine". The dump helper read all parts, so 4 band tests saw one row too many (#1175). dump now reads only the context-guru part. The test "no data: the band is left to the engine" set up no clock, and the band reads the clock first (#1019). It now mocks the clock as boot() does, and it checks that the engine's own band shows. Fixes #1175 Fixes #1019 Assisted-By: Claude Signed-off-by: DAVID AMID <[email protected]>
amiddavid
commented
Nov 16, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (bob, user of @amiddavid) | IBM Bob Shell 1.0.3 | offload-review skill, @amiddavid's session | fresh | 1 of 2 | 1 of 2 | dc06dfd8ea3d |
approve |
Verdict: approve
Findings
None.
Non-blocking
None.
What I checked
- Scope: Test-only change. No behavior change. Fixes #1175 and #1019.
- Changed file:
context-guru-plugin/hooks/register.test.tsxonly. - Change 1 (lines 66-68): The
lines()helper now skips parts wherepart.pluginexists and is notcontext-guru. This handles Claude Code 2.1.325 drawing multiple plugin parts side by side. The filter logic is correct: it checksn.part?.plugin !== undefined && n.part.plugin !== 'context-guru', which skips non-context-guru parts while allowing parts with no plugin field to pass through. - Change 2 (lines 627-632): The "no data" test now mocks the clock before
session.start, matching the pattern inboot(). It also asserts that the engine's own band shows. This fixes #1019 where the band reads the clock before it knows there is no data. - Test correctness: Both changes are appropriate for their test scenarios. The filter prevents false failures from the test harness's own
enginepart. The clock mock prevents the engine from refusing the call. - No behavior change: The PR description states this is test-only. The diff confirms it. No production code changed.
- Data dependence: PR states no change. Correct for test-only changes.
- Conventions: Changes follow the existing test style. Comments reference the issue numbers (#1175, #1019).
amiddavid
commented
Nov 16, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (bob, user of @amiddavid) | IBM Bob Shell 1.0.3 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 1 of 2 | dc06dfd8ea3d |
approve |
Verdict: approve
Findings
None.
Non-blocking
None.
What I checked
- Read the full diff: 3 lines added to the
lines()helper function and 1 line added to the "no data" test - Verified the filter logic in
lines()function (lines 66-68):- Correctly filters out parts from other plugins when
part.pluginis defined and not 'context-guru' - Correctly keeps parts with no
part.plugintag (the engine's default part) - Correctly keeps context-guru's own parts
- Correctly filters out parts from other plugins when
- Verified the test change (line 631):
- The new assertion checks that the engine's band shows when context-guru has no data
- This matches the test's purpose and the comment explaining the behavior
- Verified the clock initialization fix (line 627):
- Clock is initialized before session start, preventing the band from reading an undefined clock
- References issue #1019 correctly
- Checked that the changes follow repo conventions:
- Verified no security, fail-open, or data loss concerns (test code only)
- Confirmed the change is backward compatible: nodes without
part.plugincontinue to work as before
amiddavid
added a commit
that referenced
this pull request
Nov 19, 2026
Plugin versions for v0.7.4: - Claude Code plugin 0.7.3 -> 0.7.4 (#1096, #1135, #1174, #1177, #1199, #1216). - Codex plugin 0.2.12 -> 0.2.13 (#1115, #1135). - Pi package 0.1.1 -> 0.1.2 (#1113). - Bob plugin 0.1.1 -> 0.1.2 (#1093, #1111, #1118, #1124, #1126, #1127). The owner's Bob hold (#1221) covers release tests only. - OpenCode: PINNED_VERSION v0.7.3 -> v0.7.4 in opencode-plugin/index.js, its README, docs/how-to/install-opencode-plugin.md and 3 tests. Behavior change: the version numbers; the OpenCode plugin's first start downloads proxy v0.7.4. Release bumps are approved by the owner ("I approve version bumps"). Data dependence: none. Reviews: 2 offload review rounds (GLM): both approve at ab79001. After it: 1422093, a merge of main with no hand resolution (remerge-diff 0; approval-still-valid: SAME CHANGE). Signed-off-by: DAVID AMID <[email protected]> Assisted-By: Claude Opus 5.5 <[email protected]>
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.
Summary
The plugin's band tests pass again: 123 pass, 0 fail with Claude Code 2.1.325. Before: 118 pass, 5 fail. Test-only change. No behavior change.
Fixes #1175. Fixes #1019.
What we found
part.plugin. The test harness adds its own default part, aTextwith the wordengine. Thedumphelper read all parts, so 4 tests saw one row too many.no data: the band is left to the engineset up no clock. The band reads the clock before it finds out that there is no data, so the engine refused the call.What changed
context-guru-plugin/hooks/register.test.tsx:lines()(used bydump) skips a part whosepart.pluginis notcontext-guru.boot()does. It now also checks that the engine's own band shows.Data dependence
No change. Tests only.
How it was tested
claude plugin test context-guru-pluginwith Claude Code 2.1.325: 123 pass, 0 fail.{"type":"Text","children":["engine"],"part":{"plugin":"test"}}, next to thecontext-gurupart.🤖 Generated with Claude Code