Lynn Lee / LABS

Study, predict, break, repair

A reading path connected to a real nested-array contract change. Predict each result before running the probe.

Published archives and pinned standards, verified against primary sources. No planned or speculative 2026 course is presented as available. Lab exercises are original; they are not solutions to university assignments. Public reading access does not confer enrollment, grading, certificates or textbook access.

Verified: 2026-11-14 Asia/Shanghai · Structured resource registry (JSON)

Start with a runnable experiment

The producer widens a nested quantity range from 0–8 to 0–9. The existing reader still allows at most 8. Twenty-four unrelated optional fields reproduce the old search truncation problem.

Open the editable workbench → · Synthetic input bundle · Download offline kit

Unzip the kit, change into its directory, then run the commands below with Node 18+. No installation, key, model call or network is needed. The kit contains only the public exercise engine, original probes and their case-specific oracle.

node run.mjs all
node run.mjs U04
node run.mjs U05 --out repaired-check.json
node run.mjs replay --bundle nested-input-bundle.json --out contract-report.json --csv errors.csv

For your own edit-and-repair loop, edit nested-input-bundle.json: change new.schema.properties.records.items.properties["quantity/unit~"].maximum from 9 to 8, then rerun the replay command. Leave the six probe inputs unchanged: their assertions describe the original exercise, while replay runs your edited bundle.

Six learning units

Every unit links a specific course reading or lecture to an original exercise. Running a probe checks a stated expectation; completing the edit-and-repair workbench steps is the learning task.

U01 · Identify the language before judging a contract

Separate an interface promise, a data model and its validation language.

Load Nested contract repair. Add pattern to the quantity schema and run. Predict an input error, then remove it. DCL/1 rejects unsupported keywords.

Read: Reading 6, Part 1: Specifications — Behavioral equivalence; Specification structure; Testing and specifications; Lecture 01: Relational Model & Algebra — Sections 3–4, PDF pages 2–3: data model, schema, domains, integrity constraints and NULL; JSON Schema Draft 2020-12 — Pinned comparison reference; DCL/1 is not an implementation of this dialect

Expected observation: Unsupported keyword is rejected. No claim of JSON Schema, Pact or ODCS conformance is made.

node run.mjs U01

U02 · Partition absent, null and typed values

Test existence and value constraints independently. SQL NULL is background; JSON absence is a separate state.

In the new item's quantity schema, change type to ["integer","null"]. Rerun: null is now allowed; the missing-key row still fails. Then remove the quantity name from that item's required list and rerun.

Read: Lecture 01: Relational Model & Algebra — Sections 3–4, PDF pages 2–3: data model, schema, domains, integrity constraints and NULL; Reading 3: Testing — Choosing Test Cases by Partitioning; Blackbox and Whitebox Testing; Automated Testing and Regression Testing; Understanding JSON Schema: object — Required Properties; Additional Properties; Understanding JSON Schema: null — null is a present value, distinct from an absent property

Expected observation: Required + nullable accepts null but rejects absence; optional + non-nullable does the reverse for those two states.

node run.mjs U02

U03 · Predict both compatibility directions

Use set inclusion to explain why widening producer outputs can break an existing reader.

Reload the nested scenario, run, and open the witness. New maximum 9 is accepted by the producer; the old reader allows at most 8. Trace /records/0/quantity~1unit~0.

Read: Reading 7: Designing Specifications — Stronger vs. weaker specs; RFC 6901: JavaScript Object Notation (JSON) Pointer — Section 3: ~0 and ~1 escaping

Expected observation: New → old: verified counterexample. Old → new: proven inclusion. A wildcard concern path is not the concrete array index in a replay diagnostic.

node run.mjs U03

U04 · Make an independent counterexample oracle

Follow a failing nested branch without losing it behind unrelated sibling samples.

Run U04 offline. Inspect exercises/oracle.mjs: it uses case-specific predicates, not the engine validator. Reverse the property order in a copied corpus case and rerun.

Read: Reading 3: Testing — Choosing Test Cases by Partitioning; Blackbox and Whitebox Testing; Automated Testing and Regression Testing; Reading 16: Recursive Data Types — Introduction; Part 1: Recursive Data Types

Expected observation: 15 known small separating cases are found; the identical control is proven; a compatible enum case and an oversized witness remain not-proven. These finite cases do not establish completeness.

node run.mjs U04

U05 · Repair a promise and replay the same rows

Distinguish producer acceptance, reader acceptance and an actual integration test.

Reload. Set the new item's quantity maximum from 9 back to 8 and rerun. As a separate agreement experiment, reload and change only the consumer maximum to 9. No consumer implementation is executed.

Read: Reading 6, Part 1: Specifications — Behavioral equivalence; Specification structure; Testing and specifications; How Pact works — Consumer testing; Provider verification; Non-HTTP testing (Message Pact)

Expected observation: Producer repair proves new → reader, but five archived rows still fail both producer contracts. The initially fixed row meant only new-producer acceptance; it still broke the existing reader.

node run.mjs U05

U06 · Export evidence and check source fidelity

Record the exact checked contracts and separate structure from factual correctness.

After the producer repair, export JSON, CSV and readable HTML. Compare summaries and paths; no raw batch IDs should be present. Run U06: an authored extraction has legal quantity 5 while its source says 6.

Read: Reading 3: Testing — Choosing Test Cases by Partitioning; Blackbox and Whitebox Testing; Automated Testing and Regression Testing; Pact Specification — File metadata and specification versions; this Lab does not emit Pact files or run Pact verification; ODCS v3.1.0: Fundamentals — Definitions: apiVersion; version

