@mjasnikovs/pi-task 0.38.0 → 0.38.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.
@@ -102,10 +102,17 @@ export declare function readAcceptDebts(cwd: string): Promise<AcceptDebt[]>;
102
102
  * as the 'accepted' class — that one asserts a human weighed the failing artifact.
103
103
  *
104
104
  * Best-effort by construction (appendDebt swallows its own faults): the ledger is an
105
- * auditing aid and must never break the gate sequence that calls it. `origin`
106
- * defaults to 'accepted', which is the legacy 2-field on-disk shape.
105
+ * auditing aid and must never break the gate sequence that calls it.
106
+ *
107
+ * `origin` is REQUIRED and deliberately has no default. It used to default to
108
+ * 'accepted' (the legacy 2-field on-disk shape), and that default silently absorbed
109
+ * a dropped argument: the eight-recorder collapse migrated one call in
110
+ * scripts/ignored-writes-ab.ts without its origin, so a run-level 'final-gate'
111
+ * demotion was stamped as a human 'accepted'. The wrappers each carried their class
112
+ * in the NAME, so no migration of them could lose it; a defaulted parameter can.
113
+ * Making it explicit turns that whole class of slip into a compile error.
107
114
  */
108
- export declare function recordDebt(cwd: string, taskId: string, reason: string, origin?: DebtOrigin): Promise<void>;
115
+ export declare function recordDebt(cwd: string, taskId: string, reason: string, origin: DebtOrigin): Promise<void>;
109
116
  /**
110
117
  * The reason text a CROSS-TASK DELETION debt stores (mx5 run 12 PROMPT 2): the task's
111
118
  * work deleted a file a DIFFERENT task's commit introduced, verify FAILed, and the
@@ -179,10 +179,17 @@ async function appendDebt(cwd, entry) {
179
179
  * as the 'accepted' class — that one asserts a human weighed the failing artifact.
180
180
  *
181
181
  * Best-effort by construction (appendDebt swallows its own faults): the ledger is an
182
- * auditing aid and must never break the gate sequence that calls it. `origin`
183
- * defaults to 'accepted', which is the legacy 2-field on-disk shape.
182
+ * auditing aid and must never break the gate sequence that calls it.
183
+ *
184
+ * `origin` is REQUIRED and deliberately has no default. It used to default to
185
+ * 'accepted' (the legacy 2-field on-disk shape), and that default silently absorbed
186
+ * a dropped argument: the eight-recorder collapse migrated one call in
187
+ * scripts/ignored-writes-ab.ts without its origin, so a run-level 'final-gate'
188
+ * demotion was stamped as a human 'accepted'. The wrappers each carried their class
189
+ * in the NAME, so no migration of them could lose it; a defaulted parameter can.
190
+ * Making it explicit turns that whole class of slip into a compile error.
184
191
  */
185
- export async function recordDebt(cwd, taskId, reason, origin = 'accepted') {
192
+ export async function recordDebt(cwd, taskId, reason, origin) {
186
193
  await appendDebt(cwd, { taskId: taskId.trim(), reason: normaliseReason(reason), origin });
187
194
  }
188
195
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjasnikovs/pi-task",
3
- "version": "0.38.0",
3
+ "version": "0.38.1",
4
4
  "description": "Deterministic task planning and spec-orchestration for local models — crash-safe /task pipelines with verify/enforce gates, a real-time remote web view, and web/docs/fetch/worker subagent tools.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",