Files
oh-my-pi/packages/coding-agent/test
Diogo Soares Rodrigues 821fe75f5d fix(cursor): close download hardlink escape, MCP mime and read range
Hard link escape: a hardlink inside the workspace is a regular file
that passes containment AND `O_NOFOLLOW` while sharing its inode with
a file anywhere else, so truncating it clobbers that file. Proven
before the fix. The open now drops `O_TRUNC`, checks `nlink`/regular
on the OPEN handle, and truncates only after - the pattern
`autolearn/managed-skills.ts` already uses. `O_NOFOLLOW` covers the
final component only; the parent-swap window is documented, not
claimed shut.

MCP resource discovery: `getServerResources` is async and awaits
`ensureServerResources`, so a frame arriving while a server's catalog
still loads no longer reads the empty cache and reports "advertises
nothing" - a lie the model cannot distinguish from the truth.

Mixed-content reads: the mime type came from `contents[0]` while the
payload came from whichever item supplied it, so an image blob
followed by a text note sent the text as `image/png`.

Ranged `pi_read`: a plain `:N+K` selector pads one leading and three
trailing context lines, so offset 5/limit 20 handed Cursor lines 4-27.
Ranged reads compose `:raw:N+K`, verified against a real `ReadTool`.
The wire result is an opaque string, so the gutter `raw` drops is not
part of the contract.

(cherry picked from commit 679785aa6b3243ea39b26abf4dda9435960019b1)
2026-07-30 01:42:30 +02:00
..
2026-07-27 16:43:53 +02:00
2026-07-27 16:43:53 +02:00
2026-07-27 16:43:53 +02:00
2026-07-27 16:43:53 +02:00
2026-07-27 16:43:53 +02:00
2026-07-27 16:43:53 +02:00
2026-07-27 16:43:53 +02:00
2026-07-27 16:43:53 +02:00
2026-06-26 18:43:32 +02:00
2026-07-01 00:07:30 +00:00
2026-05-30 18:08:51 +02:00
2026-05-30 18:08:51 +02:00
2026-07-27 16:43:53 +02:00
2026-06-24 13:44:47 +00:00