Repository navigation
Proposal: let a reviewed receipt carry an approved wording edit past the fidelity gate - #96
Merged
hiciefte merged 8 commits intoNov 10, 2026
Conversation
Every editorial PR fails the fidelity gate by design, and nothing lets an approved one merge. A receipt in migration/accepted-edits.json now records one PR's change to one article, including the exact text it replaced. The gate puts that text back, requires the exact restored original, runs all original checks on it, and then allows only wording changes: anchors, headings, images and front matter must stay. The number of required approvals is one value in the receipts file. An edited article without a receipt now gives one finding naming the article and the reason, instead of hash noise and a wrong image total. The CLI block is only re-indented (see git diff -w).
An accepted edit must not hide that the wording differs from the recovered wiki. Edited articles replace "Original wiki wording" with "Edited after restoration" and a PR link, and Source and history lists each accepted change. Unedited articles render as before.
Contributors need the steps to add a receipt once reviewers approve the wording, and maintainers need to choose the approval rule. List the options instead of deciding it here.
…eguards The structure checks matched lowercase patterns only, so a receipted edit could add <IMG>, <span hidden>, <style>, <script>, an HTML comment or a blank line that ends the HTML block and starts Markdown. Compare the edited body with its base tag by tag: added or removed markup must be plain a, strong, em, b, i, code, br, p, ul, ol or li, with new IDs and http(s), relative or same-page links only. The blank-line and comment counts must stay as restored. In Last resort restore, the 60 characters around each recovery safeguard must also stay unchanged, so "Do not" or "(not reversible)" cannot be added next to an intact phrase. A receipt must name a pull request of this repository, a real calendar date and a summary that does not call the change verified, official or approved.
The gate cannot confirm that a pull request was reviewed, and an accepted edit may change list items, so an edited article no longer says "reviewed pull request" or "step order". The review page says article wording is preserved unless the article names an accepted edit.
A survey of the 74 open proposals with the new markup rule found two harmless cases it rejected: an empty <span> that only keeps an ID alive, and removing an <a> without href. Allow both. The proposals that still fail change code blocks (bisq-network#23) or remove "section not recovered" markers (bisq-network#42, bisq-network#71), which need their own decision.
The gate counts the approvals a receipt records and cannot check them, so say plainly that branch protection must require the same reviews before the first receipt merges, including for administrators and with a required check and code owners for the receipts file. Describe the new markup and safeguard rules.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Resolve package.json by keeping the tests from both sides, and review.md by keeping the new repository link with the accepted-edit sentences.
hiciefte
added a commit
to hiciefte/documentation
that referenced
this pull request
Nov 10, 2026
Resolves two conflicts with the accepted-edit receipts (bisq-network#96): - CONTRIBUTING.md: keeps this branch's sentence about additional articles and the new Accepted editorial changes section from main. - scripts/check-source-fidelity.mjs: imports both additionalArticles and the accepted-edits helpers. With the article at its formatting-only commit (745df9b), npm test (68) and npm run build pass, so the remaining check failure is only the unreceipted wording change this PR proposes.
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.
Replaces #88, which was opened from a branch in this repository. The changes are the same; the commits were re-signed with corrected authorship.
Why
Each of the 74 open editorial PRs (#100–#173) fails
scripts/check-source-fidelity.mjs, and that failure is intended. CONTRIBUTING.md says such a PR can merge only with human approval and "a separately reviewed policy for accepted editorial changes", and that the original hashes must not be refreshed. That policy doesn't exist yet, so today none of these PRs can merge.The gate's current output for an edited article is also hard to read. Applying PR #145's article diff to
maingives:The second finding is a side effect of the first. The article that failed was never counted, so its four images are missing from the total. Nothing about the images changed.
What this PR does
migration/accepted-edits.json(new): holds the receipts.required_approvalsis the one configurable value (set to 2 here as a placeholder).itemsis empty.scripts/lib/accepted-edits.mjs(new): validates receipts, undoes a recorded edit exactly, and describes an edit so the helper can print a receipt.scripts/check-source-fidelity.mjs: an edited article passes only when its receipts rebuild the exact restored original. Every existing check then runs on that rebuilt original, and the edited file is compared with it. An edit without a receipt now gives one finding that names the article and the reason. Image totals are skipped when an article could not be read, because the failing article is already reported. The CLI block at the end is only re-indented;git diff -wshows the real change.scripts/record-accepted-edit.mjs(new): prints a receipt for one article, with hashes and recorded changes taken fromgit show <base>:<file>and the working tree. Reviewers fill in the summary, approvals, notes and evidence by hand.scripts/accepted-edits.test.mjs(new, added tonpm test): 15 tests.PageTitle.astro,SourceHistory.astro,custom.css,review.md: a visible "Edited after restoration" signal, described below.CONTRIBUTING.md: the receipt steps, the approval options and the branch-protection precondition.Receipt shape
{ "schema_version": 1, "description": "…", "required_approvals": 2, "items": [ { "slug": "trading-monero", "pull_request": "https://github.com/bisq-network/documentation/pull/145", "summary": "Correct the XMR auto-confirm defaults and the check_tx_key placeholder syntax for Bisq 1 v1.10.11.", "author": "pr-author-login", "based_on_file_sha256": "2e4a5fa1b052033a2eccddb27433ad539a8be6936a3ba4905498216fce5ea0da", "accepted_file_sha256": "c06af3744dd5c97b59e3bc970f7d78954192a2c670a95f888c32686ff58fd9f9", "accepted_on": "2026-11-10", "approvals": [ { "login": "maintainer-login-1", "role": "maintainer" }, { "login": "reviewer-login-2", "role": "support agent" } ], "note_ids": ["xmr-auto-confirm-defaults"], "evidence": ["https://github.com/bisq-network/bisq/blob/ea9d5dff90c99ac462f2b0a7bf9ef92683956619/core/src/main/java/bisq/core/user/AutoConfirmSettings.java#L49-L65"], "changed_image_alt_text": [], "changes": [ { "line": 32, "column": 109, "original": "<TXKEY ADDRESS>", "accepted": "<TXKEY> <ADDRESS>" }, { "line": 50, "column": 4, "original": "By default auto-confirming trades is turned on in the Bisq app, if you wist to turn if off it can be done in Settings > Preferences:", "accepted": "In Bisq 1 v1.10.11, XMR auto-confirmation is disabled by default. Check or change your saved setting in Settings > Preferences; an existing installation may retain different preferences." }, { "line": 71, "column": 59, "original": "(default: 1", "accepted": "(Bisq 1 v1.10.11 default: 0.125" } ] } ] }(This is the receipt from the proof below. The logins are placeholders.)
based_on_file_sha256is the exact file the PR changed. For a first edit, that is the restored baseline: the restored original with its recorded line-break formatting, if the article has a formatting record. For a later edit, it is the previous receipt'saccepted_file_sha256, so edits to the same article form a chain in file order.changesrecords the exact text that was replaced. The gate puts that text back and requires the result to be the base byte for byte. So the preserved original can still be rebuilt from the current checkout, without git history, and every existing restoration check keeps running on it; reviewers can read the before and after wording in the receipt; and a receipt that misstates what changed fails.pull_requestmust be a pull request of this repository (hiciefte/bisq-docs, orbisq-network/documentationafter the move).accepted_onmust be a real date. Thesummaryis shown on the article and may not call the change verified, official, approved, endorsed, certified or guaranteed.loginandrole. Logins are plain text;@is rejected. The login recorded asauthorcan't count, and the same login can't be counted twice.note_idsmust exist inmigration/source-review-notes.jsonfor that article.evidencecontains https links.source-formatting.json.What the gate accepts
An accepted edit may change article wording inside the article body. Compared with the base file, the only markup it may add or remove is plain lowercase
a,strong,em,b,i,code,br,p,ul,olandli, with new IDs allowed and links only to http(s), relative or same-page targets; empty spans that only carry an ID (a moved anchor) are also allowed. It may not:changed_image_alt_text;div,spanwith content,style,script,iframe,svg,s,pre, tables, "section not recovered" markers), attributes such ashidden,styleoron…, or any capitalised tag;It also fails when:
required_approvals;What a receipt can still carry, because it is a wording change a human approved: reordered list items, shortened or removed sentences, a link pointed somewhere else. Reviewers see each of these in the receipt's before and after text.
public/wiki-source/raw wikitext and metadataadditional-articles.mjs,output_sha256)check-template-renderings.mjscheck-section-repairs.mjs/renderSectionRepairscheck-scoped-link-repairs.mjs,check-recovered-category.mjscheck-site.mjs("source hashes")dist/, not article files; links, fragments and image placement still have to passmigration/articles.jsonoutput_sha256(originals)review/proposal-coverage.jsonrestored_sha256Visible signal
An edited article must not look like the original. The change is plain wording, with no "verified" or "official" badge:
date · summary · PR #145for each accepted edit.review.mdsays article wording is preserved unless an article names an accepted edit.Approval rule: options for maintainers
required_approvalssets how many distinct approvals each receipt needs. The gate runs offline and counts what the receipt records; it cannot confirm reviews on GitHub. Anyone can type two logins into a receipt, and a PR can also changerequired_approvalsor an earlier receipt. Recorded approvals mean something only once branch protection onmainrequires the same reviews. Since 10 November 2026 a ruleset onmainrequires pull requests, signed commits and thecheckstatus, with no required approvals, andhiciefteis the only collaborator with write access, so options B and C cannot be enforced through required reviews until more reviewers have write access.required_approvals: 1). Fastest. One person can accept a change alone.2, the placeholder in this PR). The role mix is a review convention; the check does not enforce roles.Whichever you pick, before the first receipt merges: require the same number of approving reviews on
main, include administrators, dismiss stale approvals when new commits are pushed (so approvals cover the receipt commit), make the check workflow required, and add a CODEOWNERS entry formigration/accepted-edits.jsonwith "require review from code owners". A later CI step could compare the recorded logins and author with the pull request's actual approving reviews and author through the GitHub API; that needs a token and network access, so it is not part of the offline gate and not included here.Proof
Recorded at the first version of this branch (
ad7960a), in a scratch worktree with PR #145's article diff applied (git diff origin/main...origin/pr/46 -- src/content/docs/wiki/). Review re-ran the node-only steps and got the same hashes and messages; the later commits do not change these messages. The page count comes from the earlier environment; this one builds 601 pages frommain. Outputs are trimmed to the relevant lines.On this branch as committed (empty
items):npm test: 52 tests, 52 pass (15 new).DOCS_SITE=https://hiciefte.github.io DOCS_BASE=/bisq-docs/ npm run build: passes (601 pages). The fidelity line is the onemainprints, since there are no accepted edits.node scripts/check-source-fidelity.mjs --self-test: the nine existing negative checks still pass.The 15 new tests cover an approved receipt passing with the original rebuilt; an edit without a receipt; a change after the receipt; a wrong base and recorded text that does not match; too few approvals, self-approval,
@in a login andrequired_approvals0; heading, legacy anchor and code ID changes; image alt text with and without a record, an unused record and a resized image; front matter or title changes; chained and misordered receipts; a receipt for an unchanged article; recovery safeguards and the words around them; markup that adds, hides or runs content (<IMG>, hidden spans,<style>,<script>, astyleattribute, ajavascript:link,<s>, a comment, a blank line), with plain inline markup still passing; the pull request URL, date and summary rules; anddescribeEditoutput.Changes after review
Review tried to get changes past the gate. Every change without a matching receipt failed, and undoing a receipt rebuilt the original byte for byte against the committed hashes, not the receipt's own. Fixed in this PR (commits after
ad7960a):<IMG SRC=…>,<H2>,<svg>,<iframe>,<script>or<style>, wrap sections in<div hidden>, start Markdown after a blank line, or, in Last resort restore, hide the procedure, strike through a safeguard or put "Do not" before an intact one. Added the markup rule and the safeguard-context check above.pull_requestaccepted any repository's PR;accepted_onaccepted2026-02-31; the summary could say "Verified by Bisq support". Now rejected.review.mdno longer says all wording is preserved.What this would mean for the 74 open PRs
Survey at this branch's head: each PR's article diff applied to a scratch copy, a receipt generated with
record-accepted-edit.mjsand placeholder approvals, then the gate run.changed_image_alt_text(source-image-4andsource-image-1), because they reword image alt text.migration/section-repairs-20261108.json; that record would have to be retired in the same PR and reviewed on its own. That part happens without receipts too.reputation2(Distinguish reputation stars from rank (Reputation2) #147, Correct reputation weights and trade coverage #148, Clarify the first-year burn and bond boost #173),bisq-easy(Correct reputation weights and trade coverage #148, Clarify Bisq Easy payment and response rules #149),support-agent(Repair two restored section links #134, Correct support-data privacy guidance #138),neft/rtgs(Replace unfinished client trade-period placeholders #161, Correct Indian bank-transfer limit distinctions #166). Whichever merges second needs a rebase and a receipt chained on the first.mainonce this lands, so its receipt and the receipts file merge cleanly.Open questions for maintainers
allowed_roleslist would be a small addition).migration/accepted-edits.json; and whether to add the CI cross-check of recorded approvals against GitHub reviews.output_sha256check. Should they get receipts too?