@descryy/core 0.1.1 → 0.3.0

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 (105) hide show
  1. package/dist/budget/index.d.ts +5 -0
  2. package/dist/budget/index.d.ts.map +1 -0
  3. package/dist/budget/index.js +3 -0
  4. package/dist/budget/index.js.map +1 -0
  5. package/dist/budget/reply.d.ts +67 -0
  6. package/dist/budget/reply.d.ts.map +1 -0
  7. package/dist/budget/reply.js +76 -0
  8. package/dist/budget/reply.js.map +1 -0
  9. package/dist/budget/size.d.ts +43 -0
  10. package/dist/budget/size.d.ts.map +1 -0
  11. package/dist/budget/size.js +52 -0
  12. package/dist/budget/size.js.map +1 -0
  13. package/dist/contracts/engine.d.ts.map +1 -1
  14. package/dist/contracts/engine.js +27 -10
  15. package/dist/contracts/engine.js.map +1 -1
  16. package/dist/contracts/orphans.d.ts +17 -0
  17. package/dist/contracts/orphans.d.ts.map +1 -1
  18. package/dist/contracts/orphans.js +19 -2
  19. package/dist/contracts/orphans.js.map +1 -1
  20. package/dist/graph/cross-language.d.ts +0 -7
  21. package/dist/graph/cross-language.d.ts.map +1 -1
  22. package/dist/graph/cross-language.js +36 -2
  23. package/dist/graph/cross-language.js.map +1 -1
  24. package/dist/graph/index.d.ts +2 -0
  25. package/dist/graph/index.d.ts.map +1 -1
  26. package/dist/graph/index.js +1 -0
  27. package/dist/graph/index.js.map +1 -1
  28. package/dist/graph/observed-tests.d.ts +118 -0
  29. package/dist/graph/observed-tests.d.ts.map +1 -0
  30. package/dist/graph/observed-tests.js +123 -0
  31. package/dist/graph/observed-tests.js.map +1 -0
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +2 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/multipr/mechanical.d.ts.map +1 -1
  37. package/dist/multipr/mechanical.js +1 -0
  38. package/dist/multipr/mechanical.js.map +1 -1
  39. package/dist/query/confirmed-facts.d.ts +21 -5
  40. package/dist/query/confirmed-facts.d.ts.map +1 -1
  41. package/dist/query/confirmed-facts.js +30 -7
  42. package/dist/query/confirmed-facts.js.map +1 -1
  43. package/dist/query/index.d.ts +7 -1
  44. package/dist/query/index.d.ts.map +1 -1
  45. package/dist/query/index.js +4 -1
  46. package/dist/query/index.js.map +1 -1
  47. package/dist/query/memory.d.ts.map +1 -1
  48. package/dist/query/memory.js +4 -0
  49. package/dist/query/memory.js.map +1 -1
  50. package/dist/query/prominence.d.ts +73 -0
  51. package/dist/query/prominence.d.ts.map +1 -0
  52. package/dist/query/prominence.js +79 -0
  53. package/dist/query/prominence.js.map +1 -0
  54. package/dist/query/provider.d.ts +7 -0
  55. package/dist/query/provider.d.ts.map +1 -1
  56. package/dist/query/provider.js.map +1 -1
  57. package/dist/query/queries.d.ts.map +1 -1
  58. package/dist/query/queries.js +39 -15
  59. package/dist/query/queries.js.map +1 -1
  60. package/dist/query/resolution-floor.d.ts +36 -0
  61. package/dist/query/resolution-floor.d.ts.map +1 -0
  62. package/dist/query/resolution-floor.js +39 -0
  63. package/dist/query/resolution-floor.js.map +1 -0
  64. package/dist/query/sqlite.d.ts.map +1 -1
  65. package/dist/query/sqlite.js +1 -0
  66. package/dist/query/sqlite.js.map +1 -1
  67. package/dist/query/test-coverage.d.ts +65 -0
  68. package/dist/query/test-coverage.d.ts.map +1 -0
  69. package/dist/query/test-coverage.js +95 -0
  70. package/dist/query/test-coverage.js.map +1 -0
  71. package/dist/query/traverse.d.ts +60 -2
  72. package/dist/query/traverse.d.ts.map +1 -1
  73. package/dist/query/traverse.js +0 -0
  74. package/dist/query/traverse.js.map +1 -1
  75. package/dist/scoping/traverse.d.ts.map +1 -1
  76. package/dist/scoping/traverse.js +18 -4
  77. package/dist/scoping/traverse.js.map +1 -1
  78. package/dist/sources/confirmed/incidents.d.ts +47 -0
  79. package/dist/sources/confirmed/incidents.d.ts.map +1 -0
  80. package/dist/sources/confirmed/incidents.js +173 -0
  81. package/dist/sources/confirmed/incidents.js.map +1 -0
  82. package/dist/sources/confirmed/index.d.ts +3 -0
  83. package/dist/sources/confirmed/index.d.ts.map +1 -0
  84. package/dist/sources/confirmed/index.js +2 -0
  85. package/dist/sources/confirmed/index.js.map +1 -0
  86. package/dist/sources/git/diff.d.ts +26 -0
  87. package/dist/sources/git/diff.d.ts.map +1 -1
  88. package/dist/sources/git/diff.js +60 -1
  89. package/dist/sources/git/diff.js.map +1 -1
  90. package/dist/sources/git/incidents.d.ts +109 -0
  91. package/dist/sources/git/incidents.d.ts.map +1 -0
  92. package/dist/sources/git/incidents.js +187 -0
  93. package/dist/sources/git/incidents.js.map +1 -0
  94. package/dist/sources/git/index.d.ts +3 -1
  95. package/dist/sources/git/index.d.ts.map +1 -1
  96. package/dist/sources/git/index.js +2 -1
  97. package/dist/sources/git/index.js.map +1 -1
  98. package/dist/sources/git/source.d.ts.map +1 -1
  99. package/dist/sources/git/source.js +0 -0
  100. package/dist/sources/git/source.js.map +1 -1
  101. package/dist/store/schema.d.ts +5 -4
  102. package/dist/store/schema.d.ts.map +1 -1
  103. package/dist/store/schema.js +42 -2
  104. package/dist/store/schema.js.map +1 -1
  105. package/package.json +2 -2
