-
-
Notifications
You must be signed in to change notification settings - Fork 82.1k
Stable runtime aliases drop default exports β "reconcile is not a function" after every auto-compaction; compaction bookkeeping never persistsΒ #99677
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: π¦ diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.Broken existing behavior primarily owned by an M4/M5 scorecard surface.
Description
Activity
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: π¦ diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.Broken existing behavior primarily owned by an M4/M5 scorecard surface.
Type
Fields
Priority
None yet
Related: #78367 (compaction storms β this bug is a plausible contributing cause), #66263 (stale post-compaction context bookkeeping), #95553 (adjacent compaction-timeout area).
Problem
scripts/runtime-postbuild.mjswrites stable aliases for hashed runtime chunks as a bare star re-export:But
export * fromnever re-exportsdefault(ES module semantics). Several alias targets export onlydefault, so lazy consumers that destructure it getundefined.Concrete failure β after every successful auto-compaction:
because the selection chunk does:
while the target's only export is
export { reconcileSessionStoreCompactionCountAfterSuccess as default }.Impact
reconcileSessionStoreCompactionCountAfterSuccessnever persists the compaction count β post-compaction bookkeeping silently fails on every compaction, for every user of the published builds.Affected aliases (verified in the published
openclaw@2026.6.11tarball)CORRECTION (2026-07-04): module-level verification (
import()each hashed target, checktypeof m.default) shows exactly one alias target actually exportsdefaulttoday:embedded-agent-subscribe.handlers.compaction.runtime.jsβ the proven-broken reconcile path. The other six stable aliases (agent-runner,cli,devices-cli,models-cli,monitor-webhook,plugins-cli) point at chunks with no default export, so their star-only aliases are currently harmless (the original "7 affected" count came from a naive text scan foras default, which matched string content inside minified bundles β my mistake). The generator defect still applies to all aliases: any target that gains a default export silently loses it. Note for implementers: naive text matching also breaks the OTHER way β appendingexport {{ default }}to an alias whose target lacks one is a hardSyntaxErrorat import (we hit this live); detection must be against real export statements.Note:
scripts/stage-bundled-plugin-runtime.mjsemits the same bareexport * frompattern for plugin runtimes β not verified, but the same class.Fix
When the alias target has a default export, also emit
export { default } from ...β in both the stable-alias and legacy-compat writers. PR incoming with a regression test that mirrors the real reconcile chunk shape.Workaround (local, verified)
Append
export { default } from "./<HASH-target>.js";to each affected alias indist/β the reconcile error stops immediately. (Lost on every update, hence this report.)Environment
main(scripts/runtime-postbuild.mjslines ~323 and ~513)