Skip to content

evidence: canonical co-change artifacts for three external repositories - #31

Merged
qmarcelle merged 3 commits into
mainfrom
evidence/meta-310-canonical-cochange-artifacts
Aug 11, 2026
Merged

evidence: canonical co-change artifacts for three external repositories#31
qmarcelle merged 3 commits into
mainfrom
evidence/meta-310-canonical-cochange-artifacts

Conversation

@qmarcelle

@qmarcelle qmarcelle commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

First commit-history evidence from repositories that are not ours. Companion driver: workspacejson/cli#21.

Three artifacts produced by the neutral producer over public commit graphs at pinned revisions, under one frozen contract, no per-repository tuning. Contract was frozen and posted before any target was mined; revisions were pinned before the first result existed.

Provenance

Producer workspacejson/cli @ 031c350, standard @ f95c42f, both packed from clean detached worktrees. The spec/rules/cli tarball digests reproduce those in .agents/RECEIPT.md bit for bit — that receipt expected them not to (mtime in the gzip stream), so the match shows this is the same environment, not a same-version rebuild.

Calibrated before any target was mined. Run against standard @ 8e08c8c, the harness reproduces the committed artifact's history-block digest 7012352617df exactly, 50 entries, 20,417 bytes, availableTransitions 90. The digest definition was recovered and verified, not invented — four alternatives were rejected for not reproducing the recorded value.

Results

FormatJS syncpack Polylith
availableTransitions 6,545 919 394
extractedTransitions 500 500 394
windowTruncated yes yes no
pairsBeforeCap 713 729 1,658
pairsEmitted 50 50 50
capBound yes yes yes
Validation valid, 0 errors valid, 0 errors valid, 0 errors

All deterministic across two runs; bundled and standalone mining-core agree pair-for-pair every time. Every artifact is the top 50 of a larger population, never "all qualifying pairs".

The finding

META-289 §1.5 has not landed, so the file-role exclusion set is empty — lockfiles, generated files and documentation are all in play, and release plumbing dominates the ranking. Recorded as empty rather than as "a recorded set", in advance, so it could not later be presented as a discovery.

Classifying all 150 emitted pairs by whether both endpoints are source files:

source ↔ source mixed tooling ↔ tooling
FormatJS 0 0 50
syncpack 32 0 18
Polylith 5 20 25

FormatJS produced no source-coupling evidence at all. It is demoted on this output, not on taste. Nothing in the prior screening story survives, and it is not rescued.

syncpack carries the no-import-edge case. The six sibling command modules src/commands/{fix,format,json,lint,list,update}.rs contribute 11 emitted pairs, and none of the six references any other — no import graph relates them. lint.rslist.rs is support 10, occurrences 10: of the 10 qualifying commits touching either, all 10 touched both. Recorded against overclaiming, instance.rsversion_group.rs (support 17) fails the test — version_group.rs imports instance.

Two gates pushed back, both obeyed

  • check-architecture refused the run driver under dependency-direction. Standard sits at the top of the graph. The driver moved to evidence: frozen driver for the canonical external co-change run cli#21 and is cited here by path and digest.
  • check-docs refused the artifacts for an internal tracker identifier. It is producer output, not prose: the miner stamps weightingVersion into every scoring basis, and that string names the issue specifying the weighting. Editing it would ship an artifact misreporting which algorithm produced it. docs/evidence/ is exempted for the same reason PROVENANCE_FILES is.

Watched-red on the widened exemption: an identifier injected into README.md still fails the gate and passes again on restore, so the exemption is scoped to docs/evidence/ and did not blunt the rule.

Limits

Relationships are stated descriptively — counts of qualifying commits in a 500-transition window. No usefulness, adoption or predictive claim is inferred. No publication is authorized. No maintainer has been contacted. Published spec@0.4.4/rules@0.4.4 still reject these artifacts; this is candidate interoperability.

Gates: spec 264/264, rules 173/173, examples 11/11 + 12/12, architecture, schema, corpus, docs, adr, typecheck — all green. check:conformance needs a locally built candidate and fails identically on main; CI supplies it.

Summary by Sourcery

