Skip to main content
Browse the documentation

observedrev 76d59fbdocs/contracts/probes.md

Contract: probes

Label: specified (rules), implemented (records and execution in src/point.mjs).

Shape

probe { id, point, applies, summary, check }
id       kebab-case, unique within a probe list
point    one of: shape | behavior | consistency | operational
applies  a subject name ('seed'), or '*' for a cross-family probe
summary  non-empty; what the probe guarantees when it passes
check    a function: (subject, subjects) → { ok, message? } — deterministic code

For a named probe, the check receives its subject { namespace, pkg } or null. For a '*' probe, the check receives the whole subjects map. Every check may consult subjects; only cross probes depend on more than their own.

Rules

  1. The check is a function. A probe record without a function is not a probe. Hooks in the tooling fabric established the shape rule; probes inherit it: checks are code the author wrote, deterministic, never prose, never a model call.
  2. Fail closed on throw. Executing a probe turns an exception into a failed result carrying the error’s message, in full, for the report. A probe is never skipped because it threw, and a throw never becomes a pass.
  3. One point each. A probe names exactly one point. The multi-point discipline is that shape, behavior, consistency, and operational stay separate all the way to the report; a probe that “sort of” checks two points is two probes.
  4. Dedicated subjects. A named probe applies to exactly one subject. Cross-family questions — agreements between peers — are '*' probes, and they declare themselves by their applies.
  5. Summaries state the guarantee. “The forget bumps the epoch and fails stale projections closed” is a summary; “tests the memory” is not. A reader of the report should know what every pass certified.
  6. A claim is probed from the version that made it. A behavior a member added after its first release is held by a probe that names that version. Against a checkout whose VERSION is older, or that declares no x.y.z version, the probe is unknown and names both versions: probing a claim the subject never made would be a superset (see below). Against a checkout at or past that version the claim is held in full, and a subject that cannot honor it fails.

Execution result

runProbe(probe, subjects) → { id, applies, point, subject, status, detail }
runProbeAsync(probe, subjects) → Promise of the same result
status   'pass' | 'fail' | 'unknown'
detail   the message that says why
  • pass — the check returned ok: true.
  • fail — the check returned ok: false, or it threw; the detail carries the message or the error.
  • A check may return a promise when the claim it holds is asynchronous. runProbeAsync awaits it, and a rejection is a fail like a throw. runProbe does not wait: it records unknown, naming runProbeAsync, because it did not observe the outcome.
  • unknown — the subject is absent (a named probe whose subject is null), or the check returned { unknown: true, message } for a reason it states, such as “grammar agreement needs both checkouts present” when one is missing.

An unknown is declared with its reason, carried to the verdict math, and never resolved by wishful re-reading of other results.

What a probe never is

  • Not a judge. A probe verifies claims and invariants; opinions about contract quality are review’s business.
  • Not a leak. A probe’s messages quote errors and results, never environment details — what ran matters, where it ran does not.
  • Not a superset. A probe checks what is claimed claimed. Probing things the subject never claimed is a defect in the probe, not a failure in the subject.

Changes

  • 0.8.0 — one versioned behavior probe checks seed 0.8.0’s registry-document check (seed-registry-documents-fail-closed). The probe passes documents held in memory and reads no file. A null agents document must be named agents in missing, and no entry in missing may contain a /. An agent whose allowedTools names a tool the tools document does not list must be an error, and a listed tool must not be. ok must be false in both cases. The check must leave the documents unchanged, and the unknown tool must appear in the result only as an error, so the result grants nothing. A seed checkout older than 0.8.0 reads unknown. No existing probe changed, and seed was not edited.

  • 0.7.0 — three versioned behavior probes check the following contracts.

    • Seed 0.7.0 stops a resume before execute for each of the four abort codes, reports aborted with the code, keeps completed steps skipped and the rest not_reached, and refuses an abort together with a dry run (seed-abort-skips-execution). The probe holds the four codes itself.
    • Drosera 2.1.0 leaves a notice naming the approver for a review to promoted move and the reason for a move to deprecated, and refuses a draft to review pair (drosera-lifecycle-notice-names-its-move).
    • Drosera 2.2.0 reads a skill document with all nine required headings into a draft record that skill() accepts, and refuses a document missing any one of them (drosera-skill-document-needs-every-heading). The probe holds the nine headings itself.

    A checkout older than each version reads unknown for that probe. No existing probe changed, and no peer was loosened.

  • 0.6.2 — probe fix for drosera 2.0.0, which promotes a skill only through review and lists five lifecycle states. For a drosera checkout at 2.0.0 or later, the probes move a draft to review before promoting it, and drosera-skill-record-and-lifecycle expects intake, draft, review, promoted, deprecated and checks that a draft is not promoted directly. Older checkouts are probed as before. Before the fix, drosera-catalog-public-skills threw on the refused direct promotion, and the record probe reported the five states as drift. Drosera was not loosened, and no probe was added.

  • 0.6.1 — probe fix for drosera 1.0.0, which requires triggers, inputs, outputs, examples, and sources on every skill. The skill input the probes build carries those lists for a drosera checkout at 1.0.0 or later, and drosera-skill-record-and-lifecycle checks that a skill missing any of them is refused. Before the fix, four drosera probes and vendor-list-agreement failed because the probes built a 0.5.0 skill. Drosera was not loosened, and no probe was added.

  • 0.6.0 — six versioned behavior probes check the following contracts.

    • Seed 0.6.0 fails a step that reports an unknown failure class, keeps a known class on the failed step, and adds no class in a dry run (seed-failure-class-honest).
    • Capillary 1.2.0 refuses a fused search score and returns an untrusted empty list when nothing matches (capillary-search-refuses-fused-score).
    • Capillary 1.3.0 refuses an absent thread conversation and declares thread cuts (capillary-thread-declares-cuts), orders a recent list by the caller’s recency and refuses a moved epoch (capillary-recent-uses-caller-recency), leaves an absent brief class null and gives a recency tie to the later record (capillary-context-brief-invents-nothing), and keeps a missing trace start missing (capillary-trace-keeps-missing-start).

    A checkout older than each version reads unknown for that probe. No existing probe changed.

  • 0.5.0 — seven versioned behavior probes check the following contracts.

    • Seed 0.5.0 reports a dry run without executing steps.
    • Capillary 1.0.0 requires evidence classification on recorded sources, and 1.1.0 returns an untrusted bounded-read envelope.
    • Myosotis 1.0.0 refuses model-inferred personal provenance, and 1.1.0 bounds recall and checks the reported counts.
    • Aestivation 0.5.0 refuses correction scope expansion before changing the lineage.
    • Drosera 0.5.0 exposes only promoted MIT skills in its catalog.

    The existing digest and consent probes supply the metadata that each subject requires as of 1.0.0. Earlier and absent subjects remain unknown for new claims.

  • 0.4.0 — runProbeAsync, and familyGridAsync in the grid, await asynchronous checks; the bundle runner uses them. runProbe and familyGrid keep their results for every synchronous check and record an asynchronous one as unknown. Seven probes hold the newer member claims from the versions that made them: seed 0.3.0 resume, leases, and caller admission; capillary 0.3.0 separate relevance and recency and the deletion-epoch refusal; aestivation 0.4.0 read-only intent and corrections. The resume and epoch probes are asynchronous.

  • 0.3.0 — probes speak each member’s call shape by its declared version. From myosotis 0.4.0 a forget is sent as a confirmed, keyed request; from drosera 0.4.0 a skill is built with procedure, guardrails, and verification. Earlier versions keep the earlier shapes, so their results do not move. Two new behavior probes hold the 0.4.0 claims from that version: myosotis-forget-confirmed-and-keyed and drosera-skill-record-and-lifecycle. Older checkouts read unknown for both.

  • 0.2.0 — rule 6, the version gate, implemented as since() in src/probes.mjs. Eleven probes hold claims the members made after 0.1.0, each from the version that made it, and the cross probe vendor-list-agreement holds drosera’s vendor list against seed’s forbidden segments. A grid over checkouts older than those versions reads unknown where it read pass: those claims were not probed before, and they are not probed now, but the report now says so.