From 538d84786c028e04b3d1863405fdc1b5d1c3783d Mon Sep 17 00:00:00 2001 From: evanchooly Date: Sun, 22 Nov 2026 19:28:04 -0500 Subject: [PATCH] Add an overall design document for the operator audits design/operator-audits-design.md describes how the built system works: the two halves and the files that connect them, the scenario and runner, the generated namespace and manifest, the audits module's packages and which are in production use, generation, candidates, legacy migration, weekly discovery, publishing and the capability-coverage path. The README, reference, plan and progress file link to it, AGENTS.md asks for it to be updated with any change to how the audits work, and the reference's discovery section no longer says the workflow files no issues. --- AGENTS.md | 5 + audits/README.md | 7 +- design/mongodb-operator-audits.md | 3 +- design/operator-audits-design.md | 409 ++++++++++++++++++++++++++++ design/operator-audits-progress.md | 3 + design/operator-audits-reference.md | 17 +- 6 files changed, 436 insertions(+), 8 deletions(-) create mode 100644 design/operator-audits-design.md diff --git a/AGENTS.md b/AGENTS.md index e7dbef3dad5..fc784e1fedf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,6 +55,11 @@ Rules: - When filing PRs, if a docs PR is needed, make sure the code PR and the docs PR each reference the other so the docs stay in sync +## Operator audits +- `design/operator-audits-design.md` describes how the operator audits (`audits/`, core's operator case runner and + the discovery workflow) work. A change to how they work updates it in the same PR, alongside the README, the + component reference and the progress file as they apply. + ## Git Operations - Never commit or push code without an explicit request from the user. - Once a task's PR has merged, clean up: remove its worktree, delete the local branch, and delete the remote branch if diff --git a/audits/README.md b/audits/README.md index 9acafd38dfc..e8b308d696b 100644 --- a/audits/README.md +++ b/audits/README.md @@ -2,9 +2,10 @@ Checks Morphia's aggregation, query and update operators against the MongoDB manual: which operators exist, which documented examples Morphia's tests cover, and whether Morphia builds and -runs each one exactly as documented. The [design](../design/mongodb-operator-audits.md) explains -why it works this way; the [component reference](../design/operator-audits-reference.md) -describes each part and its contract. +runs each one exactly as documented. The [design](../design/operator-audits-design.md) explains +how the parts fit together; the [component reference](../design/operator-audits-reference.md) +describes each part and its contract; the [plan](../design/mongodb-operator-audits.md) records +why the old audit was replaced and what remains. Nothing here runs during an ordinary build, fetches documentation implicitly, rewrites core's tests, or files issues. Every networked or writing step is a command you run on purpose. diff --git a/design/mongodb-operator-audits.md b/design/mongodb-operator-audits.md index 18a5e40cf27..39b1ec9d43e 100644 --- a/design/mongodb-operator-audits.md +++ b/design/mongodb-operator-audits.md @@ -9,7 +9,8 @@ The descriptive naming/identity contracts are implemented on the next stacked br Pinned raw-source acquisition for step 2 is implemented on `audits-pinned-sources`. Structured parsing, the coordinated naming backport and steps 3–7 remain planned. See [implementation progress](operator-audits-progress.md) for delivered behavior, -validation, review results, and the next checkpoint. +validation, review results, and the next checkpoint. How the built system works is described +in the [design](operator-audits-design.md), which is kept current as this plan is carried out. Evaluated on 2026-11-15 against Morphia commit `1ff98e9eebbf9bf81680d3cd4c85f33167ba20c6`. The upstream examples below were checked at MongoDB docs commit diff --git a/design/operator-audits-design.md b/design/operator-audits-design.md new file mode 100644 index 00000000000..c7825f9ca66 --- /dev/null +++ b/design/operator-audits-design.md @@ -0,0 +1,409 @@ +# Operator audits design + +How the operator audits work as they are built today. This is the map of the system: what each +part does, how the parts connect, and the rules they all follow. Other documents cover the rest: + +| Document | Covers | +| --- | --- | +| [audits/README.md](../audits/README.md) | Operating the audits: commands, the weekly report, troubleshooting. | +| [operator-audits-reference.md](operator-audits-reference.md) | Each component's contract in detail: inputs, outputs, exit codes, limits. | +| [mongodb-operator-audits.md](mongodb-operator-audits.md) | The migration plan: why the old audit was replaced, the target design, and the steps. | +| [operator-audits-progress.md](operator-audits-progress.md) | The progress log: what each PR delivered, and the work that remains. | + +This document describes the code on its branch, not the plan. A change to how the audits work +updates this document in the same pull request. When the migration finishes, it remains the +description of the finished system. + +## What the audits answer + +Morphia builds MongoDB aggregation stages and expressions, query filters, and update operators +through a typed Java API. The MongoDB manual documents each operator with runnable examples. The +audits answer three questions, and keep answering them as the manual changes: + +1. **Does each documented example have a test?** Every example on the current operator pages has + exactly one owner: a handwritten test, a converted legacy test, or a generated test. +2. **Does Morphia do exactly what the example documents?** A test builds the example with + Morphia's API and checks that the BSON Morphia sends matches the documented command, that it + behaves like the documented command on a real server, and that the results match the page. +3. **What changed upstream?** A weekly job finds new examples and operators Morphia cannot express, + and files them as issues. + +The audits module also has a capability-coverage path (which operators, contexts and versions the +manual declares, compared with Morphia's API). It is built and tested, but it has no accepted +production baseline yet, so nothing runs it on a schedule. See [Capability coverage](#capability-coverage). + +## Rules every part follows + +- **Explicit inputs, candidate outputs.** Every command takes its inputs as arguments and writes + a candidate. Nothing reads ambient state, such as the working directory or a previous run's + output. Accepted files change only through a separate, deliberate step: a promotion, an + `apply`, or a reviewed commit. +- **Ordinary builds stay offline.** A normal Maven build never fetches documentation, never runs + the audits module, and never needs it. Core's tests read only committed files. The audits module + joins the build only with `-Daudits`. +- **Strict comparison by default.** BSON types, numeric representation, key order and array order + all count. Any leniency is declared per case with its reason: a form rule, an ignored field, or + an unordered result. +- **Never loosen a case to make it pass.** When a documented example fails, it is either a Morphia + bug to fix or an exclusion recorded with evidence (the page is wrong, or the server cannot run + it). The generator never emits a weaker case. +- **Every disposition has evidence.** Exclusions, legacy-only cases, form rules and + reviewed names are all committed with the reason and the source they rest on, so the counts can + always be explained. +- **Deterministic output.** Outputs are sorted by stable identity and serialized the same way + every time. A second run with the same inputs reproduces the committed files byte for byte, and + offline tests check that. +- **Both mappers.** Every runnable case runs under Critter first, then reflection. + +## The two halves + +The system is split across two modules, connected only by committed files. + +```mermaid +flowchart LR + subgraph upstream[mongodb/docs] + P[operator pages] + end + subgraph audits[audits module: offline tools, run on purpose] + I[example inventory] + G[case generator] + C[candidate / integrate / promote] + M[legacy migration tools] + D[weekly discovery] + U[publisher] + end + subgraph committed[committed files] + K[audits/catalog/*.json] + S[scenario.json files] + J[generated test classes] + N[manifest.json] + end + subgraph core[core tests: ordinary build] + R[OperatorCaseRunner] + L[legacy fixture loader] + V[namespace and binding checks] + end + P --> I --> K + K --> G --> C --> S & J & N + M --> K & S + P --> D --> U --> GH[GitHub issues] + S & J --> R + N --> V + L --> R +``` + +- **The audits module** (`audits/`) holds the tools: it reads pages, inventories examples, generates + and converts cases, and files issues. It depends on core's sources and builds, but core never + depends on it. +- **Core's operator tests** (`core/src/test/`) run the cases. They read scenarios, the + manifest and the binding descriptor from the test classpath, and know nothing about pages or + catalogs. + +## Core: running a case + +### The scenario + +A case is one documented example, described entirely by a `scenario.json` (schema version 1): + +| Field | Holds | +| --- | --- | +| `name`, `title`, `context` | The qualified name (`aggregation/expressions/add/addNonIntegerValuesToADate`), the page's title for it, and the operator context. | +| `source` | The repository, commit, path and blob of the page it came from. | +| `collections`, `indexes`, `dataset` | The seed data, in extended JSON with exact BSON types. | +| `action` | The documented command: an aggregate pipeline, a find, or an update, with its collection. | +| `expected` | The documented results, either exact BSON or `printed`: the constraints mongosh's printed output proves (see below). | +| `comparison` | Result order, declared form rules, ignored fields and tolerance. | +| `requirements` | The minimum server version and topology. | +| `skipped` | Checks that do not run, each with its reason. | + +The name, not the test method's name, decides where the scenario lives. The runner never finds +fixtures by method name, ordinal or stack trace. + +### The runner + +`OperatorCaseRunner` takes a scenario and a function that builds the operation with Morphia's +API: `aggregate`, `find` or `update`. It checks three things separately, against a real server: + +1. **Serialization.** The BSON Morphia emits equals the documented action, strictly, after the + scenario's declared form rules are applied to both sides. +2. **Behavior.** The documented action, sent through the driver, and the Morphia operation run + against two identically seeded databases and leave the same results and collections. +3. **Published expectation.** Both results equal the documented results, or satisfy what the + printed results prove. + +Two kinds of leniency exist, and each is a declared, named rule rather than a loose comparison: + +- **Form rules** (`FormRules`) map spellings the server treats identically to one canonical + spelling, such as `{$eq: x}` and `x`, or the array and document forms of `$cond`. A rule applies + to both sides and needs a reason recorded in the form review. +- **Printed results** (`PrintedResults`) cover output the page shows the way mongosh prints it. A + printed `4` may be an Int32 or a Double, so it is a constraint, not a value. + +Both are Java ports of audits-module code (`FormEquivalence` and `PublishedComparison`). Golden +vectors under `generated/vectors/` hold the two implementations to the same verdicts. + +### Where cases live + +| Kind | Test | Scenario | +| --- | --- | --- | +| **Generated** | A class in `dev.morphia.test.generated.`, written by the generator. | `generated/fixtures////scenario.json` | +| **Migrated** | A handwritten body moved into the generated namespace, as a protected file. | Same as generated. | +| **Converted** | The unchanged legacy test method; `TemplatedTestBase` sees the scenario and routes the call through the runner. | The legacy fixture directory, which now holds only `scenario.json`. | +| **Legacy** | A legacy test reading `data.json`, `action.json` and `expected.json` through `TemplatedTestBase`. | None yet. | + +`generated/manifest.json` lists every case on the runner (name, kind, scenario, test) and every +file the generated namespace owns, with its SHA-256. A `GENERATED` file is rewritten by generation; +a `PROTECTED` one never is. `GeneratedCasesTest` checks the namespace against the manifest in both +directions, so an unlisted, missing or edited file fails the build. + +Legacy and converted tests are bound to their fixtures by `example-bindings.json`, which the +audits module captures from the test sources. `TestCoverageExtension` fails a test class whose +methods or fixture directories disagree with it. + +## The audits module + +### Packages + +| Package | Role | In production use | +| --- | --- | --- | +| `generate` | Example inventory, DSL bindings, case generator, candidates. | Yes | +| `repairs` | Legacy migration: lock inventory, form rules, conversion, the migration ledger, the manifest. | Yes | +| `publish` | `gh` transport, the idempotent publisher, discovery findings. | Yes | +| `shell` | Lowers mongosh source into typed commands and BSON through a pinned Rhino AST, without evaluating it. | Yes, through `repairs` | +| `semantics`, `published` | Strict BSON comparison, and comparison against printed results. | Yes, through `repairs` | +| `api` | Inventories Morphia's public API with the JDK compiler, used to verify bindings. | Yes | +| `bindings` | Captures which legacy test owns which fixture, and the descriptive-name backport. | Yes | +| `naming` | Descriptive example names, and the name registry reconciler. | Names: yes. Reconciler: not yet. | +| `rst`, `model` | The legacy line-based RST extractor. | Yes, until the structured parser replaces it | +| `sources`, `documents`, `discovery`, `scenarios` | Pinned Git source bundles, the Snooty parser adapter, capability discovery, structured scenario extraction. | Not yet | +| `coverage` | Capability catalog and plan contracts, coverage comparison, and `AuditJson`, the strict JSON codec every package uses. | `AuditJson`: yes. Comparison: not yet. | + +Each package with a command has a `*Main.kt` entry point, run through the exec plugin with +`-Daudits.mainClass`. The README lists the commands; the reference gives each one's contract. + +### Committed catalog + +`audits/catalog/` holds the reviewed inputs and the accepted outputs. The README's table lists +every file. The ones the running system depends on: + +| File | Written by | Read by | +| --- | --- | --- | +| `documented-examples.json` | `GenerateMainKt inventory` | The generator, discovery's diff, the publisher's new-example check. | +| `dsl-bindings.json` | Hand, reviewed | The generator, after verification against core's API. | +| `generation-review.json` | Hand, reviewed | The generator: which families to generate, and the exclusions. | +| `fixture-migration.json` | `FormMainKt migrate` / `convert` | The manifest, candidates, `rescenario`. | +| `cutover.json` | Hand, from failed conversions | The conversion completeness check. | +| `form-review.json`, `form-migration.json` | Review, then `FormMainKt capture` | Conversion, which carries the rules into each scenario. | +| `publication-policy.json` | Hand | The publisher: the labels and milestone for each finding type. | + +### Example inventory + +Every example on the current operator pages, with its owner, lives in `documented-examples.json`. + +1. `fetch.py local` collects the operator pages and their includes at one mongodb/docs commit + from a sparse Git clone. `fetch.py current` followed by `fetch.py pages` does the same through + the GitHub API, which rate-limits. +2. `GenerateMainKt inventory` extracts each page's examples and matches each one to an existing + fixture, by title or, if the title changed, by its action text. The matching uses the legacy RST + extractor, which is also how the fixtures were made. + +Each example gets one status: + +- **OWNED**: a handwritten, migrated or converted case covers it. +- **UNOWNED**: nothing covers it; the inventory keeps its source blocks so generation never needs + the page again. +- **UNNAMED**: it has no usable title, so it needs a reviewed name. +- **AMBIGUOUS**: its name collides with another. + +Generated cases never count as owners: generation derives them from the unowned examples on +every run. A page whose examples are in tested code snippets is skipped with a reason until the +snippet resolver exists. + +### Generation + +`GenerateMainKt candidate` turns each unowned example of the reviewed families into a scenario and +a test method: + +1. **Verify the bindings.** Each entry in `dsl-bindings.json` maps an MQL operator, as a stage or + an expression, to a Morphia factory by its exact erased signature, with the form its BSON takes + (`POSITIONAL`, `NAMED`, `PROJECTION` or `FIELDS`). The API inventory of core's current source + must contain every one; a stale binding stops generation. +2. **Lower the source.** `FormMigration.documented` turns the example's mongosh blocks into typed + seed data, an action and expected results, through `ShellPrograms`. +3. **Emit the call.** The emitter walks the pipeline. Every stage and operator node needs a binding, + and every value is emitted only in a form its parameter type accepts. The first node without a + binding makes the example a gap. +4. **Write the scenario.** `FixtureMigration.scenario` writes it in the same format a converted + case uses, ordered, with no form rules. + +Examples that are not generated are listed in `gaps.json`, each with its reason: + +| Gap | Means | Fix | +| --- | --- | --- | +| `UNBOUND` | A node has no binding: `stage $match has no binding`. | Add the binding. | +| `SOURCE_UNSUPPORTED` | The mongosh text does not lower, or the action is not a pipeline. | Parser or generator work. | +| `UNNAMED`, `AMBIGUOUS` | The example has no unique name. | Review a name. | +| `EXCLUDED` | A reviewed exclusion. | Its reason says what would lift it. | +| `PROTECTED_CLASS` | The operator's class holds a moved handwritten body. | Move the body or the case. | + +Only aggregation expressions are generated today. Stages, queries and updates need more bindings +and generator support for find and update actions. + +### Candidates, integration and promotion + +Generation never writes into the checkout. It goes through three steps, each refusing anything +it cannot verify: + +```mermaid +flowchart LR + A[candidate] -->|candidate.json + files| B[integrate] + B -->|attestation.json| C[promote] + C --> D[checkout] +``` + +- **candidate** regenerates the whole namespace (every ledger scenario, every generated case and + the manifest) into a new directory. `candidate.json` records the base revision, the manifest's + digest, and the hash of every file to write, delete or protect. +- **integrate** applies the candidate in a temporary worktree at its base, builds core, and runs + the owning tests under Critter, then reflection. It writes `attestation.json`, bound to the + candidate's hash, and `integration.log`. +- **promote** applies an attested candidate only to a checkout still at the same base, with the + same manifest and every protected file unchanged. It never overwrites a file the manifest does not + own, and it restores every original if any write fails. + +Regenerating a promoted tree produces no changes. + +### Legacy migration + +Core started with 555 legacy fixture directories, many guarded by `lock` files that stopped the +old audit from overwriting curated changes. The migration tools move them onto the runner without +losing what the locks protected: + +1. **Preserve.** `legacy-corpus.json` snapshots the original corpus; `legacy-bindings.json` and + `example-bindings.json` record which test owns which fixture. +2. **Name.** The name backport replaced ordinal `exampleN` names with descriptive ones from the page + titles (`name-backport.json`). +3. **Classify the locks.** `curated-repairs.json` categorizes every lock and exclusion, guided by + `repair-review.json`. +4. **Explain the differences.** For each locked fixture, the form review finds the historical page + it came from and the declared rules, numeric retypes or corrections that reproduce it exactly + (`form-review.json`, captured as `form-migration.json`). Never-locked fixtures are pinned to their + pages in `legacy-references.json`. +5. **Convert.** `FormMainKt convert` replaces a fixture's files with a scenario built from its + documented source, and records the move in `fixture-migration.json`. A case that converts but + fails a strict check is reverted and recorded in `cutover.json` as legacy-only, with the failing + check. + +Fixtures that no documented source reproduces stay on the legacy loader. The progress file tracks +how many remain. + +### Weekly discovery + +`.github/workflows/operator-discovery.yml` runs every Monday and on demand. + +**Discover job** (read-only token): + +1. It clones mongodb/docs sparsely and without blobs, limited to the operator pages and includes, + which avoids the API rate limit. +2. `audits/discover.sh` runs in a throwaway worktree of HEAD: + - it reinventories the pages, and `inventory.diff` shows the changes against the committed + inventory; + - it generates a candidate with the committed bindings and review, which writes `gaps.json`; + - it integrates the candidate under both mappers. +3. The job writes `summary.md` to the job summary and uploads every report. + +**Publish job** (may write issues, not contents): + +1. `PublishMainKt discovery` turns the reports into findings with `DiscoveryFindings`: + - `MISSING_BINDING`: one per unbound node, listing every example it blocks; + - `NEW_EXAMPLE`: an unowned example that is not in the committed inventory; + - `INTEGRATION_FAILURE`: the failing tests from the log. +2. The publisher files them in MorphiaOrg/morphia. + +Neither job commits or promotes anything. Accepting a changed inventory is a local, reviewed change +made with the same commands. + +### Publishing + +`Publisher` files findings as issues and is safe to rerun: + +- Each issue carries its finding's stable key in a hidden marker, so a recurring finding updates + its issue instead of creating another. +- The publisher owns only the text between its markers. It adds labels without removing any, sets + a milestone only when none is set, and never reopens or edits a closed issue. +- Before each create it writes its intent to a journal, so a lost response is reconciled, not + duplicated. The journal is carried between scheduled runs, because GitHub's issue listing can lag + a recent create. +- Labels and the milestone come from `publication-policy.json`. A label that does not exist stops + publication. + +`GhGateway` is the only route to GitHub. It runs `gh` with an explicit repository and a cleaned +environment. A report-only gateway cannot spawn a mutating command, and a publishing gateway can +only create or edit issues. Trial runs go to a disposable sandbox repository, never +MorphiaOrg/morphia. + +### Capability coverage + +The structured path is built, but not yet in production use. It goes from pinned sources to a +coverage report: + +```mermaid +flowchart LR + S[sources: pinned Git bundle] --> D[documents: Snooty AST] + D --> C[discovery: capability catalog] + D --> X[scenarios: structured extraction] + A[api: Morphia API inventory] --> V[coverage: comparison] + C --> V + PL[reviewed coverage plan] --> V + V --> P[publisher: MISSING_API, VERSION_ANNOTATION] +``` + +- **sources** captures exact Git objects into a verified bundle. +- **documents** runs MongoDB's own Snooty parser, at a pinned commit and lockfile, in an isolated + Python runtime with network and file access confined. +- **discovery** normalizes the AST into a capability catalog: operators by context, facets, version + lifecycle events, and the evidence for each. +- **coverage** compares the catalog with a reviewed plan and the API inventory. It reports missing + APIs and wrong version annotations, and never treats a partial result as proof that something + is absent. + +Two pieces are missing before this path replaces the legacy extractor and runs on a schedule: an +accepted production baseline for the plan, and a resolver for tested code snippets. Until then, +example extraction uses the legacy RST extractor described above. + +## Testing the audits + +- **Offline tests** (`./mvnw -Daudits -pl audits verify`) need no MongoDB, docs checkout, `gh` or + token. They use small synthetic fixtures. They also recheck the committed catalogs against fresh + captures from the tree, so a stale binding catalog, repair inventory, manifest, ledger or + form report fails. +- **Parser tests** run the pinned Snooty adapter's regressions and the Kotlin coordinator + integration. They skip unless the isolated parser runtime is supplied. +- **Sandbox tests** (`-Daudits.sandbox=OWNER/REPO`) run the gateway and publisher against a real, + disposable repository. +- **Core's tests** run every case on the runner, plus `GeneratedCasesTest`, + `ExampleBindingsTest`, the golden-vector tests and the runner's self-tests, under both mappers. + +`.github/workflows/audits.yml` runs the offline and parser tests on pull requests that touch the +audits module or core's operator tests. + +## Transitional parts + +These exist only until the migration finishes. The plan says what retires each one. + +- **The legacy fixture loader** in `TemplatedTestBase`, for fixtures not yet on the runner. +- **The legacy RST extractor** (`rst/`, `model/`), which the example inventory and conversion use. +- **`FormMainKt` conversion commands and their review files**, needed while legacy fixtures remain. + +## Keeping this document current + +Update this document in the same pull request as any change to: + +- what a component does, or how the components connect; +- the scenario, manifest or catalog formats; +- the workflows; +- the rules above. + +Move a component from "Not yet" to "Yes" in the package table when it enters production use, and +remove a transitional part when it retires. Command syntax and per-component limits belong in +the README and the reference; progress and remaining work belong in the progress file. diff --git a/design/operator-audits-progress.md b/design/operator-audits-progress.md index 9713a9c7b8b..075a786793b 100644 --- a/design/operator-audits-progress.md +++ b/design/operator-audits-progress.md @@ -11,6 +11,9 @@ migration (step 4); #4545 `audits-case-rules` → #4546 `audits-printed-constrai #4564 `audits-discovery-issues`. Nothing is merged; merging is the user's. Use `git worktree list` to locate the checkouts on this machine. +The [design](operator-audits-design.md) describes how the built system works. A PR that changes +how the audits work updates it too; this file records what each PR delivered. + ## Current status at a glance (2026-11-22) Every step of the plan (0–7) has been started. What stands: diff --git a/design/operator-audits-reference.md b/design/operator-audits-reference.md index 82429eddfb2..0a4abdbe509 100644 --- a/design/operator-audits-reference.md +++ b/design/operator-audits-reference.md @@ -2,7 +2,8 @@ What each component of the [operator audits](../audits/README.md) module does and the contract it keeps. The module README is the operating guide; this page is the detail behind it. The overall -design is [mongodb-operator-audits.md](mongodb-operator-audits.md). +design is [operator-audits-design.md](operator-audits-design.md); the migration plan is +[mongodb-operator-audits.md](mongodb-operator-audits.md). ## Corpus inventory @@ -660,6 +661,13 @@ again until resolved. Keep the journal between runs: an issue it knows is read b GitHub's listing can lag a recent write. `AUDITS_GITHUB_TOKEN`, when set, is the token `gh` uses. `PublisherSandboxTest` runs the publisher against the sandbox repository (`-Daudits.sandbox=...`). +`PublishMainKt discovery audits/catalog/documented-examples.json + OWNER/REPO [--publish]` files a discovery run's findings instead (`DiscoveryFindings`): +`MISSING_BINDING`, one per node the generator has no binding for, listing the examples it blocks; +`NEW_EXAMPLE`, an unowned example absent from the committed inventory; and `INTEGRATION_FAILURE`, +naming the failing tests from `integration.log`. The scheduled workflow restores the previous run's +journal before publishing. + ## Candidates, integration and promotion `GenerateMainKt candidate ` regenerates the operator-case namespace (every ledger @@ -703,6 +711,7 @@ throwaway worktree of HEAD: `summary.md` (also the job summary) lists the counts, skipped pages, gaps, and each example without a handwritten owner with its state. The job uploads every report for 90 days and fails -only when integration does. It never commits, promotes or files issues: accepting a changed -inventory is a reviewed change made locally with the same commands. Run it locally the same way; -the checkout is left untouched. +only when integration does. A second job, with permission to write issues only, files the run's +findings (see Publishing findings). Neither job commits or promotes: accepting a changed inventory +is a reviewed change made locally with the same commands. Run it locally the same way; the +checkout is left untouched.