Skip to content

[CXH-3052] Run the pr-review tests in CI, and move the pr-review detail out of the README - #155

Open
FeliLucero1 wants to merge 6 commits into
mainfrom
felipe/pr-review-tests-and-docs
Open

FeliLucero1 wants to merge 6 commits into
mainfrom
felipe/pr-review-tests-and-docs

Conversation

@FeliLucero1

@FeliLucero1 FeliLucero1 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Two loose ends from #147 and #149. The workflow this PR originally added is gone — see below.

The pr-review suite was in no test target

.github/actions/pr-review/scripts/test_*.py was in no Makefile target and no workflow, so the scripts carrying the most logic in this repo — and ~1200 lines newer than the rest after #149 — had 175 automated tests and no automated run.

Not hypothetical: while working on #147 two defects shipped into action.yml that these tests would have caught at once — a bash -eo pipefail case where var=$(failing-cmd) aborted the step instead of falling through to its fallback, and a doc pointer broken by moving the file it pointed at. Both were found by a reviewer afterwards.

This adds one line to make test-scripts. ci.yaml's shell-tests job runs that target, so the suite is now covered on every PR and push to main that touches .github/actions/**, cmd/**, scripts/** or the Makefile.

What changed during review. This PR originally added a self-test.yaml workflow, on the premise that nothing ran make test here. That was true when it was written and stopped being true the same day: ci.yaml ("Repository CI") landed in e9b91a2 as part of the CA-incident batch, after this PR was opened. @sergiocorral-conductorone caught the duplication. The workflow is dropped; the Makefile line is the part that was actually missing.

That also retired a bug of mine. self-test.yaml asserted that some yq was installed and got the runner image's mikefarah build, while the script tests need kislyuk's Python/jq one — which ci.yaml installs explicitly. I reported that failure as a pre-existing break in test-tool-integrity.py; it was not one, and that is corrected in a comment above.

The README

@gontzess asked for this in #147 and was right: PR Review was 147 of the README's 475 lines. The other workflows already follow the split — docs/release-workflow.md, docs/verify-workflow.md, docs/connector-docs-verify.md carry the internals while the README keeps a paragraph, a pointer, and how to call the thing. PR Review was the only one with everything inline.

The moved text is byte-identical after demoting its headings one level — nothing reworded, nothing dropped — so that part of the diff reads as a move. I verified that programmatically, not by eye.

The Development section now also names which yq is required and why, since getting that wrong is what cost this branch a round.

Not included

  • golangci-lint and make workflow-validate. ci.yaml already runs shellcheck; extending it is a separate call.
  • license-shapes.md discarding an ok — different repo, ConductorOne/claude-marketplace#211.
  • The reviewer re-posting findings people already dealt with — [CXH-3051] Stop re-raising findings a human already closed #156, CXH-3051.

🤖 Generated with Claude Code

…EADME

Three loose ends from #147 and #149, none of which depend on how the reviewer
clears its blocks.

Nothing ran this repository's tests. verify.yaml is a reusable workflow that
tests a CALLER repo's checkout, so `make test` existed here but only ever ran
by hand. That left the pr-review scripts — the most logic in the repo, and
~1200 lines newer than the rest of it after #149 — with 175 automated tests
and no automated run.

It is not a hypothetical gap. While working on #147 I shipped two defects into
action.yml that these tests would have caught at once: a `bash -eo pipefail`
case where `var=$(failing-cmd)` aborted the step instead of falling through to
its fallback, and a doc pointer broken by moving a file. Both were found by a
reviewer afterwards.

So: add the pr-review suite to `make test-scripts`, and add self-test.yaml to
run `make test` on pull requests and pushes to main. The suite passes as-is —
verified end to end locally, exit 0 — so this starts green rather than
landing a red check for someone else to fix. yq is installed explicitly
because three script tests shell out to it and fail hard without it; current
runner images happen to ship it, and depending on that quietly is how this
breaks later.

Separately, the README: PR Review was 147 of its 475 lines, and @gontzess
asked in #147 for it to move. The other workflows already do this —
docs/release-workflow.md, docs/verify-workflow.md, docs/connector-docs-verify.md
hold the internals while the README keeps a paragraph, a pointer and how to
call the thing. PR Review was the only one carrying all its detail inline.

The moved text is byte-identical after demoting its headings one level, so
that part of the diff reads as a move. README is now 353 lines.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit a70f1c83a62d

General PR Review: Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base e6432834cb21.
Review mode: full
View review run

Review Summary

This PR adds a self-test.yaml workflow that runs make test on PRs and on pushes to main. The job uses read-only contents permission, checks out with persist-credentials: false, and installs yq only if it is missing. It also adds the pr-review unittest discovery to make test-scripts. The test modules load their scripts from paths built on __file__, so discovery from the repo root works. Finally, it moves the PR Review internals from README.md into docs/pr-review.md. I compared the removed README lines with the new doc: they match after the headings drop one level. The new #reusable-workflow-calls anchor resolves, and nothing else in the repo pointed at the removed README sections. Action tag pins (checkout@v5, setup-go@v6) follow the convention used in the rest of the repo's workflows. I scanned the full PR diff for security and correctness. No repo-local criteria loaded, so only the base criteria were applied. I did not run the suite (this review is read-only), so the claim that it "starts green" is checked by the new workflow's own run, not by this review.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

  • New (confidence: medium) — .github/workflows/self-test.yaml:37-41: if yq is missing, the step downloads a release binary with sudo and installs it without checking its checksum. Pin and check a SHA-256 before running it.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

## Suggestions

In `.github/workflows/self-test.yaml`:
- Around line 37-41: The fallback that installs yq downloads yq_linux_amd64 v4.44.3 into /usr/local/bin with sudo and never checks its integrity. After the curl download and before chmod +x, add a pinned SHA-256 check for that release asset (e.g. `echo "<sha256>  /usr/local/bin/yq" | sudo sha256sum -c -`) so a tampered or substituted binary fails the step instead of running.

Comment thread .github/workflows/self-test.yaml Outdated
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit 2c0a721b0d0a

General PR Review: Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base e6432834cb21.
Review mode: full
View review run

Review Summary

This PR adds a self-test.yaml workflow that runs make test on PRs and on pushes to main. The job uses read-only contents permission, checks out with persist-credentials: false, and installs yq only if it is missing. It also adds the pr-review unittest discovery to make test-scripts. The test modules load their scripts from paths built on __file__, so discovery from the repo root works. Finally, it moves the PR Review internals from README.md into docs/pr-review.md. I compared the removed README lines with the new doc: they match after the headings drop one level. The new #reusable-workflow-calls anchor resolves, and nothing else in the repo pointed at the removed README sections. Action tag pins (checkout@v5, setup-go@v6) follow the convention used in the rest of the repo's workflows. I scanned the full PR diff for security and correctness. No repo-local criteria loaded, so only the base criteria were applied. I did not run the suite (this review is read-only), so the claim that it "starts green" is checked by the new workflow's own run, not by this review.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

  • New (confidence: medium) — .github/workflows/self-test.yaml:37-41: if yq is missing, the step downloads a release binary with sudo and installs it without checking its checksum. Pin and check a SHA-256 before running it.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

## Suggestions

In `.github/workflows/self-test.yaml`:
- Around line 37-41: The fallback that installs yq downloads yq_linux_amd64 v4.44.3 into /usr/local/bin with sudo and never checks its integrity. After the curl download and before chmod +x, add a pinned SHA-256 check for that release asset (e.g. `echo "<sha256>  /usr/local/bin/yq" | sudo sha256sum -c -`) so a tampered or substituted binary fails the step instead of running.

Reviewed commit: a70f1c83a62d

@github-actions github-actions 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.

No blocking issues found — see the full review report

The fallback downloaded a release binary and installed it to /usr/local/bin
with sudo, verifying nothing. A release tag can be repointed, so pinning the
tag does not say what ends up executing in CI.

