Repository navigation
Phase 6d: copy, register and open a re-pull pull request - #1951
Merged
neuromechanist merged 19 commits intoOct 25, 2026
Merged
neuromechanist merged 19 commits into
neuromechanist merged 19 commits into
Conversation
Every push and aws s3api call execution makes after prepared is checked against a closed list of forms: origin only, release branches and git-annex by commit id, copies only from upstream's bucket at a version id. Unit-tested.
copyPinned heads each upstream object at its pinned version, copies it server side with ?versionId= and the version's ETag as condition (multipart above 5 GiB, aborted on failure), and heads the destination. The S3 stand-in gains cross-bucket CopyObject and a hold. Tested with the real aws CLI against the stand-in; five mutations killed.
registerCopied gates the N.0.0 tree against a fresh bucket listing and pushes one git-annex commit written from facts: nemar-s3 present for every tree key, dead marks for replaced keys, never the working clone's adopted holders or its own uuid. head.ts accepts only enrichment-shaped commits on a moved head; push.ts pushes through the write guard. copied and registered gain error-only self-edges. Unit and route tests pass.
pushRelease checks main (enrichment-shaped moves only) and pushes or reuses release/vN.0.0; openRelease finds the open pull request by its head before opening one with the administrator's token, refuses another open release pull request, and writes a body of counts, the digest and the trailer guidance. The GitHub stand-in now opens pull requests on branches it reads from the bare origin.
executeRepull now walks prepared to copied, registered and pr_open (advance.ts) and stops there: it never merges. A record past prepared is taken up from the working clone or its checkpoint without planning again; every run refuses an anonymous dataset first. Step failures are recorded with [copy:, [register: or [pr: and exit 3. Tested end to end through the real binary: 17 cases, including resume at each --until, SIGKILL mid-copy, lost and failed pull request answers, foreign and enrichment heads, a moved main and tag, and a missing held key.
nemar admin repull canary copies a small and a multipart upstream object into a scratch prefix by version id through the write guard, checks sizes, the single copy's ETag and the source version S3 names, writes and deletes a staging-shaped key, deletes the copies by version and lists the prefix empty. Dry run by default; never locks or bypasses. Tested against the stand-in, including endpoints that ignore the version id or the copy condition and a locked copy.
Appends the Phase 6d slice: the command and its resume past prepared, the pinned copy, the write guard, the registration that publishes no holder NEMAR does not control (deciding the Phase 6c open point), the release branch and pull request with the trailer guidance, the canary, and what only the canary and production runs can check. Annotates the header and three earlier sentences it decides or corrects.
neuromechanist
force-pushed
the
feature/issue-1912-phase6d-copy-pr
branch
from
October 25, 2026 18:08
7ca9fac to
2552202
Compare
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR1951Version: 🤖 Updated on each push. |
neuromechanist
merged commit Oct 25, 2026
bae5e03
into
feature/issue-1046-epic-upstream-freshness
24 checks passed
This branch was previously deployed
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
Copies a prepared re-pull's upstream objects into NEMAR's prefix, registers and pushes the
release/vN.0.0branch, and opens its pull request (ADR 0111, dated 2026-10-24 for this slice). A write guard refuses any S3 write outside the prepared record's prefix and any push outside the release branch. Each copy is one server-sidecopy-objectpinned to the source'sversionIdand its ETag, or a multipart copy of the same version above 5 GiB, aborted on any failed part.nemar admin repull executeruns throughpr_openand never further: it never merges, and the merge stays with the owner. The registration publishes no upstream holder: the presence lines adopted during preparation stay in the working clone, which is removed afterward. Before a push, NEMAR'smainmust be the base the record names or a descendant of it by the three enrichment commit shapes.nemar admin repull canarychecks on the real bucket, under a scratch prefix only, what the copy believes about the source versions. No mail from any new route.Phase 6d of epic #1046, part of #1912 (which stays open until 6g). It builds on 6c (prepare, merged as 119bd82) and the 6e screen and cap.
What is in it
src/lib/repull/execute/: the write guard, the pinned copy, register and push, the pull request step;src/commands/admin-repull.ts(theexecutecommand and thecanarycommand);src/lib/api/repull.tsclient calls for the record's copy and pull request transitions.test/repull-write-guard.unit.test.ts,test/repull-copy.test.ts(copies by version through the S3 stand-in),test/repull-execute-cli.test.ts,test/repull-canary-cli.test.ts, and the extendedtest/repull-execute-prepare.test.tsandbackend/test/upstream-repulls-route.test.ts.Test plan
bun testrun by CI on this head (lead runs through the Tests workflow).copy-objectandupload-part-copyof a public versioned object honor?versionId=and--copy-source-if-matchand name the copied version, as the stand-in does; the S3 stand-in is not the real bucket. Whether a default retention lock on the bucket makes the canary's deletes fail, which is the owner's signal before the orphans are counted.