Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ade2a9b

Browse files
author
Dan Shapiro
committed
Merge remote-tracking branch 'origin/pr/336' into codex/task8-pr336-main-parity-20260518-004614
# Conflicts: # docs/lab-notes/2026-04-20-coding-cli-session-contract.md # server/coding-cli/opencode-activity-tracker.ts # server/coding-cli/opencode-activity-wiring.ts # server/coding-cli/opencode-session-controller.ts # server/coding-cli/providers/opencode.ts # server/index.ts # server/mcp/freshell-tool.ts # server/session-observability.ts # server/terminal-registry.ts # server/ws-handler.ts # src/components/TerminalView.tsx # src/store/paneTypes.ts # src/store/selectors/paneTerminalSelectors.ts # test/e2e/codex-refresh-rehydrate-flow.test.tsx # test/e2e/terminal-restart-recovery.test.tsx # test/server/session-association.test.ts # test/unit/client/components/TerminalView.lifecycle.test.tsx # test/unit/server/coding-cli/opencode-activity-tracker.test.ts # test/unit/server/coding-cli/opencode-activity-wiring.test.ts # test/unit/server/coding-cli/opencode-provider.test.ts # test/unit/server/coding-cli/opencode-session-controller.test.ts
2 parents 47172ab + 6b7b4fb commit ade2a9b

41 files changed

Lines changed: 5036 additions & 656 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/lab-notes/2026-04-20-coding-cli-session-contract.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Coding CLI Session Contract Lab Note
22

3-
This note records the real-binary provider probes rerun on `2026-04-26` inside `/home/user/code/freshell/.worktrees/trycycle-codex-session-resilience`. Binary version facts were refreshed on `2026-05-03` inside `/home/user/code/freshell/.worktrees/land-local-main-codex-sidecar-lifecycle`; the Claude Code binary version fact was refreshed again on `2026-05-06` inside `/home/user/code/freshell/.worktrees/codex-sidebar-reopen-corner-origin-pr-20260505` after the installed binary changed. The later version-only refreshes did not re-prove the behavior contract, so `capturedOn` remains `2026-04-26`.
3+
This note records the real-binary provider probes rerun on `2026-04-26` inside `/home/user/code/freshell/.worktrees/trycycle-codex-session-resilience`. Binary version facts were refreshed on `2026-05-14` inside `/home/user/code/freshell/.worktrees/codex-stability-implementation-20260514`; the OpenCode binary version fact was refreshed on `2026-05-16` inside `/home/user/code/freshell/.worktrees/dev-green-20260516`.
44

55
The implementation plan file is dated `2026-04-19` because the design work was written the day before. This note is dated `2026-04-26` because the real-provider contracts were re-proved on the implementation machine on that date, and that verification date is the one Freshell is allowed to build on.
66

@@ -9,8 +9,7 @@ The implementation plan file is dated `2026-04-19` because the design work was w
99
{
1010
"capturedOn": "2026-04-26",
1111
"planCreatedOn": "2026-04-19",
12-
"binaryVersionFactsRefreshedOn": "2026-05-06",
13-
"dateReason": "The plan was drafted on 2026-04-19, but the checked-in note is dated 2026-04-26 because that is when the durable behavior contract was re-proved on the implementation machine and the earlier 2026-04-23 contract capture was superseded by the newer provider behavior. Binary version facts were refreshed on 2026-05-03 after installed provider versions changed, and the Claude Code binary version fact was refreshed on 2026-05-06 after the local installed binary changed to 2.1.132. These later version-only refreshes did not re-prove the behavior contract.",
12+
"dateReason": "The plan was drafted on 2026-04-19, but the checked-in note is dated 2026-04-26 because that is when the durable behavior contract was re-proved on the implementation machine and the earlier 2026-04-23 contract capture was superseded by the newer provider behavior. Binary version facts were refreshed on 2026-05-14 after the installed provider versions changed, and the OpenCode binary version fact was refreshed on 2026-05-16 after the installed provider version changed again.",
1413
"cleanup": {
1514
"liveProcessAuditCommand": "ps -eo pid,ppid,stat,cmd --sort=pid | rg \"codex|claude|opencode\"",
1615
"ownershipReportFields": [
@@ -95,14 +94,15 @@ The implementation plan file is dated `2026-04-19` because the design work was w
9594
"opencode": {
9695
"executable": "opencode",
9796
"resolvedPath": "/home/user/.opencode/bin/opencode",
98-
"version": "1.14.39",
97+
"version": "1.15.3",
9998
"runCommandTemplate": "opencode run <prompt> --format json --dangerously-skip-permissions",
10099
"serveCommandTemplate": "opencode serve --hostname 127.0.0.1 --port <port>",
101100
"globalHealthPath": "/global/health",
102101
"sessionStatusPath": "/session/status",
103102
"canonicalIdentity": "session-id",
104103
"runEventSessionIdMatchesDbId": true,
105104
"busyStatusUsesAuthoritativeSessionId": true,
105+
"attachFormatJsonEmitsEvents": true,
106106
"titleOnResumeMutatesStoredTitle": false,
107107
"sessionSubcommands": [
108108
"list",
@@ -290,7 +290,7 @@ command -v opencode
290290
# /home/user/.opencode/bin/opencode
291291

292292
opencode --version
293-
# 1.14.39
293+
# 1.15.3
294294
```
295295

296296
Fresh isolated runs were probed with:
@@ -315,9 +315,10 @@ curl http://127.0.0.1:<port>/session/status
315315

316316
Observed control behavior:
317317

318-
- `/global/health` returned a healthy payload with version `1.14.39`.
318+
- `/global/health` returned a healthy payload with version `1.15.3`.
319319
- `/session/status` returned `{}` while idle.
320-
- During an attached `opencode run ... --attach http://127.0.0.1:<port>`, `/session/status` returned the same authoritative `sessionID` with `{ "type": "busy" }`.
320+
- During an attached `opencode run ... --attach http://127.0.0.1:<port>`, `/session/status` returned an authoritative `sessionID` with `{ "type": "busy" }`, and the same id was persisted as a `session.id` row in the isolated OpenCode database.
321+
- On the 2026-05-16 rerun with OpenCode `1.15.3`, attached `opencode run ... --attach ... --format json` exited successfully and emitted JSON event lines on stdout. `/session/status` remains the authoritative live-control surface while the attached command is busy, and the attached-run stdout session id matched the busy status/database session id in this probe.
321322

322323
Title semantics were probed with:
323324

0 commit comments

Comments
 (0)