haansi 0.1.121 → 0.1.122

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.
Files changed (2) hide show
  1. package/dist/haansi.js +53 -4
  2. package/package.json +1 -1
package/dist/haansi.js CHANGED
@@ -95,7 +95,7 @@ var require_package = __commonJS({
95
95
  "package.json"(exports2, module2) {
96
96
  module2.exports = {
97
97
  name: "haansi",
98
- version: "0.1.121",
98
+ version: "0.1.122",
99
99
  description: "Haansi CLI - Session collector and MCP server for Claude Code & OpenAI Codex",
100
100
  bin: {
101
101
  haansi: "./dist/haansi.js"
@@ -19480,6 +19480,24 @@ var init_exclusions = __esm({
19480
19480
  "Actions workflow names from CI config that passed on the fix."
19481
19481
  ]
19482
19482
  }),
19483
+ // The change index (outcome-ledger/066): each changed file as org-keyed
19484
+ // digests (path_blind, base_blind, dir_blinds: the *_blind rule); these
19485
+ // say only which source a row is for.
19486
+ ...exchangeExclusions(INTEL, "change_files", {
19487
+ kind: ["operational", "Closed CHECK vocabulary (solution, activity)."],
19488
+ source_id: [
19489
+ "join-key",
19490
+ "The solution's or activity's id (a UUID as text), joined by equality."
19491
+ ],
19492
+ source_fingerprint: [
19493
+ "derived",
19494
+ "A truncated SHA-256 of the source's path list, to tell when to rebuild; no text."
19495
+ ],
19496
+ dir_blinds: [
19497
+ "derived",
19498
+ "Org-keyed HMAC digests of the file's folders (blind indexes, plural so the *_blind rule misses it); no path text."
19499
+ ]
19500
+ }),
19483
19501
  ...exchangeExclusions(INTEL, "stored_replay_tasks", {
19484
19502
  task_key: [
19485
19503
  "join-key",
@@ -26233,6 +26251,14 @@ var init_search_vector_write = __esm({
26233
26251
  }
26234
26252
  });
26235
26253
 
26254
+ // ../../packages/@company/db/src/change-paths.ts
26255
+ var init_change_paths = __esm({
26256
+ "../../packages/@company/db/src/change-paths.ts"() {
26257
+ "use strict";
26258
+ init_src4();
26259
+ }
26260
+ });
26261
+
26236
26262
  // ../../packages/@company/db/src/org-purge.ts
26237
26263
  var observability5;
26238
26264
  var init_org_purge = __esm({
@@ -26995,6 +27021,11 @@ var init_table_registry = __esm({
26995
27021
  entry("intelligence", INTELLIGENCE_DB, "replay_mining_requests", "direct", {
26996
27022
  scopingColumn: "organization_id"
26997
27023
  }),
27024
+ // The change index: each changed file of a solution or an activity as
27025
+ // org-keyed digests, so files find them on any org (outcome-ledger/066).
27026
+ entry("intelligence", INTELLIGENCE_DB, "change_files", "direct", {
27027
+ scopingColumn: "organization_id"
27028
+ }),
26998
27029
  // A person's revert verdicts, the checks that validate a change and the
26999
27030
  // replay commands, per repository (outcome evidence v2 plan).
27000
27031
  entry("intelligence", INTELLIGENCE_DB, "revert_labels", "direct", {
@@ -28107,6 +28138,7 @@ var init_src6 = __esm({
28107
28138
  init_admin_pools();
28108
28139
  init_search_vector_write();
28109
28140
  init_keyword_terms();
28141
+ init_change_paths();
28110
28142
  init_org_purge();
28111
28143
  init_org_orphan_scan();
28112
28144
  init_integration_purge();
@@ -60309,7 +60341,7 @@ function searchSolutionsTool(contextSchema2) {
60309
60341
  description: "Optional. The error line, e.g. the assertion or exception message"
60310
60342
  },
60311
60343
  files: stringList(
60312
- "Optional. File paths you changed (or will change), or that the failure runs through"
60344
+ "Optional. File (or folder) paths you changed (or will change), or that the failure runs through"
60313
60345
  ),
60314
60346
  names: stringList(
60315
60347
  "Optional. Identifiers involved: functions, classes, routes, config keys"
@@ -89261,6 +89293,15 @@ var init_replay_spec_gaps = __esm({
89261
89293
  });
89262
89294
 
89263
89295
  // src/commands/replay-recurring.ts
89296
+ function errorKeyOf(output) {
89297
+ for (const line of output.split("\n")) {
89298
+ const m = /\b\w*(?:Error|Exception)\b:?\s*(.+)$/.exec(line) ?? /\b(expected .+)$/i.exec(line);
89299
+ if (!m) continue;
89300
+ const key = m[1].toLowerCase().replace(/(["'`])(?:(?!\1).)*\1/g, "_").replace(/\d+/g, "#").replace(/\s+/g, " ").trim().slice(0, 80);
89301
+ if (key.replace(/[_#\s]/g, "").length >= 12) return key;
89302
+ }
89303
+ return null;
89304
+ }
89264
89305
  function commitTimeOf(run3) {
89265
89306
  const seen = /* @__PURE__ */ new Map();
89266
89307
  return (sha) => {
@@ -89285,11 +89326,15 @@ async function recurringFailures(tasks, committedAt) {
89285
89326
  const start = t.startsAt ? Date.parse(t.startsAt) : NaN;
89286
89327
  if (!Number.isFinite(start)) continue;
89287
89328
  const mine = new Set(t.failing.tests);
89329
+ const myFiles = new Set(t.failing.tests.map(fileOf));
89330
+ const myError = errorKeyOf(t.failing.output);
89288
89331
  const earlier = [];
89289
89332
  for (const e of bugs) {
89290
89333
  if (e.taskId === t.taskId || e.repository !== t.repository) continue;
89291
89334
  if (e.processId && e.processId === t.processId) continue;
89292
- if (!e.failing.tests.some((name) => mine.has(name))) continue;
89335
+ const sameTest = e.failing.tests.some((name) => mine.has(name));
89336
+ const sameFileAndError = myError !== null && e.failing.tests.some((name) => myFiles.has(fileOf(name))) && errorKeyOf(e.failing.output) === myError;
89337
+ if (!sameTest && !sameFileAndError) continue;
89293
89338
  const fixed = await committedAt(e.targetSha);
89294
89339
  if (fixed !== null && fixed < start) earlier.push(e.taskId);
89295
89340
  }
@@ -89298,10 +89343,14 @@ async function recurringFailures(tasks, committedAt) {
89298
89343
  }
89299
89344
  return out;
89300
89345
  }
89301
- var MAX_RECURRING, SHA2;
89346
+ var fileOf, MAX_RECURRING, SHA2;
89302
89347
  var init_replay_recurring = __esm({
89303
89348
  "src/commands/replay-recurring.ts"() {
89304
89349
  "use strict";
89350
+ fileOf = (test) => {
89351
+ const i = test.indexOf(" \u203A ");
89352
+ return i < 0 ? test : test.slice(0, i);
89353
+ };
89305
89354
  MAX_RECURRING = 20;
89306
89355
  SHA2 = /^[0-9a-f]{40}$/i;
89307
89356
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haansi",
3
- "version": "0.1.121",
3
+ "version": "0.1.122",
4
4
  "description": "Haansi CLI - Session collector and MCP server for Claude Code & OpenAI Codex",
5
5
  "bin": {
6
6
  "haansi": "./dist/haansi.js"