Repository checks

Repository checks help maintainers detect changes that break source provenance, build and launch rules, dependency ownership, or maintained code conventions. They combine source inspection, tests of the detectors themselves, launcher fixtures, and observations of the checker container's own execution posture. Use this page to choose a check and understand a finding.

Choose the scope of the run

Run the focused target that covers the change. Use the full repository suite when changing shared checkers or source inventories, or when assessing the complete repository policy.

CommandScope
make test/repository/documentationHTML ownership, unique anchors, local links and stylesheet references.
make test/repository/operator-inputsLiteral Make inputs and the environment admitted to engine commands.
make test/repository/providerConsumer source and launcher conventions, import ordering, source inventories, Make hygiene and cache policy.
make test/repositoryThe complete repository_checks suite, including scientific provenance and build/source checks.

The targets launch the recorded checker image with networking disabled and selected source trees and Git data mounted read-only. The host launcher uses host Bash, Git and filesystem utilities to prepare metadata and scratch directories, then invokes the container engine. The supported checkout has an initialized upstream submodule and its Git object store under .git/modules/nmrnet. If required image or Git inputs are missing, follow the checker preparation instructions and checkout prerequisites. Checker Python and its tools run in the container; a host Python run is a different environment.

The launcher writes temporary metadata and inspection receipts under .work and creates a private engine-client directory under /tmp. It reads the checkout's Git metadata and writes a separate scaffold for the checker. Normal cleanup removes owned temporary directories after client retirement; failed admission or uncertain cleanup can retain evidence at the reported paths. The engine owns the checker container and its logs.

To inspect the declared launch command, use bash tools/container.sh --print test/repository. This preview uses a placeholder for the recorded checker image; actual image admission occurs when the checks run. Read-only mounts prevent container writes, but the host can still edit those files. Keep the inspected source stable during a run.

make test WHEELHOUSE=/path/to/shared-wheelhouse also runs unit tests and NMRNet consumer integration suites. The focused repository targets above do not include those other suites. Consult the package test guide for their purposes and the reproduction guide for numerical evidence.

What the checks examine

Launcher fixtures execute copied scripts against a finite engine double and inspect its recorded calls. The checker-container observations concern that invocation; scientific-worker and service behavior have their own execution tests.

Each detector has a defined inventory and a limited set of patterns it can recognize. A pass establishes the assertions that ran against the inspected inputs. Numerical equivalence, chemical accuracy, real model capacity and deployed API behavior require their corresponding execution evidence. Documentation link checks inspect local HTML; published content and rendered behavior need separate observation.

Handle a finding by its meaning

  1. Identify the blocked step. A missing image, unreadable source or failed checker launch means the run did not establish its checks. Resolve that prerequisite before interpreting the result as a code finding.
  2. Read the reported location and rule. Trace the detected pattern to the requirement and its consumer. A syntax match can identify a concern without proving that every similar expression has the same meaning.
  3. Choose the correction. Fix a real regression at its owner. Where a detector supports an annotation, a reviewed explanation can record an intentional local contract within that annotation's narrow scope. For a detector mistake, add a small counterexample and retain cases that must still fail.
  4. Check the affected behavior. Run the relevant focused tests and the affected check again. Report what ran, what it established, and any remaining limit.

Preserve the requirement when revising a check. Removing a source path, skipping a failing assertion, or changing an independent numerical reference merely to obtain a pass changes the obligation. A check can also be revised or retired when its requirement no longer applies: explain the ownership or product change and preserve still-relevant coverage at its proper owner. The Use/Avoid criteria record the broader intent: scientific fidelity, explicit ownership, useful diagnostics and meaningful evidence.

Annotation syntax and placement belong to each detector. For example, Python silent-default contracts require a nonblank reason and cover specific expression boundaries; they do not grant a blanket exception to a function or permit fallback for environment or command-line inputs. The quality-check reference records those boundaries. Human review determines whether the explanation actually preserves the requirement.

Maintain the checks with the code

When adding an authored source root, update the source-inventory owner and its tests so the new tree is visible to the applicable scans and container grants. Keep the independently owned upstream submodule separate from local code conventions; scientific source checks verify its declared closure.

When changing a detector, preserve positive and negative examples of the actual requirement. When adapting a borrowed check, retain its exact source reference and explain the local ownership or semantic difference. The three crosswalks below record those decisions; historical import counts are not targets for the number of tests to run.

Implementation and port references

The command and execution descriptions above follow these source locations at revision 43b613ff36851a176184d57ae1af8a3d7607c431: