Skip to content

Commit 65d5cd6

Browse files
Copilotacoyfellow
andcommitted
Address review updates
Co-authored-by: acoyfellow <1666099+acoyfellow@users.noreply.github.com>
1 parent 2503208 commit 65d5cd6

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/ralph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
ralph:
12-
if: ${{ github.event_name == 'workflow_dispatch' || github.actor == 'Copilot' || github.actor == 'copilot-swe-agent[bot]' }}
12+
if: ${{ github.event_name == 'workflow_dispatch' || github.actor_id == 198982749 }}
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout

scripts/ralph/guard.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [[ ! -f "${constraints_file}" ]]; then
1818
exit 1
1919
fi
2020

21-
if grep -Eq "^-\\s*PAUSED:\\s*true" AGENTS.md; then
21+
if grep -Eq "^[[:space:]-]*PAUSED:[[:space:]]*true" AGENTS.md; then
2222
echo "Guard blocked: AGENTS.md is paused" >&2
2323
exit 1
2424
fi
@@ -35,6 +35,8 @@ if [[ -z "${files_changed}" ]]; then
3535
exit 0
3636
fi
3737

38+
readarray -t changed_list <<< "${files_changed}"
39+
3840
file_count=$(echo "${files_changed}" | wc -l | tr -d ' ')
3941
if [[ "${max_files}" -gt 0 && "${file_count}" -gt "${max_files}" ]]; then
4042
echo "Guard failed: ${file_count} files changed (max ${max_files})." >&2
@@ -48,11 +50,14 @@ if [[ "${max_lines}" -gt 0 && "${line_total}" -gt "${max_lines}" ]]; then
4850
fi
4951

5052
if [[ ${#forbidden_paths[@]} -gt 0 ]]; then
51-
for path in "${forbidden_paths[@]}"; do
52-
if echo "${files_changed}" | grep -E "^${path}(/|$)" >/dev/null 2>&1; then
53-
echo "Guard failed: forbidden path touched (${path})." >&2
54-
exit 1
55-
fi
53+
for file in "${changed_list[@]}"; do
54+
for path in "${forbidden_paths[@]}"; do
55+
[[ -z "${path}" ]] && continue
56+
if [[ "${file}" == "${path}" || "${file}" == "${path}/"* ]]; then
57+
echo "Guard failed: forbidden path touched (${path})." >&2
58+
exit 1
59+
fi
60+
done
5661
done
5762
fi
5863

scripts/ralph/prd.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"id": "S3",
24-
"title": "Make README describe how to run",
24+
"title": "Update README with usage instructions",
2525
"status": "todo",
2626
"acceptanceCriteria": [
2727
"README documents the Ralph loop triggers",

scripts/ralph/progress.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Ralph Progress
22
- Initialized scaffold and baseline state.
3+
- Clarified story naming and guard behavior.

0 commit comments

Comments
 (0)