Skip to content

feat: Unify artefact formats and integrate the processings service#1

Merged
albanm merged 52 commits into
mainfrom
feat-processings-integration
May 20, 2026
Merged

feat: Unify artefact formats and integrate the processings service#1
albanm merged 52 commits into
mainfrom
feat-processings-integration

Conversation

@albanm
Copy link
Copy Markdown
Member

@albanm albanm commented May 20, 2026

Artefact model

  • New unified schema: each artefact id holds a tarballs: { [arch]: ... }
    map, with noarch as the default slot for portable builds.
  • Dropped the versions collection, the version type, the semver
    resolver, retention helpers, and the obsolete backfill upgrade scripts.

API

  • POST /artefacts/npm/:id — per-arch upload, updates one tarball slot.
  • GET /artefacts/:id/tarball?architecture= — arch resolution with
    noarch fallback.
  • Removed all legacy /versions and /branch routes.
  • Upload API keys gain allowedPackageName / allowedNamePrefix /
    allowedCategory scopes.
  • Internal-secret auth accepted on upload + PATCH endpoints so the
    processings service can push artefacts and legacy metadata during the
    v6.0 first-boot migration.
  • Access-grants management; s3RootDir config option.

UI

  • Artefact detail shows the tarballs map (versions table removed).
  • Consolidated admin pages; thumbnails in the artefact list; general
    simplification.

lib-node

  • Unified ensureArtefact, dropped the version param, released 0.4.0.
  • Per-arch metadata kept inside extractDir so multi-arch caches don't
    collide.

albanm and others added 30 commits May 5, 2026 09:46
…se builds)

Captures the approved design: a third artefact format `branch` that holds a
single mutable tarball, federation-excluded by default, so a staging registry
can carry main-branch dev builds locally while mirroring production releases.
Records the design that produced the rewritten GitHub Actions section in
docs/ci-integration.md (Alpine-built node_modules baked into the tarball,
architecture=x64 upload, tag-only flow). Companion to the staging-flow
spec landed earlier today.
A third artefact format holding a single mutable tarball — the docker-tag
analogue for non-release builds. Each upload to POST /artefacts/branch/<id>
replaces the previous tarball atomically; no version sub-docs and no
retention bookkeeping. Manifest is extracted on upload so the doc carries
packageName/version/licence for display, but _id is operator-chosen and
intentionally distinct from the source package name (convention:
<package-name>-<branch>).

Federation filter: read-API-key callers (the mirroring path) get
format !== 'branch' added to their access filter, so branch artefacts
never leave the registry that owns them. A staging registry mirrors
production releases via federation AND carries its own local branch
builds, with no cross-contamination.

Consumer support in lib-node-registry: new ensureBranchArtefact() that
fetches the artefact doc to read dataUpdatedAt, downloads from
/:id/branch/tarball, and caches under <cacheDir>/<id>/current/ with a
.current-branch.json meta. Mutable tarball → cache invalidates when the
source artefact's dataUpdatedAt bumps.

docs/ci-integration.md gains a 'Publishing a branch build to staging'
section walking through the staging API key, the GitHub staging
environment, and a publish-main.yml workflow.
Clarifies the staging-flow section now that the feature has landed:

- Distinguishes the operator-chosen branch artefact _id from the source
  package name (and explicitly couples that id to `allowedName` on the
  upload key — they must agree).
- Names the federation behavior: production and staging hold the two
  flavours side-by-side without cross-contamination.
- Adds a consumer-side note (pluginId shape, picker chip, lib-node-registry
  >= 0.3.0 requirement).
- Renames the local build dir from `staging` to `build` in both the tag
  and branch workflow examples to avoid clashing with the "staging
  registry" terminology used elsewhere in the section.
…ormat

Collapses today's npm (multi-version, semver resolver, retention) and
branch (single mutable tarball) formats into one. Each release major and
each dev branch becomes its own artefact identified by an operator-chosen
ref id (convention <packageName>@<ref>). The version selector goes away
at the registry boundary; the id is the flag.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
14 tasks: schema/types, mongo cleanup, service trim, federation filter,
upload + download routes, legacy route deletion, allowedPackageName,
remote-registries sync, UI, lib-node 0.4.0, docs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Also fix stale import of parseSemver/resolveVersionQuery/pruneOldVersions
removed in tasks 1-5, and update GET /:id to not query the dropped
versions collection.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
albanm and others added 22 commits May 19, 2026 18:17
…pers

Task 8 was supposed to handle this but Task 4's removal of parseSemver,
resolveVersionQuery and pruneOldVersions made the legacy routes
non-functional. Pull the route deletion forward to unblock Task 6.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…back

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… route

Also fixes a stale mongo.versions reference in the DELETE handler that was
left over from Task 3 (versions collection dropped); without this fix the
PATCH & DELETE test group would throw a 500.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The fixture upload calls were swept to /npm/:id but lib-node/index.ts
still calls the deleted /versions/:v endpoint. Re-enabled in Task 13.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…on't collide

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… api-key field name

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@albanm albanm merged commit 171cad8 into main May 20, 2026
4 checks passed
@albanm albanm deleted the feat-processings-integration branch May 20, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant