Observation field / Recorded value and meaning
Observation field Recorded value and meaning
Written rule Same-key retry before 24 hours returns the original reservation and creates no second one; SW-REQ-241, revision 1, author-supplied teaching draft, not approved customer intent
Retention setting and retry time Shortened 12-hour retention; retry-at-12h supplies elapsed time 12 hours
Actual setup and retry reserve("client-key-1", 0), then reserve("client-key-1", 12)
Required response and stored IDs Exact integer 1 identifies the original reservation; complete ordered rows [[1]] mean only that reservation exists
Observed response and stored IDs Exact integer 2 identifies a second reservation; complete ordered rows [[1],[2]] mean the original and duplicate both exist
Interpretation Setup and retry both ran. The retry created a forbidden second reservation inside the promised period.

Recorded on 28 October 2026 with CPython 3.14.7 and SQLite 3.53.4, using numeric clock input and the same live in-memory connection. The draft supplies no oracle at or after 24 hours.

Inspect the raw 12-hour-retention report

01 / Establish the expected behavior

What makes a test requirements-based?

A test oracle supplies the basis for judging an observation. Its justification must come from the intended behavior: a requirement, contract, specification or relevant domain decision. Merely copying the implementation's comparison into a second function gives the same choice another spelling. The oracle survey's author-repository abstract explains this distinction between desired behavior and potentially incorrect observations.

Three questions must remain separate:

Question / Evidence to examine
Question Evidence to examine
Why should this result occur? Exact requirement, origin, interpretation and approval state.
Did this check exercise and observe the intended operation? Harness mapping, identified implementation, call evidence and raw observations.
What decision does that result support? Scoped comparison, remaining gaps, freshness and acceptance authority.

Use this method when a written rule describes a calculation, rejection, state transition or time-dependent promise. Define the relevant state and units before writing the assertion. NASA's test-procedure guidance supports recording concrete steps, inputs, expected outcomes, configuration and results.

This guide's task is justifying the expected result and connecting it to an actual observation. Assertion sensitivity, selection of partition representatives, verification planning and result reporting have separate guides. The internal reservation key used here is not an HTTP Idempotency-Key contract.

02 / Start with the complete record

Free requirement-to-observation worksheet

Copy the blank record and repeat its case block as needed. It works as plain text, without Proof, an account or JavaScript. Record uncertainty explicitly; an unknown expected result must not become a default pass.

Blank record

REQUIREMENT-TO-OBSERVATION RECORD

A. IDENTITY AND AUTHORITY
Record ID / revision / author / review owner:
Decision this record must support:
Requirement ID / revision:
Exact requirement text:
Origin / author / parent source / source revision:
Approval status / approving authority / decision evidence:
Accountable policy owner / assigned person or queue:
Ambiguous conditions:
Resolved decisions / rationale / authority / decision reference:
Unresolved decisions / owner / next decision trigger:

B. DOMAIN AND SETUP
Named implementation entrypoint / signature:
Harness or adapter entrypoint:
Inputs / types / units / feasible domain:
State before operation / dependencies / preconditions:
Clock source / origin / elapsed-time definition / selected values:
Representation, ordering and tolerance assumptions:
Setup, reset and cleanup / isolation between cases:
Model assumptions / model-to-implementation differences:
Excluded behavior and its responsible owner:

C. CASE AND INDEPENDENT ORACLE [repeat for each case]
Case ID / kind: valid, reject, boundary or characterization:
Requirement clause challenged / reason for selecting this case:
Exact input / state / operation sequence:
Expected complete response / exact types:
Expected relevant stored effects / forbidden effects:
Observation order / permitted normalization or tolerance:
Oracle source / derivation independent of implementation:
Oracle reviewer / review record / authority status:
Unresolved expectation, if any:
Verdict eligibility: comparison permitted or NO ORACLE:
Reject-case applicability / specified rejection and unchanged state:
Boundary rationale / selected representable values and units:
Limits on any representative or wider-class inference:

D. IMPLEMENTATION AND HARNESS BASIS
Implementation revision / source and executable hashes:
Configuration, schema, dependencies and data identities:
Harness / oracle / model / runner revisions and hashes:
Input mapping: case field -> actual argument / setup operation:
Observation mapping: real return / state query -> assertion:
Grounding method / exact target identity / expected calls:
Grounding observation / raw reference / method limits:
Sensitivity control / seeded fault / expected detection:
Actual control result / evidence reference / limits:

E. EXECUTION [repeat for each actual run]
Evidence class: fresh execution, archive, analysis or proposed work:
Run identity / UTC start and finish / executor:
Working directory / actual interpreter or executable:
Runtime / platform / versions / settings / prerequisites:
Exact command and selection:
Raw stdout / stderr / reports / traces / hashes:
Observed complete response / types / relevant stored state:
Expected versus actual comparison:
Harness validity / requirement verdict / unresolved cases:
Child exits / wrapper exit / what each exit means:
Counting units / selected cases / invocations / excluded denominator:

F. FAILURE, CORRECTION AND SAME-CASE REPLAY
Retained failing case / original expected and observed values:
Diagnosed mechanism / evidence supporting that diagnosis:
Correction actually implemented, or PROPOSED / UNPERFORMED:
Changed source or configuration identity:
Same-case replay command / environment / raw result:
Oracle unchanged, or separately authorized requirement revision:
Related checks performed / checks still unperformed:

G. HISTORY AND FRESHNESS
Historical source revisions / tool identities / original raw records:
Historical observation units and interpretation:
What fresh evidence adds / what it does not update:
Requirement, oracle, source, configuration or harness change triggers:
Runtime, schema, clock, dependency or selection change triggers:
Reuse assessment / reviewer / rationale / rerun decision:

H. CONCLUSION AND ACCOUNTABLE NEXT ACTION
Result supported for this exact basis:
Unsupported wider-class or production claims:
Missing / failed / unresolved / unperformed work:
Next action / accountable owner / assigned person / due trigger:
Requirement approval decision and evidence:
Change acceptance authority / status / decision reference:

Filled record: the reservation promise

Project roles remain unassigned because this fixture establishes no customer authority. Paths in the filled record are relative to the extracted evidence kit; the manifest and provenance retain supporting identities.

REQUIREMENT-TO-OBSERVATION RECORD: SW-REQ-241

A. IDENTITY AND AUTHORITY
Decision: Do the selected real retries satisfy the authored promise?
Record author: guide author; project review owner: UNASSIGNED.
Requirement ID: SW-REQ-241
Revision: 1; author-supplied teaching draft.
Exact requirement text:
A retry using the same key before 24 elapsed hours returns the original reservation and creates no second reservation.
Origin: original example author; preserved requirement.json.
Exact status: teaching-fixture intent, not an approved customer requirement
Approval / authority evidence: no customer or policy approval established.
Policy owner: accountable project requirement owner, UNASSIGNED.
Resolved teaching interpretation: 0 <= elapsed_hours < 24.
Unresolved: intended outcome at and after 24 elapsed hours.
The archive's description of new-reservation behavior at 24 is an
implementation convention, not approval. No new expiry policy is supplied.
Owner action: resolve authority and expiry policy before project adoption.

B. DOMAIN AND SETUP
Real callable: ReservationStore.reserve(key, now_hours), reservation.py.
Harness: harness.py -> main() -> run_case(config, case, adapter).
Each scenario constructs a fresh ReservationStore with one SQLite :memory:
connection, in one process/thread. No wall-clock waiting.
Setup: reserve("client-key-1", 0).
Setup must return exact int 1 and full ordered reservations rows [[1]].
ID 1 is a checked fresh-fixture precondition, not a universal product rule.
Inputs: string key "client-key-1" and injected numeric elapsed hours.
Honest retry: same key, case["retry_at_hours"], measured from setup.
Selected retry values: 0, 1, 12, 23, 23.5, 24, 24.5 hours.
Model basis: real method and database, with no substitute behavioral model.
The selected neighbors 23.5, 24, 24.5 are representable injected values.
They promise neither clock granularity nor exhaustive boundary coverage.
After observation, the profile hook is restored and the store is closed.
Reads use the same live connection; no reopened or durable state is observed.
Rejection behavior: not specified by this requirement.
Invalid types, parsing, negative/nonfinite times and validators: untested.
HTTP headers/endpoints, original HTTP-response replay, payload conflicts,
network retries, concurrency, replicas, restart, disk durability,
SQL-failure atomicity and production clock behavior: not established.

C. CASES AND INDEPENDENT ORACLE
Literal oracle source: cases.json, explained in contract.md.
Derivation: checked initial ID 1 + original identity + no second reservation.
No expected value reads retention config or copies the expiry comparison.
Customer oracle approval / project reviewer: UNRECORDED.

Case ID            Hours  Expected response / ordered rows  Selection reason
retry-now          0      exact int 1 / [[1]]               included lower bound
retry-at-1h        1      exact int 1 / [[1]]               early retry
retry-at-12h       12     exact int 1 / [[1]]               premature expiry witness
retry-at-23h       23     exact int 1 / [[1]]               late in-window retry
retry-at-23.5h     23.5   exact int 1 / [[1]]               fractional in-window retry
observe-at-24h     24     NO ORACLE                        exact excluded endpoint
observe-at-24.5h   24.5   NO ORACLE                        selected later observation

For the first five cases, any second reservation violates the draft.
Expected output is the whole returned integer, not merely equality to a
possibly wrong setup result. Exact integer types and complete rows are checked.
At 24/24.5, null expected fields mean unresolved, not an expected null return.
Internal retry_keys rows are diagnostic; no stability requirement is asserted.

D. IMPLEMENTATION AND HARNESS BASIS
Fresh A/B/C are configuration/run labels: 24/12/24 retention hours.
They use identical original implementation bytes, not three source revisions.
Essential SHA-256 identities:
reservation.py:
9e0dcf39f02417a58af0537d84278b70ab2fe21737f1ac419b240b1bae2de345
harness.py:
bde2d0728499180fca500438a96270f764d51edf864c1b03ab0546d445777c03
cases.json:
2ebc3bf0a97c01e18421fec52ee8bff25e306216fcf2498c473ae9384869e880
requirement.json:
6bd89b0b06ea4b306e157e5da4a4a34fe1c82e2bba5551795690e7749d77bc95
snapshots/A.json and snapshots/C.json:
29340be45c6beddf962c1d95f565d70ecdd955bf4d51aab8b29a5087a18af27e
snapshots/B.json:
13ff044d8a30fcc0f72f970c861468b631438da9b60a22ee1a9d7f8a1cf7a86a
contract.md and reproduce.py identities: manifest.json and SHA256SUMS.

Input mapping: import ReservationStore from reservation; construct from
config["retention_hours"]; pass KEY and case["retry_at_hours"] directly.
State observation: SELECT id FROM reservations ORDER BY id
The harness queries store.db directly, independently of adapter output/count().
It compares the literal whole return and every ordered reservation row.
Grounding: sys.setprofile matches the actual imported reserve code object:
frame.f_code is the actual imported ReservationStore.reserve.__code__
It records setup/retry phases, key, time arguments and returned values/types.
Source/function/bytecode fingerprints accompany every observed case.
Honest cases require the two declared entries and two returns.
This is bounded invocation evidence, not branch coverage, universal mapping
correctness, oracle approval or a run of Proof's grounding check.

Sensitivity control: B at 12, adapter skip_retry.
Setup runs; the adapter returns cached first ID without calling retry.
Actual apparent output: int 1; actual reservation rows: [[1]].
Business comparison: true. Actual entries: setup only.
Grounding: false. Verdict: invalid_harness. Child exit: 1.
Control is deliberately seeded; no production harness bug is claimed.

E. FRESH EXECUTION AND RAW RECORDS
Replay prerequisites: CPython 3.12+ with standard-library sqlite3;
normal optimization, assertions enabled, no existing profile hook.
This is a prerequisite, not an executed version matrix.
The new wrapper needs no Git, Proof, network service or signup.
Primary capture:
2026-10-28T15:03:40.689290+00:00 to 2026-10-28T15:03:41.016305+00:00.
Runtime: CPython 3.14.7; SQLite 3.53.4; Darwin/arm64.
Actual child interpreter: /opt/homebrew/opt/python@3.14/bin/python3.14
Settings: optimize=0; debug=true; initial profile hook absent.
Observed connection settings: autocommit=-1, isolation_level="",
in_transaction_after_retry=false. Original source uses runtime defaults;
it does not explicitly pin those settings.

Captured working-directory basis: the portable fixture directory.
Reproduce from the extracted kit root with this portable command template:
python3 -B reproduce.py --output NEW_OUTPUT_DIRECTORY
NEW_OUTPUT_DIRECTORY must not exist. Keep each replay's own provenance.
Recorded portable forms of the actual child commands:
python3 -B harness.py --snapshot A --adapter honest
python3 -B harness.py --snapshot B --adapter honest
python3 -B harness.py --snapshot C --adapter honest
python3 -B harness.py --snapshot B --adapter skip_retry

Raw stdout: observed/A.stdout.json, observed/B.stdout.json,
observed/C.stdout.json, observed/skip-retry-control.stdout.json.
Corresponding .stderr.txt files are retained and empty.
Wrapper output: observed/wrapper.stdout.json and observed/wrapper.stderr.txt.
Commands, actual interpreter, times, exits and output hashes:
observed/summary.json.
Primary summary SHA-256:
2cc8f5e3d95b37a1a4080f73bb804f88b6164a3199301fbbb191f4cf9c3a771a

A: 5 requirement passes; 0 failures; 2 unresolved characterizations.
B: 2 requirement passes; 3 failures; 2 unresolved characterizations.
C: 5 requirement passes; 0 failures; 2 unresolved characterizations.
All honest cases record setup and retry.
At 24 and 24.5 all three return int 2 with rows [[1],[2]];
these are diagnostic observations with no requirement pass/fail verdict.
Count units: 4 child gates; 21 honest scenarios + 1 control = 22 executions;
42 honest reserve entries + 1 control setup = 43 entries;
7 distinct selected retry-time values.
Child exits A/B/C/control: 0,1,0,1.
Wrapper exit 0 means the expected contrasts reproduced.
It does not mean B or the invalid harness passed.

F. FAILURE, CORRECTION AND SAME-CASE REPLAY
B fails at 12,23,23.5: expected int 1 / [[1]];
observed int 2 / [[1],[2]].
Mechanism: 12-hour retention makes the key unavailable to the retained
implementation's expires > now lookup within the 24-hour draft promise.
Implemented correction: restore retention configuration from 12 to 24.
No code patch; no changed oracle.
Same retry-at-12h in C: setup returns int 1; actual retry returns int 1;
complete rows [[1]]; grounding true; requirement verdict pass.
C also replays the other four requirement cases successfully.
Raw failure/replay: observed/B.stdout.json and observed/C.stdout.json.
All outputs describe the primary environment above; another replay needs
its own command, runtime, timestamp, fingerprints and raw output.

G. HISTORICAL BASIS AND FRESHNESS
44 original historical files are unchanged.
Historical summary timestamp: 2026-10-03T09:32:03.416073+00:00.
Original Git revisions:
A 33e282532163634bb0137fc66fa6fa3fab00c8fe
B 1cec89a6e69f7633e73a77e3dda945c332460f81
C 08721dd7cda04dc5a52519d2c18ae5e8f45f0c26
Synthetic Git dates are not execution timestamps.
Archived direct results: A 5/5, B 3/5, C 5/5.
Those five cases combine four in-promise times (0,1,12,23) with AT24's
implementation-convention expectation.
Inside the promise alone: A/C pass 4; B passes 2 and fails 2.
Historical Proof: proof 0.1.0-teaching-b845ff313bac;
source b845ff313bacb887c4e9fb78145c681a15f6b3f0.
Its binary identity, commands and raw results remain in
historical/results/summary.json and historical/results/{A,B,C}/.
Only configured tests_pass ran; A/C readiness not_assessed, B blocked.
All three evidenceRecords arrays remain empty.
Fresh profiling adds local call evidence; it does not populate archived
traced per-requirement execution or accept the archived Change.
No historical runner, Proof audit or package was rerun.

Freshness review triggers: changes to the requirement/authority, literal
oracle, selected domain/clock, source, retention config, schema, harness,
observation query, runner, runtime or relevant dependency.
Preserve the old record; assess impact and capture affected evidence anew.
Reuse for a different project or candidate: UNASSESSED.

H. CONCLUSION AND NEXT ACTION
Supported: the selected draft-requirement comparisons and seeded control,
for the exact implementation/configurations and primary environment recorded.
Not supported: all-time correctness, class closure, complete boundary
coverage, production behavior, customer approval or certification.
Unperformed: expiry-policy approval, project oracle/harness review,
out-of-scope execution listed in B, current Proof workflow execution,
and a project Change-acceptance decision.
Policy owner, UNASSIGNED: decide authority and at/after-24 intent before adoption.
Verification owner, UNASSIGNED: review the actual project's mapping and oracle;
obtain any required missing checks against its identified candidate.
Change owner, UNASSIGNED: obtain newly traced per-requirement execution
and an authorized acceptance decision; preserve the historical gap.
Acceptance authority: UNASSIGNED. Change acceptance: NOT ASSESSED.

03 / Inspect the failure and correction

A retention change violates the written promise

The retained implementation looks up a key with expires > now_hours. Here, “expired” means that the lookup no longer reuses that key; physical cleanup was not observed. When the lookup finds no retained key, it inserts a reservation, replaces the retry-key entry and commits. Its source is unchanged across the fresh A, B and C runs.

With retention set to 12 hours, setup at supplied hour 0 succeeds, but a retry at supplied hour 12 creates a duplicate, reservation 2. The literal oracle expects the original reservation 1 and exactly one reservation row because 12 is still inside the draft's 0 <= elapsed_hours < 24 promise. The same contradiction appears at 23 and 23.5 hours.

Recorded configuration and harness / Retention / Five requirement cases / Separate diagnostic cases / Child exit
Recorded configuration and harness Retention Five requirement cases Separate diagnostic cases Child exit
Original setting (A), honest harness 24 hours 5 pass, 0 fail 24 and 24.5 unresolved 0
Shortened setting (B), honest harness 12 hours 2 pass, 3 fail 24 and 24.5 unresolved 1
Restored setting (C), honest harness 24 hours 5 pass, 0 fail 24 and 24.5 unresolved 0
Shortened setting (B) at 12 hours, seeded skip-retry control 12 hours Invalid harness evidence No expiry cases selected 1

Restoring retention from 12 to 24 is the implemented configuration correction. The restored setting (C) replays the same five requirement cases against the same source and literal expectations. At 12 hours, the real retry returns the original reservation, integer 1, with only its stored row, [[1]].

Inspect B's failure · Inspect C's replay · Get the runnable evidence kit

Show that the harness reached the operation

The honest path in harness.py imports the original ReservationStore, calls reserve for setup and retry, and queries every reservation ID directly in order. A profile callback matches the imported method's actual code object and records call arguments and returns.

The deliberately bad skip_retry adapter calls setup and returns its cached ID. Its output-and-state comparison looks correct because the promised retry never happened:

12-hour retention, retry at 12 hours / Apparent retry response / Stored reservation IDs / Observed method entries / Verdict
12-hour retention, retry at 12 hours Apparent retry response Stored reservation IDs Observed method entries Verdict
Honest harness 2: second reservation [[1],[2]]: original and duplicate Setup and retry Requirement failure
Harness that skips the retry 1: cached original ID [[1]]: only the original Setup only invalid_harness

The control report demonstrates sensitivity to that particular omission. Python's profile API supplies call/return observations for this single-thread harness; it does not measure every executed line or branch. Source review and this control support the declared mapping, without establishing correctness of arbitrary adapters or approving the oracle.

Preserve the policy gap at expiry

At 24 and 24.5 hours, all three configurations return 2, a second reservation, and produce ID rows [[1],[2]], containing both reservations. The fresh reports label these cases characterization_unresolved. Their expected fields are null because the requirement supplies no outcome oracle.

The selected values 23.5, 24 and 24.5 hours are representable neighbors chosen for inspection. They establish neither a promised clock granularity nor a universal boundary-coverage percentage.

Reproduce the captured contrasts

Read the README, inspect the runner, and compare the ZIP with its SHA-256 checksum. Extract the kit, then run from its root:

python3 -B reproduce.py --output NEW_OUTPUT_DIRECTORY

Replace NEW_OUTPUT_DIRECTORY with a path that does not exist. Use CPython 3.12+ with standard-library sqlite3, normal optimization and no existing profile hook. Assertions must remain enabled. The new wrapper needs no Git, Proof, network service or signup.

The primary capture used CPython 3.14.7, SQLite 3.53.4 and Darwin/arm64 on 28 October 2026. The summary retains its interpreter, times, commands, output hashes and child exits 0,1,0,1. Wrapper exit 0 means those expected contrasts reproduced. The 3.12+ prerequisite is not an executed compatibility matrix; your replay needs its own output and provenance.

State comes from the same live :memory: connection. The captured defaults are autocommit=-1 and isolation_level="", with no active transaction after retry. The original source does not explicitly pin transaction mode. Python's transaction documentation explains these settings; SQLite's connection-lifetime documentation bounds the state observation. No reopened database, disk durability, restart, concurrency, SQL-failure or production-clock behavior was tested.

Technical history: keep the result and its qualification

The 3 October archive retains direct counts A 5/5, B 3/5 and C 5/5. Each includes four inside-window cases at 0, 1, 12 and 23 hours, plus an implementation-convention expectation at 24. Inside the promise alone, A/C pass four; B passes two and fails two. Those original records remain unchanged.

Archived Proof used pinned source b845ff313bacb887c4e9fb78145c681a15f6b3f0 and only the configured tests_pass check. The actual packages retain A: not_assessed , B: blocked and C: not_assessed , all with empty evidenceRecords arrays. Fresh local traces do not supply the missing archived per-requirement execution records or accept that Change. No original runner, Proof command or package was rerun.

Follow the requirement through six steps

Download the complete video transcript.

Read the complete video transcript

The author's draft promises that a same-key retry before twenty-four hours returns the original reservation without creating another. It is teaching intent, with no customer approval. The five requirement times are zero, one, twelve, twenty-three and twenty-three-and-a-half hours. Twenty-four and twenty-four-and-a-half produce second reservations but remain diagnostic, with an unresolved oracle. These selected values promise no clock granularity.