Pin the digest too: SHA-256 of yq_linux_amd64 taken from the v4.44.3
`checksums` release asset, not from the copy I downloaded — cross-checked
against a local download, which matched. Verification happens before the
binary is made executable, and `install -m 0755` replaces the mv + chmod.

Fail-closed confirmed under the shell Actions actually uses
(`bash --noprofile --norc -eo pipefail`): a wrong digest exits 1 and never
reaches the install line. My first attempt to test that was wrong — the
subshell hung off an `&&`, which suppresses `set -e` — and appeared to pass
while failing open.

This path only runs if a future runner image stops shipping yq, which is
exactly when nobody will be watching it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit 2c0a721b0d0a

General PR Review: Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base e6432834cb21.
Review mode: incremental since a70f1c8
View review run

Review Summary

The PR adds .github/workflows/self-test.yaml, which runs make test on PRs and on pushes to main. It adds the pr-review unittest suite to make test-scripts, and moves the PR Review section of the README into docs/pr-review.md. The new commit changes only the yq fallback in self-test.yaml. The fallback now downloads into $RUNNER_TEMP and checks a pinned SHA-256 with sha256sum -c. Only after that check passes does it run sudo install -m 0755 into /usr/local/bin. GitHub runs shell: bash steps with -eo pipefail, so a mismatch fails the step before anything runs as root.

