Skip to content

fix(tokenjuice): preserve Code Mode tool results - #194898

Merged
vincentkoc merged 1 commit into
mainfrom
fix/tokenjuice-code-mode-v0.11.0
Nov 8, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/tokenjuice-code-mode-v0.11.0

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Tokenjuice can compact structured Code Mode results when an exec call's normalized command field contains JavaScript.

Related: vincentkoc/tokenjuice#426

User Impact

Code Mode results retain their text and metadata. Shell-output compaction and exact file-read preservation continue through the existing middleware.

Why This Change Was Made

Consume the released tokenjuice 0.11.0 fix at its owning adapter, with no duplicate guard or production middleware changes. Update the exact dependency pin, generated lockfile, and existing release-age exception; its expiry is seven days after npm publication. Extend the real packaged middleware test with one normalized Code Mode result and a matching 15-line test-budget allocation.

Evidence

  • Published upstream release and successful native publication. The downloaded npm tarball matches its integrity pin; provenance binds the release workflow, tag, and source commit 8bd33d4c692ca73bad988b1cdd59dd0e795cc792.
  • Native precommit formatting, config-doc freshness, and line-cap checks passed. git diff --check passed.
  • Local ClawSweeper completed the source review of 3651abf..e5d0245 at high reasoning: no actionable correctness or security findings.
  • Baseline negative control: recorded main f36afaf with tokenjuice 0.10.0 and only this regression test applied. The actual middleware preservation assertion failed with [tokenjuice compacted bash output] (1 failed, 1 passed). Restored the test patch before checking out the candidate.
  • Candidate e5d0245 with its own frozen dependency graph: native review-tests passed both Tokenjuice test files, 8/8 tests. This covers actual packaged Code Mode preservation, shell compaction, exact reads, cache behavior, and existing normalization/error siblings.
  • pnpm build:ci-artifacts, pnpm tsgo:extensions:test, focused native oxlint, and format checks passed. The build covers runtime packaging, built plugin load checks, SDK entry declarations/exports, UI and metadata; full global declaration emission and full release packaging were not run. This change modifies no public API or declaration source.
  • Exact-head CI passed: 37 successful jobs, 27 intentionally skipped, no failures.
  • Test cost: local wrapper 42.63s / Vitest 38.25s (91% transformation); packaged preservation assertion 9ms and cache test 315ms. CI changed-code and changed-boundary jobs took 152s and 72s including setup; those aggregate job times do not isolate Tokenjuice.

@vincentkoc vincentkoc self-assigned this Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review ended

ClawSweeper stopped reviewing this revision because the pull request closed.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added extensions: tokenjuice Changes to the bundled tokenjuice extension size: XS labels Nov 8, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 8, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 8, 2026 01:14
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: e5d024562acd50ad75a8557dded7141b8c94451f
  • Maintainer: @vincentkoc
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • pnpm-workspace.yaml
  • extensions/tokenjuice/package.json

Carefully review these changes before merging.

@vincentkoc
vincentkoc enabled auto-merge (squash) November 8, 2026 01:16
@vincentkoc
vincentkoc disabled auto-merge November 8, 2026 01:17
@vincentkoc
vincentkoc merged commit 9cb293d into main Nov 8, 2026
218 of 219 checks passed
@vincentkoc
vincentkoc deleted the fix/tokenjuice-code-mode-v0.11.0 branch November 8, 2026 01:31
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 8, 2026
Consume tokenjuice 0.11.0 so normalized Code Mode calls retain their complete tool results. Update the exact dependency pin, generated lockfile and version-specific release-age exception; the upstream adapter owns the fix, with no duplicate middleware guard.

Allocate exactly 15 net test lines in tokenjuice-code-mode-results.txt to prove the original failure through the actual packaged middleware: a normalized code/command pair must preserve structured result text and metadata. The shared test-line scalar is unchanged.

The regression failed with tokenjuice 0.10.0 and passed at the reviewed candidate with 0.11.0; both Tokenjuice test files passed (8 tests). Native build:ci-artifacts, extension test typecheck, focused lint and formatting passed. The build covers runtime packaging and SDK entry declarations/exports, without full global declaration emission.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. dependencies-changed PR changes dependency-related files extensions: tokenjuice Changes to the bundled tokenjuice extension size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant