Repository navigation
A copied catalogue row says which row it copied, and check says when that row moves on - #47
Merged
Merged
Conversation
…that row moves on
benchmarks.record copies the distribution's row before adding a figure and now
writes copied-from: {digest} beside it: sha256 over the row's JSON as pact show
prints it, keys sorted, no spaces. pact check warns
loader/a-copied-row-behind-the-distribution when the shipped row (by name or
alias) no longer has that digest, naming the fields that now differ, or when
the distribution no longer has the row. spec/copied-rows.yaml holds the Rust
checker and the Python writer to the same digests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # crates/pact-cli/src/main.rs # docs/97-PRIMITIVES.md # site-docs/index.md # site-docs/reference/kinds.md # spec/schema.yaml
jithinAB
marked this pull request as ready for review
November 17, 2026 08:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A copied catalogue row says which row it copied, and check says when that row moves on
Recording one benchmark figure for a shipped model first copies the distribution's whole row into the workspace's
models/catalog.yaml, because a workspace row replaces the shipped one whole. The copy then kept the price, the window and the serving it was copied with. When the distribution later corrected that row, the workspace went on binding against the old facts and nothing said so.copied-from: {digest}on a row of the workspace's own catalogue holdssha256:and the hex digest of the distribution's row as it was copied: its JSON aspact showprints it, keys sorted, no spaces.benchmarks.recordwrites it whenever it copies a row (row_digest), and does not copy again on a second figure.pact checkwarnsloader/a-copied-row-behind-the-distributionin two cases. When the distribution's row of that name (or alias) no longer has that digest, the warning names the fields where the copy and the shipped row now differ and gives the digest to write once they are reconciled. It also warns when the distribution no longer has the row. A row withoutcopied-fromis not judged. This is a warning, not an error: the workspace's copy is still the author's row.pact show --jsonprints), so the Rust checker and the Python writer agree because both read the same printed form.spec/copied-rows.yamlholds the Rust checker and the Python writer to the same digests. Its rows include whole numbers, decimals, a share, a date and non-ASCII text, and one case shows that key order in the file does not move the digest while list order does.Proof
every_row_in_the_shared_table_digests_as_it_says,a_copy_of_the_current_row_is_quiet_and_a_stale_one_names_what_differs,a_row_without_copied_from_is_not_judged.test_a_copied_row_says_which_row_it_copied.py): the shared-table digests through thepact showroute, recording a figure writescopied-fromand check is quiet, a copy whose digest is not the shipped row's is reported, a second figure does not copy the row again.tests/golden/schema-fields.txtre-blessed;docs/97-PRIMITIVES.md,site-docs/reference/kinds.mdand counts synced.scripts/test-all.shon this branch (with A catalogue row says what a model needs of the machine that runs it #45 merged in) exits 0: Rust (1728 tests), the CLI on every shipped tree, WebAssembly, TypeScript, and the adapters (3625 passed, 30 skipped).Purpose checklist (BMH PACT v97 §0.2)
pact check, naming each differing field.spec/copied-rows.yamldigests match in Rust and Python.budmh pact benchmark record --write-treewritescopied-fromafter the next re-pin).🤖 Generated with Claude Code