# P16 reproducibility record

Status: internally accepted bounded computational result at `abd655f`

Manuscript-review status: AGY round 1 returned `MINOR REVISIONS`; author
corrections are applied and terminal review of the corrected digest is
pending.

Date: 23 July 2026

## Evidence identity

The manuscript's accepted result is tied to:

| Item | Value |
|---|---|
| Accepted source | `abd655f4db31f1e0a9e78de8bbe83c71805f46c7` |
| Parent baseline | `377d3836e456788f6b419550757c97abd79cf9be` |
| Acceptance commit | `907914f` |
| Capability set | `slice-1` |
| Accepted corpus | 24 fixtures under `fixtures/cases` at `abd655f` |
| Accepted Haskell report SHA-256 | `d4725f04d8e3c908c3d11030936d4fdfeab9f174ed0b8b829f4c7c7316b33a6f` |
| Release record SHA-256 | `db2405a744da9eaf4b9d029e99234a13dc10f233848d4b2bc1cf9ebdefae3d84` |
| Review SHA-256 | `a9f8debc972623accb4ae9cc8edcf5e353752e9bbdc438093890969192a77c95` |
| Later accepted Slice 4 source | `056915834fcc2f172a4a72efe3629f4f753e45cf` |
| Author-audit working-tree base | `e2f7cd7` plus uncommitted Slice 5 changes |

The current working tree contains an uncommitted, unreviewed Slice 5 candidate.
Reproduce the accepted Slice 2 result from its Git object, not from the current
working tree. Slice 5 must not be promoted until terminal Claude code review
and release acceptance.

## Tools observed in the author pass

```text
cabal 3.16.1.0
ghc 9.14.1
rustc 1.94.0 (4a4ef493e 2026-03-02)
cargo 1.94.0 (85eff7c80 2026-01-15)
jq 1.8.2
latexmk 4.88
```

The Homebrew tool paths were `/opt/homebrew/bin/cabal` and
`/opt/homebrew/bin/ghc`. The release record explains why explicit paths are
used on the original verification host.

## Historical source extraction

Use an isolated archive extraction. This does not switch the repository's
branch or touch its index:

```sh
snapshot_dir="$(mktemp -d /tmp/catdb-p16-abd.XXXXXX)"
git archive abd655f4db31f1e0a9e78de8bbe83c71805f46c7 |
  tar -x -C "$snapshot_dir"
```

The author pass used:

```text
/tmp/catdb-p16-abd.HqWawn
```

Confirm the object identity:

```sh
git show -s --format='%H %P %cI %s' \
  abd655f4db31f1e0a9e78de8bbe83c71805f46c7
```

Expected:

```text
abd655f4db31f1e0a9e78de8bbe83c71805f46c7 377d3836e456788f6b419550757c97abd79cf9be 2026-07-23T00:14:49-06:00 add independent Haskell semantic oracle
```

## Historical Haskell gates

From `$snapshot_dir/haskell/catdb-reference`:

```sh
/opt/homebrew/bin/cabal check

build_dir="$(mktemp -d /tmp/catdb-p16-cabal.XXXXXX)"

/opt/homebrew/bin/cabal build all \
  -fstrict \
  --disable-documentation \
  --project-file=cabal.project \
  --with-compiler=/opt/homebrew/bin/ghc \
  --builddir="$build_dir"

/opt/homebrew/bin/cabal test all \
  -fstrict \
  --disable-documentation \
  --project-file=cabal.project \
  --with-compiler=/opt/homebrew/bin/ghc \
  --builddir="$build_dir" \
  --test-show-details=direct
```

The author pass used:

```text
/tmp/catdb-p16-hist-cabal.ffeDmp
```

All three commands exited zero. The test output contained:

```text
+++ OK, passed 250 tests.
+++ OK, passed 250 tests.
+++ OK, passed 250 tests.
+++ OK, passed 200 tests.
+++ OK, passed 200 tests.
+++ OK, passed 200 tests.
+++ OK, passed 200 tests.
summary implementation=haskell capability_set=slice-1 total=24 semantic-operation-pass=16 structural-only=8 failed=0
```

The seven properties therefore completed 1,550 successful trials. A passing
run is bounded property evidence, not proof.

## Standalone accepted Haskell report

Still from the historical Haskell package:

```sh
report_path="$(mktemp /tmp/catdb-p16-report.XXXXXX)"

/opt/homebrew/bin/cabal run \
  -fstrict \
  --disable-documentation \
  --project-file=cabal.project \
  --with-compiler=/opt/homebrew/bin/ghc \
  --builddir="$build_dir" \
  catdb-reference -- \
  fixtures verify "$snapshot_dir/fixtures/cases" \
  --capability-set slice-1 \
  --json-output "$report_path"

sha256sum "$report_path"
```

Expected report hash:

```text
d4725f04d8e3c908c3d11030936d4fdfeab9f174ed0b8b829f4c7c7316b33a6f
```

Audit its classifications:

```sh
jq '{
  implementation,
  capability_set,
  summary,
  all_round_trip: all(.cases[]; .round_trip),
  all_golden: all(.cases[]; .golden_match),
  semantic_nonnull:
    all(.cases[] | select(.classification=="semantic-operation-pass");
        .actual != null),
  structural_null:
    all(.cases[] | select(.classification=="structural-only");
        .actual == null)
}' "$report_path"
```

Expected Booleans are all `true`; expected summary is total 24, semantic 16,
structural 8, failed 0. The author output was byte-identical to
`coordination/releases/logs/slice-2-haskell-report.json`.

The current author-side report hash was the expected
`d4725f04d8e3c908c3d11030936d4fdfeab9f174ed0b8b829f4c7c7316b33a6f`.

## Historical Rust/Haskell comparison

From the extracted repository root:

```sh
CATDB_CABAL=/opt/homebrew/bin/cabal \
CATDB_GHC=/opt/homebrew/bin/ghc \
cargo run -p catdb-cli -- \
  fixtures compare fixtures/cases \
  --left rust \
  --right haskell \
  --capability-set slice-1
```

Expected final summary:

```text
summary left=rust right=haskell capability_set=slice-1 total=24 semantic-compared=16 structural-compared=8 disagreements=0
```

The command must exit zero. The accepted historical comparator builds the
Haskell package in its default package-local `dist-newstyle` directory inside
the isolated extraction and emits Haddock warnings because it does not pass
`--disable-documentation`. Those documentation warnings are not failures and
do not appear in the strict release build above.

## Later accepted Slice 4 boundary

Slice 4 was accepted at
`056915834fcc2f172a4a72efe3629f4f753e45cf`. Its retained release record
reports:

```text
summary left=rust right=haskell capability_set=slice-1 total=33 semantic-compared=16 structural-compared=17 disagreements=0
summary left=rust right=haskell capability_set=slice-4 total=33 semantic-compared=29 structural-compared=4 disagreements=0
```

The accepted Slice 4 Haskell suite contains 11 deterministic properties and
2,350 successful trials. All 13 migration cases are semantic under `slice-4`;
the two information-loss and two schema-diff cases remain structural. This is
later accepted evidence, not a revision of the Slice 2 result.

The author pass independently extracted `0569158` into
`/tmp/catdb-p16-slice4-src.mTkakH`, built in
`/tmp/catdb-p16-slice4-cabal.SqzEk5`, and retained temporary logs under
`/tmp/catdb-p16-slice4-gates.FATAWQ`. `cabal check`, strict build, strict
tests, and standalone `slice-1` and `slice-4` Haskell verification all exited
zero. The reproduced summaries were exactly `33/16/17/0` and `33/29/4/0`.

## Current Slice 5 candidate check

This check is separate from both accepted results. The current Cabal package
manifest is `catdb-semantics.cabal`, the package name is `catdb-semantics`,
and the executable remains `catdb-reference`. From `haskell/catdb-reference`,
use a new build directory:

```sh
candidate_build="$(mktemp -d /tmp/catdb-p16-slice5-cabal.XXXXXX)"

/opt/homebrew/bin/cabal check
/opt/homebrew/bin/cabal build all \
  --project-file=cabal.project \
  --with-compiler=/opt/homebrew/bin/ghc \
  --flags=strict \
  --ghc-options=-Werror \
  --builddir="$candidate_build" \
  --disable-documentation
/opt/homebrew/bin/cabal test all \
  --project-file=cabal.project \
  --with-compiler=/opt/homebrew/bin/ghc \
  --flags=strict \
  --ghc-options=-Werror \
  --builddir="$candidate_build" \
  --disable-documentation \
  --test-show-details=direct

/opt/homebrew/bin/cabal test \
  catdb-semantics:loss-and-diff-properties \
  --project-file=cabal.project \
  --with-compiler=/opt/homebrew/bin/ghc \
  --flags=strict \
  --ghc-options=-Werror \
  --builddir="$candidate_build" \
  --disable-documentation \
  --test-show-details=direct
```

