Skip to content

fix(release): accept the Starlight-Intelligence org slug in the OIDC publish guard - #625

Merged
frankxai merged 6 commits into
mainfrom
agent/claude/npm-oidc-org-slug
Nov 27, 2026
Merged

frankxai merged 6 commits into
mainfrom
agent/claude/npm-oidc-org-slug

Conversation

@frankxai

@frankxai frankxai commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

scripts/publish-npm-ecosystem.mjs assertPublishingContext requires GITHUB_REPOSITORY === 'frankxai/Starlight-Intelligence-System' and the matching GITHUB_WORKFLOW_REF. The repo moved to the Starlight-Intelligence org on 2026-11-09, so GitHub now reports the new owner and every npm-ecosystem-release.yml run would throw before publishing.

Change

Two string swaps in the guard plus the same swap in the test fixture (test/npm-ecosystem-release.test.mjs). No package.json touched.

Why now

Part of the npm estate rollout (registry: frankxai/agentic-ops branch agent/claude/npm-estate-registry). This workflow is the release path for @starlight-intelligence/{core,ai-sdk,mcp,elevenlabs}; it must pass before Frank links those packages with npm trust github ... --file npm-ecosystem-release.yml --env npm-production.

Test plan

  • CI runs node --test test/npm-ecosystem-release.test.mjs (not run locally: machine under RAM floor)
  • Non-Claude pr-gate sign-off at exact head

🤖 Generated with Claude Code

https://claude.ai/code/session_015JZDKoZyghHzUBXjEVQLkh


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

frankxai and others added 2 commits November 26, 2026 19:19
…publish guard

The repo moved from frankxai to Starlight-Intelligence on 2026-11-09. GitHub
now reports GITHUB_REPOSITORY and GITHUB_WORKFLOW_REF under the new owner, so
assertPublishingContext rejected every release run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JZDKoZyghHzUBXjEVQLkh
…publish guard

The repo moved from frankxai to Starlight-Intelligence on 2026-11-09. GitHub
now reports GITHUB_REPOSITORY and GITHUB_WORKFLOW_REF under the new owner, so
assertPublishingContext rejected every release run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JZDKoZyghHzUBXjEVQLkh
@frankxai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-27T04:31:16.114838Z
We couldn’t complete this review. Comment @codex review to try again.
57622db Draft marked ready
🔒 Security Review ❌ Failed 2026-11-27T04:31:24.617494Z
We couldn’t complete this review. Comment @codex security review to try again.
57622db Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@frankxai

Copy link
Copy Markdown
Collaborator Author

Workers AI panel (cf-review.mjs): pass at 7aab489, 3/3 reviewers. Sign-off still needs a non-author run of pr-gate.

@frankxai

Copy link
Copy Markdown
Collaborator Author

PR #625 review: OIDC publish guard org slug

Reviewed files and scope

  • The diff changes scripts/publish-npm-ecosystem.mjs (assertPublishingContext, lines 38 and 41) and test/npm-ecosystem-release.test.mjs:149-165.
  • I read the diff and then grepped the repo for both slugs. I did not run the tests, and I did not read the workflow file's contents.

Checks

  • Exact swap, no widening: passed. frankxai/... is replaced by Starlight-Intelligence/... in both GITHUB_REPOSITORY and GITHUB_WORKFLOW_REF. Each is still a single !== comparison. There is no allow-list, no prefix or startsWith match, and no new || branch, so no arbitrary org is accepted.
  • Regex and case handling: passed. The slug checks use no regex. Only the SHA check uses one, /^[a-f0-9]{40}$/, and it is unchanged and anchored. Strict equality is case-sensitive, so a casing mismatch would block a publish rather than allow one. The slug's capitalisation must match what GitHub reports in GITHUB_REPOSITORY.
  • Other invariants: passed. All of these are untouched:
    • --execute must be the only argument.
    • GITHUB_ACTIONS must be 'true'.
    • The ref must be refs/heads/main.
    • The event must be workflow_dispatch.
    • GITHUB_SHA must equal sourceSha.
    • The OIDC request URL and token must be present.
    • NPM_TOKEN and NODE_AUTH_TOKEN must be absent.
  • Workflow ref is consistent: passed. The workflow-ref check is updated together with the repository check. If only one had changed, the guard would never pass or would be half-stale.
  • Tests: the positive fixture is updated consistently. The existing negative cases still cover a foreign repo (other/repository), a bad ref, a bad SHA, a bad event, a bad workflow ref, missing OIDC values and token fallbacks.

