Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions DO_NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ Use this file as the first handoff target in fresh sessions. It should describe

## Immediate Task

Monitor and merge PR #37, then start PR 2 from `PLAN.md`.
Start PR 2 from `PLAN.md`: reliability fixes with more coupling.

Current branch:
Start branch:

```sh
fix/upstream-bugfix-batch-1
git switch dev
git pull --rebase origin dev
git switch -c fix/upstream-reliability-batch-2
```

## Current State

- PR 1 code is implemented, committed, pushed, and opened as PR #37.
- PR 1 merged as #37 at `e6c148f54`.
- `cd packages/opencode && bun typecheck` passed on 2026-06-06.
- `cd packages/opencode && bun test --timeout 30000` passed on 2026-06-06 with `1554 pass`, `8 skip`, `0 fail`.
- Full tests were run outside the sandbox because socket tests failed sandboxed with `EADDRINUSE`.
Expand All @@ -25,14 +27,13 @@ Run from repo root:

```sh
git status --short --branch
gh pr view 37 --repo e6qu/frankencode --json state,mergeStateStatus,statusCheckRollup
git fetch origin upstream
git switch dev
git pull --rebase origin dev
git switch -c fix/upstream-reliability-batch-2
```

If checks/review are clear, merge using the repository's normal PR process. Do not push directly to `dev`.

## After PR 1

Start PR 2 from `PLAN.md` only after PR 1 is merged or explicitly handed off. PR 2 queue:
Then inspect and port the PR 2 queue:

- MCP transport cleanup.
- MCP output schema `$ref` tolerance.
Expand All @@ -41,3 +42,5 @@ Start PR 2 from `PLAN.md` only after PR 1 is merged or explicitly handed off. PR
- Shell truncation stream cleanup.
- Interrupted assistant finalization.
- Compaction tail restoration.

Do not push directly to `dev`.
28 changes: 14 additions & 14 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Resync with upstream `anomalyco/opencode` by porting selected fixes and features

| Item | State |
| --- | --- |
| Frankencode branch | `dev` at `b09874542` |
| Frankencode branch | `dev` at `e6c148f54` |
| Upstream branch | `upstream/dev` at `4519a1da3` |
| Divergence | `34 ahead / 3613 behind` |
| Upstream package version | `packages/opencode` `1.16.2` |
Expand All @@ -30,7 +30,7 @@ Rules for every upstream-sync PR:
6. Run tests from package directories, normally `cd packages/opencode && bun typecheck && bun test`.
7. Update `STATUS.md`, `DO_NEXT.md`, `WHAT_WE_DID.md`, and `BUGS.md` before handing off or opening a PR.

## Active Phase: PR 1, Low-Risk Bugfix Backports
## Completed Phase: PR 1, Low-Risk Bugfix Backports

Port small, high-value fixes that still map to Frankencode's current `packages/opencode` layout.

Expand All @@ -55,21 +55,21 @@ Exit criteria:
- Relevant package tests pass from `packages/opencode`: full suite passed 2026-06-06 with `1554 pass`, `8 skip`, `0 fail`.
- `BUGS.md` is updated if any pre-existing or newly found issue remains: complete; no new confirmed runtime bugs.

PR 1 is open as #37. Remaining work: monitor checks/review, merge when approved, then start Phase 2.
PR 1 merged as #37 on 2026-06-06.

## Phase 2: Reliability Fixes With More Coupling
## Active Phase: PR 2, Reliability Fixes With More Coupling

Evaluate after PR 1. These are likely useful but may need more manual adaptation.
Evaluate and port these in a new feature branch. They are likely useful but may need more manual adaptation.

