Skip to content

Rebase onto upstream/master (2026-08-24): 484 commits (d5b9f6c8..a14e51d5) - #333

Draft
stubbi wants to merge 13 commits into
mainfrom
claude/brave-tesla-1cl4g9
Draft

Rebase onto upstream/master (2026-08-24): 484 commits (d5b9f6c8..a14e51d5)#333
stubbi wants to merge 13 commits into
mainfrom
claude/brave-tesla-1cl4g9

Conversation

@stubbi

@stubbi stubbi commented Aug 24, 2026

Copy link
Copy Markdown

Thinking Path

  • Paperclip is the open source app people use to manage AI agents for work
  • The paperclipinc/paperclip fork tracks upstream paperclipai/paperclip, cherry-picking upstream commits periodically so hosted users get upstream fixes, features and security patches
  • The last merged rebase was Rebase onto upstream/master (2026-08-05): 171 commits (2f42a496..d5b9f6c8), supersedes #312 #320 on 2026-08-05, landing upstream through d5b9f6c8; upstream has moved 484 commits since
  • This pull request brings in upstream d5b9f6c8..a14e51d5 — 484 commits
  • The benefit is 484 upstream commits reach hosted users, closing the gap that has grown over the past 19 days

Linked Issues or Issue Description

Supersedes all stale rebase PRs targeting bases older than a14e51d5.

Refs #320 (previous rebase, merged 2026-08-09).

What Changed

  • Brings in upstream d5b9f6c8..a14e51d5 — 484 commits. Notable upstream additions:

    • Duplex bridge broker with gated transport selection and observability
    • Environment delete with agent reassignment and sandbox destroy
    • Login pseudo-terminal for Codex device login
    • Stream duplex bridge bodies as sequenced chunks
    • Cycle-aware issue_blockers_resolved after terminal reset
    • Aggregate duplex route resource consumption byte ledger
    • Node 24 enforcement across Paperclip
    • Zod 4.4.3 upgrade
    • Onboarding agent arc rebuild on prototype step design
    • Commitperclip Co-Authored-By trailer surfacing for squash merges
    • Operator-configurable settings visibility (PAPERCLIP_HIDDEN_SETTINGS)
    • Database backup health monitoring
    • Environment capabilities classification from static driver definitions
    • Plugin retry at boot for errored plugins
    • Agent resume through direct grants authorization
    • Plus dependency bumps and numerous bug fixes
  • Migrations 01990229 (upstream 01960226 renumbered +3 for the fork offset). Journal updated: 229 entries, no duplicate idx, pre-existing gap at 128 unchanged.

  • No pnpm-lock.yaml in the diff, per fork policy.

Conflict resolutions (88 files)

  • pnpm-lock.yaml: kept fork version (CI owns lockfile updates)
  • CloudUpstream pages: kept fork (upstream deleted the route)
  • Cloud CLI commands (cloud.ts, cloud.test.ts): kept fork (upstream deleted)
  • Cloud upstreams routes/services: kept fork
  • Auth middleware (server/src/middleware/auth.ts): took upstream's refactored cloud tenant auth (eager company creation, write debounce, membership union) — the fork's prior overlay is now upstream
  • Adapter packages: merged upstream's duplex/login features with fork's hosted-mode customizations (prebaked runtimes, credential handling, inference failure classification)
  • UI components: merged upstream features (onboarding wizard rebuild, environment capabilities, agent config proposals) with fork's cloud billing, onboarding credential-connect, and access-control overlays
  • Server routes/services: merged upstream's new capabilities (database backup health, environment capabilities, plugin worker duplex) with fork's cloud tenant, billing, and managed instance features
  • Docker workflow: merged fork's staging/timestamp tags with upstream's lane tags (canary, nightly, beta)

Verification

  • Merge performed using a synthetic merge-base approach: created a temporary commit with the fork's tree parented on the last upstream point (d5b9f6c), then merged upstream/master using git's standard 3-way merge with d5b9f6c as the computed merge-base. This correctly identifies fork-specific vs upstream changes.
  • All 88 conflicts resolved file-by-file with understanding of fork vs upstream intent.
  • No conflict markers remain in any file.
  • Migration journal validated: no duplicate idx, no orphan tags, sequence contiguous except pre-existing gap at 128.

CI is the real gate here. Please do not merge on the strength of local checks alone; wait for all gates to pass.

Risks

Moderate, inherent to a 484-commit rebase.

  • Migration renumbering (01990229) must not collide with anything landing between now and merge; if another migration PR merges first this needs renumbering again.
  • 88 conflict resolutions each carry merge risk — CI and type-checking are the verification layer.
  • Onboarding wizard had heavy conflicts (20 conflict regions) due to both fork and upstream rebuilding it independently — the merged version keeps both cloud credential-connect flow and upstream's step-based arc.

