Skip to content

fix(release): wait for required packages before publishing consumers - #539

Merged
khaliqgant merged 6 commits into
mainfrom
codex/publish-dependency-readiness
Oct 6, 2026
Merged

khaliqgant merged 6 commits into
mainfrom
codex/publish-dependency-readiness

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

  • verify the transitive registry closure of required @relayfile/* dependencies and non-optional SDK peers before publishing their consumers, including partial-release retries
  • keep the parallel release matrix, read-only preflight, dry runs, and immutable already-published reconciliation unchanged
  • bound dependency queries and backoff under one ten-minute budget; retry transient command failures without publishing, and reject malformed dependency metadata immediately

Production evidence

X Reply Radar run 41499d7d-11f0-4f45-bf5e-adb6f1fe8e37 failed at 2026-10-06T01:09:27Z with npm_install_failed: ETARGET No matching version found for @relayfile/core@0.10.73.

The registry published @relayfile/sdk@0.10.73 at 01:07:24.214Z, with a required exact dependency on @relayfile/core@0.10.73. Core did not become public until 01:11:51.148Z. The parallel publish workflow exposed a broken consumer during that window.

Production has recovered: all twelve hourly schedule fires from 02:09 through 13:09 UTC succeeded. The 13:09 run completed its local Grok Agent Flow without fallback, posted 15 results, and finished with exit 0. No agent redeploy is required to recover this already-completed publication; this change prevents the next release from exposing the same incomplete graph.

Validation

  • new regressions fail on the previous implementation (consumer publishes before its dependency is ready)
  • npm run test:release — 118 passed
  • git diff --check
  • Veto diff review: PASS; no actionable code, security, or secrets findings

Optional platform packages/peers and dev dependencies do not block publication. The shared strict release-version parser preserves prerelease/build metadata. Workflow-generated caret peers wait on their declared version floor; the required release graph is core → sdk → cli/agents.


Note

Medium Risk
Changes when packages become installable on npm and can delay or fail parallel publish jobs, but behavior is bounded, fail-closed, and heavily tested on the release path only.

Overview
Release reconciliation now blocks npm publish until required internal packages are registry-visible, closing the parallel-publish window where consumers (e.g. @relayfile/sdk) could ship while dependencies (e.g. @relayfile/core) were still propagating and installs hit ETARGET.

Before publishing, reconcile-package.mjs walks the transitive @relayfile/* closure from local dependencies and non-optional peerDependencies, polls the registry with backoff under a shared ~10 minute budget, expands the graph from returned manifests (so a published SDK still waits on core), and fails closed on ambiguous queries, bad metadata, unpinnable ranges, or oversized graphs. Preflight and dry-run stay read-only and skip this wait; the publish workflow comment documents the ordering intent (core → sdk → cli).

Coverage is added in reconcile-package.test.mjs for transitive waits, peer floors, budgets, and partial-release scenarios.

Reviewed by Cursor Bugbot for commit d4a67a9. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 194c179b-7002-438d-8401-5e3b0f0226ed
📥 Commits

Reviewing files that changed from the base of the PR and between 1a865f0 and d4a67a9.

📒 Files selected for processing (3)
  • .github/workflows/publish.yml
  • scripts/release/reconcile-package.mjs
  • scripts/release/reconcile-package.test.mjs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T13:20:16.325374Z 4e1122a Manual request
ℹ️ 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.

@devin-ai-integration devin-ai-integration 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.

Devin Review found 2 potential issues.

Devin Review

Comment thread scripts/release/reconcile-package.mjs Outdated
Comment thread scripts/release/reconcile-package.mjs Outdated

@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: 2709fc02b9

ℹ️ 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 thread scripts/release/reconcile-package.mjs Outdated
@khaliqgant

Copy link
Copy Markdown
Member Author

@codex review

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed

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

Re-trigger cubic

Comment thread scripts/release/reconcile-package.mjs
Comment thread scripts/release/reconcile-package.test.mjs
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 4e1122adc7

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

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4e1122a. Configure here.

Comment thread scripts/release/reconcile-package.mjs

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed

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

Re-trigger cubic

Comment thread scripts/release/reconcile-package.mjs Outdated
Comment thread scripts/release/reconcile-package.mjs Outdated

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 2 files (changes from recent commits).

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

Re-trigger cubic

Comment thread scripts/release/reconcile-package.mjs
Comment thread scripts/release/reconcile-package.test.mjs
@khaliqgant
khaliqgant merged commit 2ea9c2a into main Oct 6, 2026
12 checks passed
@khaliqgant
khaliqgant deleted the codex/publish-dependency-readiness branch October 6, 2026 13:47
khaliqgant added a commit that referenced this pull request Oct 8, 2026
…age); drop duplicate gate (#540)

* fix(release): one dependency wait on the publish path; drop the duplicate gate

#538's assert-internal-deps gate and #539's reconcile-package wait both
guarded publish order. Keep reconcile-package (retries transient registry
errors, exact-floor check, transitive closure via registry manifests) and
fold in the one thing only the gate covered: optionalDependencies
(sdk -> cli-*/mount-*). Keep #538's dependency-first matrix order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(release): bound each publish job slice at the next job

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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