Compare commits
3 Commits
fix/604-pa
...
41305fbb36
| Author | SHA1 | Date | |
|---|---|---|---|
| 41305fbb36 | |||
| 511d5c6e34 | |||
| 10d6216bec |
@@ -7,6 +7,7 @@ import { test } from "node:test";
|
|||||||
// resolver does not remap `.js` specifiers to `.ts` files at runtime).
|
// resolver does not remap `.js` specifiers to `.ts` files at runtime).
|
||||||
import type { StatusModelEntry } from "./legal-api.ts";
|
import type { StatusModelEntry } from "./legal-api.ts";
|
||||||
import {
|
import {
|
||||||
|
isWritableStatus,
|
||||||
labelFor,
|
labelFor,
|
||||||
pickSyncTargetIssue,
|
pickSyncTargetIssue,
|
||||||
resolveIssueStatus,
|
resolveIssueStatus,
|
||||||
@@ -102,15 +103,18 @@ test("שורש יחיד ב-todo: נבחר", () => {
|
|||||||
assert.equal(result.writableRoots, 1);
|
assert.equal(result.writableRoots, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("שורש יחיד ב-in_review: לא נכתב (הגנת auto-block)", () => {
|
// הכרעת #626 (2026-08-26): in_review כבר לא ב-NON_WRITABLE_STATUSES —
|
||||||
|
// שורש יחיד ב-in_review עכשיו נבחר כיעד-כתיבה, במקום להיחסם.
|
||||||
|
test("שורש יחיד ב-in_review: נבחר (הכרעת #626 — 2026-08-26)", () => {
|
||||||
const candidates: SyncCandidate[] = [
|
const candidates: SyncCandidate[] = [
|
||||||
{ id: "root-1", status: "in_review", parentId: null, companyId: "c1" },
|
{ id: "root-1", status: "in_review", parentId: null, companyId: "c1" },
|
||||||
];
|
];
|
||||||
|
|
||||||
const result = pickSyncTargetIssue(candidates);
|
const result = pickSyncTargetIssue(candidates);
|
||||||
|
|
||||||
assert.equal(result.target, null);
|
assert.equal(result.target?.id, "root-1");
|
||||||
assert.equal(result.reason, "no_writable_root");
|
assert.equal(result.reason, "ok");
|
||||||
|
assert.equal(result.writableRoots, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("שורש יחיד ב-blocked: לא נכתב", () => {
|
test("שורש יחיד ב-blocked: לא נכתב", () => {
|
||||||
@@ -124,6 +128,14 @@ test("שורש יחיד ב-blocked: לא נכתב", () => {
|
|||||||
assert.equal(result.reason, "no_writable_root");
|
assert.equal(result.reason, "no_writable_root");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("isWritableStatus: הגבול המלא בין בר-כתיבה ללא-בר-כתיבה", () => {
|
||||||
|
assert.equal(isWritableStatus("in_review"), true);
|
||||||
|
assert.equal(isWritableStatus("blocked"), false);
|
||||||
|
assert.equal(isWritableStatus("done"), false);
|
||||||
|
assert.equal(isWritableStatus("cancelled"), false);
|
||||||
|
assert.equal(isWritableStatus("todo"), true);
|
||||||
|
});
|
||||||
|
|
||||||
test("שני שורשים ברי-כתיבה: ambiguous, לא נכתב", () => {
|
test("שני שורשים ברי-כתיבה: ambiguous, לא נכתב", () => {
|
||||||
const candidates: SyncCandidate[] = [
|
const candidates: SyncCandidate[] = [
|
||||||
{ id: "root-1", status: "todo", parentId: null, companyId: "c1" },
|
{ id: "root-1", status: "todo", parentId: null, companyId: "c1" },
|
||||||
|
|||||||
@@ -20,17 +20,22 @@ export const CLOSED_ISSUE_STATUSES: ReadonlySet<string> = new Set([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* מצב בבעלות Paperclip / בהמתנה-לאדם — **לא** הגדרה שנייה של "סגור".
|
* מצב בבעלות Paperclip — **לא** הגדרה שנייה של "סגור". `blocked` — כתיבה
|
||||||
* `in_review` הוא מצב-ההמתנה-ליו"ר המכוון: CEO שמשאיר issue ב-`in_progress`
|
* עליו מסתירה חוסם קיים.
|
||||||
* מקבל auto-block מ-Paperclip תוך דקה, ולכן הוא מעביר ל-`in_review`
|
*
|
||||||
* (legal-ai/docs/paperclip-quirks.md §3). כתיבת-סטטוס אוטומטית עליו גונבת את
|
* `in_review` **הוסר מהסט** בהכרעת חיים מ-2026-08-26 (legal-ai issue #626):
|
||||||
* ה-issue מתור-הביקורת של היו"ר ומזמינה קרב-סטטוסים.
|
* נשאל במפורש אם השחרור נקודתי או שיטתי, והשיב "התכוונתי לשיטתי".
|
||||||
* `blocked` — כתיבה עליו מסתירה חוסם קיים.
|
*
|
||||||
|
* המחיר, בכנות: `in_review` הוא מצב-ההמתנה-ליו"ר המכוון — CEO שמשאיר issue
|
||||||
|
* ב-`in_progress` מקבל auto-block מ-Paperclip תוך דקה, ולכן מעביר אותו
|
||||||
|
* ל-`in_review` כדי לחמוק מזה (legal-ai/docs/paperclip-quirks.md §3). מעתה
|
||||||
|
* issue שממתין לביקורת היו"ר עשוי להידרס בחזרה ל-`in_progress` בריצת-
|
||||||
|
* הסנכרון הבאה (כל 15 דק') ולרדת מתור-הביקורת. זה מכוון ומתועד, לא תקלה.
|
||||||
|
*
|
||||||
|
* מסלול-חזרה: להחזיר `"in_review"` לסט למטה + build + התקנה +
|
||||||
|
* `pm2 restart paperclip`.
|
||||||
*/
|
*/
|
||||||
export const NON_WRITABLE_STATUSES: ReadonlySet<string> = new Set([
|
export const NON_WRITABLE_STATUSES: ReadonlySet<string> = new Set(["blocked"]);
|
||||||
"in_review",
|
|
||||||
"blocked",
|
|
||||||
]);
|
|
||||||
|
|
||||||
export interface SyncCandidate {
|
export interface SyncCandidate {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user