@weftlet/toolkit 0.6.1 → 0.7.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/README.md +191 -18
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/application/application.d.ts +10 -0
- package/dist/application/application.js +20 -0
- package/dist/application/document-code-bindings.d.ts +11 -0
- package/dist/application/document-code-bindings.js +25 -0
- package/dist/application/document-obligations.d.ts +8 -0
- package/dist/application/document-obligations.js +11 -0
- package/dist/application/draft-facts.d.ts +3 -0
- package/dist/application/draft-facts.js +37 -0
- package/dist/application/extraction-identity.d.ts +2 -2
- package/dist/application/extraction-identity.js +7 -1
- package/dist/application/extractor-results.d.ts +6 -0
- package/dist/application/extractor-results.js +6 -0
- package/dist/application/hydrator.js +38 -18
- package/dist/application/mapping-proposals.d.ts +108 -0
- package/dist/application/mapping-proposals.js +142 -0
- package/dist/application/mapping-service.d.ts +2 -0
- package/dist/application/mapping-service.js +5 -0
- package/dist/application/overlay.js +43 -29
- package/dist/application/saved-code-coverage.d.ts +40 -0
- package/dist/application/saved-code-coverage.js +20 -0
- package/dist/application/saved-compatibility.d.ts +38 -0
- package/dist/application/saved-compatibility.js +20 -0
- package/dist/application/saved-evidence.d.ts +17 -11
- package/dist/application/saved-evidence.js +44 -40
- package/dist/application/saved-exploration.d.ts +57 -0
- package/dist/application/saved-exploration.js +21 -0
- package/dist/application/saved-paths.d.ts +58 -0
- package/dist/application/saved-paths.js +20 -0
- package/dist/application/semantic-run.d.ts +1 -1
- package/dist/extraction/call-syntax.d.ts +18 -0
- package/dist/extraction/call-syntax.js +61 -0
- package/dist/extraction/canonical-document-links.d.ts +5 -1
- package/dist/extraction/canonical-document-links.js +4 -4
- package/dist/extraction/code-inventory.d.ts +6 -0
- package/dist/extraction/code-inventory.js +26 -0
- package/dist/extraction/document-code-bindings.d.ts +14 -0
- package/dist/extraction/document-code-bindings.js +121 -0
- package/dist/extraction/document-obligations.d.ts +12 -0
- package/dist/extraction/document-obligations.js +112 -0
- package/dist/extraction/mapping-candidates.d.ts +13 -0
- package/dist/extraction/mapping-candidates.js +46 -0
- package/dist/extraction/mapping-output.d.ts +75 -0
- package/dist/extraction/mapping-output.js +53 -0
- package/dist/extraction/mapping-plan.d.ts +7 -0
- package/dist/extraction/mapping-plan.js +117 -0
- package/dist/extraction/mapping-prompt.d.ts +2 -0
- package/dist/extraction/mapping-prompt.js +17 -0
- package/dist/extraction/mapping-provider.d.ts +15 -0
- package/dist/extraction/mapping-provider.js +60 -0
- package/dist/extraction/mapping-request.d.ts +3 -0
- package/dist/extraction/mapping-request.js +32 -0
- package/dist/extraction/ontology.d.ts +2 -0
- package/dist/extraction/ontology.js +28 -13
- package/dist/extraction/routing.js +5 -20
- package/dist/extraction/scip-occurrences.d.ts +3 -0
- package/dist/extraction/scip-occurrences.js +102 -0
- package/dist/extraction/scip-ranges.d.ts +6 -0
- package/dist/extraction/scip-ranges.js +31 -0
- package/dist/extraction/scip-runtime.d.ts +39 -0
- package/dist/extraction/scip-runtime.js +8 -0
- package/dist/extraction/scip-symbols.d.ts +21 -0
- package/dist/extraction/scip-symbols.js +91 -0
- package/dist/extraction/semantic.d.ts +1 -1
- package/dist/extraction/semantic.js +5 -17
- package/dist/extraction/static-calls.d.ts +10 -0
- package/dist/extraction/static-calls.js +133 -0
- package/dist/extraction/static.d.ts +3 -20
- package/dist/extraction/static.js +8 -84
- package/dist/extraction/symbol-resolution.d.ts +12 -0
- package/dist/extraction/symbol-resolution.js +51 -0
- package/dist/extraction/symbol-selectors.d.ts +11 -0
- package/dist/extraction/symbol-selectors.js +51 -0
- package/dist/graph/binding-rdf.d.ts +7 -0
- package/dist/graph/binding-rdf.js +109 -0
- package/dist/graph/call-rdf.d.ts +4 -0
- package/dist/graph/call-rdf.js +94 -0
- package/dist/graph/call-shapes.d.ts +2 -0
- package/dist/graph/call-shapes.js +28 -0
- package/dist/graph/code-coverage-projection.d.ts +9 -0
- package/dist/graph/code-coverage-projection.js +117 -0
- package/dist/graph/code-coverage-renderer.d.ts +2 -0
- package/dist/graph/code-coverage-renderer.js +15 -0
- package/dist/graph/code-coverage-request.d.ts +6 -0
- package/dist/graph/code-coverage-request.js +19 -0
- package/dist/graph/code-coverage.d.ts +6 -0
- package/dist/graph/code-coverage.js +54 -0
- package/dist/graph/code-description.d.ts +4 -0
- package/dist/graph/code-description.js +24 -0
- package/dist/graph/code-rdf.d.ts +6 -0
- package/dist/graph/code-rdf.js +79 -0
- package/dist/graph/compatibility-context.d.ts +2 -0
- package/dist/graph/compatibility-context.js +18 -0
- package/dist/graph/compatibility-renderer.d.ts +2 -0
- package/dist/graph/compatibility-renderer.js +45 -0
- package/dist/graph/compatibility-request.d.ts +3 -0
- package/dist/graph/compatibility-request.js +18 -0
- package/dist/graph/compatibility.d.ts +7 -0
- package/dist/graph/compatibility.js +67 -0
- package/dist/graph/constraint-comparison.d.ts +7 -0
- package/dist/graph/constraint-comparison.js +49 -0
- package/dist/graph/coverage.d.ts +2 -2
- package/dist/graph/coverage.js +8 -3
- package/dist/graph/diagnostics.d.ts +1 -1
- package/dist/graph/diagnostics.js +10 -6
- package/dist/graph/evidence-description.d.ts +3 -0
- package/dist/graph/evidence-description.js +13 -0
- package/dist/graph/identity-preflight.js +1 -1
- package/dist/graph/neighborhood-renderer.d.ts +2 -0
- package/dist/graph/neighborhood-renderer.js +38 -0
- package/dist/graph/neighborhood-request.d.ts +9 -0
- package/dist/graph/neighborhood-request.js +37 -0
- package/dist/graph/neighborhood.d.ts +8 -0
- package/dist/graph/neighborhood.js +100 -0
- package/dist/graph/obligation-rdf.d.ts +5 -0
- package/dist/graph/obligation-rdf.js +67 -0
- package/dist/graph/obligation-shapes.d.ts +2 -0
- package/dist/graph/obligation-shapes.js +32 -0
- package/dist/graph/partitioned-shacl.d.ts +14 -0
- package/dist/graph/partitioned-shacl.js +66 -0
- package/dist/graph/path-request.d.ts +11 -0
- package/dist/graph/path-request.js +24 -0
- package/dist/graph/path-search.d.ts +45 -0
- package/dist/graph/path-search.js +101 -0
- package/dist/graph/paths-renderer.d.ts +2 -0
- package/dist/graph/paths-renderer.js +36 -0
- package/dist/graph/paths.d.ts +7 -0
- package/dist/graph/paths.js +74 -0
- package/dist/graph/query.js +23 -6
- package/dist/graph/rdf-partitions.d.ts +24 -0
- package/dist/graph/rdf-partitions.js +170 -0
- package/dist/graph/rdf-projection.d.ts +7 -0
- package/dist/graph/rdf-projection.js +27 -0
- package/dist/graph/rdf-records.d.ts +12 -0
- package/dist/graph/rdf-records.js +90 -0
- package/dist/graph/rdf.d.ts +10 -10
- package/dist/graph/rdf.js +84 -89
- package/dist/graph/shacl-shapes.js +70 -0
- package/dist/graph/snapshot-context.d.ts +3 -0
- package/dist/graph/snapshot-context.js +8 -0
- package/dist/graph/validation-progress.d.ts +4 -1
- package/dist/index.d.ts +23 -0
- package/dist/index.js +22 -0
- package/dist/infrastructure/json-digest.d.ts +3 -0
- package/dist/infrastructure/json-digest.js +3 -0
- package/dist/infrastructure/unique-json.d.ts +2 -0
- package/dist/infrastructure/unique-json.js +20 -0
- package/dist/interfaces/cli.js +33 -1
- package/dist/interfaces/code-coverage.d.ts +46 -0
- package/dist/interfaces/code-coverage.js +18 -0
- package/dist/interfaces/graph-compatibility.d.ts +35 -0
- package/dist/interfaces/graph-compatibility.js +21 -0
- package/dist/interfaces/graph-exploration.d.ts +59 -0
- package/dist/interfaces/graph-exploration.js +27 -0
- package/dist/interfaces/graph-paths.d.ts +77 -0
- package/dist/interfaces/graph-paths.js +31 -0
- package/dist/interfaces/graph-query-args.d.ts +2 -0
- package/dist/interfaces/graph-query-args.js +25 -0
- package/dist/interfaces/mapping-proposals.d.ts +204 -0
- package/dist/interfaces/mapping-proposals.js +74 -0
- package/dist/interfaces/mcp.js +31 -3
- package/dist/storage/mapping-proposals.d.ts +9 -0
- package/dist/storage/mapping-proposals.js +42 -0
- package/dist/storage/storage.d.ts +3 -0
- package/dist/storage/storage.js +37 -13
- package/dist/storage/streaming-json.d.ts +5 -0
- package/dist/storage/streaming-json.js +45 -0
- package/dist/visualization/evidence-sources.d.ts +6 -0
- package/dist/visualization/evidence-sources.js +19 -0
- package/dist/visualization/viewer-interaction.d.ts +5 -8
- package/dist/visualization/viewer-interaction.js +46 -44
- package/dist/visualization/visualization.js +14 -5
- package/docs/1.0-WORK-QUEUE.md +48 -0
- package/docs/ADR-029-exact-graph-neighborhoods.md +70 -0
- package/docs/ADR-030-bounded-evidence-paths.md +97 -0
- package/docs/ADR-031-code-extractor-selection.md +91 -0
- package/docs/ADR-032-scip-code-evidence.md +73 -0
- package/docs/ADR-033-document-symbol-bindings.md +83 -0
- package/docs/ADR-034-mapping-gaps.md +80 -0
- package/docs/ADR-035-static-call-evidence.md +78 -0
- package/docs/ADR-036-contract-obligation-declarations.md +124 -0
- package/docs/ADR-037-selected-contract-compatibility.md +93 -0
- package/docs/ADR-038-monorepo-code-coverage.md +105 -0
- package/docs/ADR-039-mapping-proposals.md +119 -0
- package/docs/ADR-040-bounded-graph-io.md +90 -0
- package/docs/GRAPHIFY-EVALUATION.md +21 -4
- package/docs/PRE-1.0-BASELINE.md +49 -2
- package/docs/RELEASE-1.0-PLAN.md +14 -2
- package/docs/RELEASING.md +3 -3
- package/docs/ROADMAP.md +27 -6
- package/docs/VALIDATION.md +521 -14
- package/docs/benchmarks/large-graph-2026-11-02/result.json +156 -0
- package/docs/extraction-manifest.json +266 -23
- package/package.json +10 -4
- package/templates/context-graph-development/SKILL.md +30 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# ADR 036: Cited producer and consumer obligations
|
|
2
|
+
|
|
3
|
+
Status: B4a implemented; validation recorded separately. B4b follows in [ADR 037](ADR-037-selected-contract-compatibility.md).
|
|
4
|
+
|
|
5
|
+
## Scope and choice
|
|
6
|
+
|
|
7
|
+
Free-text `governedBy` assertions and explicit routing declarations already preserve business
|
|
8
|
+
rules and asynchronous handoffs. They do not provide structured fields for comparing the two
|
|
9
|
+
sides. B4a adds an optional deterministic declaration in selected Markdown, using existing
|
|
10
|
+
`emits` and `consumes` relations to a shared Contract node. This is an exact opt-in path;
|
|
11
|
+
ordinary prose remains available through existing semantic extraction. No new model prompt,
|
|
12
|
+
provider schema or semantic artifact identity is introduced. Automatic conversion of prose
|
|
13
|
+
into these declarations is not implemented or claimed.
|
|
14
|
+
|
|
15
|
+
Use one JSON object in a `weftlet-obligation` fenced block:
|
|
16
|
+
|
|
17
|
+
```weftlet-obligation
|
|
18
|
+
{
|
|
19
|
+
"schemaVersion": 1,
|
|
20
|
+
"id": "execution-age",
|
|
21
|
+
"role": "requirement",
|
|
22
|
+
"endpoint": "services/execution/src/execute.ts",
|
|
23
|
+
"contract": {
|
|
24
|
+
"scope": "readings",
|
|
25
|
+
"id": "stored-reading",
|
|
26
|
+
"kind": "stored-data",
|
|
27
|
+
"version": "1"
|
|
28
|
+
},
|
|
29
|
+
"statement": "Execution revalidates reading age immediately before use.",
|
|
30
|
+
"domain": "sensors",
|
|
31
|
+
"stage": "execution",
|
|
32
|
+
"constraint": {
|
|
33
|
+
"metric": "reading-age",
|
|
34
|
+
"operator": "at-most",
|
|
35
|
+
"value": 60,
|
|
36
|
+
"unit": "seconds"
|
|
37
|
+
},
|
|
38
|
+
"revalidation": "required"
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Required fields are schemaVersion, id, role, endpoint, contract and statement. Role is
|
|
43
|
+
`guarantee` (producer) or `requirement` (consumer); transport kind is `queue` or `stored-data`.
|
|
44
|
+
Domain, stage, contract version, constraint and consumer revalidation are optional. A constraint
|
|
45
|
+
requires a metric, finite numeric value and operator (`at-most`, `at-least`, `equal`); its unit
|
|
46
|
+
may be unknown. Revalidation accepts `required` or `not-required` on consumers only. Omitted
|
|
47
|
+
values stay absent in JSON/RDF and display as unknown. No default time unit, normalization,
|
|
48
|
+
semantic equivalence, unit conversion or compatibility interpretation is performed.
|
|
49
|
+
|
|
50
|
+
The endpoint is an exact repository-relative regular committed UTF-8 file. Its canonical physical
|
|
51
|
+
kind is retained, including Evidence for test/spec files. Existing indexed facts let agents
|
|
52
|
+
continue into code, but the declaration establishes neither a particular function mapping nor
|
|
53
|
+
implementation correctness. Function-level mappings remain the explicit selectors in ADR 033.
|
|
54
|
+
|
|
55
|
+
## Identity and authority
|
|
56
|
+
|
|
57
|
+
Contract identity hashes repository ID, exact scope, contract ID, transport kind and version.
|
|
58
|
+
Labels, endpoint paths and statement wording do not determine this identity. Missing version is
|
|
59
|
+
unknown and does not join a named version. The namespace is explicit; equal names across scopes,
|
|
60
|
+
repositories, transports or versions never imply a shared contract. Domain is a cited descriptive
|
|
61
|
+
field, not an implicit identity override: contradictory descriptions are retained for review.
|
|
62
|
+
|
|
63
|
+
`GraphFact.contractObligation` retains the complete typed declaration and endpoint source
|
|
64
|
+
path/digest/SHA. Main provenance cites the exact Markdown fence in the original committed bytes.
|
|
65
|
+
The assertion has inferred authority and deterministic extraction review. Configured source
|
|
66
|
+
approval, role and traversal ownership metadata remain independent. Deterministic parsing is not
|
|
67
|
+
an approval process. Plans and unclassified documents cannot silently become approved intent.
|
|
68
|
+
Validation documents are excluded from obligation assertions with a cited diagnostic, including
|
|
69
|
+
directly selected evidence-root documents without traversal.
|
|
70
|
+
|
|
71
|
+
Both sides connect through the contract, independently of imports, calls or a particular queue
|
|
72
|
+
library. This is documented dependency evidence, not observed message delivery, shared storage
|
|
73
|
+
access or proof of fulfillment. Existing runtime evidence remains separately authoritative for
|
|
74
|
+
what was observed. Different limits at different stages are not automatically contradictions.
|
|
75
|
+
|
|
76
|
+
## Integrity, bounds and lifecycle
|
|
77
|
+
|
|
78
|
+
Unknown fields, duplicate JSON keys, invalid paths, nonfinite values and unsupported enums
|
|
79
|
+
produce cited extraction gaps with no partial declaration. Missing, symlink or submodule
|
|
80
|
+
endpoints cannot create joins. Duplicate declaration IDs within a source retain every valid
|
|
81
|
+
assertion and report ambiguity; no assertion silently wins. Document and endpoint text must
|
|
82
|
+
reproduce the committed Git blob ID, rejecting lossy non-UTF-8 decoding before citing its digest.
|
|
83
|
+
Contracts with only one role in
|
|
84
|
+
the selected structured declarations report the missing counterpart without claiming repository-
|
|
85
|
+
wide absence. No text matching or implied route fills those gaps.
|
|
86
|
+
|
|
87
|
+
Extraction uses already selected committed sources, including traversal-read validation docs
|
|
88
|
+
solely to report exclusions. It performs no provider call. Each block is limited to 64 KiB;
|
|
89
|
+
overlong blocks report a gap. More than 500 blocks abort extraction before provider/indexer work
|
|
90
|
+
instead of publishing a silently truncated set. Existing document-selection budgets still apply.
|
|
91
|
+
|
|
92
|
+
RDF exposes each field on its cited assertion record. SHACL checks obligation-specific cardinality,
|
|
93
|
+
types, roles, metadata and authority without adding a broad per-fact disjunction. Deterministic
|
|
94
|
+
integrity checks require canonical contract/endpoint identities, role/predicate agreement, matching
|
|
95
|
+
endpoint/document revision and separate implementation evidence. Shared SPARQL, neighborhoods,
|
|
96
|
+
paths, impact queries, Markdown and viewer details read these same facts. SHACL checks structure;
|
|
97
|
+
it does not establish business compatibility.
|
|
98
|
+
|
|
99
|
+
Assembly advances from 10 to 11 and records `document-obligation-extractor@1.0.0`. Historical
|
|
100
|
+
snapshots remain readable but are not compatible with current validation until refreshed.
|
|
101
|
+
Unchanged semantic artifacts remain reusable. Clean hydration reproduces declarations. Full
|
|
102
|
+
RDF/SHACL validation is retained; this is not incremental validation or a new graph backend.
|
|
103
|
+
|
|
104
|
+
Overlays re-read declarations from captured draft bytes and replace prior obligation facts.
|
|
105
|
+
Document/endpoint edits, deletes and renames regenerate or invalidate joins. All draft assertions
|
|
106
|
+
and endpoint citations use the base SHA plus draft content digests, not disposable checkout SHAs.
|
|
107
|
+
Known endpoint paths are included in capture; newly declared endpoints outside captured scope
|
|
108
|
+
require configured scope before rebuilding. Saved committed evidence remains unchanged.
|
|
109
|
+
|
|
110
|
+
## Acceptance and remaining work
|
|
111
|
+
|
|
112
|
+
The independent public fixture covers stored-data and queue producers/consumers with actual
|
|
113
|
+
TypeScript indexing, both freshness limits, missing fields, missing endpoints, unrelated same-name
|
|
114
|
+
domains, unknown versions and test-file classification. It exercises bounded agent queries,
|
|
115
|
+
SPARQL/projection parity, strict named/union SHACL, corruption negatives, unchanged semantic reuse,
|
|
116
|
+
clean comparison, dirty queries and renamed/deleted draft declarations. An empty offline provider
|
|
117
|
+
is deliberate: these structured assertions must come from the real declaration extractor.
|
|
118
|
+
Fresh packed-consumer smoke uses the exported API and installed runtime assets.
|
|
119
|
+
|
|
120
|
+
B4b's bounded compatibility acceptance is implemented in [ADR 037](ADR-037-selected-contract-compatibility.md),
|
|
121
|
+
including consumer revalidation, an explicit documented incompatibility and missing evidence. Any hard failure must come from an
|
|
122
|
+
explicit approved deterministic policy; model findings remain tentative. No such policy or gate
|
|
123
|
+
is introduced here. Live model quality, private consumer usefulness and browser interaction remain
|
|
124
|
+
separate evidence. Release PR stays open until candidate qualification.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# ADR 037: Advisory comparison of selected contract constraints
|
|
2
|
+
|
|
3
|
+
Status: implemented for the next candidate, 2026-10-30. Qualification and live usefulness remain B6.
|
|
4
|
+
|
|
5
|
+
## Problem and decision
|
|
6
|
+
|
|
7
|
+
[Explicit obligations](ADR-036-contract-obligation-declarations.md) retain both sides of a queue
|
|
8
|
+
or stored-data boundary. A graph connection alone cannot establish that their rules agree.
|
|
9
|
+
Add `graph.compatibility`, a read-only comparison of two exact saved assertion IDs, shared by
|
|
10
|
+
the public API, CLI and MCP. Discover the IDs through `impact.scan` or `graph.neighbors`.
|
|
11
|
+
This is a bounded numeric assessment of declarations, separate from code fulfillment, source
|
|
12
|
+
approval, runtime delivery and deterministic architecture policy. It never returns a CI pass/fail.
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
weftlet graph compatibility --snapshot <id> --producer-fact <fact-id> --consumer-fact <fact-id> --json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
MCP fields are `snapshotId`, `producerFactId`, `consumerFactId`. The public
|
|
19
|
+
`SnapshotContractCompatibilityService` accepts a snapshot reader and exposes `assess(request)`.
|
|
20
|
+
The application wrapper adds current checkout/configuration/overlay evidence state. The raw
|
|
21
|
+
service has no checkout knowledge; its `evidenceState` is absent. Neither reads a mutable head,
|
|
22
|
+
hydrates, invokes a model/indexer, changes a snapshot, or promotes historical evidence into a
|
|
23
|
+
current-diff result. Missing storage/invalid snapshot identity is an error; missing assertions
|
|
24
|
+
within a readable snapshot produce `unknown` with any surviving evidence retained.
|
|
25
|
+
|
|
26
|
+
## Numeric meaning
|
|
27
|
+
|
|
28
|
+
The two assertions must be a producer `guarantee` and consumer `requirement` on the same exact
|
|
29
|
+
repository/scoped/transport/versioned contract. Known matching domain, metric and unit are
|
|
30
|
+
required. Missing units or versions are unknown, including two absent versions. No conversion,
|
|
31
|
+
name-based equivalence, implicit ownership, elapsed-time model or data transformation is inferred.
|
|
32
|
+
Limits are JSON/JavaScript numbers, finite and no larger in magnitude than `MAX_SAFE_INTEGER`;
|
|
33
|
+
comparisons use their represented values, without claiming arbitrary decimal precision.
|
|
34
|
+
|
|
35
|
+
At a shared explicit measurement stage, `at-most`, `at-least` and `equal` define inclusive
|
|
36
|
+
half-lines or singleton sets. These are statements about allowed values, not observed values.
|
|
37
|
+
|
|
38
|
+
| Result | Meaning |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `compatible-constraints` | Producer's allowed set is a subset of the consumer's set at the same stage. |
|
|
41
|
+
| `insufficient-guarantee` | Sets overlap, but the producer permits some values the consumer rejects. This is not a contradiction. |
|
|
42
|
+
| `disjoint-constraints` | No untransformed value at that same stage satisfies both declarations. This is a documented range incompatibility, not proof of a product violation. |
|
|
43
|
+
| `revalidation-required` | Different stages or an overlapping insufficient guarantee, with explicit required consumer revalidation. Inspect the check and rejection behavior; its implementation is not inferred. |
|
|
44
|
+
| `unknown` | Missing assertions/context, unrelated contracts, unmatched domains/metrics/units, unsupported numbers, competing declarations or relevant extraction gaps prevent this assessment. |
|
|
45
|
+
|
|
46
|
+
For example, collection allows readings up to 600 seconds old; execution requires at most 60
|
|
47
|
+
seconds and explicitly revalidates. Different measurement stages prevent a direct contradiction
|
|
48
|
+
claim. The fixture executes a consumer freshness check separately and retrieves its indexed
|
|
49
|
+
implementation/test references; the assessment still says `fulfillment: not-evaluated`. It does
|
|
50
|
+
not prove eventual delivery, successful execution or availability when stale records are rejected.
|
|
51
|
+
A same-stage producer minimum of 120 seconds versus a consumer maximum of 60 is disjoint,
|
|
52
|
+
even if revalidation is required: no *same untransformed accepted value* satisfies both.
|
|
53
|
+
|
|
54
|
+
## Evidence and bounds
|
|
55
|
+
|
|
56
|
+
Responses retain at most the two selected facts unchanged, including source/endpoint citations,
|
|
57
|
+
commit, digests, statement, approval and review metadata. Assessment authority is inferred,
|
|
58
|
+
or draft when a selected fact is draft; `gateEligible` is always false. Shared returned-page
|
|
59
|
+
coverage describes only those assertions. The contract and endpoint IDs support further
|
|
60
|
+
neighborhood exploration to implementations, tests and other business declarations.
|
|
61
|
+
|
|
62
|
+
The service uses the lossless RDF fact projection shared by other queries. It scans saved facts
|
|
63
|
+
for competing declarations of the same endpoint/role/domain/stage/metric, conservatively choosing
|
|
64
|
+
no winner even if duplicate limits agree. At most 20 competing IDs are returned, with total and
|
|
65
|
+
omitted counts; exact contract neighborhoods provide cited continuation. There is no all-pairs
|
|
66
|
+
Cartesian scan. Projection/context work still scales with the saved graph; this is not an indexed
|
|
67
|
+
incremental graph database or a large private-workload performance claim.
|
|
68
|
+
|
|
69
|
+
Structural validation is restricted to the selected two records on reads, retaining strict
|
|
70
|
+
SHACL and obligation identity/provenance checks. Hydration still validates the complete graph
|
|
71
|
+
before publication. Relevant intent/ambiguity/implementation gaps block a numeric verdict;
|
|
72
|
+
runtime gaps remain visible because runtime fulfillment is never evaluated. This does not claim
|
|
73
|
+
all omitted documents are complete. Old snapshots, configuration changes and draft overlays stay
|
|
74
|
+
explicit and ineligible for current-diff validation.
|
|
75
|
+
|
|
76
|
+
This query-only increment leaves assembly 11, the obligation extractor identity, provider,
|
|
77
|
+
prompt and semantic cache unchanged. No graph migration or cache invalidation is needed.
|
|
78
|
+
|
|
79
|
+
## Acceptance and remaining scope
|
|
80
|
+
|
|
81
|
+
[The public protocol](../evaluations/contract-compatibility/README.md) declares source cases,
|
|
82
|
+
expected outcomes and query bounds before execution. Actual committed Markdown extraction,
|
|
83
|
+
real SCIP, RDF/SHACL, impact → neighborhood → pair comparison → symbol/test retrieval, strict
|
|
84
|
+
authority/provenance negatives, shared API/CLI/MCP, saved dirty queries, repeat cache reuse and
|
|
85
|
+
draft rename/delete invalidation are exercised. A finite-set oracle checks all 81 combinations
|
|
86
|
+
of the three operators and three boundary values. Fresh packed-consumer smoke checks the public
|
|
87
|
+
service, installed MCP discovery and honest unknown/missing-snapshot handling.
|
|
88
|
+
|
|
89
|
+
This covers explicit structured numeric obligations only. Free-form logical reconciliation,
|
|
90
|
+
automated inference/approval, multiple-property satisfiability, formal temporal compatibility,
|
|
91
|
+
product-wide guarantees and approval/backfill UI remain outside this increment. Hard gates
|
|
92
|
+
still require explicit approved deterministic policy; a model suggestion is not such a policy.
|
|
93
|
+
See [validation](VALIDATION.md) and the [remaining queue](1.0-WORK-QUEUE.md).
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# ADR 038: Saved source selection and monorepo coverage
|
|
2
|
+
|
|
3
|
+
Status: implemented for the next candidate, 2026-10-30. Live consumer acceptance remains B6.
|
|
4
|
+
|
|
5
|
+
## Problem and decision
|
|
6
|
+
|
|
7
|
+
Returned-page relationship counts cannot tell an agent whether a service was omitted from
|
|
8
|
+
indexing. Preserve those existing counts and add a separate saved-snapshot code coverage
|
|
9
|
+
overview, plus `graph.coverage` to page package boundaries and their files through the shared
|
|
10
|
+
API, CLI and MCP. Measure actual inputs and outputs; do not equate omitted evidence, absent
|
|
11
|
+
resolution or zero observed connections with zero business impact.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
weftlet graph coverage --snapshot <id> --max-items 20 --json
|
|
15
|
+
weftlet graph coverage --snapshot <id> --project services/api --max-items 50 --json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
MCP takes `snapshotId`, optional exact `projectRoot`, `maxItems` (1–200, default 50) and
|
|
19
|
+
`continuation`. Omit the project to page boundaries; select a returned root to page its files.
|
|
20
|
+
The root fallback is `.`. Continuations bind the exact snapshot manifest, retained facts,
|
|
21
|
+
diagnostics, view and page size. Responses include offset, totals, remaining count and explicit
|
|
22
|
+
continuation. An absent requested project is distinct from an unknown legacy inventory.
|
|
23
|
+
`SnapshotCodeCoverageService` and `projectCodeCoverage` are public exports; the application
|
|
24
|
+
wrapper supplies current checkout/configuration/overlay evidence state. Reads never hydrate
|
|
25
|
+
or call providers/indexers, and never establish current-diff eligibility.
|
|
26
|
+
|
|
27
|
+
## What is measured
|
|
28
|
+
|
|
29
|
+
Assembly records `codeInventory`, version `committed-code-inventory-v1`, with its own content
|
|
30
|
+
digest and the normalized SCIP artifact digest. It enumerates regular committed `.ts`, `.tsx`,
|
|
31
|
+
`.mts` and `.cts` files (including declaration/test files), exact Git blob identities and nearest
|
|
32
|
+
regular `package.json` path boundaries. It reads tree metadata, not package contents, dependency
|
|
33
|
+
installations or active checkout files. The boundary is a physical grouping, not inferred PNPM
|
|
34
|
+
workspace membership, a compiler project, an architectural domain or approved ownership.
|
|
35
|
+
Non-TypeScript projects are outside the counted source universe; a boundary with no such files
|
|
36
|
+
is visible without claiming its implementation is covered. Nonregular entries are excluded.
|
|
37
|
+
|
|
38
|
+
For each file, three independent fields are retained:
|
|
39
|
+
|
|
40
|
+
- `codeRootSelected`: selected by the existing repository file extractor's Git path selection.
|
|
41
|
+
- `requested`: included/excluded entry selection for `scip.sourceProject.include`; `unknown`
|
|
42
|
+
for other indexer commands. We do not reinterpret arbitrary tsconfigs or shell arguments.
|
|
43
|
+
- `indexed`: actual presence in the normalized SCIP document list, including empty documents,
|
|
44
|
+
if emitted. An indexer result without document observations leaves it unknown. A fact count
|
|
45
|
+
never substitutes for this observation.
|
|
46
|
+
|
|
47
|
+
The public source-project probe demonstrates that an imported file can be resolvable by the
|
|
48
|
+
TypeScript compiler but absent from SCIP documents when it was not an entry. Selecting a
|
|
49
|
+
directory in `codeRoots` does not automatically add it to SCIP's `include`. The report exposes
|
|
50
|
+
the omitted file and references without an indexed definition. Configure the intended source
|
|
51
|
+
entries/aliases explicitly, then refresh. `indexedOutsideRequest` also handles observed extra
|
|
52
|
+
documents from other invocations; it is not a promise of automatic transitive inclusion.
|
|
53
|
+
`otherIndexedFiles` reports observations outside this TypeScript inventory without pretending
|
|
54
|
+
those languages have the same coverage contract.
|
|
55
|
+
|
|
56
|
+
## Connections and uncertainty
|
|
57
|
+
|
|
58
|
+
Coverage derives code connections from retained occurrence facts: a reference's exact symbol
|
|
59
|
+
ID is joined to its indexed definition file(s), then to recorded package boundaries. Repeated
|
|
60
|
+
sites remain distinct; duplicate fact IDs do not inflate reference counts. Project rows expose
|
|
61
|
+
incoming/outgoing reference counts and distinct connected boundary counts. File rows expose
|
|
62
|
+
reference counts, missing indexed definitions, declaration-only targets and cited implementation
|
|
63
|
+
gap counts. File node IDs support follow-up through `graph.neighbors` to exact symbols/citations.
|
|
64
|
+
|
|
65
|
+
These are code-reference measurements. They do not replace queue/stored-data product links,
|
|
66
|
+
prove calls ran, or establish compatibility/fulfillment. A declaration-only external target is
|
|
67
|
+
not an implementation body. Unresolved external calls retain the existing extraction diagnostics;
|
|
68
|
+
not every missing dynamic/type/module relationship can be observed. Zero gaps or connections
|
|
69
|
+
cannot certify completeness, isolation or no impact.
|
|
70
|
+
|
|
71
|
+
The full stored inventory and the same retained facts supply the public query, ordinary impact/
|
|
72
|
+
neighborhood/path/compatibility overview, and viewer text. RDF projection equivalence is tested;
|
|
73
|
+
no separate graph topology or guessed cross-service edge is introduced. `coverage.code.scope`
|
|
74
|
+
is `saved-snapshot`; existing lane counts remain `returned-page`. Overview has no file list,
|
|
75
|
+
keeping ordinary agent responses bounded. Detailed package/file lists are paginated separately.
|
|
76
|
+
Projection work still scans the saved inventory and facts, not an incremental graph database.
|
|
77
|
+
|
|
78
|
+
## Snapshot lifecycle
|
|
79
|
+
|
|
80
|
+
Assembly advances from 11 to 12. Inventory participates in committed and overlay content digests.
|
|
81
|
+
Draft inventory is rebuilt from the isolated captured tree; Git blob identities are content-based,
|
|
82
|
+
and the overlay manifest supplies base SHA/capture identity. Overlays record their actual SCIP
|
|
83
|
+
digest rather than inheriting the committed artifact's digest. Edits outside captured scope stay
|
|
84
|
+
excluded through the existing evidence-state contract. Historical snapshots remain readable;
|
|
85
|
+
absent inventory is `unavailable`, not zero. Unsupported version/digest mismatches are
|
|
86
|
+
`invalid-inventory`, without fabricated counts. Inventory digests detect mismatches, not signed
|
|
87
|
+
attestation or complete validation of arbitrary hand-edited snapshot JSON.
|
|
88
|
+
|
|
89
|
+
Provider/prompt/cache identity remains unchanged, so unchanged semantic artifacts can be reused.
|
|
90
|
+
The query adds no model calls, hard gates, dependencies, workspace builds or application changes.
|
|
91
|
+
|
|
92
|
+
## Acceptance and remaining scope
|
|
93
|
+
|
|
94
|
+
[The public fixture](../evaluations/monorepo-coverage/README.md) covers actual committed multi-package
|
|
95
|
+
TypeScript/TSX, aliases/barrels, an independent service, an omitted service, declaration-only and
|
|
96
|
+
unresolved external targets, selected-but-unindexed files and empty sources. Tests compare raw
|
|
97
|
+
SCIP documents, RDF facts and coverage; follow exact paginated boundaries/files; preserve unknown
|
|
98
|
+
legacy state; and verify unchanged reuse/clean comparison, dirty unavailable-provider queries,
|
|
99
|
+
CLI/MCP equivalence, rename/delete overlays, changed selection and immutable historical results.
|
|
100
|
+
Packed installation exercises the exported API and installed CLI/MCP. Supported platform results
|
|
101
|
+
are recorded in [validation](VALIDATION.md) and the change PR.
|
|
102
|
+
|
|
103
|
+
This closes the bounded B5 implementation, not live product acceptance. Arbitrary compiler-project
|
|
104
|
+
discovery, other language indexing, cross-repository federation, B3b's inference decision and B6's
|
|
105
|
+
candidate/usefulness evaluation retain their separate scope.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# ADR 039: Opt-in, unreviewed rule-to-function proposals
|
|
2
|
+
|
|
3
|
+
Status: implementation and public protocol prepared, November 2, 2026. The maintainer authorized
|
|
4
|
+
the 0.7.0 acceptance release with live proposal validation tentative and deferred. Live model
|
|
5
|
+
accuracy and independent usefulness assessment remain unproven.
|
|
6
|
+
|
|
7
|
+
## Decision and scope
|
|
8
|
+
|
|
9
|
+
The maintainer accepted the bounded inference recommendation after ADR 034's deterministic
|
|
10
|
+
assessment. Add an explicit proposal operation alongside saved graph evidence. It addresses
|
|
11
|
+
documented rules with file associations or document links but no exact symbol binding. It does
|
|
12
|
+
not generate missing intent, approve mappings, prove compliance, backfill documents, alter
|
|
13
|
+
semantic hydration or insert proposed relationships into the canonical graph.
|
|
14
|
+
|
|
15
|
+
One request chooses an exact saved snapshot, business rule ID, approved source document and
|
|
16
|
+
one to four already-linked files. Eligible business nodes are Invariant, Capability, Workflow
|
|
17
|
+
and Contract. A source must be declared, with intent role or legacy unspecified role; recorded
|
|
18
|
+
ownership must be resolved or not-required. Existing extracted subject assertions retain their
|
|
19
|
+
review state. Source approval never approves their interpretation or a proposed mapping.
|
|
20
|
+
|
|
21
|
+
The no-model plan checks existing explicit bindings, source intent/mapping diagnostics, recorded
|
|
22
|
+
code coverage, regular committed files, exact source digests/revisions and indexed callable name
|
|
23
|
+
occurrences. It rejects unknown/omitted indexing and ambiguous named callable identities. Syntax
|
|
24
|
+
must have an actual implementation body. Canonical test/spec file identities are validation
|
|
25
|
+
evidence and cannot be proposed as product implementations by this operation. Ambient declarations
|
|
26
|
+
and anonymous callables are counted as excluded; this increment does not invent identities for
|
|
27
|
+
them. Code is joined by exact indexed
|
|
28
|
+
positions, never label similarity. Co-location supplies candidate scope, not an implementation claim.
|
|
29
|
+
|
|
30
|
+
The selected source document and callable excerpts are read at the saved commit, independently
|
|
31
|
+
of the active checkout. An old snapshot can be used deliberately and remains labeled stale with
|
|
32
|
+
excluded working changes; it cannot pass current-diff validation. Draft-overlay proposal creation
|
|
33
|
+
is deferred because captured source bytes need a distinct durable input contract. Existing
|
|
34
|
+
overlay graphs remain queryable.
|
|
35
|
+
|
|
36
|
+
## Bounds and authority
|
|
37
|
+
|
|
38
|
+
Defaults: at most eight candidates, 32 KiB of prompt/schema input, and one provider request.
|
|
39
|
+
Explicit request ceilings are 20 candidates and 128 KiB input. There are at most five source reads,
|
|
40
|
+
each at most 1 MiB according to immutable Git tree metadata. A candidate/input overflow blocks
|
|
41
|
+
execution rather than selecting an unreported subset. The configured semantic timeout (up to
|
|
42
|
+
600000 ms) applies to the provider phase; mapping does not inherit semantic automatic retries.
|
|
43
|
+
Oversized previews bound retained candidate metadata and report observed/returned counts with
|
|
44
|
+
`candidateEnumeration.complete: false`; incomplete enumeration never runs a provider. Candidate
|
|
45
|
+
`excerptBytes` exposes a body that exceeds the input limit without retaining its oversized text.
|
|
46
|
+
For blocked plans, `inputBytes` counts only prepared input, not omitted candidate material.
|
|
47
|
+
These are request/byte/time bounds, not a token billing or dollar cap.
|
|
48
|
+
|
|
49
|
+
Provider output must select exact candidates and cite both the documented rule's supporting
|
|
50
|
+
source span and the candidate's implementation extent. Unknown/duplicate IDs, unsupported line
|
|
51
|
+
ranges, extra fields, invalid confidence and inconsistent proposal/abstention states fail before
|
|
52
|
+
storage. Model-reported confidence is uncalibrated. Structural citation validation cannot prove
|
|
53
|
+
the proposed interpretation is correct. Rationale and source text remain untrusted content.
|
|
54
|
+
|
|
55
|
+
The result is either a proposed set or an explicit abstention. Every saved result is permanently
|
|
56
|
+
`authority: inferred`, `extractionReview: unreviewed`, `establishesCompliance: false`. Original
|
|
57
|
+
subject/association facts and code-definition proofs are retained, including their independent
|
|
58
|
+
authority and provenance. No rule violation, test success, compatibility or approval is inferred.
|
|
59
|
+
|
|
60
|
+
## Provider, cache and failure contract
|
|
61
|
+
|
|
62
|
+
Use the existing Codex CLI authentication configuration: ChatGPT by default; API-key mode only
|
|
63
|
+
when explicitly configured. The runner is isolated, read-only, ephemeral, ignores user rules and
|
|
64
|
+
configuration, disables shell tools, and requires structured output. Authentication never falls
|
|
65
|
+
back to another billing mode. Fake-transport tests cover the invocation; live operation is a
|
|
66
|
+
separate validation. Module providers must explicitly export `createMappingProposalProvider`
|
|
67
|
+
with a matching configured identity and a `propose(input, { signal, timeoutMs })` method. The
|
|
68
|
+
semantic-provider interface alone does not qualify. Local modules are trusted code and must honor
|
|
69
|
+
abort signals, bound their own work, and keep input/credentials out of logs.
|
|
70
|
+
|
|
71
|
+
The outer deadline/cancellation race rejects uncooperative providers and prevents late results
|
|
72
|
+
from publication. Progress contains only phase, opaque operation ID and elapsed time. Unknown
|
|
73
|
+
provider errors never expose stderr/prompts. Publication after validation is a single atomic
|
|
74
|
+
commit point; cancelling after a completed publication does not erase a valid artifact.
|
|
75
|
+
|
|
76
|
+
Proposals use their own versioned identity and `artifacts/mapping-proposals` namespace. Keys bind
|
|
77
|
+
the exact saved snapshot/facts, requested scope/budgets, source input digest, provider/model and
|
|
78
|
+
reasoning configuration. Operational timeout/retry changes do not invalidate artifacts. Module
|
|
79
|
+
authors must version their identity when implementation or output-affecting configuration changes;
|
|
80
|
+
deadline/retry fields are operational under this contract. Identity
|
|
81
|
+
hashes use persisted JSON semantics so optional undefined fields survive a write/read round trip.
|
|
82
|
+
Input/plan/output checks run again on reuse; model/prompt/code/source changes require a new key.
|
|
83
|
+
This initial cache is conservative and snapshot-bound: it does not reuse across a new snapshot,
|
|
84
|
+
even when an unrelated file changed. No force overwrite or automatic baseline acceptance exists.
|
|
85
|
+
|
|
86
|
+
Bounded hash filenames and atomic hard-link publication preserve a concurrent winner. Concurrent
|
|
87
|
+
cache misses can each spend their independently authorized request; there is no cross-process
|
|
88
|
+
provider single-flight lock. Conflicting
|
|
89
|
+
outputs fail without overwriting it. Existing graph heads, snapshots and semantic artifacts are
|
|
90
|
+
unchanged. Saved proposal reads require neither provider initialization nor source re-extraction;
|
|
91
|
+
they bind the exact snapshot and report current evidence state. Integrity hashes detect mismatches,
|
|
92
|
+
not malicious rewriting of a local artifact and all its hashes.
|
|
93
|
+
|
|
94
|
+
## Interfaces and acceptance
|
|
95
|
+
|
|
96
|
+
`mappings plan --request request.json` previews scope, candidate proofs, exclusions, bytes,
|
|
97
|
+
cache identity, readiness and expected request count. `mappings propose --request request.json
|
|
98
|
+
--allow-model` explicitly permits one new request; a cache hit needs no model permission.
|
|
99
|
+
`mappings read --snapshot ID --key KEY` reads a saved result. CLI JSON is the shared API result.
|
|
100
|
+
MCP exposes only `mapping.plan` and `mapping.proposals`, both read-only and unable to spend model
|
|
101
|
+
requests. Follow returned exact symbol IDs through `graph.neighbors`/`graph.paths`. Normal graph
|
|
102
|
+
queries and the viewer do not silently acquire proposed edges.
|
|
103
|
+
|
|
104
|
+
Deterministic public tests cover real prose extraction/SCIP, misleading-name candidates,
|
|
105
|
+
cross-domain file rejection, declared versus unreviewed authority, citations, missing/omitted/
|
|
106
|
+
declaration-only code, budgets, model consent, reuse with unavailable provider and dirty checkout,
|
|
107
|
+
rename/delete invalidation, historical reads, timeout/cancellation and immutable concurrent writes.
|
|
108
|
+
Fresh packed installation exercises actual CLI/MCP and exported APIs with a visibly canned module.
|
|
109
|
+
No canned result is semantic-quality evidence.
|
|
110
|
+
|
|
111
|
+
[The predeclared live protocol](../evaluations/mapping-proposals/README.md) permits three bounded
|
|
112
|
+
public requests only after usage approval. It separates target accuracy, abstention, output
|
|
113
|
+
validity, infrastructure failure and independent rationale/usefulness review. On November 2,
|
|
114
|
+
the maintainer requested publication before live integration testing. This scoped deferral permits
|
|
115
|
+
the optional feature in the 0.7.0 acceptance candidate; it does not record a live proposal pass or
|
|
116
|
+
official 1.0 approval. Existing consumer Codex hydration validates the established extraction flow,
|
|
117
|
+
not this new proposal operation or its semantic accuracy. B6 still owns candidate hydration/repeat,
|
|
118
|
+
real agent usefulness and the final 1.0 decision. The public three-request protocol remains
|
|
119
|
+
available for later separately authorized evaluation; this release performs no model requests.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# ADR 040: Preserve evidence while removing whole-graph string and RDF copies
|
|
2
|
+
|
|
3
|
+
Status: implemented; public large-corpus lifecycle and hosted Linux/Windows checks pass.
|
|
4
|
+
Consumer acceptance remains open.
|
|
5
|
+
|
|
6
|
+
## Problem
|
|
7
|
+
|
|
8
|
+
The 0.7.0 consumer report reaches 561,777 facts / 174,710 nodes, reusing 18 semantic artifacts
|
|
9
|
+
without model calls, then fails at `sha256(stableJson(logical))`. Node's string ceiling is
|
|
10
|
+
536,870,888 UTF-16 code units; increasing the heap does not remove it. Snapshot JSON writing,
|
|
11
|
+
JSON reload and full RDF exports had similar allocations. The old internal SPARQL projection
|
|
12
|
+
also rejected more than 100,000 facts.
|
|
13
|
+
|
|
14
|
+
A generated public TypeScript corpus additionally demonstrated the memory cost of retaining a
|
|
15
|
+
full named N3 dataset and its validation union simultaneously. The fix must retain every assertion,
|
|
16
|
+
test fact, citation, confidence, authority and review state. It does not change extraction scope.
|
|
17
|
+
|
|
18
|
+
## Decision
|
|
19
|
+
|
|
20
|
+
- `stableJsonDigest` incrementally hashes the **existing encoding**, including sorted keys,
|
|
21
|
+
escaping, number formatting and legacy undefined-field behavior. `persistedJsonDigest` retains
|
|
22
|
+
the existing JSON-normalized digest contract. Neither is a new canonicalization standard.
|
|
23
|
+
- Stream ordinary snapshot/artifact JSON to exclusive temporary files, then publish with the
|
|
24
|
+
existing atomic hard-link/head replacement rules. Read JSON incrementally with a strict parser.
|
|
25
|
+
Header-only checks parse the complete document but retain only the manifest. Old files need no
|
|
26
|
+
migration and existing immutable winners are never rewritten.
|
|
27
|
+
- Stream default semantic N-Triples and optional openCAESAR file digests, preserving their existing
|
|
28
|
+
byte encodings and hashes. No Docker or provider is required to query saved evidence.
|
|
29
|
+
- Use one RDF encoder for named exports, SPARQL matching and validation partitions. RDF/JS matching
|
|
30
|
+
streams complete groups and indexes subject/graph lookups; Comunica remains the SPARQL engine.
|
|
31
|
+
Cardinalities are exact, never guessed for optimizer shortcuts. The traversal record projection
|
|
32
|
+
has equivalence tests against SPARQL, including duplicate-ID join multiplicity, and no graph-size
|
|
33
|
+
response cap. Public query result limits still report truncation.
|
|
34
|
+
- `serializeChunks()` / `serializeTo(writable)` export complete N-Quads with backpressure. The
|
|
35
|
+
legacy `serialize(): Promise<string>` convenience necessarily remains limited by the JavaScript
|
|
36
|
+
string ceiling. N-Quads ordering can differ from 0.7.0; its quad set is unchanged. Export order
|
|
37
|
+
is not a snapshot identity. Snapshot JSON encoding and semantic RDF digests are preserved.
|
|
38
|
+
|
|
39
|
+
## Strict SHACL without two complete RDF stores
|
|
40
|
+
|
|
41
|
+
Keep `rdf-validate-shacl` and every current constraint. Group all outgoing triples for a subject
|
|
42
|
+
together, including every occurrence of a shared identity; do not validate isolated conflicting
|
|
43
|
+
assertions as if each were a separate node. Current shapes inspect direct outgoing properties;
|
|
44
|
+
their only cross-subject constraint is `sh:class`. Supply complete graph-wide `rdf:type` membership
|
|
45
|
+
for those references. Determine the original targets before adding support-only type triples and
|
|
46
|
+
express those same targets as `sh:targetNode` for the batch. Support-only nodes are checked with
|
|
47
|
+
their complete records in their own batch.
|
|
48
|
+
|
|
49
|
+
Every subject and constraint is evaluated. Missing proof targets, contradictory metadata, kind
|
|
50
|
+
conflicts, corrupt citations and malformed code evidence still fail. Existing TypeScript proof
|
|
51
|
+
and provenance checks run over all facts after SHACL. No validation result is reused or inferred
|
|
52
|
+
from semantic cache hits. An allowlist rejects new SHACL vocabulary or non-direct paths until
|
|
53
|
+
partition locality is reviewed; unsupported constraints cannot silently pass. Batch progress
|
|
54
|
+
reports completed groups and elapsed time, not an estimated completion time.
|
|
55
|
+
|
|
56
|
+
This changes execution/storage, not asserted semantics: assembly 12, extractor identities,
|
|
57
|
+
semantic cache keys, schema version and logical snapshot IDs remain unchanged. Old snapshots stay
|
|
58
|
+
addressable; existing extraction incompatibility checks still apply.
|
|
59
|
+
|
|
60
|
+
## Validation and limits
|
|
61
|
+
|
|
62
|
+
Tests compare against a frozen 0.7.0 RDF builder at
|
|
63
|
+
`073edab3f1cef875f2fc058ffbc0ddc59cf934d2`. They compare complete named and union quad sets,
|
|
64
|
+
positive/negative verdicts and issues, real SCIP/code-proof metadata, cross-partition class
|
|
65
|
+
references, aggregates and traversal projections. Hash compatibility includes Unicode, surrogate
|
|
66
|
+
boundaries, optional fields and an encoding larger than V8's actual string ceiling. Storage tests
|
|
67
|
+
cover malformed/truncated JSON, special property names, legacy files and concurrent publication.
|
|
68
|
+
|
|
69
|
+
The repeatable public workload is generated TypeScript with shared helpers, same-file and
|
|
70
|
+
cross-file calls, spec files and 18 prose documents. Its provider is a deterministic fixture
|
|
71
|
+
parser, not a live model. It exercises real SCIP, strict hydration, snapshot reload, streaming
|
|
72
|
+
N-Quads parsing and bounded SPARQL, unchanged repeat and clean comparison; it asserts canonical
|
|
73
|
+
encoding size above the actual string ceiling, exact provenance, semantic reuse, unchanged
|
|
74
|
+
versions and immutable snapshot/artifact bytes.
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
pnpm build
|
|
78
|
+
pnpm exec vitest run tests/large-graph-lifecycle.test.ts tests/rdf-scaling-parity.test.ts
|
|
79
|
+
node --max-old-space-size=8192 --import tsx scripts/large-graph/run.ts 1100 40 --require-large
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The large run is deliberately separate from ordinary CI; its scaled fixture runs in CI.
|
|
83
|
+
The [recorded full run](benchmarks/large-graph-2026-11-02/result.json) passes with 554,516 facts,
|
|
84
|
+
a 1 GB snapshot and a complete 5.3 GB RDF export. Each strict SHACL pass takes about 35–37 minutes;
|
|
85
|
+
this does not establish a 30-minute hydration budget. Linux capacity results do not establish
|
|
86
|
+
native Windows consumer acceptance. See VALIDATION.md for source/checkpoint distinctions. This is a capacity regression, not a
|
|
87
|
+
semantic-quality or universal performance guarantee. Parsed graph objects and indexes still use
|
|
88
|
+
memory; a single very large record/identity can exceed a group target. Arbitrary SPARQL joins,
|
|
89
|
+
sorts and aggregates have their own time/memory costs. There is no persistent graph database,
|
|
90
|
+
incremental-validation cache or Rust validator in this change.
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
# Graphify evaluation for the pre-1.0 baseline
|
|
2
2
|
|
|
3
|
-
Status:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Status: B2b measured on 2026-10-29. [ADR 031](ADR-031-code-extractor-selection.md) selects
|
|
4
|
+
**keeping SCIP and improving its declaration/reference projection**. Production implementation
|
|
5
|
+
is B3a; no Graphify runtime or dependency is added to Weftlet.
|
|
6
|
+
|
|
7
|
+
The [durable public measurement record](../evaluations/code-graph-results/2026-10-29/README.md)
|
|
8
|
+
contains tool receipts, native outputs, per-case scores, costs, failed attempts and disclosed
|
|
9
|
+
harness corrections. On the 51 frozen cases, raw SCIP resolves 15/15 declaration families and
|
|
10
|
+
16/16 references; Graphify resolves 14/15 families, 8/16 references and 7/10 native calls.
|
|
11
|
+
Current Weftlet discards useful raw SCIP detail. Calls remain unsupported by the SCIP projections.
|
|
12
|
+
No named false-join negative was asserted, but these are labeled-case metrics, not whole-graph
|
|
13
|
+
precision. Graphify is faster on these tiny inputs; the small Linux-only study does not establish
|
|
14
|
+
production performance or universal language support.
|
|
15
|
+
|
|
16
|
+
All arms preserve fixed, cited business controls and strict RDF/SHACL parity. They do not infer
|
|
17
|
+
missing queue wiring or prove undocumented rule-to-function mappings. Those remain B3–B5 work.
|
|
18
|
+
No paid/model calls or private consumer material were used. The pinned Graphify source API was
|
|
19
|
+
installed only in an isolated experiment, using its unchanged lock and 30 runtime distributions.
|
|
20
|
+
Its 0.9.97 manifest/0.9.96 lock-project discrepancy is recorded; no project distribution was installed.
|
|
21
|
+
|
|
22
|
+
The remainder records the preliminary source review and the predeclared comparison protocol.
|
|
23
|
+
The frozen corpus, labels and budgets at `f1844f31717341f5ff95314a68def80eae509734` remain unchanged.
|
|
7
24
|
|
|
8
25
|
## Reviewed candidate
|
|
9
26
|
|