fix: enforce Windows trace and UTF-8 subprocess contracts - #13
Conversation
db0b8fc to
a414aa0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db0b8fc993
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "upstreamVersion": "v0.1.0+snapshot.c27d1a3", | ||
| "upstreamCommit": "c27d1a300962b553c0884993c575cd3e819465ce" | ||
| "upstreamVersion": "v0.1.0+snapshot.8ccf9d7", | ||
| "upstreamCommit": "8ccf9d7d89bc395ad7dd19dde840401a5b84623d" |
There was a problem hiding this comment.
Update external-runtime instructions to the new pin
After changing the packaged upstream commit here, README.md:265 and README.zh.md:265 still instruct external-mode users to check out c27d1a300962b553c0884993c575cd3e819465ce. Because prepareUpstreamRuntime compares the checkout HEAD against the new UPSTREAM_COMMIT and rejects any mismatch (src/runtime-install.ts:659-660), following the documented setup now always produces a runtime error; update both instructions to the new commit.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
a414aa0 to
47e24e1
Compare
47e24e1 to
7436c25
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #8.
Fixes #9.
Depends on Anionex/agent-vision-toolkit#20. The vendored snapshot is pinned to that PR's commit and should be refreshed to the eventual merge commit if GitHub changes the SHA during merge.
Problem
Two Windows-only representation mismatches broke otherwise successful local tools:
tracewrote multi-line SVG text through platform newline translation, but reported the in-memory character count. The runtime's earlier workaround accepted a CRLF-adjusted mismatch, weakening the artifact byte contract.extract_fg.pysummaries then became mojibake and failed the structured parser. Main already forced UTF-8 in the direct upstream adapter, but runtime preparation used a separate Python environment without the same contract.Changes
8ccf9d7, wheretracewrites exact UTF-8 bytes and reports the actual write countstat.size === reported bytesvalidation before SVG artifact commitPYTHONIOENCODING=utf-8plusPYTHONUTF8=1for:PYTHONIOENCODING=cp936/PYTHONUTF8=0, parse its real Chinese stdout, and assert the spawned overridelib/output and the upstream manifestThe vendored README change is generated by the required full
upstream:syncfrom the newer upstream commit; no downstream README was edited manually.Verification
Passed:
npx vitest run tests/runtime.spec.ts tests/runtime-install.spec.ts tests/upstream.spec.ts— 64 passednpx vitest run tests --exclude tests/profile-install.e2e.spec.ts --exclude tests/tools.spec.ts— 122 passednpm run verify:portablenpm run example:ui-restoration— initial 6.04%, final 0%node --check lib/runtime-install.js lib/runtime.js lib/upstream.jspython3 -m py_compile vendor/agent-vision-toolkit/bin/trace tests/fixtures/upstream/bin/tracegit diff --checkUpstream verification is recorded in Anionex/agent-vision-toolkit#20, including the complete optional vtracer/Pillow trace path and passing Windows CI.
Not fully runnable in this detached worktree:
npm testreached 122 passing tests, then the available mismatched DSH source facade failed 13 lifecycle tests (FiberState.UNLOADINGundefined); profile-install collection also lackedexeca.npm run buildis blocked by the same checkout mismatch between this branch's legacycordistype facade and the locally available newer namespaced DSH source. The changedlib/files were regenerated with TypeScript 6.0.3 emission and independently syntax/package-verified above.This is a non-UI runtime/process contract fix, so there is no meaningful Browser or Playwright path. The substitute coverage runs the actual Python fixture subprocess, parses Chinese output despite an ambient cp936 request, validates the staged SVG byte contract, and executes the checked-in UI-restoration pipeline unchanged.