Skip to content

feat: add managed runtime delivery and safer project setup - #28

Merged
GFean merged 2 commits into
mainfrom
codex/managed-runtime-delivery
Aug 22, 2026
Merged

feat: add managed runtime delivery and safer project setup#28
GFean merged 2 commits into
mainfrom
codex/managed-runtime-delivery

Conversation

@GFean

@GFean GFean commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

Make managed runtime delivery the standard Bundle Drop path and harden automated and manual project setup.

Managed runtime delivery

  • Add signed, identity-bound runtime manifests and publisher authority leases.
  • Resolve public rollout decisions locally while keeping private user-property targeting on the Bundle Drop resolver.
  • Require fresh artifact authorization before managed downloads and patch application.
  • Add revocation-aware fallback, rollback, bounded downloads, signature verification, generation checks, and integrity validation.
  • Add privacy-safe runtime-delivery diagnostic counters.

Project setup

  • Add bundle-drop sync for generating or repairing the public runtime trust bootstrap.
  • Install package-managed Metro wrappers for bare React Native and Expo.
  • Harden Expo/bare detection, native startup-path validation, CodePush/Expo Updates migrations, path and symlink handling, stale-hash detection, credential handling, terminal output, dependency migration, and prebuild rollback.
  • Expand bundle-drop doctor and document a complete non-AI manual setup flow.

Native runtime

  • Add native SHA-256 and ES256 verification.
  • Add bounded Android and iOS downloads.
  • Strengthen native bundle selection, integrity checks, and rollback behavior.
  • Intentionally bump nativeVersion from 0.4.5 to 0.5.0.

Expected release

This feat PR should cause Release Please to propose npm version 0.6.0. package.json.version remains 0.5.1 in this PR; Release Please owns that bump. The generated release PR will receive the complete curated release notes before it is merged.

Upgrade instructions

  1. Upgrade @gfean/react-native-bundle-drop.
  2. Run npx bundle-drop init if the package-managed Metro wrapper is not already installed.
  3. Run npx bundle-drop sync and commit .bundle-drop/runtime-delivery.generated.json with the application. The file contains public verification material, not secrets.
  4. Because nativeVersion is now 0.5.0, refresh Pods/prebuild as appropriate and ship a new native binary before enabling managed runtime delivery.
  5. Run npx bundle-drop doctor and resolve every reported integration issue.

Validation

  • yarn verify:release
  • 76 JavaScript suites passed; 1,513 tests passed
  • JavaScript coverage thresholds passed across 93 files
  • Expo plugin tests: 12 passed
  • Android native tests and coverage passed
  • iOS native tests: 65 passed; coverage passed
  • yarn build
  • npm pack and exact tarball inspection: 265 files, 1,283,977 unpacked bytes
  • actionlint
  • git diff --check
  • gitleaks scan of the complete dirty tree and public Git history
  • production dependency audit: no suggestions

Safety notes

  • No npm publication, release tag, or GitHub Release is created by this PR.
  • Native and runtime behavior changes are covered by JS, Android, and iOS tests.
  • The repository contains no private runtime signing keys or publishing tokens.

Add signed local runtime manifests, publisher authority leases, bounded artifact authorization and download verification, revocation-aware fallback, package-managed Metro integration, bundle-drop sync, hardened Expo and bare setup, expanded doctor diagnostics, native ES256/SHA-256 support, and comprehensive JS/Android/iOS coverage.
Comment thread src/CLI/scripts/native-entrypoint-authority.ts Fixed
Comment thread src/CLI/scripts/native-startup-validator.ts Fixed
Comment thread src/CLI/scripts/native-startup-validator.ts Fixed
Comment thread src/CLI/scripts/native-startup-validator.ts Fixed
Comment thread src/CLI/scripts/native-startup-validator.ts Fixed
Comment thread src/tests/CLI/scripts/aipowered/terminal-safety.test.ts Fixed
@GFean
GFean marked this pull request as ready for review August 22, 2026 03:13
@GFean
GFean merged commit cba0725 into main Aug 22, 2026
9 of 10 checks passed
@GFean
GFean deleted the codex/managed-runtime-delivery branch August 22, 2026 03:14
@GFean GFean mentioned this pull request Aug 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5019589d6d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +39 to +41
function normalizeManifestOrigin(value: string): string | undefined {
const match = /^https:\/\/([^/?#@]+)\/?$/i.exec(value);
if (!match) return undefined;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Compare authority leases with the manifest URL origin

When manifestBaseUrl contains a path, such as https://cdn.example.com/bundle-drop, the bootstrap validator accepts it and manifest URL construction supports it, but this regex rejects the entire configured value instead of extracting its origin. Consequently, even a lease declaring the matching https://cdn.example.com origin is reported as authority_origin_mismatch, and every managed manifest check falls back to /resolve; normalize the configured URL to its HTTPS origin before comparing.

Useful? React with 👍 / 👎.

Comment on lines +71 to +74
function laneStateKey(identity: RuntimeDeliveryLaneIdentity): string {
return [identity.projectSlug, identity.channelName, identity.platform, identity.runtimeVersion]
.map(value => encodeURIComponent(value))
.join('/');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scope manifest generations to the full project authority

After an app is repointed to a different server or organization that reuses the same project slug, channel, platform, and runtime version, this key loads the previous authority's generation state. Because runtime-delivery-state.json is not cleared during native binary-version cleanup, a legitimate new project's lower generation is then rejected indefinitely as a regression until it surpasses the unrelated old value; include the bootstrap's server/organization or another stable authority identifier in the state key.

Useful? React with 👍 / 👎.

GFean added a commit that referenced this pull request Aug 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.6.0](v0.5.1...v0.6.0)
(2026-08-22)


### Features

* add managed runtime delivery and safer project setup
([#28](#28))
([cba0725](cba0725))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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