I scanned the full PR diff (4 files) for security and correctness issues. The README links (docs/pr-review.md, #reusable-workflow-calls) resolve to headings that exist, and nothing else in the repo links to the old README anchors. No repo-local criteria loaded, so only the base criteria were applied.

Coverage note: I could not confirm offline that the pinned digest matches the v4.44.3 checksums asset. If it is wrong, the check fails closed: the step fails instead of running an unverified binary. On current runners the fallback is also skipped, because yq is already installed.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

Resolved prior findings

  • Fixed: the previous finding about the yq fallback installing an unverified binary with sudo. .github/workflows/self-test.yaml:45-49 now pins YQ_SHA256 and runs sha256sum -c on the file in $RUNNER_TEMP before sudo install puts it in /usr/local/bin.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit 93e76ff4c0ef

General PR Review: Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base e6432834cb21.
Review mode: incremental since a70f1c8
View review run

Review Summary

The PR adds .github/workflows/self-test.yaml, which runs make test on PRs and on pushes to main. It adds the pr-review unittest suite to make test-scripts, and moves the PR Review section of the README into docs/pr-review.md. The new commit changes only the yq fallback in self-test.yaml. The fallback now downloads into $RUNNER_TEMP and checks a pinned SHA-256 with sha256sum -c. Only after that check passes does it run sudo install -m 0755 into /usr/local/bin. GitHub runs shell: bash steps with -eo pipefail, so a mismatch fails the step before anything runs as root.

I scanned the full PR diff (4 files) for security and correctness issues. The README links (docs/pr-review.md, #reusable-workflow-calls) resolve to headings that exist, and nothing else in the repo links to the old README anchors. No repo-local criteria loaded, so only the base criteria were applied.

Coverage note: I could not confirm offline that the pinned digest matches the v4.44.3 checksums asset. If it is wrong, the check fails closed: the step fails instead of running an unverified binary. On current runners the fallback is also skipped, because yq is already installed.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

Resolved prior findings

  • Fixed: the previous finding about the yq fallback installing an unverified binary with sudo. .github/workflows/self-test.yaml:45-49 now pins YQ_SHA256 and runs sha256sum -c on the file in $RUNNER_TEMP before sudo install puts it in /usr/local/bin.

Reviewed commit: 2c0a721b0d0a

@github-actions github-actions 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.

No blocking issues found — see the full review report

@FeliLucero1 FeliLucero1 self-assigned this Oct 21, 2026
@FeliLucero1
FeliLucero1 marked this pull request as ready for review October 21, 2026 07:40
Review of the first commits found the gate was narrower and noisier than it
claimed.

make test-go enumerated five packages by hand. cmd/release-metadata has nine
tests and was not among them, while two packages that were listed have no
tests at all — the list was stale in both directions. So the PR whose premise
is "nothing runs this repo's tests" was shipping a green check that silently
skipped nine. `go test ./...` closes it and keeps future packages covered by
default. Verified the omitted package passes under `env -i` with no git
identity, which is what the runner has.

The pr-review scripts print `::error::` and `::warning::` as their normal
failure paths, and the tests drive those paths as SUCCESS cases: a passing run
emitted 9 errors and 3 warnings at column zero, which the runner parses as
workflow commands rather than text. Every green self-test would have annotated
its own PR with red errors. `unittest -b` buffers passing tests' output and
fixes the green case at the source — output drops from hundreds of lines to
39, which also makes a real failure findable. A failing test still replays its
captured output, so the step also brackets `make test` in ::stop-commands::.

The yq step's verified-download branch never executed: the runner image ships
yq, so `command -v` always succeeded and the pinned v4.44.3 binary was dead
code — 22 lines explaining a path that does not run, while the suite actually
used the image's unpinned 4.54. That is the cost of pinning with none of the
guarantee. Replaced by asserting presence: yq comes from the image like
python3 and everything else, and if that ever changes this fails loudly here
naming the tool rather than with a bare "command not found" mid-suite.

Concurrency fell back to github.ref on push, so two merges to main shared one
group and the first was cancelled, leaving that commit untested. Now
github.run_id, which is the shape pr-review.yaml and general-pr-review.yaml
already use. Added timeout-minutes: 15 — the job runs PR-head code by design,
and the suite takes seconds, so the 360-minute default is all downside.

Docs: the ANTHROPIC_API_KEY paragraph was copied rather than moved, leaving
two copies of the one instruction with a security consequence. It now lives in
the README only. The input table says it describes pr-review.yaml's inputs
(general-pr-review.yaml declares none) and carries the summary_marker
constraint the action hard-fails on. README's Development section says what
`make test` now gates, what running it locally needs, and that verify.yaml is
not this.

Not added, deliberately: golangci-lint and `make workflow-validate`. The same
argument covers them, but neither has run against this repo and adding an
unproven job would contradict this PR starting green. Noted in the workflow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit 93e76ff4c0ef

General PR Review: Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base e6432834cb21.
Review mode: incremental since 2c0a721
View review run

Review Summary

This PR adds self-test.yaml, which runs make test on PRs and on pushes to main. It adds the pr-review Python suite to make test-scripts and moves the PR Review internals from the README into docs/pr-review.md.

The new commits make these changes:

  • The checksum-pinned yq download is gone. The step now only asserts yq --version.
  • The concurrency group falls back to github.run_id, matching pr-review.yaml:20 and general-pr-review.yaml:9.
  • The job has a 15-minute timeout.
  • test-go now runs go test ./..., which also picks up cmd/release-metadata tests. Go skips _workflow/ because of its leading underscore.
  • unittest runs with -b.
  • make test is wrapped in ::stop-commands::. Its EXIT trap does not mask the make exit status.
  • The README input-table text was corrected.

I checked the new README claims against the source:

  • The summary_marker validation it describes matches .github/actions/pr-review/action.yml:62-72.
  • general-pr-review.yaml really declares no inputs, only the secret.
  • Both cross-doc anchors resolve.

I scanned the full PR diff for security and correctness issues. No repo-local criteria loaded, so only the base criteria applied. No new issues were found and there were no prior inline findings to audit. Two minor trade-offs, neither treated as a finding:

  • The stop-commands wrapper also suppresses annotations from genuine test failures. Failures still show in the log and the job still fails.
  • The suite now depends on the runner image providing yq and uuidgen.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

Resolved prior findings

  • Obsolete: the earlier yq fallback, and its checksum fix noted in the prior summary, have been removed entirely. .github/workflows/self-test.yaml:44-54 now only checks that yq is present, so nothing is downloaded or installed with sudo.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit d404b8c45f9d

General PR Review: Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base e6432834cb21.
Review mode: incremental since 2c0a721
View review run

Review Summary

This PR adds self-test.yaml, which runs make test on PRs and on pushes to main. It adds the pr-review Python suite to make test-scripts and moves the PR Review internals from the README into docs/pr-review.md.

The new commits make these changes:

  • The checksum-pinned yq download is gone. The step now only asserts yq --version.
  • The concurrency group falls back to github.run_id, matching pr-review.yaml:20 and general-pr-review.yaml:9.
  • The job has a 15-minute timeout.
  • test-go now runs go test ./..., which also picks up cmd/release-metadata tests. Go skips _workflow/ because of its leading underscore.
  • unittest runs with -b.
  • make test is wrapped in ::stop-commands::. Its EXIT trap does not mask the make exit status.
  • The README input-table text was corrected.

I checked the new README claims against the source:

  • The summary_marker validation it describes matches .github/actions/pr-review/action.yml:62-72.
  • general-pr-review.yaml really declares no inputs, only the secret.
  • Both cross-doc anchors resolve.

I scanned the full PR diff for security and correctness issues. No repo-local criteria loaded, so only the base criteria applied. No new issues were found and there were no prior inline findings to audit. Two minor trade-offs, neither treated as a finding:

  • The stop-commands wrapper also suppresses annotations from genuine test failures. Failures still show in the log and the job still fails.
  • The suite now depends on the runner image providing yq and uuidgen.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

Resolved prior findings

  • Obsolete: the earlier yq fallback, and its checksum fix noted in the prior summary, have been removed entirely. .github/workflows/self-test.yaml:44-54 now only checks that yq is present, so nothing is downloaded or installed with sudo.

Reviewed commit: 93e76ff4c0ef

@github-actions github-actions 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.

No blocking issues found — see the full review report

@FeliLucero1
FeliLucero1 requested a review from a team October 21, 2026 09:07
@FeliLucero1 FeliLucero1 changed the title Run this repo's own tests, and move the pr-review detail out of the README [CXH-3052] Run this repo's own tests, and move the pr-review detail out of the README Oct 21, 2026
@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

CXH-3052

Comment thread docs/pr-review.md
Comment thread README.md Outdated
FeliLucero1 and others added 2 commits October 21, 2026 19:21
The de-duplication pass caught the ANTHROPIC_API_KEY paragraph and left the
two opening ones, so docs/pr-review.md claimed it does not repeat the README
immediately above two near-copies of it. Dropped the copies rather than the
claim — the README is the short version, and this file keeps only the detail
behind it: the head-SHA checkout and which profile adds which mixin.

The README also called `make test` a "required-by-convention gate", which is
vague and overstates it: whether self-test is a required check is a ruleset
setting that is not set today, as the PR description says. It now states what
is true — the workflow runs on every PR and every push to main — and names
"required" as the separate decision it is.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
main gained the CA-incident work while this branch was open. The only conflict
is the Makefile, where this branch replaced the hand-written test-go package
list with ./... and main added a ca-trust-guard line to that same list.

Kept both. ./... covers every package including ca-trust-guard, and main's
second line stays because it asserts something ./... does not: that
ca-trust-guard passes with GOTOOLCHAIN=local and GOPROXY=off, with no
toolchain fetch and no module proxy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@FeliLucero1
FeliLucero1 requested a review from a team October 21, 2026 22:27
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit d404b8c45f9d

General PR Review: [CXH-3052] Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base 99f9b2fc150f.
Review mode: full
View review run

Review Summary

This PR adds .github/workflows/self-test.yaml, which runs make test on PRs and on pushes to main. The workflow has read-only contents permission, persist-credentials: false, a 15-minute timeout and a concurrency group keyed on PR number or run_id, and it wraps make test in ::stop-commands::. The PR also widens test-go to go test ./... and adds the pr-review Python unittest suite to test-scripts. Finally, it moves the PR Review internals from README.md into docs/pr-review.md and adds an input table to the README.

I scanned the full diff for security and correctness. The checks below came out clean:

  • The only go.mod is at the repo root. go test ./... covers every cmd/* and pb/ package, and Go ignores the leading-underscore _workflow/ directory.
  • The unittest discover pattern matches the six test_*.py files in .github/actions/pr-review/scripts.
  • The README input table matches pr-review.yaml:5-14, where review_prompt defaults to connector and summary_marker to "". general-pr-review.yaml declares no inputs.
  • The new cross-links resolve, and nothing still links to the README anchors that were removed.

No repo-local criteria loaded, so only the base criteria were applied. There were no prior findings to audit.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@FeliLucero1

Copy link
Copy Markdown
Contributor Author

Heads up @gontzess — this PR just went red, and it is not this PR's change. Turning make test on in CI surfaced a pre-existing break in scripts/test-tool-integrity.py from #161.

Both failures are the same line shape:

json.loads(subprocess.check_output(["yq", ".", str(ROOT / ".github/workflows/release.yaml")], text=True))
# json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

yq "." emits JSON under the Python yq (kislyuk, a jq wrapper) and YAML under the Go yq (mikefarah). The GitHub runner image ships the Go one — yq (https://github.com/mikefarah/yq/) version v4.54.1, from this job's own log. So json.loads gets YAML and raises.

Confirmed it is pre-existing rather than mine: scripts/test-tool-integrity.py fails identically on a clean checkout of main, and the two failing tests are test_composite_metadata_and_single_canonical_lock (line 377) and test_workflow_security_wiring (line 397). It has simply never run anywhere, because nothing in the repo ran make test — which is exactly what this PR changes.

I have not touched it. It is two days old, it is yours, and it is part of the incident work, so the call on how to fix it is yours — yq -o=json is mikefarah-only syntax, and tolerating both implementations is a slightly different change. Happy to do either if you tell me which, or to leave it to you.

In the meantime this PR's own check stays red, which I would rather leave visible than hide: a green make test that skips the one broken file is the problem this PR exists to fix.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit 5098be1d9800

General PR Review: [CXH-3052] Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base 99f9b2fc150f.
Review mode: full
View review run

Review Summary

This PR adds .github/workflows/self-test.yaml, which runs make test on PRs and on pushes to main. The workflow has read-only contents permission, persist-credentials: false, a 15-minute timeout and a concurrency group keyed on PR number or run_id, and it wraps make test in ::stop-commands::. The PR also widens test-go to go test ./... and adds the pr-review Python unittest suite to test-scripts. Finally, it moves the PR Review internals from README.md into docs/pr-review.md and adds an input table to the README.

I scanned the full diff for security and correctness. The checks below came out clean:

  • The only go.mod is at the repo root. go test ./... covers every cmd/* and pb/ package, and Go ignores the leading-underscore _workflow/ directory.
  • The unittest discover pattern matches the six test_*.py files in .github/actions/pr-review/scripts.
  • The README input table matches pr-review.yaml:5-14, where review_prompt defaults to connector and summary_marker to "". general-pr-review.yaml declares no inputs.
  • The new cross-links resolve, and nothing still links to the README anchors that were removed.

No repo-local criteria loaded, so only the base criteria were applied. There were no prior findings to audit.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.


Reviewed commit: d404b8c45f9d

@github-actions github-actions 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.

No blocking issues found — see the full review report

@sergiocorral-conductorone sergiocorral-conductorone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review. drafted 4 → confirmed 4, low-confidence 0, dropped 0, added 0 (panel: opus-5.5 / gpt-6-astra / gemini-4-argon, all high). The Makefile and docs moves look good. The new self-test.yaml fails its own check and duplicates ci.yaml. Linked ticket CXH-3052 body could not be read, so its Fix-list coverage was not checked.

Comment thread .github/workflows/self-test.yaml Outdated
Comment thread .github/workflows/self-test.yaml Outdated
Comment thread README.md Outdated
Comment thread .github/workflows/self-test.yaml Outdated
@FeliLucero1

Copy link
Copy Markdown
Contributor Author

Correction to my comment above, and apologies for the noise @gontzess — test-tool-integrity.py is not broken. I was wrong, and @sergiocorral-conductorone put his finger on why.

The apt yq package is kislyuk's Python/jq yq, and ci.yaml installs exactly that (sudo apt-get install --yes jq yq gettext-base, then echo /usr/bin >> "$GITHUB_PATH"). So under ci.yaml the test gets the yq it expects and passes — shell-tests=success on this PR's own head, running make test-scripts including the line this PR adds.

What actually failed was my self-test.yaml, which asserted that some yq exists and got the runner image's mikefarah build. The breakage was mine, in a file this PR adds, not yours in #161.

I also had the history wrong. I said nothing ran make test; ci.yaml does, and it landed in e9b91a2 yesterday at 18:05 as part of the incident batch — after this PR was opened. So the premise was true when I wrote it and stopped being true the same day. That is on me for not re-checking after merging main, not on anyone for landing it.

Removing self-test.yaml from this PR now. Nothing of value is lost: ci.yaml's shell-tests job already runs the pr-review suite via the Makefile line, which is the part of this PR that was actually missing.

@sergiocorral-conductorone caught that this duplicates .github/workflows/ci.yaml
("Repository CI"), which runs go vet ./... , go test ./... and make
test-scripts on pull requests and pushes to main. Since this branch adds the
pr-review suite to make test-scripts, ci.yaml's shell-tests job already runs
it — and did, passing on this PR's own head while self-test failed.

The premise this branch opened with was true when it was written and stopped
being true the same day: ci.yaml landed in e9b91a2 yesterday at 18:05 as part
of the CA-incident batch, after this PR existed. I merged main and did not
re-check it.

Dropping the workflow also removes the yq problem it had, rather than fixing
it. The apt yq package is kislyuk's Python/jq build, which is what the script
tests need; ci.yaml installs that explicitly and puts it first on PATH, while
self-test.yaml asserted only that *some* yq existed and got the runner image's
mikefarah build. That was the failure I reported as a pre-existing break in
test-tool-integrity.py — it was not one, and the comment is corrected on the
PR.

What remains is the part that was genuinely missing: the Makefile line, which
ci.yaml now runs. The README says which yq is required and why, since getting
that wrong is exactly what cost this branch a round.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Superseded — see the current review report for commit 5098be1d9800

General PR Review: [CXH-3052] Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base 99f9b2fc150f.
Review mode: incremental since d404b8c
View review run

Review Summary

The PR changes three things. test-go now runs go test ./.... test-scripts now runs the pr-review unittest suite. Most of the PR Review section moved out of the README into docs/pr-review.md, with headings demoted one level. The new commit deletes the proposed self-test.yaml and points the README's Development section at the existing ci.yaml instead. That works: ci.yaml's shell-tests job runs make test-scripts and installs the Python yq. Its go-tests job runs go test ./.... Its path filters include .github/actions/** and Makefile, so pr-review script changes trigger the new suite. Running unittest with -b buffers output from passing tests, so the expected ::error:: lines from those tests don't become workflow annotations. That was the reason self-test.yaml used stop-commands. I scanned the full PR diff for security and correctness issues. No repo-local criteria loaded, so only the base criteria apply. I checked the doc anchors (docs/pr-review.md#reusable-workflow-calls, ../README.md#reusable-workflow-calls) and both resolve.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

  • New (high confidence): the PR description no longer matches the diff. It still says the PR "adds … a self-test.yaml that runs make test on PRs and pushes to main", shows a flowchart with self-test.yaml, and discusses whether self-test should be a required check. Commit 5098be1 deleted that workflow; the repo now relies on the existing ci.yaml ("Repository CI"), and the README (README.md:348-357) already says so. The description also says yq is "installed explicitly" by the new workflow. That is now done by ci.yaml:72-75 instead. Update the description so whoever merges this has an accurate record.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

## Suggestions

In the PR description (not a file):
- The description still says this PR adds `.github/workflows/self-test.yaml`, shows it in the mermaid flowchart, and asks whether `self-test` should be a required check. Commit 5098be1 deleted that file in favor of the existing `.github/workflows/ci.yaml` ("Repository CI"), which runs `go test ./...` and `make test-scripts` and installs the Python `yq`. Rewrite those parts of the description: the new suite runs via ci.yaml's `shell-tests` job, and the "required check" question now applies to the Repository CI jobs.

@FeliLucero1 FeliLucero1 changed the title [CXH-3052] Run this repo's own tests, and move the pr-review detail out of the README [CXH-3052] Run the pr-review tests in CI, and move the pr-review detail out of the README Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

General PR Review: [CXH-3052] Run this repo's own tests, and move the pr-review detail out of the README

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Criteria: Criteria status: none loaded - .claude/skills/ci-review.md was not found at trusted base 99f9b2fc150f.
Review mode: incremental since d404b8c
View review run

Review Summary

The PR changes three things. test-go now runs go test ./.... test-scripts now runs the pr-review unittest suite. Most of the PR Review section moved out of the README into docs/pr-review.md, with headings demoted one level. The new commit deletes the proposed self-test.yaml and points the README's Development section at the existing ci.yaml instead. That works: ci.yaml's shell-tests job runs make test-scripts and installs the Python yq. Its go-tests job runs go test ./.... Its path filters include .github/actions/** and Makefile, so pr-review script changes trigger the new suite. Running unittest with -b buffers output from passing tests, so the expected ::error:: lines from those tests don't become workflow annotations. That was the reason self-test.yaml used stop-commands. I scanned the full PR diff for security and correctness issues. No repo-local criteria loaded, so only the base criteria apply. I checked the doc anchors (docs/pr-review.md#reusable-workflow-calls, ../README.md#reusable-workflow-calls) and both resolve.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

  • New (high confidence): the PR description no longer matches the diff. It still says the PR "adds … a self-test.yaml that runs make test on PRs and pushes to main", shows a flowchart with self-test.yaml, and discusses whether self-test should be a required check. Commit 5098be1 deleted that workflow; the repo now relies on the existing ci.yaml ("Repository CI"), and the README (README.md:348-357) already says so. The description also says yq is "installed explicitly" by the new workflow. That is now done by ci.yaml:72-75 instead. Update the description so whoever merges this has an accurate record.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

## Suggestions

In the PR description (not a file):
- The description still says this PR adds `.github/workflows/self-test.yaml`, shows it in the mermaid flowchart, and asks whether `self-test` should be a required check. Commit 5098be1 deleted that file in favor of the existing `.github/workflows/ci.yaml` ("Repository CI"), which runs `go test ./...` and `make test-scripts` and installs the Python `yq`. Rewrite those parts of the description: the new suite runs via ci.yaml's `shell-tests` job, and the "required check" question now applies to the Repository CI jobs.

Reviewed commit: 5098be1d9800

@github-actions github-actions 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.

No blocking issues found — see the full review report

@FeliLucero1

Copy link
Copy Markdown
Contributor Author

On the one open suggestion in the latest report — the description was already rewritten, in the same sitting as 5098be1 but after the review had read it. Checking the live body:

claim live body
says the PR "adds … a self-test.yaml" no — the two mentions are the paragraph explaining it was dropped
shows a mermaid flowchart with self-test.yaml no mermaid block at all
discusses whether self-test should be a required check not present
says the new workflow installs yq no — it says ci.yaml does, 4 mentions

So the finding was accurate when the run read it and is not now. Noting it rather than leaving a stale "Suggestions: 1" for whoever picks this up.

This is the third time in this series that a description edit landed just after the run that read it. Not the re-post problem #156 fixes — that one is about threads — and probably not worth fixing: it is inherent to editing a description after pushing. Worth knowing when reading a report, though.

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.

4 participants