Skip to content

test(transform): pad the newest-20 skeleton window for the legacy full-drop expectation#138

Merged
ualtinok merged 1 commit into
cortexkit:masterfrom
iceteaSA:fix/transform-test-skeleton-window
Jun 12, 2026
Merged

test(transform): pad the newest-20 skeleton window for the legacy full-drop expectation#138
ualtinok merged 1 commit into
cortexkit:masterfrom
iceteaSA:fix/transform-test-skeleton-window

Conversation

@iceteaSA

@iceteaSA iceteaSA commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Title: test(transform): pad the newest-20 skeleton window for the legacy full-drop expectation

Problem

db7bc0a (feat(ctx-reduce): keep tool skeletons for drops in the newest-20
window) changed drop semantics — agent drops of a tool call within the newest
20 tool tags now truncate in place instead of full removal — and updated
apply-operations.tool-drop.test.ts accordingly via the padSkeletonWindow
helper. One older test was missed:

transform.test.ts › createTransform › applies pending drop operations when scheduler executes

That test queues drops on a 2-message session, which is trivially inside the
skeleton window, so the dropped tool-only assistant message now survives as a
truncated skeleton and the test's "fully dropped, shell stripped"
expectation (toHaveLength(1)) fails.

Reproduced on pristine master (4e3635c) in a clean worktree:

ref transform.test.ts
v0.23.0 37 pass / 0 fail
master (4e3635c) 36 pass / 1 fail

Fix

Same remediation db7bc0a applied to its own file's legacy tests: insert 20
newer tool tags before queueing the drops, pushing the real tag out of the
newest-20 skeleton window so the test keeps exercising the deep-history
FULL-removal path its assertions document. No production code touched;
behavior coverage for the new skeleton path already lives in
apply-operations.tool-drop.test.ts.

Verification

  • bun test src/hooks/magic-context/transform.test.ts → 37 pass / 0 fail
  • full packages/plugin suite → 2082 pass / 0 fail (with this one-file change
    on top of master)

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Pads the newest-20 skeleton window in packages/plugin/src/hooks/magic-context/transform.test.ts by inserting 20 tool tags so the test continues to assert full removal for deep-history drops. Fixes the failing test after the tool-skeleton change; no production code changed.

Written for commit dc30ca8. Summary will update on new commits.

Review in cubic

…l-drop expectation

Upstream db7bc0a (tool skeletons for newest-20 drops) updated
apply-operations.tool-drop.test.ts via padSkeletonWindow but missed this
transform-level test, which queues drops on a 2-message session — trivially
inside the skeleton window, so the dropped tool now survives as a truncated
skeleton and the 'fully dropped' assertion fails on PRISTINE upstream/master
too (verified in a clean worktree: v0.23.0 passes 37/37, 4e3635c fails 36/37).
Same remediation upstream applied to its own tests: insert 20 newer tool tags
so the drop exercises the deep-history full-removal path the test documents.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

iceteaSA has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@ualtinok ualtinok merged commit cb0f2a1 into cortexkit:master Jun 12, 2026
3 checks passed
ualtinok added a commit that referenced this pull request Jun 12, 2026
…ow padding

PR #138 padded the tool tag out of the skeleton window (full-removal path)
while my local availability-gate branch had rewritten the same test for the
in-window skeleton path. After rebasing onto the merged PR both halves were
present and contradicted each other: padded window + skeleton assertions.
Keep the contributor's full-drop shape here; the in-window skeleton path is
covered by apply-operations.tool-drop.test.ts.

Co-authored-by: Alfonso [Magic Context] <288211368+alfonso-magic-context@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants