Skip to content

Split services into workspaces and offload extension packaging - #314

Merged
admdly merged 4 commits into
mainfrom
codex/package-runtime-fixes
Nov 10, 2026
Merged

admdly merged 4 commits into
mainfrom
codex/package-runtime-fixes

Conversation

@admdly

@admdly admdly commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Organise deployable services under services/ and shared code under libraries/, using npm workspaces and one root lockfile. Most files in this diff are moves.
  • Add services/extension-packager with a thin Netlify entry point and the same Request/Response handler used by the local Node server. A generic HTTP processor adapter sends object metadata; the runner reads and writes private B2 objects directly.
  • Share packaging contracts, ZIP processing, storage adapters and logging without importing one service's source into another.
  • Extend the existing API platform context for background tasks, service requests and rate limiting; use the existing cache interface in application helpers. D1 and specialised R2/Durable Object integrations remain provider-specific.
  • Replace the API's Git integration deployment path with the pinned organisation workflow: build artifacts with their SQL migrations, production/staging migration targets, branch and commit Previews, and PR deployment history.
  • Rename the job contract to PackagingJob and the polling route to /extensions/v2/packaging-jobs/{jobId}.

Deployment setup

Production and Preview packaging remain disabled. This PR does not enable processing.

Before switching deployment workflows, configure the GitHub production and preview environments and their Cloudflare tokens, the repository account ID and API_PREVIEW_RESOURCES variables, staging resources and Preview runtime secrets. Update required check names and disable Cloudflare Workers Builds Git integration to avoid duplicate deployments. When API_PREVIEW_RESOURCES is unset, CI explicitly skips Preview migrations and deployment while continuing validation and artifact checks. Configured Preview failures and production migration failures still fail CI. Details are in the API deployment guide.

Before enabling processing, deploy and verify the separate Netlify project, configure its B2 credentials and shared secret, set the API's processor URL/secret, and repeat the controlled production canary with runtime measurements. Verify native dependencies, near-limit ZIPs, stored-source rebuilds, approval and cleanup. See the packager guide.

Matching directory and publisher polling-route changes are prepared locally and are outside this API PR. Publish those caller changes before enabling processing; keep the publisher rollout gated on the production runtime test.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-10T12:03:27.813529Z 5ea9b74 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

Deploying Preview to Cloudflare (api)

No successful preview deployment recorded yet

Build and deployment attempts are listed below.

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) Details
Build: Success ✅
Checks: Failed ❌
Deployment: Not run ⏭️
— 5ea9b74 2026-11-10T11:58:23.109Z View logs ↗

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 306 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/ci.yml Resolved
Comment thread README.md Resolved
Comment thread services/api/README.md Resolved
@admdly admdly self-assigned this Nov 10, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 3 files (changes from recent commits).

Requires human review: Auto-approval blocked by 21 unresolved issues from previous reviews.

Turn on auto-fix | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 25 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="services/extension-packager/test/processor.test.ts">

<violation number="1" location="services/extension-packager/test/processor.test.ts:210">
P2: This assignment mutates the shared module-level `manifest` constant, because `f.input()` returns that same object. Clone the manifest before setting `modules` so later tests keep the base fixture.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 5 files (changes from recent commits).

Requires human review: Large workspace split that rewrites CI/CD deploys and migrations, adds a new extension-packager service, and renames a public polling route; the deployment tradeoffs and the claim that processing stays disabled need human sign-off.

Turn on auto-fix | Re-trigger cubic

@admdly
admdly merged commit febd791 into main Nov 10, 2026
16 checks passed
@admdly
admdly deleted the codex/package-runtime-fixes branch November 10, 2026 13:10
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