@descryy/core 0.4.0 → 0.5.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/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 +23 -11
- package/dist/contracts/engine.d.ts.map +1 -1
- package/dist/contracts/engine.js +23 -11
- package/dist/contracts/engine.js.map +1 -1
- package/dist/contracts/orphans.d.ts +18 -122
- package/dist/contracts/orphans.d.ts.map +1 -1
- package/dist/contracts/orphans.js +36 -134
- 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 +9 -90
- package/dist/graph/build.d.ts.map +1 -1
- package/dist/graph/build.js +15 -62
- 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/merge.d.ts +8 -88
- package/dist/graph/merge.d.ts.map +1 -1
- package/dist/graph/merge.js +9 -93
- 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 +4 -16
- package/dist/query/memory.d.ts.map +1 -1
- package/dist/query/memory.js +9 -22
- 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 +27 -93
- 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 +30 -104
- 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 +9 -19
- 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 +25 -126
- 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 +93 -63
- package/dist/sources/git/diff.d.ts.map +1 -1
- package/dist/sources/git/diff.js +200 -81
- 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 +33 -133
- 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 +6 -55
- package/dist/validation/attributes.d.ts.map +1 -1
- package/dist/validation/attributes.js +6 -55
- package/dist/validation/attributes.js.map +1 -1
- 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 +47 -8
- package/dist/validation/env.d.ts.map +1 -1
- package/dist/validation/env.js +119 -31
- package/dist/validation/env.js.map +1 -1
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +1 -0
- 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 +11 -72
- package/dist/validation/migration-integrity.d.ts.map +1 -1
- package/dist/validation/migration-integrity.js +16 -79
- package/dist/validation/migration-integrity.js.map +1 -1
- package/dist/validation/migrations.d.ts +22 -101
- package/dist/validation/migrations.d.ts.map +1 -1
- package/dist/validation/migrations.js +19 -83
- 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/orm-registration.d.ts +106 -0
- package/dist/validation/orm-registration.d.ts.map +1 -0
- package/dist/validation/orm-registration.js +191 -0
- package/dist/validation/orm-registration.js.map +1 -0
- package/dist/validation/rollback.d.ts +10 -73
- package/dist/validation/rollback.d.ts.map +1 -1
- package/dist/validation/rollback.js +15 -82
- 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/traverse.d.ts
CHANGED
|
@@ -1,77 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* All written against `AdjacencyProvider`, never against the store. §11.8 chose
|
|
5
|
-
* application-code traversal over recursive SQL so that decay scoring, budgets
|
|
6
|
-
* and per-edge weights behave identically on SQLite and Postgres; that only
|
|
7
|
-
* holds while the traversal cannot tell which it is talking to.
|
|
8
|
-
*
|
|
9
|
-
* ## The termination trap, guarded here rather than at Step 12
|
|
10
|
-
*
|
|
11
|
-
* §12.4 scores a hop as
|
|
12
|
-
*
|
|
13
|
-
* new = parent × edgeWeight × coupling × incident × confidence
|
|
14
|
-
*
|
|
15
|
-
* and the coupling and incident factors *boost* — they can exceed 1.0. Three
|
|
16
|
-
* things break the moment the product can reach 1.0:
|
|
17
|
-
*
|
|
18
|
-
* - score stops decreasing monotonically, so best-first is no longer optimal;
|
|
19
|
-
* - a node can be reached later by a better path than the one that first found
|
|
20
|
-
* it, so a plain visited-set silently keeps the worse score;
|
|
21
|
-
* - on a cycle where the product is ≥ 1, traversal **does not terminate**.
|
|
22
|
-
*
|
|
23
|
-
* Two fixes, both here: `weightedBfs` keeps a best-score map and re-pushes on
|
|
24
|
-
* improvement (relaxation), and any hop whose combined factor reaches 1.0 is
|
|
25
|
-
* rejected with an error naming the edge. Step 12 supplies the weights; this is
|
|
26
|
-
* the layer that refuses to run with weights that cannot terminate.
|
|
27
|
-
*
|
|
28
|
-
* ## Confidence is not the traversal weight
|
|
29
|
-
*
|
|
30
|
-
* This module's default `weightFor` used to be `edge.confidence` and nothing
|
|
31
|
-
* else, which made two shipped modules contradict each other. `runtime-
|
|
32
|
-
* confirmation.ts` writes `confidence = 1.0` on every edge it promotes or mints
|
|
33
|
-
* at R4 — correctly, because rule 3 makes R4 unconditionally class A and a
|
|
34
|
-
* witnessed edge is not 99% believed. The old default then handed that same 1.0
|
|
35
|
-
* to the guard above as a *weight*, so the strongest edge in the graph was the
|
|
36
|
-
* one edge `impact` refused to walk. Any graph that had ever had a runtime
|
|
37
|
-
* observation applied threw.
|
|
38
|
-
*
|
|
39
|
-
* The two quantities were never the same thing, and `weights.ts` has said so
|
|
40
|
-
* all along: `validateScopingConfig` asserts
|
|
41
|
-
* `0 < edgeWeight x maxFanOutMultiplier x maxConfidence < 1` and notes in its
|
|
42
|
-
* own comment that *"maxConfidence is 1.0 by definition"*. Termination is the
|
|
43
|
-
* **edge weight's** job; confidence is evidence strength and is entitled to
|
|
44
|
-
* reach 1.0. The old default was the degenerate weight table with every edge
|
|
45
|
-
* type at 1.0 — precisely the configuration `validateScopingConfig` refuses to
|
|
46
|
-
* load. The in-process path was running a config the config loader would
|
|
47
|
-
* reject, while the worker path passed a real table and did not.
|
|
48
|
-
*
|
|
49
|
-
* So the default is now {@link defaultTraversalWeight}: the per-edge-type decay
|
|
50
|
-
* of `DEFAULT_EDGE_WEIGHTS` times the edge's confidence — the same product
|
|
51
|
-
* `weightFromTable` builds for the worker. Termination survives on three
|
|
52
|
-
* independent legs, none of which is a stored confidence value:
|
|
53
|
-
*
|
|
54
|
-
* 1. every weight in `DEFAULT_EDGE_WEIGHTS` is <= 0.95, and confidence is
|
|
55
|
-
* capped at 1.0 by the IR, so the per-hop factor is <= 0.95 < 1 by
|
|
56
|
-
* construction rather than by data;
|
|
57
|
-
* 2. `validateScopingConfig` refuses, at config load, any table that would
|
|
58
|
-
* break leg 1;
|
|
59
|
-
* 3. the per-hop `RangeError` below is unchanged and still refuses any weight
|
|
60
|
-
* outside (0, 1), which is what holds a caller-supplied `weightFor` to the
|
|
61
|
-
* same rule.
|
|
62
|
-
*
|
|
63
|
-
* Ruled in `DEC-386`.
|
|
64
|
-
*/
|
|
1
|
+
/** blueprint 1.1's bfs/weightedBfs/findPath, over AdjacencyProvider only (§11.8: no SQL). §12.4's
|
|
2
|
+
* boost factors can push a hop to >=1.0, breaking termination — weightedBfs relaxes and rejects
|
|
3
|
+
* hops reaching 1.0. Weight = type decay × confidence, never confidence alone (DEC-386). */
|
|
65
4
|
import type { EdgeType, IREdge, ResolutionLevel } from "@descryy/ir";
|
|
66
5
|
import type { AdjacencyProvider } from "./provider.ts";
|
|
67
6
|
export type Direction = "out" | "in" | "both";
|
|
68
|
-
/**
|
|
69
|
-
* `
|
|
70
|
-
* `API_ENDPOINT` node — a caller reaches it from one side, a route serves it
|
|
71
|
-
* from the other, and either side can exist without the other (golden
|
|
72
|
-
* pattern 08's own note). Named once so `crossApiEndpoint` and its tests read
|
|
73
|
-
* the same list rather than two copies drifting.
|
|
74
|
-
*/
|
|
7
|
+
/** USES_API/SERVES_API — the two halves DEC-115 joins at one API_ENDPOINT; either side can exist
|
|
8
|
+
* without the other. Named once so `crossApiEndpoint` and its tests share one list. */
|
|
75
9
|
export declare const API_JOIN_EDGE_TYPES: readonly EdgeType[];
|
|
76
10
|
export interface TraversalOptions {
|
|
77
11
|
readonly types?: readonly EdgeType[];
|
|
@@ -82,17 +16,9 @@ export interface TraversalOptions {
|
|
|
82
16
|
readonly minConfidence?: number;
|
|
83
17
|
/** Fan-out cap per hop. Guards against hub nodes with in-degree in the thousands. */
|
|
84
18
|
readonly perNodeLimit?: number;
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* using — DEC-138's measured gap: a walk reaching the shared endpoint from
|
|
89
|
-
* one side (say, a frontend caller's `USES_API` edge, direction `out`)
|
|
90
|
-
* cannot see the route that serves it, because `SERVES_API` is stored
|
|
91
|
-
* route -> endpoint and a uniform `out` walk never looks incoming at that
|
|
92
|
-
* one node. Off by default because it is a real, deliberate exception to
|
|
93
|
-
* "the walk means one direction throughout" — every other node keeps that
|
|
94
|
-
* property; only the join node DEC-115 designed to be crossed does not.
|
|
95
|
-
*/
|
|
19
|
+
/** Opt-in, default off. At an API_ENDPOINT, also follows USES_API/SERVES_API in the direction not
|
|
20
|
+
* already walked — DEC-138: a caller-side USES_API walk can't see the SERVES_API route stored the
|
|
21
|
+
* other way. The one deliberate exception to "the walk means one direction throughout". */
|
|
96
22
|
readonly crossApiEndpoint?: boolean;
|
|
97
23
|
}
|
|
98
24
|
export interface Reached {
|
|
@@ -109,60 +35,30 @@ export interface TraversalOutcome {
|
|
|
109
35
|
/** Lowest resolution on any edge the answer traversed. Caps the reliability class. */
|
|
110
36
|
readonly resolutionFloor: ResolutionLevel;
|
|
111
37
|
}
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* Terminates on a cyclic graph by construction — a plain visited-set is correct
|
|
116
|
-
* here precisely because there is no score to improve on a second visit.
|
|
117
|
-
*/
|
|
38
|
+
/** Breadth-first reachability. Unweighted: every reached node scores 1.0. Terminates on a cyclic
|
|
39
|
+
* graph by construction — a plain visited-set is correct since there's no score to improve. */
|
|
118
40
|
export declare function bfs(provider: AdjacencyProvider, seeds: readonly string[], options?: TraversalOptions): TraversalOutcome;
|
|
119
|
-
/**
|
|
120
|
-
*
|
|
121
|
-
* the
|
|
122
|
-
*
|
|
123
|
-
* Both terms are §12.4's, and neither one alone is the weight. Confidence
|
|
124
|
-
* carries how much the producer believes the edge; the type weight carries how
|
|
125
|
-
* far a change actually travels along that kind of edge — an `IMPORTS` hop at
|
|
126
|
-
* 0.4 is a weak signal even when it is certain, and a witnessed `CALLS` hop at
|
|
127
|
-
* 0.95 x 1.0 is strong precisely because it was witnessed.
|
|
128
|
-
*
|
|
129
|
-
* Exported so a caller can compose with it rather than reconstruct it, and so
|
|
130
|
-
* the in-process and worker paths are demonstrably the same function — see the
|
|
131
|
-
* parity test in `worker.test.ts`. It is the callback form of
|
|
132
|
-
* `weightFromTable({ weights: DEFAULT_EDGE_WEIGHTS, fallback: ... })`.
|
|
133
|
-
*/
|
|
41
|
+
/** Default per-hop decay: §12.4's edge-type weight times the edge's confidence — both terms are
|
|
42
|
+
* §12.4's, neither alone is the weight (type weight = how far a change travels on that edge kind;
|
|
43
|
+
* confidence = how sure the producer is). Exported so in-process and worker paths are the same function. */
|
|
134
44
|
export declare function defaultTraversalWeight(edge: {
|
|
135
45
|
readonly type: EdgeType;
|
|
136
46
|
readonly confidence: number;
|
|
137
47
|
}): number;
|
|
138
48
|
export interface WeightedOptions extends TraversalOptions {
|
|
139
|
-
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* {@link defaultTraversalWeight}: the edge type's §12.4 weight times the
|
|
143
|
-
* edge's confidence. **Not confidence alone** — that conflated evidence
|
|
144
|
-
* strength with decay and made a witnessed R4 edge untraversable.
|
|
145
|
-
*/
|
|
49
|
+
/** Per-hop decay factor. Must be strictly < 1.0 (see file header). Defaults to
|
|
50
|
+
* {@link defaultTraversalWeight} — type weight × confidence, not confidence alone (that
|
|
51
|
+
* conflated evidence strength with decay and made a witnessed R4 edge untraversable). */
|
|
146
52
|
readonly weightFor?: (edge: IREdge) => number;
|
|
147
53
|
/** Stop expanding below this score. The main reason traversal ends before the budget. */
|
|
148
54
|
readonly minScore?: number;
|
|
149
55
|
}
|
|
150
|
-
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* "Relaxation" is not an optimisation here, it is what makes the result correct:
|
|
154
|
-
* with boosting factors in play a node can be reached later by a better path,
|
|
155
|
-
* and a visited-set that refuses to revisit would keep the worse score
|
|
156
|
-
* permanently. The best-score map plus re-push on improvement is the fix, and
|
|
157
|
-
* it costs nothing when scores do decrease monotonically.
|
|
158
|
-
*/
|
|
56
|
+
/** Best-first traversal with score decay and relaxation. "Relaxation" isn't an optimisation here,
|
|
57
|
+
* it's correctness: with boosting factors a node can be reached later by a better path, and a
|
|
58
|
+
* plain visited-set would keep the worse score permanently. Costs nothing when scores decay monotonically. */
|
|
159
59
|
export declare function weightedBfs(provider: AdjacencyProvider, seeds: readonly string[], options?: WeightedOptions): TraversalOutcome;
|
|
160
|
-
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* Hop count rather than score: "how is this connected" and "how much impact
|
|
164
|
-
* propagates" are different questions, and answering the first with the second's
|
|
165
|
-
* machinery gives a path that is heavier but shorter-looking.
|
|
166
|
-
*/
|
|
60
|
+
/** Shortest path by hop count, as edges. Empty when unreachable. Hop count, not score — "how is
|
|
61
|
+
* this connected" and "how much impact propagates" are different questions; answering the first
|
|
62
|
+
* with the second's machinery gives a heavier, shorter-looking path. */
|
|
167
63
|
export declare function findPath(provider: AdjacencyProvider, from: string, to: string, options?: TraversalOptions): readonly IREdge[];
|
|
168
64
|
//# sourceMappingURL=traverse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverse.d.ts","sourceRoot":"","sources":["../../src/query/traverse.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"traverse.d.ts","sourceRoot":"","sources":["../../src/query/traverse.ts"],"names":[],"mappings":"AAAA;;6FAE6F;AAE7F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAMrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,CAAC;AAE9C;wFACwF;AACxF,eAAO,MAAM,mBAAmB,EAAE,SAAS,QAAQ,EAA+B,CAAC;AAEnF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;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AK,MAAM,CAAC;IAC9C,yFAAyF;IACzF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;+GAE+G;AAC/G,wBAAgB,WAAW,CACzB,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,GAAE,eAAoB,GAC5B,gBAAgB,CAwDlB;AAED;;yEAEyE;AACzE,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,gBAAqB,GAC7B,SAAS,MAAM,EAAE,CA8BnB"}
|
package/dist/query/traverse.js
CHANGED
|
@@ -1,76 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* All written against `AdjacencyProvider`, never against the store. §11.8 chose
|
|
5
|
-
* application-code traversal over recursive SQL so that decay scoring, budgets
|
|
6
|
-
* and per-edge weights behave identically on SQLite and Postgres; that only
|
|
7
|
-
* holds while the traversal cannot tell which it is talking to.
|
|
8
|
-
*
|
|
9
|
-
* ## The termination trap, guarded here rather than at Step 12
|
|
10
|
-
*
|
|
11
|
-
* §12.4 scores a hop as
|
|
12
|
-
*
|
|
13
|
-
* new = parent × edgeWeight × coupling × incident × confidence
|
|
14
|
-
*
|
|
15
|
-
* and the coupling and incident factors *boost* — they can exceed 1.0. Three
|
|
16
|
-
* things break the moment the product can reach 1.0:
|
|
17
|
-
*
|
|
18
|
-
* - score stops decreasing monotonically, so best-first is no longer optimal;
|
|
19
|
-
* - a node can be reached later by a better path than the one that first found
|
|
20
|
-
* it, so a plain visited-set silently keeps the worse score;
|
|
21
|
-
* - on a cycle where the product is ≥ 1, traversal **does not terminate**.
|
|
22
|
-
*
|
|
23
|
-
* Two fixes, both here: `weightedBfs` keeps a best-score map and re-pushes on
|
|
24
|
-
* improvement (relaxation), and any hop whose combined factor reaches 1.0 is
|
|
25
|
-
* rejected with an error naming the edge. Step 12 supplies the weights; this is
|
|
26
|
-
* the layer that refuses to run with weights that cannot terminate.
|
|
27
|
-
*
|
|
28
|
-
* ## Confidence is not the traversal weight
|
|
29
|
-
*
|
|
30
|
-
* This module's default `weightFor` used to be `edge.confidence` and nothing
|
|
31
|
-
* else, which made two shipped modules contradict each other. `runtime-
|
|
32
|
-
* confirmation.ts` writes `confidence = 1.0` on every edge it promotes or mints
|
|
33
|
-
* at R4 — correctly, because rule 3 makes R4 unconditionally class A and a
|
|
34
|
-
* witnessed edge is not 99% believed. The old default then handed that same 1.0
|
|
35
|
-
* to the guard above as a *weight*, so the strongest edge in the graph was the
|
|
36
|
-
* one edge `impact` refused to walk. Any graph that had ever had a runtime
|
|
37
|
-
* observation applied threw.
|
|
38
|
-
*
|
|
39
|
-
* The two quantities were never the same thing, and `weights.ts` has said so
|
|
40
|
-
* all along: `validateScopingConfig` asserts
|
|
41
|
-
* `0 < edgeWeight x maxFanOutMultiplier x maxConfidence < 1` and notes in its
|
|
42
|
-
* own comment that *"maxConfidence is 1.0 by definition"*. Termination is the
|
|
43
|
-
* **edge weight's** job; confidence is evidence strength and is entitled to
|
|
44
|
-
* reach 1.0. The old default was the degenerate weight table with every edge
|
|
45
|
-
* type at 1.0 — precisely the configuration `validateScopingConfig` refuses to
|
|
46
|
-
* load. The in-process path was running a config the config loader would
|
|
47
|
-
* reject, while the worker path passed a real table and did not.
|
|
48
|
-
*
|
|
49
|
-
* So the default is now {@link defaultTraversalWeight}: the per-edge-type decay
|
|
50
|
-
* of `DEFAULT_EDGE_WEIGHTS` times the edge's confidence — the same product
|
|
51
|
-
* `weightFromTable` builds for the worker. Termination survives on three
|
|
52
|
-
* independent legs, none of which is a stored confidence value:
|
|
53
|
-
*
|
|
54
|
-
* 1. every weight in `DEFAULT_EDGE_WEIGHTS` is <= 0.95, and confidence is
|
|
55
|
-
* capped at 1.0 by the IR, so the per-hop factor is <= 0.95 < 1 by
|
|
56
|
-
* construction rather than by data;
|
|
57
|
-
* 2. `validateScopingConfig` refuses, at config load, any table that would
|
|
58
|
-
* break leg 1;
|
|
59
|
-
* 3. the per-hop `RangeError` below is unchanged and still refuses any weight
|
|
60
|
-
* outside (0, 1), which is what holds a caller-supplied `weightFor` to the
|
|
61
|
-
* same rule.
|
|
62
|
-
*
|
|
63
|
-
* Ruled in `DEC-386`.
|
|
64
|
-
*/
|
|
1
|
+
/** blueprint 1.1's bfs/weightedBfs/findPath, over AdjacencyProvider only (§11.8: no SQL). §12.4's
|
|
2
|
+
* boost factors can push a hop to >=1.0, breaking termination — weightedBfs relaxes and rejects
|
|
3
|
+
* hops reaching 1.0. Weight = type decay × confidence, never confidence alone (DEC-386). */
|
|
65
4
|
import { DEFAULT_EDGE_WEIGHTS } from "../scoping/weights.js";
|
|
66
5
|
import { createResolutionFloor } from "./resolution-floor.js";
|
|
67
|
-
/**
|
|
68
|
-
* `
|
|
69
|
-
* `API_ENDPOINT` node — a caller reaches it from one side, a route serves it
|
|
70
|
-
* from the other, and either side can exist without the other (golden
|
|
71
|
-
* pattern 08's own note). Named once so `crossApiEndpoint` and its tests read
|
|
72
|
-
* the same list rather than two copies drifting.
|
|
73
|
-
*/
|
|
6
|
+
/** USES_API/SERVES_API — the two halves DEC-115 joins at one API_ENDPOINT; either side can exist
|
|
7
|
+
* without the other. Named once so `crossApiEndpoint` and its tests share one list. */
|
|
74
8
|
export const API_JOIN_EDGE_TYPES = ["USES_API", "SERVES_API"];
|
|
75
9
|
function neighbours(provider, id, options) {
|
|
76
10
|
const adjacency = {
|
|
@@ -88,10 +22,8 @@ function neighbours(provider, id, options) {
|
|
|
88
22
|
for (const edge of provider.incoming(id, adjacency))
|
|
89
23
|
result.push({ edge, next: edge.from });
|
|
90
24
|
}
|
|
91
|
-
// DEC-138's join-node crossover
|
|
92
|
-
//
|
|
93
|
-
// did not already cover, so a caller already walking `both` (or already
|
|
94
|
-
// restricted to a type outside the join pair) gets nothing new here.
|
|
25
|
+
// DEC-138's join-node crossover (see crossApiEndpoint's doc). Only fires on an API_ENDPOINT for
|
|
26
|
+
// the direction not already walked — a `both` walk or one outside the join pair gets nothing new.
|
|
95
27
|
if (options.crossApiEndpoint === true && direction !== "both" && provider.node(id)?.type === "API_ENDPOINT") {
|
|
96
28
|
const joinTypes = (options.types ?? API_JOIN_EDGE_TYPES).filter((t) => API_JOIN_EDGE_TYPES.includes(t));
|
|
97
29
|
if (joinTypes.length > 0) {
|
|
@@ -109,20 +41,15 @@ function neighbours(provider, id, options) {
|
|
|
109
41
|
}
|
|
110
42
|
return result;
|
|
111
43
|
}
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* Terminates on a cyclic graph by construction — a plain visited-set is correct
|
|
116
|
-
* here precisely because there is no score to improve on a second visit.
|
|
117
|
-
*/
|
|
44
|
+
/** Breadth-first reachability. Unweighted: every reached node scores 1.0. Terminates on a cyclic
|
|
45
|
+
* graph by construction — a plain visited-set is correct since there's no score to improve. */
|
|
118
46
|
export function bfs(provider, seeds, options = {}) {
|
|
119
47
|
const budget = options.budget ?? Number.POSITIVE_INFINITY;
|
|
120
48
|
const maxDepth = options.maxDepth ?? Number.POSITIVE_INFINITY;
|
|
121
49
|
const seen = new Map();
|
|
122
50
|
const queue = [];
|
|
123
|
-
// R0, not R4, when no edge is traversed
|
|
124
|
-
//
|
|
125
|
-
// of a running minimum would report it as the strongest evidence tier.
|
|
51
|
+
// R0, not R4, when no edge is traversed (see createResolutionFloor) — an isolated seed examined
|
|
52
|
+
// nothing, and a running minimum's identity value would wrongly report the strongest tier.
|
|
126
53
|
const floor = createResolutionFloor();
|
|
127
54
|
let truncated = false;
|
|
128
55
|
for (const seed of seeds) {
|
|
@@ -153,33 +80,15 @@ export function bfs(provider, seeds, options = {}) {
|
|
|
153
80
|
}
|
|
154
81
|
return { reached: [...seen.values()], truncated, resolutionFloor: floor.value() };
|
|
155
82
|
}
|
|
156
|
-
/**
|
|
157
|
-
*
|
|
158
|
-
* the
|
|
159
|
-
*
|
|
160
|
-
* Both terms are §12.4's, and neither one alone is the weight. Confidence
|
|
161
|
-
* carries how much the producer believes the edge; the type weight carries how
|
|
162
|
-
* far a change actually travels along that kind of edge — an `IMPORTS` hop at
|
|
163
|
-
* 0.4 is a weak signal even when it is certain, and a witnessed `CALLS` hop at
|
|
164
|
-
* 0.95 x 1.0 is strong precisely because it was witnessed.
|
|
165
|
-
*
|
|
166
|
-
* Exported so a caller can compose with it rather than reconstruct it, and so
|
|
167
|
-
* the in-process and worker paths are demonstrably the same function — see the
|
|
168
|
-
* parity test in `worker.test.ts`. It is the callback form of
|
|
169
|
-
* `weightFromTable({ weights: DEFAULT_EDGE_WEIGHTS, fallback: ... })`.
|
|
170
|
-
*/
|
|
83
|
+
/** Default per-hop decay: §12.4's edge-type weight times the edge's confidence — both terms are
|
|
84
|
+
* §12.4's, neither alone is the weight (type weight = how far a change travels on that edge kind;
|
|
85
|
+
* confidence = how sure the producer is). Exported so in-process and worker paths are the same function. */
|
|
171
86
|
export function defaultTraversalWeight(edge) {
|
|
172
87
|
return DEFAULT_EDGE_WEIGHTS[edge.type] * edge.confidence;
|
|
173
88
|
}
|
|
174
|
-
/**
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* "Relaxation" is not an optimisation here, it is what makes the result correct:
|
|
178
|
-
* with boosting factors in play a node can be reached later by a better path,
|
|
179
|
-
* and a visited-set that refuses to revisit would keep the worse score
|
|
180
|
-
* permanently. The best-score map plus re-push on improvement is the fix, and
|
|
181
|
-
* it costs nothing when scores do decrease monotonically.
|
|
182
|
-
*/
|
|
89
|
+
/** Best-first traversal with score decay and relaxation. "Relaxation" isn't an optimisation here,
|
|
90
|
+
* it's correctness: with boosting factors a node can be reached later by a better path, and a
|
|
91
|
+
* plain visited-set would keep the worse score permanently. Costs nothing when scores decay monotonically. */
|
|
183
92
|
export function weightedBfs(provider, seeds, options = {}) {
|
|
184
93
|
const budget = options.budget ?? Number.POSITIVE_INFINITY;
|
|
185
94
|
const maxDepth = options.maxDepth ?? Number.POSITIVE_INFINITY;
|
|
@@ -187,9 +96,8 @@ export function weightedBfs(provider, seeds, options = {}) {
|
|
|
187
96
|
const weightFor = options.weightFor ?? defaultTraversalWeight;
|
|
188
97
|
const best = new Map();
|
|
189
98
|
const heap = new ScoreHeap();
|
|
190
|
-
// R0, not R4, when no edge is traversed
|
|
191
|
-
//
|
|
192
|
-
// of a running minimum would report it as the strongest evidence tier.
|
|
99
|
+
// R0, not R4, when no edge is traversed (see createResolutionFloor) — an isolated seed examined
|
|
100
|
+
// nothing, and a running minimum's identity value would wrongly report the strongest tier.
|
|
193
101
|
const floor = createResolutionFloor();
|
|
194
102
|
let truncated = false;
|
|
195
103
|
for (const seed of seeds) {
|
|
@@ -230,13 +138,9 @@ export function weightedBfs(provider, seeds, options = {}) {
|
|
|
230
138
|
const reached = [...best.values()].sort((a, b) => b.score - a.score || a.id.localeCompare(b.id));
|
|
231
139
|
return { reached, truncated, resolutionFloor: floor.value() };
|
|
232
140
|
}
|
|
233
|
-
/**
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
* Hop count rather than score: "how is this connected" and "how much impact
|
|
237
|
-
* propagates" are different questions, and answering the first with the second's
|
|
238
|
-
* machinery gives a path that is heavier but shorter-looking.
|
|
239
|
-
*/
|
|
141
|
+
/** Shortest path by hop count, as edges. Empty when unreachable. Hop count, not score — "how is
|
|
142
|
+
* this connected" and "how much impact propagates" are different questions; answering the first
|
|
143
|
+
* with the second's machinery gives a heavier, shorter-looking path. */
|
|
240
144
|
export function findPath(provider, from, to, options = {}) {
|
|
241
145
|
if (from === to)
|
|
242
146
|
return [];
|
|
@@ -270,14 +174,9 @@ export function findPath(provider, from, to, options = {}) {
|
|
|
270
174
|
}
|
|
271
175
|
return [];
|
|
272
176
|
}
|
|
273
|
-
/**
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
* Hand-rolled because the package has zero runtime dependencies by design, and
|
|
277
|
-
* because sorting an array on every pop is O(n log n) per operation — on the
|
|
278
|
-
* 10,000-node graph the blueprint's own test uses, that is the difference
|
|
279
|
-
* between milliseconds and seconds.
|
|
280
|
-
*/
|
|
177
|
+
/** Binary max-heap on score. Hand-rolled: the package has zero runtime deps by design, and
|
|
178
|
+
* sorting on every pop is O(n log n) per op — on the blueprint's 10,000-node test graph that's
|
|
179
|
+
* the difference between milliseconds and seconds. */
|
|
281
180
|
class ScoreHeap {
|
|
282
181
|
#items = [];
|
|
283
182
|
get size() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverse.js","sourceRoot":"","sources":["../../src/query/traverse.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"traverse.js","sourceRoot":"","sources":["../../src/query/traverse.ts"],"names":[],"mappings":"AAAA;;6FAE6F;AAI7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAM9D;wFACwF;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAwB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AAiCnF,SAAS,UAAU,CACjB,QAA2B,EAC3B,EAAU,EACV,OAAyB;IAEzB,MAAM,SAAS,GAAG;QAChB,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;QAChE,GAAG,CAAC,OAAO,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;QACxF,GAAG,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;KAC/E,CAAC;IACF,MAAM,S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