Repository navigation
docs(book): generate the CLI, AQL function and refusal code references with a drift check - #6713
Open
rubentalstra wants to merge 23 commits into
Open
rubentalstra wants to merge 23 commits into
rubentalstra wants to merge 23 commits into
Conversation
Emergency access is a justification of the access policy, never a configuration key or a role; the audit category map's shipped_map is a field of the audit-categories register; the go-live checklist sets only keys [audit] has and points audit retention at ACCESS_POLICY.log_retention; the Codespaces sandbox runs PostgreSQL 19; and the party-binding breaking-changes page, which described an issuer shape the server refuses, is deleted with a redirect to the party-binding page.
How FerroEHR decides access sets out the parties and their relationships, token roles beside demographic grants, the patient's EHR_ACCESS settings, the controller's ACCESS_POLICY, purpose of use, consent and justified and emergency access, care relationships, the legal marks, and the decision of one request with its refusal codes, read from access_eval, access_policy, party_binding and the ITS-REST access layer. Security drops its copy of the step table and a stale upgrade note, and the pages that described the model in parts link to it.
…ng page The SUMMARY groups the pages into tutorials, how-to guides for integrating and for deploying and operating, reference, explanation and the compliance record, and the introduction routes integrators, clinician-facing app builders, operators and decision makers to their first pages. No file moves, so every published address stays.
The policy parties stay on Operational policy; roles, care relationships and representatives, the access policy with the admin registers, and the worked examples each get a page of their own, and every link into a moved section points at its new page.
Security, Audit trail, Operations, Authentication & access and Kubernetes & Helm each become a short page with the rest in pages of their own, so no page outside the compliance record runs past about 640 lines. Every link into a moved section is rewritten to its new page, and docs-claims checks the chart values on the two new operator pages too.
The stale-numbers gate refuses a hand-typed timing in a site source.
…-architecture # Conflicts: # website/book/src/SUMMARY.md # website/book/src/installation/kubernetes.md # website/book/src/installation/party-binding-migration.md # website/book/src/operational-policy.md
The sizing section moved to storage-sizing.md, so the guard that checks the book names the measurement command reads that page.
The policy examples are on Worked policy examples and the party mapping blocks on Authorization keys, so the two tests that run the book's examples read those pages.
Removal notes for keys earlier releases read, the RabbitMQ migration steps, the provenance history of v4 releases, issue numbers that only tell how a page came to be, and steady-state sizing figures from an earlier storage layout go; PostgreSQL documentation is cited at 19; the NEN 7513 record names ehds-logging.md for retention; the README backup link names the page the section moved to.
… habit The audit trail and shared-responsibility pages still described the removed [authz.professional] key; the access record names the professional a client acts for without it. Em dashes in prose become commas, colons, semicolons or parentheses, outside the compliance record's revision logs and the viewer pages, with the threat-model links following its renamed headings.
…-architecture # Conflicts: # website/book/src/SUMMARY.md
…re' into docs/delete-stale-book-content
Storage sizing is measured again on a pinned v6 image and PostgreSQL 19, and states that one run with its image digests and date in place of the earlier measurement trail: a vital signs version takes 14.0 KB, an update that commits the same content adds no node rows, and an access-log entry takes about 1.5 KB. The Helm upgrade steps move to Upgrades, which drops its v4 and v5 notes; Docker Compose and the admin API split their overlays and storage routes into pages of their own.
…-architecture # Conflicts: # website/book/src/SUMMARY.md # website/book/src/care-relationships.md # website/book/src/explanation/access-model.md # website/book/src/installation/config-auth.md # website/book/src/security.md
…re' into docs/delete-stale-book-content
…into docs/operator-docs-v6
The tutorial takes an integrator from a template upload through an EHR, a committed, read, updated and queried composition, a stale If-Match and a missing record. Each request is a marked http block, and the ferroehr-rest test book_examples_http runs them in page order against a fresh server, holding each to the status, header and JSON its marker names.
The ferroehr-server test cli_reference renders every visible command of the binary with its long help into website/book/src/reference/cli.md, and fails when the committed page differs from what the definition renders; an ignored test of the same module writes the page again.
The ferroehr-rest test reference_pages renders the built-in functions of openehr-query and the access refusal codes of the draft access terminology, with the status each refusal answers, into two book pages, and fails when a committed page differs from what the code renders.
…scan The banners the cli_reference and reference_pages tests render are text the generated pages carry, not this file's licence, so they sit in a REUSE-Ignore block as tools/config-reference's banner does.
rubentalstra
marked this pull request as ready for review
November 26, 2026 20:24
rubentalstra
enabled auto-merge
November 26, 2026 20:24
7 tasks
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 26, 2026
This branch has not been 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.
This PR adds generated reference pages, each with a check that fails when the page and the code drift apart.
reference/cli.md, Command-line referenceclapdefinition offerroehr_server::Cli: every visible command with its long helpferroehr-servercli_referencereference/aql-functions.md, AQL built-in functionsopenehr_query::ast::{String,Numeric,DateTime}Function::ALLferroehr-restreference_pagesreference/refusal-codes.md, Access refusal codesopenehr_rm::draft::access_control::terminology::Refusal::ALL, withis_invisibledeciding404or403ferroehr-restreference_pagesHow the check works. Each module has two tests:
#[ignore]d test writes the page:cargo nextest run -p <crate> --test it --run-ignored only <module>.I confirmed the drift test fails when the committed page differs. Each page carries an
@generated … DO NOT EDITbanner and the SPDX lines, and is markedlinguist-generated.The configuration reference was already generated (
tools/config-referencewithconfig-reference.sh). The problem types page was already held to the code byoverview::problem::the_book_documents_every_kind. The pages sit under Reference in the SUMMARY, andconfig-cli.mdlinks to the CLI page.Checked locally: both tests pass.
cargo clippy --all-targets -D warningsis clean forferroehr-serverandferroehr-rest.cargo fmt,comment-style.sh,docs-claims.sh,conformance-numbers.sh,mdbook-lintand a full-site lychee run with fragment checking all pass.The SPDX lines the tests render sit in a
REUSE-Ignoreblock, astools/config-referencedoes, so the REUSE guard reads them as page text.This PR is stacked on #6712, which is ahead of it in the merge queue.
Closes #6674