pi-goal-list-loop-audit 0.38.31 → 0.38.32
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/CHANGELOG.md +6 -0
- package/docs/INDEX.md +1 -1
- package/extensions/goal-loop-core.ts +34 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.38.32 — migrate-on-read backfill for pre-v0.38.21 audit histories (2026-09-08)
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Pre-v0.38.21 audit histories lack `superseded` flags, so one post-upgrade retry could argue already-settled objections as live (DECIDED 2026-09-08: migrate-on-read). `liveDisapproval` now replays the `appendAuditVerdict` scope rules over the stored array first (`backfillSupersededObjections`): a later verdict-bearing disapproval or clean approval retires older live rounds in place. Add-only (never clears a flag) and idempotent — post-v0.38.21 histories pass through untouched, and the flags ride the next normal state write to disk.
|
|
7
|
+
- Regression coverage in `tests/migrate-on-read.test.ts` (5 pins: settled-by-approval, settled-by-later-disapproval, lone legacy stays live, error transparency, idempotence); existing `tests/objection-pinning.test.ts` green; `tsc` clean.
|
|
8
|
+
|
|
3
9
|
## 0.38.31 — overdue wait-pause stops promising imminent resume (2026-09-08)
|
|
4
10
|
|
|
5
11
|
### Fixed
|
package/docs/INDEX.md
CHANGED
|
@@ -18,7 +18,7 @@ For shipped docs, the relevant entry points are:
|
|
|
18
18
|
failback; v0.35.9 hardened cross-version npm tarball checks; v0.35.10
|
|
19
19
|
handles multi-entry npm dry-run reports; v0.35.11 accepts both npm report
|
|
20
20
|
shapes; v0.35.12 supports npm 12's keyed pack reports; v0.35.13 fixes stale-API recovery loops.
|
|
21
|
-
v0.35.14–v0.38.
|
|
21
|
+
v0.35.14–v0.38.32 continue through the supervisor freeze (`/glla pause`),
|
|
22
22
|
load hold, auditor picker parity, Windows launch fix, zombie-watchdog
|
|
23
23
|
subagent carve-out, due-wait backstop, the `/glla agents` visibility panel,
|
|
24
24
|
durable state-root selection, blank-until-resume auditor context, frozen
|
|
@@ -1054,12 +1054,46 @@ export function countTrailingDisapprovals(history: AuditVerdict[]): number {
|
|
|
1054
1054
|
* signal. Infrastructure entries are transparent, but a changed contract
|
|
1055
1055
|
* revision breaks the comparison because the auditor may now be judging new
|
|
1056
1056
|
* work. */
|
|
1057
|
+
/** v0.38.32 (DECIDED 2026-09-08 migrate-on-read): replay the
|
|
1058
|
+
* appendAuditVerdict scope-transition rules chronologically over a stored
|
|
1059
|
+
* history, backfilling superseded/supersededBy on pre-v0.38.21 entries that
|
|
1060
|
+
* a later verdict settled. Add-only (never clears a flag) and idempotent:
|
|
1061
|
+
* a second run over the same array marks nothing, and replaying over
|
|
1062
|
+
* post-v0.38.21 histories that live code already flagged is a no-op.
|
|
1063
|
+
* Returns the count newly marked. Durability: callers mutate the live state
|
|
1064
|
+
* object in place; the flags ride the next normal state write to disk, and
|
|
1065
|
+
* the replay re-runs harmlessly until then. Never call this from a
|
|
1066
|
+
* persistence fence — it is a read-path migration, not a write. */
|
|
1067
|
+
export function backfillSupersededObjections(history: AuditVerdict[]): number {
|
|
1068
|
+
let n = 0;
|
|
1069
|
+
for (let i = 0; i < history.length; i++) {
|
|
1070
|
+
const trigger = history[i]!;
|
|
1071
|
+
if (!((trigger.disapproved && !trigger.error) || (trigger.approved && !trigger.error))) continue;
|
|
1072
|
+
const byRef = trigger.disapproved ? `disapproval:${trigger.at}` : `approval:${trigger.at}`;
|
|
1073
|
+
for (let j = 0; j < i; j++) {
|
|
1074
|
+
const older = history[j]!;
|
|
1075
|
+
if (older.disapproved && !older.superseded) {
|
|
1076
|
+
older.superseded = true;
|
|
1077
|
+
older.supersededBy = byRef;
|
|
1078
|
+
n++;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
return n;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1057
1085
|
/** v0.38.21 (objection pinning): the latest still-live disapproval — the
|
|
1058
1086
|
* objection set the next retry must argue. Superseded rounds and
|
|
1059
1087
|
* verdictless infrastructure entries are never live. A later clean
|
|
1060
1088
|
* approval clears the pin, so a live entry is always the newest
|
|
1061
1089
|
* verdict-bearing disapproval. */
|
|
1062
1090
|
export function liveDisapproval(history: AuditVerdict[]): AuditVerdict | undefined {
|
|
1091
|
+
// v0.38.32: migrate-on-read — legacy entries predate the pinning flags.
|
|
1092
|
+
// Backfill what later verdicts settled before selecting, so a settled
|
|
1093
|
+
// objection is never argued as live again. Add-only + idempotent (see
|
|
1094
|
+
// backfillSupersededObjections); post-v0.38.21 histories pass through
|
|
1095
|
+
// untouched.
|
|
1096
|
+
backfillSupersededObjections(history);
|
|
1063
1097
|
for (let i = history.length - 1; i >= 0; i--) {
|
|
1064
1098
|
const v = history[i]!;
|
|
1065
1099
|
if (v.superseded) continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-goal-list-loop-audit",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.32",
|
|
4
4
|
"description": "Mission control for autonomous pi: interview-drafted goals, an audited task queue, and forever-loops (metric, spec, project-audit) that run for hours. A detached extension-less auditor process re-verifies every completion with raw evidence without holding the main pi turn; confirmed drafts, decision pauses and consent gates keep you in charge.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"author": "dracon",
|