Skip to content

Analyze pseudonymous deposit for double-blind review - #1400

Merged
neuromechanist merged 6 commits into
devfrom
docs/anonymous-deposit-analysis
Sep 15, 2026
Merged

neuromechanist merged 6 commits into
devfrom
docs/anonymous-deposit-analysis

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Analysis only; no code, no decision. .context/draft-anonymous-deposit-analysis.md.

Why this is not "anonymous upload"

Five requirements, and they are not the same requirement: reviewer access, author concealment,
reviewer concealment, reversibility at acceptance, and full attribution to the archive
throughout. The last one is what separates this from a drop box: without it there is nobody
to hold to the deposit attestation (ADR 0024) and no contact for a consent problem. The feature
is pseudonymous deposit, and the name settles several arguments before they start.

The leak inventory is twelve items, not two

Verified against production on 2026-09-14. The two that matter most are the two nobody names:

  • uuid.log on the git-annex branch. git annex init with no description records
    user@host:/path, and initDataset passes none. Live on public nm000281:
    bpinto@login01:/expanse/projects/nemar/bruno/emg2pose_nemar/bids. Filed separately as
    git annex init publishes the depositor's username, host and local path #1399, since it is a disclosure today regardless of this feature.
  • ORCID identifiers in .nemar/metadata.json, committed to the repository. One permanent
    global identifier de-anonymizes the whole author list in a single lookup.

Also verified: owner_username/owner_github served anonymously by GET /datasets/:id;
commit author email and GitHub account public in history and in /contributors; the website
falling back to the depositor's handle as the byline when authors is empty, so scrubbing the
author list makes concealment worse; and every post-publication change being a pull request
authored by the depositor's own account under ADR 0001.

The two candidate designs are complementary, not alternative

Keep the repository private solves almost the whole inventory for free but cannot serve
reviewers: both existing access paths (invite, request-access) tell the depositor who asked,
which breaks the blind in the other direction. It becomes a design only with a tokenized,
account-free review link, which rides on data.nemar.org's existing presigning router, plus a
reserved EZID identifier, a status services/ezid.ts already implements and nothing uses
for this. It also trips scheduled cleanup: a private, DOI-less dataset with no publication
request is deleted after ninety days, and a review window is three to nine months.

Deposit through the service account removes the GitHub-identity family permanently rather
than deferring it, and the precedent is already in production (every OpenNeuro import is this
shape). Its deepest problem is that service ownership takes the permissions with it, and
ADR 0002 declined to build a NEMAR permission layer. That dissolves if the repository is
private, because collaborators on a private repository are not publicly listed, which is the
argument that the two options belong together.

What has to be answered before any code

ADR 0026's submission minimums literally reject anonymous author lists; ADR 0041 requires a
citable uploader name at mint; ADR 0002 says NEMAR has no access vocabulary of its own. Section
5 proposes an answer to each. They need deciding in an ADR, not in a migration.

Works out the five requirements, the twelve-item leak inventory verified
against production, and what each candidate design requires. No decision
taken; the ADR has to answer the collisions with ADR 0002, 0026 and 0041
first.

Refs #1399.
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1400

Version: 0.10.4-PR1400.d1597de
Commit: d1597de


🤖 Updated on each push.

Direction taken: serve the dataset on data.nemar.org and the website as
any public dataset, keep the GitHub repository private, and flag the page
as temporarily anonymous. That removes the tokenized review link entirely,
since with no per-reviewer access mechanism there is nothing to conceal in
the other direction.

Also corrects the staleness claim: since #662 the cron warns the owner and
hands off to admins, it does not delete. The hazard is five deletion
warnings mid-review, not data loss.

Records the three predicates the new shape creates: the website's
fabricated clone URL, the CLI download path that clones a private repo,
and the two candidate queries that use D1 visibility as a proxy for
repository visibility.

Refs nemarOrg/website#333, #1399.
@neuromechanist

Copy link
Copy Markdown
Contributor Author

Updated with the direction taken, and one correction.

Correction: cleanup does not delete. Since #662 the stale-dataset cron emails the owner at
thirty, fourteen, seven, two and one days, then notifies admins once and leaves the deletion to a
deliberate nemar admin delete-dataset (backend/src/services/staleness.ts). My earlier claim
that a dataset under review would be silently deleted was wrong. The real cost is a depositor
receiving five deletion warnings during peer review and an admin queue filling with handoffs that
must not be acted on. Suppressed by the same one clause, lower stakes.

