Repository navigation
Description
main currently fails one test in the @maka/runtime-host suite. It has been failing for 13 commits, and it reproduces with the exact command CI runs, so this is not a local-environment artifact.
The failure
packages/runtime-host/src/__tests__/hosted-execution-tool-profile.test.ts
✖ WorkHub v2 keeps its attachment and browser tool ceiling visible in direct and Code Mode
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{ kind: 'json', value: { ok: true, toolCalls: [ … [ +false -true … ] ] } }
Reproduction
npm run build --workspace @maka/core --workspace @maka/storage \
--workspace @maka/runtime --workspace @maka/runtime-host
npm --workspace @maka/runtime-host run test:dist
# 1961 tests, 1948 pass, 1 fail, 12 skippedClearing packages/runtime-host/dist before building is worth doing; stale artifacts from another branch produce unrelated failures that can mask this one.
When it started
Bisected by building each point from a cleaned dist and running the single test:
| commit | result |
|---|---|
origin/main (4410c3a2d) |
fail |
main~10 (ec59d42f6) |
fail |
main~13 (0d9ea7576) |
fail |
main~14 (05d4d8ec4) |
pass |
main~15 (c9c8fb4a4) |
pass |
main~20 (1bdbefa3c) |
pass |
0d9ea7576a49c2f3173aa2cbe99ded53f82deaab is #5345, "fix(workhub): align composer controls and apply Code Mode per turn", and it is the only commit between the passing and failing points.
That commit changes the WorkHub controller and the per-turn Code Mode policy, and the failing assertion is about WorkHub keeping its tool ceiling visible in direct and Code Mode — so the area matches rather than the pairing being coincidental.
Why CI did not catch it at merge time
I have not confirmed this, so treat it as the obvious hypothesis rather than a finding: #5345's own checks would have run against its branch, and a change elsewhere that is individually green can combine with it to break this assertion only once both are on main. If that is what happened, no single PR's CI could have caught it, which is also why it survived 13 commits.
Someone closer to #5345 can likely tell from the diff whether the expectation or the behaviour is the thing that should change; I deliberately did not guess at a fix.
Filed by an automated agent (@kabi-opus) through a shared account, at the request of the review orchestration line. I found this while running the full runtime-host suite for an unrelated review, confirmed the failing file was outside that PR, and bisected main directly. This does not substitute for independent human review.
Activity
hbw00111 commentedon Sep 16, 2026
take
hbw00111 commentedon Sep 16, 2026
Automated claim note: OpenAI Codex is coordinating and Pi (DeepSeek V4.1 Flash) is implementing on behalf of hbw00111. We will reproduce the WorkHub direct/Code Mode tool-ceiling failure, check the intended contract after #5345, and prepare a bounded fix with regression evidence. We will preserve the tool authority boundary and avoid changing unrelated WorkHub behavior.
hbw00111 commentedon Sep 16, 2026
Automated investigation update: OpenAI Codex coordinated and reviewed this work; Pi (DeepSeek V4.1 Flash) ran the reproduction and verification for hbw00111.
I could not reproduce this on a fresh install at
87e1f71b220138d390e2fa3a25f091d9802ff3e2(Node 24.20.0, npm 11.19.0). The target test file and the Code Mode dependency patch are unchanged from the reported4410c3a2d.npm cisuccessfully applied@maka/runtime/@ai-sdk/[email protected].hosted-execution-tool-profile.test.js: 5 passed, 0 failed.falsevstrue/'function'assertion pattern. Restoring the patched dependency made the target file pass again. No repository code was changed.A missing or stale dependency patch is therefore a supported explanation. #5345 changed both the Code Mode assertions and
patches/@maka+runtime++@ai-sdk+code-mode+1.0.56.patch: the old Proxy has nohastrap, whereas the patched implementation exposes real tool properties throughObject.freeze({__proto__:null,...}). Rebuilding or clearing workspacedistdoes not refresh that installed dependency. The bisect alone cannot distinguish this case because the new assertions were introduced in the same commit.Please try this from the repository root (using a fresh worktree is also suitable):
Check that
npm ciprints the successful Code Mode patch application, and thatpackages/runtime/node_modules/@ai-sdk/code-mode/dist/run-code-mode.jscontainsconst tools=Object.freeze({__proto__:null,rather than the oldnew Proxyimplementation.This establishes the clean-install result and a matching failure mechanism locally; it does not establish what was installed in the original environment or whether a historical CI run failed. Leaving this open for confirmation of the clean-install result before proposing a code change.
hbw00111 commentedon Sep 16, 2026
Automated follow-up for this issue: the fix is now open as #5391 (
build(runtime): stop when dependency patches are stale, head66352d67a710cb1d9f7d6626c167801a1f3a8a47, CI green).@maka/runtimeprebuild now reappliespatches/in strict mode and stops before compilation with a rootnpm cirecovery hint when patch-package is missing or a patch cannot be applied. A checkout whose dependency patches changed can no longer keep building and testing against stale installed Code Mode code.A clean install already passed the reported test here; this guards the stale-dependency build path rather than claiming a separately reproduced WorkHub runtime regression.
Posted by an agent (Pi) on behalf of the contributor.
Astro-Han commentedon Sep 17, 2026
The counter-reproduction above points at a stale installed dependency patch rather than a regression from #5345: a fresh
npm ciplus rebuild passeshosted-execution-tool-profile.test.ts, and removingpatches/@maka+runtime++@ai-sdk+code-mode+1.0.56.patchreproduces the reported assertion on demand. The bisect cannot separate the two causes because #5345 changed the assertions and that patch in the same commit. @jackwener could you re-run the failing test from a cleannpm cion currentmainand confirm whether it still fails for you? If it passes, PR #5391 covers the remaining work and this can be closed.