Each scenario starts a fresh in-memory SQLite store. Time is supplied numerically, without waiting hours. Honest setup and retry use the unchanged reservation method. The literal expectation is integer ID one, the original reservation, and the complete ordered row list containing only that reservation. The primary run used CPython 3.14.7 and SQLite 3.53.4. State is read through that same live connection. No HTTP, concurrency, restart or production-clock behavior was tested.

The original and restored settings, A and C, retain keys for twenty-four hours and each pass five requirement cases. The shortened setting B retains them for twelve, passing two and failing three: twelve, twenty-three and twenty-three-and-a-half hours return ID two, a second reservation, with rows one and two showing both original and duplicate. Restoring retention to twenty-four is the executed configuration correction; C replays the same cases.

The deliberately bad harness skips the retry and returns the cached setup ID. At B's twelve-hour case, output and actual rows look correct. The observer matches the real method's code object and records only setup, making the harness invalid. Honest execution records setup and retry. Call evidence does not establish branch coverage.

Write both expectations from the promise: return the original reservation and create no second one. Do not copy the implementation's expiry comparison. Confirm that setup and the real retry ran before comparing their actual response and stored effects.

Assign the intended behavior at and after twenty-four hours to the policy owner. Name who will review the project's requirement, oracle and harness, and who can accept the change. Those decisions remain unperformed here.

Read the text walkthrough

1. Establish the promise

The author's draft promises that a same-key retry before twenty-four hours returns the original reservation without creating another. It is teaching intent, with no customer approval. The five requirement times are zero, one, twelve, twenty-three and twenty-three-and-a-half hours. Twenty-four and twenty-four-and-a-half produce second reservations but remain diagnostic, with an unresolved oracle. These selected values promise no clock granularity.

2. Observe the real operation

Each scenario starts a fresh in-memory SQLite store. Time is supplied numerically, without waiting hours. Honest setup and retry use the unchanged reservation method. The literal expectation is integer ID one, the original reservation, and the complete ordered row list containing only that reservation. The primary run used CPython 3.14.7 and SQLite 3.53.4. State is read through that same live connection. No HTTP, concurrency, restart or production-clock behavior was tested.

3. Correct the configuration

The original and restored settings, A and C, retain keys for twenty-four hours and each pass five requirement cases. The shortened setting B retains them for twelve, passing two and failing three: twelve, twenty-three and twenty-three-and-a-half hours return ID two, a second reservation, with rows one and two showing both original and duplicate. Restoring retention to twenty-four is the executed configuration correction; C replays the same cases.

4. Challenge the harness

The deliberately bad harness skips the retry and returns the cached setup ID. At B's twelve-hour case, output and actual rows look correct. The observer matches the real method's code object and records only setup, making the harness invalid. Honest execution records setup and retry. Call evidence does not establish branch coverage.

5. Write expectations and verify the calls

Write both expectations from the promise: return the original reservation and create no second one. Do not copy the implementation's expiry comparison. Confirm that setup and the real retry ran before comparing their actual response and stored effects.

6. Assign the unresolved decisions

Assign the intended behavior at and after twenty-four hours to the policy owner. Name who will review the project's requirement, oracle and harness, and who can accept the change. Those decisions remain unperformed here.

04 / Make the check repeatable

How to turn one requirement into an observed result

  1. Identify the authority. Copy the exact requirement and revision, its source and approval status. Assign each ambiguous condition to an accountable owner. Exploratory execution can proceed with explicit uncertainty; it cannot resolve a policy decision by itself.
  2. Declare the domain and setup. Name inputs, units, valid state, clock origin, dependencies and reset rules. Include rejection and boundary behavior only where a requirement supplies it. Record unsupported conditions as gaps.
  3. Write the oracle before using the observed result. Specify the complete required response and relevant stored effects, including forbidden changes. State exact types, ordering and justified tolerances. Keep the derivation separate from implementation logic.
  4. Review both harness mappings. Follow each input into the actual callable and each observation into the assertion. Confirm source/configuration identities and inspect any adapter, normalization or model simplification.
  5. Challenge the evidence path. Choose a plausible wrong implementation or harness shortcut and state how the check should reject it. Record a seeded control separately from a discovered defect. Successful detection supports only the fault actually challenged.
  6. Capture, correct and replay. Retain the command, runtime, raw output, state, trace and exit meanings. Preserve a contradiction before correcting it. Rerun the same case with its original oracle, then the affected checks; give any intended requirement change its own revision.
  7. Write the conclusion and next action. State the exact supported observation, unresolved cases and unperformed work. Assess changes to the evidence basis before reuse. Name who must resolve policy, obtain missing evidence and decide acceptance.

The worksheet keeps those decisions together. NASA's traceability guidance connects requirements with design, code and verification. Our methodological conclusion from the worked control is narrower: a link alone cannot establish that the relevant operation ran or that its oracle is adequate.

