Skip to content

TEMPORARY diagnostic control on top of #71 - #73

Closed
ChelseaKR wants to merge 4 commits into
mainfrom
diagnose/shallow-on-pr71
Closed

ChelseaKR wants to merge 4 commits into
mainfrom
diagnose/shallow-on-pr71

Conversation

@ChelseaKR

Copy link
Copy Markdown
Owner

TEMPORARY. DO NOT MERGE. Throwaway branch; it will be deleted.

Control for #72. Same three diagnostic steps, this time stacked on feat/artifact-diff (#71), whose verify job fails because git rev-parse --is-shallow-repository reports true. On main content the same steps report false and make verify passes, so this isolates whether the branch content or the checkout is responsible.

Prepared with AI assistance; reviewed before submission.

…moved

The figures on these pages move only when the pinned retrievals are deliberately
refreshed, and a refresh rewrites site/data/perimeters-coverage.json and
dins-coverage.json in full. The only account of what changed was git diff over a large
JSON document, which answers a different question: it reports lines, so a reordered list
reads as hundreds of changes and one count that moved reads as two.

python -m perimeter.diff OLD NEW walks every leaf of both documents and reports the value
at its path with both sides. Exit 0 no change, 1 changes reported, 2 a refused removal or
an unreadable input. --json writes the rows sorted by path, byte-identical on repeat, so
a refresh can cite a comparison in PROVENANCE.md. make diff wraps it for a terminal, and
records in the Makefile that make collapses every recipe failure to its own exit 2, so a
script that needs the three codes calls the module.

Three distinctions decide the design. A key the later artifact stops publishing is not a
value moving: it is refused unless ALLOW_REMOVALS names it deliberate. A number becoming
null is a change to absence and never a removal, because ADR-0010 writes a domain the
layer stopped publishing as null rather than dropping it. And 1000 and 1000.0 are a type
change, because every percentage here is a *_tenths_pct integer precisely so that no
float decides an equality.

make site-check now prints the leaf comparison before its byte-for-byte check decides.
The comparison is the report and diff -r is still the gate: the report's exit status is
discarded deliberately, so it can add detail and can never turn a red target green.

Refusals per ADR-0004: a missing file, an empty file, an unparseable one and a JSON
document whose top level is not an object are each refused rather than parsed into an
empty document, because two empty documents compare equal and would report no change
about two artifacts that were never read.

Running the tests against the faults they exist to catch found a weak assertion in this
change's own test file. With the emptiness check deleted, an empty file still failed as
unparseable JSON and match='empty' was satisfied by the fixture filename empty.json. The
fixture is renamed and the pattern now matches the reason.

Closes #58
@ChelseaKR

Copy link
Copy Markdown
Owner Author

Diagnostic complete; this branch has done its job and is being removed.

The finding: tools/a11y_browser was writing .git/shallow into this work tree. On a pull_request run Playwright's git-info plugin calls gitDiff, which begins git fetch origin <pr base sha> --depth=1 (node_modules/playwright/lib/runner/index.js), and the harness's working directory is inside the repository, so the fetch shallows the checkout. tests/test_release_claims.py then correctly refuses to read the tag list, and five tests fail on branches that changed nothing related. It presented as flake because whether it fired depended on pytest -n auto scheduling.

The fix is PR #74. Nothing here should be merged.

Prepared with AI assistance; reviewed before submission.

@ChelseaKR ChelseaKR closed this Sep 7, 2026
@ChelseaKR
ChelseaKR deleted the diagnose/shallow-on-pr71 branch September 7, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant