Skip to content

fix: reconcile ActionExecutor merge conflicts and restore regressions - #390

Open
MyTH-zyxeon wants to merge 1 commit into
Lilly-Protocol:mainfrom
MyTH-zyxeon:fix/action-executor-merge-regression-20260906
Open

fix: reconcile ActionExecutor merge conflicts and restore regressions#390
MyTH-zyxeon wants to merge 1 commit into
Lilly-Protocol:mainfrom
MyTH-zyxeon:fix/action-executor-merge-regression-20260906

Conversation

@MyTH-zyxeon

@MyTH-zyxeon MyTH-zyxeon commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Scope

Follow-up to #368 and the tool-budget behavior discussed in #256. The final merged #368 diff retained only imports, not its original regression cases. On current main 79af57bb39926d672b3595e66286df7ed85c0e9d, ActionExecutor cannot transform because tool is declared twice. It also references undefined constructor variables, calls ToolDefinition.execute with the wrong argument shape, and emits event names absent from RuntimeEventMap.

This two-file repair reconciles only ActionExecutor:

  • Preserve existing numeric budget, second/third/fourth-position logger injection, event-bus injection, numeric fourth-position retention cap, and reset APIs.
  • Check the budget before lookup, reserve only after lookup succeeds, and reserve before awaiting the tool.
  • Dispatch { payload, context }, retain the typed runtime.tool.invoked event and its timestamp, and restore existing completion duration logging. No new event types or logging are introduced.
  • Restore bounded FIFO counter retention, with failed lookups leaving existing counters untouched.
  • Add 14 direct-import regression cases for constructor contracts, in-flight and failed-tool accounting, guard precedence, retention and resets. Existing checkout branches and unrelated files were not changed.

Validation

  • Before: vitest run tests/action-executor.test.ts cannot collect tests due to duplicate tool declaration. TypeScript reports constructor, tool-call and event-contract errors in ActionExecutor.
  • After: vitest run tests/actions/action-executor-merge-regression.test.ts tests/actions/log-tool-duration.test.ts tests/actions/tool-call-budget.test.ts tests/events/tool-invoked.test.ts: 21 tests passed across 4 files.
  • Changed-file ESLint and Prettier pass. TypeScript has no diagnostics in either changed file or the logger-injection caller.
  • Whole-repository validation is still failing. tsc --noEmit reports 48 errors outside the changed files. Full Vitest: 55 failed files / 36 passed; 12 failed tests / 212 passed. Unrelated duplicate declarations in memory/runtime and conflicting event/logger tests remain untouched. This PR does not claim to make all CI green.
  • Existing main CI 34023000146 stops at repository-wide formatting before reaching tests. Only the changed files are formatted here.
  • Exact-head PR CI 34027171688 also stops at formatting: Node 22 failed on 30 unchanged files and Node 20 was cancelled. Neither changed file is reported by that formatting failure.

AI-assisted implementation, with local reproduction and tests. This is a corrective follow-up, not an exclusive bounty claim or a claim that an award/payment is due. The amount advertised on #256 remains unverified for sponsor approval and eligibility.

Run-Id: run-f340b98b-3e70-4cba-b543-e9bcd5e5b105
Trace-Id: cd0b1e2ac2394d3b873fc5b937def716
Requester: scheduled automation monitor-sxt-bounty-pr-1757 (Discord sender metadata not supplied)
Implementer: MISA 3 bot ID 1516725819517567077

Run-Id: run-f340b98b-3e70-4cba-b543-e9bcd5e5b105
Trace-Id: cd0b1e2ac2394d3b873fc5b937def716
Requester: scheduled monitor-sxt-bounty-pr-1757
Implementer: MISA 3 bot ID 1516725819517567077
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.

1 participant