@brainervirus/workit-pi 7.7.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/worker.js +1 -1
- package/dist/workit.js +17 -11
- package/package.json +1 -1
- package/skills/workit-ship/SKILL.md +2 -2
package/dist/worker.js
CHANGED
|
@@ -8392,7 +8392,7 @@ var NETWORK_FS_TYPES = new Set([
|
|
|
8392
8392
|
1196443219,
|
|
8393
8393
|
198183888
|
|
8394
8394
|
]);
|
|
8395
|
-
var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
|
|
8395
|
+
var OBSERVED_ONLY = new Set(["check", "merge.unverified", ...PR_ROW_TYPES]);
|
|
8396
8396
|
// packages/workit-core/src/core/config.ts
|
|
8397
8397
|
var PRESETS = {
|
|
8398
8398
|
gitflow: {
|
package/dist/workit.js
CHANGED
|
@@ -12722,7 +12722,7 @@ var independenceReasons = (row, authors) => {
|
|
|
12722
12722
|
reasons.push("self");
|
|
12723
12723
|
return reasons;
|
|
12724
12724
|
};
|
|
12725
|
-
function effectiveOf(rows, authors) {
|
|
12725
|
+
function effectiveOf(rows, authors, sameCode) {
|
|
12726
12726
|
let effective = null;
|
|
12727
12727
|
for (const row of rows) {
|
|
12728
12728
|
if (!effective) {
|
|
@@ -12733,7 +12733,7 @@ function effectiveOf(rows, authors) {
|
|
|
12733
12733
|
const effIndependent = independenceReasons(effective, authors).length === 0;
|
|
12734
12734
|
if (effIndependent && !rowIndependent)
|
|
12735
12735
|
continue;
|
|
12736
|
-
if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session)
|
|
12736
|
+
if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session && sameCode(effective, row))
|
|
12737
12737
|
continue;
|
|
12738
12738
|
effective = row;
|
|
12739
12739
|
}
|
|
@@ -12764,16 +12764,22 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
12764
12764
|
const head = branchHead(cwd, branch);
|
|
12765
12765
|
const fallbackBase = defaultBase(cwd);
|
|
12766
12766
|
const keyCache = new Map;
|
|
12767
|
-
const
|
|
12768
|
-
if (!base || !
|
|
12767
|
+
const keysAt = (base, at) => {
|
|
12768
|
+
if (!base || !at)
|
|
12769
12769
|
return { patchId: null, diffHash: null };
|
|
12770
|
-
|
|
12770
|
+
const cacheKey = `${base}\x00${at}`;
|
|
12771
|
+
let key = keyCache.get(cacheKey);
|
|
12771
12772
|
if (!key) {
|
|
12772
|
-
key = { patchId: patchId(cwd, base,
|
|
12773
|
-
keyCache.set(
|
|
12773
|
+
key = { patchId: patchId(cwd, base, at), diffHash: diffHash(cwd, base, at) };
|
|
12774
|
+
keyCache.set(cacheKey, key);
|
|
12774
12775
|
}
|
|
12775
12776
|
return key;
|
|
12776
12777
|
};
|
|
12778
|
+
const keyFor = (base) => keysAt(base, head);
|
|
12779
|
+
const sameCode = (failed, row) => verdictBasis(failed, {
|
|
12780
|
+
head: row.head,
|
|
12781
|
+
...keysAt(failed.base ?? fallbackBase, row.head)
|
|
12782
|
+
}) !== "stale" || restackCarries(rows, branch, failed.head, row.head);
|
|
12777
12783
|
const authors = authorSessions(cwd, rows, branch, { base: fallbackBase, head });
|
|
12778
12784
|
const byKind = new Map;
|
|
12779
12785
|
for (const row of rows)
|
|
@@ -12783,7 +12789,7 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
12783
12789
|
}
|
|
12784
12790
|
const verdicts = [];
|
|
12785
12791
|
for (const [kind, list] of byKind) {
|
|
12786
|
-
const row = effectiveOf(list, authors);
|
|
12792
|
+
const row = effectiveOf(list, authors, sameCode);
|
|
12787
12793
|
if (!row)
|
|
12788
12794
|
continue;
|
|
12789
12795
|
let basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
|
|
@@ -12809,11 +12815,11 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
12809
12815
|
verdicts.sort((a, b) => a.verdict.seq - b.verdict.seq);
|
|
12810
12816
|
const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
|
|
12811
12817
|
const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
|
|
12812
|
-
const newestAccepted = verdicts.findLast((entry) => entry.accepted) ?? null;
|
|
12818
|
+
const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
|
|
12813
12819
|
const accepted = newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
|
|
12814
12820
|
accepted: false,
|
|
12815
12821
|
verdict: failing?.verdict ?? null,
|
|
12816
|
-
reasons: failing ? ["failing_verdict"] : newestCurrent
|
|
12822
|
+
reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
|
|
12817
12823
|
};
|
|
12818
12824
|
const selfEntry = failing ? undefined : verdicts.findLast((entry) => entry.current && !entry.independent && STRONG_RESULTS.has(String(entry.verdict.result)));
|
|
12819
12825
|
return {
|
|
@@ -12829,7 +12835,7 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
12829
12835
|
authors: [...authors].toSorted()
|
|
12830
12836
|
};
|
|
12831
12837
|
}
|
|
12832
|
-
var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
|
|
12838
|
+
var OBSERVED_ONLY = new Set(["check", "merge.unverified", ...PR_ROW_TYPES]);
|
|
12833
12839
|
|
|
12834
12840
|
// packages/workit-core/src/core/policy/derive.ts
|
|
12835
12841
|
var RULES = {
|
package/package.json
CHANGED
|
@@ -51,8 +51,8 @@ the base keeps moving, or after 3 failed fix attempts on the same check.
|
|
|
51
51
|
flake|infra` per head. Real: reproduce with `workit check`, fix the root
|
|
52
52
|
cause, batch fixes into one push.
|
|
53
53
|
6. **Verified.** After the last push a non-author records a verdict
|
|
54
|
-
(read the `workit-review` skill's SKILL.md and follow it). Land only when granted: `workit stack land` (
|
|
55
|
-
|
|
54
|
+
(read the `workit-review` skill's SKILL.md and follow it). Land only when granted: `workit stack land` (verified run
|
|
55
|
+
from the root) or `workit pr merge`; `--unverified --reason` only if user-asked.
|
|
56
56
|
7. **Observe it landed:** `workit verify-delivery pr` or `merge`. After a failed
|
|
57
57
|
verdict or a check red 3+ times, at any endpoint: offer `/wk-retro` in one
|
|
58
58
|
line of the final or stop report; never pause the babysit loop for it.
|