Record third-party commit-history evidence artifacts and exempt evidence docs from internal tracker identifier checks.

Enhancements:

  • Extend documentation checker to treat docs/evidence/ outputs as provenance and exclude them from internal tracker identifier enforcement, reporting exempt evidence files in its summary.

Documentation:

  • Add detailed evidence receipt documenting production, calibration, limits, and findings for META-310 co-change artifacts over three external repositories.

Tests:

  • Store calibration and per-repository receipt and workspace.json artifacts for FormatJS, syncpack, and Polylith under docs/evidence/meta-310 for reproducible mining runs.

…es (META-310)

Three artifacts produced by the neutral producer over public commit graphs at
pinned revisions, under one frozen contract with no per-repository tuning.

Producer workspacejson/cli @ 031c350, standard @ f95c42f, both packed from clean
detached worktrees. The spec/rules/cli tarball digests reproduce those recorded
in .agents/RECEIPT.md bit for bit; that receipt expected them not to, so the
match shows this is the same environment rather than a same-version rebuild.

Harness calibrated before any target was mined: run against standard @ 8e08c8c
it reproduces the committed artifact's history-block digest 7012352617df exactly,
50 entries, 20,417 bytes, availableTransitions 90. The digest definition was
recovered and verified rather than invented — four alternatives were rejected
because they did not reproduce the recorded value.

                        FormatJS      syncpack      Polylith
  availableTransitions     6,545           919           394
  extractedTransitions       500           500           394
  windowTruncated            yes           yes            no
  pairsBeforeCap             713           729         1,658
  pairsEmitted                50            50            50
  capBound                   yes           yes           yes
  validation             valid/0       valid/0       valid/0

All three deterministic across two runs; the bundled producer copy of
mining-core agrees pair-for-pair with the standalone copy in every run. Every
artifact is the top 50 of a larger population, never "all qualifying pairs".

META-289 §1.5 has not landed, so the file-role exclusion set is EMPTY and
lockfiles, generated files and documentation are all in play. Recorded as empty
rather than as "a recorded set" because it shapes the ranking: release plumbing
dominates. Such pairs are valid observations with low outreach novelty, which is
a ranking consideration, not grounds to erase evidence.

Classifying all 150 emitted pairs by whether both endpoints are source files:
FormatJS 0 of 50, syncpack 32 of 50, Polylith 5 of 50.

FormatJS produced no source-coupling evidence at all — all 50 pairs are release
and dependency plumbing. It is demoted on this output, not on taste; nothing in
the prior screening story survives and it is not rescued.

syncpack carries the no-import-edge case: the six sibling command modules
src/commands/{fix,format,json,lint,list,update}.rs contribute 11 emitted pairs
and none of the six references any other, so no import graph relates them.
lint.rs <-> list.rs is support 10, occurrences 10 — of the 10 qualifying commits
touching either, all 10 touched both. Recorded against overclaiming:
instance.rs <-> version_group.rs (support 17) fails the test, because
version_group.rs imports instance.

Relationships are stated descriptively. No usefulness, adoption or predictive
claim is inferred, no publication is authorized, and no maintainer has been
contacted.

Two gates pushed back during this change and both were obeyed rather than
softened:

- check-architecture refused the run driver, which imports @workspacejson/cli,
  under dependency-direction. Standard sits at the top of the graph. The driver
  now lives in workspacejson/cli at evidence/meta-310/ and is cited here by
  path and sha256; reproduction already requires both repositories pinned, so
  the split costs a reader nothing.
- check-docs refused the artifacts for carrying an internal tracker identifier.
  The identifier is producer output, not prose: the miner stamps weightingVersion
  into every scoring basis and that string names the issue specifying the
  weighting. Editing it would ship an artifact misreporting which algorithm
  produced it. docs/evidence/ is exempted for the same reason PROVENANCE_FILES
  is — an audit trail must be able to name its own source.

Watched-red on the widened exemption: an identifier injected into README.md
still fails the gate, and passes again on restore, so the exemption is scoped to
docs/evidence/ and did not blunt the rule.