The package-qualified focused command uses the new package name. Historical
Slice 2 commands above retain the historical package name and executable.

At this author-side boundary, the corpus contains 42 fixtures:

| Capability or selected set | Semantic | Structural |
|---|---:|---:|
| `slice-1` over full corpus | 16 | 26 |
| `slice-4` over full corpus | 29 | 13 |
| `slice-5` over full corpus | 42 | 0 |
| `slice-5` information-loss plus schema-diff subset | 13 | 0 |

The full current test command completed 13 property runs and 2,750 successful
trials: the accepted Slice 4 schedule's 11 properties and 2,350 trials, plus
the candidate suite's two properties and 400 trials. The focused suite
recomputes all 13 selected goldens and runs only those two candidate
properties for 200 trials each.

The author pass built under `/tmp/catdb-p16-slice5-cabal.aIdP4a` and retained
temporary logs under `/tmp/catdb-p16-gates.jhnZzZ`. `cabal check`, strict
build, strict `test all`, the package-qualified focused test, and standalone
Haskell verification for `slice-1`, `slice-4`, and `slice-5` all exited zero.
The candidate report SHA-256 values were:

```text
slice-1  6d2daa692c9b17354315385cf0e7449941e85a65eac5c50a5bf2dd6187dd36d2
slice-4  e45f6bca952dfbec8f6c1b8c4faa77ba78c93bd87326fec5e79b3225a12873ab
slice-5  a034ed5ac235b0beba93162efa51660d34e67c1b8f068d5375f63d34d13ed61e
```

These values are uncommitted and unreviewed. Passing author gates does not
make them accepted evidence.

The current candidate does not establish globally complete information-loss
analysis, arbitrary schema matching or merge, query or backend execution,
performance, or distributed semantics.

## Manuscript build

Build in a fresh directory so no PDF or auxiliary file is written into the
paper directory:

```sh
paper_dir="/Users/mlong/Documents/Development/CatDB-Research/papers/16-haskell-semantics"
manuscript_build="$(mktemp -d /tmp/catdb-p16-paper.XXXXXX)"
cp "$paper_dir/paper.tex" "$paper_dir/references.bib" "$manuscript_build/"
cd "$manuscript_build"
latexmk -pdf -interaction=nonstopmode -halt-on-error paper.tex
pdfinfo paper.pdf
```

Check the log and bibliography:

```sh
rg -n \
  "Overfull|undefined references|undefined citations|LaTeX Error|Emergency stop|Fatal error|duplicate ignored" \
  "$manuscript_build/paper.log"
rg -n "Warning|error|not found" "$manuscript_build/paper.blg"
texcount -inc -sum "$manuscript_build/paper.tex"
```

Render every page:

```sh
render_dir="$(mktemp -d /tmp/catdb-p16-render.XXXXXX)"
pdftoppm -png -r 110 "$manuscript_build/paper.pdf" "$render_dir/page"
```

## Final manuscript-build observation

The post-review-correction author build used:

```text
/tmp/catdb-p16-paper-r1-final.MPthwV
```

`latexmk` exited zero. `pdfinfo` reported 23 US Letter pages, PDF 1.7, and
335,752 bytes. `texcount` reported 4,439 text words, 4,695 words in its sum,
40 headers, six floats, 42 inline mathematics environments, and 15 displayed
mathematics environments. All 21 bibliography entries were cited, all 21
BibTeX entries appear in the primary-source ledger, and the related-work
ledger closes over all 21 keys.

The final log audit found:

```text
overfull boxes:                 0
undefined references:          0
undefined citations:           0
LaTeX errors or fatal stops:    0
BibTeX warnings or errors:      0
underfull boxes:                2
```

The two underfull boxes are ordinary prose paragraphs at source lines
781--786 and 816--819. Neither contains lost, overlapping, or clipped
material.

