Skip to content

feat(desktop): read gzip documents as the document inside - #9111

Merged
morluto merged 368 commits into
morluto:mainfrom
earakely-scale:feat/desktop-gzip-documents
Nov 9, 2026
Merged

morluto merged 368 commits into
morluto:mainfrom
earakely-scale:feat/desktop-gzip-documents

Conversation

@earakely-scale

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

Copy link
Copy Markdown
Contributor

REA reads gzip-compressed desktop documents as the document inside, allowing tasks to inspect formats saved compressed by desktop apps.

State inspection and the exported verifier use bounded decompression, and seed processing applies the document’s normal scrubbing rules.

Stacked on #9105.

Maintainer follow-up and validation

Propagated the owning #9089 file-URL seed-path repair and #9058 scratch-export guidance correction. Previously validated format, selection and cleanup fixes remain included. Local file URLs now reopen the selected exported seed path while preserving their URL suffix and unchanged encoded segments.

At head 5dc5510313, the affected tests below completed with 107 passed (107); npm run check:fast 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 src/domain/desktop/seedDocument.test.ts src/application/desktop/DesktopExportLaunch.test.ts src/domain/desktop/appTaskDraft.test.ts src/domain/desktop/appTaskDraftValues.test.ts src/application/desktop/DesktopTaskDraftNotes.test.ts src/domain/desktop/stateRoles.test.ts

Maintainer follow-up

Recompressed gzip seeds now use the actual shipped format and bounded ZIP view, so an already-complete archive cannot be accepted as a task because of an invented empty view. XML format detection uses the existing syntax-only parser rather than allocating a full tree. The whole-note timestamp regression now checks current equality behavior and rejects substituted text. One-time launch path mapping and simplified whole-text ownership are inherited. Regression controls failed before the fixes and pass after them. Full XML-view construction remains under its existing limits; no peak-memory measurement or real-provider qualification was performed.

At head 3cb75bab7e, the affected tests below completed with 191 passed (191); 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 src/domain/desktop/seedDocument.test.ts src/application/desktop/DesktopExportLaunch.test.ts src/domain/desktop/appTaskDraft.test.ts src/domain/desktop/appTaskDraftValues.test.ts src/application/desktop/DesktopTaskExport.test.ts src/domain/desktop/seedScrub.test.ts src/application/desktop/DesktopGzipDocument.test.ts src/domain/desktop/stateFormats.test.ts src/application/desktop/DesktopTaskDraftNotes.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.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-06T08:15:17.932094Z
We couldn’t complete this review. Comment @codex review to try again.
7817498 PR opened
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[High impact] The reviewed changes appear safe to merge, with no new blocking findings.

Summary

Adds gzip document support across state inspection, seed export and task checks.

  • Gzip files now expose their inner documents to desktop state checks and exports.
  • Task drafts now show file values and guards, while XML checks can name members more precisely.
  • Build captures and exported seeds now track the selected app state and its owned paths.
  • Build-computer requests now fit Linux transport limits and return bounded capture results.
  • Task checks now wait for desktop files to stop changing before grading them.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Captured file] --> B{Gzip?}
  B -->|Yes| C[Decompress within limits]
  B -->|No| D[Detect document format]
  C --> D
  D --> E[Build typed view]
  E --> F[Draft and evaluate checks]
  A --> G[Scrub seed content]
  G --> H[Recompress gzip seed]
  H --> I[Read shipped seed view]
  I --> J[Validate task against shipped seed]
Loading

Reviews (45) · Last reviewed commit: "Merge commit '3fdff38395' into HEAD" · Reviewed by Greptile

Comment thread src/domain/desktop/seedScrub.ts Resolved
Comment thread src/domain/desktop/seedScrub.ts Resolved
Comment thread src/domain/desktop/appTaskDraftAdded.ts Resolved
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
Comment thread src/domain/desktop/appTaskDraftText.ts Resolved
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
…luto#9105, morluto#9111, morluto#9112

Both add to the export's seed handling: morluto#9111 lists gzip seeds recompressed only for their headers apart, and morluto#9112 drops LibreOffice's recovery list and leaves locks and logs out. A seed now ships through both, in that order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
- The build-computer spec names both extra archive packages and main's
  Electron launch rewrite.
- The Python export test keeps both sides' imports.
- main's build tests pass extra_packages, which this branch's archive
  install requires.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
morluto#9089 moved the lock names into runtimeFiles.ts as isLockName. That list
gains this branch's Lucene write.lock, and appExportUnowned.ts keeps this
branch's sibling-lock patterns and home-root rule. The export test helpers
take one `content` option, which both sides had added under different
names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
The build computers module keeps this branch's extraPackagesOf import and
drops the BuildRequest type morluto#9045's fix no longer uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread src/domain/desktop/buildWitness.ts Resolved
Comment thread src/domain/desktop/appTaskDraftNotes.ts Resolved
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
@earakely-scale

Copy link
Copy Markdown
Contributor Author

@morluto this one is ready for review. It merges cleanly into main, and all checks pass. It is stacked on #9105, 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.

# Conflicts:
#	.agents/skills/reverse-engineer-anything/references/desktop-build.md
#	docs/desktop-build-witness.md
#	docs/specs/desktop-app-environments/build-witness/verification.md
#	src/application/desktop/DesktopApplicationExport.test.ts
#	src/application/desktop/DesktopApplicationExport.ts
#	src/application/desktop/DesktopBuildCapture.ts
#	src/application/desktop/DesktopExportLaunch.ts
#	src/domain/desktop/appExport.test.ts
#	src/domain/desktop/appExport.ts
#	src/domain/desktop/seedDocument.test.ts
#	src/domain/desktop/seedDocument.ts
#	tests/boundary/mcp/buildCaptureMcp.test.ts
#	tests/fixtures/fakeBuildComputerRea.ts
# Conflicts:
#	src/domain/desktop/appTaskDraftNoise.test.ts
# Conflicts:
#	src/application/desktop/DesktopBuildComputers.ts
#	src/desktop/AgentEnvComputer.ts
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