Expected observation: The repaired result survives JSON round-trip; CSV diagnostics match the report. A structural pass does not establish extraction fidelity. This is an offline semantic counterexample, not an LLM benchmark.

node run.mjs U06

Run and inspect

These results are computed on click in this browser, not fetched from a stored run. The offline extraction case in U06 demonstrates a legal structure with the wrong source fact; no model is evaluated.

Observed regression and honest limits

The saved baseline (engine 1.0.0) missed 7 known small counterexamples; engine 1.1.0 finds all 15 small separating cases in this 18-case corpus. The compatible-but-unproved and oversized controls remain not-proven. The oracle is a separate set of case-specific predicates; the corpus is finite, authored and cannot prove completeness or production safety.

Sanitized actual-run evidence

Search the verified sources

All resources shown

Massachusetts Institute of Technology · 6.005 Software Construction

Spring 2016 · mit-6005-s16 · published-archive

2016 classic; specifications and testing transfer to this Lab, while its Java/Eclipse setup is historical.

Official course archive

Prerequisites: No numbered prerequisite was found on the checked OCW syllabus. The Getting Started page requires quickly learning basic Java. Basic programming, JSON, functions, recursion; Node 18+ for the optional offline exercises. Evidence

OCW readings, calendar and assignment statements; selected readings require no login.

Access vs enrollment: Reading the selected OCW material is free and requires no registration. This is an archive, not MIT enrollment or a credential. Original course grading and institutional services are not provided by this Lab.

Verified on 2026-11-14

Carnegie Mellon University · 15-445/645 Intro to Database Systems

Fall 2025 · cmu-15445-f25 · published-archive

2025 archive, already published. Only the relevant data-model material is selected; this Lab does not teach or implement BusTub.

Official course archive

Prerequisites: CMU 15-213/513; the syllabus also requires C++17 programming for the full course projects. For Lecture 01 here: basic data types, sets and constraints. The full systems prerequisite is not required for our small JSON exercise. Evidence

Archived schedule, lecture slides and lecture notes; selected PDF notes are readable without login. Textbook chapters are not redistributed here.

Access vs enrollment: The selected archived notes are public without payment or registration. University enrollment, grading, course services and textbook purchase are separate; this page offers none of them and quotes no tuition price.

Verified on 2026-11-14

Reading 6, Part 1: Specifications

mit-spec · mit-6005-s16 · reading

Behavioral equivalence; Specification structure; Testing and specifications

· published-archive · verified 2026-11-14

Reading 3: Testing

mit-testing · mit-6005-s16 · reading

Choosing Test Cases by Partitioning; Blackbox and Whitebox Testing; Automated Testing and Regression Testing

· published-archive · verified 2026-11-14

Reading 7: Designing Specifications

mit-strength · mit-6005-s16 · reading

Stronger vs. weaker specs

· published-archive · verified 2026-11-14

Reading 16: Recursive Data Types

mit-recursion · mit-6005-s16 · reading

Introduction; Part 1: Recursive Data Types

· published-archive · verified 2026-11-14

Lecture 01: Relational Model & Algebra

cmu-model · cmu-15445-f25 · lecture-notes

Sections 3–4, PDF pages 2–3: data model, schema, domains, integrity constraints and NULL

· published-archive · verified 2026-11-14

Fall 2025 course schedule

cmu-schedule · cmu-15445-f25 · schedule

Lecture 01, August 25; confirms the lecture identity and public notes

· published-archive · verified 2026-11-14

JSON Schema Draft 2020-12

json-schema-version · JSON Schema · standard

Pinned comparison reference; DCL/1 is not an implementation of this dialect

Draft 2020-12; specification documents published 2022-06-16 · published · verified 2026-11-14

Understanding JSON Schema: object

json-object · JSON Schema · official-tutorial

Required Properties; Additional Properties

· published · verified 2026-11-14

Understanding JSON Schema: null

json-null · JSON Schema · official-tutorial

null is a present value, distinct from an absent property

· published · verified 2026-11-14

RFC 6901: JavaScript Object Notation (JSON) Pointer

pointer · IETF / RFC Editor · standard

Section 3: ~0 and ~1 escaping

April 2013 · published · verified 2026-11-14

How Pact works

pact-how · Pact Foundation · official-tutorial

Consumer testing; Provider verification; Non-HTTP testing (Message Pact)

· published · verified 2026-11-14

Pact Specification

pact-spec · Pact Foundation · specification

File metadata and specification versions; this Lab does not emit Pact files or run Pact verification

V4 reference; per-language support must be checked separately · published · verified 2026-11-14

Pact Open Source Update — May 2022

pact-v4-release · Pact Foundation · release-note

V4 Pact Specification

V4 already announced in May 2022 · published · verified 2026-11-14

Open Data Contract Standard

odcs · Bitol · standard

Schema, quality, responsibilities and service commitments exceed this Lab's value-schema scope

v3.1.0 (pinned, not a claim of latest) · published · verified 2026-11-14

ODCS v3.1.0: Fundamentals

odcs-fundamentals · Bitol · standard-section

Definitions: apiVersion; version

apiVersion v3.1.0 vs. a data contract's own version · published · verified 2026-11-14

DCL/1 remains its own restricted language. No standard validator was substituted. JSON Schema Draft 2020-12, Pact V4 and ODCS v3.1.0 are distinct references, with distinct formats and migration requirements.