Skip to content

Commit 25c5d7f

Browse files
bradygasterCopilot
andcommitted
fix: align repo-health fixtures with git transport
Closes #1800 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 251e256 commit 25c5d7f

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎.github/REPO_HEALTH_RUNBOOK.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,23 @@ check on the implementation PR green.
2121
## Authoritative post-merge canary
2222

2323
Run this only after the workflow/helper change is on `dev`. It creates a disposable branch and PR
24-
whose filename contains paired backticks, a bare `${`, an apostrophe, a double quote, and a
25-
newline. The filename is data; do not execute it.
24+
whose filename contains paired backticks, a bare `${`, an apostrophe, and a double quote. The
25+
filename is data; do not execute it. Multiline transport coverage belongs in scanner diagnostic
26+
messages, because the leakage scanner consumes Git's line-delimited `--name-only` output.
2627

2728
```bash
2829
git fetch origin dev
2930
git switch --create canary/repo-health-$(date +%s) origin/dev
3031

3132
node --input-type=module <<'NODE'
3233
import { mkdirSync, writeFileSync } from 'node:fs';
33-
const path = '.squad/canary-`paired`-${-apostrophe-\'-"double quote"\nsecond-line.md';
34+
const path = '.squad/canary-`paired`-${-apostrophe-\'-"double quote".md';
3435
mkdirSync('.squad', { recursive: true });
3536
writeFileSync(path, 'repo-health post-merge canary\n');
3637
NODE
3738

3839
CANARY_PATH=$(node --input-type=module -e \
39-
'process.stdout.write(".squad/canary-`paired`-${-apostrophe-'\''-\"double quote\"\nsecond-line.md")')
40+
'process.stdout.write(".squad/canary-`paired`-${-apostrophe-'\''-\"double quote\".md")')
4041
git add -- "$CANARY_PATH"
4142
git commit -m 'test: repo-health post-merge canary'
4243
git push -u origin HEAD
@@ -50,7 +51,7 @@ exact hostile filename:
5051

5152
```bash
5253
EXPECTED=$(node --input-type=module -e \
53-
'process.stdout.write(".squad/canary-`paired`-${-apostrophe-'\''-\"double quote\"\nsecond-line.md")')
54+
'process.stdout.write(".squad/canary-`paired`-${-apostrophe-'\''-\"double quote\".md")')
5455

5556
gh api --paginate --slurp "repos/bradygaster/squad/issues/$PR_NUMBER/comments" \
5657
> canary-comments.json

‎.github/workflows/squad-repo-health-shadow.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
echo '# Repo Health PR-head Shadow'
4949
echo
5050
echo '> **NON-AUTHORITATIVE:** These scanners came from the PR head and have no write token.'
51-
echo '> Only a post-merge canary through `Repo Health` is authoritative for workflow/reporter changes.'
51+
printf '%s\n' "> Only a post-merge canary through \`Repo Health\` is authoritative for workflow/reporter changes."
5252
echo
5353
echo '## Squad leakage'
5454
echo '```text'

‎test/scripts/repo-health-comment-transport.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ const HOSTILE_MESSAGE =
205205
'plus a bare ${ opener, an apostrophe \' and a "double quote".\nSecond line of the message.';
206206

207207
const HOSTILE_PATH =
208-
'.squad/using-`git cherry-pick`-and-${-an-apostrophe-\'-and-"double quote"\nsecond-line.md';
208+
'.squad/using-`git cherry-pick`-and-${-an-apostrophe-\'-and-"double quote".md';
209209

210210
function securityReport() {
211211
const payload = {

0 commit comments

Comments
 (0)