Skip to content

test(mod): read only this plugin's part of the drawn band; mock the clock - #1177

Merged
amiddavid merged 1 commit into
mainfrom
band-tests-engine
Nov 16, 2026
Merged

amiddavid merged 1 commit into
mainfrom
band-tests-engine

Conversation

@amiddavid

Copy link
Copy Markdown
Collaborator

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

What changed

Data dependence

No change. Tests only.

How it was tested

  • claude plugin test context-guru-plugin with Claude Code 2.1.325: 123 pass, 0 fail.
  • The raw drawn tree of the short-band test shows the extra part: {"type":"Text","children":["engine"],"part":{"plugin":"test"}}, next to the context-guru part.

🤖 Generated with Claude Code

…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 amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.tsx only.
  • Change 1 (lines 66-68): The lines() helper now skips parts where part.plugin exists and is not context-guru. This handles Claude Code 2.1.325 drawing multiple plugin parts side by side. The filter logic is correct: it checks n.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 in boot(). 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 engine part. 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 amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.plugin is defined and not 'context-guru'
    • Correctly keeps parts with no part.plugin tag (the engine's default part)
    • Correctly keeps context-guru's own parts
  • 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:
    • Comment style matches surrounding code
    • Test assertion style is consistent
    • References issues #1175 and #1019 appropriately
  • Verified no security, fail-open, or data loss concerns (test code only)
  • Confirmed the change is backward compatible: nodes without part.plugin continue to work as before

@amiddavid amiddavid closed this Nov 16, 2026
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 16, 2026
@amiddavid amiddavid reopened this Nov 16, 2026
@amiddavid
amiddavid merged commit e1b11ca into main Nov 16, 2026
12 of 13 checks passed
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

1 participant