Important
Problem — harmoniqs/opencode is 5 days / 77 commits / 3 releases behind anomalyco/opencode (v1.18.12 @ 7fe99387 from 2026-08-04 → v1.18.15 @ d7b115f + HEAD 0bff28de on 2026-08-09, 493 files +71454/-4423). Drift includes RTL/i18n, markdown-worker, and chronological message-ordering changes that touch fork-owned hotspots (message-timeline.tsx, markdown.tsx, language.tsx, titlebar.tsx). Cutting the next v*-amicode.* release without syncing bakes stale upstream bugfixes into the shipped binary and raises the next sync's conflict cost.
Approach — Land the one-off sync (v1.18.12 → v1.18.15+, 27 conflict files hand-merged) and, in the same slice, make future syncs automated: a scheduled notturno-style sentinel that fetches anomalyco/opencode dev, opens notturno/merge-upstream-YYYY-MM-DD, runs a parity-manifest + OPENCODE_CHANNEL=dev gate check, and posts a PR against local/amicode. Keep the fork — don't rebase away amicode surfaces.
Scope — in: one-off merge to 0bff28de (or v1.18.15), resolution of 27 conflict files, AMICODE-PATCHES.md update + tag v1.18.15-amicode.1, sentinel automation (schedule + manual dispatch), docs for sst → anomalyco remote rename. out: dropping the fork, switching default branch, or changing release channel semantics.
Assumptions — local/amicode stays default branch; anomalyco/opencode dev is the canonical upstream; OPENCODE_CHANNEL=dev remains the gate for amicode surfaces; amicode-release.yml tag-triggered release stays.
Acceptance Criteria
- local/amicode merges anomalyco/opencode dev @ 0bff28de (or newer v1.18.15+ if HEAD moves) with all 27 conflict files resolved per patch-stack policy (adopt upstream bugfixes, keep fork branding/KaTeX/entity-rail/bug-dock, re-delete debug-bar.tsx).
- AMICODE-PATCHES.md logs the sync (upstream SHA, file counts, decisions) and header points to anomalyco/opencode; package.json workspaces bump to 1.18.15.
- env -u OPENCODE_CONFIG_CONTENT -u OPENCODE_SERVER_PASSWORD bun test + bun run typecheck pass (known flakes httpapi-v2-pty, project-picker-recent-search quarantined as before).
- OPENCODE_CHANNEL=dev build succeeds and binary greps newLayoutDesigns:…()=>!0 (no prod-channel slip).
- Tag v1.18.15-amicode.1 pushed → amicode-release.yml builds opencode-linux-x64 + opencode-darwin-arm64 artifacts with SHA256SUMS.
- Scheduled automation exists (weekly + workflow_dispatch) that: re-adds upstream as anomalyco/opencode if missing, fetches dev, creates notturno/merge-upstream-YYYY-MM-DD, attempts merge, and opens/updates a PR against local/amicode with conflict summary + parity manifest. Zero-conflict merges auto-open; conflicted merges post the 27-file checklist.
- No silent downgrade: if a better tier/template exists but needs entitlement, automation surfaces blocked_higher instead of downgrading.
Testing Decisions
Extend existing suites; create none. Primary signals: bun test (with env leak quarantine), bun run typecheck, script/build.ts --single --skip-install channel-gate grep, and smoke launch of built binary (entity rail / ask cards / vaults still mount). New automation gets a dry-run dispatch test (manual workflow_dispatch on a no-op day).
Key Decisions
- Merge, not rebase — preserve local/amicode history and AMICODE-PATCHES.md merge-commit traceability (1f09d0dc5 / 50f8eb003 pattern).
- Sentinel lives in harmoniqs/amico or as fork GH workflow — notturno hermetic clone previously failed on missing git identity (harmoniqs/amico#322, fixed #324); reuse that fix rather than inventing a new merger.
- Upstream remote is anomalyco/opencode — sst/opencode is stale (rename 0cf029478); update re-add logic and AMICODE-PATCHES.md historical refs.
- i18n parity via script/translate-app.ts — prefer upstream's generator over manual EN fallback fill; fallback to copy-EN for 40 new locales if generator unavailable.
- keep fork, pull mothership improvements — automation is pull-only; fork-owned surfaces (AmicodeThemeBridge, draft-store, marked KaTeX macros) are never auto-resolved to theirs.
Constraints & Invariants
- local/amicode remains origin/HEAD; never force-push it.
- OPENCODE_CHANNEL=dev on every build that ships amicode surfaces (gotcha 2 in patch log).
- debug-bar.tsx stays deleted on the fork; marked.tsx → marked-theme.tsx extraction must re-thread KaTeX macros.
- bun.lock resolution is theirs + bun install (mechanical).
- Automation never pushes to upstream; push URL for upstream stays disabled.
Prior Art
- AMICODE-PATCHES.md (sync 2026-08-01: 78 conflicts, 2026-08-04: 0 conflicts, sentinel phantom-conflict note)
- packages/opencode/script/build.ts + packages/script/src/index.ts (version/channel, OPENCODE_VERSION/OPENCODE_CHANNEL)
- .github/workflows/publish.yml (upstream, guarded anomalyco/opencode only) + .github/workflows/amicode-release.yml (fork, tag-triggered, channel-gate grep)
- harmoniqs/amico#322 / harmoniqs/amico#324 (notturno sentinel identity fix)
- dry worktree: 7fe99387..0bff28de 77 commits / 493 files, cf4f06b41..d1ea581d4 101 fork commits, 27-file conflict set (110 overlap)
Notes
- Upstream drift as of 2026-08-09: v1.18.13 RTL/plural, v1.18.14 retry/proxy, v1.18.15 chronological ordering + session-export. Dry merge shows high-risk files: app.tsx, entry.tsx, language.tsx, titlebar.tsx, session-context-tab.tsx, message-timeline.tsx, markdown.tsx, message-part.tsx, marked.tsx, desktop-menu.ts.
- No v1.18.12-amicode.* tag was cut after last sync — this slice should tag v1.18.15-amicode.1 directly.
- Project board: harmoniqs org board (Backlog → Ready → In Progress → In Review → Done); degrade silently if gh lacks read:project.
Reactions are currently unavailable
Important
Problem — harmoniqs/opencode is 5 days / 77 commits / 3 releases behind anomalyco/opencode (v1.18.12 @ 7fe99387 from 2026-08-04 → v1.18.15 @ d7b115f + HEAD 0bff28de on 2026-08-09, 493 files +71454/-4423). Drift includes RTL/i18n, markdown-worker, and chronological message-ordering changes that touch fork-owned hotspots (message-timeline.tsx, markdown.tsx, language.tsx, titlebar.tsx). Cutting the next v*-amicode.* release without syncing bakes stale upstream bugfixes into the shipped binary and raises the next sync's conflict cost.
Approach — Land the one-off sync (v1.18.12 → v1.18.15+, 27 conflict files hand-merged) and, in the same slice, make future syncs automated: a scheduled notturno-style sentinel that fetches anomalyco/opencode dev, opens notturno/merge-upstream-YYYY-MM-DD, runs a parity-manifest + OPENCODE_CHANNEL=dev gate check, and posts a PR against local/amicode. Keep the fork — don't rebase away amicode surfaces.
Scope — in: one-off merge to 0bff28de (or v1.18.15), resolution of 27 conflict files, AMICODE-PATCHES.md update + tag v1.18.15-amicode.1, sentinel automation (schedule + manual dispatch), docs for sst → anomalyco remote rename. out: dropping the fork, switching default branch, or changing release channel semantics.
Assumptions — local/amicode stays default branch; anomalyco/opencode dev is the canonical upstream; OPENCODE_CHANNEL=dev remains the gate for amicode surfaces; amicode-release.yml tag-triggered release stays.
Acceptance Criteria
Testing Decisions
Extend existing suites; create none. Primary signals: bun test (with env leak quarantine), bun run typecheck, script/build.ts --single --skip-install channel-gate grep, and smoke launch of built binary (entity rail / ask cards / vaults still mount). New automation gets a dry-run dispatch test (manual workflow_dispatch on a no-op day).
Key Decisions
Constraints & Invariants
Prior Art
Notes