@descryy/core 0.4.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 +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 +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 +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 +7 -1
- package/dist/validation/env.d.ts.map +1 -1
- package/dist/validation/env.js +3 -1
- package/dist/validation/env.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/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
|
@@ -1,164 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `UnresolvedRef` records what an adapter saw and could not resolve, and
|
|
8
|
-
* everything filed there reads as a **gap**. Two unrelated things are filed:
|
|
9
|
-
*
|
|
10
|
-
* - An outbound call to a third party, **read perfectly**. There is no endpoint
|
|
11
|
-
* in this workspace for it and there never will be. That is §20.2's *not
|
|
12
|
-
* applicable* — a fact, not a gap.
|
|
13
|
-
* - A call against this workspace's own surface whose target is not statically
|
|
14
|
-
* determinable. That is the gap, and it is *not analysable*.
|
|
15
|
-
*
|
|
16
|
-
* A read-rate census across nine repositories reported **90 edges read against
|
|
17
|
-
* 773 recognised-and-refused, a 10% read rate**, and concluded that `USES_API`
|
|
18
|
-
* resolution was the system's largest deficit. On one repository **115 of 163
|
|
19
|
-
* ledger rows are calls to Microsoft, Zoom, Hitpay and Zoho** — correctly
|
|
20
|
-
* refused, counted as deficit. The deficit there is real and it is 47%, not 20%.
|
|
21
|
-
*
|
|
22
|
-
* ## What running it on real code established, and it is not what was expected
|
|
23
|
-
*
|
|
24
|
-
* **`rawTarget` does not carry the target.** On the reference repository every
|
|
25
|
-
* one of the 64 `USES_API` refusals carries the *callee* — `"fetch"`,
|
|
26
|
-
* `"api.get"`, `"api.post"` — because the URL was an expression the adapter
|
|
27
|
-
* could not evaluate, and the expression text is not what gets filed. So the
|
|
28
|
-
* ledger **cannot** be split from stored data by any engine-side rule, and this
|
|
29
|
-
* module reports all 64 as `undetermined`, which is the correct answer and a
|
|
30
|
-
* useless one.
|
|
31
|
-
*
|
|
32
|
-
* The distinction nevertheless **already exists** — in `reason`, as prose. Two
|
|
33
|
-
* sentence forms account for all 64, and they split it exactly as a hand count
|
|
34
|
-
* of the source did:
|
|
35
|
-
*
|
|
36
|
-
* | `reason` says | count | what it means |
|
|
37
|
-
* | --- | --- | --- |
|
|
38
|
-
* | *"the path is not repository-relative"* | **39** | outbound. A fact |
|
|
39
|
-
* | *"the request path is not a literal or template"* | **25** | the gap |
|
|
40
|
-
*
|
|
41
|
-
* 39 + 25 = 64, and the independent hand count of that repository was 39 outbound
|
|
42
|
-
* and 25 genuinely unread. **The adapter knows which population a refusal is in
|
|
43
|
-
* and says so in a sentence.** Parsing that sentence is not an option: it is
|
|
44
|
-
* free text, it is written per producer, and a consumer that greps it breaks
|
|
45
|
-
* silently the first time one is reworded — the CRLF-stripper failure exactly.
|
|
46
|
-
*
|
|
47
|
-
* So the conclusion is the opposite of this module's premise: **the
|
|
48
|
-
* discriminator has to be a field**, and this module is the evidence for that
|
|
49
|
-
* rather than a substitute for it. It classifies what the text can carry, and
|
|
50
|
-
* discloses everything it cannot, which is what makes the gap measurable.
|
|
51
|
-
*
|
|
52
|
-
* ## Why the field is still not added here
|
|
53
|
-
*
|
|
54
|
-
* The `category` discriminator is the right end state and is deliberately **not**
|
|
55
|
-
* added here, for two reasons that are the same reason:
|
|
56
|
-
*
|
|
57
|
-
* 1. **No adapter would set it today.** Shipping a consumer that reads a carrier
|
|
58
|
-
* no producer emits is exactly the defect DEC-112 names, and it has already
|
|
59
|
-
* cost this project three checks that were dead on every real repository. A
|
|
60
|
-
* field added ahead of its producer is a dead carrier however obviously
|
|
61
|
-
* correct it looks — so the field lands with an adapter emitting it, not
|
|
62
|
-
* before.
|
|
63
|
-
* 2. **The storage column needs the migration policy** that is still open
|
|
64
|
-
* (architecture §32). An engine-side classifier needs neither, works on graphs
|
|
65
|
-
* already written, and turns the IR change into a request backed by measured
|
|
66
|
-
* populations rather than a speculative one.
|
|
67
|
-
*
|
|
68
|
-
* ## DEC-242 landed, and this module now defers to it where it can
|
|
69
|
-
*
|
|
70
|
-
* The heuristic above is what this module reasoned its way to before a
|
|
71
|
-
* discriminator field existed. It now does: `attrs.refusalClass` (DEC-242),
|
|
72
|
-
* producer-declared and persisted (the store gained a real `attrs` column
|
|
73
|
-
* for it — DEC-224). `classifyRefusal` checks `refusalClass === "out-of-scope"`
|
|
74
|
-
* first and trusts it outright, ahead of the text heuristic below — a
|
|
75
|
-
* producer that resolved the target and declared it out of scope did real
|
|
76
|
-
* analysis, which is better evidence than this module re-deriving the same
|
|
77
|
-
* fact from `rawTarget` text. DEC-242's other three classes
|
|
78
|
-
* (`value-unknown`, `capability-gap`, `varies-per-call`) answer a different
|
|
79
|
-
* question — whether a human sentence could close the row — and say nothing
|
|
80
|
-
* about scope, so they and an unset field both fall through to the
|
|
81
|
-
* unchanged heuristic rather than being read as "not out-of-scope." Every
|
|
82
|
-
* row written before DEC-242 shipped is graded exactly as it always was.
|
|
83
|
-
*
|
|
84
|
-
* The practical consequence, per DEC-242's own note: any future recall
|
|
85
|
-
* figure computed over `unresolved.length` must exclude `refusalClass ===
|
|
86
|
-
* "out-of-scope"` rows from its deficit denominator, the same way
|
|
87
|
-
* `readRate` below already excludes this module's own `outOfScope`
|
|
88
|
-
* verdict — measured at 3 of ~215 rows on the corpora checked so far
|
|
89
|
-
* (DEC-260), small today and not distorting any published number, but
|
|
90
|
-
* expressible now in a way it was not before the field existed.
|
|
91
|
-
*
|
|
92
|
-
* ## The third population is the point
|
|
93
|
-
*
|
|
94
|
-
* A ledger row whose target is a runtime value cannot be classified either way:
|
|
95
|
-
* `fetch(url)` may be outbound or internal and the text does not say. Several
|
|
96
|
-
* such rows on the census repository turned out to be outbound, discovered by
|
|
97
|
-
* hand. **So this returns three counts and refuses to return one rate.** Folding
|
|
98
|
-
* `undetermined` into either side is the same error one level down — the whole
|
|
99
|
-
* defect was a denominator that quietly absorbed a population it should have
|
|
100
|
-
* disclosed.
|
|
101
|
-
*/
|
|
2
|
+
* Refusal ledger mixes outbound calls (correctly refused, §20.2 not applicable) with
|
|
3
|
+
* unresolvable internal targets (a real gap) — one rate hid this (10% read vs a true
|
|
4
|
+
* 47% deficit, one repo). `attrs.refusalClass` (DEC-242) trusted first, text heuristic
|
|
5
|
+
* falls back. Returns three counts, never one rate. */
|
|
102
6
|
import type { UnresolvedRef } from "@descryy/ir";
|
|
103
|
-
/**
|
|
104
|
-
*
|
|
105
|
-
* serve. `unreadable` — recognised, target not determinable. `undetermined` —
|
|
106
|
-
* the evidence does not say, and pretending otherwise is what produced the
|
|
107
|
-
* wrong number in the first place.
|
|
108
|
-
*/
|
|
7
|
+
/** outOfScope: read correctly, target outside this workspace. unreadable: recognised,
|
|
8
|
+
* target unresolvable. undetermined: evidence doesn't say — don't fold into either. */
|
|
109
9
|
export type RefusalClass = "outOfScope" | "unreadable" | "undetermined";
|
|
110
10
|
export interface RefusalScope {
|
|
111
|
-
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* Empty means "no host is known to be ours", which is honest rather than
|
|
116
|
-
* convenient: with no known host every absolute target classifies as
|
|
117
|
-
* `outOfScope`, so a caller that has hosts and does not pass them will
|
|
118
|
-
* understate its own deficit. `classifyRefusals` reports `scopeKnown` so that
|
|
119
|
-
* cannot happen silently.
|
|
120
|
-
*/
|
|
11
|
+
/** Hosts this workspace serves; an absolute target on one is a genuine gap, not
|
|
12
|
+
* outbound. Empty understates the deficit (all absolute targets read outOfScope) —
|
|
13
|
+
* `classifyRefusals`'s `scopeKnown` discloses this so it can't happen silently. */
|
|
121
14
|
readonly internalHosts?: readonly string[];
|
|
122
15
|
}
|
|
123
|
-
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* **A producer's own `attrs.refusalClass: "out-of-scope"` (DEC-242) is
|
|
127
|
-
* trusted directly, ahead of everything below.** DEC-242 landed after this
|
|
128
|
-
* module's own heuristic did, and it is strictly better evidence for the same
|
|
129
|
-
* question: a producer that read the call, resolved the target, and declared
|
|
130
|
-
* it out of scope did real analysis (Lane F's DEC-260 origin check, for one),
|
|
131
|
-
* where this module's `hostOf`/`isOpaque` pair is inference from `rawTarget`
|
|
132
|
-
* text alone. Rule 3's "declared beats re-derived" reordering, not a new rule.
|
|
133
|
-
*
|
|
134
|
-
* **A row with no `refusalClass`, or one of DEC-242's other three values
|
|
135
|
-
* (`value-unknown`, `capability-gap`, `varies-per-call`), falls through to
|
|
136
|
-
* the text heuristic unchanged — a deliberate choice, not an oversight.**
|
|
137
|
-
* Those three classes answer "is a human sentence enough to close this row,"
|
|
138
|
-
* a different question from "is this target inside or outside the
|
|
139
|
-
* workspace," and none of them says a row is or is not out of scope; reading
|
|
140
|
-
* absence as "therefore not out-of-scope" would be exactly the silent
|
|
141
|
-
* behaviour change this module's own module-header history warns against.
|
|
142
|
-
* Every row written before DEC-242 shipped, and every row a producer has not
|
|
143
|
-
* classified yet, is graded identically to how it always was.
|
|
144
|
-
*
|
|
145
|
-
* **Below that: absolute target on a host that is not ours → `outOfScope`.**
|
|
146
|
-
* The only positive classification made here from text alone, so it is as
|
|
147
|
-
* reliable as the text. Everything else is `unreadable` when it looks like a
|
|
148
|
-
* path this workspace could serve, and `undetermined` when the target says
|
|
149
|
-
* nothing about where the call goes.
|
|
150
|
-
*/
|
|
16
|
+
/** `attrs.refusalClass === "out-of-scope"` (DEC-242) is trusted first — producer already
|
|
17
|
+
* resolved the target, better evidence than text inference. Other refusalClass values
|
|
18
|
+
* and unset both fall through unchanged to the text heuristic below. */
|
|
151
19
|
export declare function classifyRefusal(ref: UnresolvedRef, scope?: RefusalScope): RefusalClass;
|
|
152
20
|
export interface RefusalCensus {
|
|
153
21
|
readonly total: number;
|
|
154
22
|
readonly outOfScope: number;
|
|
155
23
|
readonly unreadable: number;
|
|
156
24
|
readonly undetermined: number;
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
* then `outOfScope`, which **understates the deficit**, and a report that does
|
|
160
|
-
* not say so is making a claim it cannot support.
|
|
161
|
-
*/
|
|
25
|
+
/** False with no supplied internal hosts — every absolute target then reads
|
|
26
|
+
* outOfScope, understating the deficit. Callers must check before trusting the rate. */
|
|
162
27
|
readonly scopeKnown: boolean;
|
|
163
28
|
/** Hosts seen on absolute targets, most frequent first — the evidence for `internalHosts`. */
|
|
164
29
|
readonly hosts: readonly {
|
|
@@ -167,16 +32,9 @@ export interface RefusalCensus {
|
|
|
167
32
|
}[];
|
|
168
33
|
}
|
|
169
34
|
export declare function classifyRefusals(refs: readonly UnresolvedRef[], scope?: RefusalScope): RefusalCensus;
|
|
170
|
-
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* `overRecognised` is the census's original figure and it is kept because
|
|
174
|
-
* deleting a published number is worse than captioning it. `overInternal` is
|
|
175
|
-
* the one that describes the analyser's actual deficit. **Both are `null` when
|
|
176
|
-
* their denominator is zero** — `decisions()`'s rule, one level out: a rate over
|
|
177
|
-
* nothing is not 0% and not 100%, it is undefined, and returning a number there
|
|
178
|
-
* is how a dead component scores well.
|
|
179
|
-
*/
|
|
35
|
+
/** Two rates plus disclosure, never one number. `overRecognised` is the original
|
|
36
|
+
* (kept, captioned) figure; `overInternal` is the real deficit. Both null when
|
|
37
|
+
* denominator is zero — undefined, not 0% or 100%. */
|
|
180
38
|
export interface ReadRate {
|
|
181
39
|
readonly read: number;
|
|
182
40
|
readonly census: RefusalCensus;
|
|
@@ -184,11 +42,8 @@ export interface ReadRate {
|
|
|
184
42
|
readonly overRecognised: number | null;
|
|
185
43
|
/** read / (read + refusals that could plausibly be ours). The deficit that is actually ours. */
|
|
186
44
|
readonly overInternal: number | null;
|
|
187
|
-
/**
|
|
188
|
-
*
|
|
189
|
-
* the numbers differ, because the gap between them is exactly the thing a
|
|
190
|
-
* single figure hid.
|
|
191
|
-
*/
|
|
45
|
+
/** Why the two rates differ; non-empty whenever they do — the gap is exactly
|
|
46
|
+
* what a single figure would have hidden. */
|
|
192
47
|
readonly disclosure: readonly string[];
|
|
193
48
|
}
|
|
194
49
|
export declare function readRate(read: number, refs: readonly UnresolvedRef[], scope?: RefusalScope): ReadRate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unresolved.d.ts","sourceRoot":"","sources":["../../src/query/unresolved.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"unresolved.d.ts","sourceRoot":"","sources":["../../src/query/unresolved.ts"],"names":[],"mappings":"AAAA;;;;uDAIuD;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;wFACwF;AACxF,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,cAAc,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B;;wFAEoF;IACpF,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AA2BD;;yEAEyE;AACzE,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,GAAE,YAAiB,GAAG,YAAY,CAQ1F;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;6FACyF;IACzF,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,8FAA8F;IAC9F,QAAQ,CAAC,KAAK,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9E;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,aAAa,EAAE,EAC9B,KAAK,GAAE,YAAiB,GACvB,aAAa,CAgBf;AAED;;uDAEuD;AACvD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,yFAAyF;IACzF,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,gGAAgG;IAChG,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC;kDAC8C;IAC9C,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,aAAa,EAAE,EAC9B,KAAK,GAAE,YAAiB,GACvB,QAAQ,CAwCV"}
|
package/dist/query/unresolved.js
CHANGED
|
@@ -1,104 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `UnresolvedRef` records what an adapter saw and could not resolve, and
|
|
8
|
-
* everything filed there reads as a **gap**. Two unrelated things are filed:
|
|
9
|
-
*
|
|
10
|
-
* - An outbound call to a third party, **read perfectly**. There is no endpoint
|
|
11
|
-
* in this workspace for it and there never will be. That is §20.2's *not
|
|
12
|
-
* applicable* — a fact, not a gap.
|
|
13
|
-
* - A call against this workspace's own surface whose target is not statically
|
|
14
|
-
* determinable. That is the gap, and it is *not analysable*.
|
|
15
|
-
*
|
|
16
|
-
* A read-rate census across nine repositories reported **90 edges read against
|
|
17
|
-
* 773 recognised-and-refused, a 10% read rate**, and concluded that `USES_API`
|
|
18
|
-
* resolution was the system's largest deficit. On one repository **115 of 163
|
|
19
|
-
* ledger rows are calls to Microsoft, Zoom, Hitpay and Zoho** — correctly
|
|
20
|
-
* refused, counted as deficit. The deficit there is real and it is 47%, not 20%.
|
|
21
|
-
*
|
|
22
|
-
* ## What running it on real code established, and it is not what was expected
|
|
23
|
-
*
|
|
24
|
-
* **`rawTarget` does not carry the target.** On the reference repository every
|
|
25
|
-
* one of the 64 `USES_API` refusals carries the *callee* — `"fetch"`,
|
|
26
|
-
* `"api.get"`, `"api.post"` — because the URL was an expression the adapter
|
|
27
|
-
* could not evaluate, and the expression text is not what gets filed. So the
|
|
28
|
-
* ledger **cannot** be split from stored data by any engine-side rule, and this
|
|
29
|
-
* module reports all 64 as `undetermined`, which is the correct answer and a
|
|
30
|
-
* useless one.
|
|
31
|
-
*
|
|
32
|
-
* The distinction nevertheless **already exists** — in `reason`, as prose. Two
|
|
33
|
-
* sentence forms account for all 64, and they split it exactly as a hand count
|
|
34
|
-
* of the source did:
|
|
35
|
-
*
|
|
36
|
-
* | `reason` says | count | what it means |
|
|
37
|
-
* | --- | --- | --- |
|
|
38
|
-
* | *"the path is not repository-relative"* | **39** | outbound. A fact |
|
|
39
|
-
* | *"the request path is not a literal or template"* | **25** | the gap |
|
|
40
|
-
*
|
|
41
|
-
* 39 + 25 = 64, and the independent hand count of that repository was 39 outbound
|
|
42
|
-
* and 25 genuinely unread. **The adapter knows which population a refusal is in
|
|
43
|
-
* and says so in a sentence.** Parsing that sentence is not an option: it is
|
|
44
|
-
* free text, it is written per producer, and a consumer that greps it breaks
|
|
45
|
-
* silently the first time one is reworded — the CRLF-stripper failure exactly.
|
|
46
|
-
*
|
|
47
|
-
* So the conclusion is the opposite of this module's premise: **the
|
|
48
|
-
* discriminator has to be a field**, and this module is the evidence for that
|
|
49
|
-
* rather than a substitute for it. It classifies what the text can carry, and
|
|
50
|
-
* discloses everything it cannot, which is what makes the gap measurable.
|
|
51
|
-
*
|
|
52
|
-
* ## Why the field is still not added here
|
|
53
|
-
*
|
|
54
|
-
* The `category` discriminator is the right end state and is deliberately **not**
|
|
55
|
-
* added here, for two reasons that are the same reason:
|
|
56
|
-
*
|
|
57
|
-
* 1. **No adapter would set it today.** Shipping a consumer that reads a carrier
|
|
58
|
-
* no producer emits is exactly the defect DEC-112 names, and it has already
|
|
59
|
-
* cost this project three checks that were dead on every real repository. A
|
|
60
|
-
* field added ahead of its producer is a dead carrier however obviously
|
|
61
|
-
* correct it looks — so the field lands with an adapter emitting it, not
|
|
62
|
-
* before.
|
|
63
|
-
* 2. **The storage column needs the migration policy** that is still open
|
|
64
|
-
* (architecture §32). An engine-side classifier needs neither, works on graphs
|
|
65
|
-
* already written, and turns the IR change into a request backed by measured
|
|
66
|
-
* populations rather than a speculative one.
|
|
67
|
-
*
|
|
68
|
-
* ## DEC-242 landed, and this module now defers to it where it can
|
|
69
|
-
*
|
|
70
|
-
* The heuristic above is what this module reasoned its way to before a
|
|
71
|
-
* discriminator field existed. It now does: `attrs.refusalClass` (DEC-242),
|
|
72
|
-
* producer-declared and persisted (the store gained a real `attrs` column
|
|
73
|
-
* for it — DEC-224). `classifyRefusal` checks `refusalClass === "out-of-scope"`
|
|
74
|
-
* first and trusts it outright, ahead of the text heuristic below — a
|
|
75
|
-
* producer that resolved the target and declared it out of scope did real
|
|
76
|
-
* analysis, which is better evidence than this module re-deriving the same
|
|
77
|
-
* fact from `rawTarget` text. DEC-242's other three classes
|
|
78
|
-
* (`value-unknown`, `capability-gap`, `varies-per-call`) answer a different
|
|
79
|
-
* question — whether a human sentence could close the row — and say nothing
|
|
80
|
-
* about scope, so they and an unset field both fall through to the
|
|
81
|
-
* unchanged heuristic rather than being read as "not out-of-scope." Every
|
|
82
|
-
* row written before DEC-242 shipped is graded exactly as it always was.
|
|
83
|
-
*
|
|
84
|
-
* The practical consequence, per DEC-242's own note: any future recall
|
|
85
|
-
* figure computed over `unresolved.length` must exclude `refusalClass ===
|
|
86
|
-
* "out-of-scope"` rows from its deficit denominator, the same way
|
|
87
|
-
* `readRate` below already excludes this module's own `outOfScope`
|
|
88
|
-
* verdict — measured at 3 of ~215 rows on the corpora checked so far
|
|
89
|
-
* (DEC-260), small today and not distorting any published number, but
|
|
90
|
-
* expressible now in a way it was not before the field existed.
|
|
91
|
-
*
|
|
92
|
-
* ## The third population is the point
|
|
93
|
-
*
|
|
94
|
-
* A ledger row whose target is a runtime value cannot be classified either way:
|
|
95
|
-
* `fetch(url)` may be outbound or internal and the text does not say. Several
|
|
96
|
-
* such rows on the census repository turned out to be outbound, discovered by
|
|
97
|
-
* hand. **So this returns three counts and refuses to return one rate.** Folding
|
|
98
|
-
* `undetermined` into either side is the same error one level down — the whole
|
|
99
|
-
* defect was a denominator that quietly absorbed a population it should have
|
|
100
|
-
* disclosed.
|
|
101
|
-
*/
|
|
2
|
+
* Refusal ledger mixes outbound calls (correctly refused, §20.2 not applicable) with
|
|
3
|
+
* unresolvable internal targets (a real gap) — one rate hid this (10% read vs a true
|
|
4
|
+
* 47% deficit, one repo). `attrs.refusalClass` (DEC-242) trusted first, text heuristic
|
|
5
|
+
* falls back. Returns three counts, never one rate. */
|
|
102
6
|
const ABSOLUTE = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;
|
|
103
7
|
/** The host of an absolute target, lowercased and without a port; `null` if the target is not absolute. */
|
|
104
8
|
function hostOf(rawTarget) {
|
|
@@ -111,55 +15,24 @@ function hostOf(rawTarget) {
|
|
|
111
15
|
return null;
|
|
112
16
|
}
|
|
113
17
|
}
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
116
|
-
* at all — a bare identifier, a call expression, a template with nothing fixed.
|
|
117
|
-
* These are the rows that cannot be classified, and they must stay visible.
|
|
118
|
-
*/
|
|
18
|
+
/** No path-like evidence (bare identifier, call expression, template with nothing
|
|
19
|
+
* fixed) means unclassifiable — must stay visible, not folded into either class. */
|
|
119
20
|
function isOpaque(rawTarget) {
|
|
120
21
|
const t = rawTarget.trim();
|
|
121
22
|
if (t === "")
|
|
122
23
|
return true;
|
|
123
|
-
//
|
|
124
|
-
// nothing about where the call goes, so it is opaque rather than internal.
|
|
125
|
-
// Reached only when `hostOf` has already returned null for it.
|
|
24
|
+
// Absolute with no parseable host (hostOf returned null): opaque, not internal.
|
|
126
25
|
if (ABSOLUTE.test(t))
|
|
127
26
|
return true;
|
|
128
27
|
if (t.startsWith("/"))
|
|
129
28
|
return false;
|
|
130
|
-
//
|
|
131
|
-
// the call goes. Anything containing a `/` outside a placeholder does.
|
|
29
|
+
// Bare `{param}`/`${...}` with no fixed segment says nothing; `/` elsewhere does.
|
|
132
30
|
const withoutPlaceholders = t.replace(/\$?\{[^}]*\}/g, "");
|
|
133
31
|
return !withoutPlaceholders.includes("/");
|
|
134
32
|
}
|
|
135
|
-
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* **A producer's own `attrs.refusalClass: "out-of-scope"` (DEC-242) is
|
|
139
|
-
* trusted directly, ahead of everything below.** DEC-242 landed after this
|
|
140
|
-
* module's own heuristic did, and it is strictly better evidence for the same
|
|
141
|
-
* question: a producer that read the call, resolved the target, and declared
|
|
142
|
-
* it out of scope did real analysis (Lane F's DEC-260 origin check, for one),
|
|
143
|
-
* where this module's `hostOf`/`isOpaque` pair is inference from `rawTarget`
|
|
144
|
-
* text alone. Rule 3's "declared beats re-derived" reordering, not a new rule.
|
|
145
|
-
*
|
|
146
|
-
* **A row with no `refusalClass`, or one of DEC-242's other three values
|
|
147
|
-
* (`value-unknown`, `capability-gap`, `varies-per-call`), falls through to
|
|
148
|
-
* the text heuristic unchanged — a deliberate choice, not an oversight.**
|
|
149
|
-
* Those three classes answer "is a human sentence enough to close this row,"
|
|
150
|
-
* a different question from "is this target inside or outside the
|
|
151
|
-
* workspace," and none of them says a row is or is not out of scope; reading
|
|
152
|
-
* absence as "therefore not out-of-scope" would be exactly the silent
|
|
153
|
-
* behaviour change this module's own module-header history warns against.
|
|
154
|
-
* Every row written before DEC-242 shipped, and every row a producer has not
|
|
155
|
-
* classified yet, is graded identically to how it always was.
|
|
156
|
-
*
|
|
157
|
-
* **Below that: absolute target on a host that is not ours → `outOfScope`.**
|
|
158
|
-
* The only positive classification made here from text alone, so it is as
|
|
159
|
-
* reliable as the text. Everything else is `unreadable` when it looks like a
|
|
160
|
-
* path this workspace could serve, and `undetermined` when the target says
|
|
161
|
-
* nothing about where the call goes.
|
|
162
|
-
*/
|
|
33
|
+
/** `attrs.refusalClass === "out-of-scope"` (DEC-242) is trusted first — producer already
|
|
34
|
+
* resolved the target, better evidence than text inference. Other refusalClass values
|
|
35
|
+
* and unset both fall through unchanged to the text heuristic below. */
|
|
163
36
|
export function classifyRefusal(ref, scope = {}) {
|
|
164
37
|
if (ref.attrs?.["refusalClass"] === "out-of-scope")
|
|
165
38
|
return "outOfScope";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unresolved.js","sourceRoot":"","sources":["../../src/query/unresolved.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"unresolved.js","sourceRoot":"","sources":["../../src/query/unresolved.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,105 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* technique 6 (a dedicated tool, not appended to every response).
|
|
6
|
-
*
|
|
7
|
-
* ## Scope boundary — read this before assuming more than this module builds
|
|
8
|
-
*
|
|
9
|
-
* A complete `Verification status` also depends on **which pipeline stages
|
|
10
|
-
* ran under which trigger mask** (`ai-layer-plan.md` §2: the fast path skips
|
|
11
|
-
* stages 8-13 entirely) — that is runtime information about one specific
|
|
12
|
-
* run, and it does not exist in `descry-core`. This repo is the static
|
|
13
|
-
* knowledge plane; there is no live run here to ask "did stage 9 actually
|
|
14
|
-
* execute against this file." **This module builds the static half only:**
|
|
15
|
-
* what a static reading of the graph and a language's declared capabilities
|
|
16
|
-
* can determine about analysability and resolution. Combining that with the
|
|
17
|
-
* runtime half — which stages actually ran — is `descry-runtime`/the
|
|
18
|
-
* pipeline's job, not this one's.
|
|
19
|
-
*
|
|
20
|
-
* ## Output shape: `@descryy/ir`'s `VerificationStatus`, not a parallel one
|
|
21
|
-
*
|
|
22
|
-
* `packages/ir/src/finding.ts` already defines the shared shape two
|
|
23
|
-
* repositories (the pipeline and the desktop golden-report test) assert
|
|
24
|
-
* against — `{ exercised: string[], notExercised: UntestedScope[] }`. This
|
|
25
|
-
* module produces exactly that, deliberately, rather than a second
|
|
26
|
-
* "coverage" record: two structures answering the same question would be
|
|
27
|
-
* exactly the kind of divergence `finding.ts`'s own module doc warns about
|
|
28
|
-
* for `Finding` itself, one level down.
|
|
29
|
-
*
|
|
30
|
-
* An `exercised` entry is `"<ref> (R<resolution>)"` — the scope item's
|
|
31
|
-
* identifier plus the real resolution level the graph actually holds for it,
|
|
32
|
-
* because a present node's resolution is a fact worth keeping even though
|
|
33
|
-
* `VerificationStatus.exercised` is typed as bare strings; see
|
|
34
|
-
* {@link formatExercised} for the exact grammar and
|
|
35
|
-
* {@link resolutionOfExercised} for the matching parser. A present item's
|
|
36
|
-
* resolution is reported as-is and is **never filtered against the
|
|
37
|
-
* requested check's `minResolution`** — whether R1 is "enough" for a given
|
|
38
|
-
* claim is a judgement for something above this layer (rule 3's cap, or G4),
|
|
39
|
-
* not a fact this function may assert.
|
|
40
|
-
*
|
|
41
|
-
* ## Hard constraint: no report category, ever
|
|
42
|
-
*
|
|
43
|
-
* §19's five report categories (`confirmed` / `strongly supported` /
|
|
44
|
-
* `unconfirmed` / `not analysable` / `unsupported`) are assigned at G4,
|
|
45
|
-
* above this surface (`ai-tool-contract.md` §1.2 draws the same line for
|
|
46
|
-
* result states). This module returns only the raw coverage facts —
|
|
47
|
-
* reachable-or-not, resolution, a named reason — and never the literal
|
|
48
|
-
* category vocabulary; a test asserts none of the five strings ever appear
|
|
49
|
-
* in the output.
|
|
50
|
-
*
|
|
51
|
-
* ## Reuses `tiers/certify.ts`'s capability comparison, not a second one
|
|
52
|
-
*
|
|
53
|
-
* "Does this language's declared `CapabilityMatrix` cover what a check
|
|
54
|
-
* needs" is the same question `certify.ts`'s `checkCapability` already
|
|
55
|
-
* answers for a whole adapter's tier. {@link capabilityGaps} restates that
|
|
56
|
-
* comparison — declared node/edge types, declared `maxResolution` — at
|
|
57
|
-
* per-scope-item granularity rather than adapter-wide, so the two never
|
|
58
|
-
* quietly disagree about what "this language's capabilities satisfy this
|
|
59
|
-
* requirement" means. It is a restatement rather than an import because
|
|
60
|
-
* `certify.ts`'s function also folds in precision-draw attestation and
|
|
61
|
-
* corpus conformance, both properties of a *published tier*, not of one live
|
|
62
|
-
* scope item — pulling those in here would answer a different question than
|
|
63
|
-
* the one being asked.
|
|
64
|
-
*
|
|
65
|
-
* ## Why this never looks up capabilities by language itself
|
|
66
|
-
*
|
|
67
|
-
* `ScopeItem.capabilities` is supplied by the caller, already resolved, per
|
|
68
|
-
* item — never looked up here from a `language` string. A `Map.get(item.
|
|
69
|
-
* language)` shape inside `packages/core/src/query/` would be exactly the
|
|
70
|
-
* IR-boundary leak `descry-boundary/no-language-branch` exists to catch
|
|
71
|
-
* (architecture principle 7 / `CLAUDE.md` rule 1): deciding behaviour from
|
|
72
|
-
* *which* language a node came from, not merely from whether one is known.
|
|
73
|
-
* `certify.ts` holds the same discipline one layer up — it takes one
|
|
74
|
-
* `GateEvidence` per call and never builds a language-keyed registry inside
|
|
75
|
-
* `packages/core` either. Resolving "which capabilities apply to this
|
|
76
|
-
* item's language" is the caller's job, done above this boundary; `language`
|
|
77
|
-
* is read here only for disclosure (naming it in a reason string), never for
|
|
78
|
-
* a branch, comparison or lookup.
|
|
2
|
+
* Static half of `verification_status` (AI layer §19/§20: coverage is separate from
|
|
3
|
+
* confidence). Builds `@descryy/ir`'s `VerificationStatus` directly, not a parallel shape; never the runtime half (which stages ran) or the five report-category strings — both assigned above this layer (G4).
|
|
4
|
+
* `capabilityGaps` restates `tiers/certify.ts`'s comparison at per-item granularity. `language` is read only for disclosure, never a branch/lookup — capabilities come pre-resolved from the caller (IR-boundary rule 1).
|
|
79
5
|
*/
|
|
80
6
|
import type { CapabilityMatrix, EdgeType, IRNode, NodeType, ResolutionLevel, VerificationStatus } from "@descryy/ir";
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* uses (`nodeTypes`/`edgeTypes`/`minResolution`), restated rather than
|
|
85
|
-
* imported: a live per-scope-item check is not a tier-ladder promotion row
|
|
86
|
-
* and carries none of `Requirement`'s `id`/`kind`/`statement`. Every field
|
|
87
|
-
* omitted asks only "was this item reached at all".
|
|
88
|
-
*/
|
|
7
|
+
/** Mirrors `tiers/ladder.ts`'s `Requirement` targeting fields, restated (not
|
|
8
|
+
* imported — this isn't a tier-ladder promotion row). Every field omitted
|
|
9
|
+
* asks only "was this item reached at all". */
|
|
89
10
|
export interface CoverageCheck {
|
|
90
11
|
readonly nodeTypes?: readonly NodeType[];
|
|
91
12
|
readonly edgeTypes?: readonly EdgeType[];
|
|
92
13
|
readonly minResolution?: ResolutionLevel;
|
|
93
14
|
}
|
|
94
|
-
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* `node` is the strongest fact available: when the graph holds real,
|
|
98
|
-
* analysed content for this item, its own `resolution` is reported as-is,
|
|
99
|
-
* never re-derived. `capabilities` is consulted only when `node` is `null`,
|
|
100
|
-
* to explain *why* nothing is there — `undefined` means no adapter is
|
|
101
|
-
* registered for whatever this item is at all.
|
|
102
|
-
*/
|
|
15
|
+
/** One scope item (file or node). `node`'s own `resolution` is reported as-is,
|
|
16
|
+
* never re-derived; `capabilities` is consulted only when `node` is null, to
|
|
17
|
+
* explain why — `undefined` means no adapter is registered. */
|
|
103
18
|
export interface ScopeItem {
|
|
104
19
|
/** The identifier this item is reported under — a node id or a file path. Opaque to this module. */
|
|
105
20
|
readonly ref: string;
|
|
@@ -115,20 +30,8 @@ export declare function resolutionOfExercised(entry: string): {
|
|
|
115
30
|
readonly ref: string;
|
|
116
31
|
readonly resolution: ResolutionLevel;
|
|
117
32
|
} | null;
|
|
118
|
-
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* Per item, one of three outcomes — see the module header for the full
|
|
122
|
-
* reasoning:
|
|
123
|
-
*
|
|
124
|
-
* 1. **Present in the graph** → `exercised`, carrying its real resolution.
|
|
125
|
-
* 2. **Absent, no capabilities supplied** → `notExercised`, naming the
|
|
126
|
-
* language (or that none could be determined).
|
|
127
|
-
* 3. **Absent, capabilities supplied** → `notExercised`, naming the specific
|
|
128
|
-
* declared gap against `check` when there is one, or — the honest edge
|
|
129
|
-
* case — that a registered adapter declares everything asked for and a
|
|
130
|
-
* static capability comparison alone cannot say why the item is still
|
|
131
|
-
* absent.
|
|
132
|
-
*/
|
|
33
|
+
/** Per item: present → `exercised` with real resolution; absent + no capabilities →
|
|
34
|
+
* `notExercised` naming the language; absent + capabilities → `notExercised` naming
|
|
35
|
+
* the gap, or that a registered adapter declares everything and the absence is unexplained. */
|
|
133
36
|
export declare function computeVerificationStatus(scope: readonly ScopeItem[], check?: CoverageCheck): VerificationStatus;
|
|
134
37
|
//# sourceMappingURL=verification-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-status.d.ts","sourceRoot":"","sources":["../../src/query/verification-status.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"verification-status.d.ts","sourceRoot":"","sources":["../../src/query/verification-status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,eAAe,EAEf,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB;;gDAEgD;AAChD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;CAC1C;AAED;;gEAEgE;AAChE,MAAM,WAAW,SAAS;IACxB,oGAAoG;IACpG,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2HAA2H;IAC3H,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,uGAAuG;IACvG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kJAAkJ;IAClJ,QAAQ,CAAC,YAAY,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACrD;AAmCD,mIAAmI;AACnI,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,CAI1H;AAED;;gGAEgG;AAChG,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,KAAK,GAAE,aAAkB,GACxB,kBAAkB,CAkCpB"}
|