← Back to Pull requests

ci: publish @diagrid/n8n, which the release workflow packed and threw away #35

Merged
CasperGN merged 2 files (63 lines) on Sep 10, 2026 21:25 UTC
View on GitHub
CasperGN CasperGN commented on Sep 10, 2026 16:15 UTC
Author

The gap

packages/n8n merged in #21 as a publishable package at 0.1.1. The release workflow bumps and packs by glob but publishes by name, and there were only two publish steps:

| Step | Scope |
|---|---|
| Bump versions | glob packages/ — included n8n |
| Pack tarballs | glob packages/
— built an n8n tarball |
| Publish | hardcoded agent-core and agent-mastra |

So a release run today would bump n8n's version, pack it, verify it, discard the tarball, then commit, tag v$VERSION and cut a GitHub release. The tag would claim a release the registry does not have — and npm versions are immutable, so there is no clean way back.

Changed

  • Publish @diagrid/n8n, placed after core: n8n declares @diagrid/agent-core: workspace: and npm resolves that at install time, so publishing it before core would leave a package whose dependency does not exist.

  • Pre-flight threshold now counts the packages instead of comparing to a literal 2. That literal went stale the moment a third package existed, and it fails in the quiet direction — an under-count makes a fully-published version look like a partial re-run, so the immutability error never fires and the operator finds out from the publish steps instead.

  • packages/n8n/src/version.ts — its TODO(n8n-integration) asked for exactly this. It was half wrong and the comment now says so: the bump and verify loops already globbed every package's version file, so this one was being stamped all along. Only the publish was missing.
  • The first publish is still manual, and this step cannot do it

    @diagrid/n8n is 404 on npm. Trusted publishing is configured on a package's own settings page, so the package has to exist before OIDC can be pointed at it — the same chicken-and-egg that made 0.1.0 of core and mastra a by-hand publish with no provenance.

    So the order is:

    1. publish @diagrid/n8n by hand once
    2. configure its trusted publisher — diagridio / typescript-ai / npm-release.yaml, environment npm, matching the other two
    3. then run the workflow

    Until step 2, this new step cannot authenticate. Its own comment says so, so the first failure explains itself rather than reading as a bug.

    Verification

  • workflow YAML parses; 23 steps, three publish steps in dependency order

  • pnpm format:check passes. Worth recording why it initially did not: the first draft of the version.ts comment contained the literal glob for every package's version file, and the / inside it terminated the block comment — prettier reported it as an unterminated template literal

  • pnpm test:unit: 274 passed. tests/n8n/orchestrator.test.ts fails, and 31 TS2307 errors appear for n8n-workflow / @n8n/db. Both confirmed identical with this change stashed, so both pre-date it — and the typecheck ones are exactly what the workflow's own Provision n8n types step exists to resolve
  • Related: CAT-1729. This unblocks the one item still open there — a workflow run that proves OIDC end to end and produces the first provenance attestation.

    Diff: 63 lines (+52 / -11) across 2 files Reviewer: yaron2 Review duration: 309m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.29) × (1 − Review Confidence (0.48)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.29 · 63 lines diff across 2 files
    0.29
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.00 · 1 substantive comment(s)
    0.00
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    48%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.350
    Diff Size diff_size
    0.249
    Real PR Conversation Timeline
    2 items
    yaron2 yaron2 approved these changes on Sep 10, 2026 16:25 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    CasperGN CasperGN
    Labels
    risk: low confidence: 48.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 29.3% (LOW) · Higher = larger blast radius
    29.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 48.5% · Lower = rushed or shallow review
    48.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.1% · Safe to merge
    15.1%