Skip to content

Add version manifests, tag protection, manifest CLI - #75

Merged
neuromechanist merged 2 commits into
devfrom
feature/versioning-manifests
Jan 24, 2026
Merged

neuromechanist merged 2 commits into
devfrom
feature/versioning-manifests

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Closes #56 (Phase 1: Tagging and Manifests)

Implements the versioning architecture for DOI protection:

  • Version manifests (JSON mapping file paths to S3 annex keys)
  • GitHub tag protection rules (prevent version tag deletion)
  • Manifest generation integrated into publish workflow and webhook
  • User-facing manifest CLI command

Architecture

Manifest generation: Traverses the git tree at a tag via GitHub API, identifies git-annex pointer files, and builds a JSON manifest mapping file paths to their S3 keys with sizes and checksums.

Tag protection: Uses GitHub rulesets API to prevent deletion/modification of version tags (v* pattern). Applied during the publish approve workflow.

Storage: Manifests stored at s3://<bucket>/<dataset-id>/manifests/v<version>.json

Changes

File Change
backend/src/services/manifest.ts New: manifest generation from GitHub tree
backend/src/services/github.ts getTreeAtRef, getBlobContent, applyTagProtection
backend/src/services/s3.ts uploadManifest, getManifest, listManifests
backend/src/routes/admin.ts tag_protect step in publish, manifest admin endpoint
backend/src/routes/datasets.ts GET manifest list/version endpoints
backend/src/routes/webhooks.ts Manifest generation after DOI publish
src/commands/dataset.ts dataset manifest CLI command
src/lib/api.ts Manifest API types and functions
.context/plan.md Sprint plan documentation
test/manifest.test.ts 14 tests

Test plan

  • All 196 tests pass
  • Biome lint/format clean
  • TypeScript type check clean
  • PR review

- Add manifest service: generates JSON from git-annex tree state
- Add S3 manifest upload/get/list functions
- Add tag protection via GitHub rulesets (v* pattern)
- Integrate tag_protect step into publish approve workflow
- Generate manifests in webhook after DOI publish
- Add admin endpoint: POST /admin/datasets/:id/manifest/:version
- Add user endpoints: GET /datasets/:id/manifest[/:version]
- Add dataset manifest CLI command (list/view with auto-detect)
- 14 tests covering parsing utilities and CLI behavior
@github-actions

github-actions Bot commented Jan 24, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR75

Version: 0.3.7-PR75.d76a58f
Commit: d76a58f


🤖 Updated on each push.

- Fix access control: check owner_user_id instead of dataset_id
- Fix checksum prefix: derive from key backend (sha256/md5)
- Fix hex regex: handle uppercase A-F in checksums
- Reorder steps: tag_protect before doi_create
- Fix manifest regeneration: preserve existing DOI on regen

This branch was previously deployed

1 inactive deployment
npm — d76a58f5 Deployed Jan 24, 2026 by neuromechanist
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