Skip to content

test: make source guard inventories independent of line numbers - #5300

Merged
Trecek merged 23 commits into
developfrom
impl-canonical-json-site-identity-20261022
Oct 22, 2026
Merged

Trecek merged 23 commits into
developfrom
impl-canonical-json-site-identity-20261022

Conversation

@Trecek

@Trecek Trecek commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Harmless line shifts break the canonical JSON consumer registry, while its per-file comparison can let a valid consumer hide a missing sibling. These guards now identify sites by qualified scope and compare exact call counts.

  • Replace canonical consumer and exception line anchors with scope identities, preserving strictness and producer-ownership checks.
  • Always select whole-source infra scanners, with regression checks for scanner selection and unconditional test paths.
  • Preserve multiplicity in schema-write and git-ref inventories and compare install-site counts in both directions.
  • Re-key ambient-environment exemptions by scope, retaining every original justification and accounting for same-line reads and decorator ownership.
  • Register the schema and ambient count maps with the existing acceptance-policy checker. The schema map uses _LEGACY_JSON_WRITE_COUNTS so initial registration does not attempt to read the old set as an integer map. The checker is unchanged.

The work is split into one commit per plan part. Part A is isolated in 6f1f17bea for the planned integration into #5255; the remaining commits are the separately authorized follow-ups. Production code is unchanged.

Validation: pre-commit run --all-files and the configured task test-local-gate passed for every part. The final gate reported 52,148 passed, 614 skipped, and 29 expected failures. Pre-implementation baseline/red runs were not performed.

Fixes #5295.

Trecek added 23 commits October 22, 2026 14:12
@Trecek
Trecek force-pushed the impl-canonical-json-site-identity-20261022 branch from 7a0c456 to 01086c4 Compare October 22, 2026 21:16
@Trecek
Trecek added this pull request to the merge queue Oct 22, 2026
Merged via the queue into develop with commit 0216630 Oct 22, 2026
11 checks passed
@Trecek
Trecek deleted the impl-canonical-json-site-identity-20261022 branch October 22, 2026 21:40
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