Repository navigation
Fix archive generation for SHA-addressed S3 storage - #165
Merged
neuromechanist merged 2 commits intoFeb 20, 2026
Merged
Conversation
Use annex key (SHA hash) for S3 URL instead of BIDS file path. Replace process.exit(1) with process.exitCode for proper output flushing. Fixes #164
neuromechanist
force-pushed
the
164-fix-archive-generation-for-sha-addressed-s3-storage
branch
from
February 20, 2026 06:12
642a67d to
99b30a8
Compare
neuromechanist
deleted the
164-fix-archive-generation-for-sha-addressed-s3-storage
branch
February 20, 2026 06:13
This was referenced Feb 20, 2026
neuromechanist
added a commit
that referenced
this pull request
Feb 20, 2026
* Fix archive generation for SHA-addressed S3 storage (#165) * Fix archive generation for SHA-addressed S3 storage Use annex key (SHA hash) for S3 URL instead of BIDS file path. Replace process.exit(1) with process.exitCode for proper output flushing. Fixes #164 * Fix upload error propagation and entry event race * Point version DOI target to NEMAR page, not GitHub Version DOIs were resolving to the GitHub release page. Both concept and version DOIs should resolve to the NEMAR data explorer with appropriate query params. * Fix deletion cascade, test timeout, tag-triggered DOI CI, BIDS Name title, S3 cleanup (#170) * Fix deletion cascade: clean up user_s3_permissions Closes #149 * Fix flaky e2e-upload test timeout Add 30s timeout to all CLI subprocess tests that spawn bun processes for prerequisite checks. Closes #155 * Add tag-triggered CI for version DOI Extract DOI minting from pr-merge.yml into a standalone version-doi.yml workflow triggered on v* tag pushes. All paths (PR merge, admin push, manual tag) now converge through the tag trigger. Also creates GitHub release if missing and triggers archive generation. Closes #160 * Use BIDS Name as authoritative dataset title CLI upload now reads Name from dataset_description.json instead of using directory basename. The LLM enrichment webhook also syncs BIDS Name to D1 and GitHub repo description when dataset_description.json changes. Closes #168 * Fix S3 deletion to clean all objects under prefix Scan entire {datasetId}/ prefix instead of only objects/, version/, archives/ sub-prefixes. Older uploads stored files directly under the dataset root which were missed. Closes #169 * Address PR review findings - Remove if: always() from trigger-archive job so it only runs when DOI publish succeeds - Check setRepoDescription return value instead of relying on try/catch (function returns result, does not throw) - Sanitize BIDS Name (strip newlines, trim to 200 chars) - Track user_s3_permissions deletion count in DeletionSteps - Distinguish ENOENT from parse errors in CLI BIDS Name read - Fix JSDoc and comments per review feedback * Fix biome formatting * chore: bump version to 0.6.1
This was referenced Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
process.exit(1)withprocess.exitCodefor proper output flushingupload.done()promise separately for explicit S3 error handlingDetails
The
generate-archive.ymlworkflow was failing silently because:Wrong URL: It built S3 URLs from the file's BIDS path (
sub-01/ses-1/emg/...) instead of the SHA-addressed key (SHA256E-s22085888--...bdf). With the SHA-addressed S3 rework, the original-path objects no longer exist.Race condition:
archive.once("entry", resolve)was registered afterarchive.append(), but for small files the event could fire during append before the listener was set up. Fixed by combining entry/error listeners in a single promise.Silent crash:
process.exit(1)kills the process before stdout/stderr flushes. Changed toprocess.exitCode = 1.Test plan
s3://nemar/nm000108/archives/v1.0.1.zipFixes #164