Direction: public data, private repository. The dataset is served on data.nemar.org and on
the website exactly as any public dataset is; the GitHub repository stays private; the page
carries a visible temporarily-anonymous flag and a grayed-out GitHub control. Website half filed
as nemarOrg/website#333.

This is better than the tokenized review link it replaces, for a reason worth stating: there is
no per-reviewer access mechanism, so there is nothing to conceal in the other direction.
R3 is
satisfied by construction. It also deletes the token table, the expiry, the scope, the revocation
path and the serving path.

It does move work, though, rather than remove it. Under a private dataset everything in section
2.2 was unreachable; here it is all reachable, so withholding owner_username/owner_github,
the byline fallback, datasets.authors in the search index and the facet, and doi/citation
in the Zarr documents all become required rather than incidental.

Three mechanical consequences, now in section 3:

  • ActionBar.astro builds https://github.com/nemarDatasets/<id> when github_repo is null, so
    nulling the field hides the button and keeps the clone command. The website needs a state, not
    an absent field.
  • nemar dataset download clones the repository and will fail; the working routes during the
    window are the HTTP tree and the zip under <id>/archives/.
  • Two candidate queries use D1 visibility = 'public' as a proxy for "the repository is public",
    and this design is exactly where that proxy stops holding: the Zarr fidelity sweep (every such
    dataset lands unverifiable, so it fails has_zarr_verified for the whole window) and the
    staleness sweep above.

Option B (service-account deposit) is no longer needed: the repository is private for the whole
window, so the GitHub-identity family is already unreachable. Kept in section 4 as the fallback
for a venue that requires the repository itself to be open at submission, which has not come up.

A dataset that has ever been public cannot be made anonymous: the
DataCite record is harvested and permanent, the git history is in every
clone, and the catalog has already served the real authors. Hiding the
fields afterwards changes what NEMAR displays and nothing about what is
known, while telling the depositor they are anonymous.

Also records the blocker the download work surfaced: 88 percent of a
dataset's files are served from raw.githubusercontent.com, so a private
repository 404s all the metadata while the recordings download fine
(#1403), and notes that the HTTP download path (#1402) now exists.
@neuromechanist

Copy link
Copy Markdown
Contributor Author

Review: fact-check against code and production

An independent pass verified every claim in the document against the codebase and re-measured
the live numbers. It found eight factual errors, two of them load-bearing. Corrections are
being applied; recording them here because several change the plan, not just the prose.

Wrong, and it changes the plan

The manifest canary is not a blocker in production, so A4 is not phase one for that reason.
The document said a private repository means the manifest is never written. Production runs
MANIFEST_VIA_CENTRAL_WORKFLOW = "true" (wrangler-sccn.toml:158), so generateManifest() and
its verifyGitBackedFiles are not called at publish time at all; every publish-time dispatch
passes skipCanary: true unconditionally (version-doi.ts:507,665,921), and the central
workflow already has an escape hatch labelled for exactly this case —
generate-manifest.yml:55: skip_canary: "Skip raw.githubusercontent.com canary (for private repos)" — and clones with an App installation token. A4 is a serving problem. The
escalation rested on a code path that is off in production, and I asserted it confidently.

Two ADR citations do not say what I claimed. ADR 0010 is about OpenNeuro import copies and
what it forbids is streaming through the Actions runner, not routing through the Worker; the
rule I wanted is ADR 0002 ("not in the path of ordinary git operations"). ADR 0017 is about
server-side visibility filtering and says nothing about a publish flip being the single
auditable moment; that is ADR 0001's consequence. This is the exact failure mode a note in my
own working memory warns about, and I made it anyway.

Wrong on mechanism, conclusion survives

  • .nemar/metadata.json is committed by the backend, not the depositor. The CLI actively
    gitignores it (upload/transfer.ts:69-81); it reaches the repo via
    commitEnrichmentWithBidsignore as nemarAdmin on the App token. So a depositor-side scrub
    cannot suppress it and the enrichment service re-commits the ORCIDs after any scrub. That
    makes it a backend suppression problem, which is a different and harder fix than the document
    implies.
  • The website has two URL-fabrication sites, not one. dataset/[id].astro:234 fabricates
    before passing the prop, so ActionBar.astro:31's ?? is dead as wired and the button is
    never hidden by nulling the field. Dataset page: temporarily-anonymous state, and gray out the GitHub route website#333 needs updating.
  • git annex init takes the description positionally, not as --description. The repo's own
    scripts already do it right.

Wrong on detail

owner_github for on008768 is "nemarAdmin", not null, and the imported history carries real
institutional addresses — so the OpenNeuro "precedent" for an unattributed record holds for the
D1 field only, not for git history, which is the one place Option B was supposed to help.
owner_github is in the detail projection only, not the list ones. recordAccess fires on two
routes (archive and zarr), not one. Dataset ids are gap-filling, not sequential. The quoted
host-invariance text is 37 lines from the git branch and belongs to the DATA_NEMAR_ORIGIN
constant, and buildBytesUrl's own docstring already documents the carve-out — so "the code
contradicts itself" overstates a documented exception.

What the document missed

  • Four D1-visibility-as-repo-visibility proxies, not two. nemar admin fleet drift reads
    visibility from the D1 ledger and would mark every anonymous dataset PUBLIC_UNPROTECTED
    forever, with fleet enforce then trying to apply a public-repo ruleset to a private repo.
    The MCP events fallback is the fourth.
  • A governance gap. ADR 0001 gives an unpublished repo no branch ruleset, so for the whole
    review window the public reads data.nemar.org while main stays force-pushable and
    retaggable. "Readable but not published" needs a governance answer, not just a name.
  • The website README panel fetches raw.githubusercontent.com from the browser
    (Readme.astro:41), so Data plane serves 88% of files from raw.githubusercontent.com, so a private repo breaks it #1403 does not fix it and the most prominent content on the page would
    be blank. Demographics degrades to "no demographics" the same way.
  • GET /datasets/:id also serves enrichment_json — the full author map with ORCIDs and
    affiliations — and readme. Both need to be on the withhold list.
  • The visibility flip has three implementations, not one; the ADR has to say which is
    authoritative.
  • De-anonymization is a content commit, not a flag flip, and if the repo flip happens first,
    ADR 0001 has already made main PR-only. The ordering is load-bearing.
  • The uuid.log fix is scoped too narrowly. ensureGitAnnexInitialized and cloneDataset
    also init without a description, and nm000281 gained a second default entry on 2026-09-14
    from admin-side tooling. git annex init publishes the depositor's username, host and local path #1399 updated.

Verified correct

The whole leak inventory's measurements: on008701's 2,802/3,201 split (87.54%), 4.1 MB git vs
14.0 GB annexed, the nm000281 uuid.log line verbatim, commit authorship and the anonymous
/contributors response, owner_username+owner_github served anonymously on detail, the Zarr
v3 index and store attributes carrying doi/license/citation, the byline fallback, the
jq -r '.[].bytes_url' recipe, buildRedirectUrl's public-repo invariant docstring, the
staleness thresholds and no-auto-delete behavior, EZID reserved/makePublic/delete, and eleven of
thirteen ADR citations.

Two ADR citations named the wrong decision: 0010 is import-time S3 copy,
not the Worker (that is 0002); 0017 is server-side visibility filtering,
not the publish flip (that is 0001). The manifest canary is not a blocker
either -- production runs the central workflow, passes skipCanary
unconditionally, and that workflow has an escape hatch labelled for
private repos and clones with an App token. A4 stays first, for a
different reason.

Also: .nemar/metadata.json is committed by the backend, not the
depositor, so no depositor-side scrub can suppress it; the website has
two URL-fabrication sites, so nulling the field hides neither; #1402 is
proposed, not merged; owner_github is "nemarAdmin" rather than null, and
the imported git history names real people; ids gap-fill rather than run
sequentially.

Adds what the document missed: two more visibility proxies (fleet drift,
MCP events), the governance gap an unprotected main leaves open for the
whole review window, the website's browser-side GitHub fetches,
enrichment_json and readme on the withhold list, and the ordering
constraint on de-anonymization.
@neuromechanist
neuromechanist merged commit 3199508 into dev Sep 15, 2026
12 checks passed
@neuromechanist
neuromechanist deleted the docs/anonymous-deposit-analysis branch September 15, 2026 12:05

This branch was previously deployed

1 inactive deployment
npm — d1597de6 Deployed Sep 14, 2026 by neuromechanist via publish #2591
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