Gates: spec 264/264, rules 173/173, examples 11/11 + 12/12, architecture,
schema, corpus, docs, adr, typecheck — all green. check:conformance requires a
locally built candidate and fails identically on main; CI supplies it.
Copilot AI lite review requested due to automatic review settings August 11, 2026 18:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sourcery-ai

sourcery-ai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds canonical co-change evidence artifacts for three external repositories under docs/evidence/meta-310, and adjusts the docs-checking script to exempt evidence files from internal tracker ID rules while reporting them in the check output.

File-Level Changes

Change Details Files
Relax docs internal-tracker check for evidence files while keeping other protections intact and reporting exemption stats.
  • Introduce an isEvidence(path) helper that treats docs/evidence/ as evidence/provenance output, not prose subject to identifier rules.
  • Update Markdown identifier checks to skip SELF, provenance files, changelogs, and evidence files when scanning for internal tracker IDs.
  • Update non-Markdown (YAML/JSON/JS/TS) identifier checks to also skip evidence files.
  • Extend check-docs summary logging to include the count of evidence files exempted under docs/evidence/.
scripts/check-docs.mjs
Add META-310 evidence receipts and mined artifacts for three external repositories plus calibration data.
  • Add a detailed human-readable RECEIPT.md documenting producer versions, tarball digests, frozen contract, calibration against a known answer, run parameters, and interpretive limits of the artifacts.
  • Check in JSON receipts for calibration and for each mined repository (FormatJS, syncpack, Polylith), including run metadata and results.
  • Check in workspace.json artifacts for each mined repository capturing the canonical co-change results under the frozen contract.
docs/evidence/meta-310/RECEIPT.md
docs/evidence/meta-310/calibration.receipt.json
docs/evidence/meta-310/formatjs.receipt.json
docs/evidence/meta-310/formatjs.workspace.json
docs/evidence/meta-310/polylith.receipt.json
docs/evidence/meta-310/polylith.workspace.json
docs/evidence/meta-310/syncpack.receipt.json
docs/evidence/meta-310/syncpack.workspace.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR records reproducible co-change evidence from three external repositories and narrows the documentation check’s evidence exception.

  • Adds pinned receipts and generated workspace artifacts for FormatJS, syncpack, and Polylith.
  • Documents calibration, provenance, mining limits, and observed co-change results.
  • Replaces the previous evidence-subtree identifier exemption with receipt and producer-field handling.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
scripts/check-docs.mjs Narrows internal-identifier handling by enumerating the receipt and recognizing producer-stamped weighting metadata.
docs/evidence/meta-310/RECEIPT.md Documents the evidence-production contract, provenance, calibration, results, reproduction process, and interpretation limits.
docs/evidence/meta-310/formatjs.workspace.json Adds the generated FormatJS workspace evidence artifact at its pinned revision.
docs/evidence/meta-310/syncpack.workspace.json Adds the generated syncpack workspace evidence artifact at its pinned revision.
docs/evidence/meta-310/polylith.workspace.json Adds the generated Polylith workspace evidence artifact at its pinned revision.

Reviews (3): Last reviewed commit: "fix(docs-gate): narrow the evidence exem..." | Re-trigger Greptile

Comment thread docs/evidence/meta-310/RECEIPT.md
… driver PR

The reproduction block cited the runner manifest by sha256 as though it were
byte-frozen alongside the driver. Review on workspacejson/cli#21 found that the
manifest as run pinned every dependency to an absolute /private/tmp/... path,
which resolves on one machine and fails to install anywhere else — so the digest
pinned bytes that actively prevented the reproduction they were meant to enable.

The manifest is now portable and explicitly NOT byte-frozen, and this receipt
says so rather than quietly dropping the digest. The as-run copy hashed
fed868de and the committed file no longer matches it; they differ only in the
tarball directory prefix, and no result depends on the prefix — the run depended
on the content of the four tarballs, whose digests are recorded here and are
unchanged.

The driver remains byte-frozen at 5be5c814. Its bytes are the reproduction
claim; the manifest's absolute paths were machine noise.

Recorded as verified rather than asserted: a fresh install from the portable
manifest reproduces calibration history-block 7012352617df with 50 entries,
valid, cross-check identical.
…tamped field

