Rebase onto upstream/master (2026-08-11): 204 commits (d5b9f6c8..66575fe5) - #325
Rebase onto upstream/master (2026-08-11): 204 commits (d5b9f6c8..66575fe5)#325stubbi wants to merge 17 commits into
Conversation
Brings in upstream d5b9f6c..66575fe — 204 commits. Notable: decisions v1 schema and queues, interaction resolver governance, heartbeat context snapshot indexes, review path recovery idempotency, database backup health endpoint, secret proposals sweep, cloud uploader credential scoping, Vitest shard split, company import/export timestamp preservation, and dependency bumps. Migrations 0199–0214 (upstream 0196–0211 renumbered +3 for the fork offset). Snapshot files renumbered correspondingly. No pnpm-lock.yaml in the diff, per fork policy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
Upstream commit 916c135 removed enableCloudSync as part of replacing Cloud Sync with Import/Export. The fork still uses this flag for cloud hosting features across server, UI, and CLI. Re-add the property to the type and validator so the fork compiles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
The feature catalog requires an entry for every InstanceFeatureKey. The previous commit restored enableCloudSync in the type and validator but missed the catalog entry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
The fork's separate try-catch for session config broke the outer try-finally that ends the run root span. Added the missing opening try brace to restore balanced nesting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
The conflict resolution changed the restore callback from an expression arrow to a block arrow but did not add the closing brace for the block body. Added the missing } and fixed the trailing comma to semicolon. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
…an try The previous fix added try at the wrong scope level, causing variables declared in the outer function to be invisible inside the try block. Restructured to nest the session config try-catch inside the outer try that guards the run root span, matching upstream's structure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
The fork's ensure_session catch closes the scope containing prepared, runtime, and other variables. An outer try-finally wrapping the session config and turn code can't see those variables. Instead, call runRootSpan.end(runFailed) at each return point: the session config catch, the no-handle early return, and the turn finally block. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
… try The fork's ensure_session catch closes the try scope at depth 3, making variables declared inside it (prepared, runtime, childStderrState, clearSession, referencedProjectStagingFailuresField) invisible to the turn code at depth 2. Hoisted these declarations to the outer scope (depth 2) so they're visible across all try-catch blocks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
…ry scope Additional variables (rootSpan, handle, resumedSession, processIdentitySink) also need to be declared before the ensure_session try block so they're visible in the turn code and catch blocks that run after the catch closes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
The ensureSession function referenced in the type is defined inside the try block and unavailable at the hoisted declaration site. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
…eams files - Added enableCloudSync to both normalizeExperimentalSettings return paths in instance-settings.ts. - Removed cloud-upstreams service, route, and test — upstream replaced Cloud Sync with Import/Export and dropped the tables; these files referenced deleted types and were not registered in the server index. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
- Restored cloud-transfer.ts and cloud-store.ts which are fork-specific files accidentally deleted by the upstream patch (upstream removed its own Cloud Sync but these are fork additions). - Fixed auth-session-route test: the fork's lazy company creation means inserts[1] is a membership record, not a company name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
- Restored cloud-upstream types and API client deleted by upstream but needed by fork's CloudUpstream page - Added enableCloudSync to InstanceExperimentalSettings test mock - Fixed AgentConfigForm to use board-access pattern instead of direct instanceSettingsApi call (features-migration-guard compliance) - Added useTaskChatRedesignEnabled.ts to features-migration-guard allowlist - Updated migration test references for +3 renumbered filenames (0209→0212, 0210→0213, 0205→0208) - Restored databaseBackup inspection in health route Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
…edesign - Renumbered migration references in company-secret-proposals and decision-queue tests (0207→0210, 0198→0201, 0199→0202, 0200→0203) - Added enableTaskChatRedesign to PublicFeatureFlags and wired it in derivePublicFeatureFlags - Fixed IssueProperties.test.tsx mock to use accessApi instead of missing mockInstanceSettingsApi - Added cloud-upstream tab to CompanySettingsNav items array - Added enableTaskChatRedesign default to test utilities Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
… output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
…RunningRunsForShutdown The conflict resolution replaced the fork's options object parameter with upstream's runIds parameter. Combined into a single options object that accepts both runIds and the fork's drain overrides (drainTimeoutMs, pollIntervalMs, sleep, nowMs, hasInflightRuns). Updated the call site in index.ts to pass runIds inside options. Also fixed remaining migration test renumbering (0207→0210, 0198→0201, 0199→0202, 0200→0203). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
…down call sites
Two test call sites passed runIds as a direct array instead of
{ runIds: [...] } after the function signature changed to an options
object.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JNCWVTw4UJjnEYWAGZfpTV
CI Status — 2026-08-11 09:15 UTCPassing (15/20 jobs): policy, Build, Typecheck + Release Registry, Canary Dry Run, e2e shards (1–3), General tests server (3–5/5), Verify serialized server suites (1–4/5), workspaces-a (2/2) Failing (5/20 jobs) — 3 distinct root causes: 1.
|
Thinking Path
Linked Issues or Issue Description
Supersedes any stale rebase PRs targeting ranges before
d5b9f6c8. Continues the rebase cadence from #320.What Changed
d5b9f6c8..66575fe5— 204 commits. Notable: decisions v1 schema and queues, interaction resolver governance, heartbeat context snapshot indexes, review path recovery idempotency, database backup health endpoint, secret proposals sweep, cloud uploader credential scoping, Vitest shard split, company import/export timestamp preservation, task chat redesign components, cross-issue influence limits, decision signing/wakeup services, and dependency bumps.0199–0214(upstream0196–0211renumbered +3 for the fork offset). Snapshot files renumbered correspondingly.pnpm-lock.yamlin the diff, per fork policy.Conflict resolution approach
Applied the upstream diff as a patch, then used three-way merge (
git merge-file) for the 61 files that couldn't apply cleanly. Of those, 22 merged automatically and 39 required manual resolution. Fork-specific additions (cloud hosting, managed adapters, hermes, PostHog, billing, etc.) were preserved in all cases.Key resolution areas:
useFeatures()hooks, cloud access gates, and surface-gated navigation alongside upstream's new decision components, task chat redesign, sign-out hook, and cloud instance hooks.Verification
grep -rn "^<<<<<<< "returns empty).pnpm-lock.yamlin the diff.Honest scope limit: local suite not run. CI is the real gate — please wait for all gates to pass before merging.
Risks
Moderate, inherent to a 204-commit rebase:
0199–0214must not collide with anything landing between now and merge.Model Used
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template#NNN/github.com/paperclipai/paperclipURLs)docs/...,fix/...) and contains no internal Paperclip ticket id or instance-derived detailsGenerated by Claude Code