Repository navigation
test(remote): refresh render history fixtures to the recorded-outcome shape - #855
Merged
Merged
Conversation
… shape The render fixtures froze the pre-#848/#849 wire: every history `tool_result` spelled out `isError` — `false` on the exit-127 failure and on the successes (which never carry a flag now), and `true` only on a hand-authored probe row. `lean-render-history` asserted that shape, so it would have stayed green against a page the phone no longer receives. - the full fixture records the real failure (`isError: true` on the exit-127 call) and omits the uninformative flag everywhere else (#849); - the lean page is regenerated through the shipping trim, and the generator's self-check asserts the shape on both the full page and its trimmed form; - both history scenarios flip: the exit-127 row reads 运行失败 (its command still arrives through the on-open fetch #851 added) and the soft-fail grep reads 已运行. lean-render-full-history's single failing row is that same recorded failure. Verified in the real mobile render surface: all five lean scenarios pass, the two new assertions were falsified (dropping the fetch trigger and restoring the old `isError: false` shape each fail the step), and the live full-feed `failed === 2` check still holds.
huichen
enabled auto-merge (squash)
September 25, 2026 19:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The render fixtures froze the pre-#848/#849 wire shape, and
lean-render-historyasserted it — a false green:htc_1shell, exit 127isError: falseisError: true→ reads 运行失败 (#848)htc_2read, okisError: falseisErrorkey (#849)htc_3write, okisError: falseisErrorkey (#849)htc_4grep, soft-fail exit 1isError: true(hand-authored probe)mobile/shot/mock/leanRender.ts's own §7b warned the expectations had to flip once the outcome was recorded for real; #848 landed and the scenario kept passing against the old page.What changed
scripts/screenshots/gen-lean-render-fixtures.mjs(authority for the fixture shape): the full page now carries the recorded failure (isError: trueon the exit-127 call) and omits the uninformative flag elsewhere.render-lean-history-entries.jsonregenerated through the shipping trim (no hand edit);render-full-history-entries.jsonrewritten by the generator.desktop/src-tauri/src/remote_host/lean.rsself-check:assert_recorded_tool_outcomesruns on the full page and the trimmed page, so generation fails if the fixture regresses toisError: falseor loses its failure row.lean-render-history: the one failing row is the recorded failure (its command arrives through the on-openget_tool_call_argsfetch perf(remote): fetch a lean shell row's command on tap (#851) #851 added); the soft-fail grep reads 已运行.lean-render-full-history: the single failing row is the same recorded failure (its command is in the page there).lean-render-full(failed === 2, the two live-lane failure shapes) is untouched and re-verified green.Verification (real mobile render surface, worktree port 8137 / CDP 9223)
All five
lean-render-*scenarios exit 0, 0 eval errors:Falsification of the two changed/new assertions:
eval error: the failing row must fetch its dropped command on open, got "",1 step(s) could not reach their target;isError: falsefixture →eval error: the recorded failure (exit 127) must be the one failing history row, got 0, step fails.isError: false→ panics "a history result must not send isError: false"; no failure row → panics "must keep a recorded failure".Also checked the screenshot is not the DOM-green/covered trap:
elementFromPointon the expanded failed row lands inside it and the fetched command is on screen.