Skip to content

chore: merge feature/OHI fixes to main - #2978

Merged
dungdong-aws merged 9 commits into
Amazon-Q-Developer:mainfrom
dungdong-aws:chore/ohi-to-main-exclude-hezelin
Oct 28, 2026
Merged

dungdong-aws merged 9 commits into
Amazon-Q-Developer:mainfrom
dungdong-aws:chore/ohi-to-main-exclude-hezelin

Conversation

@dungdong-aws

@dungdong-aws dungdong-aws commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Change

Brings the feature/OHI fixes that are not yet on main into main, as cherry-picks (-x, original SHAs in each commit message).

Included (in original order)

OHI commit Original PR Change
e31138996 #2786 fix: stop pinned context leaking to new chat windows
c812bea34 #2927 fix(amazonq): stop memory bank analysis from blocking the language server
a4941a4f5 #2939 fix(amazonq): match recorded approvals for Windows paths
1dd370212 #2936 fix(amazonq): restore MCP permissions for legacy and duplicate servers
92ca07299 #2935 fix(amazonq): honour configured MCP tool call timeout
4fa62f703 #2938 fix(amazonq): say so when a request fails on a usage limit
d8759bb55 #2955 chore(chat-client): use Mynah UI 4.40.5 beta
2fa273711 #2871 fix(amazonq): mark oversized file context as truncated instead of cutting silently
5be2d6b4f #2977 chore(chat-client): bump mynah-ui to 4.40.5

All other feature/OHI commits are already on main (same subject/PR merged separately), including the release-bot and agentic version bump commits, so they are not repeated here.

How this was checked

  • Every pick applied without conflicts on main (d49278ab9).
  • The resulting tree is identical to feature/OHI (7eac14cb3) except the 10 files touched by the three excluded commits, which are byte-identical to main.
  • On feature/OHI, those 10 files were changed only by the three excluded commits (and the merges that brought them in), so excluding them drops nothing else, and none of the included commits touch them.

Testing

CI on this PR.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

laileni-aws and others added 9 commits October 27, 2026 17:21
…per#2786)

addPinnedContext aliased the shared module-level DEFAULT_PINNED_CONTEXT
array and then mutated it with unshift/push. Pinning context in one tab
therefore polluted the default, so every new chat window inherited that
pinned item and it could not be removed. getPinnedContext also returned
the shared default array directly.

Copy the default array in both places so pinning in a tab no longer
mutates the shared default. Adds a regression test.

(cherry picked from commit e311389)
…rver (Amazon-Q-Developer#2927)

* fix(amazonq): stop memory bank analysis from blocking the language server

The memory bank TF-IDF step stored dense, vocabulary-wide vectors and built a
union Set of both vectors for every one of the N^2 file pairs. On a large
workspace this ran for over a minute synchronously on the language server
event loop, so other requests, such as a new chat tab's pinned context and
rules, were not handled until it finished.

- Build sparse TF-IDF vectors with precomputed norms, count document
  frequency once per document, and compute only the upper triangle of the
  cosine matrix. Results are unchanged.
- Yield to the event loop periodically during the analysis.
- Fix the "20KB" size filter, which compared line counts instead of
  characters and let multi-megabyte single-line files through.

* refactor(amazonq): clarify cosine similarity variable names

(cherry picked from commit c812bea)
isPathApproved normalized separators with a pattern that only matched
doubled backslashes, so Windows paths never matched approvals recorded
for a parent folder or for the same path in a different separator form.
Normalize separators and compare paths consistently, and add tests for
multi-path reads and Windows-style paths.

(cherry picked from commit a4941a4)
Amazon-Q-Developer#2936)

MCP 'Always Allow' reverted to 'Ask' after every restart or MCP refresh for
servers declared in a legacy mcp.json. updateServerPermission writes the
'@server/tool' entries into agents/default.json but deliberately omits the
server definition, while loadAgentConfig only re-applied '@'-prefixed entries
while iterating the same file's mcpServers block. Legacy servers have no such
entry, so their permissions were dropped on every load; duplicate
workspace/global servers hit the same gap because they 'continue' before the
permission pass.

Stash server-scoped permission entries during the per-file pass and drain them
for every server that actually loaded, once agent, legacy and registry servers
are all known.

(cherry picked from commit 1dd3702)
…oper#2935)

* fix(amazonq): pass configured MCP timeout to the SDK request options

MCP tool calls were capped at the SDK's 60s default request timeout because
McpManager.callTool never passed RequestOptions to client.callTool. A
configured timeout above 60s only armed the outer Promise.race, which can
shorten but never extend the deadline, so the SDK cancelled first with
'MCP error -32001: Request timed out'. timeout: 0 ('no timeout') was capped
at 60s for the same reason.

Resolve the effective timeout once and hand it to the SDK, mapping 0 to the
largest value setTimeout honours and falling back to the 60s default (with a
warning) for negative, non-finite or over-large values.

* test(amazonq): type MCP warning logger arguments

(cherry picked from commit 92ca072)
…Developer#2938)

A usage-limit condition surfaced as the bare 'Request failed after 3
attempts', which is indistinguishable from generic retry exhaustion. The
actionable text ('Monthly limit reached') exists only in ResponseError.data,
so clients that surface ResponseError.message - as the Eclipse plugin does
when the structured payload is absent - told the user nothing, prompting
logout/reinstall cycles for an account quota.

Name the cause in the message while keeping the attempt count for support.

(cherry picked from commit 4fa62f7)
…ting silently (Amazon-Q-Developer#2871)

File content added as chat context is capped at workspaceChunkMaxSize with a plain substring, so the model receives only the beginning of large files and has no way to know the file continues. It then reports the wrong file size (e.g. "this file only has 251 lines") instead of reading the rest with its tools.

Add truncateContextContent() which appends an explicit truncation marker (including the real character count) while keeping the result within the same size budget, and use it for innerContext in AdditionalContextProvider. Add unit tests.

(cherry picked from commit 2fa2737)
@dungdong-aws
dungdong-aws requested a review from a team as a code owner October 27, 2026 17:22
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 97.86585% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ticChat/context/memorybank/memoryBankController.ts 96.00% 4 Missing and 1 partial ⚠️
...language-server/agenticChat/tools/chatDb/chatDb.ts 85.71% 1 Missing ⚠️
...rc/language-server/agenticChat/tools/toolShared.ts 97.29% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dungdong-aws dungdong-aws changed the title chore: bring feature/OHI fixes to main (excluding identity and edit-suggestion changes) chore: merge feature/OHI fixes to main Oct 27, 2026
@dungdong-aws
dungdong-aws merged commit 4889b3d into Amazon-Q-Developer:main Oct 28, 2026
5 checks passed
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.

4 participants