P0/P1 findings

  • P0: none.

  • P1 (verify before merge): stale repository.url in the package manifests. These still point at github.com/frankxai/Starlight-Intelligence-System:

    • package.json:7 and package.json:10
    • packages/ai-sdk-adapter/package.json:10
    • packages/core/package.json:31
    • packages/mcp-server/package.json:10

    npm trusted publishing and provenance compare the manifest's repository.url with the OIDC and provenance source repository. With the guard now requiring the new org, a publish could pass this script and then be rejected by npm with a provenance mismatch (E422). Confirm that either the manifests are updated in this PR or a follow-up, or that npm tolerates the old URL (GitHub redirects after a transfer, but npm's check is string-based). The trusted-publisher entry on npmjs.com for each package must also name the new org and repo.

P2 notes

  • Missing regression cases: add { GITHUB_REPOSITORY: 'frankxai/Starlight-Intelligence-System' } and { GITHUB_WORKFLOW_REF: 'frankxai/...' }. They would prove the old owner is now rejected and that the guard accepts one org only.
  • Case-variant case: add starlight-intelligence/starlight-intelligence-system to lock in case-sensitive matching.
  • Near-miss cases: add a repo with a suffix, such as .../Starlight-Intelligence-System-fork, and a workflow ref on a different branch, such as @refs/heads/dev.
  • Hardcoded slug: the slug appears four times across code and test. A shared constant would avoid drift on the next rename or transfer.
  • Error message: 'Publication requires the approved main-branch OIDC workflow...' is generic. Naming which field failed would help debugging, but it must not echo env values.

Verdict: NEEDS_CHANGES.
The guard change itself is correct and fail-closed. I'm holding the verdict on the P1: confirm the repository.url and npm trusted-publisher alignment before merging. Adding the old-slug and case-variant negative tests is recommended.

★ Insight ─────────────────────────────────────

  • Pinning identity with exact string equality on both GITHUB_REPOSITORY and GITHUB_WORKFLOW_REF makes a rename safe by default. A missed update blocks publishing and does not open a bypass.
  • OIDC trust has three places that must agree: this guard, the repository.url in each manifest, and the npm trusted-publisher config. Changing only the guard can still break publishing.
    ─────────────────────────────────────────────────

frankxai and others added 4 commits November 27, 2026 05:04
… [agent-wip]

npm provenance requires repository.url to match the repo the publish
workflow runs in. Found by the Linux test lane on 7aab489.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JZDKoZyghHzUBXjEVQLkh
…igence org [agent-wip]

npm provenance requires repository.url to match the repo the publish
workflow runs in. Found by the Linux test lane on 7aab489.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JZDKoZyghHzUBXjEVQLkh
…ce org [agent-wip]

npm provenance requires repository.url to match the repo the publish
workflow runs in. Found by the Linux test lane on 7aab489.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JZDKoZyghHzUBXjEVQLkh
…ce org [agent-wip]

npm provenance requires repository.url to match the repo the publish
workflow runs in. Found by the Linux test lane on 7aab489.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JZDKoZyghHzUBXjEVQLkh
@frankxai

Copy link
Copy Markdown
Collaborator Author

