Skip to content

Sync the epic with dev and follow the App rename - #1979

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

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

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Merges dev into the epic (34 dev commits) and follows the GitHub App rename from nemar-publish-bot to nemar-bot.

  • Merge ef63ebff: four conflicts resolved, keeping both sides. CHANGELOG (the epic's Unreleased section first, then dev's releases), the branch-protection comment, and the route and export inventories (the union).
  • Rename ff16d254: NEMAR_APP_BOT_LOGIN is now nemar-bot[bot], verified on GitHub (the id 283755542 is unchanged; the old login returns 404). The one check that compared the login alone (loginLabel in pr-review-queue.ts) now also compares the numeric id. The other checks already compared login, id and type. Lookalike-login fixtures and two detail-view tests are added.
  • Changelog aab29961: the deploy-coupling bullet says the onboard change shipped in 0.10.24.

Known: ADR 0111 (dated text) and the scrub runbook still name the old login. They are kept as dated history; a dated amendment recording the rename is the owner's call.

Test plan

  • bun run typecheck and bun run lint exit 0. Biome exits 0 on the 48 changed files (28 warnings, all in dev's mail tests; not errors).
  • bun run migrations:d1-check: 114 migrations replayed; 157 objects and 47 tables; prefixes 0104 to 0112 unique.
  • Targeted suites (38 files): 1,798 pass, 0 fail.
  • Pure tier (743 files, 6 shards) on ff16d254: 19,693 pass, 44 skip, 0 fail. One shard reran once: the stale local website checkout, and one banner test that passes alone.
  • Pure tier and the CLI repull suites on the final head aab29961: pending.

neuromechanist and others added 30 commits October 25, 2026 11:58
* Stop setting Message-ID on ticket replies

* Answer mail reply errors with 409 and 422

* Accept word ticket refs in mail_tickets

* Use three-word ticket references

* Use template literals in mail route test

* Address review of word refs and replies
Sweep CI accounts with open upload requests
* Changelog for 0.10.24

* Fix exit codes and onboard note
* Add mail screening schema, contract and ADR 0113

* Screen inbound mail: blocklist, filter, cap

* Test inbound mail screening

* Add mail spam and blocklist CLI commands

* Review fixes: unfilter on action, safer blocks

* Test unfiltering, unverified blocks, cap

* CLI: spam --force, default block none

* Review: two-lane cap, assign on unfilter

* Test two lanes, unfilter assignment

* CLI: note lists are not exhaustive
nemar-bot and others added 11 commits October 26, 2026 08:19
* Author strip commits as nemar-bot

The strip script deletes per-repo workflows under the App's name. The App was renamed from nemar-publish-bot to nemar-bot, so the commit identity follows it. Tested: biome and typecheck pass; the affected webhook and workflow test files pass.

* Name the nemar-bot App in code comments

Comments only. The code checks the App id (3679074), not the slug, so no behavior depends on the name. Tested: biome and typecheck pass; the affected backend test files pass.
Merge origin/dev (81e953d, 34 commits: 0.10.24 and 0.10.25, the
Cloudflare mail move, inbound screening, the App rename) into the
epic. Four conflicts, resolved by keeping both sides:

- CHANGELOG.md: the epic's Unreleased section first, then dev's
  0.10.25 and 0.10.24 sections, newest first; no entry dropped.
- backend/src/services/github/branch-protection.ts: the epic's
  comment and re-export from shared/nemar-app.ts, with dev's rename
  of the App to nemar-bot applied to the comment's first line.
- test/admin-route-inventory.unit.test.ts: dev's mail entries and
  the epic's repull entries auto-merged; the pin is the union,
  198 (170 at the base, plus 23 from the epic and 5 from dev).
- test/api-export-surface.unit.test.ts: both POST_SPLIT_ADDITIONS
  additions, dev's mail functions then the epic's repull ones.

Migrations stay unique: dev adds 0109 to 0111, the epic 0104 to
0106 and 0112.

Tested: typecheck passes; both inventory test files pass.
GitHub now names the App's bot user nemar-bot[bot]; the old login
answers 404, and the user id (283755542) and the App id (3679074) are
unchanged (gh api, 2026-10-26).

- shared/nemar-app.ts: NEMAR_APP_BOT_LOGIN is nemar-bot[bot]; the
  comment keeps the 2026-10-24 measurement and records the new one.
- pr-review-queue.ts: loginLabel shows the App's name only beside the
  App's numeric id, as restAuthorLabel already did; the machine-clean
  rule, the review start and the intake already compared login, id
  and type.
- Tests: the identity pin, the lookalike logins (nemar-bot2[bot],
  nemar-bot) and two comments follow the rename; two new detail-view
  tests store a review under the App's login with another id, and
  under the App's id with another login, and neither is shown as the
  App's.

Tested: typecheck; Biome on the changed files; the four affected
suites pass (191). Mutations of loginLabel (login only, either half,
id only) each fail a new test, and the old login fails the pin.
The Unreleased deploy-coupling bullet said the onboard workflow change lands first; it shipped in 0.10.24 (#1933). Doc only; no test reads this bullet.
A pull request from a bot with the App's numeric id under another login (nemar-bot2[bot]) shows (unknown) in the detail view. Tested: the admission suite passes (32); with the login half of restAuthorLabel dropped, the new case fails.
A dated amendment at the end: the App is now nemar-bot, the bot user nemar-bot[bot] with id 283755542 and the App id 3679074 unchanged, the old login 404. The earlier lines stay as dated history; the production-only check in the Phase 7e amendment now names nemar-bot[bot]. Doc only.
The enrichment run commits as nemar-bot (formerly nemar-publish-bot) since the App was renamed on 2026-10-26. Doc only.
The ADR 0113 entry sat after the Backfill note; it now follows ADR 0112 in the index list. Line content unchanged. Tested: the ADR index test passes.
@github-actions

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1979

Version: 0.10.26-PR1979.4c879f0
Commit: 4c879f0


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit 1abf928 into feature/issue-1046-epic-upstream-freshness Oct 27, 2026
20 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-1046-sync-dev branch October 27, 2026 05:59
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 — 4c879f07 Deployed Oct 27, 2026 by neuromechanist via publish #4048
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