Repository navigation
feat(desktop): set up and check a desktop build host in one command - #9199
Conversation
Codex Review Summary: ❌ FailedThis 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. |
[High impact] The changes reach REA’s desktop build, capture, export, and task-check workflows. Fix file-target aliases and the XML warning's shared-owner requirement before merging; doctor should also reuse the runner's Python. FindingsFix with agent prompt### Issue 1
src/domain/desktop/appExportPython.ts:163
A selected alias can target a regular settings file, such as `.config/tellicorc`; `capturedStateAliases` does not filter out files. After `_seed_home` writes that file, the new unconditional `destination.mkdir(...)` raises `FileExistsError`, so the exported app cannot start. The same problem occurs at line 158 when the link already exists.
Preserve whether an alias targets a file or a folder, and create only folder targets. This also follows the requirement in `AGENTS.md` to preserve caller-selected paths.
### Issue 2
src/desktop/DesktopBuildDoctorFacts.ts:265
If a host uses uv's managed Python but has no `python3` on `PATH`, the new probe reports every explicitly selected archive as `unknown`. Doctor then fails and setup returns `needs_human`, even when builds can use the archive. Repacking does not fix the missing command.
Builds already find Python through `agentEnvInterpreter`, and archive extraction runs inside the computer. Reuse the runner's resolved Python for this probe.
### Issue 3
src/domain/desktop/stateFormats.ts:37-40
The new `nameSupported` policy makes well-formed XML with names such as `<Ϳ/>` read as text. But `readAsTextNotes` repeats the syntax check without that policy, so it emits no `read_as_text` warning for the same document. Authors get line-based checks without the expected explanation.
`AGENTS.md` requires consumers to use the owner's parsed facts rather than reinterpret raw source. Have the draft consume the desktop reader's decision and reason. This repository requirement must be satisfied before merging.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds one-command desktop build-host setup and scoped doctor checks.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Desktop setup request"] --> B["Read host and client facts"]
B --> C["Show planned changes"]
C --> D{"Approved?"}
D -- No --> E["Return plan"]
D -- Yes --> F["Install agentenv if requested"]
F --> G["Pack runtime if needed"]
G --> H["Record client settings and refresh skill"]
H --> I["Run desktop doctor checks"]
I --> J["Return ready or required fixes"]
Reviews (15) · Last reviewed commit: "fix(desktop): inspect supported runtime ..." · Reviewed by Greptile |
|
@morluto this one is ready for review. It merges cleanly into main, and all checks pass. It's stacked on #9184. It turns the setup steps a blind run on a fresh Ubuntu machine had to work out alone into two commands: Greptile's two findings (a runner not installed yet, and a deleted archive setup had packed) are fixed in |
…-checks # Conflicts: # src/domain/desktop/appTaskDraftLineGuards.ts
An empty assignment is not a path. Resolving it named the working directory and rewrote the value when that directory's spelling moved.
A formatting attribute such as Scribus FONT is not the document's words. Joining it across runs made a frame-wide text check of ItalicBold that failed when a run was split. The font stays a value check on its own run.
A field named @record_id matched the id suffix and became [@record_id=one], which reads an XML attribute. Records paired while their pointers matched nothing. Names that start with @ or > are not id fields.
xml:id and draw:id values such as id123456 were both generated and numbered, so the same selector was counted twice and refused. A text edit of two elements keyed only by those ids now keeps its check.
# Conflicts: # src/domain/desktop/appTaskDraftNoise.test.ts
# Conflicts: # src/application/desktop/DesktopApplicationExport.ts # src/application/desktop/DesktopBuildComputers.ts # src/desktop/AgentEnvComputer.ts # src/domain/desktop/stateRoles.ts
# Conflicts: # docs/desktop-application-tasks.md # docs/desktop-build-witness.md # docs/specs/desktop-app-environments/build-witness/spec.md # src/domain/desktop/appTaskDraftNamed.ts # src/domain/desktop/appTaskDraftNoise.ts # src/domain/desktop/appTaskDraftValues.test.ts
# Conflicts: # src/domain/desktop/appTaskDraftNamed.ts # src/domain/desktop/appTaskDraftNoise.ts
# Conflicts: # src/application/Setup.ts # src/composition/capabilityServices.ts # src/doctorRuntime.ts
# Conflicts: # .agents/skills/reverse-engineer-anything/references/desktop-build.md # docs/desktop-application-capture.md # docs/desktop-application-export.md # docs/desktop-application-state.md # docs/desktop-application-tasks.md # docs/desktop-build-computer.md # docs/desktop-build-witness.md # docs/specs/desktop-app-environments/build-witness/spec.md # docs/specs/desktop-app-environments/build-witness/verification.md # src/application/desktop/DesktopApplicationCapture.ts # src/application/desktop/DesktopApplicationExport.test.ts # src/application/desktop/DesktopApplicationExport.ts # src/application/desktop/DesktopBuildBundle.ts # src/application/desktop/DesktopBuildCapture.ts # src/application/desktop/DesktopBuildComputers.ts # src/application/desktop/DesktopBuildOutputRead.test.ts # src/application/desktop/DesktopBuildSummary.ts # src/application/desktop/DesktopBuildWitness.test.ts # src/application/desktop/DesktopExportFiles.ts # src/application/desktop/DesktopExportLaunch.ts # src/application/desktop/DesktopGzipDocument.test.ts # src/application/desktop/DesktopTaskDraft.ts # src/application/desktop/DesktopTaskDraftNotes.test.ts # src/application/desktop/DesktopTaskExport.test.ts # src/composition/capabilityServices.ts # src/contracts/desktopBuildToolContracts.ts # src/desktop/DesktopApplicationSession.test.ts # src/domain/desktop/appExport.test.ts # src/domain/desktop/appExport.ts # src/domain/desktop/appExportPython.ts # src/domain/desktop/appExportUnowned.test.ts # src/domain/desktop/appExportUnowned.ts # src/domain/desktop/appTaskChecks.fixture.ts # src/domain/desktop/appTaskChecks.ts # src/domain/desktop/appTaskDraft.fixture.ts # src/domain/desktop/appTaskDraft.ts # src/domain/desktop/appTaskDraftAdded.test.ts # src/domain/desktop/appTaskDraftAdded.ts # src/domain/desktop/appTaskDraftFileNotes.test.ts # src/domain/desktop/appTaskDraftFileNotes.ts # src/domain/desktop/appTaskDraftGuards.test.ts # src/domain/desktop/appTaskDraftGuards.ts # src/domain/desktop/appTaskDraftLineGuards.ts # src/domain/desktop/appTaskDraftNamed.ts # src/domain/desktop/appTaskDraftNoise.test.ts # src/domain/desktop/appTaskDraftNoise.ts # src/domain/desktop/appTaskDraftNotes.ts # src/domain/desktop/appTaskDraftPositional.test.ts # src/domain/desktop/appTaskDraftScalars.ts # src/domain/desktop/appTaskDraftText.ts # src/domain/desktop/appTaskDraftTextAdded.test.ts # src/domain/desktop/appTaskDraftValues.test.ts # src/domain/desktop/appTaskDraftValues.ts # src/domain/desktop/appTaskPython.ts # src/domain/desktop/attributeRank.ts # src/domain/desktop/desktopCapture.test.ts # src/domain/desktop/desktopCapture.ts # src/domain/desktop/positionalKeys.ts # src/domain/desktop/runtimeFiles.ts # src/domain/desktop/seedDocument.test.ts # src/domain/desktop/seedScrub.ts # src/domain/desktop/selectorCandidates.ts # src/domain/desktop/stateChanges.ts # src/domain/desktop/stateFormats.ts # src/domain/desktop/stateRoles.test.ts # src/domain/desktop/stateRoles.ts # src/domain/desktop/viewPointer.test.ts # src/domain/desktop/viewPointer.ts # tests/boundary/mcp/buildCaptureDraftMcp.test.ts # tests/boundary/mcp/buildCaptureRetryMcp.test.ts # tests/boundary/mcp/buildComputerMcp.test.ts # tests/boundary/providers/desktopExportPython.test.ts # tests/fixtures/buildCaptureFakes.ts # tests/fixtures/buildComputerMcp.ts
# Conflicts: # docs/desktop-build-computer.md # src/domain/desktop/appExportPython.ts # src/domain/desktop/appTaskChecks.fixture.ts # src/domain/desktop/appTaskDraftFileNotes.ts # src/domain/desktop/appTaskDraftLineGuards.test.ts # src/domain/desktop/appTaskPythonPointer.ts # src/domain/desktop/stateFormats.ts
rea setup --client <id> --desktop-buildprepares the supported parts of a desktop build host, andrea doctor --provider desktop_buildchecks remaining prerequisites.Setup reports its planned changes and uses the existing approval flow. Doctor reports actionable host, runtime and dependency checks.
Maintainer follow-up and validation
Setup command ownership now preserves an earlier command failure and bounded output when caller cancellation arrives during cleanup. Cancellation conversion lives at the owned-command boundary and reuses the shared command-output projection; resource cleanup remains retryable. The deterministic completed-failure/during-cleanup ordering uses the existing command spy, while the real subprocess fixture separately checks active installer cancellation. This is not a real-provider verification of the finalization ordering. Existing failed-setup settings, stale-client-path and process-family ownership repairs are included with the corrected parent stack. Doctor now uses the runtime owner's empty-runner PATH fallback and validates its resolved version; its observed PATH cannot establish a separately launched client's PATH. Numeric seed-check repair is inherited from #9132.
At head
e710756c41, the affected tests below completed with 83 passed (83);npm run check:fastandgit diff --checkpassed. This includes the updated parent stack and main through25d3c7237f. Checks use source/domain and controlled boundary fixtures; no real desktop provider qualification was performed. Current-head CI and review remain required before auto-merge.Maintainer follow-up
Doctor now asks the pinned agentenv configuration owner for the selected configuration and model endpoint instead of treating any
[model]table as an endpoint or duplicating config precedence. It preserves missing, unknown, and configured facts without claiming endpoint availability. Queries use the existing bounded, cancellable command owner; selected config inputs must pass the bounded regular-file check. Empty environment overrides remain unknown when the owner APIs disagree. Setup's selected archive spelling, command failure/output, cleanup retries, and live unresolved-resource labels remain preserved.At
4412f15de2, the focused doctor suites passed 33 tests,npm run check:fastand fullnpm run format:checkpassed. The query-timeout regression injects a timeout result and verifies deadline/stop controls; it does not establish behavior of a genuinely stalled agentenv process. No real desktop-provider qualification was performed. Current-head CI and review remain required.Author readiness
Human owner: @earakely-scale