Skip to content

Check every published review without naming it - #62

Merged
duizendstra merged 4 commits into
mainfrom
workshop/examples-loop
Nov 9, 2026
Merged

duizendstra merged 4 commits into
mainfrom
workshop/examples-loop

Conversation

@duizendstra

@duizendstra duizendstra commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Closes #58.

What changes. tools/check_examples.py checks every published review, and no list names them. It is repository tooling, so it sits outside scripts/ and its MANIFEST. It is not part of the instrument and asks nothing of a review that PROMPT.md does not.

  • Which files. A review is any .md directly under examples/ or calibration/ that has a FINDINGS INDEX heading outside a code fence, found with check_review's own heading_span. Today that is three files.
  • Where the artifacts come from. Each review already names its artifacts, in the Artifact row of its own ### Scorecard section, outside fences. Every backticked span that names a file is passed as its own --artifact.
    • No such span means the artifact is not in the repository, and the review runs with --no-artifact. check_review.py already refuses that for a review whose Integrity governor requires quotes.
    • A span that contains / but names no file fails, so a moved artifact is never read as an anonymized review.
    • An absolute or .. path fails as "outside the repository".
    • A review with no Artifact row in its Scorecard fails.
  • What it runs. Each review goes through check_review.py and render_scorecard.py. A nonzero exit from either one fails the run.

The mapping lives in the review, so there is no second list to drift.

Fixtures (test_58_*).

  • The three published reviews pass, each with the flag it should get.
  • A defective review dropped into examples/ fails, with no list edited. Placebo: with the review list hard-coded, this test fails.
  • Each script is stubbed in turn to exit 1, and the run fails with that script named.
  • The Artifact row controls the result: a moved path, /etc/hosts, a .. path, no span and no row each behave as described above.
  • A row that names two files passes both.
  • Nothing fenced is read: a fenced Artifact row, a fenced ### Scorecard, or a fenced FINDINGS INDEX in a non-review file.
  • The two mechanisms are guarded apart: a fenced Artifact row inside the Scorecard is skipped by the row's fence filter, and a live one outside it by section scope. Each fixture fails on its own mutant.

test_scripts.py already runs in CI, so a new review is covered as of this PR.

The workflow edit is not in this branch. The push token lacks workflow scope, the same block as #61. To make CI call the runner directly, replace the three named check_review steps and the Scorecard loop in .github/workflows/check.yml with:

      # Every review this repo publishes must pass the scripts this repo
      # ships. check_examples.py finds them and reads each one's artifacts
      # from its own Scorecard (#58).
      - name: Published reviews
        run: python3 tools/check_examples.py

Until then the named steps stay in place. They are redundant, but they do no harm.

Siblings.

  • Reviews outside examples/ and calibration/ are not scanned; there are none today.
  • PROMPT.md's FINDINGS INDEX heading sits at the root, which is not scanned.
  • A backticked span with no / that names no file is treated as a label, not a path.

🤖 Generated with Claude Code

@duizendstra

Copy link
Copy Markdown
Member Author

Review on b2547a8 (the Opus reviewer): SEND BACK. Response in 8b8d4c0:

  1. The heading and the Artifact row were matched without regard to fences or sections. Now both use check_review's heading_span / section / outside_fences, and a fixture covers each fenced case.
  2. Only the first artifact was passed. Now every file on the row is its own --artifact, with a fixture.
  3. The PROMPT.md rule gate: an instrument script enforced a rule PROMPT.md does not state. The runner moved to tools/. It is repository tooling, outside the MANIFEST, and the CHANGELOG and CONTRIBUTING say so.
  4. Nothing guarded the render_scorecard run. A stub fixture now fails each script in turn.

