Skip to content

🩹 fix: Stub the Attached Route in the Lane Recording Specs - #16840

Merged
berry-13 merged 1 commit into
devfrom
berry-13/fix-toolservice-spec
Oct 6, 2026
Merged

berry-13 merged 1 commit into
devfrom
berry-13/fix-toolservice-spec

Conversation

@berry-13

@berry-13 berry-13 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

ToolService.spec.js fails on dev in Tests: api (shard 3/3) for every open PR. #16793 added three lane-recording tests that stub the code route with mockResolveCodeExecutionContext, and #16798 merged afterwards and removed that mock when the per-agent code rule moved into resolveAgentCodeExecution. The tests now throw a ReferenceError before reaching any assertion. The code is correct; only the test setup was stale.

The three tests now describe the attached route the way the neighbouring attached-workspace tests do: an attached environment in statefulCodeSessions.environments and code_environment_id on the agent. Their assertions are unchanged. Lane recording (createLaneGitRecorder) is only wired in the attached-workspace branch of loadToolsForExecution, which is the route these tests now reach, so no other route needs coverage.

Type of change

  • Tests / tooling / CI

Testing

Tested environments/configuration: Node 24, jest in api, no external services.

Automated tests:

  • cd api && npx jest server/services/__tests__/ToolService.spec.js: 158 passed (the three failing tests were reproduced first, all with mockResolveCodeExecutionContext is not defined).
  • npx eslint and npx prettier --check on the spec: clean.

Screenshots / recordings

Not applicable.

Risk / compatibility

None. Test-only change.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors

Copilot AI balanced review requested due to automatic review settings October 6, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T15:50:02.745095Z ce46098 PR opened
🔒 Security Review ✅ Completed 2026-10-06T15:49:09.190991Z ce46098 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@berry-13
berry-13 merged commit 225aa91 into dev Oct 6, 2026
35 checks passed
@berry-13
berry-13 deleted the berry-13/fix-toolservice-spec branch October 6, 2026 18:03
Vidminas added a commit to Vidminas/plastic-ai that referenced this pull request Oct 9, 2026
Stops before LibreChat-AI#16798, whose ToolService spec uses an
undeclared mock (fixed on dev by LibreChat-AI#16840).
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