Repository navigation
chore(opencode): merge upstream v2.3.2 and remove Loom session mirroring - #24
Conversation
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
…ss image previews are on (anomalyco#63577) Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
…me (anomalyco#63220) Co-authored-by: ssskay <ssskay@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: R44VC0RP <89211796+R44VC0RP@users.noreply.github.com>
…nomalyco#64525) Co-authored-by: James Long <james@anoma.ly>
…st (anomalyco#64530) Co-authored-by: James Long <james@anoma.ly>
|
Remediation at |
|
Qualification hold on |
internetisalie
left a comment
There was a problem hiding this comment.
Review of d11e4140de — verdict: approve for merge
Merging is not stage promotion: the stage hold in the description stands, and the rollout conditions below are not met by this PR.
Method. Compared the fork-only delta of the candidate (v2.3.2..d11e4140de, 75 files, +2917/−112) with the fork-only delta of the previous fork (v2.2.3..v2.2.3-internetisalie.2, 87 files), then read the three session commits (06d29b9312, cb61c8967a, d11e4140de) and the mirror removal (c5677c9625) in full. Static review plus CI; I did not run the suites locally.
Focus areas
Child permission denial — sound.
- A user reject fails the wait with
Permission.DeclinedError(); a service close fails it withDeclinedError({ shutdown: true })(packages/core/src/permission.ts:161,254,277vs:339,353). The step classifies each decline from that marker instead of fromisLocationClosed()at settlement time (packages/core/src/session/runner/step.ts:188-194), so a reload that overlaps settlement can no longer relabel an accepted denial as a shutdown and continue the model. - A user decline ends the step with
StepDeclinedError(step.ts:330). Recovery, overflow compaction and retry are all gated ondeclines.length === 0(step.ts:207,247,255), so nothing re-issues the request after a denial. SessionExecutionsettles it asinterrupted / user: the job is cancelled, the claim released and onecancelledreport reaches the parent (packages/core/src/session/execution.ts:51-57,171-181).
Shutdown and recovery — sound.
- The
declinedlatch (execution.ts:112,131,171) covers an owner interrupt replacing the typed exit after masked settlement. It is set only on a path that always ends inStepDeclinedError, and consumed by the onesettledhook per busy period; the run coordinator does not loop after a failed drain, so it cannot leak into a later execution. - A shutdown-flagged decline keeps upstream behaviour:
Completed({ needsContinuation: true })when the Location is closed (drain returnsReloaded), otherwise an interrupt that keeps the claim (step.ts:332-337).LocationLifecycle.shutdownsetsclosedbeforepermission.close, so the second branch is defensive.
Asynchronous child completion — sound. SubagentJob, SubagentReport and job.ts are upstream v2.3.2 unchanged. The only fork change on that path is the terminal classification above.
Mirror removal and ordinary import/export — preserved.
packages/core/src/session/transfer.ts,session/store.ts,packages/server/src/handlers/session.ts,packages/protocol/src/groups/session.ts,groups/permission.ts,packages/schema/src/session-event.ts,packages/server/src/event-feed.ts,fetch.ts,process.ts,options.tsandpackages/server/test/session-import.test.tsare byte-identical to upstreamv2.3.2at head. Import/export is upstream's code path with nothing of the fork left in it.- No reference to the mirror route,
remoteProxy,OPENCODE_REMOTE_PROXY_*,SessionOwnershiporsession.mirror.updatedremains underpackages/. - The fork migration keeps its slot (
20260926002438_project-associationat m48); the four upstream migrations added since 2.2.3 all sort after it.
Evidence I could check
- Fork CI
linux-serverpassed ond11e4140de; it runssession-execution.test.ts,session-runner.test.ts,database-migration.test.tsandsession-import.test.ts. ghcr.io/internetisalie/opencode-stable:v2.3.2-internetisalie.1-poc.5resolves tosha256:7e4319e1…f6acfand carries revision labeld11e4140de….- The tests added by the fixes drive the real runner through reject-then-reload, reject-then-owner-interrupt, Location teardown and Permission-only teardown (
packages/core/test/session-runner.test.ts:5628-5835) and assert request count, claim state, execution events and the parent notice.
Not blocking — follow-ups
- Question dismissal has no shutdown marker.
step.ts:191falls back tolocationClosedforQuestionTool.CancelledError. A user dismissal followed by a Location reload before settlement is recorded as "the location shut down" and the model continues after the reload — the orderingcb61c8967afixed for permissions. Carry a marker fromForm.closethe same way. terminal()lets the latch outrank every exit (execution.ts:52). A defect raised afteronDeclinewould be reported as a user interruption. Not reachable today; check the latch after the success and defect branches, or log the discarded cause.- Legacy mirror-owned rows. The old guard (
store.isMirrorinexecution.tsat 2.2.3) is gone and nothing replaces it: a 2.2.3 database row withevent_sequence.owner_id = 'mirror:<source>'is an ordinary executable session at head. Safety rests on the storage gate in opencode-stack-tests, which its own kit says is not installed in any environment (docs/paired-upgrade-qualification.md:213). Rollout condition, as the description already says. - Qualification figures in the description (13/13 Direct V2, 14/14 Supervisor, 12/12 PTY cycles, async approval/denial on the published digest) are not backed by any committed artifact I could read. See the review on https://gitea.internetisalie.net/loom/opencode-stack-tests/pulls/48.
Not examined
Upstream code between 2.2.3 and 2.3.2; fork changes outside the four focus areas beyond a patch-equivalence check (project association, plugin HTTP routes, persistent PTY, global roots — across the merge their patches are unchanged, differ only by the mirror removal, or are test fixtures); the retained evidence archive.
|
New integration evidence on the reviewed PoC 5 digest: when the server accepted a child permission rejection (HTTP 204) and was then stopped, the denied tool and interrupted child state survived restart, but the test did not observe the parent cancellation notice. This reproduced twice. Five other async cases passed, including reject then reload and teardown with permission pending. The earlier make test-stack run did not compile this tagged test. Investigation is checking durable storage versus notice consumption or observation; product attribution is still open. |
…ore shutdown A subagent's cancellation notice can be admitted to the parent inbox before the parent takes an execution claim. When shutdown lands in that gap the outbox row is retired and nothing wakes the parent after restart. Restart now finds idle, succeeded parents with an admitted steer notice from a subagent and wakes them once recovery finishes. Parents the restart budget already failed are left alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ast outcome The restart sweep woke only parents whose last turn succeeded, while the normal report path wakes the parent regardless. The sweep now skips only a parent whose last turn failed, which the restart budget uses to leave its notices parked. The inbox query moves into SessionInbox, and a test covers the non-subagent source filter. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Upgrades the deployed 2.x fork from 2.2.3 to 2.3.2. Retires the mirror API, ownership forwarding and mirror events while preserving ordinary session import/export. Fixes child denial settlement during reload and shutdown.
Stage hold. PoC 5 at
d11e4140depassed native async approval/denial, 13/13 Direct V2, 14/14 live Supervisor cases, four materialized dispatch cases and 12/12 persistent PTY cycles on the published digest. Required Linux and native ARM daemon checks passed. The two formal Supervisor matrix commands still require a lead-assigned evidence key, rerun and registration. Foreground subagent compatibility requires owner disposition.Before rollout: reconcile aggregate schedule, background-job and mirror-owner exposure per environment; verify retired proxy settings are absent; agree recovery method and acceptable write-loss window. Disposable restoration is not operator acceptance of loss. Rollout order: system tests → stage → dev → prod.
Paired UI: internetisalie/openchamber#41 · Locks and receipts: https://gitea.internetisalie.net/loom/opencode-stack-tests/pulls/48
Review round 4 (PASS) and its post-PASS fixes. Reviewed head
43e089abcb, fixed head3e5666aee3. Dispositions:Deferred.succeed(release)is removed.SessionInbox.subagentNoticeSessionsininbox.ts, called fromrestart.ts.