Skip to content

Consolidate links-queue npm exports and repair OIDC release pipelines - #56

Merged
konard merged 7 commits into
mainfrom
issue-55-ec61bae8f6e4
Nov 16, 2026
Merged

konard merged 7 commits into
mainfrom
issue-55-ec61bae8f6e4

Conversation

@konard

@konard konard commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

This PR consolidates JavaScript distribution into links-queue and repairs the existing npm/crates.io release paths. Core, CLI, server, and client entry points remain available; integrations are imported from links-queue/express, links-queue/fastify, links-queue/hono, and links-queue/nestjs.

Fixes #55
Fixes #53

Changes

  • Rename the root npm package and all current installation/import documentation and release helpers. Remove the four independent integration manifests; ship their source and TypeScript declarations in one explicitly selected tarball.
  • Keep framework peers optional and include the Fastify plugin dependency, so a core install needs no web framework. Fix Express's ESM require and Hono's global constructor assumption, which prevented the exposed router factories from working.
  • Publish only the canonical package with npm publish --access public --provenance, use the manifest version, and verify the exact version exists before reporting success. Registry errors and rejected publishes fail the job. Preserve bounded retries, checking registry visibility after a lost connection so an accepted upload is not repeated.
  • Gate automatic and manual npm releases on lint, runtime tests, and installed-tarball verification. Fix the skipped-dependency condition that previously prevented manual lint/release from running. Restrict manual registry releases to main.
  • Use Node 24 for workflow tooling: the existing main Rust release 39921677800 failed before authentication because command-stream's execa dependency called TEXT_ENCODINGS.union under Node 20 (downloaded log lines 8634–8652). Keep the Node 20 runtime test matrix for consumer compatibility.
  • Retain the existing pinned crates.io OIDC action and optional token fallback required by the policy comment on crates.io: publish links-queue with trusted publishing, or mark it publish = false #53. No registry secrets are added or required once trusted publishers are registered. Add a JS minor changeset and Rust patch fragment as release triggers.
  • Document exact trusted publisher configuration, first-publication requirements, and registry verification in the release guide.

Reproduction and automated verification

Before this change the root manifest is links-queue-js and has no integration subpath exports. Installing it cannot provide the requested links-queue/* imports. Run bash experiments/issue-55-package-regression.sh to run the new tarball test against pre-change main: it fails because separate integration manifests are shipped.

After the change:

  • npm run test:package in js/: passes. Packs and installs into an isolated temporary consumer, imports core/server/client before installing framework peers, then resolves all four integrations, constructs Express/Hono routers, registers the Fastify plugin, exercises a NestJS service, and checks TypeScript subpath resolution. Runs in CI as Verify npm Package with finite test/job timeouts.
  • node --test js/scripts/publish-to-npm.test.mjs: 6 passing cases for canonical-only publication, registry verification, reruns, rejected/invisible publishes, and registry failures.
  • CI runs node scripts/version-and-commit.mjs --help on Node 24 in both workflows to verify dependency startup without creating release commits or tags.
  • node --test rust/scripts/crates-io.test.mjs: 11 passing cases for the existing crates.io publish helper.
  • JS lint (no errors), formatting, duplication check, changeset status, and git diff --check: pass locally. Full runtime/OS tests and Rust builds are left to CI to respect the container's memory budget.

Unfinished acceptance criteria: live publication is blocked

This PR is not a completed registry rollout and remains unmerged. At investigation time:

  • npm view links-queue version returns E404. All five split npm names also return E404, which satisfies the requirement to leave them unpublished.
  • npm whoami returns ENEEDAUTH. No Cargo credential file or repository Actions secrets are present. A GitHub repository credential cannot bootstrap registry ownership or register trusted publishers.
  • cargo search links-queue --limit 5 returns no matching crate. Direct crates.io API access from this environment returns HTTP 403, so the search and workflow evidence are retained separately from that API limitation.
  • The new release workflows intentionally do not upload from PR branches; the existing main Rust release failed before publishing. No workflow publication of the crate has been verified.

The blocked criteria are successful npm view links-queue version, the crate appearing in cargo search after workflow publication, and live confirmation of secret-free subsequent releases. An authenticated registry owner must bootstrap/register the publishers described in the release guide, then run successful release workflows on main. No credentials have been requested, stored, or added by this PR. Passing PR CI does not substitute for these unmet criteria.

CI investigation

The initial Bun/Windows job discovered the new Node packaging test and failed
with Unexpected end of file when its shell split inline JavaScript (job, downloaded log lines 183–225). The probe now uses a module file and executable calls without a shell; Bun runs its existing suite under tests/, while the dedicated Node packaging job covers the npm artifact. Superseded runs were explicitly cancelled to avoid wasting runner resources. Final validation is tracked against the current PR head, rather than superseded run results.

At final code commit 5d27a990a634fbd33463c89bcd7a7cd77ab7c962, the Rust workflow passes on Linux, Windows, and macOS, including package build/publish dry run and benchmarks. The JavaScript workflow passes lint, installed-tarball verification, coverage, and all nine Node/Bun/Deno runtime combinations on Linux, Windows, and macOS. Both workflows started after this commit and completed successfully. The working tree is clean, remote main (2612654) is included, and the PR remains unmerged with the live publication criteria above unfinished.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #55
@konard konard self-assigned this Nov 15, 2026
@konard konard changed the title [WIP] Consolidate the npm packages into links-queue and publish the crate Consolidate links-queue npm exports and repair OIDC release pipelines Nov 16, 2026
@konard
konard marked this pull request as ready for review November 16, 2026 00:50
@konard

konard commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Updated PR #56 and marked it ready for review.

  • Consolidated npm packaging and framework subpaths.
  • Repaired release tooling and added regression tests.
  • All current-commit CI checks pass; working tree is clean.

Live publication remains blocked by unavailable registry-owner access for bootstrap and trusted-publisher setup. npm/crates publication and subsequent secret-free releases remain unverified. The PR is unmerged, and the issue is not fully complete.


This summary was automatically extracted from the AI working session output.

@konard

konard commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-6.1 Sol
  • Provider: OpenAI
  • Public pricing estimate: $3.163934

📊 Context and tokens usage:

  • 155.0K / 272K (57%) input tokens, 39.1K / 128K (31%) output tokens

Total: (155.0K + 9.8M cached) input tokens, 39.1K output tokens, $3.163934 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-6.1-sol
  • Thinking level: medium (~15999 tokens)
  • Model: GPT-6.1 Sol (gpt-6.1-sol)

📎 Log file uploaded as Gist (957KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
konard merged commit fb3bc18 into main Nov 16, 2026
27 checks passed
@konard

konard commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Linked issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant