Skip to content

Give the github-conflict signup case its own ORCID - #1279

Merged
neuromechanist merged 1 commit into
devfrom
fix/api-test-orcid-fixture
Sep 7, 2026
Merged

neuromechanist merged 1 commit into
devfrom
fix/api-test-orcid-fixture

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

What

api-test failed on the v0.9.16 release PR (#1276):

Expected: "GitHub account already linked to another user"
Received: "ORCID iD already registered"

Not a product bug. /auth/signup checks username, then email, then ORCID (#1254, ADR 0043), then GitHub. Every signup case in test/api.test.ts passes the same shared fixture iD 0000-0002-1825-0097. That is harmless for the cases whose refusal fires before the ORCID gate, but this one has to get PAST it to reach the GitHub gate. As soon as any row on dev holds the shared iD, and any live profile test that links it leaves one behind, this case stops testing what it is named for and reports a conflict from the wrong gate.

The status assertion still passed (both are 409); only the error string caught it.

Fix

Give this one case its own iD, 0000-0000-0000-0001. 0000-0000 is outside every range ORCID assigns, so the value denotes no real person, and no run can ever claim it: the request 409s on the GitHub gate before a row is written. Signup validates format only (ORCID_ID_RE), not the checksum, so no real iD is needed.

Verification

Against the live dev worker, the exact CI target:

TEST_API_URL=https://nemar-api-dev.sccn-org.workers.dev bun test ./test/api.test.ts -t "existing github_username"
1 pass, 0 fail

bunx biome check test/api.test.ts clean. (bun run lint covers src/ only, the same gap as website#313.)

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1279

Version: 0.9.16-PR1279.19a51b9
Commit: 19a51b9


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit 09252a0 into dev Sep 7, 2026
12 checks passed
@neuromechanist
neuromechanist deleted the fix/api-test-orcid-fixture branch September 7, 2026 03:04

This branch was previously deployed

1 inactive deployment
npm — 19a51b9e Deployed Sep 7, 2026 by neuromechanist via publish #2343
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