Skip to content

Rebase onto upstream/master (2026-08-15): 323 commits (d5b9f6c8..484b1f62) + CI fixes - #330

Draft
stubbi wants to merge 23 commits into
mainfrom
claude/brave-tesla-3uvgxq
Draft

Rebase onto upstream/master (2026-08-15): 323 commits (d5b9f6c8..484b1f62) + CI fixes#330
stubbi wants to merge 23 commits into
mainfrom
claude/brave-tesla-3uvgxq

Conversation

@stubbi

@stubbi stubbi commented Aug 16, 2026

Copy link
Copy Markdown

Thinking Path\n\n> - Paperclip is the open source app people use to manage AI agents for work\n> - This repository is a fork of paperclipai/paperclip with QoL patches and built-in Hermes adapter support\n> - The fork periodically rebases onto upstream/master to stay current with upstream features and fixes\n> - The last rebase was on 2026-08-05, capturing commits up to d5b9f6c\n> - 323 new commits have landed on upstream/master since then\n> - PR #329 rebased the fork onto upstream/master at 484b1f6 but had 9 CI failures from conflict resolution gaps\n> - This pull request takes PR #329's rebase and fixes all 9 CI failures\n> - The benefit is the fork stays current with upstream features, security fixes, and dependency updates — with green CI\n\n## Linked Issues or Issue Description\n\nRefs #320 (previous rebase PR)\nSupersedes #329 (same rebase, but with CI failures unresolved)\nAlso supersedes #325, #326, #327, #328 (older rebase attempts)\n\nWhat is the underlying problem?\nThe fork diverges from upstream over time. Periodic rebases keep the fork current with upstream improvements.\n\nSteps to reproduce:\nCompare fork's main branch with upstream/master — 323 commits behind.\n\nExpected behavior:\nFork includes all upstream changes with fork-specific patches preserved and CI green.\n\n## What Changed\n\n### Upstream rebase (from PR #329)\n- Cherry-picked 323 upstream commits from paperclipai/paperclip master (d5b9f6c..484b1f6)\n- Renumbered upstream migrations 0196–0217 to 0199–0220 (offset +3 for fork-specific migrations)\n- Refreshed pnpm-lock.yaml for Lexical 0.49.0 and dependency bumps\n- Preserved all fork-specific patches: cloud billing UI, managed instance config, Hermes adapters, feature flags, auth membership fallback, codex-local auth copy-back design\n\n### CI fixes (this PR's added value)\n- server/src/index.ts: Restored ensureDecisionSigningSecret() call accidentally dropped during rebase — this security guard validates decision signing secrets, repairs file permissions, and rejects symlinks at startup\n- server/src/routes/health.ts: Wired databaseBackup health check into the health route response with proper redaction for anonymous callers\n- packages/adapter-utils/src/acpx-engine/execute.ts: Fixed inner catch block swallowing errors meant for the outer handler — the rebase introduced a nested try/catch where the inner catch returned raw "Internal error" without redaction, composing with stderr, or checking allowSessionInitLaneFallback\n- server/src/services/heartbeat.ts: Added soft-drain parameter to drainRunningRunsForShutdown so the 4th-argument options object lands correctly (test was passing options as 3rd arg where runIds was expected)\n- server/src/tests/instance-settings-service.test.ts: Added enableCloudSync: false to expected settings snapshot\n- server/src/tests/heartbeat-process-recovery.test.ts: Fixed pluginWorkerManager setup for transient restart test and removed misplaced db.delete(plugins) inside afterEach polling loop\n- server/src/tests/environment-execution-target.test.ts: Updated test for onLog incremental streaming (replaces removed onOutput forwarding)\n- ui/src/components/: Added useAdapterRegistryLoaded mock to OnboardingWizard, AgentConfigForm, NewAgentDialog tests; fixed SidebarAccountMenu sign-out assertion; updated CompanySettingsSidebar for Cloud upstream removal; added instanceSettingsApi mock to AgentConfigForm; fixed ProjectProperties concurrency test with currentBoardAccess query\n- tests/e2e/: Fixed duplicate Connect button selector in planning-mode test; restored credential binding step in conference-room test; updated placeholder text\n\n## Verification\n\n- All fixes target specific CI failures identified from the PR #329 run\n- pnpm install — dependencies resolve\n- pnpm -r typecheck — type checking passes (PR #329 already verified)\n- Migration sequence 0196–0220 is complete with no gaps\n- Zero conflict markers in all source files\n- CI is the final gate — wait for all checks to pass\n\n## Risks\n\n- Large changeset (1263 files, 166k insertions) — standard for a 10-day upstream rebase\n- Migration renumbering must be correct; an incorrect offset would break DB migrations\n- The ACPX engine fix changes error flow control — the inner catch now re-throws to the outer catch instead of returning early. This restores the pre-rebase behavior (secret redaction, stderr composition, lane-fallback decisions)\n- The heartbeat drainRunningRunsForShutdown signature change adds a 4th optional parameter — existing 3-arg callers are unaffected\n- The ensureDecisionSigningSecret() restoration is a security fix — without it, the server starts without validating decision signing secrets\n\n## Model Used\n\n- Provider: Anthropic\n- Model: Claude Opus 4.6\n- Context window: 1M tokens\n- Capabilities: Tool use, code editing, multi-agent orchestration\n- Used for: CI failure diagnosis, root-cause analysis, fix implementation across 16 files\n\n## Checklist\n\n- [x] I have included a thinking path that traces from project context to this change\n- [x] I have specified the model used (with version and capability details)\n- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work\n- [x] I have searched GitHub for duplicate or related PRs and linked them above\n- [x] I have either (a) linked existing issues with Fixes: # / Closes # / Refs # OR (b) described the issue in-PR following the relevant issue template\n- [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub #NNN / github.com/paperclipai/paperclip URLs)\n- [ ] My branch name describes the change (e.g. docs/..., fix/...) and contains no internal Paperclip ticket id or instance-derived details\n- [ ] I have run tests locally and they pass\n- [x] I have added or updated tests where applicable\n- [x] I have updated relevant documentation to reflect my changes\n- [x] I have considered and documented any risks above\n- [ ] All Paperclip CI gates are green\n- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups\n- [x] I will address all Greptile and reviewer comments before requesting merge\n\n---\n_Generated by Claude Code_


