Skip to content

Admin publication page shows the review and the identifier screen - #460

Draft
neuromechanist wants to merge 63 commits into
stagingfrom
feature/issue-459-phase4b-web
Draft

neuromechanist wants to merge 63 commits into
stagingfrom
feature/issue-459-phase4b-web

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Part of nemarOrg/nemar-cli#1731 (Phase 4 of epic nemarOrg/nemar-cli#1726). Tracking issue: #459.

Summary

The administrator publication page now shows the API's review and the identifier screen and decides on them, and every refusal the API gives is shown in plain words. The page prints the API's own statement and the neutral cure for each reason; it never prints the terminal's sentences (line, command, description.lines, description.next, or a refusal message that names a terminal step), because the terminal's cure carries commands. The API half is nemarOrg/nemar-cli#1779 (it adds the detail fields and the shared words); the decision is this repository's ADR 0027 (the nemar-cli side is in its ADR 0102).

  • Review chips and a review panel. Pending, approving and blocked requests show a review chip and a screen chip from the list; opening a request fetches the API's detail and shows the reasons (the API's statement and neutral cure), the identifier screen, and the model's summary and notes only under a label saying the model wrote it, as plain text.
  • Approve follows the API's gates. Approve is absent for a reason no override clears, for a blocked request, and when the identifier screen has a direct identifier, no verdict or is still running; a started-publishing run is exempt and offers "Continue approval". A non-pass needs an explicit confirmation and sends an override naming exactly the reasons shown; a screen that needs a person to read it needs a recorded reason of 10 to 500 characters. The typed PUBLISH dialog stays the last step. The page never computes a verdict.
  • Every approve and deny names its request (request_id); a stale page is refused by the API and the page re-reads, and a panel whose request is not its row's is drawn as stale with no controls.
  • Start review when the API offers one; plain words for every refusal (request_mismatch, approval_in_flight, deny_after_publishing, the review and screen gates, the origin refusal and the rest); a failed or unanswered approve says it may have started and offers a refresh.
  • A request blocked by the identifier screen has its own badge, "Identifiers found" (the seventh block reason), which also shows on the depositor's dashboard card.
  • A transcribed 22-key table of the words the API words for a terminal (src/lib/publication-review-copy.ts), with a drift test against the nemar-cli file (strict path wired in ci.yml, same dev pairing as the three others, and shared/publication-limits.ts in the sparse checkout for the limits test) and a rule that every key has a consumer; fixtures captured from the real API routes over a real database (each carries how it was captured).

What this needs, and why it is a draft

The API must deploy before the website. A page promoted ahead of the API gets a detail with no statement, so it withholds the panel, says the page and the API are out of step and offers no Approve; it never falls back to the old empty approve or to the terminal's line. This pull request stays a draft until the whole epic is on nemar-cli dev, and the fixtures, captured at an earlier nemar-cli commit, are re-captured at the dev head before it is marked ready.

CI is red for two reasons, both outside this change:

  • (a) shared/contract/publication-review-copy.ts is not on nemar-cli dev yet (the epic is finalized into dev first), so the strict drift test cannot find it.
  • (b) The website account-copy-drift test fails because nemar-cli #1769 reworded three upload_access.* strings on dev that staging does not have yet; it clears when staging takes that copy, and this pull request does not touch it.

Review

All implementation was done by Sonnet agents, each failing test first, with mutation checks. One Opus review of both halves found no Critical defect and one Important (a documentation claim), plus seven Minor findings, all fixed. Fix rounds since then address a Sonnet panel's findings on this pull request.

Test plan

  • bun run lint, bun run typecheck, bun run test (strict drift test against the nemar-cli epic checkout), bun run build
  • CI green after the epic is on nemar-cli dev and staging carries the #1769 copy
  • the maintainer's browser check of the page on staging, in light and dark themes, in forced colors and at 390 px width:
    • a request that passes the review (Approve offered, typed PUBLISH last)
    • a request with a non-pass (explicit confirmation, override names the reasons shown)
    • a request with a hard reason (no Approve, the reason's words shown)
    • a request whose identifier screen needs a reason (10 to 500 characters recorded)
    • a blocked request (no Approve, "Identifiers found" badge for the screen's block)
    • a run that has started publishing (panel offers "Continue approval")
    • a stale page (another request under the same row, no controls, refresh link)

A malformed detail is out of step, never an exception: every part the
panel reads is validated. Unknown tones fall back to note, rank reads
own properties, an approve server fault says it may have started, wire
codes are separate from page-only words. Tested: unit tests, mutations.
The extractor strips same-line trailing comments and refuses a key
matched twice. The drift test compares ACK_MIN, ACK_MAX and DENIAL_MAX
with nemar-cli publication-limits when that file is checked out.
Tested: drift tests strict, mutations red.
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