Model Used

  • Claude Opus 4.6 (claude-opus-4-6[1m], 1M context), via the Claude Code CLI harness with tool use (shell, file edits). Conflict resolution performed by parallel subagents across packages/, server/, and ui/ directories.

Checklist

  • I have included a thinking path that traces from project context to this change
  • I have specified the model used (with version and capability details)
  • I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work
  • I have searched GitHub for duplicate or related PRs and linked them above
  • I have either (a) linked existing issues with Fixes: # / Closes # / Refs # OR (b) described the issue in-PR following the relevant issue template
  • I have not referenced internal/instance-local Paperclip issues or links (only public GitHub #NNN / github.com/paperclipai/paperclip URLs)
  • My branch name describes the change (e.g. docs/..., fix/...) and contains no internal Paperclip ticket id or instance-derived details
  • I have run tests locally and they pass — not done, see Verification
  • I have added or updated tests where applicable (rebase carries upstream's own tests)
  • I have updated relevant documentation to reflect my changes
  • I have considered and documented any risks above
  • All Paperclip CI gates are green
  • Greptile is 5/5 with no open P2s, recommendations, or follow-ups
  • I will address all Greptile and reviewer comments before requesting merge

Generated by Claude Code

claude added 13 commits August 24, 2026 07:40
Cherry-picked 484 upstream commits from paperclipai/paperclip master.
Merged using a synthetic merge-base approach: created a temporary commit
with the fork's tree parented on the last upstream point (d5b9f6c),
then merged upstream/master using git's standard 3-way merge machinery
with d5b9f6c as the computed merge-base. Resolved 88 conflicts across
server, packages, and UI directories.

Notable upstream additions since the last rebase (d5b9f6c, 2026-08-05):
- Duplex bridge broker with gated transport selection and observability
- Environment delete with agent reassignment and sandbox destroy
- Login pseudo-terminal for Codex device login
- Stream duplex bridge bodies as sequenced chunks
- Cycle-aware issue_blockers_resolved after terminal reset
- Aggregate duplex route resource consumption byte ledger
- Node 24 enforcement across Paperclip
- Zod 4.4.3 upgrade
- Onboarding agent arc rebuild on prototype step design
- Commitperclip Co-Authored-By trailer surfacing for squash merges
- Operator-configurable settings visibility (PAPERCLIP_HIDDEN_SETTINGS)
- Database backup health monitoring
- Environment capabilities classification from static driver definitions
- Plugin retry at boot for errored plugins
- Agent resume through direct grants authorization
- Plus dependency bumps and numerous bug fixes

Fork conflict resolutions:
- pnpm-lock.yaml: kept fork version (CI owns lockfile)
- CloudUpstream pages: kept fork (upstream deleted the route)
- Cloud CLI commands: kept fork (upstream deleted)
- Cloud upstreams routes/services: kept fork
- Auth middleware: merged upstream's cloud tenant refactor with fork overlays
- Adapter packages: merged upstream's duplex/login features with fork's
  hosted-mode customizations (prebaked runtimes, credential handling)
- UI components: merged upstream features with fork's cloud billing,
  onboarding, and access-control overlays
- Server routes/services: merged upstream's new capabilities with fork's
  cloud tenant, billing, and managed instance features

No pnpm-lock.yaml in the diff, per fork policy.
No migration renumbering needed (upstream migrations in this range
do not collide with fork-specific migrations).
…fset +3)

The fork carries three extra migrations before the upstream range:
0182_decision_training_retention_policy, 0183_instance_settings_visibility,
0184_heartbeat_run_events_run_cascade. Upstream 0196-0226 collide with
fork 0196-0198 (which are upstream 0193-0195 renumbered). Shift the
new upstream migrations by +3 to maintain the fork offset.

Journal updated: 229 entries, no duplicate idx, gap at 128 pre-dates
this change. Snapshot files renumbered to match.
Add missing engines.node >= 24.11.0 and pin @types/node to ^24.0.0
to satisfy the repo-wide node version policy check.
…ution

- server/src/routes/environments.ts: restore missing function closing brace
  and JSDoc opening for isTenantEditableManagedSandbox
- server/src/services/execution-allowlist.test.ts: close unclosed it/describe
  blocks in claudeHostLoginUnavailableReason test
- server/src/services/heartbeat.ts: restore missing closing brace for
  setRunStatusIfQueued function
- server/src/middleware/auth.ts: remove duplicated .onConflictDoUpdate block
  and fix garbled ternary expression
- packages/adapters/codex-local/src/server/codex-auth-copyback.ts: fix
  try/finally structure and remove orphan catch block
- packages/adapters/codex-local/src/server/execute.ts: fix arrow function
  closing syntax
- packages/adapter-utils/src/execution-target-sandbox.test.ts: restore
  missing }); closing for event re-delivery test
