Skip to content

chore: sync dev into the epic - #1981

Merged
neuromechanist merged 3 commits into
feature/issue-1046-epic-upstream-freshnessfrom
feature/issue-1046-sync-dev-2
Oct 27, 2026
Merged

neuromechanist merged 3 commits into
feature/issue-1046-epic-upstream-freshnessfrom
feature/issue-1046-sync-dev-2

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Merges dev (ee5606e) into the epic branch (9f7a645), so dev is an ancestor of the epic again before the final epic PR.

Dev brings two commits the epic does not have: 132685e, the authenticated data host read (#1978, ADR 0114), and the 0.10.26-dev2 version bump.

Two files needed manual resolution. .context/decisions/README.md keeps ADR 0113 in the list position the epic moved it to (commit 4c879f0), and adds ADR 0114 directly after it. src/index.ts keeps both early returns in the preAction hook: the epic's automatic re-pull run (no notices) and dev's git credential helper (no notices, since git reads its stdout).

Merge method: a merge commit, not a squash. Dev has to stay an ancestor of the epic, or the next sync and the final epic PR both break.

Gates on the merge commit fad0a64:

  • bun run typecheck (root and backend): exit 0.
  • bun run lint (Biome on src): exit 0.
  • bun run migrations:d1-check: exit 0.
  • Targeted suites (the ADR index, automatic re-pull notices, the credential helper, data host, facet CLI options): 278 tests in 10 files pass.
  • Full root bun test: 21,912 pass, 245 skip, 2 fail.

The two failures, both checked:

  • test/account-copy-parity.test.ts (website parity) reads the local nemar/website checkout, which is on feature/issue-449-wire-api-binding and drifts from the contract. With NEMAR_WEBSITE_ACCOUNT_COPY set to GitHub's nemarOrg/website main copy, all 9 tests pass. This is environmental, not this change.
  • test/admin-publish-list-skew-cli.test.ts (the --json test) passes alone, 18 of 18. Under full-suite load it logged a Bun.serve idle timeout and empty stdout. The file predates the epic (Release review fixes: list against an old Worker #1797), and this change does not touch it. Flagged as a load-sensitive test.

Review: one Sonnet reviewer on the two resolved files; the outcome is posted as a comment on this PR.

neuromechanist and others added 3 commits October 27, 2026 01:11
* feat: allow-list of authenticated data hosts

* feat: git-annex special remote for data hosts

* feat: auth git-credential helper for data hosts

* feat: NEMAR_DATA_HOSTS_ONLY narrows the host list

* feat: clone and get datasets from data hosts

* fix: answer git-annex export and import probes

* test: packaging of the special remote bundle

* docs: ADR 0114 and README for data hosts

* fix: hint for a data remote declared later

* test: empty object through the special remote

* test: longer default timeout for child processes

* test: isolate child env, restore PATH safely

* fix: scripts cover the second bundle

* docs: review fixes for ADR 0114 and README

* fix: vetted origins, key rule, errors, helper

* test: CLI wiring around data hosts

* fix: key rule equals the data host's

* docs: state the key rule in ADR 0114
Brings dev's authenticated data host read (#1978, ADR 0114) and the 0.10.26-dev2 bump. The ADR index keeps 0113 in its list position and adds 0114 after it. src/index.ts keeps both early returns: automatic re-pull runs and the git credential helper print no notices. Tested: typecheck, Biome on src, the D1 migration check, the ADR index and 278 targeted tests pass. The full root run has two failures: the website parity test reads a stale local website checkout (9 of 9 pass against GitHub's main copy), and the --json test in admin-publish-list-skew-cli passes alone (18 of 18) and fails only under full-suite load.
@github-actions

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1981

Version: 0.10.26-PR1981.fad0a64
Commit: fad0a64


🤖 Updated on each push.

@neuromechanist

Copy link
Copy Markdown
Contributor Author

Review (one Sonnet reviewer, read-only, on the two manually resolved files) found no blocking issues and no suggestions.

ADR index: one 0113 line and one 0114 line, 114 entries in ascending order, 114 files on disk and 114 links; the 0114 line is byte-identical to dev's; the only change against the epic is the inserted 0114 line.

src/index.ts: both guards are present in the preAction hook (the automatic re-pull guard and the credential helper guard), the comment above the first guard still describes it, and dev's credential helper comment still holds. Nothing from either side is lost.

Outcome: no fix commits needed. Merging with a merge commit at fad0a64.

@neuromechanist
neuromechanist merged commit c4d1995 into feature/issue-1046-epic-upstream-freshness Oct 27, 2026
18 of 19 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-1046-sync-dev-2 branch October 27, 2026 12:33
neuromechanist added a commit that referenced this pull request Oct 27, 2026
The Phase 3 bullets were condensed past what the pull request body
said was kept. This restores the audit row the dispatch writes, the
reset of the clone to the tag, the lag on a latest tag OpenNeuro cannot
name, that git reset --soft drops .github/ until finalize deploys it
again, the warning when the guard cannot fire, what the preflight does
when its comparison is incomplete, the manual restart of a parked
annex conflict, the staging clean-up details, and how the snapshot
entry is read and written.

It also names the epic cleanup (#1976) where the text describes its
effects (the canary script, the plan handoff, the origin filter, the
migration number) and adds one bullet for what the two dev syncs
(#1979, #1981) carry: the App rename and the authenticated data host.

Docs only; the changelog format test passes.
neuromechanist added a commit that referenced this pull request Oct 27, 2026
* docs: finish the AGENTS.md pointers for re-pulls

Replace the ADR 0111 entry with its final state. Add the hard rule
that the four re-pull switches and caps are the owner's and that the
CLI refuses a manual major on a mirror. Add the public row (mirror
versions and the mirror flag) and the gated row (upstream freshness
and the re-pull runbooks).

The ADR 0093 entry already names the Worker's merge of an automatic
re-pull, so it is unchanged. Docs only; test/docs-links.unit.test.ts
passes against a fresh docs checkout.

* docs: link the upstream design from the index

The design-upstream-repull.md row in .context/README.md now says it is
analysis, names ADR 0111 as the verdict and points at the three gated
runbooks; its destination stays public. In the design record, a tag
missing from the GitHub mirror is no longer described as retried
without end: it is parked after 14 days, as ADR 0111's amendment of
2026-10-24 says and the retry engine does.

Docs only; test/docs-links.unit.test.ts passes against a fresh docs
checkout.

* docs: record Phase 8 in ADR 0111

Append Amendment 2026-10-27 (#1914): the page paths, the mirror field
contract, the order docs, website and backfill reach production, the
workflow pairs, the finding that a re-pull's DOI may carry IsIdenticalTo
as well as IsDerivedFrom (the public page says only "related
identifier" until the first real record), what is still not verified,
and the two items left open for the owner. Add a dated annotation to
the header, the Decision section and decision 5, and rewrite the ADR
0111 index line to the built state. No decision text is changed.

Docs only; test/adr-index.unit.test.ts passes.

* docs: consolidate the re-pull changelog

Turn the Unreleased block, which held only Phase 3's bullets, into one
entry for the epic: Changed per phase (2 to 8), Production behavior
changes, Deploy coupling, Owner steps after release and Known limits.
Every earlier bullet's fact is kept, shorter; the Phase 3 bullet about
a non-latest explicit tag no longer says the pinned copy is unbuilt.

Docs only; test/changelog-format.unit.test.ts passes.

* feat: type the mirror flag in the contract

dataPlaneVersionListingSchema now declares the entry's mirror as an
optional boolean that may be null, and still passes every other key
through. A listing whose mirror is anything else fails the CLI's read
of it with the existing "did not match the expected shape" sentence,
and a backend that predates the flag (no key) still parses.

test/data-plane-mirror-contract.test.ts serves the real landing route
over real SQLite and reads it with the CLI's reader; a second loopback
server serves the real payload with one value changed for the failing
cases. Eight one-line mutations of the schema and of mirrorFlagOf each
fail at least one test. Tested: the new file (8 pass), that file with
http-download and the two backend mirror-flag suites (50 pass),
typecheck, lint.

* docs: fix the re-created tag claim

The changelog and ADR 0111 said the dry-run plan compares trees and so
sees a tag re-created upstream under the same name. It does not: a plan
to a tag equal to the mirrored tag is refused as nothing-to-pull before
any tree is compared (src/lib/repull/preflight.ts, lines 157 and 158).
The changelog now says nothing detects it, and the ADR gets a dated
annotation. The amendment's note on annotations no longer counts them.

Docs only; the changelog and ADR index tests pass.

* docs: complete the not-yet-verified list

The amendment's list held only some of what the earlier amendments say
only the canary or a production run can check. It now holds all of it,
grouped by what shows it: the canary and the first copy, the first two
re-pulls, the first unattended run, the first Worker merge, and the
release with its first weeks. That adds the App's login, id and type,
the leased push and the lock calls, the 204 and the runner's masking,
the second release pull request and the N.0.1 tag, and the BIDS
unstable state. The ADR index line and the changelog now describe the
same scope. Every item was read in the amendment that records it.

Docs only; the changelog and ADR index tests pass.

* docs: correct the amendment's citations

The amendment cited two backend tests for "metadata.json is unchanged",
but neither reads that file. It now cites the mapping in
backend/src/services/data-router.ts and test/data-route.unit.test.ts,
which pins the four keys of each extensions.nemar.versions entry, and
says the recorded payload fixtures are in the website repository.
Decision 5's annotation says the chip is on the website's staging
branch only. The sentence about the two docs pull requests keeps the
dated fact and drops the status and the health-check procedure; the
changelog gains one deploy-coupling line for the same fact.

Docs only; the changelog and ADR index tests pass.

* docs: correct two overstated claims

The changelog said the plan command prints counts and never a path,
but it also prints "Plan file: <path>" (src/lib/repull/render.ts,
line 106); it now says it prints that file's location and nothing of
the dataset. The changelog and the ADR index said the four switches
are absent from the Worker's configuration. The test pins the wrangler
configuration file and not Worker secrets, so both now say "wrangler
configuration", and the changelog adds that a secret of the same name
would turn the path on and that /admin/repulls/switches reports it.

Docs only; the changelog and ADR index tests pass.

* docs: restore dropped changelog facts

The Phase 3 bullets were condensed past what the pull request body
said was kept. This restores the audit row the dispatch writes, the
reset of the clone to the tag, the lag on a latest tag OpenNeuro cannot
name, that git reset --soft drops .github/ until finalize deploys it
again, the warning when the guard cannot fire, what the preflight does
when its comparison is incomplete, the manual restart of a parked
annex conflict, the staging clean-up details, and how the snapshot
entry is read and written.

It also names the epic cleanup (#1976) where the text describes its
effects (the canary script, the plan handoff, the origin filter, the
migration number) and adds one bullet for what the two dev syncs
(#1979, #1981) carry: the App rename and the authenticated data host.

Docs only; the changelog format test passes.

* docs: point the DOI relation at the amendment

Decision 2, the Phase 7c gate G4 and the design record (the release
path and gate G4) state that a re-pull's DOI carries IsDerivedFrom, as
a fact or as the gate's pass criterion. The Phase 8 amendment records
that a second source names the same DOI as IsIdenticalTo, so which
relation the first record carries is not known until G4 runs. Each of
the four places gets one dated annotation pointing at that section; no
other text changes.

Docs only; the ADR index test passes.

* fix: say only a re-pull pins the copy

The import's warning for an explicit tag that is not OpenNeuro's
latest, and the doc comment above it, said ADR 0111 decision 8 is not
built. It is built for a re-pull's copy, which pins the S3 version; the
import's copy still takes the object currently at each upstream path
(its manifest items carry a bucket and a key and no version, as
parseS3Url returns them). Both now say only a re-pull's copy pins the
object version. The ADR gets a dated annotation on the Phase 3
amendment's sentence.

test/import-prepare-pin.test.ts asserts the new wording; with the old
string restored it fails. Tested: the 16 test files that import
src/lib/import-openneuro.ts and the tag-option test (386 pass), typecheck
and lint.

* docs: fix the data plane contract comments

The comment on the version listing said null is for an N.0.0 whose tag
is unknown, which read as any dataset's N.0.0. mirrorFlagOf sends null
only for an N.0.0 of an OpenNeuro dataset and false for every other
version, a NEMAR dataset's N.0.0 included (shared/source-snapshot.ts,
line 267 and the lines after it). The file header said passthrough on
the entry is deliberate with no exception; it now names the version
listing's mirror field as the one typed exception.

Comments only; typecheck passes and the contract test passes (8).

* docs: spell out abbreviations on first use

The ADR 0111 amendment and the changelog's Unreleased block used DOI,
API, S3, BIDS, CLI, ADR and UTC without defining them. Each is now
spelled out once, at its first use in that text (the changelog's older
entries come later in the file, and the ADR never spells any of them
out). The amendment's DOI section heading carries the full name, so the
four annotations that quote it now quote the new heading, and the
amendment no longer quotes a code comment that held BIDS.

Docs only; the ADR index, changelog format and docs links tests pass.

* fix: correct the copy-pinning claim

Recovery also copies a recorded version (pinned sources from .log.rmet, copySourceArgument in src/lib/content-recovery.ts), so 'only a re-pull's copy pins' was false. The import warning and its CHANGELOG line now say a re-pull's copy pins the object version. Tested: typecheck, Biome, changelog-format and adr-index tests pass.

* fix: finish dropping 'only' from the pin claim

The import's doc comment and its test still said only a re-pull's copy pins the object version. The test now asserts the new wording, and that the old phrase and 'is not built' are absent. Tested: typecheck, Biome, the 28 import-related test files, the ADR index and CHANGELOG format tests: 789 pass, 1 skip, 0 fail.

* docs: scope the re-created tag claim

The previous fix said nothing detects a tag re-created upstream under
the same name. Two checks do part of it. A plan to the mirrored tag is
refused as nothing-to-pull before any tree of upstream is cloned or
compared (preflight.ts lines 157 and 158, plan.ts lines 278 to 294), so
a mirror's recorded tag that upstream re-creates is not detected. A
target tag re-created after a plan has read it is caught: execute
refuses with upstream-tag-moved before the copy, the registration and
the pull request (advance.ts lines 146 to 176). The ADR annotation and
the changelog limit now say exactly that.

Docs only; the ADR index and changelog format tests pass.

* docs: add the G4 and plan handoff checks

The amendment's list of what only a first run can show lacked two
items. Gate G4's reading, that the new major's DOI resolves and the
previous version still serves, is in the first-two-re-pulls group (ADR
0111, Phase 7c amendment: the owner reads both before turning a switch
on). The epic cleanup's own test plan (#1976) leaves the first
automatic run through the plan handoff and the 57-word dispatch list
for production; it is in the first-unattended-run group, with the
two annotations of 2026-10-26 that describe the change.

The ADR index line and the changelog name groups, not items, so their
scope sentences still match the list. Docs only; tests pass.

* docs: spell out more abbreviations

The amendment and the changelog's Unreleased block now spell out CI,
AWS and JSON (amendment) and CDN, URL and JSON (changelog) at their
first use; the ADR never defines them and the changelog's older entries
come after the block. The changelog's "screened SHA" now says "screened
commit", so no SHA remains to define.

Docs only; the ADR index and changelog format tests pass.

* docs: say null is for an on dataset

The changelog and the ADR index line said the mirror flag is null for
an N.0.0 whose tag is unknown, which reads as any dataset's N.0.0.
mirrorFlagOf sends null only for an N.0.0 of an on dataset and false
for every other version (shared/source-snapshot.ts, line 267 and the
lines after it). Both now say so, as the contract comment and the ADR
amendment already do.

Docs only; the ADR index and changelog format tests pass.

This branch was previously deployed

1 inactive deployment
npm — fad0a649 Deployed Oct 27, 2026 by neuromechanist via publish #4056
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