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
5 changes: 3 additions & 2 deletions BUGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If a test, typecheck, lint, or runtime failure appears during upstream backports

## Open Test Failures

No confirmed open test failures. A sandboxed full-suite run failed on 2026-06-06 with socket, watcher, dependency-resolution, and MCP OAuth browser symptoms, but the user-approved unsandboxed rerun passed with `1557 pass`, `8 skip`, `0 fail`.
No confirmed open test failures. A sandboxed full-suite run failed on 2026-06-06 with socket, watcher, dependency-resolution, and MCP OAuth browser symptoms, but the latest user-approved unsandboxed rerun passed with `1565 pass`, `8 skip`, `0 fail`.

## Open Edge Cases

Expand Down Expand Up @@ -47,7 +47,8 @@ The upstream shell truncation stream cleanup `e26abd8da` was skipped because Fra
## Fixed Summary

- PR 1 June upstream sync: prompt tool enables already present, `context_length_exceeded` overflow parsing already present, compaction transforms already present, LiteLLM `_noop` discouragement, subagent `todowrite` permissions, Bun `ZlibError` retryability, configured `model.limit.input`, `Tool.define()` wrapper mutation, read permission relative paths, and Plan Mode subagent deny inheritance.
- PR 2 June upstream sync: TypeScript LSP native `tsserver` args, MCP cleanup on failed connection/tool listing/refresh, MCP tolerant tool listing for invalid `outputSchema`, and webfetch timeout cleanup already present.
- PR 2 June upstream sync, merged as #39: TypeScript LSP native `tsserver` args, MCP cleanup on failed connection/tool listing/refresh, MCP tolerant tool listing for invalid `outputSchema`, and webfetch timeout cleanup already present.
- Phase 3 CLI/plugin sync: non-interactive `mcp add`, searchable/provider-name `auth logout`, and plugin `dispose` hook.
- Security fixed: S1 symlink containment bypass, S2 command injection in GitHub open flow, S4 unauthenticated non-loopback server, S5 sensitive `.env` read exposure.
- QA fixed: B53-B64, including CAS transaction/reference safety, edit graph transactions, synthetic ID collisions, plugin trigger errors, objective prompt escaping, MCP add return shape, text timing preservation, ripgrep JSON parse handling, and untracked line counts.
- Earlier fixed bugs: PRs #10-#33 in git history.
Expand Down
29 changes: 15 additions & 14 deletions DO_NEXT.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
# Frankencode Do Next

Use this file as the first handoff target in fresh sessions. It described only the next actionable work after the PR 2 reliability slice.
Use this file as the first handoff target in fresh sessions. It described only the next actionable work after the Phase 3 CLI/plugin slice.

## Immediate Task

Start Phase 3 from `PLAN.md`: evaluate small feature candidates that had direct CLI, MCP, provider, plugin, or TUI value and did not depend on upstream's V2 runtime or package split.
Continue Phase 3 from `PLAN.md` with one contained provider or TUI slice. The best next provider candidate was:

Best first candidates:

- `ba57718b0` / #31054: non-interactive `mcp add`.
- `3f0ef9b71` / #31053: search in auth logout command.
- `519d34447` / #29493: plugin dispose hook.
- `f965db9e1` / #29484: provider `headerTimeout` config.

Keep these dedicated work items separate unless the chosen PR explicitly focused on session or compaction behavior:

- `e76cf967e` / #27254: interrupted assistant finalization.
- `ca28dd02e` / #27145: compaction tail restoration.

## Current State

- PR #37 merged at `e6c148f54`.
- PR #38 merged at `9d8296e32` and established bundled continuity-doc updates.
- PR 2 reliability work ran on `fix/upstream-reliability-batch-2`.
- PR 2 ported TypeScript LSP native `tsserver` args and MCP cleanup/schema tolerance.
- PR 2 confirmed webfetch timeout cleanup was already present.
- PR 2 skipped upstream shell truncation cleanup as not applicable to Frankencode's current architecture.
- PR 2 deferred interrupted assistant finalization and compaction tail restoration for dedicated session/compaction work.
- PR #39 merged at `d10c548a7` and ported TypeScript LSP native `tsserver` args plus MCP cleanup/schema tolerance.
- PR #39 confirmed webfetch timeout cleanup was already present.
- PR #39 skipped upstream shell truncation cleanup as not applicable to Frankencode's current architecture.
- PR #39 deferred interrupted assistant finalization and compaction tail restoration for dedicated session/compaction work.
- The Phase 3 CLI/plugin slice ported non-interactive `mcp add`, searchable/provider-name `auth logout`, and plugin `dispose`.
- `cd packages/opencode && bun typecheck` passed on 2026-06-06.
- `cd packages/opencode && bun test test/lsp/server.test.ts test/mcp/lifecycle.test.ts test/tool/webfetch.test.ts` passed on 2026-06-06 with `6 pass`, `0 fail`.
- User-approved unsandboxed `cd packages/opencode && bun test --timeout 30000` passed on 2026-06-06 with `1557 pass`, `8 skip`, `0 fail`.
- `cd packages/plugin && bun typecheck` passed on 2026-06-06.
- `cd packages/opencode && bun test test/cli/mcp-add.test.ts test/cli/plugin-auth-picker.test.ts test/plugin/dispose.test.ts` passed on 2026-06-06 with `18 pass`, `0 fail`.
- User-approved unsandboxed `cd packages/opencode && bun test --timeout 30000` passed on 2026-06-06 with `1565 pass`, `8 skip`, `0 fail`.

## Next Commands

Expand Down
2 changes: 2 additions & 0 deletions GAP_ANALYSIS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| Gap | Priority | Status | Next action |
| ---------------------------------- | -------- | ------------------------------------ | ----------------------------------------------------------------------------------------- |
| S3 workspace trust prompt | Medium | Warning mitigation remained in place | Design a workspace trust prompt before loading local MCP/plugin config |
| Provider `headerTimeout` config | Medium | Phase 3 candidate remained | Port upstream #29484 in a provider-focused PR with retry/error coverage |
| Interrupted assistant finalization | Medium | Deferred from PR 2 | Port upstream #27254 only with focused session interruption coverage |
| Compaction tail restoration | Medium | Deferred from PR 2 | Port upstream #27145 only after mapping Frankencode's current compaction flow |
| TUI edit indicators | Low | Backlog | Add visual indicators for hidden/replaced/annotated parts when touching TUI context views |
Expand All @@ -23,6 +24,7 @@
| March Phase 6 | Effect behavioral analysis | Done; 0 reimplementations needed |
| June PR 1 | Low-risk upstream bugfix backports | Done and merged as #37 |
| June PR 2 | Reliability fixes with more coupling | Done; portable LSP/MCP fixes landed and divergent session/compaction items were deferred |
| June PR 3 | Small CLI/plugin feature backports | Done; non-interactive `mcp add`, auth logout search, and plugin disposal were ported |

## Permanently Out Of Scope

Expand Down
62 changes: 40 additions & 22 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Frankencode is a fork of OpenCode that adds context editing, content-addressable

Resync with upstream `anomalyco/opencode` by porting selected fixes and features from `upstream/dev` into Frankencode.

**Snapshot:** 2026-06-06 after PR #38 merged
**Snapshot:** 2026-06-06 after PR #39 merged

| Item | State |
| --------------------------- | -------------------------------------------- |
| Frankencode branch | `dev` at `9d8296e32` before PR 2 branch work |
| Upstream branch | `upstream/dev` at `4519a1da3` |
| Divergence | `34 ahead / 3613 behind` |
| Upstream package version | `packages/opencode` `1.16.2` |
| Frankencode package version | `packages/opencode` `1.2.27` |
| Item | State |
| --------------------------- | ---------------------------------------- |
| Frankencode branch | `dev` at `d10c548a7` before Phase 3 work |
| Upstream branch | `upstream/dev` at `4519a1da3` |
| Divergence | `34 ahead / 3613 behind` |
| Upstream package version | `packages/opencode` `1.16.2` |
| Frankencode package version | `packages/opencode` `1.2.27` |

## Strategy

Expand Down Expand Up @@ -79,23 +79,41 @@ Exit criteria:
- `cd packages/opencode && bun test test/lsp/server.test.ts test/mcp/lifecycle.test.ts test/tool/webfetch.test.ts` passed on 2026-06-06.
- User-approved unsandboxed `cd packages/opencode && bun test --timeout 30000` passed on 2026-06-06 with `1557 pass`, `8 skip`, `0 fail`.

