Skip to content

cherry-pick: Honor branchedDatabases for package-deployed applications (conflicts → v5.3) - #3123

Merged
kriszyp merged 7 commits into
v5.3from
cherry-pick/v5.3/pr-3083
Oct 8, 2026
Merged

kriszyp merged 7 commits into
v5.3from
cherry-pick/v5.3/pr-3083

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Cherry-pick of PR #3083 onto `v5.3` produced conflicts on commit(s): `834835f5351b421fcbf1dae08f8da2e64a8a13c0 4f1aed8`.

Resolve the conflict markers on branch `cherry-pick/v5.3/pr-3083` and merge this PR.

@claude please review branch `cherry-pick/v5.3/pr-3083` and suggest a patch that resolves the conflict markers (<<<<<<< / ======= / >>>>>>>) introduced by cherry-picking PR #3083 onto `v5.3`. Post the suggested patch as a comment here — do not push.

Resolution on v5.3

The conflict markers are resolved in a new commit on top of the Action's commits. No history was rewritten.

Adapted to v5.3 (the cherry-picked tests assumed main's canary)

v5.3 has no deploy canary. An operations-API deploy answers 200 without a load check, and a refused package fails only when the restarted worker loads it.

  • The integration test's refused-deploy helper asserts the 200 and then waits for the refusal itself. For the missing database, that is the route going 404. For the root plugin package, it is get_status reporting error. The no-base-write and no-fork assertions are unchanged. The certification assertions and the isolated redeploy (which existed only to reach a certifiable load) were dropped.
  • The unit test's misplaced-config case asserts the ErrorResource. v5.3's outer loadComponent catch records no component status.
  • The components/DESIGN.md note drops the canary references and states how v5.3 reports these failures.

❓ Your call: on v5.3, a package whose branch preparation fails (for example a missing database) serves no routes and logs the error, but get_status reads it loaded. The nested load's catch records no status, and the root loop then marks an application with no plugin module as loaded. Main fixed both halves inside the canary PR (c3eb2f2). Other swallowed package-load failures on v5.3, such as a config-parse error or a misplaced branchedDatabases, already report the same way. I left it out of this backport and documented it, because fixing it changes get_status for every failed application load on the 5.3 line. If you want it, it is two small hunks backported from main as a separate v5.3 PR.

Verification

  • CI was dispatched on 2ecb1b8ef: Integration Tests (Node 24) ✅ and Unit Test (Node 24) ✅. The new test passed on the Node 24, uWS and Bun legs and is skipped on Windows by design.
  • Locally (RocksDB): componentLoaderBranches 4/4 and branched-database-package 8/8. Against v5.3's original componentLoader.ts, the adapted integration test fails 8/8, each at the intended assertion, so the v5.3 assertions are not vacuous.
  • The PR-triggered Unit Test (Node.js v26) fails with withNodeAdapter compression and install_node_modules dry-run failures on Node 26.11.1. The same failures appear on other open PRs on both main and v5.3, so they are not from this change.
  • Pre-push review (codex, gemini, cursor-composer, harper-domain; 3 rounds): 2 findings fixed. 1 minor is deferred as the call above. The remaining nits concern text that is byte-identical to main's Honor branchedDatabases for package-deployed applications #3083.

— Claude Opus 5.5

🤖 Generated with Claude Code

https://claude.ai/code/session_011KV6qxwDSB78CKhegmi8Rf

Related PRs: #3083 overlaps, 5 others independent

Review-Coverage: authored=claude; ran=cursor-composer,gemini,codex; adjudicated=domain; declined=cursor-grok,cursor-kimi,cursor-muse; rounds=3; full=1 @ 2ecb1b8

Review-Attention: read ~3m (decisions: document-not-fix-status-gap, refuse-branched-root-plugin, refusal-after-preparation) @ 2ecb1b8

kriszyp and others added 3 commits October 8, 2026 19:04
Prepare root-config database forks on the package application's supplied
scope before importing its modules. Nested components keep the same
branches, and root plugin callbacks that would receive the shared root
scope fail closed.

Cover package deployments in shared and isolated workers, certification
failures, initialization and HTTP writes, restart persistence, and drop
cleanup.

Dispatch-Task: harper-3071
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Restore the unit suite's main-worker mode and guard cleanup when fixture
creation fails. Exercise a real native module import for an unbranched
supplied scope. Explain the upgrade snapshot and retained fork after root
plugin refusal, and keep the design index in note order.

Dispatch-Task: harper-3071
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Import a sentinel module for the unbranched native-scope case so the test
can check loading without mixing source and compiled database singletons.
Keep the ownership contract in its option documentation and tidy the index.

Dispatch-Task: harper-3071
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
kriszyp and others added 4 commits October 8, 2026 13:15
Keep v5.3's validated-deploy and serialized-preparation index entries and
the single package-branch entry at the end of the components section.
Pass both the root-config branchedDatabases and v5.3's collectScopes to
a root package's own load.

Dispatch-Task: cherry-resolve-kriszyp_harper_3083-e583ebac
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KV6qxwDSB78CKhegmi8Rf
v5.3 has no deploy canary: an operations-API deploy answers 200 without
a load check, and a refused package load surfaces only in the restarted
worker. Assert the refusals there instead of in a certification body:
the missing-database load registers no routes, and the root plugin
package reports an error status. A non-root load failure on v5.3 leaves
an error resource but records no component status, so the unit test
checks the resource.

Drop the canary references from the design note and the isolated
redeploy that existed only to reach a certifiable load.

Dispatch-Task: cherry-resolve-kriszyp_harper_3083-e583ebac
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KV6qxwDSB78CKhegmi8Rf
The 200 answer alone proves nothing on v5.3; taking the refusal
condition in the helper keeps a caller from asserting the deploy
without waiting for the restarted worker to refuse it.

Dispatch-Task: cherry-resolve-kriszyp_harper_3083-e583ebac
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KV6qxwDSB78CKhegmi8Rf
Dispatch-Task: cherry-resolve-kriszyp_harper_3083-e583ebac
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KV6qxwDSB78CKhegmi8Rf
@kriszyp
kriszyp merged commit 608d1d4 into v5.3 Oct 8, 2026
82 of 83 checks passed
@kriszyp
kriszyp deleted the cherry-pick/v5.3/pr-3083 branch October 8, 2026 21:02
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.

1 participant