Skip to content

feat(desktop): open the seed's document at launch, and say when a seed was made for the task - #9054

Merged
morluto merged 80 commits into
morluto:mainfrom
earakely-scale:feat/desktop-open-seed-document
Nov 9, 2026
Merged

morluto merged 80 commits into
morluto:mainfrom
earakely-scale:feat/desktop-open-seed-document

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

When the captured entry accepts files and the seed holds one document, an exported desktop environment opens that document at launch. Seeds made for a task are identified as synthetic rather than described as user data.

The launch planner uses the captured entry and seed documents; --synthetic-seed records the seed’s origin. The build and export guides explain the resulting launch behavior.

Maintainer follow-up and validation

Updated with main at 25d3c7237f and moved the two existing shell/Node/Python launch regressions out of the domain suite into the boundary suite, preserving their assertions. At head f23e6f106a, both affected suites passed 20 tests, npm run check:fast passed, and git diff --check passed. These are controlled launch fixtures; no real desktop application boot was qualified. Current-head CI and automated review remain required before auto-merge.

Maintainer follow-up

Launcher subprocess checks remain in the boundary suite. Removed an extra EOF blank line and corrected the inherited main-branch formatting failure in coreNativeCommands.ts (line wrapping only, no behavior change).

At head cb66b4578e, the affected tests below completed with 27 passed (27); npm run check:fast, npm run format:check and git diff --check passed. This includes the updated parent stack and main through 25d3c7237f. 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.

node node_modules/vitest/vitest.mjs run tests/boundary/providers/desktopLaunchCommand.test.ts src/domain/desktop/appExport.test.ts src/domain/desktop/stateRoles.test.ts

Author readiness

Human owner: @earakely-scale

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@greptile-apps

greptile-apps Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no new actionable issue was found.

Summary

The PR opens a seed’s single document when the captured desktop entry accepts files. It also marks task-made seeds with --synthetic-seed and checks that the build computer supports that flag.

  • Exported apps open the seed’s one document when the app accepts files.
  • Build exports identify task-made seeds instead of calling them user data.
  • Bundle task read failures now return operation errors.
  • The native-data CLI description keeps the same wording.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Captured launch command] --> B{Already names a document?}
  B -->|Yes| C[Keep captured arguments]
  B -->|No| D{Exactly one seed document?}
  D -->|No| C
  D -->|Yes| E{Desktop entry accepts files?}
  E -->|No| F[Keep arguments and explain limitation]
  E -->|Yes| G[Append document under runtime HOME]
  C --> H[Render launch command]
  F --> H
  G --> H
Loading

Reviews (23) · Last reviewed commit: "style: format native command path schema" · Reviewed by Greptile

Comment thread src/domain/desktop/seedDocument.ts Resolved
Comment thread src/domain/desktop/appTaskChecks.ts Resolved
Comment thread src/domain/desktop/appTaskChecks.ts Resolved
@earakely-scale
earakely-scale marked this pull request as ready for review November 6, 2026 01:28
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-06T01:28:03.241463Z
We couldn’t complete this review. Comment @codex review to try again.
981bad8 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

earakely-scale and others added 16 commits November 5, 2026 20:13
…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]>
Asking again for the check that ended a witness returned its saved record
whatever directory came with it, so a caller naming another folder got
success though nothing was saved there. A different folder is now refused,
as an unfinished seed's retry already is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ot their sentences

The new cut-view, missing-value, undecided-refusal and witness tests froze
whole descriptions, so a harmless rewording broke them. They now check each
outcome's id, passed and undecided exactly and the facts its message must
carry (file, pointer, line, row, stage) separately.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…whole text

- Both readers accept a DOCTYPE with only a name and an optional PUBLIC
  or SYSTEM identifier, record it as the view's doctype, and never fetch
  the DTD or expand entities beyond XML's five; an internal subset, an
  external entity and a parameter entity stay refused alike.
- text_equals and text_contains compare the concatenated text of the
  element (or text node or attribute) a pointer reaches, as XPath
  string() does, with optional normalize_whitespace; both evaluators
  agree, and a text check on a truncated element is undecided.