Review found the isEvidence() exemption overbroad, and it was. It skipped the
identifier check for every Markdown, JSON and script under docs/evidence/, so
the narrow provenance need — one producer-stamped field — was used to justify
waving through arbitrary identifiers in human-authored evidence prose, including
files not yet written.

Counting what actually needed the exemption shows how far it overreached:

  *.workspace.json    0 identifiers   the artifacts never needed it at all
  *.receipt.json      1 each          all of them "weightingVersion": "META-289 v2.2.1"
  RECEIPT.md          6               human prose — exactly the overreach

So the real need is a single JSON member, not a directory. Two replacements,
each matching what the repository already does:

  - PRODUCER_STAMPED admits weightingVersion by value, on its own line. The
    string is data: editing it would ship an artifact misreporting which
    algorithm produced it. Fails closed — minified or reflowed JSON does not
    match and must be justified rather than silently admitted.
  - docs/evidence/meta-310/RECEIPT.md is enumerated in PROVENANCE_FILES, one
    file, next to the ADRs. A future evidence run inherits nothing and has to
    argue for itself.

The mechanism, not just the scope, was the defect. PROVENANCE_FILES is a
hand-maintained list precisely so each exemption stays a decision someone made;
a directory wildcard auto-exempts whatever anyone drops there later. Convenience
was not a good enough reason to depart from that.

Watched-red, all four cases, because a gate loosened without being retested is
not a gate:

  unrelated identifier in an evidence receipt JSON      fails  (the reported risk)
  unrelated identifier in tracked evidence prose        fails
  identifier in a member OTHER than weightingVersion    fails
  identifier in the enumerated RECEIPT.md               passes

The third case matters most: it shows the rule keys on the stamped member rather
than on the string, so renaming the field does not smuggle an identifier past.

Gates: architecture, schema, examples, corpus, docs, adr, tests, typecheck — green.
@qmarcelle

Copy link
Copy Markdown
Contributor Author

Valid, and the mechanism was the defect as much as the scope. Fixed in b8c30e6.

Counting what actually needed the exemption shows how far it overreached:

File identifiers what they are
*.workspace.json 0 the artifacts never needed it at all
*.receipt.json 1 each every one is "weightingVersion": "META-289 v2.2.1"
RECEIPT.md 6 human-authored prose — exactly the overreach reported

So the genuine need is one JSON member, not a subtree. I had used a narrow provenance requirement to justify a broad exemption, and the broad part covered files that did not need it plus files not yet written.

Two replacements, each matching what this repository already does

  • PRODUCER_STAMPED admits weightingVersion by value, on its own line. That string is data — editing it would ship an artifact misreporting which algorithm produced it. It fails closed: minified or reflowed JSON does not match and has to be justified rather than silently admitted.
  • docs/evidence/meta-310/RECEIPT.md is now enumerated in PROVENANCE_FILES, one file, beside the ADRs. A future evidence run inherits nothing and has to argue for itself.

The mechanism mattered independently of the scope. PROVENANCE_FILES is a hand-maintained list precisely so that each exemption stays a decision someone made; a directory predicate auto-exempts whatever anyone drops there later. "Each run adds files" was a convenience argument, and it was not a good enough reason to depart from the existing pattern.

Watched-red, four cases

Case Result
unrelated identifier in an evidence receipt JSON fails — the reported risk
unrelated identifier in tracked evidence prose, not enumerated fails
identifier in a member other than weightingVersion fails
identifier in the enumerated RECEIPT.md passes

The third case is the one worth noting: the rule keys on the stamped member, not on the string, so renaming the field does not smuggle an identifier past it.

One correction to my own testing while verifying this: my first attempt at the prose case reported a pass, but only because the file was untracked and the gate scans tracked files. Re-run with it staged, it fails as it should. Flagging it because a test that passes for the wrong reason is worse than no test.

Gates: architecture, schema, examples, corpus, docs, adr, tests, typecheck — all green.

@qmarcelle
qmarcelle merged commit 33886d8 into main Aug 11, 2026
7 checks passed
@qmarcelle
qmarcelle deleted the evidence/meta-310-canonical-cochange-artifacts branch August 11, 2026 19:09
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.

2 participants