| SHA | Upstream PR | Area | Fix |
| --- | --- | --- | --- |
| `2e6ac8ff4` | #19200 | MCP | Close transport on failed or timed-out connection |
| `79d6b10d7` | #26614 | MCP | Tolerate output schema `$ref` failures |
| `01f031919` | #19953 | LSP | Avoid TypeScript LSP memory leak by using native project config |
| `bc1840b19` | #21378 | Web fetch | Clear webfetch timeouts on failed fetches |
| `e26abd8da` | #27517 | Shell tool | Close shell truncation stream |
| `e76cf967e` | #27254 | Session | Finalize interrupted assistant messages |
| `ca28dd02e` | #27145 | Compaction | Restore tail turns after summarization |
| SHA | Upstream PR | Area | Fix | Status |
| --- | --- | --- | --- | --- |
| `2e6ac8ff4` | #19200 | MCP | Close transport on failed or timed-out connection | Todo |
| `79d6b10d7` | #26614 | MCP | Tolerate output schema `$ref` failures | Todo |
| `01f031919` | #19953 | LSP | Avoid TypeScript LSP memory leak by using native project config | Todo |
| `bc1840b19` | #21378 | Web fetch | Clear webfetch timeouts on failed fetches | Todo |
| `e26abd8da` | #27517 | Shell tool | Close shell truncation stream | Todo |
| `e76cf967e` | #27254 | Session | Finalize interrupted assistant messages | Todo |
| `ca28dd02e` | #27145 | Compaction | Restore tail turns after summarization | Todo |

Exit criteria:

Expand Down
15 changes: 8 additions & 7 deletions STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,25 @@ Frankencode is ready for a new upstream maintenance phase. The old March roadmap

| Item | Value |
| --- | --- |
| Working branch | `fix/upstream-bugfix-batch-1` |
| Working branch | `docs/pr37-merged-next-phase` |
| Base branch | `dev` |
| Default branch | `dev` |
| Current upstream target | `upstream/dev` |
| Upstream commit reviewed | `4519a1da3` |
| Divergence after fetch | `34 ahead / 3613 behind` |
| Current PR | #37 |
| Latest merged PR | #37 at `e6c148f54` |
| Last full verified baseline | 2026-03-22: 1512 pass, 0 fail, 8 skip, 0 tsgo errors |
| Current typecheck | 2026-06-06: `cd packages/opencode && bun typecheck` passed |
| Current full package tests | 2026-06-06: `cd packages/opencode && bun test --timeout 30000` passed with `1554 pass`, `8 skip`, `0 fail` |

## Active Work

Finish PR 1 of the June 2026 upstream resync plan:
Start PR 2 of the June 2026 upstream resync plan:

1. Monitor PR #37 checks/review.
2. Merge PR #37 when approved.
3. Start PR 2 reliability fixes from `PLAN.md`.
1. Start from fresh `dev` after this docs handoff is merged or applied.
2. Create `fix/upstream-reliability-batch-2`.
3. Evaluate the PR 2 queue in `PLAN.md`.
4. Port each fix manually, add focused tests, and update continuity docs before PR creation.

## Fresh Session Checklist

Expand All @@ -52,4 +53,4 @@ Run these before implementation work:

- `bun test test/session/retry.test.ts` and the full package suite require local server binds. In the sandbox they failed with `EADDRINUSE`; rerunning outside the sandbox passed.
- Full package test count increased from the March baseline due existing repository changes plus PR 1 tests; current verified result is `1554 pass`, `8 skip`, `0 fail`.
- PR #37 is open for the PR 1 bugfix batch.
- PR #37 merged on 2026-06-06.
1 change: 1 addition & 0 deletions WHAT_WE_DID.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Compressed continuity log. Use git history and PRs for full details.
- Verified `cd packages/opencode && bun test --timeout 30000` passed with `1554 pass`, `8 skip`, `0 fail`.
- Noted that socket-based tests need to run outside the sandbox; sandboxed local binds failed with `EADDRINUSE`.
- Committed the batch as `4ab1837d1` and opened PR #37 against `dev`.
- PR #37 merged on 2026-06-06 at `e6c148f54`.

## Completed Baseline Through 2026-03-22

Expand Down
Loading