@@ -77,11 +77,13 @@ export const DERIVED_TABLES = [
77
77
  ];
78
78
  /**
79
79
  * Cannot be regenerated: a run that witnessed an edge fire is gone once the
80
- * process exits, and a human's correction of a wrong edge is not in the source
81
- * at all. These survive every rebuild.
80
+ * process exits, a run that executed a test is gone the same way, and a human's
81
+ * correction of a wrong edge is not in the source at all. These survive every
82
+ * rebuild.
82
83
  */
83
84
  export const EARNED_TABLES = [
84
85
  "observed_edges",
86
+ "observed_tests",
85
87
  "edge_corrections",
86
88
  "incident_links",
87
89
  "pr_scopes",
@@ -264,6 +266,44 @@ CREATE TABLE IF NOT EXISTS observed_edges (
264
266
  PRIMARY KEY (edge_id, run_id)
265
267
  ) STRICT;
266
268
 
269
+ -- Which tests actually ran, and what happened. The coverage axis — AI layer §20's
270
+ -- "Verification status" — a different question from confidence, needing a
271
+ -- different carrier.
272
+ --
273
+ -- Earned for the same reason as observed_edges, one step over: nothing in the
274
+ -- source says which tests executed, so a rebuild that dropped this would turn
275
+ -- "what I actually verified" silently back into "what might be affected".
276
+ --
277
+ -- Not an edge, deliberately. A test-runner's evidence carries no stack, so an
278
+ -- observed test names exactly one node — its own TEST_CASE — and pairing it with
279
+ -- a function it merely co-occurred with would mint an edge from temporal
280
+ -- coincidence. That is why this is a table and not a promotion of a TESTS edge
281
+ -- to R4; see DEC-NEXT-test-run-coverage-has-no-carrier.md.
282
+ --
283
+ -- (node_id, run_id) is the identity: two runs of one test are two facts, while a
284
+ -- retry inside one run is the same fact re-observed, so the latter updates in
285
+ -- place. Within-run retries are therefore not distinguishable here — a disclosed
286
+ -- limit, not an oversight; this table is a coverage carrier, not a flake detector.
287
+ CREATE TABLE IF NOT EXISTS observed_tests (
288
+ node_id TEXT NOT NULL,
289
+ run_id TEXT NOT NULL,
290
+ qualified_name TEXT NOT NULL,
291
+ outcome TEXT NOT NULL, -- 'passed' | 'failed' | 'skipped'
292
+ -- REAL, not INTEGER, and this was an INTEGER until a real run proved it could
293
+ -- not be. Runners report fractional milliseconds — node:test emits 2.316958 —
294
+ -- and a STRICT table refuses that value outright, so every write failed on
295
+ -- first contact with an actual suite while the unit tests, which all passed
296
+ -- integer literals, stayed green. Rounding was the other option and is worse:
297
+ -- sub-millisecond tests are ordinary here, and 0.36 rounded to 0 reads as
298
+ -- "instant", the same falsehood the null-rather-than-zero rule below refuses.
299
+ duration_ms REAL,
300
+ commit_sha TEXT NOT NULL,
301
+ observed_at INTEGER NOT NULL,
302
+ PRIMARY KEY (node_id, run_id)
303
+ ) STRICT;
304
+
305
+ CREATE INDEX IF NOT EXISTS idx_observed_tests_run ON observed_tests(run_id);
306
+
267
307
  -- §11B.5. A human said an edge was wrong, or runtime contradicted it. Feeding
268
308
  -- this back is how precision improves; losing it repeats the same false claim.
269
309
  CREATE TABLE IF NOT EXISTS edge_corrections (
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/store/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,CAAC,4CAA4C;AAEhF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,cAAc;CACN,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,WAAW;CACH,CAAC;AAKX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY;IACZ,iBAAiB;IACjB,OAAO;IACP,OAAO;IACP,aAAa;IACb,cAAc;CAC4B,CAAC;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyNzB,CAAC"}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/store/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,CAAC,4CAA4C;AAEhF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,cAAc;CACN,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,WAAW;CACH,CAAC;AAKX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY;IACZ,iBAAiB;IACjB,OAAO;IACP,OAAO;IACP,aAAa;IACb,cAAc;CAC4B,CAAC;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+PzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descryy/core",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Descry graph engine: storage, graph builder, query layer, traversal, diff scoping, git source, MCP server.",
6
6
  "license": "MIT",
@@ -24,6 +24,6 @@
24
24
  "build": "tsc -b"
25
25
  },
26
26
  "dependencies": {
27
- "@descryy/ir": "0.1.1"
27
+ "@descryy/ir": "0.3.0"
28
28
  }
29
29
  }