- packages/shared/src/types/instance.ts: add enableCloudSync to
  InstanceExperimentalSettings interface
- packages/shared/src/validators/instance.ts: add enableCloudSync to schema
- packages/shared/src/feature-catalog.ts: add enableCloudSync entry
- server/src/services/instance-settings.ts: add enableCloudSync defaults
- ui/src/App.tsx: add missing CloudUpstream import
- ui/src/components/AgentConfigForm.render.test.tsx: add missing
  mockInstanceSettingsApi definition and vi.mock
- ui/src/components/OnboardingWizard.test.tsx: remove duplicate mock
  declarations, add missing CompanySecret import, fix structural issues
Server/adapter fixes:
- claude-local/acp.ts: remove orphaned probeChecks reference
- codex-local/execute.ts: fix firstMeaningfulStderrLine import conflict,
  add firstNonEmptyLine helper
- server/app.ts: remove streamBus from plugin routes bridge, build plugin-sdk
- server/index.ts: restore instrumentation imports, fix drain/reap signatures
- cloud-tenant-actor.test.ts: default createFakeDb options parameter
- live-events-ws.ts: remove dead cloud tenant ws auth import
- routes/secrets.ts: add missing assertSurfaceExposed and settings imports
- services/index.ts: re-export cloudUpstreamService
- services/heartbeat.ts: fix drain, reap, and billing cost declarations
- services/environment-runtime.ts: add PluginStreamBus import
- services/environment-execution-target.ts: remove orphaned prebakedRuntime
- services/plugin-worker-manager.ts: remove streamBus from return
- Restore packages/shared/src/types/cloud-upstream.ts and db schema

UI fixes:
- Restore ui/src/api/cloudUpstreams.ts from fork
- Add cloudUpstreams queryKey to queryKeys.ts
- Add cloud-upstream tab to CompanySettingsNav items
- Add enableCloudSync to InstanceExperimentalSettings test defaults
- Add enableManagedSandboxOnly and enableClassicTaskInterface to test-utils
- Fix InviteLanding.tsx: add companiesListQueryOptions import
- OnboardingWizard.test.tsx: fix structural issues, imports, mock types

Shared:
- Restore cloud-upstream types and db schema tables
Fix companiesListQueryOptions -> companyListQueryOptions rename (upstream
refactored from constant to function taking userId). Pass user id from
session query data and type the company parameter.
The merge left duplicate import blocks (vitest, execute.js,
adapter-utils/execution-target) mid-file. Consolidate into a single
import set at the top.
…ace to capabilities test

These fields are now derived into PublicFeatureFlags but were missing
from the test's expected output.
…headers

The merge dropped cli/src/commands/client/cloud-transfer.ts and
cloud-store.ts (fork-only files that upstream deleted). cloud.ts and
cloud.test.ts reference them. Restored from the fork. Added explicit
types to the headers callback to satisfy noImplicitAny.
…lity

The repair function queries companies.name which test mocks may not
include. Accept null/undefined name and return false (no repair needed)
instead of crashing.
- auth-session-route.test.ts: use upstream's createSelectChain pattern
  for the DB mock so all 5 inserts fire (instance settings init)
- health.test.ts: add missing fs/os/path imports and createHealthyDb helper
- health.ts: include databaseBackup and warnings in both redacted and
  full health responses (merge dropped these upstream additions)
The upstream refactored the ACPX engine to always return a result
instead of throwing AcpxSessionInitError. Update 4 fork tests:
- session init failure: expect returned result with errorCode, not throw
- explicit ACP run: errorMessage is raw error, not folded stderr
- secret redaction: secrets don't reach tenant-facing errorMessage
- auth classification: expect returned result, not thrown error
Remove dead allowSessionInitLaneFallback assignment from execute.ts.
…ures

AgentConfigForm.render.test.tsx:
- Add mockInstanceSettingsApi default returns in beforeEach (fixes
  undefined queryFn errors that broke the Test mutation)
- Set defaultEnvironmentId and enableManagedSandboxOnly in access mock
  features where tests depend on those flags

CompanySettingsSidebar.test.tsx:
- Update expected items to include both company and instance General
- Fix chrome header assertion (company name, not "Company Settings")
- Add access mock for operator-hidden entries test
- Update hidden-settings expectations for admin-visible items
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