- Whitespace-only text between elements is dropped only when the element
  holds no other text, so text split into runs keeps its spaces.
- The draft suggests text_equals for an element whose text changed.

So an AbiWord .abw reads as XML, and its paragraph's text is checked
whole however AbiWord splits it into <c> runs, as Writer's spans are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t as text, and skip asctime stamps

- A changed value is read at both ends, so text that became a run still
  marks its paragraph, and the drafted text_equals moves up out of mixed
  content to the nearest ancestor named by an attribute, such as
  AbiWord's p by its xid.
- Text checks accept only a text node or an attribute value; element
  names and doctype fields fail, in both evaluators.
- isTimestamp also recognises asctime dates (Www Mmm dd hh:mm:ss yyyy).
- XML files are drafted with the keyed diff the archive entries use, so
  no suggestion reaches an element by position; the shared logic moves to
  appTaskDraftNamed.ts.
- Text-check tests assert facts, not whole sentences.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hose text check replaces its runs'

A drafted whole-text check on a paragraph hid every change inside it, so a
link whose label and href both changed drafted only the paragraph's text and
the new destination went unchecked. The text check now covers text and runs
added or removed whole; a changed name or attribute of an element both
versions hold keeps its own check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…bute when the draft keeps its check

The owner of `.../attributes/name` was taken as `.../attributes`, so a
changed `name` attribute inside a paragraph with a text check was dropped
again. The owner is now read by segment, attributes first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…me a text element by its own id before its container

Text typed into a run the diff lists whole was never read, so the draft kept
only a presence check on the run, which wrong text also passed. Such text now
marks the nearest element both ends hold, or, when none can take the check,
the added element's own text. The climb also names an element by an
identifier of its own (id, xml:id, xid) before a larger container, so a
headline under a long layer keeps a whole-text check that survives re-split
runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ng test meets text checks

On this branch a changed element's text is drafted as `text_equals` on the
element, so the identity pairing test now expects that check, under the
same `[@ROLE=body]` key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both change the task checks: morluto#9045 makes a check that may have failed on
what a cut view left out undecided, and morluto#9050 adds checks of an element's
whole text. They combine as the build skill's earlier merge combined them:

- A text check whose pointer names nothing in a cut view is undecided, as
  a value's is: noValue takes whether the view is cut and answers through
  notFound.
- On a cut view, text_equals of an element is undecided in both evaluators;
  text_contains that finds its value in what the element's view kept
  passes, and one that does not find it is undecided.
- The fixtures and tests cover both, and the task, witness and spec docs
  say so.
- The spec list numbers build and witness 13 and XML text checks 14.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cursoragent and others added 10 commits November 7, 2026 05:02
A cancelled, refused, or failed read of the bundle's task files returns the witness's Result, including a cleanup lease when a handle would not close.
# 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
Comment thread src/domain/desktop/seedDocument.ts Resolved
Comment thread src/domain/desktop/seedDocument.ts Resolved
Comment thread src/domain/desktop/appExport.ts Resolved
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 8, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 8, 2026
morluto#9054 now reads captured file URLs; this branch's launch retargeting passes
the same known-path check and leaves a file URL as written, since the export
rewrites its home at launch.
@morluto
morluto merged commit 4d7c6ef into morluto:main Nov 9, 2026
45 of 47 checks passed
maxazure added a commit to maxazure/rea that referenced this pull request Nov 9, 2026
Merge main 52fe342, including the inherited CLI formatting repair from
morluto#9054 and subject preservation from morluto#9492. The Evidence depth patch is
unchanged relative to the new main baseline.

Validated on this tree: check:ci:fast, 24 focused files / 362 tests,
test discovery and diff checks passed. No real-provider or full-suite
claim; keep the PR in draft for human review and current-head CI.
@morluto morluto mentioned this pull request Nov 11, 2026
3 tasks done
@morluto morluto added enhancement New feature or request area: runtime Process capture and runtime observation labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants