Skip to content

docs: update the README actions/checkout pin example to v7.0.0 (#53)#63

Open
d-morrison wants to merge 1 commit into
mainfrom
claude/focused-lovelace-70fd6s
Open

docs: update the README actions/checkout pin example to v7.0.0 (#53)#63
d-morrison wants to merge 1 commit into
mainfrom
claude/focused-lovelace-70fd6s

Conversation

@d-morrison

@d-morrison d-morrison commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Reduced to a single doc fix.

This PR originally bundled #60 / #43 / #62 / #53, but while it was open those landed on main independently via #69 (check-phi tests), #66 (summary hardening), #64 (WORKFLOW_TOKEN comment), and #65 (quarto example). After rebasing onto main, the only change left that main doesn't already have is the #53 doc nit:

  • README.md's "Pinning third-party actions" example still showed actions/checkout@… # v4.3.1, while every workflow + composite in the repo now pins # v7.0.0. Updated the example to match so the doc reads like the actual code.

One line; no functional change.

Copilot AI review requested due to automatic review settings June 20, 2026 19:43
@github-actions github-actions Bot removed the request for review from Copilot June 20, 2026 19:43
@claude

This comment has been minimized.

Copilot AI review requested due to automatic review settings June 20, 2026 19:45
@github-actions github-actions Bot removed the request for review from Copilot June 20, 2026 19:45
@claude

This comment has been minimized.

Comment thread check-phi/tests/test_check_phi.py Outdated
Comment thread check-phi/tests/test_check_phi.py Outdated
Comment thread .github/workflows/summary.yml

- name: Comment with AI summary
# Skip when the model returns nothing, so we never post an empty comment.
if: steps.inference.outputs.response != ''

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.

The != '' check catches a truly empty string but won't guard against a whitespace-only response (e.g. " \n"), which would still post a blank-looking comment. GitHub Actions expressions don't support a trim() function, so the only clean fix would be to route through an intermediate shell step that trims and re-exports the value. Minor, but worth noting if blank comments have been observed.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Keeping != '' as-is for parity with qwt's standalone summary.yml (the explicit goal of #43 — so qwt can migrate without behavior drift). A whitespace-only response from the summarizer is a negligible risk, and the only clean fix (an intermediate shell step that trims and re-exports) is more machinery than this edge case warrants. Happy to add the trim step if you'd prefer the extra robustness over parity.


Generated by Claude Code

d-morrison pushed a commit that referenced this pull request Jun 20, 2026
… limit

From the automated review of PR #63 (all non-blocking):
- check-phi tests: remove the unused `import sys`.
- check-phi tests: tearDown now removes the per-test tmpdir (shutil.rmtree),
  matching stdlib convention instead of leaking it.
- summary.yml: document that the ===ISSUE=== markers are a best-effort guard
  (a crafted body can still spoof the closing marker; a full fix needs
  structured ai-inference inputs, which the action doesn't expose).

Kept the `response != ''` guard as-is for parity with qwt's standalone workflow
(#43); a whitespace-only AI summary is a negligible risk that doesn't warrant an
extra trim step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKLYLEuXjYyvnmfXdwdpdG
Copilot AI review requested due to automatic review settings June 20, 2026 19:55

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.

Pull request overview

This PR closes several small backlog follow-ups by adding automated unit coverage for the check-phi detectors, hardening the summary reusable workflow against prompt-injection/blank outputs, and applying a couple of documentation/comment cleanups to keep guidance aligned with current behavior.

Changes:

  • Add a stdlib unittest suite for check-phi detectors (including a git-backed diff-scope fixture) and run it in CI via a new _selftest.yml job.
  • Harden .github/workflows/summary.yml by wrapping issue content in explicit untrusted-data markers and skipping comment posting on empty model output.
  • Minor doc/comment updates (README checkout pin example; condensed WORKFLOW_TOKEN comment; changelog entries).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Updates the example actions/checkout SHA pin comment to match current usage.
check-phi/tests/test_check_phi.py Adds unit tests for all check-phi detectors plus diff-scope coverage for csv_phi_header.
CHANGELOG.md Records the new test harness and summary hardening in the unreleased changelog.
.github/workflows/summary.yml Adds prompt-injection hardening markers and prevents posting blank comments.
.github/workflows/claude.yml Condenses WORKFLOW_TOKEN inline documentation to a short pointer.
.github/workflows/_selftest.yml Excludes PHI test fixtures from whole-tree scans and adds a dedicated phi-tests job to run the new unit suite.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/summary.yml Outdated
Comment on lines +20 to +24
# The ===ISSUE=== markers are a best-effort prompt-injection guard: a
# crafted body could still spoof the closing marker. A stronger fix needs
# structured (non-interpolated) inputs, which actions/ai-inference doesn't
# expose. Worst case here is a manipulated summary comment — this job only
# holds issues:write + models:read.
Comment thread check-phi/tests/test_check_phi.py Outdated
Comment on lines +25 to +27
_spec = importlib.util.spec_from_file_location("check_phi", _MODULE_PATH)
check_phi = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(check_phi)
@claude

This comment has been minimized.

Comment thread check-phi/tests/test_check_phi.py Outdated
(path, lineno)
for path, lineno, text in rows
for _ in check_phi._detect_csv_phi_header(path, lineno, text)
]

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.

The inner comprehension for _ in check_phi._detect_csv_phi_header(...) iterates once per hit per column, not once per row. If a CSV row has two PHI-suggestive columns (e.g. "ssn,mrn\n"), _csv_hits returns [("patients.csv", 1), ("patients.csv", 1)] — a duplicated tuple per column hit. The current tests only exercise single-column hits so they pass either way, but a future test asserting == [("patients.csv", 1)] on a two-column fixture would fail with a confusing duplicate.

If "at least one hit on this row" is the intended contract, deduplicate with dict.fromkeys:

Suggested change
]
def _csv_hits(self, base_ref):
rows = check_phi._scan_lines_diff(base_ref, [])
self.assertIsNotNone(rows, "diff scan should succeed in a real repo")
return list(dict.fromkeys(
(path, lineno)
for path, lineno, text in rows
if check_phi._detect_csv_phi_header(path, lineno, text)
))

d-morrison pushed a commit that referenced this pull request Jun 20, 2026
The diff-scan helper iterated once per column hit, so a row with multiple
PHI-suggestive headers would return duplicate (path, lineno) tuples. Collapse
to one entry per row with >=1 hit via dict.fromkeys, matching the intended
"rows where a PHI header was detected" contract (review nit on #63).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKLYLEuXjYyvnmfXdwdpdG
Copilot AI review requested due to automatic review settings June 20, 2026 21:27

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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

The "Pinning third-party actions" example still showed `# v4.3.1` while every
workflow in the repo now pins `actions/checkout` at `# v7.0.0`; update the doc
example to match so it reads like the actual code.

(#60/#43/#62/#61 — the rest of this PR's original scope — landed on main
independently via #69/#66/#64/#65, so this branch is reduced to just the #53
doc fix.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKLYLEuXjYyvnmfXdwdpdG
@d-morrison d-morrison force-pushed the claude/focused-lovelace-70fd6s branch from 7eace3c to 41c9457 Compare June 20, 2026 21:55
@claude

claude Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Claude finished @d-morrison's task in 1m 12s —— View job


Code Review — PR #63

  • Load tools
  • Read the diff
  • Verify SHA against workflow files
  • Post findings

Overall verdict: LGTM

The PR currently contains a single change: updating the illustrative actions/checkout SHA-pin example in README.md from the old v4.3.1 SHA to the SHA actually in use everywhere.

Hallucination check — clean

SHA 9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 was verified against every workflow and composite-action file in the repo:

  • 17 .github/workflows/*.yml files — all pinned to this exact SHA ✓
  • preview/action.yml — same SHA ✓

No mismatch between the example and the actual usage. The v4.3.1 SHA (34e114876b0b11c390a56381ad16ebd13914f8d5) is gone from all files; the README example now reflects current reality.

No issues found. Nothing to block merge.


Prior review (commit range before this sync): see the previous comment above — all prior findings were resolved.

@d-morrison d-morrison changed the title Clean up issue backlog: check-phi tests, summary hardening, doc/comment nits docs: update the README actions/checkout pin example to v7.0.0 (#53) Jun 20, 2026
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.

3 participants