05 / Check before relying

Requirements-based test checklist

  • Exact requirement text, revision, origin and approval state are recorded.
  • Ambiguities have owners; unresolved outcomes are outside the pass denominator.
  • Inputs, initial state, time units and reset assumptions are explicit.
  • Each case has a requirement-based reason and an independently justified oracle.
  • Required responses and stored effects are actually observed.
  • The harness reaches the identified implementation with the declared arguments.
  • Sensitivity controls have recorded outcomes and bounded interpretations.
  • Commands, versions, configuration, raw results and exit meanings are retained.
  • Failure and same-case replay remain inspectable on their respective bases.
  • Freshness, wider claims and acceptance have separate dispositions and owners.

06 / Catch errors in the record

Mistakes that make a precise test misleading

Mistake / Why it weakens the result / Repair
Mistake Why it weakens the result Repair
Refresh expected values automatically from a new run An implementation change silently rewrites the acceptance basis. Review the requirement first; preserve the old failure and version any authorized oracle change.
Let one case inherit another's state The assertion depends on hidden execution order. Declare the intended sequence or reset the fixture between independent cases.
Inspect only a convenient subset of relevant state A correct response can coexist with an unobserved extra effect. Define and observe the complete state relevant to the promise.
Turn diagnostic metadata into a required invariant Tests constrain an internal detail the requirement never promised. Separate diagnostic fields from contract assertions.
Overwrite a failed run when replaying the correction The discrepancy and its original basis become difficult to review. Use a new output directory and link the two records.
Treat matching hashes as approval Content identity is mistaken for authority over intended behavior. Retain an actual decision record with its authorized owner.

07 / Keep product capabilities bounded

Use Proof with a reviewed oracle and harness

These command templates describe the inspected current implementation; they were not executed for this guide. Use a real project's SPEC and COMPONENT. The portable reservation kit is not a formalized Proof project.

proof testgen SPEC COMPONENT --engine heuristic
proof testgen SPEC COMPONENT --check-stale

Generation produces vectors. The heuristic path writes Boolean signals and expected_holds values. It selects the component, excludes retired, superseded and rejected requirements, then requires nonempty FRETish guarantees and successful structure parsing. A requirement ID can be listed even when parsing produces no cases. Draft and review status do not imply approved intent. FLIP uses a different compilation path; the heuristic's exact eligibility rule does not describe every engine.

Kind2 is the CLI default. If that default is implicit and Kind2 is unavailable, the inspected code warns and falls back to heuristic. Explicitly selecting unavailable Kind2 produces an error. Neither path makes generated vectors into application responses, stored effects or executed assertions.

Staleness reporting has a limited exit meaning. --check-stale reports existing fixture staleness without regeneration. It can exit 0 while issuing stale warnings; finding no tc-*.json files can also produce no stale rows. Its formalization-input fingerprints are scoped. Exit 0 establishes neither suite presence nor complete freshness.

Grounding does not approve an oracle. The inspected obligation_witness_grounded implementation includes a disabled-check skip, evidence-type exemptions, absent-target not-applicable handling and static symbol-reference grounding without executing that witness. Suspects can proceed through suite attribution and per-witness coverage. An annotation or execution overlap does not validate the full model-to-product mapping or the independent business expectation. The local profiler control above did not run this Proof check.

Follow the grounding guide when that checker is the next part of your review.

08 / Choose evidence for the question

Which testing method should you use?

Choose the method after identifying what remains uncertain.

Your immediate uncertainty / Useful method / Evidence still needed
Your immediate uncertainty Useful method Evidence still needed
The requirement permits multiple interpretations Requirement review with its policy owner A recorded decision or an explicitly unresolved oracle. More generated cases cannot choose the policy.
A concrete operation should produce a known response and state Direct cases through the actual callable Literal expectations, reviewed setup, real observations and identified execution basis.
Many feasible inputs should obey one stated rule Property-based or generated-input testing A justified property, generator domain, implementation adapter and retained executions. A finite campaign remains finite.
A temporal or logical model should satisfy a property Model or solver analysis within declared assumptions Model/property identities and results, plus a reviewed connection to implementation. Model satisfaction alone is not a product run.
The claim concerns a real environment, restart or overlapping calls A procedure that actually exercises that condition Agreed behavior, a suitable environment and new execution evidence. The local reservation kit supplies none of these results.

For one requirement, a versioned text record and repository test may suffice. Add a larger workflow when it helps another engineer retrieve the oracle, actual assertion, raw observation and unresolved decision. The primary sources support these methodological choices; the related guides cover broader selection and planning.

