fix: converge Desktop titles natively - #87
Conversation
Stage deterministic title operations for the retained source task so native Codex mutations, rather than detached App Server writes, drive visible catalog convergence. Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
|
I found two release-blocking correctness defects and three user-facing contract gaps in the current candidate. Please keep the PR draft and fix these on the existing branch.
Please rerun |
|
One additional release blocker is visible in the guided-install contract:
|
|
There is a more fundamental first-install sequencing blocker that directly reproduces the reported stale-title behavior:
The first-install path needs a real deterministic handoff boundary: after latest-turn reads and deterministic footer/runtime resolution, commit the mechanically resolved records and guarded native title plans, leave genuinely ambiguous legacy tasks for the semantic continuation, and make the ready plans drainable without racing an active cycle. The installer should then run the native batch against that committed ready set (with the measured about-one-minute expectation for ~200 native writes) and close without waiting for Luna. Add an exact integration rehearsal with a mixed corpus where deterministic rows become drainable within the bounded foreground window while semantic rows remain pending/background; prove |
|
|
||
| ```js | ||
| const q=v=>"'"+String(v).replace(/'/g,"'\\''")+"'"; | ||
| const run=async cmd=>JSON.parse((await tools.exec_command({cmd})).output); |
There was a problem hiding this comment.
🟠 Failed reports masquerade as success
The fixed batch program parses exec_command output but ignores the command exit status, so a failing title-batch --json --report still flows through as a normal JSON value. If the native setter succeeds and the report command then exits non-zero (for example because saving state failed), the program emits a final aggregate instead of failing closed; ThreadBear keeps the operation as NativeTitlePending, and the next list sees the now-changed title as drift and deletes the pending plan instead of committing ownership. Please make the helper throw on non-zero exec_command results (and mirror the same fixed-program change in assets/skill/SKILL.md) before using the parsed result.
(Refers to line 13)
Your feedback helps Open SWE learn. React with 👍 or 👎 to tell us if this review comment was useful.
| const run=async cmd=>JSON.parse((await tools.exec_command({cmd})).output); | |
| const run=async cmd=>{const r=await tools.exec_command({cmd});const x=JSON.parse(r.output);if(r.exit_code&&r.exit_code!==0)throw new Error(x.error_code||"title_batch_command_failed");return x;}; |
Summary
Verification
go test ./...go vet ./...CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build ./cmd/threadbearCGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build ./cmd/threadbearsh -n install.shcmp install.sh site/install.shcmp INSTALL.md site/installnode scripts/replay-title-batch.mjsThe operator-authenticated native Desktop canaries remain the gate for moving this PR out of draft.
Closes BEAR-59