Repository navigation
feat(skills): build a computer-app environment from a request - #9049
Conversation
[Medium impact] The PR reaches agent guidance and desktop task checks, within the desktop-app build workflow. The draft-check gap should be fixed before merging because an incomplete edit can pass grading. Findings
Fix with agent prompt### Issue 1
src/domain/desktop/appTaskDraftText.ts:94
A whitespace-only wrapper can now hide a line break or image from the drafted checks. Changing `<p>Hello</p>` to `<p>Hello there<span xml:space="preserve"> <br/></span></p>` drafts only the paragraph's `text_equals` check. The wrapper's text is `" "`, so `textlessAt` returns false and `covers` makes `added` skip the whole wrapper, including its break.
`<p>Hello there </p>` then passes despite missing the break. Before this change, the wrapper kept a separate check. Preserve checks for non-text children while allowing whitespace runs to split or merge.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds a skill that guides an agent from a desktop-app request through installation, seed creation, task checks, export, witness stages, and reporting.
Validation was source-based. A runtime probe could not start because Reviews (22) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> # Conflicts: # docs/specs/desktop-app-environments/build-witness/tasks.md # docs/specs/desktop-app-environments/build-witness/verification.md # src/application/desktop/DesktopApplicationExport.ts
…ed-document Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> # Conflicts: # docs/specs/desktop-app-environments/build-witness/tasks.md # docs/specs/desktop-app-environments/build-witness/verification.md
…d-document Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-seed-document Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…-document Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ld computer - start_build_capture runs REA's capture inside the computer through a small controller over computer-exec, after a user-space apt-get update; mark_build_checkpoint returns once the capture confirms the checkpoint; stop_build_capture returns the draft between seed and end. - export_build_environment exports with the requester's task inside the computer and fetches the bundle through data/get in bounded batches. - check_build_task grades a computer's data/get with REA's evaluator and, through seed, after_edit, near_miss and after_reset stages, records a witness with the action log and the screen recording; act_on_build_computer gains reset. - Capture progress lines carry window, checkpoint and refusal events; apps start in the home; a pack script builds the runtime archive; long tools send progress notifications. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…se the near-miss reset hole - A capture whose start answer is lost is stopped at once and kept unreleased until the stop is confirmed; a lost checkpoint answer is recovered from the capture's own log, and draft and export use the checkpoints its Evidence records; stop can be repeated to resume reading its result. - A witness can check its seed again after a failed read, and keeps its stages in a saving state until the record is written, so a failed save can be retried without reading the app again. - after_edit and near_miss count only click, drag, scroll, type and key, so a reset no longer stands in for the near-miss edit. - A .deb build keeps its package file for capture and passes its URL to export; bundle downloads write each checked file before fetching the next; an apt-get update failure reports its exit code and log tail; reset sends progress while it waits. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd first frames drawn From the blind Inkscape rebuild: - Paths in ~/.local/share/Trash get a desktop_trash reason and the shared_desktop role, so a file trashed before seed is neither owned nor seeded; the export names it in a limitation. - The keep helper runs with PYTHONDONTWRITEBYTECODE=1, so starting a computer from a bundle folder no longer writes __pycache__ into it. - start_build_computer waits, bounded, until the first frame is not one colour before returning it. From review: a .deb that apt also offers exports from apt, since export passes --package-url only when the capture says the package must come from its file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…with progress throughout Each retry of the drawn-first-frame wait runs under an abort that fires at the 10 s deadline, and the latest frame is returned when time runs out. connect takes the first frame itself while its progress heartbeat still runs, reporting "waiting for the desktop to draw". The wait moves to DrawnScreenshot.ts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ng id, and separate unreadable checks from failures - One queue per computer: actions, capture steps and witness checks run one at a time, so two overlapping after_edit checks can no longer both be filed and let the witness hold without a near miss. Close cancels the running and queued calls; different computers still run concurrently. - The witness keeps one recording request id per computer, so a seed retried after a lost reply recovers the recording it started. - A check that could not read its file is undecided, not a failure, so a temporary read error can't satisfy seed, near_miss or after_reset; such a stage is refused and can be checked again. - The export's file listing is written to a file and read back in bounded batches, so a large bundle no longer overruns exec's 1 MiB output. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ided seed failure at export, and keep a close's cancellation - A presence check that misses its line, row or pointed value in a view cut short is undecided rather than failed, since the data may sit in the part left out; a witness stage can no longer be proved by such a failure. - Export counts only decided failures on the seed, and refuses a task whose every seed failure is undecided. - A step whose turn was aborted by a close or the caller returns cancelled even when its work finished, so start_build_capture no longer reports success for a computer being removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…during its commit Reporting cancelled for any step whose turn was aborted after its work replaced a completed export or witness save with a bare cancellation, losing what was saved and leaving the witness unreadable. Steps now return what they completed; only start_build_capture, which commits nothing, checks its turn after the post-launch screenshot and reports cancelled. Asking again for a saved witness's final check returns its record. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ery JS regex mode main's advertised-pattern test compiles every input schema pattern in v mode, which refuses an unescaped hyphen in a character class. The checkpoint name's hyphen is now escaped, and it means the same in u mode. Co-Authored-By: Claude Opus 5.5 <[email protected]>
main's mixed-case JSON suffix fix and this branch both added the import, and the merge kept both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@morluto this one is ready for review. It merges cleanly into main, and all checks pass. It is stacked on #9045 and #9050, so once that merges, its diff shrinks to this PR's own commits. The description's "Final review round" section lists the main merges and the fixes from an independent review of this PR's diff. |
Keep the build-witness spec beside the XML text-check spec, and keep cut-view failures undecided while accepting main's whole-text checks. Co-authored-by: morluto <[email protected]>
…t update A cancel after data/reset no longer drops the restore from the action log, so a near miss cannot treat the restored seed as an edit. An unreadable seed check that later passes leaves after_reset undecided instead of failing the witness. apt-get update is kept only when Error-Mode reports success and a package list was fetched. The controller reply schema lives with the controller, and capture progress lines are read by their domain parser.
Bring the reset, seed-comparison and apt-list fixes forward, and keep morluto#9049's rule that a cut element's text stays undecided.
A run whose only text is whitespace is still text the paragraph check reads. It no longer gets its own presence check, which a later save of the same words without that run would fail. Images and breaks, whose text is empty, still keep their own checks.
after_reset stays undecided when any check was not read, even if another check still fails and the unread result's boolean matches the seed. A text check for a child past a truncated view is undecided in both evaluators. A reset whose reply is lost blocks a near miss until a later input or a reset whose reply arrives.
A recording that fails to end or download is not written into the witness folder, and a manifest already received is fetched again without ending the recording twice. A folder that is published while its handles fail to close keeps that record and retries the same cleanup instead of writing the folder again.
Keep a missing child of a cut view undecided, and keep morluto#9049's note that a cut element's kept runs are not its whole text.
A second failure to close a published witness returns the original error, so its record and cleanup lease stay bound. A reset the app itself refuses is an AppDataRefusal; only a reply that is not that refusal stays unsettled. A missing child of a cut view is undecided with the same description in both evaluators, and the shared cases cover it.
A missing child of a truncated view is undecided for the same sentence in both evaluators, including the pointer the view does not contain.
A published record and its bound cleanup error stay together. A later close failure returns that error, and the unused path that built a fresh adapter error is gone.
# Conflicts: # docs/desktop-build-computer.md # docs/desktop-build-witness.md # docs/specs/desktop-app-environments/build-witness/spec.md # src/domain/desktop/appTaskChecks.fixture.ts # src/domain/desktop/appTaskChecks.test.ts # src/domain/desktop/appTaskChecks.ts # src/domain/desktop/appTaskPython.ts
| [ends.baseline, ends.final].some((view) => { | ||
| const value = resolvePointer(view, pointer); | ||
| return isXmlElement(value) && isWhitespace(elementText(value)); | ||
| return isXmlElement(value) && elementText(value) === ""; |
There was a problem hiding this comment.
A whitespace-only wrapper can now hide a line break or image from the drafted checks. Changing <p>Hello</p> to <p>Hello there<span xml:space="preserve"> <br/></span></p> drafts only the paragraph's text_equals check. The wrapper's text is " ", so textlessAt returns false and covers makes added skip the whole wrapper, including its break.
<p>Hello there </p> then passes despite missing the break. Before this change, the wrapper kept a separate check. Preserve checks for non-text children while allowing whitespace runs to split or merge.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/domain/desktop/appTaskDraftText.ts
Line: 94
Comment:
**Missing breaks pass grading**
A whitespace-only wrapper can now hide a line break or image from the drafted checks. Changing `<p>Hello</p>` to `<p>Hello there<span xml:space="preserve"> <br/></span></p>` drafts only the paragraph's `text_equals` check. The wrapper's text is `" "`, so `textlessAt` returns false and `covers` makes `added` skip the whole wrapper, including its break.
`<p>Hello there </p>` then passes despite missing the break. Before this change, the wrapper kept a separate check. Preserve checks for non-text children while allowing whitespace runs to split or merge.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
This adds the skill that takes Claude from a request such as "Build me an Inkscape environment where the agent changes a poster's headline and saves it" to a witnessed computer-app bundle and a report. It uses the tools from #9037, #9041 and #9045. It is the last of four PRs for "a bundle from a request". The requester's own Claude is the building agent, and REA embeds no model.
Problem and expected behavior
The build tools existed, but nothing told an agent how to use them well: what to ask, how to make a seed, which checks prove an edit, or how to witness. After this change, the product skill routes a request like that to
references/desktop-build.md. That procedure covers:act_on_build_computeronly;seed, the edit, thenend;Change and scope
.agents/skills/reverse-engineer-anything/references/desktop-build.md. A routing bullet and a guide entry inSKILL.md, and one line inreferences/environments.md.MANAGED_SKILL_FILESinstalls the new reference. The setup conformance test lists it.skillVersion: 60 → 61, regenerated metadata.Contract and boundary impact
skillVersion61).Expected effects:
Evidence and regression coverage
Two blind runs on an Ubuntu 24.04 amd64 VM (agentenv-framework 0.9.1431) validated the whole stack. In each, a fresh agent got only the request, this skill and REA's MCP tools.
1. Inkscape: "an Inkscape environment where the agent changes a poster's headline and saves it"
The agent was barred from the Inkscape environment built earlier.
Build: about 19 minutes from the request alone, with no app-specific scripts. The export was accepted on the first try.
Checks: the headline is checked by layer label, text id and
tspan, plus one check that the date line is unchanged. The pointer matches the earlier, hand-built Inkscape environment character for character. The poster's wording differs, because both were invented independently.Witness: held on the first try:
seedafter_editnear_miss(a typo)after_resetSolver runs: Claude Code with Sonnet 5.5 passed 3 of 3 ($1.55, $0.51, $0.70; 18 to 23 turns).
2. AbiWord (held out): "an AbiWord environment where the agent changes the meeting time in a memo and saves it"
No one had built this app with REA before.
after_editwhile the memo on screen was right. REA refuses.abw's DOCTYPE, so the file is read as text. AbiWord also saves a reloaded document's new insertions in their own markup, so a multi-word line check broke. The agent rewrote the checks to the short value the edit types.3:30AbiWord stored across markup. This is the limit of text-line checks on that format, not a solver error.What both runs taught the skill (
b1c227528,721d2da27):keytaking an array, and a region screenshot becoming the latest frame.directory.Product fixes from the same runs are in #9045 (
f6e9decf7):.debthat apt also offers exports from apt.For evidence-bearing changes:
Validation performed
After merging main
c928bb8d, Node 24 build and five focused Ghidra MCP parity, skill setup, desktop check/draft, and XML parity suites passed (123 tests);check:fastandformat:checkpassed. Real application builds were not rerun after this integration.Passed with no new lint diagnostics in this PR's files:
npm run typecheck,format:check,metadata:check,docs:check(including the skill-metadata, product-catalog, conformance-ledger and skill-bundle link checks),docs:build,mcp-catalog:checkandknip.Skill and setup tests passed, with the build tests: 419 passed and 12 skipped.
verify:packageneeds the commit; it reads git-tracked files.Compatibility, safety, and release
skillVersion61.AbiWord rebuilt with #9050: with plain-DOCTYPE XML and whole-text checks, a fresh blind AbiWord build took 13 minutes. Its
text_equalsreads the meeting paragraph byxid. The witness held on the first try, with the reopened memo split across runs, and Claude Code with Sonnet 5.5 passed 3 of 3. The skill now points text checks at the paragraph, never at a run.Known gaps, for follow-up PRs:
Final review round
main, #9045 and #9050 are merged in, with their final review fixes. An independent review of this PR's own commits found nothing that needed a change.
Author readiness
Human owner: @earakely-scale
Before merge
type(scope): outcome.🤖 Generated with Claude Code