09 / Inspect the basis

Primary sources and reproducibility

Engineering sources

Source / Support and limit
Source Support and limit
Barr, Harman, McMinn, Shahbaz and Yoo, The Oracle Problem in Software Testing: A Survey Author-repository metadata and abstract: desired behavior, observations and sources of oracle information. No full-paper review or automation success statistic is claimed.
NASA Handbook Ver D, SWE-065 Test plans, procedures, tests and reports; concrete inputs, expected outcomes, configuration and retained results. Engineering guidance here, not a claim of NASA applicability or certification.
NASA Handbook Ver D, SWE-052 Relationships among requirements, design, code and verification. The distinction between a recorded relationship and an adequate oracle is our inference, illustrated by the control.
Python 3.14, sqlite3 Connection and transaction semantics. The served documentation labels 3.14.10; primary execution was 3.14.7. Documentation access is not another run.
Python 3.14, sys.setprofile Call/return frames, returned values and thread-specific scope. No line/branch coverage or arbitrary harness-equivalence claim.
SQLite, in-memory databases The lifetime and private connection scope of unadorned :memory:. No disk or restart-persistence conclusion.

Executable artifacts

The evidence kit is 77,605 bytes, with 68 regular files at the kit root and its subdirectories. Its SHA-256 is:

0e39631ef0d958587dcb3fb7f42c1d952f0b1535308765ac03c011748f5435b8

Use the separate ZIP checksum, member manifest and SHA256SUMS for identity checks. Hashes identify bytes; they do not establish execution or acceptance.

Current product source basis

The Proof descriptions use the 28 October 2026 source inspection of nine files and fifteen regions. Generation, filtering and staleness were checked in cmd/proof/testgen.go, pkg/solver/testgen.go, pkg/solver/staleness.go and pkg/model/requirement.go. Grounding was checked in pkg/workflow/workflow_obligation_witness_grounded.go. The editable intake was checked in website/demo.html and website/assets/engagement-intake.js. The retained reservation and historical verification sources complete that inspection.

The inspection record identifies file bytes and hashes, with recorded worktree HEAD b566a01085f0233c0be2c71508a2d3caac0cf47a and audit SHA-256 ff0e411e21be95b1c03ed2eca92d29da37b39430998c49f40f6e21f5f895af45. HEAD alone does not identify uncommitted worktree bytes. This is source inspection, separate from the historical pinned Proof run; no current generation, staleness or grounding command was executed.

10 / Apply the method elsewhere

Two more requirement-to-oracle decisions

These are newly authored illustrative situations. Neither has an execution result or project approval.

1. A rounding tie has no oracle yet

Suppose draft ROUND-01 says, “Round an exact decimal amount to the nearest cent.” Input 2.345 is equally near 2.34 and 2.35. The draft has not chosen a tie rule.

Record both candidate outcomes and assign the decision to the requirement owner. Also specify decimal representation and when rounding occurs. A language function's answer cannot choose the intended policy. The next useful artifact is a resolved rule, followed by literal cases for ties and ordinary values.

2. A Boolean model omits a state transition

Suppose illustrative ACCESS-01 says, “A revoked badge must not unlock the door, even if previously recognized.” A model containing only recognized cannot represent revocation.

The proposed test sequence must establish a recognized badge, invoke the actual revocation operation, then attempt access from an initially locked door and observe that it remains locked. Add the missing state and its implementation mapping before relying on generated vectors. This is a proposed check; no door, controller or repository test was exercised.

11 / Resolve remaining questions

Requirements-based testing questions, answered

Must a different person write the expected result?

Independent justification is about the source of the expectation. One engineer can derive an oracle from an authoritative requirement without copying the implementation. Record who reviewed that derivation and any separation of roles required by the project. A second author or model does not itself make the requirement approved.

Can an oracle use a relation instead of one literal result?

Yes, when the requirement defines that relation. For an intentionally variable output, specify permitted variation and the invariant that must still hold. Review any normalization or tolerance so it cannot hide a forbidden effect. This reservation fixture has a deterministic starting state, so its whole integer and ordered-row expectations remain literal.

What if my replay uses a different Python or SQLite version?

Keep the original capture and create a separate run record with your actual versions, settings, source hashes and outputs. Bytecode fingerprints can differ across runtimes. Compare the observations within their respective bases; do not silently replace the primary provenance or turn one replay into a tested version matrix.

When can a passing example support a wider class?

Only with an additional argument about the declared domain and why the chosen evidence represents it. Record the model, assumptions, exclusions and remaining checks. The selected reservation times establish their observations; they do not establish every time value or every retry implementation. Use the partitioning guide for representative selection.