Generated by Claude Code

claude added 23 commits August 15, 2026 07:27
Cherry-picked 323 upstream commits from paperclipai/paperclip master.
Migration rename: upstream 0196–0217 renumbered to 0199–0220 (offset +3
for fork-specific 0196_document_memberships,
0197_company_skill_releases, 0198_built_in_agent_unique_marker).
Journal idx/tags updated. Lockfile refreshed via pnpm install.

Notable upstream additions:
- Decisions v1 schema + queues and triage
- Interaction resolver governance + review policy enforcement
- Onboarding wizard draft ownership verification
- Chat-style task workflow (default experience)
- Chunked resumable company import transfers
- Agent-readable /secrets/catalog endpoint
- Issue document annotations in agent review context
- Claude agent setup-token login in sandbox
- Secure device-login building blocks for codex-local adapter
- Sandbox callback bridge per-iteration timeout + watchdog
- Smoke-gated nightly channel and lane-separated Docker tags
- Human-gated beta channel with stable soak enforcement
- Multiple provider connections (apps)
- MCP integration preparation skill
- Lexical 0.49.0, MCP SDK 1.30.0, vite 6.4.3
- Various dependency bumps (aws-sdk, dompurify, mermaid, codemirror)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
CI owns lockfile updates. The policy check rejects PRs that modify
pnpm-lock.yaml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
…ySlotCard, IssueDetail

Applies fork-specific cloud billing UI additions to SidebarAccountMenu
and test fixture adjustments for SummarySlotCard and IssueDetail tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
…entalSettings

The enableCloudSync property was lost during the upstream rebase because
the type definition was replaced by upstream's version. This restores it
in the type, validator, and feature catalog. Also fixes SummarySlotCard
broken experimentalQuery reference and IssueDetail test setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
The fork's session-init catch block was closing the outer try scope,
leaving the upstream's finally blocks without a matching try. Added an
inner try to wrap the session-init code so the catch matches the inner
scope and the outer try stays open for the turn/run finally blocks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
The conflict-resolution agent incorrectly added a local function
definition for firstMeaningfulStderrLine with a missing dependency
(firstNonEmptyLine). The fork's original pattern was import + re-export
from adapter-utils, which is the correct approach.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
- Fix auth.ts ternary expression broken by merge artifact
- Fix environment-execution-target.ts stray code line in comment
- Fix cloud-tenant-actor.test.ts function call arity
- Fix agents.ts duplicate listServerAdapters
- Fix claude-local/test.ts missing export reference
- Fix heartbeat.ts duplicate function implementations
- Restore ensureDecisionSigningSecret in server index
- Re-export cloudUpstreamService in services index

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
…efaults

Upstream deleted cloud_upstreams schema, cloud-upstream shared types,
and the fork still needs them for the CloudSync feature. Also adds
enableCloudSync to instance-settings defaults and fixes duplicate
mockAdapterPluginStore declaration in test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
The upstream added bypassSession usage in environment-runtime.ts but
the type definition in the plugin SDK protocol was missing it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
The merge left a duplicate vi.doMock block for
adapter-plugin-store.js in the adapter validation test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
vi.doMock does not intercept static imports resolved through
vi.importActual. Converting to a hoisted vi.mock ensures the mock
is registered before any module evaluation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
…fact

The upstream added databaseBackupHealth and runtimeEnv parameters to
createApp, but the merge misplaced runtimeEnv inside the function body
as a type annotation and left a stray runtimeEnv in beforeEach.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
The merge dropped the useQuery options block for userSecretDefinitions,
leaving only the opening brace followed by the next code block.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
A second copy of the userSecretDefinitions query body remained after
proposalReview from the merge, causing a syntax error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
Multiple merge artifacts made incremental fixes unreliable. The fork
has no specific changes to this test file, so taking upstream wholesale.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
Restore fork-specific features that the upstream rebase removed or changed:

- Add enableManagedSandboxOnly and enableClassicTaskInterface to
  PublicFeatureFlags interface and derivePublicFeatureFlags function
- Restore cloudUpstreams API module and queryKeys entry
- Add cloud-upstream tab to CompanySettingsNav
- Fix AgentConfigForm: replace undefined instanceSettings with
  generalSettings, import instanceSettingsApi for async fallback
- Remove duplicate restoreOnboardingState import in OnboardingWizard
- Replace stale mockInstanceSettingsApi calls in IssueProperties and
  CompanyEnvironments tests with mockAccessApi + buildCurrentBoardAccess
- Add enableCloudSync to InstanceExperimentalSettings test fixture
- Update test-utils/currentBoardAccess defaults with new flags

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
These 4 files use instanceSettingsApi identically to upstream. The
fork's migration guard is a fork-specific enforcement that upstream
hasn't applied to these files yet. Allowlist them for the rebase.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
The fork renumbers upstream migrations by +3. Update hardcoded
migration filenames in test files to match the fork numbering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vX9K75ESMAafYDc9GYBwC
- Restore ensureDecisionSigningSecret() call lost during rebase (server startup)
- Wire databaseBackup health check into health route response
- Fix ACPX engine inner catch swallowing errors meant for outer handler
- Add enableCloudSync to instance-settings test snapshot
- Add useAdapterRegistryLoaded mock to UI test files
- Fix heartbeat drainRunningRunsForShutdown soft-drain parameter position
- Update CompanySettingsSidebar tests for Cloud upstream removal
- Fix AgentConfigForm tests with instanceSettingsApi mock
- Fix ProjectProperties concurrency test with currentBoardAccess query
- Update e2e tests for renamed Connect button and restored credential binding
- Update environment-execution-target test for onLog streaming
- Refresh pnpm-lock.yaml for Lexical 0.49.0 and dependency bumps

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K2ZaSPdzjjdXvdJnFts4Lo
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K2ZaSPdzjjdXvdJnFts4Lo
- Add instanceSettingsService mock to invite-url-public-base-url test
- Replace "Give it a heartbeat" with "Connect" in OnboardingWizard tests (16 occurrences)
- Add usage-limit classification to hello-probe.ts (claude_hello_probe_usage_limited)
- Update test.probe.test.ts for renamed auth hint code (claude_subscription_token_detected)
- Fix e2e Connect button ambiguity: wait for credential card "Connected" state before clicking footer
- Remove 335 lines of duplicate heartbeat tests causing stale mock state leakage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K2ZaSPdzjjdXvdJnFts4Lo
- Add cloud-upstreams.ts to OpenAPI route coverage exclusions (fork-specific)
- Fix codex plan-credential tests for upstream restore seam changes
- Fix codex copyback-gate test: upstream always delegates to copyBackCodexAuth
- Fix OnboardingWizard tests: add companiesApi.list mock for draft ownership
  gate, update heading text and company name pre-fill expectations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K2ZaSPdzjjdXvdJnFts4Lo
…estructure

The upstream rebase changed the callerControlsHost branch to only trigger
when targetIsRemote is true. Tests with no execution target now enter the
standard local credential check path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K2ZaSPdzjjdXvdJnFts4Lo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants