Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Proposal: "contract probe before build" verification rule + Algorithm claim 5 extended from prerequisites to contracts

Open schmetti-dev opened this issue 3 months ago • 1 comments

Proposal: a "contract probe before build" verification rule, and extending Algorithm claim 5 from prerequisites to contracts

What keeps happening (five reflections in seven days on one install, all schema 9):

  • A health-data integration was built from the provider's request docs; 22 tests were green over doc-modelled shapes; production returned null for every metric because the real response carried string-encoded integers and object-shaped dates no doc mentioned. One curl before writing the parser would have shown it.
  • A cloud uptime worker was deployed before its one platform limit was known; the first run went red and the cause was found by comparison, not by a probe.
  • A dashboard reported "stalled" and the run checked the latest measurement instead of probing every promised field; eight calls where two would have done.
  • A harness adoption was scoped before reading the consumer (bin/<tool>.ts) it had to plug into; the first ISA treated the wrong thing as the problem.
  • A test assumed process.env.HOME moves Bun's homedir(); it did not, and the test wrote into live memory. A ten-second probe printing the resolved path would have caught it.

Same root: documentation, type definitions and memory were treated as the contract; one live probe of the real thing would have refuted them before the build.

What exists today: LIFEOS/RULES/Verification.md rule 4 (reproduce before fixing) covers reported UI bugs; Algorithm claim 5 covers prerequisites (tokens, logins, service config, deploy targets). Neither names the response shape, the shipped consumer, or the environment assumption a build is about to lean on.

Proposed, as applied locally (LOCAL FIX 2026-08-23, happy to PR it):

  1. Verification.md rule 8 — Contract probe before build: before a parser, writer, test fixture or design is built against an external response shape, a shipped consumer's input contract, or an environment assumption, ONE live probe of that contract is captured first (a real request, a read of the consumer's actual handling, a printed resolved value) and the dependent claim cites it. Falsifier: evidence that is "per the docs" or a test over a hand-modelled shape, with no probe output in the transcript before the build step, fails the rule. Bypass: documentation-only builds are a Log bypass row with a reason (no credentials yet, endpoint not deployed, pure-additive), the shape claim 7 already uses. No new gate; VerificationGate's transcript-reading design is where teeth would go later.
  2. Algorithm claim 5 extended: "External prerequisites … AND external contracts (a response shape, a shipped consumer's input contract, an environment assumption the build leans on) were probed before execution — prerequisites for presence, contracts with ONE live probe that the dependent claim cites (Verification.md rule 8) …". Wording/guardrail change, so a PATCH (8.21.1) per the AlgorithmUpgrade bump table.

Text of both is in the install's own tree; if you want it as a PR against the release, say so and I will open one with the exact diff. Evidence here is paraphrased from the reflection corpus; no install-specific paths or names are included.

schmetti-dev avatar Aug 23 '26 05:08 schmetti-dev

Landed as Verification rule 8, "contract probe before build", with a falsifier and log-bypass rows. The Algorithm claim-5 wording is queued as a hypothesis for the next Algorithm patch (doctrine edits go through that lane). Next release. Thanks.

danielmiessler avatar Sep 03 '26 23:09 danielmiessler