@fortemi/core 2026.9.0 → 2026.9.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 +9 -1
- package/dist/index.d.ts +84 -6
- package/dist/index.js +630 -375
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
- package/schemas/source-note-upsert/contract.receipt.json +78 -0
- package/schemas/source-note-upsert/v1.conformance.json +100 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fortemi/core",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.1",
|
|
4
4
|
"description": "Browser-only knowledge management core: PGlite (PostgreSQL WASM), MCP tools, hybrid search, and profile-scoped Knowledge Shard interchange.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fortemi",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"./schemas/dataset-ingest/v1": "./schemas/dataset-ingest/v1.schema.json",
|
|
57
57
|
"./schemas/dataset-lineage/v1": "./schemas/dataset-lineage/v1.schema.json",
|
|
58
58
|
"./schemas/dataset-materialization/v1": "./schemas/dataset-materialization/v1.schema.json",
|
|
59
|
+
"./schemas/source-note-upsert/v1-conformance": "./schemas/source-note-upsert/v1.conformance.json",
|
|
59
60
|
"./worker/pglite-worker": "./dist/worker/pglite-worker.js",
|
|
60
61
|
"./service-worker/sw": "./dist/service-worker/sw.js",
|
|
61
62
|
"./package.json": "./package.json"
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
"schemas/dataset-ingest",
|
|
67
68
|
"schemas/dataset-lineage",
|
|
68
69
|
"schemas/dataset-materialization",
|
|
70
|
+
"schemas/source-note-upsert",
|
|
69
71
|
"benchmarks/dataset-materialization",
|
|
70
72
|
"tools",
|
|
71
73
|
"README.md",
|
|
@@ -97,6 +99,7 @@
|
|
|
97
99
|
"test:db-table-parity": "vitest run src/__tests__/db-table-parity",
|
|
98
100
|
"test:portable-contract": "pnpm build && node scripts/generate-record-v1-self-fixture.mjs --verify && pnpm verify:knowledge-shard-contract && vitest run --maxWorkers=2 src/__tests__/aiwg-index.test.ts src/__tests__/aiwg-index-full-shard.test.ts src/__tests__/shard/aiwg-core-v1-projection.test.ts src/__tests__/shard/shard-conformance.spike.test.ts src/__tests__/shard/schema-validator.test.ts src/__tests__/shard/profile-registry.test.ts src/__tests__/shard/presence.test.ts src/__tests__/shard/full-v1-store.test.ts src/__tests__/shard/shard-import.test.ts src/__tests__/shard/core-v1-self-cell.test.ts src/__tests__/shard/fortemi-core-v1-consumer-cell.test.ts src/__tests__/shard/shard-signature.test.ts src/__tests__/shard/shard-tar.test.ts src/__tests__/records/record-store.test.ts src/__tests__/records/record-shard.test.ts src/__tests__/shard/bundled-example-shards.test.ts",
|
|
99
101
|
"test:platform-contract": "node scripts/run-platform-contract.mjs",
|
|
102
|
+
"test:source-upsert-contract": "vitest run src/__tests__/source-upsert-contract.test.ts",
|
|
100
103
|
"verify:platform-contract-receipt": "node scripts/verify-platform-contract-receipt.mjs",
|
|
101
104
|
"test:platform-contract-tools": "pnpm build && node --test scripts/canonicalize-declarations.test.mjs scripts/platform-contract-receipt.test.mjs scripts/live-server-contract.test.mjs",
|
|
102
105
|
"verify:knowledge-shard-contract": "node scripts/verify-knowledge-shard-contract.mjs",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "fortemi.source-note-upsert.consumer-receipt.v1",
|
|
3
|
+
"status": "consumer-conformance-passed",
|
|
4
|
+
"generatedAt": "2026-09-03T21:54:11Z",
|
|
5
|
+
"contract": {
|
|
6
|
+
"name": "source-note-upsert",
|
|
7
|
+
"version": "1.0.0",
|
|
8
|
+
"plane": "live-persistence",
|
|
9
|
+
"authorityRepository": "https://git.integrolabs.net/Fortemi/fortemi.git",
|
|
10
|
+
"authorityCommit": "d073159911e629583fd518062f2d8d247aa160e6",
|
|
11
|
+
"producerImplementationCommit": "54f5e64470291b06630549f5157af754ee388b7b",
|
|
12
|
+
"contractRevision": "1",
|
|
13
|
+
"requestSchemaSha256": "2461758debe121f06d78705e67f14426ea441b09ea53115fa7a168e79c83b017",
|
|
14
|
+
"responseSchemaSha256": "5eabe8c9974a720a943c6b5144dfae0882ff9894851a80e8742dc4fa3ef751da",
|
|
15
|
+
"fixture": {
|
|
16
|
+
"authorityPath": "contracts/source-note-upsert/conformance/v1.json",
|
|
17
|
+
"consumerPath": "packages/core/schemas/source-note-upsert/v1.conformance.json",
|
|
18
|
+
"sha256": "181b64c819c7d8d5492edbab187d71750de86c4e4bc74a2888ed5da163cb6266",
|
|
19
|
+
"bytes": 3440,
|
|
20
|
+
"cases": 7,
|
|
21
|
+
"byteIdentical": true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"producerEvidence": {
|
|
25
|
+
"repository": "Fortemi/fortemi",
|
|
26
|
+
"issue": "https://git.integrolabs.net/Fortemi/fortemi/issues/1090",
|
|
27
|
+
"commit": "54f5e64470291b06630549f5157af754ee388b7b",
|
|
28
|
+
"ciRun": "https://git.integrolabs.net/Fortemi/fortemi/actions/runs/51944",
|
|
29
|
+
"conclusion": "success",
|
|
30
|
+
"postgresVersion": "18.4",
|
|
31
|
+
"freshDestinationMigrationsPassed": true,
|
|
32
|
+
"sharedFixturePassed": true
|
|
33
|
+
},
|
|
34
|
+
"consumerEvidence": {
|
|
35
|
+
"repository": "Fortemi/fortemi-react",
|
|
36
|
+
"issue": "https://git.integrolabs.net/Fortemi/fortemi-react/issues/404",
|
|
37
|
+
"pullRequest": "https://git.integrolabs.net/Fortemi/fortemi-react/pulls/416",
|
|
38
|
+
"implementationCommit": "90f3341b4f4cc2463cfcd5e33bc144194fd55b0e",
|
|
39
|
+
"ciRun": "https://git.integrolabs.net/Fortemi/fortemi-react/actions/runs/51949",
|
|
40
|
+
"conclusion": "success",
|
|
41
|
+
"coreTestResult": {
|
|
42
|
+
"filesPassed": 80,
|
|
43
|
+
"testsPassed": 1341,
|
|
44
|
+
"failed": 0
|
|
45
|
+
},
|
|
46
|
+
"implementations": [
|
|
47
|
+
{
|
|
48
|
+
"id": "fortemi-react-pglite",
|
|
49
|
+
"cleanDestination": true,
|
|
50
|
+
"sharedFixturePassed": true,
|
|
51
|
+
"atomicRollbackPassed": true,
|
|
52
|
+
"memoryScopeIsolationPassed": true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "fortemi-react-recordstore",
|
|
56
|
+
"cleanDestination": true,
|
|
57
|
+
"sharedFixturePassed": true,
|
|
58
|
+
"atomicCommitPassed": true,
|
|
59
|
+
"replayJournalStable": true
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"knowledgeShardBoundary": {
|
|
64
|
+
"profilesChanged": false,
|
|
65
|
+
"profiles": ["core-v1", "full-v1", "record-v1"],
|
|
66
|
+
"sourceIdentityPortable": false,
|
|
67
|
+
"typedLossCode": "source-identity-outside-profile",
|
|
68
|
+
"implementationReceiptSha256": "4018f6d1ac2640604377d34a1d0e36461e7d9a0382beca342164459cd236c6f1",
|
|
69
|
+
"presenceReceiptSha256": "573fc5eb0c580f90e5e7312647967af333f31c7e6986ab0f5ebc3be103b72a8b"
|
|
70
|
+
},
|
|
71
|
+
"claimBoundary": {
|
|
72
|
+
"exactContractOnly": true,
|
|
73
|
+
"fullSuiteParity": false,
|
|
74
|
+
"completeBackup": false,
|
|
75
|
+
"portableSourceIdentity": false,
|
|
76
|
+
"suiteAudit": "NO-GO"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "fortemi.source-note-upsert.conformance/v1",
|
|
3
|
+
"contract_version": "1.0.0",
|
|
4
|
+
"scope": {
|
|
5
|
+
"tenant_id": "00000000-0000-0000-0000-000000000000",
|
|
6
|
+
"memory": "public"
|
|
7
|
+
},
|
|
8
|
+
"source": {
|
|
9
|
+
"source_namespace": "conformance.example",
|
|
10
|
+
"source_id": "fixture-source",
|
|
11
|
+
"source_schema_version": "1"
|
|
12
|
+
},
|
|
13
|
+
"cases": [
|
|
14
|
+
{
|
|
15
|
+
"id": "insert",
|
|
16
|
+
"request": {
|
|
17
|
+
"import_run_id": "run-insert",
|
|
18
|
+
"batch_id": "batch-insert",
|
|
19
|
+
"checkpoint": {"cursor": "1"},
|
|
20
|
+
"items": [
|
|
21
|
+
{
|
|
22
|
+
"external_id": "fixture-a",
|
|
23
|
+
"content": "alpha",
|
|
24
|
+
"content_digest": "sha256:8ed3f6ad685b959ead7022518e1af76cd816f8e8ec7ccdda1ed4018e8f2223f8",
|
|
25
|
+
"caller_stable_id": "018f05a7-cafe-7def-8000-000000000001",
|
|
26
|
+
"metadata": {"fixture": true}
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"expected": {"batch": "committed", "items": ["inserted"], "material_changes": 1}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "exact-batch-replay",
|
|
34
|
+
"repeat": "insert",
|
|
35
|
+
"expected": {"batch": "duplicate", "items": ["unchanged"], "material_changes": 0}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "changed-version",
|
|
39
|
+
"request": {
|
|
40
|
+
"import_run_id": "run-version",
|
|
41
|
+
"batch_id": "batch-version",
|
|
42
|
+
"policy": "version",
|
|
43
|
+
"items": [{"external_id": "fixture-a", "content": "alpha version two"}]
|
|
44
|
+
},
|
|
45
|
+
"expected": {"batch": "committed", "items": ["versioned"], "material_changes": 1}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "changed-conflict",
|
|
49
|
+
"request": {
|
|
50
|
+
"import_run_id": "run-conflict",
|
|
51
|
+
"batch_id": "batch-conflict",
|
|
52
|
+
"policy": "conflict",
|
|
53
|
+
"items": [{"external_id": "fixture-a", "content": "must not replace"}]
|
|
54
|
+
},
|
|
55
|
+
"expected": {"batch": "committed", "items": ["conflict"], "material_changes": 0}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "changed-replace",
|
|
59
|
+
"request": {
|
|
60
|
+
"import_run_id": "run-replace",
|
|
61
|
+
"batch_id": "batch-replace",
|
|
62
|
+
"policy": "replace",
|
|
63
|
+
"items": [{"external_id": "fixture-a", "content": "alpha replacement"}]
|
|
64
|
+
},
|
|
65
|
+
"expected": {"batch": "committed", "items": ["replaced"], "material_changes": 1}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "dry-run",
|
|
69
|
+
"request": {
|
|
70
|
+
"import_run_id": "run-preview",
|
|
71
|
+
"batch_id": "batch-preview",
|
|
72
|
+
"dry_run": true,
|
|
73
|
+
"items": [{"external_id": "fixture-preview", "content": "preview only"}]
|
|
74
|
+
},
|
|
75
|
+
"expected": {"batch": "preview", "items": ["inserted"], "material_changes": 0}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "digest-rejection",
|
|
79
|
+
"request": {
|
|
80
|
+
"import_run_id": "run-rejected",
|
|
81
|
+
"batch_id": "batch-rejected",
|
|
82
|
+
"items": [
|
|
83
|
+
{
|
|
84
|
+
"external_id": "fixture-rejected",
|
|
85
|
+
"content": "will not commit",
|
|
86
|
+
"content_digest": "sha256:0000000000000000000000000000000000000000000000000000000000000000"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"expected": {"batch": "rejected", "items": ["rejected"], "material_changes": 0, "reason_code": "content_digest_mismatch"}
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"required_invariants": [
|
|
94
|
+
"exact replay adds zero note, revision, activity, job, blob, outbox, and import-journal rows",
|
|
95
|
+
"database failure rolls back all persistence and event layers",
|
|
96
|
+
"equal source keys in another tenant or memory do not collide",
|
|
97
|
+
"operation logs and receipts exclude raw external IDs and content",
|
|
98
|
+
"Knowledge Shard export emits source-identity-outside-profile when identities are omitted"
|
|
99
|
+
]
|
|
100
|
+
}
|