Repository navigation
Turn on the publication review in production, cap 150 (shadow first) - #2370
Merged
Merged
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2370Version: 🤖 Updated on each push. |
Contributor
Author
|
Review round 1 (one Sonnet reviewer, lenses code, tests, comments): no critical or important findings. Two suggestions, both fixed in the latest commit: the dev block comment in backend/wrangler-sccn.toml no longer says production must not be lit, and the cap test comments no longer name fifty-one. The reviewer also asked whether ADR 0139 exists: it is accepted on feature/issue-2182-epic-pq-decide and reaches dev with that epic. The flag and cap tests pass (118 pass, 0 fail). Still a draft until the owner confirms the open items above. |
This was referenced Nov 26, 2026
Merged
neuromechanist
force-pushed
the
chore/issue-1732-publication-review-prod
branch
from
November 27, 2026 04:47
ad7026e to
79d9d58
Compare
neuromechanist
marked this pull request as ready for review
November 27, 2026 04:48
This was referenced Nov 27, 2026
Merged
neuromechanist
added a commit
that referenced
this pull request
Nov 27, 2026
The publication review runs in production (#2370).
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
Adds
PUBLICATION_REVIEW_ENABLED = "1"to production[vars]so the existing publication review (ADR 0102) runs in production. This is the owner's decision of 2026-11-25 (epic #2182, plan step D0): shadow first, on a batch of 20 requests started by hand, before the rest of the queue. The review never approves or denies; it holds the admin mail until it reports and the approval gate reads its verdict. The guard testbackend/test/publication-review-flag.test.tsnow asserts the flag is on in production, and still asserts that it is in no other environment.Part of #1732. Part of #2182.
Owner go, 2026-11-26
The owner asked to switch the review on, shadow first, starting with the fNIRS requests and then the rest of the queue. Status of the items from "Before it is switched on" (ADR 0102):
run-publication-review.ymlis deployed innemarDatasets/.github(read 2026-11-25).approve-publication.ymlmasks the dispatch token first, exports it only in the approve step's process, and releases the claim on failure (read 2026-11-25, lines 116-124, 359-363, 450-487).approval_requested_byset, so there is no web approval to compare. The check is vacuous on staging and is rerun on production after the first web approval. Original query:bunx cfman wrangler --account sccn d1 execute nemar-db-dev --env dev --remote --config backend/wrangler-sccn.toml --command "SELECT dataset_id, approval_requested_by, approved_by, approved_at FROM publication_requests WHERE status = 'published' AND approval_requested_by IS NOT NULL ORDER BY approved_at DESC LIMIT 50"PRESCREEN_ENABLEDsecret and disablerun-prescreen.ymlafter this deploys.PLATFORM_DAILY_CAP, owner decision 2026-11-25), recorded as a dated amendment to ADR 0102. The per-depositor cap stays 5 and an administrator's start still skips it. The cap tests now read the constant, and pass at both 150 and 50.After the release (owner)
nemar admin repo publish start <id>for the fNIRS requests first, then a batch across screen states, thennemar admin repo publish show <id>for each..context/plans/publication-queue/d0-shadow-labels.mdon the evidence branch. Go for the rest only with zeropassverdicts where you would deny.nemar admin repo publish startfor the remaining requests; at 150 a day the queue takes 2 to 3 days.Test plan
bun test backend/test/publication-review-flag.test.ts backend/test/cron-sweep-wiring.test.ts backend/test/prescreen-handover.test.ts(246 pass, 0 fail).bun test backend/test/publication-review-callbacks.test.ts backend/test/publication-review-d1.test.ts backend/test/publication-review-flow.test.ts backend/test/publication-review-flag.test.ts(193 pass, 0 fail), and the callbacks file again with the cap set back to 50 (112 pass, 0 fail).bun test test/adr-index.unit.test.ts(11 pass).