@descryy/core 0.3.0 → 0.5.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.
- package/dist/budget/reply.d.ts +11 -46
- package/dist/budget/reply.d.ts.map +1 -1
- package/dist/budget/reply.js +10 -39
- package/dist/budget/reply.js.map +1 -1
- package/dist/budget/size.d.ts +2 -21
- package/dist/budget/size.d.ts.map +1 -1
- package/dist/budget/size.js +3 -24
- package/dist/budget/size.js.map +1 -1
- package/dist/capabilities/preconditions.d.ts +7 -68
- package/dist/capabilities/preconditions.d.ts.map +1 -1
- package/dist/capabilities/preconditions.js +6 -57
- package/dist/capabilities/preconditions.js.map +1 -1
- package/dist/contracts/engine.d.ts +26 -12
- package/dist/contracts/engine.d.ts.map +1 -1
- package/dist/contracts/engine.js +28 -11
- package/dist/contracts/engine.js.map +1 -1
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/orphans.d.ts +28 -77
- package/dist/contracts/orphans.d.ts.map +1 -1
- package/dist/contracts/orphans.js +124 -94
- package/dist/contracts/orphans.js.map +1 -1
- package/dist/contracts/paths.d.ts +4 -114
- package/dist/contracts/paths.d.ts.map +1 -1
- package/dist/contracts/paths.js +7 -140
- package/dist/contracts/paths.js.map +1 -1
- package/dist/contracts/shapes.d.ts +13 -66
- package/dist/contracts/shapes.d.ts.map +1 -1
- package/dist/contracts/shapes.js +20 -91
- package/dist/contracts/shapes.js.map +1 -1
- package/dist/governance/budget.d.ts +12 -48
- package/dist/governance/budget.d.ts.map +1 -1
- package/dist/governance/budget.js +12 -48
- package/dist/governance/budget.js.map +1 -1
- package/dist/governance/candidate-boundary.d.ts +4 -32
- package/dist/governance/candidate-boundary.d.ts.map +1 -1
- package/dist/governance/candidate-boundary.js +4 -32
- package/dist/governance/candidate-boundary.js.map +1 -1
- package/dist/governance/escalation.d.ts +7 -45
- package/dist/governance/escalation.d.ts.map +1 -1
- package/dist/governance/escalation.js +7 -45
- package/dist/governance/escalation.js.map +1 -1
- package/dist/governance/fact-boundary.d.ts +7 -49
- package/dist/governance/fact-boundary.d.ts.map +1 -1
- package/dist/governance/fact-boundary.js +5 -43
- package/dist/governance/fact-boundary.js.map +1 -1
- package/dist/governance/finding-funnel.d.ts +11 -72
- package/dist/governance/finding-funnel.d.ts.map +1 -1
- package/dist/governance/finding-funnel.js +9 -68
- package/dist/governance/finding-funnel.js.map +1 -1
- package/dist/graph/build.d.ts +13 -75
- package/dist/graph/build.d.ts.map +1 -1
- package/dist/graph/build.js +0 -0
- package/dist/graph/build.js.map +1 -1
- package/dist/graph/cross-language.d.ts +4 -43
- package/dist/graph/cross-language.d.ts.map +1 -1
- package/dist/graph/cross-language.js +9 -77
- package/dist/graph/cross-language.js.map +1 -1
- package/dist/graph/index.d.ts +1 -1
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/merge.d.ts +8 -76
- package/dist/graph/merge.d.ts.map +1 -1
- package/dist/graph/merge.js +27 -77
- package/dist/graph/merge.js.map +1 -1
- package/dist/graph/observed-tests.d.ts +7 -68
- package/dist/graph/observed-tests.d.ts.map +1 -1
- package/dist/graph/observed-tests.js +5 -60
- package/dist/graph/observed-tests.js.map +1 -1
- package/dist/graph/persist.d.ts +2 -25
- package/dist/graph/persist.d.ts.map +1 -1
- package/dist/graph/persist.js +2 -25
- package/dist/graph/persist.js.map +1 -1
- package/dist/graph/runtime-confirmation.d.ts +14 -91
- package/dist/graph/runtime-confirmation.d.ts.map +1 -1
- package/dist/graph/runtime-confirmation.js +19 -103
- package/dist/graph/runtime-confirmation.js.map +1 -1
- package/dist/ledger/mint.d.ts +9 -43
- package/dist/ledger/mint.d.ts.map +1 -1
- package/dist/ledger/mint.js +15 -65
- package/dist/ledger/mint.js.map +1 -1
- package/dist/ledger/resolve.d.ts +13 -81
- package/dist/ledger/resolve.d.ts.map +1 -1
- package/dist/ledger/resolve.js +13 -76
- package/dist/ledger/resolve.js.map +1 -1
- package/dist/multipr/fingerprint.d.ts +5 -46
- package/dist/multipr/fingerprint.d.ts.map +1 -1
- package/dist/multipr/fingerprint.js +22 -74
- package/dist/multipr/fingerprint.js.map +1 -1
- package/dist/multipr/hidden-dependency.d.ts +13 -73
- package/dist/multipr/hidden-dependency.d.ts.map +1 -1
- package/dist/multipr/hidden-dependency.js +12 -63
- package/dist/multipr/hidden-dependency.js.map +1 -1
- package/dist/multipr/mechanical.d.ts +25 -160
- package/dist/multipr/mechanical.d.ts.map +1 -1
- package/dist/multipr/mechanical.js +21 -137
- package/dist/multipr/mechanical.js.map +1 -1
- package/dist/multipr/migration-heads.d.ts +18 -105
- package/dist/multipr/migration-heads.d.ts.map +1 -1
- package/dist/multipr/migration-heads.js +15 -84
- package/dist/multipr/migration-heads.js.map +1 -1
- package/dist/multipr/overlap.d.ts +16 -94
- package/dist/multipr/overlap.d.ts.map +1 -1
- package/dist/multipr/overlap.js +25 -105
- package/dist/multipr/overlap.js.map +1 -1
- package/dist/multipr/scope-store.d.ts +15 -80
- package/dist/multipr/scope-store.d.ts.map +1 -1
- package/dist/multipr/scope-store.js +17 -87
- package/dist/multipr/scope-store.js.map +1 -1
- package/dist/multipr/superseded.d.ts +10 -95
- package/dist/multipr/superseded.d.ts.map +1 -1
- package/dist/multipr/superseded.js +7 -60
- package/dist/multipr/superseded.js.map +1 -1
- package/dist/query/confirmed-facts.d.ts +12 -58
- package/dist/query/confirmed-facts.d.ts.map +1 -1
- package/dist/query/confirmed-facts.js +8 -47
- package/dist/query/confirmed-facts.js.map +1 -1
- package/dist/query/declared-value-closure.d.ts +13 -104
- package/dist/query/declared-value-closure.d.ts.map +1 -1
- package/dist/query/declared-value-closure.js +15 -104
- package/dist/query/declared-value-closure.js.map +1 -1
- package/dist/query/memory.d.ts +5 -9
- package/dist/query/memory.d.ts.map +1 -1
- package/dist/query/memory.js +31 -15
- package/dist/query/memory.js.map +1 -1
- package/dist/query/prominence.d.ts +6 -55
- package/dist/query/prominence.d.ts.map +1 -1
- package/dist/query/prominence.js +6 -55
- package/dist/query/prominence.js.map +1 -1
- package/dist/query/provider.d.ts +28 -81
- package/dist/query/provider.d.ts.map +1 -1
- package/dist/query/provider.js +8 -29
- package/dist/query/provider.js.map +1 -1
- package/dist/query/queries.d.ts +15 -65
- package/dist/query/queries.d.ts.map +1 -1
- package/dist/query/queries.js +43 -100
- package/dist/query/queries.js.map +1 -1
- package/dist/query/refusal-fetch.d.ts +8 -85
- package/dist/query/refusal-fetch.d.ts.map +1 -1
- package/dist/query/refusal-fetch.js +11 -93
- package/dist/query/refusal-fetch.js.map +1 -1
- package/dist/query/refusal-questions.d.ts +17 -92
- package/dist/query/refusal-questions.d.ts.map +1 -1
- package/dist/query/refusal-questions.js +14 -78
- package/dist/query/refusal-questions.js.map +1 -1
- package/dist/query/resolution-floor.d.ts +3 -23
- package/dist/query/resolution-floor.d.ts.map +1 -1
- package/dist/query/resolution-floor.js +3 -23
- package/dist/query/resolution-floor.js.map +1 -1
- package/dist/query/root-cause-score.d.ts +11 -161
- package/dist/query/root-cause-score.d.ts.map +1 -1
- package/dist/query/root-cause-score.js +6 -137
- package/dist/query/root-cause-score.js.map +1 -1
- package/dist/query/row-closure-picture.d.ts +5 -67
- package/dist/query/row-closure-picture.d.ts.map +1 -1
- package/dist/query/row-closure-picture.js +6 -67
- package/dist/query/row-closure-picture.js.map +1 -1
- package/dist/query/similar-incidents.d.ts +6 -41
- package/dist/query/similar-incidents.d.ts.map +1 -1
- package/dist/query/similar-incidents.js +15 -69
- package/dist/query/similar-incidents.js.map +1 -1
- package/dist/query/sqlite.d.ts +3 -7
- package/dist/query/sqlite.d.ts.map +1 -1
- package/dist/query/sqlite.js +13 -16
- package/dist/query/sqlite.js.map +1 -1
- package/dist/query/test-coverage.d.ts +5 -45
- package/dist/query/test-coverage.d.ts.map +1 -1
- package/dist/query/test-coverage.js +10 -53
- package/dist/query/test-coverage.js.map +1 -1
- package/dist/query/traverse.d.ts +22 -126
- package/dist/query/traverse.d.ts.map +1 -1
- package/dist/query/traverse.js +0 -0
- package/dist/query/traverse.js.map +1 -1
- package/dist/query/unresolved.d.ts +19 -164
- package/dist/query/unresolved.d.ts.map +1 -1
- package/dist/query/unresolved.js +11 -138
- package/dist/query/unresolved.js.map +1 -1
- package/dist/query/verification-status.d.ts +12 -109
- package/dist/query/verification-status.d.ts.map +1 -1
- package/dist/query/verification-status.js +9 -99
- package/dist/query/verification-status.js.map +1 -1
- package/dist/recording/migrate.d.ts +4 -10
- package/dist/recording/migrate.d.ts.map +1 -1
- package/dist/recording/migrate.js +4 -10
- package/dist/recording/migrate.js.map +1 -1
- package/dist/recording/reader.d.ts +2 -7
- package/dist/recording/reader.d.ts.map +1 -1
- package/dist/recording/reader.js +2 -7
- package/dist/recording/reader.js.map +1 -1
- package/dist/recording/redact.d.ts +6 -57
- package/dist/recording/redact.d.ts.map +1 -1
- package/dist/recording/redact.js +8 -64
- package/dist/recording/redact.js.map +1 -1
- package/dist/recording/schema.d.ts +3 -38
- package/dist/recording/schema.d.ts.map +1 -1
- package/dist/recording/schema.js +3 -38
- package/dist/recording/schema.js.map +1 -1
- package/dist/recording/writer.d.ts +11 -74
- package/dist/recording/writer.d.ts.map +1 -1
- package/dist/recording/writer.js +3 -43
- package/dist/recording/writer.js.map +1 -1
- package/dist/scoping/fanout.d.ts +6 -68
- package/dist/scoping/fanout.d.ts.map +1 -1
- package/dist/scoping/fanout.js +6 -68
- package/dist/scoping/fanout.js.map +1 -1
- package/dist/scoping/score.d.ts +20 -70
- package/dist/scoping/score.d.ts.map +1 -1
- package/dist/scoping/score.js +20 -70
- package/dist/scoping/score.js.map +1 -1
- package/dist/scoping/tiers.d.ts +4 -16
- package/dist/scoping/tiers.d.ts.map +1 -1
- package/dist/scoping/tiers.js +4 -16
- package/dist/scoping/tiers.js.map +1 -1
- package/dist/scoping/traverse.d.ts +3 -25
- package/dist/scoping/traverse.d.ts.map +1 -1
- package/dist/scoping/traverse.js +14 -49
- package/dist/scoping/traverse.js.map +1 -1
- package/dist/scoping/weights.d.ts +10 -74
- package/dist/scoping/weights.d.ts.map +1 -1
- package/dist/scoping/weights.js +14 -86
- package/dist/scoping/weights.js.map +1 -1
- package/dist/sources/confirmed/incidents.d.ts +5 -35
- package/dist/sources/confirmed/incidents.d.ts.map +1 -1
- package/dist/sources/confirmed/incidents.js +14 -48
- package/dist/sources/confirmed/incidents.js.map +1 -1
- package/dist/sources/git/diff.d.ts +71 -65
- package/dist/sources/git/diff.d.ts.map +1 -1
- package/dist/sources/git/diff.js +136 -83
- package/dist/sources/git/diff.js.map +1 -1
- package/dist/sources/git/env.d.ts +7 -0
- package/dist/sources/git/env.d.ts.map +1 -1
- package/dist/sources/git/env.js +10 -11
- package/dist/sources/git/env.js.map +1 -1
- package/dist/sources/git/history.d.ts +64 -84
- package/dist/sources/git/history.d.ts.map +1 -1
- package/dist/sources/git/history.js +141 -112
- package/dist/sources/git/history.js.map +1 -1
- package/dist/sources/git/incidents.d.ts +13 -75
- package/dist/sources/git/incidents.d.ts.map +1 -1
- package/dist/sources/git/incidents.js +21 -91
- package/dist/sources/git/incidents.js.map +1 -1
- package/dist/sources/git/index.d.ts +5 -3
- package/dist/sources/git/index.d.ts.map +1 -1
- package/dist/sources/git/index.js +3 -2
- package/dist/sources/git/index.js.map +1 -1
- package/dist/sources/git/source.d.ts +9 -79
- package/dist/sources/git/source.d.ts.map +1 -1
- package/dist/sources/git/source.js +0 -0
- package/dist/sources/git/source.js.map +1 -1
- package/dist/sources/migrations/across-change.d.ts +94 -0
- package/dist/sources/migrations/across-change.d.ts.map +1 -0
- package/dist/sources/migrations/across-change.js +278 -0
- package/dist/sources/migrations/across-change.js.map +1 -0
- package/dist/sources/migrations/dialects.d.ts +20 -36
- package/dist/sources/migrations/dialects.d.ts.map +1 -1
- package/dist/sources/migrations/dialects.js +11 -36
- package/dist/sources/migrations/dialects.js.map +1 -1
- package/dist/sources/migrations/index.d.ts +3 -1
- package/dist/sources/migrations/index.d.ts.map +1 -1
- package/dist/sources/migrations/index.js +2 -1
- package/dist/sources/migrations/index.js.map +1 -1
- package/dist/sources/migrations/read.d.ts +14 -79
- package/dist/sources/migrations/read.d.ts.map +1 -1
- package/dist/sources/migrations/read.js +14 -89
- package/dist/sources/migrations/read.js.map +1 -1
- package/dist/sources/workspace/workspace.d.ts +6 -42
- package/dist/sources/workspace/workspace.d.ts.map +1 -1
- package/dist/sources/workspace/workspace.js +10 -53
- package/dist/sources/workspace/workspace.js.map +1 -1
- package/dist/store/driver/driver.d.ts +9 -38
- package/dist/store/driver/driver.d.ts.map +1 -1
- package/dist/store/driver/driver.js +4 -22
- package/dist/store/driver/driver.js.map +1 -1
- package/dist/store/driver/node-sqlite.d.ts +3 -12
- package/dist/store/driver/node-sqlite.d.ts.map +1 -1
- package/dist/store/driver/node-sqlite.js +4 -18
- package/dist/store/driver/node-sqlite.js.map +1 -1
- package/dist/store/index.d.ts +2 -7
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +4 -10
- package/dist/store/index.js.map +1 -1
- package/dist/store/migrate.d.ts +14 -50
- package/dist/store/migrate.d.ts.map +1 -1
- package/dist/store/migrate.js +15 -52
- package/dist/store/migrate.js.map +1 -1
- package/dist/store/reader.d.ts +19 -84
- package/dist/store/reader.d.ts.map +1 -1
- package/dist/store/reader.js +25 -92
- package/dist/store/reader.js.map +1 -1
- package/dist/store/schema.d.ts +14 -76
- package/dist/store/schema.d.ts.map +1 -1
- package/dist/store/schema.js +14 -76
- package/dist/store/schema.js.map +1 -1
- package/dist/store/writer.d.ts +14 -88
- package/dist/store/writer.d.ts.map +1 -1
- package/dist/store/writer.js +29 -123
- package/dist/store/writer.js.map +1 -1
- package/dist/tiers/certify.d.ts +46 -281
- package/dist/tiers/certify.d.ts.map +1 -1
- package/dist/tiers/certify.js +46 -226
- package/dist/tiers/certify.js.map +1 -1
- package/dist/tiers/ladder.d.ts +7 -51
- package/dist/tiers/ladder.d.ts.map +1 -1
- package/dist/tiers/ladder.js +13 -89
- package/dist/tiers/ladder.js.map +1 -1
- package/dist/validation/attributes.d.ts +47 -0
- package/dist/validation/attributes.d.ts.map +1 -0
- package/dist/validation/attributes.js +130 -0
- package/dist/validation/attributes.js.map +1 -0
- package/dist/validation/config-graph.d.ts +7 -56
- package/dist/validation/config-graph.d.ts.map +1 -1
- package/dist/validation/config-graph.js +15 -61
- package/dist/validation/config-graph.js.map +1 -1
- package/dist/validation/env.d.ts +53 -2
- package/dist/validation/env.d.ts.map +1 -1
- package/dist/validation/env.js +99 -4
- package/dist/validation/env.js.map +1 -1
- package/dist/validation/index.d.ts +5 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +3 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/join-substitution.d.ts +22 -120
- package/dist/validation/join-substitution.d.ts.map +1 -1
- package/dist/validation/join-substitution.js +13 -90
- package/dist/validation/join-substitution.js.map +1 -1
- package/dist/validation/migration-integrity.d.ts +72 -0
- package/dist/validation/migration-integrity.d.ts.map +1 -0
- package/dist/validation/migration-integrity.js +238 -0
- package/dist/validation/migration-integrity.js.map +1 -0
- package/dist/validation/migrations.d.ts +23 -88
- package/dist/validation/migrations.d.ts.map +1 -1
- package/dist/validation/migrations.js +20 -79
- package/dist/validation/migrations.js.map +1 -1
- package/dist/validation/nodes.d.ts +3 -1
- package/dist/validation/nodes.d.ts.map +1 -1
- package/dist/validation/nodes.js +3 -1
- package/dist/validation/nodes.js.map +1 -1
- package/dist/validation/rollback.d.ts +10 -73
- package/dist/validation/rollback.d.ts.map +1 -1
- package/dist/validation/rollback.js +23 -81
- package/dist/validation/rollback.js.map +1 -1
- package/dist/validation/route-drift.d.ts +9 -62
- package/dist/validation/route-drift.d.ts.map +1 -1
- package/dist/validation/route-drift.js +7 -52
- package/dist/validation/route-drift.js.map +1 -1
- package/dist/validation/sources.d.ts +16 -94
- package/dist/validation/sources.d.ts.map +1 -1
- package/dist/validation/sources.js +51 -147
- package/dist/validation/sources.js.map +1 -1
- package/dist/worker/pool.d.ts +6 -45
- package/dist/worker/pool.d.ts.map +1 -1
- package/dist/worker/pool.js +5 -42
- package/dist/worker/pool.js.map +1 -1
- package/dist/worker/protocol.d.ts +7 -20
- package/dist/worker/protocol.d.ts.map +1 -1
- package/dist/worker/protocol.js +3 -10
- package/dist/worker/protocol.js.map +1 -1
- package/dist/worker/traversal.worker.d.ts +2 -21
- package/dist/worker/traversal.worker.d.ts.map +1 -1
- package/dist/worker/traversal.worker.js +4 -23
- package/dist/worker/traversal.worker.js.map +1 -1
- package/package.json +11 -2
package/dist/query/provider.d.ts
CHANGED
|
@@ -1,65 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* 1. **Most of the engine's tests need no database.** A traversal written
|
|
8
|
-
* against SQLite is a traversal that can only be tested with a file, a
|
|
9
|
-
* schema, a writer and eventually a worker thread. Written against this, the
|
|
10
|
-
* same code runs over an in-memory graph built in four lines.
|
|
11
|
-
*
|
|
12
|
-
* 2. **Traversal stays identical across backends.** §11.8 chose application-code
|
|
13
|
-
* traversal over recursive CTEs precisely so that decay scoring, budgets and
|
|
14
|
-
* per-edge weights work the same on SQLite and Postgres. That only holds if
|
|
15
|
-
* the traversal never sees which one it is talking to.
|
|
16
|
-
*
|
|
17
|
-
* `incoming()` takes a limit and a ranking rather than returning everything.
|
|
18
|
-
* That is not politeness: the prior-art graphs measured for this build have a
|
|
19
|
-
* max in-degree of **1,036** (`append`), and materialising every neighbour of a
|
|
20
|
-
* hub turns a 200-node budget into a 10,000-row read.
|
|
21
|
-
*/
|
|
1
|
+
/** `AdjacencyProvider` — the interface every traversal is written against.
|
|
2
|
+
* Tests run with no database (in-memory graph); traversal stays identical
|
|
3
|
+
* across SQLite/Postgres (§11.8's app-code traversal, not recursive CTEs).
|
|
4
|
+
* `incoming()` takes a limit+ranking, not everything: measured max
|
|
5
|
+
* in-degree is 1,036 (`append`) — full neighbour reads blow the budget. */
|
|
22
6
|
import type { EdgeType, IREdge, IRNode, NodeType, ResolutionLevel, UnresolvedRef } from "@descryy/ir";
|
|
23
7
|
export interface AdjacencyOptions {
|
|
24
8
|
readonly types?: readonly EdgeType[];
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* A cap without a ranking keeps whichever rows the index reached first, which
|
|
28
|
-
* is both arbitrary and unstable between runs.
|
|
29
|
-
*/
|
|
9
|
+
/** Cap on returned edges, applied after ranking by resolution then
|
|
10
|
+
* confidence — an unranked cap would be arbitrary and unstable. */
|
|
30
11
|
readonly limit?: number;
|
|
31
12
|
/** Drop edges below this confidence before ranking. */
|
|
32
13
|
readonly minConfidence?: number;
|
|
33
14
|
}
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* Threaded through from the start on purpose. Retrofitting a stamp through six
|
|
38
|
-
* return shapes later is the kind of change that gets deferred once and then
|
|
39
|
-
* never made, and a query layer that cannot say *how old and how well resolved*
|
|
40
|
-
* its answer is cannot support the honesty rules that the product is.
|
|
41
|
-
*/
|
|
15
|
+
/** What every query response carries — §27.3's staleness rule, threaded
|
|
16
|
+
* through from the start (retrofitting it later never happens). Without
|
|
17
|
+
* it a query can't say how stale/resolved an answer is. */
|
|
42
18
|
export interface GraphStamp {
|
|
43
19
|
/** The commit the graph was built from. Null on an empty graph. */
|
|
44
20
|
readonly commitSha: string | null;
|
|
45
21
|
/** Epoch ms of the most recent write. Null on an empty graph. */
|
|
46
22
|
readonly graphBuiltAt: number | null;
|
|
47
23
|
readonly irSchemaVersion: number;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* is zero, on an empty graph); more than one is a real staleness signal — it
|
|
51
|
-
* means part of the graph describes code that is no longer what the other
|
|
52
|
-
* part describes. Surfaced as a disclosure note rather than averaged away.
|
|
53
|
-
*/
|
|
24
|
+
/** Distinct commits the stored graph spans. >1 is a real staleness signal
|
|
25
|
+
* — part of the graph describes code the rest no longer matches. */
|
|
54
26
|
readonly commitSpread: number;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* Per architecture principle 3 the reliability class of a finding is capped by
|
|
59
|
-
* the resolution of the edges beneath it, so this is the cap, computed per
|
|
60
|
-
* result rather than declared globally. A result touching one R0 edge is an R0
|
|
61
|
-
* result no matter how well resolved the rest of it is.
|
|
62
|
-
*/
|
|
27
|
+
/** Lowest resolution anything in this answer rests on — rule 3's cap,
|
|
28
|
+
* computed per result. One R0 edge makes the whole result R0. */
|
|
63
29
|
readonly resolutionFloor: ResolutionLevel;
|
|
64
30
|
}
|
|
65
31
|
/** Everything a query returns, so no caller can accidentally drop the disclosure. */
|
|
@@ -68,10 +34,8 @@ export interface QueryResult<T> {
|
|
|
68
34
|
readonly stamp: GraphStamp;
|
|
69
35
|
/** True when a budget or limit stopped the answer short of complete. */
|
|
70
36
|
readonly truncated: boolean;
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
* "not analysable" categories start here. Never empty for a degraded answer.
|
|
74
|
-
*/
|
|
37
|
+
/** Plain-language things the caller must be told — §20.2's "not tested"/
|
|
38
|
+
* "not analysable" categories start here. Never empty for a degraded answer. */
|
|
75
39
|
readonly notes: readonly string[];
|
|
76
40
|
}
|
|
77
41
|
/** What `nodesOfType` returned, and whether that was all of them. */
|
|
@@ -89,45 +53,28 @@ export interface AdjacencyProvider {
|
|
|
89
53
|
node(id: string): IRNode | undefined;
|
|
90
54
|
outgoing(id: string, options?: AdjacencyOptions): readonly IREdge[];
|
|
91
55
|
incoming(id: string, options?: AdjacencyOptions): readonly IREdge[];
|
|
92
|
-
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* The one query that is not adjacency, and it is here because a whole class of
|
|
96
|
-
* question cannot start from a seed. *"Which endpoints does the frontend call
|
|
97
|
-
* that no route serves?"* has no node to begin at — the answer is a property
|
|
98
|
-
* of the **set**, and the contract engine, the static-validation checks and
|
|
99
|
-
* the capability-tier generator all need it.
|
|
100
|
-
*
|
|
101
|
-
* Capped, and the cap is reported rather than applied quietly. `API_ENDPOINT`
|
|
102
|
-
* runs to the hundreds and is safe to enumerate; `FUNCTION` on a large
|
|
103
|
-
* monorepo runs to tens of thousands, and a caller that asked for all of them
|
|
104
|
-
* and silently received the first thousand would compute a set property over a
|
|
105
|
-
* sample and report it as a fact.
|
|
106
|
-
*/
|
|
56
|
+
/** Every node of one type, capped — the one non-adjacency query, for
|
|
57
|
+
* set-level questions with no seed node. Cap is reported, not silent:
|
|
58
|
+
* a truncated set reported as complete would be a false fact. */
|
|
107
59
|
nodesOfType(type: NodeType, limit?: number): NodeSet;
|
|
108
|
-
/**
|
|
109
|
-
*
|
|
110
|
-
* (default `true`) restricts to rows carrying `attrs` at all, which is every
|
|
111
|
-
* row that could ever become a question; see `store/reader.ts#unresolvedRefs`
|
|
112
|
-
* for why that is a real filter and not an approximation.
|
|
113
|
-
*/
|
|
60
|
+
/** Refusal-ledger rows — DEC-243's question grouper reads these.
|
|
61
|
+
* `classified` (default true) keeps only rows carrying `attrs`. */
|
|
114
62
|
unresolvedRefs(options?: {
|
|
115
63
|
readonly classified?: boolean;
|
|
116
64
|
readonly limit?: number;
|
|
117
65
|
}): UnresolvedRefSet;
|
|
118
66
|
/** Graph-level provenance. The per-result `resolutionFloor` is computed by the query. */
|
|
119
67
|
baseStamp(): Omit<GraphStamp, "resolutionFloor">;
|
|
68
|
+
/** Producers (adapter/source ids) that ran on this graph — a run-level
|
|
69
|
+
* fact. Answers "did git-history run" independent of whether a given
|
|
70
|
+
* node's own attrs happen to carry that producer's output (UAT B2). */
|
|
71
|
+
sourcesRun(): readonly string[];
|
|
120
72
|
}
|
|
121
73
|
/** The cap `nodesOfType` applies when a caller names none. */
|
|
122
74
|
export declare const DEFAULT_NODE_SET_LIMIT = 5000;
|
|
123
|
-
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* Resolution outranks confidence because they are not the same axis — a
|
|
127
|
-
* type-checked edge at 0.8 is a better fact than a name-matched one at 0.95, and
|
|
128
|
-
* §11A.5 exists because v2.0 could not tell those apart. `from`/`to`/`type`
|
|
129
|
-
* break the final tie so the order is identical between runs.
|
|
130
|
-
*/
|
|
75
|
+
/** Ranks edges best-evidence-first, stably. Resolution outranks confidence
|
|
76
|
+
* — a type-checked 0.8 beats a name-matched 0.95 (§11A.5). `from`/`to`/`type`
|
|
77
|
+
* break ties for a stable order. */
|
|
131
78
|
export declare function rankEdges(edges: readonly IREdge[]): IREdge[];
|
|
132
79
|
/** Apply type filter, confidence floor, ranking and limit. Shared by both providers. */
|
|
133
80
|
export declare function applyAdjacencyOptions(edges: readonly IREdge[], options?: AdjacencyOptions): IREdge[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/query/provider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/query/provider.ts"],"names":[],"mappings":"AAAA;;;;4EAI4E;AAE5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACrC;wEACoE;IACpE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;4DAE4D;AAC5D,MAAM,WAAW,UAAU;IACzB,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iEAAiE;IACjE,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,e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KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,gBAAgB,CAAC;IACvG,yFAAyF;IACzF,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IACjD;;4EAEwE;IACxE,UAAU,IAAI,SAAS,MAAM,EAAE,CAAC;CACjC;AAED,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,OAAQ,CAAC;AAE5C;;qCAEqC;AACrC,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAM5D;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,GAAE,gBAAqB,GAC7B,MAAM,EAAE,CAYV"}
|
package/dist/query/provider.js
CHANGED
|
@@ -1,34 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* 1. **Most of the engine's tests need no database.** A traversal written
|
|
8
|
-
* against SQLite is a traversal that can only be tested with a file, a
|
|
9
|
-
* schema, a writer and eventually a worker thread. Written against this, the
|
|
10
|
-
* same code runs over an in-memory graph built in four lines.
|
|
11
|
-
*
|
|
12
|
-
* 2. **Traversal stays identical across backends.** §11.8 chose application-code
|
|
13
|
-
* traversal over recursive CTEs precisely so that decay scoring, budgets and
|
|
14
|
-
* per-edge weights work the same on SQLite and Postgres. That only holds if
|
|
15
|
-
* the traversal never sees which one it is talking to.
|
|
16
|
-
*
|
|
17
|
-
* `incoming()` takes a limit and a ranking rather than returning everything.
|
|
18
|
-
* That is not politeness: the prior-art graphs measured for this build have a
|
|
19
|
-
* max in-degree of **1,036** (`append`), and materialising every neighbour of a
|
|
20
|
-
* hub turns a 200-node budget into a 10,000-row read.
|
|
21
|
-
*/
|
|
1
|
+
/** `AdjacencyProvider` — the interface every traversal is written against.
|
|
2
|
+
* Tests run with no database (in-memory graph); traversal stays identical
|
|
3
|
+
* across SQLite/Postgres (§11.8's app-code traversal, not recursive CTEs).
|
|
4
|
+
* `incoming()` takes a limit+ranking, not everything: measured max
|
|
5
|
+
* in-degree is 1,036 (`append`) — full neighbour reads blow the budget. */
|
|
22
6
|
/** The cap `nodesOfType` applies when a caller names none. */
|
|
23
7
|
export const DEFAULT_NODE_SET_LIMIT = 5_000;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* Resolution outranks confidence because they are not the same axis — a
|
|
28
|
-
* type-checked edge at 0.8 is a better fact than a name-matched one at 0.95, and
|
|
29
|
-
* §11A.5 exists because v2.0 could not tell those apart. `from`/`to`/`type`
|
|
30
|
-
* break the final tie so the order is identical between runs.
|
|
31
|
-
*/
|
|
8
|
+
/** Ranks edges best-evidence-first, stably. Resolution outranks confidence
|
|
9
|
+
* — a type-checked 0.8 beats a name-matched 0.95 (§11A.5). `from`/`to`/`type`
|
|
10
|
+
* break ties for a stable order. */
|
|
32
11
|
export function rankEdges(edges) {
|
|
33
12
|
return [...edges].sort((a, b) => {
|
|
34
13
|
if (a.resolution !== b.resolution)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/query/provider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/query/provider.ts"],"names":[],"mappings":"AAAA;;;;4EAI4E;AAyE5E,8DAA8D;AAC9D,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAE5C;;qCAEqC;AACrC,MAAM,UAAU,SAAS,CAAC,KAAwB;IAChD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC9B,IAAI,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;YAAE,OAAO,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC;QAC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.ts
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* the stored co-change graph, never a live `git log`/`git diff` call — a new
|
|
7
|
-
* query over an existing edge type, not a new capability.
|
|
8
|
-
*
|
|
9
|
-
* Every one returns a `QueryResult`, so no caller can take the answer without
|
|
10
|
-
* the disclosure attached to it. That is the point of the envelope: §27.3's
|
|
11
|
-
* staleness rule and principle 3's resolution cap are not reporting concerns
|
|
12
|
-
* bolted on later, they are properties of the answer itself.
|
|
13
|
-
*
|
|
14
|
-
* One of the seven is **deliberately incomplete in this build** and says so —
|
|
15
|
-
* see `rootCauseSearch`. Reporting a partial answer as a whole one is the
|
|
16
|
-
* exact failure the honest-degradation rule exists to prevent.
|
|
17
|
-
*/
|
|
1
|
+
/** §11.9's six query types plus `changesWith` (a 7th, added for the
|
|
2
|
+
* `CHANGES_WITH` gap — scoped to the stored co-change graph, never a live
|
|
3
|
+
* git call). Every query returns a `QueryResult`: §27.3 staleness and
|
|
4
|
+
* rule 3's resolution cap are properties of the answer, not bolted on.
|
|
5
|
+
* `rootCauseSearch` is deliberately incomplete here and discloses it. */
|
|
18
6
|
import type { EdgeType, IRNode } from "@descryy/ir";
|
|
19
7
|
import type { AdjacencyProvider, QueryResult } from "./provider.ts";
|
|
20
8
|
import { type TraversalOptions } from "./traverse.ts";
|
|
@@ -35,33 +23,16 @@ export interface RootCauseMatch {
|
|
|
35
23
|
readonly incident: IRNode;
|
|
36
24
|
readonly via: EdgeType;
|
|
37
25
|
}
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* **Incomplete by design in this build, and the caller is told so.** §11.9's
|
|
42
|
-
* root-cause query is "incident **plus embedding match**", and this build has no
|
|
43
|
-
* vector store — `embeddings` is a pointer table, since §8.2 keeps vectors in
|
|
44
|
-
* pgvector or a local extension and a column of serialised floats with no index
|
|
45
|
-
* is a scan rather than a search.
|
|
46
|
-
*
|
|
47
|
-
* So this answers the structural half and discloses the other. Returning it
|
|
48
|
-
* silently as "root cause search" would report "we found no similar incident"
|
|
49
|
-
* when the truth is "we did not look the way we said we would" — §20.2 keeps
|
|
50
|
-
* those in different categories for a reason.
|
|
51
|
-
*/
|
|
26
|
+
/** Incidents correlated with a node, by graph edges only — deliberately
|
|
27
|
+
* incomplete: §11.9 wants incident + embedding match, but this build has
|
|
28
|
+
* no vector store (§8.2). Discloses the gap, not "no similar incident" (§20.2). */
|
|
52
29
|
export declare function rootCauseSearch(provider: AdjacencyProvider, nodeId: string): QueryResult<RootCauseMatch[]>;
|
|
53
30
|
export declare function testsCovering(provider: AdjacencyProvider, nodeId: string, options?: {
|
|
54
31
|
maxDepth?: number;
|
|
55
32
|
budget?: number;
|
|
56
33
|
}): QueryResult<IRNode[]>;
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* Exported because a caller that discloses *what it walked* must name the same
|
|
61
|
-
* list this walk uses. A second copy in the MCP tool would drift, and the note
|
|
62
|
-
* would then describe a walk that did not run — the report-the-run rule applied
|
|
63
|
-
* to a constant instead of to a header.
|
|
64
|
-
*/
|
|
34
|
+
/** Edge types that carry data, not control. Exported so a caller
|
|
35
|
+
* disclosing "what it walked" names this same list — a second copy would drift. */
|
|
65
36
|
export declare const DATA_FLOW_EDGE_TYPES: readonly ["PROPAGATES_TO", "READS", "WRITES", "RETURNS"];
|
|
66
37
|
export declare function dataFlowFrom(provider: AdjacencyProvider, nodeId: string, options?: TraversalOptions): QueryResult<{
|
|
67
38
|
node: IRNode;
|
|
@@ -81,12 +52,8 @@ export interface ChangeRisk {
|
|
|
81
52
|
readonly tests: IRNode[];
|
|
82
53
|
readonly untested: IRNode[];
|
|
83
54
|
}
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* The ranking weights are Step 12's; this composes the primitives so that step
|
|
88
|
-
* supplies a weight function rather than a second traversal.
|
|
89
|
-
*/
|
|
55
|
+
/** Scoped subgraph, ranked, intersected with `TESTS` edges — composes the
|
|
56
|
+
* primitives so Step 12 supplies a weight function, not a second traversal. */
|
|
90
57
|
export declare function changeRisk(provider: AdjacencyProvider, changed: readonly string[], options?: ImpactOptions): QueryResult<ChangeRisk>;
|
|
91
58
|
export interface CoChange {
|
|
92
59
|
readonly node: IRNode;
|
|
@@ -95,25 +62,8 @@ export interface CoChange {
|
|
|
95
62
|
/** `support` divided by the more-frequently-changed file's own total — DEC-036/§11.7. */
|
|
96
63
|
readonly confidence: number;
|
|
97
64
|
}
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* `CHANGES_WITH` is symmetric but stored once, `from` the lexicographically
|
|
102
|
-
* smaller path (DEC-036) — reading only `provider.outgoing` would silently
|
|
103
|
-
* miss every pair where this file sorts second. Both `outgoing` and
|
|
104
|
-
* `incoming` are read here so the caller never has to know which side of the
|
|
105
|
-
* pair this file landed on; `traverse.ts`'s `neighbours()` does the identical
|
|
106
|
-
* thing for `direction: "both"`, but a one-hop, unscored list is what this
|
|
107
|
-
* question actually asks — walking it through `bfs` would return `Reached`
|
|
108
|
-
* entries with no `support`/`confidence` to report, since those live in
|
|
109
|
-
* `attrs`, not in the traversal primitives' own `Reached` shape.
|
|
110
|
-
*
|
|
111
|
-
* Answers only what the stored graph holds: co-change is windowed by however
|
|
112
|
-
* far back the git source read (`GitSourceOptions`, not this function's
|
|
113
|
-
* concern), and a pair below `minSupport`/`minConfidence` at ingest time
|
|
114
|
-
* never became an edge at all — silence here does not mean the files never
|
|
115
|
-
* changed together, only that they did not clear the threshold recorded when
|
|
116
|
-
* the graph was built.
|
|
117
|
-
*/
|
|
65
|
+
/** `CHANGES_WITH` edges touching one `FILE`, either direction — stored once
|
|
66
|
+
* from the lexicographically smaller path (DEC-036), so both directions
|
|
67
|
+
* must be read. Windowed/thresholded at ingest — silence ≠ "never co-changed." */
|
|
118
68
|
export declare function changesWith(provider: AdjacencyProvider, nodeId: string): QueryResult<CoChange[]>;
|
|
119
69
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/query/queries.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/query/queries.ts"],"names":[],"mappings":"AAAA;;;;0EAI0E;AAE1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAIrE,OAAO,KAAK,EAAE,iBAAiB,EAAc,WAAW,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAA4C,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAwChG,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,KAAK,MAAM,CAAC;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,GAAE,aAAkB,GAC1B,WAAW,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAiB/D;AAID,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;CACxB;AAED;;oFAEoF;AACpF,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,MAAM,GACb,WAAW,CAAC,cAAc,EAAE,CA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AAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yFAAyF;IACzF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;mFAEmF;AACnF,wBAAgB,WAAW,CAAC,QAAQ,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC,CA6DhG"}
|
package/dist/query/queries.js
CHANGED
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
* query over an existing edge type, not a new capability.
|
|
8
|
-
*
|
|
9
|
-
* Every one returns a `QueryResult`, so no caller can take the answer without
|
|
10
|
-
* the disclosure attached to it. That is the point of the envelope: §27.3's
|
|
11
|
-
* staleness rule and principle 3's resolution cap are not reporting concerns
|
|
12
|
-
* bolted on later, they are properties of the answer itself.
|
|
13
|
-
*
|
|
14
|
-
* One of the seven is **deliberately incomplete in this build** and says so —
|
|
15
|
-
* see `rootCauseSearch`. Reporting a partial answer as a whole one is the
|
|
16
|
-
* exact failure the honest-degradation rule exists to prevent.
|
|
17
|
-
*/
|
|
1
|
+
/** §11.9's six query types plus `changesWith` (a 7th, added for the
|
|
2
|
+
* `CHANGES_WITH` gap — scoped to the stored co-change graph, never a live
|
|
3
|
+
* git call). Every query returns a `QueryResult`: §27.3 staleness and
|
|
4
|
+
* rule 3's resolution cap are properties of the answer, not bolted on.
|
|
5
|
+
* `rootCauseSearch` is deliberately incomplete here and discloses it. */
|
|
6
|
+
import { GIT_SOURCE_ID } from "../sources/git/source.js";
|
|
18
7
|
import { createResolutionFloor } from "./resolution-floor.js";
|
|
19
8
|
import { bfs, findPath, weightedBfs } from "./traverse.js";
|
|
20
9
|
function stampFor(provider, resolutionFloor) {
|
|
@@ -43,10 +32,8 @@ export function impactOf(provider, seeds, options = {}) {
|
|
|
43
32
|
...options,
|
|
44
33
|
...(options.weightFor === undefined ? {} : { weightFor: options.weightFor }),
|
|
45
34
|
});
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
// function's dependencies are unaffected by it changing; its dependents are
|
|
49
|
-
// the blast radius.
|
|
35
|
+
// `in` by default is not a typo: "what breaks if this changes" walks to
|
|
36
|
+
// *callers*, not callees — dependents are the blast radius, not dependencies.
|
|
50
37
|
const notes = [];
|
|
51
38
|
if (outcome.resolutionFloor <= 1) {
|
|
52
39
|
notes.push(`This blast radius rests on edges resolved no better than R${outcome.resolutionFloor}. ` +
|
|
@@ -55,20 +42,9 @@ export function impactOf(provider, seeds, options = {}) {
|
|
|
55
42
|
}
|
|
56
43
|
return result(provider, hydrate(provider, outcome.reached), outcome.resolutionFloor, outcome.truncated, notes);
|
|
57
44
|
}
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* **Incomplete by design in this build, and the caller is told so.** §11.9's
|
|
62
|
-
* root-cause query is "incident **plus embedding match**", and this build has no
|
|
63
|
-
* vector store — `embeddings` is a pointer table, since §8.2 keeps vectors in
|
|
64
|
-
* pgvector or a local extension and a column of serialised floats with no index
|
|
65
|
-
* is a scan rather than a search.
|
|
66
|
-
*
|
|
67
|
-
* So this answers the structural half and discloses the other. Returning it
|
|
68
|
-
* silently as "root cause search" would report "we found no similar incident"
|
|
69
|
-
* when the truth is "we did not look the way we said we would" — §20.2 keeps
|
|
70
|
-
* those in different categories for a reason.
|
|
71
|
-
*/
|
|
45
|
+
/** Incidents correlated with a node, by graph edges only — deliberately
|
|
46
|
+
* incomplete: §11.9 wants incident + embedding match, but this build has
|
|
47
|
+
* no vector store (§8.2). Discloses the gap, not "no similar incident" (§20.2). */
|
|
72
48
|
export function rootCauseSearch(provider, nodeId) {
|
|
73
49
|
const types = ["INCIDENT_CORRELATED", "FIXED_BY"];
|
|
74
50
|
const matches = [];
|
|
@@ -91,13 +67,10 @@ export function rootCauseSearch(provider, nodeId) {
|
|
|
91
67
|
"not appear here. Absence is not evidence.",
|
|
92
68
|
]);
|
|
93
69
|
}
|
|
94
|
-
// ---------------------------------------------------------------------------
|
|
95
70
|
// 3. Test discovery — "what tests cover this?"
|
|
96
|
-
// ---------------------------------------------------------------------------
|
|
97
71
|
export function testsCovering(provider, nodeId, options = {}) {
|
|
98
|
-
// `TESTS` edges inward, transitively
|
|
99
|
-
// what
|
|
100
|
-
// helper as untested when a test does exercise it.
|
|
72
|
+
// `TESTS` edges inward, transitively — a test covering a handler also
|
|
73
|
+
// covers what it calls; depth 1 alone would misreport a helper as untested.
|
|
101
74
|
const outcome = bfs(provider, [nodeId], {
|
|
102
75
|
direction: "in",
|
|
103
76
|
types: ["TESTS", "CALLS"],
|
|
@@ -118,17 +91,9 @@ export function testsCovering(provider, nodeId, options = {}) {
|
|
|
118
91
|
}
|
|
119
92
|
return result(provider, tests, outcome.resolutionFloor, outcome.truncated, notes);
|
|
120
93
|
}
|
|
121
|
-
// ---------------------------------------------------------------------------
|
|
122
94
|
// 4. Data flow — "where does this field end up?"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
* The four edge types that carry data rather than control.
|
|
126
|
-
*
|
|
127
|
-
* Exported because a caller that discloses *what it walked* must name the same
|
|
128
|
-
* list this walk uses. A second copy in the MCP tool would drift, and the note
|
|
129
|
-
* would then describe a walk that did not run — the report-the-run rule applied
|
|
130
|
-
* to a constant instead of to a header.
|
|
131
|
-
*/
|
|
95
|
+
/** Edge types that carry data, not control. Exported so a caller
|
|
96
|
+
* disclosing "what it walked" names this same list — a second copy would drift. */
|
|
132
97
|
export const DATA_FLOW_EDGE_TYPES = ["PROPAGATES_TO", "READS", "WRITES", "RETURNS"];
|
|
133
98
|
export function dataFlowFrom(provider, nodeId, options = {}) {
|
|
134
99
|
const outcome = bfs(provider, [nodeId], {
|
|
@@ -145,22 +110,14 @@ export function dataFlowFrom(provider, nodeId, options = {}) {
|
|
|
145
110
|
}
|
|
146
111
|
return result(provider, hydrate(provider, outcome.reached), outcome.resolutionFloor, outcome.truncated, notes);
|
|
147
112
|
}
|
|
148
|
-
// ---------------------------------------------------------------------------
|
|
149
113
|
// 5. API tracing — "how does this work end to end?"
|
|
150
|
-
// ---------------------------------------------------------------------------
|
|
151
114
|
export function traceApi(provider, fromNodeId, toNodeId, options = {}) {
|
|
152
115
|
const edges = findPath(provider, fromNodeId, toNodeId, { direction: "both", ...options });
|
|
153
116
|
const ids = edges.length === 0 ? [] : [fromNodeId];
|
|
154
117
|
for (const e of edges) {
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
// `.to`, which is only correct when every hop happens to go forward.
|
|
159
|
-
// `direction: "both"` exists precisely so a hop can go either way (e.g.
|
|
160
|
-
// an incoming SERVES_API followed by an outgoing CALLS), and the old
|
|
161
|
-
// `edges[i - 1]!.to` comparison silently re-picked the node just left
|
|
162
|
-
// whenever the previous hop was traversed backward, duplicating it in
|
|
163
|
-
// the path instead of advancing.
|
|
118
|
+
// Far end tracked from `ids` itself, not `edge.to` — `direction: "both"`
|
|
119
|
+
// means a hop can go either way, and `.to` alone silently re-picked the
|
|
120
|
+
// node just left (duplicating it) whenever a hop went backward. Bug fix.
|
|
164
121
|
const current = ids[ids.length - 1];
|
|
165
122
|
ids.push(e.from === current ? e.to : e.from);
|
|
166
123
|
}
|
|
@@ -170,9 +127,8 @@ export function traceApi(provider, fromNodeId, toNodeId, options = {}) {
|
|
|
170
127
|
if (node !== undefined)
|
|
171
128
|
path.push(node);
|
|
172
129
|
}
|
|
173
|
-
// R0 when no path
|
|
174
|
-
// traversed
|
|
175
|
-
// reliability cap is actually derived from.
|
|
130
|
+
// R0 when no path found — stamping R4 here would contradict the "nothing
|
|
131
|
+
// traversed" note in the field the reliability cap is derived from.
|
|
176
132
|
const floor = createResolutionFloor();
|
|
177
133
|
for (const edge of edges)
|
|
178
134
|
floor.observe(edge.resolution);
|
|
@@ -182,12 +138,8 @@ export function traceApi(provider, fromNodeId, toNodeId, options = {}) {
|
|
|
182
138
|
: [];
|
|
183
139
|
return result(provider, { path, hops: edges.length }, floor.value(), false, notes);
|
|
184
140
|
}
|
|
185
|
-
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* The ranking weights are Step 12's; this composes the primitives so that step
|
|
189
|
-
* supplies a weight function rather than a second traversal.
|
|
190
|
-
*/
|
|
141
|
+
/** Scoped subgraph, ranked, intersected with `TESTS` edges — composes the
|
|
142
|
+
* primitives so Step 12 supplies a weight function, not a second traversal. */
|
|
191
143
|
export function changeRisk(provider, changed, options = {}) {
|
|
192
144
|
const impact = impactOf(provider, changed, options);
|
|
193
145
|
const tests = new Map();
|
|
@@ -220,26 +172,9 @@ export function changeRisk(provider, changed, options = {}) {
|
|
|
220
172
|
notes,
|
|
221
173
|
};
|
|
222
174
|
}
|
|
223
|
-
/**
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
* `CHANGES_WITH` is symmetric but stored once, `from` the lexicographically
|
|
227
|
-
* smaller path (DEC-036) — reading only `provider.outgoing` would silently
|
|
228
|
-
* miss every pair where this file sorts second. Both `outgoing` and
|
|
229
|
-
* `incoming` are read here so the caller never has to know which side of the
|
|
230
|
-
* pair this file landed on; `traverse.ts`'s `neighbours()` does the identical
|
|
231
|
-
* thing for `direction: "both"`, but a one-hop, unscored list is what this
|
|
232
|
-
* question actually asks — walking it through `bfs` would return `Reached`
|
|
233
|
-
* entries with no `support`/`confidence` to report, since those live in
|
|
234
|
-
* `attrs`, not in the traversal primitives' own `Reached` shape.
|
|
235
|
-
*
|
|
236
|
-
* Answers only what the stored graph holds: co-change is windowed by however
|
|
237
|
-
* far back the git source read (`GitSourceOptions`, not this function's
|
|
238
|
-
* concern), and a pair below `minSupport`/`minConfidence` at ingest time
|
|
239
|
-
* never became an edge at all — silence here does not mean the files never
|
|
240
|
-
* changed together, only that they did not clear the threshold recorded when
|
|
241
|
-
* the graph was built.
|
|
242
|
-
*/
|
|
175
|
+
/** `CHANGES_WITH` edges touching one `FILE`, either direction — stored once
|
|
176
|
+
* from the lexicographically smaller path (DEC-036), so both directions
|
|
177
|
+
* must be read. Windowed/thresholded at ingest — silence ≠ "never co-changed." */
|
|
243
178
|
export function changesWith(provider, nodeId) {
|
|
244
179
|
const edges = [
|
|
245
180
|
...provider.outgoing(nodeId, { types: ["CHANGES_WITH"] }),
|
|
@@ -261,13 +196,9 @@ export function changesWith(provider, nodeId) {
|
|
|
261
196
|
const data = [...byOther.values()].sort((a, b) => b.support - a.support || a.node.id.localeCompare(b.node.id));
|
|
262
197
|
const notes = [];
|
|
263
198
|
if (data.length === 0) {
|
|
264
|
-
//
|
|
265
|
-
//
|
|
266
|
-
//
|
|
267
|
-
// `changeCount` is written by the git-history source and by nothing else,
|
|
268
|
-
// so its presence *is* the evidence that history ran for this file. UAT
|
|
269
|
-
// Phase 3 item 6: a 21-commit file came back empty here and the caller was
|
|
270
|
-
// told the reason was unknowable, when half of it was already on the node.
|
|
199
|
+
// The `FILE` node's own `changeCount` is written only by the git-history
|
|
200
|
+
// source, so its presence is evidence history ran for this file (UAT
|
|
201
|
+
// Phase 3 item 6: previously reported "unknowable" when this was known).
|
|
271
202
|
const changeCount = provider.node(nodeId)?.attrs?.["changeCount"];
|
|
272
203
|
if (typeof changeCount === "number" && changeCount > 0) {
|
|
273
204
|
notes.push(`No CHANGES_WITH edge touches this node, and git history did run for it: the graph records ` +
|
|
@@ -279,11 +210,23 @@ export function changesWith(provider, nodeId) {
|
|
|
279
210
|
"partner to couple to it at all — which is deliberate (it stops a busy config file " +
|
|
280
211
|
"coupling to everything) and does mean the busiest files report the fewest partners.");
|
|
281
212
|
}
|
|
213
|
+
else if (provider.sourcesRun().includes(GIT_SOURCE_ID)) {
|
|
214
|
+
// UAT B2: `changeCount` can go silent for reasons unrelated to whether
|
|
215
|
+
// history ran (a merge tie-break winner, e.g. `confirmed-incidents`,
|
|
216
|
+
// may not carry it) — so "did git-history run" is asked directly.
|
|
217
|
+
notes.push("No CHANGES_WITH edge touches this node, and this file's own FILE node carries no recorded " +
|
|
218
|
+
"change count — but git history did run in this build (it is among this graph's sources), " +
|
|
219
|
+
"so that is not evidence it was skipped. Either this file genuinely had zero commits in the " +
|
|
220
|
+
"window read, or a different source's node for the same file (a developer-confirmed " +
|
|
221
|
+
"incident, most often) currently holds this id and the count was not carried onto it. " +
|
|
222
|
+
"Either way, no CHANGES_WITH edge for it cleared the support/confidence thresholds.");
|
|
223
|
+
}
|
|
282
224
|
else {
|
|
283
225
|
notes.push("No CHANGES_WITH edge touches this node, and the node carries no recorded change count " +
|
|
284
|
-
"either.
|
|
285
|
-
"support/confidence thresholds, or that git history
|
|
286
|
-
"built — with no change count on the node
|
|
226
|
+
"either. Git history was not among this graph's sources, so that may mean the file has no " +
|
|
227
|
+
"co-change history above the recorded support/confidence thresholds, or that git history " +
|
|
228
|
+
"was skipped when the graph was built — with no change count on the node and no git-history " +
|
|
229
|
+
"source in this build, this query cannot tell the two apart.");
|
|
287
230
|
}
|
|
288
231
|
}
|
|
289
232
|
return result(provider, data, floor.value(), false, notes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/query/queries.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/query/queries.ts"],"names":[],"mappings":"AAAA;;;;0EAI0E;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAuC,MAAM,eAAe,CAAC;AAEhG,SAAS,QAAQ,CACf,QAA2B,EAC3B,eAAgC;IAEhC,OAAO,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,EAAE,eAAe,EAAE,CAAC;AACtD,CAAC;AAED,SAAS,MAAM,CACb,QAA2B,EAC3B,IAAO,EAC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