Every page was rendered at 130 dpi under
`/tmp/catdb-p16-render-r1-final.LzlNDK` and inspected in six high-resolution
contact
sheets. The pass covered the comparator diagram, accepted result table, Slice
4 table, Slice 5 candidate section, nonclaim list, conclusion, and both
bibliography pages. It found no clipping, overlap, truncated code, broken
figure arrows, unreadable tables, or bibliography spill.

Final temporary build hashes:

```text
paper.pdf  697187a2c9b5b86daeec702316d883d2a6d942f9d3f39a93c26297123578a2ad
paper.log  12ae1f38d5873ece23d7d87ee852bad873ace64a099d6af6349b4f114400774b
paper.blg  887e6ada36f5c903549d6b988becff2f2a41f690fcd5c6a124ab4577f0badaf7
paper.bbl  72be69bcd433f40d084107cae70d1e0db4e3d41c015d73a9a7b3101846080631
```

Final stable source hashes for the evidence-bearing inputs:

```text
paper.tex                       2d92431b7be7444ca2f3ab23257aa7a7d25f91c4c548e6b477430fcd82c6db23
references.bib                  9db17ca6c046f6d71f884021b433f689e4752bc56a9937ca8df52dfced7e18d4
related-work-ledger.md           a188d832e7f2d4bbc17f61da1cc8d5ebc9c85cbdc6fc55e7ab0c2bbfa8cc9ca4
novelty-ledger.md                45816247652eaa4dcfb3fb183c8bf8f7cb7fce7f85c69f2db2d378efa236292c
disputed-claim-ledger.md         cbfa5e50317bdfa2c1ff5433e70d836a5eb10fd2b7b7db6d482112f2f84a60aa
primary-source-bibliography.md   fc90598ada0aa9abcd8692e48b39fe4b325d2f02e71693986bacbfdc019c32ac
review-contract.md               7048a9b5830427ea23d703270a999011da166f16bb344a68d98dcc0828104b9b
research/evidence-dossier.md     8695b5add232fa884ac67daef654905bdce1aedb7f165e31bd5c3cb9610e298b
```

The canonical CatDB verifier digest for `paper.tex` plus `references.bib` is
`1413058a0520ee2e9e35a0503c31524c83540c6e20912bea64352ec8275c14fe`.
The ordered eight-file evidence-package digest, excluding the two
self-recording audit files, is
`af72fa1187f46abe5cabb8b4b8a498f1f3bd75fdbb80e35be4cede2f54a4626b`.

AGY round 1 reviewed the earlier source digest
`86a0724454bdc009fb1c7bbc2f87f502d11bf85fbd092b924d83f5632d577ec2`
and returned `MINOR REVISIONS`. AGY round 2 reviewed the corrected canonical
digest and ended in `VERDICT: ACCEPT`; the canonical review is byte-identical
to round 2.

## Terminal manuscript gate

The repository artifact hashes are:

```text
paper.pdf  697187a2c9b5b86daeec702316d883d2a6d942f9d3f39a93c26297123578a2ad
paper.log  12ae1f38d5873ece23d7d87ee852bad873ace64a099d6af6349b4f114400774b
cover.png  27e0c485ce3ce245cea8ae54bbe47ed874e6c27e5cf637323552bc3dc903067b
review     8a69228778f559ab0de9c447a00401e5089eb7b15b83863ae29c6d6edbbda969
```

The final verifier passed source and review digest identity, PDF freshness,
23-page minimum, LaTeX-log inspection, 300-DPI cover resolution, and terminal
review verdict. This internal manuscript acceptance covers only the bounded
historical Haskell result and its explicitly separated later evidence. It
does not promote the current Slice 5 candidate or make Haskell a production
dependency or proof authority.

## Reproduction limits

- The accepted historical package has dependency bounds but no
  `cabal.project.freeze`.
- A successful current resolution does not promote the Slice 5 candidate or
  prove that a future Hackage index will select the same graph.
- QuickCheck replay across dependency versions is not guaranteed.
- The historical comparator assumes invocation from repository root.
- Its report path is not hardened for a hostile shared temporary directory.
- Both implementations share the written fixture and golden values.
- Byte-identical report reproduction does not prove a bit-identical executable.
- The commands do not establish query, backend, migration beyond the later
  bounded `Delta`, complete information-loss analysis, arbitrary schema merge,
  performance, security, or distributed behavior.