Linux test evidence (overnight cloud lane S, trig_018VPqUo4FSVxGfcPNUvSAbv). Org Actions can't run because of billing, so this run stands in for CI.

  • At 7aab489:
    • pnpm install --frozen-lockfile works.
    • test/npm-ecosystem-release.test.mjs: 16/16 pass.
    • Full suite, run as its 70 steps separately: 1515 tests, 1504 pass, 10 fail, 1 skipped.
    • All 10 failures are in test/mcp-server-quality.test.ts and fail the same way on origin/main (e159af3): the file needs dist/mcp-server.js, which npm test only builds in its last step. This PR introduces no failures.
  • Blocker found: the 4 public packages still set repository.url to the old frankxai slug, and npm publish --provenance rejects that mismatch.
    • Fixed in a7544ec, 5344b07, f72e253 and 57622db: core, ai-sdk, mcp and elevenlabs now point at Starlight-Intelligence/Starlight-Intelligence-System.
    • The root package.json is untouched (Foundry lock).
  • The earlier Workers AI pass was at 7aab489 and no longer covers the new head.

@frankxai

Copy link
Copy Markdown
Collaborator Author

Workers AI panel at 57622db: PASS. 3 of 3 reviewers answered and all 6 changed files were reviewed. The judge ruled the one P0 claim (that the guard accepts any repo in the org) not real: the guard still requires the exact repo slug. This is not a pr-gate sign-off. A non-author signs at this exact head.

@frankxai

Copy link
Copy Markdown
Collaborator Author

starlight-signoff: harness=antigravity verdict=pass sha=57622db1390a01ad156b3f4e0ee5076915f9b4c8

Exact-SHA review of all 6 files @ 57622db: package manifests and publish-npm-ecosystem.mjs OIDC guard consistently updated to Starlight-Intelligence/Starlight-Intelligence-System with matching unit test assertions. Human-gated (package.json/release script; note overlap with #627/#597) — ready for 1-click merge.

Bound to 57622db — a new push invalidates this sign-off. /gate

@frankxai
frankxai marked this pull request as ready for review November 27, 2026 04:31
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@starlight-review

Copy link
Copy Markdown

NEEDS HUMAN: failing checks: independent-review-policy, evaluate

Risk medium, 17 changed lines, head 57622db, author harness claude.

Why this risk level
  • medium: dependency manifest or lockfile (packages/ai-sdk-adapter/package.json)
  • medium: dependency manifest or lockfile (packages/core/package.json)
  • medium: dependency manifest or lockfile (packages/elevenlabs/package.json)
  • medium: dependency manifest or lockfile (packages/mcp-server/package.json)
  • medium: executable code (scripts/publish-npm-ecosystem.mjs)

Findings

Severity Where Finding Seen by
medium packages/ai-sdk-adapter/package.json:10 Dependency resolved from a URL or git source 1 source
medium packages/core/package.json:31 Dependency resolved from a URL or git source 1 source
medium packages/elevenlabs/package.json:10 Dependency resolved from a URL or git source 1 source
medium packages/elevenlabs/package.json:15 Dependency resolved from a URL or git source 1 source
medium packages/mcp-server/package.json:10 Dependency resolved from a URL or git source 1 source

Reviewers

  • @cf/zai-org/glm-5.3: APPROVE, 9310 tokens
  • @cf/deepseek-ai/deepseek-v4.1-flash-1017: APPROVE, 9866 tokens

Merge: not requested, conclusion is needs_human

review 9f244fc2-9bea-4b6c-8815-c57d1b90e296 · services/cf-checker

needs human: failing checks: independent-review-policy, evaluate

@frankxai frankxai mentioned this pull request Nov 27, 2026
@frankxai

Copy link
Copy Markdown
Collaborator Author

starlight-signoff: harness=cf-workers-ai verdict=pass sha=57622db1390a01ad156b3f4e0ee5076915f9b4c8

Reviewed by a different harness than the one that wrote it.

Bound to 57622db — a new push invalidates this sign-off. /gate

@frankxai
frankxai merged commit def16b7 into main Nov 27, 2026
18 of 21 checks passed
@frankxai
frankxai deleted the agent/claude/npm-oidc-org-slug branch November 27, 2026 13:02
frankxai pushed a commit that referenced this pull request Nov 27, 2026
#625 landed the publish guard and the four package manifests on main. The two
conflicting files (scripts/publish-npm-ecosystem.mjs and its test) take main's
version unchanged, so this branch no longer touches release code. What remains
is the front-door documentation that still names the pre-transfer repository.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JZDKmwuVZyBFwq9yBKYES
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