Repository navigation
fix(desktop): find ids in archive entries and draft nothing for a state directory's lock - #9210
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 PR reaches the desktop build, capture, export, and witness workflows. Fix the plain-text grading gap and the custom-path setup loop before merging. FindingsFix with agent prompt### Issue 1
src/domain/desktop/appTaskDraftLineGuards.ts:143-150
Adding the ordinary Markdown line `Set created=2025550123 and save` makes `volatileAt` treat the requested number as generated metadata. The draft suggests only `line_count` with `contains: "Set created="`, so `Set created=WRONG and save` passes too. `lineCounts` adds no exact check for a newly added line, so authors who copy the suggestions can export a task that accepts the wrong answer.
Only strip generated values when the file's format establishes that they are metadata. Keep ordinary prose exact.
### Issue 2
src/application/DesktopBuildDoctor.ts:355-357
A valid custom `REA_BUILD_COMPUTER_REA_ARCHIVE` or `REA_DOCKER_COMMAND` already recorded by a client fails this check whenever it differs from the terminal's default. The suggested repair cannot clear the failure: `rea setup --desktop-build` deliberately preserves those recorded values, then runs this same check again and returns `needs_human`.
Check the client's recorded paths where possible. Distinguish an unverified custom path from a broken one instead of requiring it to equal the terminal's path.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThis PR combines stacked changes to desktop capture, task drafts, exports, grading, and host setup.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
Capture[Capture app and checkpoints] --> Views[Read typed file views]
Views --> Draft[Suggest checks and guards]
Views --> Export[Choose seed files and exclusions]
Draft --> Task[Author task]
Task --> Export
Export --> Bundle[Write desktop bundle]
Bundle --> Grade[Read files until they settle]
Grade --> Witness[Grade task and record witness]
Reviews (10) · Last reviewed commit: "Merge remote-tracking branch 'live-5600/..." · Reviewed by Greptile |
|
@morluto this one is ready for review. It merges cleanly into main. It's stacked on #9185. It makes sure a record added whole keeps at least one suggested check, and it fixes three gaps a review of the stack found:
The last run's only failure is unrelated: a Ghidra lineage test in shard 2 ( |
# Conflicts: # src/application/desktop/DesktopBuildCapture.ts # tests/boundary/mcp/buildCaptureMcp.test.ts
# Conflicts: # tests/boundary/mcp/buildCaptureMcp.test.ts
# Conflicts: # tests/boundary/mcp/buildCaptureRetryMcp.test.ts
# 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-application-tasks.md # src/application/DesktopBuildDoctor.test.ts # src/application/DesktopBuildDoctor.ts # src/desktop/DesktopBuildDoctorFacts.test.ts # src/desktop/DesktopBuildDoctorFacts.ts # src/domain/desktop/appExport.ts # src/domain/desktop/appExportPython.ts # src/domain/desktop/appTaskChecks.fixture.ts # src/domain/desktop/appTaskDraft.fixture.ts # src/domain/desktop/appTaskDraftFileNotes.ts # src/domain/desktop/appTaskDraftLineGuards.test.ts # src/domain/desktop/appTaskDraftLineGuards.ts # src/domain/desktop/appTaskDraftModel.test.ts # src/domain/desktop/appTaskPythonPointer.ts # src/domain/desktop/stateFormats.ts
Summary
Two draft gaps that a review of the stack found:
entrieswere never found, so a zipped model's copiedtypelost its check;This PR first kept a check for a record added whole to a top-level array. #9185 now covers that with its root-array count (
eea99c7c7) and keeps the witness of an unreadable reset undecided, so merging #9185 in dropped both fixes from this PR along with their tests.Problem and expected behavior
library.xmihad its new attribute'stypeid skipped, becauseidsInwalked children and records but not the archive'sentriesarray. The draft now suggests the attribute'stypevalue and the attribute count; both fail at the seed and pass at the end..config/notes/sync.lockchanged between the ends. The export leaves it out of the seed, but the draft draftedlines_present/lines_absentchecks on it, which would fail on any rebuilt seed. It now drafts nothing for that lock.Change and scope
idsInwalks arrays, pushing one element at a time; a spread overflowed on an archive entry holding 2,000,000 numbers.isLeftOutdecision, which counts state directories, so this PR's own fix for it was dropped in the latest merge. Its test, a lock directly in a state directory getting no check, stays here and passes on the stack's code.Contract and boundary impact
docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
For evidence-bearing changes:
Validation performed
npx oxfmt --check .: passed.max-lineswarning onappExport.tsas feat(desktop): name a record by a nested field or a child's attribute #9185 has; nothing new.npm run typecheck: no errors outside the API-contract files, which fail only on a dependency missing locally.Compatibility, safety, and release
Maintainer follow-up
Integrated parent repairs for JSON/archive selector formats, joined text coverage, numeric seed comparisons, retained caller path spelling and nested aliases. TypeScript and generated Python checks agree. The previously failing contract-presentation CI test is rerun through its artifact-aware focused command; no timeout was raised. Nested timestamp omissions now preserve text boundaries through recursion, so generated checks pass the captured end without joining across omitted text; redundant test copies are removed. Additional checks passed:
npm run test:focused -- tests/boundary/mcp/contractPresentation.test.ts.At head
3a7fc5ed9e, the affected tests below completed with 307 passed (307);npm run check:fast,npm run format:checkandgit 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.Author readiness
Human owner: @earakely-scale
Before merge
type(scope): outcome.🤖 Generated with Claude Code