Repository navigation
Replies: 1 comment
|
Independent confirmation of the root cause, from a different machine (0.1.7-rc.2, Windows):
On scope: restricting the fix to the name and icon fields while leaving Two practical notes about landing it:
One small suggestion for future reports, take it or leave it: since cherry-picking is the delivery |
Current-version patch index — 2026-10-07Thanks @luoyukun3-oss for independently checking the published packages and suggesting a clearer patch index. I rechecked the newest public release, 0.2.1-alpha.1, published on 2026-10-03. Its tag and current master both point to The five recent product fixes are now combined and pushed on that baseline, with the original immutable product commits preserved. The XDG-default and desktop-metadata changes share files; their combined tests and paired documentation have been reconciled and verified. Storage has a separate current-layout port. The old Windows aggregate patch is retained as historical rather than reapplied wholesale.
Published branches
Both fetched fork heads match their local commits. Normal pre-push hooks passed. The integration's normal merges retain the original product history; its separate support-only commit makes the documentation image-escape fixture portable on Windows and is not counted as another product bug. The storage branch does not include that unrelated fixture change. Initial push attempts stopped in the normal hook on incomplete installed Vite files. Missing files were restored from npm archives matching the lockfile SHA-512, without changing source or the lockfile; normal hooks then ran again for the successful pushes. Latest local evidence
Limits and historical evidenceNo aggregate all-checks-pass claim is made. Storage Windows Current workspace storage uses the single layout; projection cache uses per-record, so #3719's whole-unit unrelated-record overwrite is not generalized to that cache. Its stale-domain case is covered separately. Fault injection proves live-process consistency, not physical power-loss behavior. Consumers must reopen retired handles; automatic consumer retries are not added. The seven newest-version npm archives were inspected and their integrity verified in the preceding audit, but official released runtimes were not executed. Current patch verification uses modified source, Loader applications and freshly built artifacts. No real-model API, whole-repository coverage, exhaustive platform matrix, or upstream CI success is claimed. For #3466, equivalent current handling is not a claim that upstream adopted the fork commit or that every native edge case is fixed. Any residual case requires a new focused reproduction rather than blanket application of the historical patch. The contribution guide still declines external PRs. No upstream PR, acceptance or released fix is claimed. Existing reports and immutable product history are preserved; this index is a comment on the existing report, not a new duplicate Discussion. Audit, implementation, validation and this follow-up were AI-assisted with Codex. The commits include |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Current-version update — 2026-10-07
Rechecked on 2026-10-07 against the newest public release, 0.2.1-alpha.1, and upstream master at
5badb15009ae1756c3afe0ae0cef1faafc290ccc. The Name/Icon escape fix remains applicable and is now combined with the empty-XDG-default patch. Actual Linux GIO/XDG and desktop-entry verification passed 15 cases; the Windows native-command/open-in-app selection passed 164 cases. Exec/TryExec interpretation is unchanged. All five product commits are preserved in the published current-baseline integration; both the full build and full lint passed.Current patch index and verification limits. No all-checks-pass, upstream acceptance or released-fix claim is made. This update is AI-assisted with Codex; the published commits retain its co-author.
The original report and its verification history are preserved below.
Summary
On master at
5badb15009ae1756c3afe0ae0cef1faafc290ccc, the shared desktop-entry reader returns escaped display metadata literally. LegalName, localizedName, andIconvalues can therefore show escape text or fail an otherwise valid installed-icon lookup.The Desktop Entry Specification defines five string escapes for display and icon values:
\s,\n,\t,\r, and\\. Executable command text also has separate parsing rules; the patch does not broaden its interpretation.I did not find an equivalent public report in the searches performed for this audit. This is not the empty-XDG-variable defect reported elsewhere.
Reproduction
Install a private fixture desktop entry containing:
Provide the registered handler through the association query and a real SVG at
pixmaps/fixture viewer.svgin the same private XDG data root. An otherwise identical unescaped entry serves as the control.Before the patch, the two diagnostic fixtures produced:
{"case":"name-escaping","raw":"Localized\\sViewer","expected":"Localized Viewer","actual":"Localized\\sViewer","unescapedControl":"Localized Viewer"} {"case":"icon-escaping","artworkExists":true,"expectedIconPresent":true,"actualIcon":null,"unescapedControlIconPresent":true}Both pre-fix regressions failed. Expected: decode the display name and resolve the same SVG as the unescaped control.
Root cause and patch
desktopEntryFields()only splits and trims key/value text. The file-association and Host Open In App consumers use those literal values for names and icon lookup.The patch decodes the five string escapes exactly once for
Name, localizedNamekeys, andIcon. Escaped leading/trailing whitespace survives. A double-escaped backslash followed bysremains literal rather than undergoing a second decoding pass.Exec,TryExec, and unrelated fields remain literal; the existing launch/parser behavior is deliberately unchanged. There is no public API, dependency, package-export, configuration, or wire-format change.Verification
The tests cover localized names, all five escapes, escaped outer whitespace, exactly-once decoding, command-field preservation, real desktop/icon files, and the unescaped controls. The Host Loader/WebServer route returns the actual SVG bytes for an escaped absolute icon path and retains the intended launch argv.
On Ubuntu 24.04 under WSL2, Node 24.19.0 and pnpm 11.7.0, this combined-branch command passed 402 tests with four unchanged platform-specific skips:
corepack pnpm exec vitest run packages/fs/fs-local/tests/fsio.spec.ts packages/fs/fs-local/tests/filesystem.spec.ts packages/fs/tool-str-replace-editor/tests packages/session-query/session-query-sqlite/tests packages/util/native-command/tests packages/host/open-in-app/tests --coverage --coverage.include=packages/fs/fs-local/src/fsio.ts --coverage.include=packages/fs/tool-str-replace-editor/src/index.ts --coverage.include=packages/session-query/session-query-sqlite/src/index.ts --coverage.include=packages/session-query/session-query-sqlite/src/schema.ts --coverage.include=packages/util/native-command/src/desktop-entry.tsThe shared reader and all five modified production modules reached 100% statements, branches, functions, and lines. Windows owning suites also passed. A separate Linux smoke used real GIO discovery with private XDG roots and checked the decoded localized name and actual SVG bytes. The existing real GIO handler-launch regression also passed, including two independent processes running concurrently; that regression checks general native-launch/teardown behavior, not a visual escaped-name workflow.
Full build and type-aware lint passed. The normal pre-push hook also ran the full
pnpm run typechecksuccessfully before publication to the fork. Counts are local combined-branch results, not upstream CI results. The full hygiene aggregate remains unclaimed because 16 vendor rescope residues were reproduced on the unchanged baseline. The earlier doc-sync aggregate hit a default-heap OOM; its other 41 checks passed, and the graph check passed separately with a 4-GB heap. The updated bilingual corpus passed independently.Scope and limitations
This does not address #8926, which concerns empty XDG environment values and directory defaults. It does not change executable-field quoting, association authorization, theme lookup policy, or WSL's choice of desktop.
No real desktop GUI window, browser visual workflow, or macOS native test was run. The evidence is parser, real-file, real GIO metadata, and real Host HTTP behavior; it is not a claim of full visual end-to-end qualification.
The patch is offered as a cherry-pickable fork commit because external PRs remain paused. Audit, implementation, and local verification were AI-assisted with Codex; the commit includes
Co-authored-by: Codex <noreply@openai.com>.All reactions