pi-smart-compact 10.1.0 → 10.1.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/ARCHITECTURE.md CHANGED
@@ -53,9 +53,7 @@ flowchart LR
53
53
  Quality means retained constraints, trustworthy failure evidence and low
54
54
  retrieval churn, not merely fewer tokens. There are no recurring
55
55
  model-visible status prompts, no automatic error deletion, and no destructive
56
- file rollback. The [2026-09-24 context hygiene report](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/context-hygiene-2026-09-24.md)
57
- (repository only, historical) records the original experiments and acceptance
58
- criteria.
56
+ file rollback.
59
57
 
60
58
  ## Design ideas
61
59
 
@@ -767,9 +765,7 @@ Anthropic blocks or opaque OpenAI items, so this extension does both:
767
765
  on-demand compaction.
768
766
 
769
767
  `test/native-compaction-compat.test.ts` pins what stock adapters drop by
770
- themselves. The design research and measured runs are in the
771
- [2026-09-24 research report](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/hindsight-native-compaction-research-2026-09-24.md)
772
- (repository only, historical).
768
+ themselves.
773
769
 
774
770
  ### Experimental visual evidence
775
771
 
@@ -804,9 +800,8 @@ summary. Changing model/provider/API or using a text-only model withholds
804
800
  images; stricter scrubbing also withholds old pixels that cannot be
805
801
  retroactively redacted. Only the latest compaction's archive is eligible, and
806
802
  native fallback can discard it. Metrics record only visual token estimates and
807
- frame counts. The [2026-09-24 visual pilot](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/visual-pilot-2026-09-24.md)
808
- (repository only) is a dated single-model synthetic sample, not production or
809
- cross-model accuracy.
803
+ frame counts. Historical visual-pilot results are dated single-model synthetic
804
+ samples, not production or cross-model accuracy evidence.
810
805
 
811
806
  ## 4. Optional cross-session memory
812
807
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,55 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [10.1.1] - 2026-09-30
6
+
7
+ ### Release approval
8
+
9
+ - Patch release approved by the release owner after the deterministic gates
10
+ on the exact candidate. No version-specific applied-canary cohort or live
11
+ provider run exists for `10.1.1`; the verifier and extraction fixes are
12
+ evidenced by offline replay of recorded sessions only.
13
+
14
+ ### Fixed
15
+
16
+ - Verification no longer rejects every candidate over its own required
17
+ evidence. Two recorded defects had the same shape: the deterministic floor
18
+ is built from exactly the lines the verifier demands, so a line the verifier
19
+ also scores as a defect leaves nothing that can pass, the session stays
20
+ uncompacted at 99% context, and Pi's own summarizer then hits its output
21
+ cap. First, the contradiction scan judged "Continue to avoid commits,
22
+ installation, or live daemon restart ... (`agm restart` deliberately
23
+ deferred)" as a positive "restart" beside "avoid live daemon restart":
24
+ negation near the anchor cannot see a coordinated list or a split clause.
25
+ Required evidence lines are now compared by sentence-level polarity, the
26
+ judgment the scan already applies to its source, so lines that agree are
27
+ not scored against each other; two required lines of opposite polarity
28
+ ("Do not publish stable" beside "Must publish stable now") remain a gap,
29
+ and summary-authored contradictions are never exempt. Second, the outcome
30
+ claim scan read a recorded bug ("message lost with no error surfaced") as
31
+ a success claim, repair removed it, and the next pass reported the
32
+ constraint missing. Exact renderings of required evidence are no longer
33
+ outcome claims; prose that echoes such a phrase still needs tool evidence.
34
+ - Extraction ignores harness-injected `user` messages: pi-processes
35
+ `<process_event>` notifications, this extension's own continuity bridge
36
+ ledger, and agent-mesh envelopes. They were mined as the active goal, as
37
+ constraints (with `Constraint:` labels accumulating across generations),
38
+ decisions, and recent user requests. Continuity labels quoted by Pi's own
39
+ compaction summary are stripped before constraints are stored.
40
+
41
+ ### Changed
42
+
43
+ - Automatic runs are capped at 300 seconds instead of 60, and
44
+ `autoTriggerTimeoutMs` defaults to 300,000 ms. Recorded MiniMax M3 runs took
45
+ 26–45 s when they finished and ~40% of automatic attempts were cut at the
46
+ old 60 s cap, each leaving the session for Pi's own compactor.
47
+
48
+ ### Repository
49
+
50
+ - Research reports and review findings are now local, ignored artifacts rather
51
+ than tracked repository content. Existing files stay on disk; Git history
52
+ and published release tags are unchanged.
53
+
5
54
  ## [10.1.0] - 2026-09-29
6
55
 
7
56
  ### Release approval
@@ -8,7 +8,7 @@ import type { CompressionProfile, ProfileConfig } from "./types.ts";
8
8
  * `package.json#version`. Do not hand-edit this line for releases; bump
9
9
  * package.json and run `bun run sync-version`.
10
10
  */
11
- export declare const VERSION = "10.1.0";
11
+ export declare const VERSION = "10.1.1";
12
12
  /**
13
13
  * Opt-in components that are not installed with the extension: optional peer
14
14
  * dependencies in package.json, pinned to the versions the release audit
@@ -39,7 +39,7 @@ export declare const POST_SUMMARY_RESERVE_RATIO = 0.25;
39
39
  /** Maximum number of open-loop records retained in durable continuity state. */
40
40
  export declare const MAX_STATE_OPEN_LOOPS = 25;
41
41
  /** Auto compaction must yield to native recovery instead of blocking the host indefinitely. */
42
- export declare const AUTO_TRIGGER_TIMEOUT_CAP_MS = 60000;
42
+ export declare const AUTO_TRIGGER_TIMEOUT_CAP_MS = 300000;
43
43
  /** Provider-call ceiling for the synchronous session_before_compact hook. */
44
44
  export declare const AUTO_TRIGGER_MAX_LLM_CALLS = 4;
45
45
  /** Suppress proactive settled-trigger churn after any confirmed compaction. */
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,OAAO,WAAW,CAAC;AAChC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;aAC/B,OAAO;iBAAI,IAAI,EAAE,sBAAsB;iBAAE,OAAO,EAAE,QAAQ;iBAAE,OAAO,EAAE,sBAAsB;;aAC3F,GAAG;iBAAI,IAAI,EAAE,KAAK;iBAAE,OAAO,EAAE,OAAO;iBAAE,OAAO,EAAE,uDAAuD;;aACtG,KAAK;iBAAI,IAAI,EAAE,iBAAiB;iBAAE,OAAO,EAAE,OAAO;iBAAE,OA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hD,sFAAsF;AACtF,eAAO,MAAM,eAAe,QACgI,CAAC;AAC7J,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,QACiH,CAAC;AAChJ,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAC9C,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,4HAA4H;AAC5H,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,sBAAsB,QAAmB,CAAC;AAOvD,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAGtC,eAAO,MAAM,qBAAqB,QAAkB,CAAC;AAGrD,eAAO,MAAM,UAAU,iBAAiB,CAAC;AACzC,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,eAAO,MAAM,sBAAsB,QAU4T,CAAC"}
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  } from "@earendil-works/pi-coding-agent";
6
6
 
7
7
  // src/constants.ts
8
- var VERSION = "10.1.0";
8
+ var VERSION = "10.1.1";
9
9
  var OPTIONAL_COMPONENTS = {
10
10
  mnemopi: { name: "@oh-my-pi/pi-mnemopi", version: "18.3.1", enables: "Mnemopi memory store" },
11
11
  bun: { name: "bun", version: "1.4.2", enables: "Mnemopi worker runtime when no Bun 1.3.14+ is on PATH" },
@@ -16,7 +16,7 @@ var MIN_COMPACTION_SAVING_RATIO = 0.1;
16
16
  var ESTIMATOR_ROUNDING_TOLERANCE_TOKENS = 1;
17
17
  var POST_SUMMARY_RESERVE_RATIO = 0.25;
18
18
  var MAX_STATE_OPEN_LOOPS = 25;
19
- var AUTO_TRIGGER_TIMEOUT_CAP_MS = 60000;
19
+ var AUTO_TRIGGER_TIMEOUT_CAP_MS = 300000;
20
20
  var AUTO_TRIGGER_MAX_LLM_CALLS = 4;
21
21
  var SETTLED_TRIGGER_COOLDOWN_MS = 10 * 60000;
22
22
  var REBUILD_MIN_TOKENS = 16384;
@@ -100,7 +100,7 @@ var DEFAULT_CONFIG = {
100
100
  autoTrigger: true,
101
101
  showStatus: true,
102
102
  autoTriggerStrategy: "settled",
103
- autoTriggerTimeoutMs: 120000,
103
+ autoTriggerTimeoutMs: 300000,
104
104
  backupEnabled: true,
105
105
  backupDir: "",
106
106
  minContextPercent: 80,
@@ -3403,6 +3403,10 @@ function collapseDecisionsByQuestion(items) {
3403
3403
  }
3404
3404
  return order.map((key) => byQuestion.get(key));
3405
3405
  }
3406
+ var HARNESS_INJECTED_RE = /^(?:<process_event\b|Native compaction continuity bridge\b|## Continuity Ledger\b|\[agent-mesh\]|(?:\*\*)?agent-mesh (?:message|reply)\b)/;
3407
+ function isHarnessInjectedText(text) {
3408
+ return HARNESS_INJECTED_RE.test(text.trim());
3409
+ }
3406
3410
  function extractDecisions(msgs, _tcIdx) {
3407
3411
  const tcIdx = _tcIdx ?? buildToolCallIndex(msgs);
3408
3412
  const decisions = [];
@@ -3429,6 +3433,8 @@ function extractDecisions(msgs, _tcIdx) {
3429
3433
  if (msgs[i]?.role !== "user")
3430
3434
  continue;
3431
3435
  const txt = extractText(msgs[i].content);
3436
+ if (isHarnessInjectedText(txt))
3437
+ continue;
3432
3438
  if (CHOICE_RE.test(txt)) {
3433
3439
  decisions.push({
3434
3440
  index: i,
@@ -3482,6 +3488,7 @@ function isNonLiveConstraintText(text) {
3482
3488
  const candidate = text.replace(/^\s*[-*]\s+/, "").trim();
3483
3489
  return isDiagnosticConstraintText(candidate) || isCompactionStatusText(candidate) || OWN_OUTPUT_CONTEXT_RE.test(candidate) || COMPLETED_CHECKLIST_RE.test(candidate);
3484
3490
  }
3491
+ var CONTINUITY_LABEL_RE = /^(?:(?:Constraint|Goal|Decision|Critical|Open loop|Unresolved error|Resolved error):\s*)+/i;
3485
3492
  function mineConstraints(msgs) {
3486
3493
  const constraints = [];
3487
3494
  const seen = new Set;
@@ -3491,9 +3498,11 @@ function mineConstraints(msgs) {
3491
3498
  const text = extractText(msgs[i].content);
3492
3499
  if (text.length < 10 || text.startsWith("/"))
3493
3500
  continue;
3501
+ if (isHarnessInjectedText(text))
3502
+ continue;
3494
3503
  const ownOutputMessage = OWN_OUTPUT_CONTEXT_RE.test(text);
3495
3504
  for (const raw of text.split(/\n+/)) {
3496
- const candidate = raw.replace(/^\s*[-*]\s+/, "").trim();
3505
+ const candidate = raw.replace(/^\s*[-*]\s+/, "").trim().replace(CONTINUITY_LABEL_RE, "");
3497
3506
  if (candidate.length < 10 || isNonLiveConstraintText(candidate))
3498
3507
  continue;
3499
3508
  if (ownOutputMessage && OWN_OUTPUT_PHRASE_RE.test(candidate))
@@ -3538,7 +3547,7 @@ function segmentTopicsHeuristic(msgs, pc, maxSegs = 20, _tcIdx) {
3538
3547
  const nextBasename = shiftBasename(nextFile);
3539
3548
  const closesActiveTool = message.role === "toolResult" && (tcIdx.get(message.toolCallId ?? "")?.msgIndex ?? -1) >= startIdx;
3540
3549
  const fileShift = Boolean(lastFile && nextBasename && nextBasename !== lastFile);
3541
- const userShift = message.role === "user" && SHIFT_RE.test(text);
3550
+ const userShift = message.role === "user" && !isHarnessInjectedText(text) && SHIFT_RE.test(text);
3542
3551
  const sizeShift = tokenAcc > 0 && tokenAcc + messageTokens > pc.maxChunkTokens;
3543
3552
  const breakBefore = !closesActiveTool && i > startIdx && tokenAcc >= pc.minChunkTokens && (fileShift || userShift || sizeShift) && topics.length < maxSegs - 1;
3544
3553
  if (breakBefore) {
@@ -3600,7 +3609,7 @@ function buildTimeline(msgs, errors) {
3600
3609
  const m = msgs[i];
3601
3610
  if (m.role === "user") {
3602
3611
  const txt = extractText(m.content);
3603
- if (!txt.startsWith("/"))
3612
+ if (!txt.startsWith("/") && !isHarnessInjectedText(txt))
3604
3613
  timeline.push({
3605
3614
  index: i,
3606
3615
  event: "user_request",
@@ -3631,7 +3640,7 @@ function extractMainGoal(msgs) {
3631
3640
  if (m?.role !== "user")
3632
3641
  continue;
3633
3642
  const text = extractText(m.content).trim();
3634
- if (!text)
3643
+ if (!text || isHarnessInjectedText(text))
3635
3644
  continue;
3636
3645
  if (HISTORY_SUMMARY_RE.test(text)) {
3637
3646
  const carried = summaryEvidenceLine(findSection(text, "goal")?.body ?? "", TRUNC.MESSAGE);
@@ -3699,7 +3708,7 @@ function extractOpenLoops(msgs, extraction) {
3699
3708
  if (msg.role !== "user")
3700
3709
  continue;
3701
3710
  const txt = extractText(msg.content);
3702
- if (txt.length < 10 || txt.startsWith("/"))
3711
+ if (txt.length < 10 || txt.startsWith("/") || isHarnessInjectedText(txt))
3703
3712
  continue;
3704
3713
  if (FOLLOWUP_RE.test(txt)) {
3705
3714
  const isDup = loops.some((l) => isNearbyDuplicate(l, txt, idx));
@@ -3722,7 +3731,7 @@ function extractOpenLoops(msgs, extraction) {
3722
3731
  if (msg.role !== "user")
3723
3732
  continue;
3724
3733
  const txt = extractText(msg.content);
3725
- if (txt.length < 10 || txt.startsWith("/"))
3734
+ if (txt.length < 10 || txt.startsWith("/") || isHarnessInjectedText(txt))
3726
3735
  continue;
3727
3736
  if (BLOCKED_RE.test(txt)) {
3728
3737
  const isDup = loops.some((l) => isNearbyDuplicate(l, txt, idx));
@@ -3803,7 +3812,7 @@ function extractStructured(msgs, pc, precomputedTcIdx) {
3803
3812
  };
3804
3813
  const evidenceOverflow = Object.fromEntries(Object.entries(overflow).filter(([, count]) => count > 0));
3805
3814
  const mainGoal = extractMainGoal(msgs);
3806
- const lastUserMessages = msgs.filter((m) => m.role === "user").slice(-5).map((m) => extractText(m.content));
3815
+ const lastUserMessages = msgs.filter((m) => m.role === "user" && !isHarnessInjectedText(extractText(m.content))).slice(-5).map((m) => extractText(m.content));
3807
3816
  const lastErrors = errors.slice(-3).map((e) => e.message);
3808
3817
  return {
3809
3818
  modifiedFiles,
@@ -6488,9 +6497,32 @@ function hasListedPath(listed, file, display, normalizedOwners) {
6488
6497
  }
6489
6498
  return false;
6490
6499
  }
6491
- function outcomeClaims(summary, pathEvidence) {
6500
+ var EVIDENCE_LINE_LABEL_RE = /^(?:(?:constraint|goal|decision|critical|open loop|unresolved error|resolved error|\[focus\]|\[note\]):?\s*)+/i;
6501
+ var EVIDENCE_QUOTE_MIN_CHARS = 80;
6502
+ function isRequiredEvidenceLine(line, corpus) {
6503
+ const key = normalizeFactKey(line.replace(/\*\*/g, "").replace(EVIDENCE_LINE_LABEL_RE, ""));
6504
+ if (!key)
6505
+ return false;
6506
+ return corpus.some((text) => text === key || key.length >= EVIDENCE_QUOTE_MIN_CHARS && text.startsWith(key));
6507
+ }
6508
+ function requiredEvidenceCorpus(collected, continuity) {
6509
+ const texts = [
6510
+ ...collected.constraints.map((item) => item.text),
6511
+ ...collected.unresolved.map((item) => item.message),
6512
+ ...collected.resolved.map((item) => item.message),
6513
+ ...collected.goal ? [collected.goal] : [],
6514
+ ...continuity?.criticalContext ?? [],
6515
+ ...collected.decisions.flatMap((item) => {
6516
+ const question = summaryEvidenceLine(item.summary, TRUNC.DECISION_SUMMARY);
6517
+ const answer = item.answer ? summaryEvidenceLine(item.answer, TRUNC.USER_RESPONSE) : "";
6518
+ return answer ? [item.summary, item.answer, question + " \u2192 " + answer] : [item.summary];
6519
+ })
6520
+ ];
6521
+ return Array.from(new Set(texts.map((text) => normalizeFactKey(text.replace(/\*\*/g, ""))).filter(Boolean)));
6522
+ }
6523
+ function outcomeClaims(summary, pathEvidence, evidenceCorpus = []) {
6492
6524
  const pathLines = new Set(Array.from(pathEvidence, ([path, display]) => [path, display, "`" + path + "`"]).flat());
6493
- return Array.from(new Set(summary.split(/\r?\n/).map((line) => line.replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "").replace(/^\[[ x]\]\s+/i, "").trim()).filter((line) => line.length > 0 && !line.startsWith("#") && !pathLines.has(line)).filter((line) => HIGH_RISK_OUTCOME_RE.test(line)).filter((line) => /\bno\s+(?:errors?|failures?)\b/i.test(line) || !NEGATED_OUTCOME_RE.test(line)))).slice(0, 12);
6525
+ return Array.from(new Set(summary.split(/\r?\n/).map((line) => line.replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "").replace(/^\[[ x]\]\s+/i, "").trim()).filter((line) => line.length > 0 && !line.startsWith("#") && !pathLines.has(line)).filter((line) => HIGH_RISK_OUTCOME_RE.test(line)).filter((line) => !isRequiredEvidenceLine(line, evidenceCorpus)).filter((line) => /\bno\s+(?:errors?|failures?)\b/i.test(line) || !NEGATED_OUTCOME_RE.test(line)))).slice(0, 12);
6494
6526
  }
6495
6527
  function classifyOutcomeClaim(claim) {
6496
6528
  const lower = claim.toLowerCase();
@@ -6861,14 +6893,15 @@ function hasSemanticEvidence(source, target) {
6861
6893
  return true;
6862
6894
  });
6863
6895
  }
6864
- function hasSemanticContradiction(source, target) {
6896
+ function hasSemanticContradiction(source, target, exempt) {
6865
6897
  const sourceFragments = new Set(semanticFragments(source).map((tokens) => tokens.join(" ")));
6866
6898
  const { sourceTokens, concepts, anchor, negative, conditional } = semanticShape(source);
6867
6899
  if (!anchor)
6868
6900
  return false;
6869
6901
  const required = Math.min(concepts.length, Math.max(1, Math.ceil(concepts.length * 0.6)));
6870
6902
  return semanticFragments(target).some((tokens) => {
6871
- if (!tokens.includes(anchor) || sourceFragments.has(tokens.join(" ")))
6903
+ const key = tokens.join(" ");
6904
+ if (!tokens.includes(anchor) || sourceFragments.has(key) || exempt?.has(key))
6872
6905
  return false;
6873
6906
  const overlap = concepts.filter((concept) => tokens.includes(concept)).length;
6874
6907
  if (overlap < required)
@@ -7250,7 +7283,39 @@ function verifyErrorEvidence(normalizedSummary, collected, accumulator) {
7250
7283
  }
7251
7284
  }
7252
7285
  }
7253
- function verifySemanticCoverage(parsed, collected, accumulator) {
7286
+ var EVIDENCE_RENDER_LIMITS = [
7287
+ TRUNC.CONSTRAINT_TEXT,
7288
+ TRUNC.MESSAGE,
7289
+ TRUNC.PREVIEW_MID,
7290
+ TRUNC.PREVIEW,
7291
+ TRUNC.DECISION_SUMMARY,
7292
+ TRUNC.USER_RESPONSE,
7293
+ TRUNC.DETAIL,
7294
+ TRUNC.TOPIC_LABEL
7295
+ ];
7296
+ function requiredEvidenceKeysByPolarity(collected, continuity) {
7297
+ const texts = [
7298
+ ...collected.constraints.map((item) => item.text),
7299
+ ...collected.decisions.flatMap((item) => item.answer ? [item.summary, item.answer] : [item.summary]),
7300
+ ...collected.unresolved.map((item) => item.message),
7301
+ ...collected.resolved.map((item) => item.message),
7302
+ ...collected.goal ? [collected.goal] : [],
7303
+ ...continuity?.criticalContext ?? []
7304
+ ];
7305
+ const keys = { negative: new Set, positive: new Set };
7306
+ for (const text of texts) {
7307
+ const bucket = semanticShape(text).negative ? keys.negative : keys.positive;
7308
+ const variants = [text, ...EVIDENCE_RENDER_LIMITS.map((max) => summaryEvidenceLine(text, max))];
7309
+ for (const variant of variants) {
7310
+ for (const tokens of semanticFragments(variant))
7311
+ bucket.add(tokens.join(" "));
7312
+ }
7313
+ }
7314
+ return keys;
7315
+ }
7316
+ function verifySemanticCoverage(parsed, collected, continuity, accumulator) {
7317
+ const evidenceKeys = requiredEvidenceKeysByPolarity(collected, continuity);
7318
+ const exemptFor = (source) => semanticShape(source).negative ? evidenceKeys.negative : evidenceKeys.positive;
7254
7319
  const constraintTarget = [
7255
7320
  findSection(parsed, "constraints")?.body ?? "",
7256
7321
  findSection(parsed, "critical-context")?.body ?? ""
@@ -7260,7 +7325,7 @@ function verifySemanticCoverage(parsed, collected, accumulator) {
7260
7325
  if (!hasSemanticEvidence(constraint.text, constraintTarget)) {
7261
7326
  addGap(accumulator, { kind: "missing-constraint", text: constraint.text }, 8);
7262
7327
  }
7263
- if (hasSemanticContradiction(constraint.text, constraintTarget)) {
7328
+ if (hasSemanticContradiction(constraint.text, constraintTarget, exemptFor(constraint.text))) {
7264
7329
  addGap(accumulator, {
7265
7330
  kind: "inconsistency",
7266
7331
  detail: "semantic-contradiction: constraint contradicts " + constraint.text.slice(0, TRUNC.SNIPPET)
@@ -7272,7 +7337,7 @@ function verifySemanticCoverage(parsed, collected, accumulator) {
7272
7337
  if (!hasSemanticEvidence(collected.goal, goalTarget)) {
7273
7338
  addGap(accumulator, { kind: "missing-goal", goal: collected.goal }, 12);
7274
7339
  }
7275
- if (hasSemanticContradiction(collected.goal, goalTarget)) {
7340
+ if (hasSemanticContradiction(collected.goal, goalTarget, exemptFor(collected.goal))) {
7276
7341
  addGap(accumulator, {
7277
7342
  kind: "inconsistency",
7278
7343
  detail: "semantic-contradiction: goal polarity or condition changed"
@@ -7298,7 +7363,7 @@ function verifySemanticCoverage(parsed, collected, accumulator) {
7298
7363
  detail: "decision-answer-conflict: summary carries a different active answer for " + decision.summary.slice(0, TRUNC.SNIPPET)
7299
7364
  }, 20);
7300
7365
  }
7301
- if (hasSemanticContradiction(decision.summary, decisionQuestionBody)) {
7366
+ if (hasSemanticContradiction(decision.summary, decisionQuestionBody, exemptFor(decision.summary))) {
7302
7367
  addGap(accumulator, {
7303
7368
  kind: "inconsistency",
7304
7369
  detail: "semantic-contradiction: decision contradicts " + decision.summary.slice(0, TRUNC.SNIPPET)
@@ -7389,7 +7454,8 @@ function verifyOpenLoopsAndClaims(summary, parsed, paths, extraction, continuity
7389
7454
  if (!evidence.sourceMessages)
7390
7455
  return;
7391
7456
  const tools = successfulToolEvidence(evidence.sourceMessages);
7392
- for (const claim of outcomeClaims(summary, paths.rendered)) {
7457
+ const evidenceCorpus = requiredEvidenceCorpus(collected, continuity);
7458
+ for (const claim of outcomeClaims(summary, paths.rendered, evidenceCorpus)) {
7393
7459
  if (!successfulToolSupportsClaim(claim, tools, extraction)) {
7394
7460
  addGap(accumulator, { kind: "unsupported-claim", claim }, 20);
7395
7461
  }
@@ -7402,7 +7468,7 @@ function verifySummary(summary, extraction, continuity = null, evidence = {}) {
7402
7468
  verifyRequiredSections(parsed, accumulator);
7403
7469
  const paths = verifyPathCoverage(parsed, extraction, continuity, evidence, accumulator);
7404
7470
  verifyErrorEvidence(summary.toLowerCase().replace(/\\/g, "/").replace(/\s+/g, " "), collected, accumulator);
7405
- verifySemanticCoverage(parsed, collected, accumulator);
7471
+ verifySemanticCoverage(parsed, collected, continuity, accumulator);
7406
7472
  verifyFileReferences(summary, extraction, continuity, evidence, collected, paths, accumulator);
7407
7473
  verifyProgressConsistency(parsed, extraction, collected, paths, accumulator);
7408
7474
  verifyOpenLoopsAndClaims(summary, parsed, paths, extraction, continuity, evidence, collected, accumulator);
@@ -28,7 +28,7 @@ export declare class VerificationGateError extends Error {
28
28
  readonly gapCount: number;
29
29
  constructor(result: VerificationResult, initialScore: number, stage: VerificationGateStage);
30
30
  }
31
- export declare function hasSemanticContradiction(source: string, target: string): boolean;
31
+ export declare function hasSemanticContradiction(source: string, target: string, exempt?: ReadonlySet<string>): boolean;
32
32
  /**
33
33
  * True when `release` (a later user message) frees `constraint`.
34
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/phases/verify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACX,KAAK,EACL,GAAG,EACH,OAAO,EACP,eAAe,EAEf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACX,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,UAAU,EACV,MAAM,aAAa,CAAC;AAsCrB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,MAAM,WAAW,oBAAoB;IACpC,cAAc,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC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,CAAC,EAAE,WAAW,EACzE,QAAQ,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAkCjB"}
package/dist/rtk.js CHANGED
@@ -198,7 +198,7 @@ class SecretScrubber {
198
198
  }
199
199
 
200
200
  // src/constants.ts
201
- var VERSION = "10.1.0";
201
+ var VERSION = "10.1.1";
202
202
  var OPTIONAL_COMPONENTS = {
203
203
  mnemopi: { name: "@oh-my-pi/pi-mnemopi", version: "18.3.1", enables: "Mnemopi memory store" },
204
204
  bun: { name: "bun", version: "1.4.2", enables: "Mnemopi worker runtime when no Bun 1.3.14+ is on PATH" },
@@ -209,7 +209,7 @@ var MIN_COMPACTION_SAVING_RATIO = 0.1;
209
209
  var ESTIMATOR_ROUNDING_TOLERANCE_TOKENS = 1;
210
210
  var POST_SUMMARY_RESERVE_RATIO = 0.25;
211
211
  var MAX_STATE_OPEN_LOOPS = 25;
212
- var AUTO_TRIGGER_TIMEOUT_CAP_MS = 60000;
212
+ var AUTO_TRIGGER_TIMEOUT_CAP_MS = 300000;
213
213
  var AUTO_TRIGGER_MAX_LLM_CALLS = 4;
214
214
  var SETTLED_TRIGGER_COOLDOWN_MS = 10 * 60000;
215
215
  var REBUILD_MIN_TOKENS = 16384;
@@ -293,7 +293,7 @@ var DEFAULT_CONFIG = {
293
293
  autoTrigger: true,
294
294
  showStatus: true,
295
295
  autoTriggerStrategy: "settled",
296
- autoTriggerTimeoutMs: 120000,
296
+ autoTriggerTimeoutMs: 300000,
297
297
  backupEnabled: true,
298
298
  backupDir: "",
299
299
  minContextPercent: 80,
@@ -73,6 +73,7 @@ export declare function collapseDecisionsByQuestion<T extends {
73
73
  summary: string;
74
74
  userResponse?: string;
75
75
  }>(items: readonly T[]): T[];
76
+ export declare function isHarnessInjectedText(text: string): boolean;
76
77
  export declare function extractDecisions(msgs: LlmMessage[], _tcIdx?: ToolCallIndex): StructuredExtraction["decisions"];
77
78
  export declare function isDiagnosticConstraintText(text: string): boolean;
78
79
  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ence
48
48
 
49
- Reports are preserved as dated evidence. Their measurements, revision limits and
50
- warnings remain part of the record; they are not current setup instructions.
49
+ Research reports and review findings are local, ignored artifacts under
50
+ `docs/reports/` and `docs/findings/`, not tracked repository or npm content.
51
+ Their dated measurements and revision limits are not current setup instructions
52
+ or product guarantees. Earlier copies can still exist in Git history; removing
53
+ tracking does not erase them. See the
54
+ [evaluation guide](./evaluation.md#pilots-and-dated-reports) for evidence limits.
51
55
 
52
- - [Pilot and research reports on GitHub](https://github.com/alpertarhan/pi-smart-compact/tree/main/docs/reports):
53
- context hygiene, AgentSession lifecycle, visual evidence, Hindsight/native
54
- compaction research and the earlier provider baseline. The
55
- [evaluation guide](./evaluation.md#pilots-and-dated-reports) explains each scope.
56
- - [Review findings on GitHub](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/findings/README.md):
57
- the index of external-model and agent-harness audits, organized by reviewer
58
- and date. Findings are advisory, not a release gate or product guarantee.
59
56
  - [v7 → v8 migration](./MIGRATING_TO_V8.md): instructions for that historical
60
57
  transition, **not** the current installation baseline.
61
58
 
62
- `docs/reports/` and `docs/findings/` are repository-only and excluded from npm.
63
- Links to those archives deliberately open GitHub, so this index also works from
64
- an installed package. User guides and brand assets ship with the package;
65
- developer source, tests and evaluation scripts do not.
59
+ User guides and brand assets ship with the package; developer source, tests
60
+ and evaluation scripts do not.
66
61
 
67
62
  A green scripted pilot does not establish live-model fidelity, billed savings
68
63
  or production readiness. Use the [evaluation limits](./evaluation.md) and
package/docs/RELEASE.md CHANGED
@@ -28,9 +28,10 @@ package installation.
28
28
  `CHANGELOG.md`; never word a candidate entry as if the final release
29
29
  check or canary promotion already passed.
30
30
  - [ ] Update the guide, configuration, evaluation, architecture and migration
31
- notes for behavior/config changes. Dated reports (`docs/reports/`) stay
32
- historical and are not packed; add a new report or addendum instead of
33
- rewriting them.
31
+ notes for behavior/config changes. Research reports (`docs/reports/`)
32
+ and review findings (`docs/findings/`) stay local, untracked and unpacked.
33
+ Preserve dated evidence; add local reports or addenda instead of rewriting
34
+ it. Existing copies in Git history are not erased by this policy.
34
35
  - [ ] On a major version change, update the supported-versions row in
35
36
  `SECURITY.md`; `release:audit` requires it to read ``Latest `<major>.x` ``.
36
37
  - [ ] For Claude subscription routes, pair the fresh candidate with the exact
@@ -228,10 +228,10 @@ compaction is on.
228
228
 
229
229
  ### Automatic runs cap
230
230
 
231
- Automatic runs (native-hook, settled and background) are capped at **60
232
- seconds** and **four model calls**. `autoTriggerTimeoutMs` defaults to 120,000
233
- ms and accepts up to 300,000 ms, but the effective automatic deadline is
234
- `min(autoTriggerTimeoutMs × provider timeout multiplier, 60 s)`. The call cap is
231
+ Automatic runs (native-hook, settled and background) are capped at **300
232
+ seconds** and **four model calls**. `autoTriggerTimeoutMs` defaults to 300,000
233
+ ms and accepts up to 300,000 ms; the effective automatic deadline is
234
+ `min(autoTriggerTimeoutMs × provider timeout multiplier, 300 s)`. The call cap is
235
235
  `min(mode call budget, 4)`. When an automatic run times out or fails, it unwinds
236
236
  so Pi's own compactor can run.
237
237
 
@@ -269,7 +269,7 @@ For calls (`maxLlmCalls`) and prompt tokens (`maxLlmInputTokens`):
269
269
  | Per-run option (`--max-calls`, `max_calls`, ...) | Used as given, even above the mode limit |
270
270
  | Config value `0` | The mode limit |
271
271
  | Config value above `0` | `min(config value, mode limit)` |
272
- | Automatic run | Additionally capped at 4 calls and 60 s |
272
+ | Automatic run | Additionally capped at 4 calls and 300 s |
273
273
 
274
274
  With the default `maxLlmCalls: 8`, every mode keeps its own limit, because 8 is
275
275
  not below any mode's call limit. A config value can only lower the limit.
@@ -517,7 +517,7 @@ Hindsight setup, data flow and troubleshooting:
517
517
  | `minContextPercent` | 0–100 | `80` | `Start at context %` |
518
518
  | `prepareContextPercent` | `null` or 0–100, below `minContextPercent` | `null` | `Cleanup / prepare at context %` |
519
519
  | `maxContextTokens` | `0` (off) or integer 16,384–2,000,000 | `0` | `Context cap for start % (tokens)` |
520
- | `autoTriggerTimeoutMs` | integer 1,000–300,000 | `120000` | `Automatic run time limit (ms)`; capped at 60 s |
520
+ | `autoTriggerTimeoutMs` | integer 1,000–300,000 | `300000` | `Automatic run time limit (ms)`; capped at 300 s |
521
521
  | `compactionEngines` | ordered list of `eesv`, `native` | `["eesv"]` | `Engine` |
522
522
  | `requireApproval` | boolean | `true` | `Ask before applying` |
523
523
  | `showStatus` | boolean | `true` | `Footer status` |
@@ -133,9 +133,8 @@ receives the same three bounded coding-continuity scenarios (`implementation`,
133
133
  `debugging`, `continuity`) sequentially, with a 1,500-token output cap and a
134
134
  60-second timeout per call, scored by the deterministic verifier. It reports
135
135
  score, latency and reported usage. Apply a route manually, and only after
136
- representative evidence; one probe is not that evidence. The dated
137
- [2026-08-06 baseline](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/provider-evaluation-2026-08-06.md)
138
- (repository only) is an example of this output, not a current ranking.
136
+ representative evidence; one probe is not that evidence. Historical probe
137
+ results are not a current model ranking.
139
138
 
140
139
  ## Paired continuation and memory evaluation
141
140
 
@@ -400,22 +399,15 @@ no provider request.
400
399
  | `PSC_HINDSIGHT_LIVE=1 … bun run test/hindsight-live.canary.ts` | Not run by `bun test` | Live Hindsight contract with a hard call budget; see [Hindsight memory](./hindsight-memory.md#tests) |
401
400
 
402
401
  Dated reports record what was measured on their date, with the code and host
403
- versions stated inside. They are kept for provenance and are not updated
404
- retroactively; later findings are added as dated addenda. Current behavior is
405
- described in the [guide](./guide.md), [configuration](./configuration.md) and
406
- [architecture](../ARCHITECTURE.md). Reports live in the repository only; the
407
- npm package does not include `docs/reports/` or `docs/findings/`. Pilot
408
- reports have a machine-readable `.json` companion beside them.
409
-
410
- | Report | Scope |
411
- | --- | --- |
412
- | [Provider evaluation baseline, 2026-08-06](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/provider-evaluation-2026-08-06.md) | Live three-scenario probe across five models; advisory; 2026-09-25 addendum on route-report token semantics |
413
- | [Context hygiene and continuity, 2026-09-24](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/context-hygiene-2026-09-24.md) | Hygiene design and offline experiments |
414
- | [Hindsight and provider-native compaction research, 2026-09-24](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/hindsight-native-compaction-research-2026-09-24.md) | Pre-implementation research plus later measured results |
415
- | [Full AgentSession offline pilot, 2026-09-24](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/session-pilot-2026-09-24.md) | Scripted-transport lifecycle pilot; 2026-09-25 candidate and `9.8.0-canary.1` follow-ups |
416
- | [Visual evidence pilot, 2026-09-24](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/reports/visual-pilot-2026-09-24.md) | Live synthetic bitmap-versus-text reading pilot on one model |
417
-
418
- External review findings, one folder per reviewer, are indexed in
419
- [`docs/findings/`](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/findings/README.md).
420
- They are advisory analyses of a specific revision range, not release gates or
421
- evidence of current behavior.
402
+ versions stated inside. Preserve their provenance; add dated addenda rather
403
+ than updating measurements retroactively. Current behavior is described in the
404
+ [guide](./guide.md), [configuration](./configuration.md) and
405
+ [architecture](../ARCHITECTURE.md).
406
+
407
+ Research reports in `docs/reports/` and review findings in `docs/findings/`
408
+ are local, ignored artifacts, not tracked repository or npm content. Pilot
409
+ reports can keep machine-readable `.json` companions beside them. Earlier
410
+ copies may remain in Git history; this policy does not erase that history.
411
+
412
+ External review findings are advisory analyses of a specific revision range,
413
+ not release gates or evidence of current behavior.
package/docs/guide.md CHANGED
@@ -314,7 +314,7 @@ model (Home warns above 400k tokens), set `Context cap for start % (tokens)`
314
314
  and safety headroom still use the real window.
315
315
 
316
316
  Turning `Automatic compaction` off disables both Smart Compact strategies. It
317
- does not turn off Pi's own compactor. Automatic runs are capped at 60 seconds
317
+ does not turn off Pi's own compactor. Automatic runs are capped at 300 seconds
318
318
  and four model calls, whatever the configured limits are. When they fail, Pi
319
319
  may still use its own compactor. See
320
320
  [automatic strategies](./configuration.md#automatic-strategies) for the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-smart-compact",
3
- "version": "10.1.0",
3
+ "version": "10.1.1",
4
4
  "description": "Pi Continuity — context hygiene and session continuity for Pi Coding Agent: recoverable cleanup, checkpoints, memory and verified compaction.",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.4.2",