From 76db4aadb5fff7362a7fdc67f07ce5a6a465ba27 Mon Sep 17 00:00:00 2001 From: chaim Date: Wed, 2 Sep 2026 04:41:53 +0300 Subject: [PATCH] =?UTF-8?q?ci(int9):=20=D7=97=D7=99=D7=95=D7=95=D7=98=20?= =?UTF-8?q?=D7=A9=D7=A2=D7=A8-INV-INT9=20=D7=9C-Gitea=20Actions=20(legal-a?= =?UTF-8?q?i=20#618)=20=E2=80=94=20=D7=97=D7=A1=D7=95=D7=9D=20=D7=A2=D7=93?= =?UTF-8?q?=20=D7=A9=D7=99=D7=99=D7=A8=D7=A9=D7=9D=20runner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit הסקריפט `scripts/int9-guard.mjs` כבר ב-`main` (PR #14) ורץ ידנית דרך `npm run int9:guard`. הקובץ כאן הוא החיווט שלו ל-CI. **אל תמזג לפני שיירשם runner ל-plugin-legal-ai.** ה-runner היחיד על nautilus רשום בהיקף-repo ל-`legal-ai` בלבד (`action_runner.repo_id = 6`), ולכן job של הריפו הזה לא נאסף לעולם — נמדד: ריצה 3200 / job 3250 ב-`queued` עם `started_at: 1970-01-01`, בזמן שה-runner היה `busy: false` והריץ 7/7 שערים של legal-ai. מיזוג עכשיו היה מייצר check תקוע-לנצח על **כל** PR עתידי בריפו. ה-PR הזה הוא גם המדידה: ביום שיירשם runner הוא יהפוך לירוק מעצמו. Refs ezer-mishpati/legal-ai#618 Co-Authored-By: Claude Opus 5 (1M context) --- .gitea/workflows/int9-guard.yaml | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitea/workflows/int9-guard.yaml diff --git a/.gitea/workflows/int9-guard.yaml b/.gitea/workflows/int9-guard.yaml new file mode 100644 index 0000000..4cda401 --- /dev/null +++ b/.gitea/workflows/int9-guard.yaml @@ -0,0 +1,41 @@ +name: INV-INT9 issue.status write-ownership + +# Hard gate for INV-INT9 (legal-ai docs/spec/X7-paperclip-client-params.md +# §4): `issue.status` has exactly one legitimate writer — the +# `sync-case-status` scheduled job (`ctx.jobs.register("sync-case-status", …)` +# in src/worker.ts), which mirrors legal-ai's case status onto the linked +# Paperclip issue. Built after legal-ai issue #446, where a second, unnoticed +# writer flip-flopped an issue `done → in_progress` — nobody caught it because +# nothing enforced write-ownership. This gate makes sure a third writer never +# lands the same way again: any `ctx.issues.update(...)` call that touches +# `status` outside the `sync-case-status` job fails the build, unless it +# carries an explicit, justified `// noqa: INT9 — ` (a bare noqa with +# no reason is itself a violation — exceptions must be argued in writing). +# +# Pure Node, zero dependencies (scripts/int9-guard.mjs) — no `npm ci` needed. +# +# ⚠️ חסום למיזוג. אין היום runner ל-Gitea Actions בהיקף הריפו הזה: ה-runner +# היחיד על nautilus רשום בהיקף-repo ל-`legal-ai` בלבד (`action_runner.repo_id = 6`), +# ולכן job שנפתח כאן לא נאסף לעולם — נמדד ב-legal-ai #618: ריצה 3200 / job 3250 +# ישבה ב-`queued` עם `started_at: 1970-01-01` בזמן שה-runner היה `busy: false`. +# ה-PR הזה נשאר פתוח **בכוונה** ומשמש כמדידה: ביום שיירשם runner לריפו הזה הוא +# יהפוך לירוק מעצמו, וזו תהיה הראיה ש-AC2 של #618 סופק. עד אז השער רץ ידנית: +# `npm run int9:guard` · `npm run int9:guard:self-test`. + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + int9-guard: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: INV-INT9 — issue.status write-ownership guard + run: node scripts/int9-guard.mjs + + - name: Self-test — הוכחה שהשער נושך (AC5) + run: node scripts/int9-guard.mjs --self-test -- 2.49.1