Skip to content

Commit 7dbe61e

Browse files
committed
ci(verify-network): apply on schedule + bot-attributed promotion PR
The weekly schedule now applies (opens a TechEngineBot-attributed promotion PR for review) instead of dry-run-only, so verified actually moves. Commit attributed to TechEngineBot; diff-scope guard excludes the ledger. Refs #1
1 parent ac1bbb0 commit 7dbe61e

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/verify-network.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
runs-on: ubuntu-latest
3232
env:
3333
PYTHONIOENCODING: utf-8
34+
# Apply (open a promotion PR) on the weekly schedule and on manual apply=true.
35+
# Manual runs without apply stay dry-run for previewing.
36+
APPLY: ${{ github.event_name == 'schedule' || github.event.inputs.apply == 'true' }}
3437
steps:
3538
- uses: actions/checkout@v4
3639
with:
@@ -61,22 +64,24 @@ jobs:
6164
run: python -m app.verify promote
6265

6366
- name: Tier 3 promote (apply)
64-
if: ${{ github.event.inputs.apply == 'true' }}
67+
if: ${{ env.APPLY == 'true' }}
6568
run: python -m app.verify promote --apply
6669

6770
- name: Structural validator self-check
68-
if: ${{ github.event.inputs.apply == 'true' }}
71+
if: ${{ env.APPLY == 'true' }}
6972
run: python -m app.validate
7073

7174
# Guard: the only tracked changes may be `verified` toggles in data/**.json
7275
# plus the promotion ledger. Anything else fails the run loudly.
7376
- name: Guard diff scope
74-
if: ${{ github.event.inputs.apply == 'true' }}
77+
if: ${{ env.APPLY == 'true' }}
7578
run: |
7679
python - <<'PY'
7780
import subprocess, sys
78-
out = subprocess.run(["git", "diff", "--unified=0", "--", "data/"],
79-
capture_output=True, text=True).stdout
81+
# Record files only — the promotion ledger (data/_verify/) is expected to change.
82+
out = subprocess.run(
83+
["git", "diff", "--unified=0", "--", "data/", ":(exclude)data/_verify/**"],
84+
capture_output=True, text=True).stdout
8085
bad = []
8186
for line in out.splitlines():
8287
if line.startswith(("+++", "---", "@@", "diff ", "index ")):
@@ -93,7 +98,7 @@ jobs:
9398
PY
9499
95100
- name: Open promotion PR
96-
if: ${{ github.event.inputs.apply == 'true' }}
101+
if: ${{ env.APPLY == 'true' }}
97102
env:
98103
GH_TOKEN: ${{ secrets.TECHAPI_TOKEN || secrets.GITHUB_TOKEN }}
99104
run: |
@@ -102,13 +107,13 @@ jobs:
102107
echo "no promotions to commit"; exit 0
103108
fi
104109
branch="verify/promote-${{ github.run_id }}"
105-
git config user.name "github-actions[bot]"
106-
git config user.email "github-actions[bot]@users.noreply.github.com"
110+
git config user.name "TechEngineBot"
111+
git config user.email "289859915+TechEngineBot@users.noreply.github.com"
107112
git checkout -b "$branch"
108113
git add data/
109114
git commit -m "data(verify): promote records to verified via cross-reference
110115
111-
Auto-promotions from the verification layer (green+live-T1 or crossref-confirm).
116+
Auto-promotions from the verification layer (green+live-source or crossref-confirm).
112117
Each flip is verified:false->true only; see data/_verify/ledger.jsonl. Refs #1"
113118
git push origin "$branch"
114119
gh pr create --base main --head "$branch" \

0 commit comments

Comments
 (0)