## Active Phase: Phase 3, Feature Candidates
PR 2 merged as #39 on 2026-06-06.

## Completed Phase: PR 3, Small CLI And Plugin Features

PR 3 ported the Phase 3 candidates that were useful and contained without touching upstream's V2 runtime, package split, session, or compaction architecture.

| SHA | Upstream PR | Area | Feature | Status |
| ----------- | ----------- | -------- | ----------------------------- | ------------------------------------------------------------------------ |
| `ba57718b0` | #31054 | CLI/MCP | Non-interactive `mcp add` | Ported with argument/config builder coverage |
| `3f0ef9b71` | #31053 | CLI/Auth | Search in auth logout command | Ported with provider id/name resolution coverage |
| `519d34447` | #29493 | Plugin | Plugin dispose hook | Ported with real local plugin disposal coverage through instance dispose |

Exit criteria:

- The selected CLI/plugin features were ported manually into Frankencode's current command and plugin architecture.
- Upstream help snapshot changes were skipped because Frankencode did not have the upstream help snapshot suite.
- `cd packages/opencode && bun typecheck` passed on 2026-06-06.
- `cd packages/plugin && bun typecheck` passed on 2026-06-06.
- `cd packages/opencode && bun test test/cli/mcp-add.test.ts test/cli/plugin-auth-picker.test.ts test/plugin/dispose.test.ts` passed on 2026-06-06 with `18 pass`, `0 fail`.
- User-approved unsandboxed `cd packages/opencode && bun test --timeout 30000` passed on 2026-06-06 with `1565 pass`, `8 skip`, `0 fail`.

## Active Phase: Phase 3, Remaining Feature Candidates

Evaluate only after the bugfix phases. Prefer features with direct CLI/provider/plugin value and low architectural coupling.

| SHA | Upstream PR | Area | Feature | Notes |
| ----------------------- | ---------------------- | --------------- | ---------------------------------------- | --------------------------- |
| `ba57718b0` | #31054 | CLI/MCP | Non-interactive `mcp add` | Likely useful and contained |
| `3f0ef9b71` | #31053 | CLI/Auth | Search in auth logout command | Small UX improvement |
| `519d34447` | #29493 | Plugin | Plugin dispose hook | Useful for cleanup |
| `f965db9e1` | #29484 | Provider | `headerTimeout` config | Reliability feature |
| `2859ce6e7` | #29901 | Provider | Snowflake Cortex provider | Provider expansion |
| `d34a0194e` | #27394 | Provider | NVIDIA endpoints origin header | Small provider correctness |
| `159964b17` | #26095 | Provider/plugin | DigitalOcean OAuth and inference routers | Medium size |
| `0de5f1ff3` | #28255 | TUI | Configurable prompt size | Small TUI UX |
| `bba76009a` | #29710 | TUI | Wide-character paste safety | Bugfix-grade TUI item |
| `5fb85a6aa` | #28664 | TUI | Wrapped inline tool row layout | Bugfix-grade TUI item |
| `17d66ee4f` + followups | #28476, #28728, #30935 | TUI | Diff viewer and hunk navigation | Larger feature set |
| SHA | Upstream PR | Area | Feature | Notes |
| ----------------------- | ---------------------- | --------------- | ---------------------------------------- | -------------------------- |
| `f965db9e1` | #29484 | Provider | `headerTimeout` config | Reliability feature |
| `2859ce6e7` | #29901 | Provider | Snowflake Cortex provider | Provider expansion |
| `d34a0194e` | #27394 | Provider | NVIDIA endpoints origin header | Small provider correctness |
| `159964b17` | #26095 | Provider/plugin | DigitalOcean OAuth and inference routers | Medium size |
| `0de5f1ff3` | #28255 | TUI | Configurable prompt size | Small TUI UX |
| `bba76009a` | #29710 | TUI | Wide-character paste safety | Bugfix-grade TUI item |
| `5fb85a6aa` | #28664 | TUI | Wrapped inline tool row layout | Bugfix-grade TUI item |
| `17d66ee4f` + followups | #28476, #28728, #30935 | TUI | Diff viewer and hunk navigation | Larger feature set |

## Deferred Architecture Work

Expand Down
Loading
Loading