@conarium-ai/core 0.2.29 → 0.2.31
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/LIMITATIONS.md +5 -5
- package/LIMITATIONS.tr.md +5 -5
- package/README.md +17 -4
- package/bin/conarium-anchor-service.mjs +22 -3
- package/bin/conarium-doctor.mjs +28 -18
- package/bin/conarium-token-sync.mjs +54 -0
- package/deploy/anchor-service/README.md +3 -0
- package/deploy/anchor-service/conarium-token-sync.service +14 -0
- package/deploy/anchor-service/conarium-token-sync.timer +11 -0
- package/dist/anchor-service.d.ts +10 -0
- package/dist/anchor-service.d.ts.map +1 -1
- package/dist/anchor-service.js +33 -6
- package/dist/anchor-service.js.map +1 -1
- package/dist/audit.d.ts.map +1 -1
- package/dist/audit.js +40 -5
- package/dist/audit.js.map +1 -1
- package/dist/governance.d.ts.map +1 -1
- package/dist/governance.js +69 -14
- package/dist/governance.js.map +1 -1
- package/dist/masking-cost.d.ts +1 -1
- package/dist/masking-cost.js +4 -4
- package/dist/masking-cost.js.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/docs/BENCHMARK.md +49 -35
- package/docs/PRICING.md +41 -0
- package/docs/RECEIPT-SPEC.md +8 -6
- package/docs/benchmarks/latest.json +1662 -1662
- package/docs/benchmarks/masking-cost-threshold.json +2 -2
- package/docs/benchmarks/masking-cpu-summary.json +25 -0
- package/docs/benchmarks/masking-identity-after.json +66 -0
- package/docs/benchmarks/masking-identity-before.json +66 -0
- package/docs/benchmarks/masking-profile-100.json +22 -0
- package/docs/benchmarks/masking-profile-500.json +22 -0
- package/docs/benchmarks/masking-profile-5000.json +22 -0
- package/docs/benchmarks/overhead-20260818T1842Z-win32-before.json +539 -0
- package/docs/benchmarks/overhead-20260818T1852Z-win32.json +539 -0
- package/docs/benchmarks/overhead-20260818T2120Z-win32-09b2100.json +2310 -0
- package/docs/benchmarks/overhead-20260818T2145Z-win32-46acd75.json +2310 -0
- package/docs/claims/reviews/0.2.30.md +38 -0
- package/docs/claims/reviews/0.2.31.md +76 -0
- package/package.json +3 -1
- package/scripts/profile-masking-carryover.mjs +140 -0
- package/scripts/profile-masking-once.mjs +79 -0
- package/scripts/snapshot-masking-identity.mjs +62 -0
- package/scripts/summarize-cpuprofile.mjs +24 -0
package/docs/BENCHMARK.md
CHANGED
|
@@ -7,7 +7,6 @@ Headline numbers are **p50 / p95 / p99**. Mean is not reported.
|
|
|
7
7
|
Replay:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
# temporary Postgres (WSL Docker on this machine)
|
|
11
10
|
docker run -d --name conarium-bench-pg \
|
|
12
11
|
-e POSTGRES_USER=conarium -e POSTGRES_PASSWORD=demo-not-a-secret \
|
|
13
12
|
-e POSTGRES_DB=conarium_bench -p 54329:5432 postgres:16-alpine
|
|
@@ -18,8 +17,15 @@ CONARIUM_BENCH_DSN=postgres://conarium:demo-not-a-secret@127.0.0.1:54329/conariu
|
|
|
18
17
|
docker rm -f conarium-bench-pg
|
|
19
18
|
```
|
|
20
19
|
|
|
21
|
-
Raw JSON
|
|
22
|
-
|
|
20
|
+
Raw JSON (this run, current code `46acd75`):
|
|
21
|
+
[`benchmarks/overhead-20260818T2145Z-win32-46acd75.json`](benchmarks/overhead-20260818T2145Z-win32-46acd75.json)
|
|
22
|
+
and [`benchmarks/latest.json`](benchmarks/latest.json).
|
|
23
|
+
|
|
24
|
+
Same environment, previous tag `09b2100`:
|
|
25
|
+
[`benchmarks/overhead-20260818T2120Z-win32-09b2100.json`](benchmarks/overhead-20260818T2120Z-win32-09b2100.json).
|
|
26
|
+
|
|
27
|
+
Historical other-environment archive (do not quote next to these cells):
|
|
28
|
+
[`benchmarks/overhead-20260814T1346Z-linux.json`](benchmarks/overhead-20260814T1346Z-linux.json).
|
|
23
29
|
|
|
24
30
|
No competitor numbers. n=15 cells have a thin tail (p95 = p99).
|
|
25
31
|
|
|
@@ -30,12 +36,13 @@ No competitor numbers. n=15 cells have a thin tail (p95 = p99).
|
|
|
30
36
|
| | |
|
|
31
37
|
|---|---|
|
|
32
38
|
| CPU | Intel Core Ultra 9 275HX × 24 |
|
|
33
|
-
| RAM
|
|
34
|
-
| OS |
|
|
35
|
-
| Node |
|
|
36
|
-
| Postgres | 16.
|
|
39
|
+
| RAM | 32 GB |
|
|
40
|
+
| OS | win32 10.0.26200 |
|
|
41
|
+
| Node | v24.5.0 |
|
|
42
|
+
| Postgres | 16.15 (`postgres:16-alpine` on `127.0.0.1:54329`) |
|
|
37
43
|
| Dataset | 5 000 rows, distinct email per row |
|
|
38
|
-
|
|
|
44
|
+
| Before | `09b2100` at 2026-08-18T20:43:32Z |
|
|
45
|
+
| After | `46acd75` at 2026-08-18T20:44:13Z |
|
|
39
46
|
|
|
40
47
|
`maxRows` falls back to **100** in code when the policy leaves it unset; the
|
|
41
48
|
`conarium.config.json` shipped with the package sets **50**. A fresh install
|
|
@@ -51,6 +58,9 @@ Two series, same user SQL both sides:
|
|
|
51
58
|
|
|
52
59
|
Deny must not hit Postgres. It did not.
|
|
53
60
|
|
|
61
|
+
The tables below are **after** (`46acd75`). The before/after pair for the
|
|
62
|
+
masked cliff is under Warning threshold.
|
|
63
|
+
|
|
54
64
|
---
|
|
55
65
|
|
|
56
66
|
## same-limit (same row count) — the number to quote
|
|
@@ -59,29 +69,32 @@ Deny must not hit Postgres. It did not.
|
|
|
59
69
|
|
|
60
70
|
| maxRows | direct p50 | conarium p50 | overhead p50 / p95 / p99 | n |
|
|
61
71
|
|---|---|---|---|---|
|
|
62
|
-
| 100 |
|
|
63
|
-
| 500 | 1.
|
|
64
|
-
| 5 000 |
|
|
72
|
+
| 100 | 1.157 ms | 3.789 ms | **2.392 / 3.183 / 3.594** | 50 |
|
|
73
|
+
| 500 | 1.863 ms | 9.944 ms | **7.832 / 14.539 / 15.034** | 50 |
|
|
74
|
+
| 5 000 | 7.328 ms | 94.699 ms | **88.884 / 119.527 / 119.527** | 15 |
|
|
65
75
|
|
|
66
76
|
### partial (email masked)
|
|
67
77
|
|
|
68
78
|
| maxRows | direct p50 | conarium p50 | overhead p50 / p95 / p99 | n |
|
|
69
79
|
|---|---|---|---|---|
|
|
70
|
-
| 100 |
|
|
71
|
-
| 500 |
|
|
72
|
-
| 5 000 |
|
|
80
|
+
| 100 | 1.162 ms | 4.092 ms | **2.670 / 4.395 / 4.740** | 50 |
|
|
81
|
+
| 500 | 1.633 ms | 10.967 ms | **8.801 / 16.200 / 16.692** | 50 |
|
|
82
|
+
| 5 000 | 7.646 ms | 99.731 ms | **92.929 / 125.204 / 125.204** | 15 |
|
|
73
83
|
|
|
74
|
-
Conservative default (100 rows, masked): **about
|
|
84
|
+
Conservative default (100 rows, masked): **about 3 ms added**. The shipped
|
|
75
85
|
config caps at 50, so a fresh install stays below this figure.
|
|
76
|
-
500 distinct emails: **about
|
|
86
|
+
500 distinct emails: **about 9 ms**. 5 000: **about 93 ms**.
|
|
87
|
+
|
|
88
|
+
On the same machine, `09b2100` same-limit partial overhead was
|
|
89
|
+
5.6 ms / 83 ms / **14.1 s**. That 14 s cell is the cost that `46acd75` removed.
|
|
77
90
|
|
|
78
91
|
### deny
|
|
79
92
|
|
|
80
93
|
| maxRows | conarium p50 | query ran |
|
|
81
94
|
|---|---|---|
|
|
82
|
-
| 100 | 0.
|
|
83
|
-
| 500 | 0.
|
|
84
|
-
| 5 000 | 0.
|
|
95
|
+
| 100 | 0.786 ms | no |
|
|
96
|
+
| 500 | 0.646 ms | no |
|
|
97
|
+
| 5 000 | 0.630 ms | no |
|
|
85
98
|
|
|
86
99
|
---
|
|
87
100
|
|
|
@@ -91,36 +104,37 @@ Direct always returns 5 000 rows. Conarium returns `maxRows`.
|
|
|
91
104
|
|
|
92
105
|
| scenario | maxRows | direct p50 | conarium p50 | overhead p50 | rows in / out |
|
|
93
106
|
|---|---|---|---|---|---|
|
|
94
|
-
| allow | 100 | 4.
|
|
95
|
-
| allow | 500 |
|
|
96
|
-
| allow | 5 000 |
|
|
97
|
-
| partial | 100 | 5.
|
|
98
|
-
| partial | 500 |
|
|
99
|
-
| partial | 5 000 |
|
|
100
|
-
|
|
101
|
-
The
|
|
107
|
+
| allow | 100 | 4.920 | 3.479 | **−0.919** | 5000 → 100 |
|
|
108
|
+
| allow | 500 | 3.882 | 5.820 | 1.451 | 5000 → 500 |
|
|
109
|
+
| allow | 5 000 | 3.617 | 38.852 | 32.992 | 5000 → 5000 |
|
|
110
|
+
| partial | 100 | 5.413 | 3.492 | **−1.610** | 5000 → 100 |
|
|
111
|
+
| partial | 500 | 4.515 | 5.874 | 0.802 | 5000 → 500 |
|
|
112
|
+
| partial | 5 000 | 7.142 | 93.473 | 85.634 | 5000 → 5000 |
|
|
113
|
+
|
|
114
|
+
The negative cells are the row cap doing less I/O. They are not a claim that
|
|
102
115
|
masking is free.
|
|
103
116
|
|
|
104
117
|
---
|
|
105
118
|
|
|
106
|
-
## In-process redact (
|
|
119
|
+
## In-process redact (win32, unique email per row)
|
|
107
120
|
|
|
108
|
-
Not a substitute for the table above.
|
|
121
|
+
Not a substitute for the table above. Same environment; only 50 / 100 / 500
|
|
122
|
+
are timed in-process when a DSN is set (5 000 lives in the Postgres table).
|
|
109
123
|
|
|
110
124
|
| distinct emails | p50 | p95 | p99 | n |
|
|
111
125
|
|---|---|---|---|---|
|
|
112
|
-
| 50 |
|
|
113
|
-
| 100 |
|
|
114
|
-
| 500 |
|
|
126
|
+
| 50 | 0.790 ms | 1.192 | 1.460 | 50 |
|
|
127
|
+
| 100 | 1.195 ms | 1.811 | 2.181 | 50 |
|
|
128
|
+
| 500 | 4.066 ms | 10.756 | 12.308 | 50 |
|
|
115
129
|
|
|
116
130
|
---
|
|
117
131
|
|
|
118
132
|
## Warning threshold
|
|
119
133
|
|
|
120
|
-
`docs/benchmarks/masking-cost-threshold.json` → **warn above
|
|
134
|
+
`docs/benchmarks/masking-cost-threshold.json` → **warn above 500**.
|
|
121
135
|
|
|
122
|
-
|
|
123
|
-
(same-limit partial overhead p50 =
|
|
136
|
+
500 is the last measured cap still in the low-millisecond band
|
|
137
|
+
(same-limit partial overhead p50 = 8.8 ms). 5 000 is 93 ms.
|
|
124
138
|
The doctor and `parseConariumConfig` warn. They do not reject the query.
|
|
125
139
|
|
|
126
140
|
---
|
package/docs/PRICING.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Pricing (same words as the site)
|
|
2
|
+
|
|
3
|
+
The live cards are on [conarium.dev](https://conarium.dev/#pricing). This file
|
|
4
|
+
exists so the public repository does not drift from the site the way `docs.html`
|
|
5
|
+
did. A card line that cannot be delivered does not go on the card.
|
|
6
|
+
|
|
7
|
+
| Tier | Price | Button |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Community | Free | Get started free → GitHub |
|
|
10
|
+
| **Pro** | **$20/month** or **$200/year — save $40** | Get started → `#cta` while checkout is closed; `/buy?plan=pro&period=monthly\|yearly` once it opens |
|
|
11
|
+
| Business | $100/month | **Join the waitlist** → `#cta` — **does not take payment** |
|
|
12
|
+
| Enterprise | Custom | Contact us → `#cta` |
|
|
13
|
+
|
|
14
|
+
## Pro (priced, checkout closed)
|
|
15
|
+
|
|
16
|
+
- **Checkout is closed.** `/buy` and both card buttons redirect to `#cta`, and
|
|
17
|
+
`/api/checkout/live` reports `{"live":false}`. The price below is published,
|
|
18
|
+
not payable. When the payment path goes live this section says `sold` and the
|
|
19
|
+
Button column above drops its first clause.
|
|
20
|
+
- Hosted countersignature: someone other than you signs the chain head. Shipped in the package since 0.2.16; the VERAX-operated endpoint is not open to customers yet.
|
|
21
|
+
- Fair use — 60 submissions per minute.
|
|
22
|
+
- No monthly quota.
|
|
23
|
+
- **One period, not a subscription.** It does not renew by itself — when the period ends, access ends and you can buy it again. 14-day no-questions refund; after that, no partial refunds.
|
|
24
|
+
- VAT added where applicable.
|
|
25
|
+
|
|
26
|
+
## Business (waitlist)
|
|
27
|
+
|
|
28
|
+
Three items remain marked **In the contract, not shipped yet**:
|
|
29
|
+
|
|
30
|
+
- reconciliation on a schedule, against your database's own counters
|
|
31
|
+
- an alert when coverage breaks
|
|
32
|
+
- a signed period report, generated on your side
|
|
33
|
+
|
|
34
|
+
Do not remove those marks. The waitlist form (`#cta`) is Business / Enterprise /
|
|
35
|
+
Design Partner. It is not Pro checkout.
|
|
36
|
+
|
|
37
|
+
## `#cta`
|
|
38
|
+
|
|
39
|
+
The footer form writes an email to the waitlist. Pro checkout does not use it —
|
|
40
|
+
but while checkout is closed, the Pro buttons and `/buy` land there, which is
|
|
41
|
+
the one case in which a Pro reader reaches this form.
|
package/docs/RECEIPT-SPEC.md
CHANGED
|
@@ -26,6 +26,7 @@ Design source: `docs/superpowers/specs/2026-07-29-conarium-receipt-design.md`.
|
|
|
26
26
|
değiştirilmediğini, **ortadan** silinmediğini, yeniden sıralanmadığını ve geriye
|
|
27
27
|
dönük tarihlenmediğini kanıtlar. **Oluşturma anında doğru olduğunu kanıtlamaz.**
|
|
28
28
|
Sondan kesmeyi tek başına göremez.
|
|
29
|
+
*(/TR)*
|
|
29
30
|
|
|
30
31
|
## Media type
|
|
31
32
|
|
|
@@ -411,12 +412,13 @@ revision history is itself timestamped.
|
|
|
411
412
|
|
|
412
413
|
## Known gaps (documented, not hidden)
|
|
413
414
|
|
|
414
|
-
1. **`actor` is a service identity unless per-user tokens are configured.** With a token file (`CONARIUM_TOKENS_FILE`, default `conarium.tokens.json`), the audit line and the receipt name the individual
|
|
415
|
-
2.
|
|
416
|
-
3. **
|
|
417
|
-
4. **
|
|
418
|
-
5.
|
|
419
|
-
6.
|
|
415
|
+
1. **`actor` is a service identity unless per-user tokens are configured.** With a token file (`CONARIUM_TOKENS_FILE`, default `conarium.tokens.json`), the audit line and the receipt name the individual, set `assurance: "per-user-token"` and `type: "user"`. Without it the actor is the connecting service, with `assurance: "shared-token"` and `type: "service"`. `type` is derived from `assurance` rather than carried separately — `resolveActor` is the single place either is decided, so a second field would be the same fact asserted twice. This is an operator-managed token map — **not** OAuth or SSO; there is no identity-provider integration, so the assurance is only as good as the operator's token hygiene. For shared-token deployments, marketing must not claim "who accessed". *Until 0.2.29, `type` was hard-coded to `"service"` regardless: a person connecting with their own token produced a signed receipt naming them and calling them a service. The verifier already rejected `"user"` with `"shared-token"`, but the producing side never emitted `"user"`, so that rule had never fired.*
|
|
416
|
+
2. **`dataRefs[].fieldsRequested` and `policy.rulesApplied` are emitted empty.** Until 0.2.29 the first was filled from the masked-field list and the second from the set of SQL functions the query touched — in both cases a field whose name described something other than its contents. A reader takes `fieldsRequested` for the columns a query asked for, and `rulesApplied` for policy rule identifiers; neither was true, and both were signed. They are now empty, because in a signed document a field filled with the wrong thing is worse than a field left empty: empty says *unknown*, wrongly-filled says *known* and misleads. The correct contents are recoverable — selected columns from the SQL AST, rule identifiers from a policy engine that emits them — and neither is implemented; when it is, these fields carry it. **The conformance vectors under `test-vectors/` show both fields populated. Those vectors are hand-written to exercise the format and are not produced by this implementation; a populated value is valid, and an empty one is what this version emits.** Losing per-field masking detail from `dataRefs` is a regression and is stated here rather than absorbed silently — `masking.byClass` still carries the per-class counts.
|
|
417
|
+
3. **Bypass detection — addressed as of reconcile v0.1, with stated limits.** Disabling Conarium and reading the DB directly still produces no receipt — no gateway can prevent that from inside. What changed: absence is now *checkable from both sides*. One-sided: `conarium-coverage` emits a signed declaration (chain contiguity + which declared objects have recorded access). Two-sided: `conarium-reconcile` compares the database's own per-role query counters against the in-window receipts and reports any DB-recorded pattern no receipt covers (see §Reconciliation). Remaining limits, stated: reconciliation trusts the DB's own counters (an attacker who can falsify `pg_stat_statements` is out of scope), requires a dedicated DB role per gateway instance, and matches per pattern/table — never per call count. **The language rule stands: "access NOT RECORDED", never "no access occurred."**
|
|
418
|
+
4. **Creation-time truth is not proven.** Without hardware attestation, an operator can still write false-but-well-formed receipts *before* anchoring.
|
|
419
|
+
5. **In-file `sig` stripping + HMAC/`anchor` reduction.** Content `hash` is computed with `{hash, sig, anchor}` (and audit `signature`/`sig`) excluded, so an operator who controls the file can drop or thin those fields without invalidating the content hash itself. Contiguity and the trust store catch some boot-time cases, but full protection against in-file strip/reduce games is **not solvable in-file** (*in-file çözülemez*) — it needs an external transparency-log anchor and/or out-of-band key ceremony. **Opt-in strict boot (G3):** `CONARIUM_AUDIT_REQUIRE_SIG=1` rejects a chain with any unsigned line when a signing key is configured; the default stays the 08-05 compatibility open. **Mitigation available today, measured:** keep `CONARIUM_AUDIT_HMAC_KEY` enabled alongside Ed25519. HMAC is keyed, so an actor who strips `sig` and recomputes the unkeyed hashes still fails the HMAC check (`entry signature mismatch`). Verified by test: Ed25519 alone → strip-all passes the boot check; Ed25519 + HMAC → caught. `conarium-verify --pubkey` also catches it (exit 13, `missing sig`) because it is told to expect signatures. **Anchor is available** (`CONARIUM_ANCHOR_SINK=opentimestamps`) but starts as `pending` — Bitcoin finality is delayed (hours); see §Anchoring.
|
|
420
|
+
6. **`argsHash` hurts debugging.** Support cases need the customer's own logs to correlate.
|
|
421
|
+
7. **Tail truncation is invisible to `conarium-verify` unless pinned.** Deleting the last N receipts leaves a consistent leftover chain (exit 0). `--expect-count` / `--expect-last-hash` exist for operators who have an external length or last-hash; they are opt-in so a verifier that saw the same file yesterday still exits 0 today. Anchoring the head, or `conarium-reconcile` against the database's own counters, are the other pins.
|
|
420
422
|
|
|
421
423
|
## Anchoring (OpenTimestamps)
|
|
422
424
|
|