Notes taken: absolute and .. paths are refused; the choice to treat only /-bearing spans as paths is documented in the docstring; the subject carries (#58) again.

check.py passes, and the tests are 47/47 OK. A delta review of 8b8d4c0 follows.

@duizendstra

Copy link
Copy Markdown
Member Author

Delta review on 8b8d4c0 (the Opus reviewer, base b2f2360): SEND BACK. Response in 78993f7:

  1. The row-level fence filter and the Scorecard section scope were guarded only together. The reviewer removed each one alone and every test stayed green. Two fixtures now guard them separately:

    • test_58_a_fenced_row_inside_the_scorecard_is_not_read fails when the live and filter is removed.
    • test_58_a_live_row_outside_the_scorecard_is_not_read fails when section() is replaced by the whole document.

    I ran each mutant and restored the tool afterwards.

Confirmed on 8b8d4c0:

  • The move to tools/ answers the Release Gate. PROMPT.md:514 limits it to scripts/.
  • The other five mechanisms each fail their fixture when reverted.
  • No stale scripts/check_examples.py references remain.
  • The docs match the behaviour.

Notes:

  • CONTRIBUTING now states the /-span and .. rules.
  • isfile follows symlinks. That is low risk, since reviews arrive by PR.
  • section(..., prefix=True) takes the first ### Scorecard…. Each review has exactly one.

check.py passes, and the tests are 49/49 OK. A delta review of 78993f7 follows.

@duizendstra
duizendstra force-pushed the workshop/examples-loop branch from 1a25129 to 82bce67 Compare November 8, 2026 11:10
@duizendstra

Copy link
Copy Markdown
Member Author

Reposted with an internal name removed. First posted at 09:43 UTC; otherwise unchanged. The branch's commit messages have since been reworded with their trees unchanged: b2547a8 → 355ea46, 8b8d4c0 → 5f16b71, 78993f7 → 1d8edba, 1a25129 → 82bce67.

Delta review on 78993f7 (the Opus reviewer, base b2f2360): SEND BACK. The reviewer found no defect. Its one blocker is unfinished review work: its read-only guard refused the copies that build the mutants, so it could not run the two placebo tests. It said both would fail on reading the code (PLAUSIBLE), and that PUSH WITH NOTE on this same head would follow once they were run and failed as predicted.

Placebo run by the author at 78993f7 (full suite, tool restored after each run):

  • M1, live and dropped at tools/check_examples.py:71: 1 of 49 fails, test_58_a_fenced_row_inside_the_scorecard_is_not_read.
  • M2, table = text at line 67: 1 of 49 fails, test_58_a_live_row_outside_the_scorecard_is_not_read.
  • Unmutated: 49/49 OK.

That is the result the reviewer predicted, but this is the author's run, not a reviewer's. Jasper decides whether it settles the blocker or whether a reviewer should rerun it.

Confirmed by the reviewer:

  • The delta touches only CONTRIBUTING, MANIFEST (the hash verified) and the two fixtures.
  • The CONTRIBUTING clause matches artifacts_of().
  • The PR body matches the code.
  • Locally, check.py passes and tools/check_examples.py reports 3 reviews passing.

.github/workflows/check.yml is unchanged, and the proposed step is in the PR body, waiting on a push with workflow scope.

@duizendstra

Copy link
Copy Markdown
Member Author

Full review after rebase: PUSH WITH NOTE · head e589722fc2ec602c25361c0b03bf3ba1b6ce014d · base 4d1fc1c · reviewer model claude-opus-5-5 (blind)

The branch is rebased onto main (4d1fc1c, after #63 and #59), with four commits; only MANIFEST conflicted, and it was regenerated. This head is not pushed yet. Rewriting the commit that touches .github/workflows/check.yml needs the workflow scope, so the push is the maintainer's. This verdict holds only while the PR head equals e589722.

This review covers the whole PR, including the CI-step commit, which had not been reviewed before.

  • The CI step is equivalent. tools/check_examples.py checks the same three reviews with the same flags:

    • --artifact for the two semver reviews;
    • --no-artifact for web-service.md;
    • render_scorecard.py on all three.

    Any non-zero exit fails the job. No review loses coverage.

  • The tool and its docs match. The docstring, CHANGELOG and CONTRIBUTING match the code. The intermediate scripts/check_examples.py is gone.

  • The reviewer ran the placebo mutants itself, each on a copy of the tree:

    Mutant What it reverts Result
    M1 live and dropped from the row filter test_58_a_fenced_row_inside_the_scorecard_is_not_read fails
    M2 table = text instead of the Scorecard section test_58_a_live_row_outside_the_scorecard_is_not_read fails
    M3 absolute/.. refusal disabled a named test fails
    M4 "/ but not a file" failure disabled a named test fails
    M5 non-zero script exits ignored named tests fail
    M7 fence-aware heading locator replaced by a substring match a named test fails
    M6 "no review found" failure removed survives (see notes)
  • Checks at HEAD:

    • check.py passes;
    • test_scripts.py runs 62 tests, OK;
    • tools/check_examples.py passes;
    • MANIFEST is current.

    Main's Cycle 6 Minors: pipe parsing, version coupling, regex Markdown, anchor re-parsing, mandated-vs-measured steps #43 and Add Bug and Feature issue forms that set the issue type #59 changes are intact.

  • Blockers: none.

Notes

  • M6 survives. Removing the "no review found" failure fails no fixture directly. test_58_every_published_review_passes_both_scripts covers it indirectly, because it asserts "3 reviews pass". A one-line fixture (an empty copy, expecting exit 1) would cover it directly.
  • A root-level file can be an artifact. A backticked span with no / that happens to name a file at the repo root would be passed as an artifact, as the docstring says. This is harmless.

duizendstra and others added 4 commits November 9, 2026 12:02
scripts/check_examples.py finds each file under examples/ and calibration/
with a FINDINGS INDEX heading, reads its artifact from its own Scorecard
Artifact row (none means --no-artifact; a path naming no file fails), and
runs check_review.py and render_scorecard.py on it. The #58 fixtures run it,
so CI covers a new review now; replacing check.yml's named steps with one
call needs the workflow edit in the PR description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check_examples.py moves to tools/: it is repository tooling, not part of
the instrument, so it adds no rule PROMPT.md lacks. It finds reviews by a
FINDINGS INDEX heading outside fences, reads the Artifact row only inside
the review's own ### Scorecard, passes every file the row names, refuses
paths outside the repository, and its fixtures prove a failing
render_scorecard.py fails the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each fixture now fails on its own mutant: a fenced Artifact row inside the
Scorecard, and a live one outside it. CONTRIBUTING states the path rules a
contributor can trip on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the three named check_review steps and the Scorecard loop with one
step, as the PR body set out. Committed with a workflow-scoped token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@duizendstra

Copy link
Copy Markdown
Member Author

Blind delta review (Opus) of the rebase onto main b8d7b6b: PUSH WITH NOTE. Reviewed head 7923d410d97544bcbfd56b76a67723f9df637e3e. It is not yet the PR head, which is still 82bce67; this verdict holds only once exactly that SHA is pushed.

What the rebase changed

Checks

  • check.py passes, and tools/check_examples.py passes all 3 reviews.
  • release.yml is untouched.
  • CHANGELOG [Unreleased] holds both entries.

@duizendstra
duizendstra force-pushed the workshop/examples-loop branch from 82bce67 to 7923d41 Compare November 9, 2026 11:15
@duizendstra
duizendstra merged commit c3134c7 into main Nov 9, 2026
1 check passed
@duizendstra
duizendstra deleted the workshop/examples-loop branch November 9, 2026 11:16
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.

CI names each example review instead of running check_review over examples/

1 participant