@conarium-ai/core 0.2.39 → 0.2.40
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/CHANGELOG.md +39 -0
- package/bin/conarium-verify.mjs +26 -9
- package/docs/RECEIPT-SPEC.md +12 -2
- package/docs/claims/reviews/0.2.40.md +70 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.40 — an exit code that answered a question it had not examined
|
|
4
|
+
|
|
5
|
+
`conarium-verify --anchor-check` over a chain where every receipt is unanchored
|
|
6
|
+
exited **0**. Each null anchor was skipped, which is correct — periodic anchoring
|
|
7
|
+
leaves most receipts null and failing on that would make the flag unusable. What
|
|
8
|
+
followed was not: with nothing left to compare, the run reported success. A
|
|
9
|
+
caller who asked whether the anchors held was answered by a code path that never
|
|
10
|
+
reached an anchor.
|
|
11
|
+
|
|
12
|
+
The count was always printed — the summary line said `0/N anchored` — so the
|
|
13
|
+
information was on screen. The exit code was the part that claimed more than had
|
|
14
|
+
been examined, and the exit code is what a machine reads.
|
|
15
|
+
|
|
16
|
+
It is now **15**, which already means "could not be checked" and is evaluated
|
|
17
|
+
ahead of 14 so that "I could not check" is never swallowed by "it does not hold".
|
|
18
|
+
`--require-head-anchor` keeps 14: there the caller asserted an anchor must be
|
|
19
|
+
present, and its absence is a failed assertion rather than an unread one. A chain
|
|
20
|
+
carrying at least one anchor is unaffected.
|
|
21
|
+
|
|
22
|
+
**This is a behaviour change.** A caller who ran `--anchor-check` over
|
|
23
|
+
never-anchored chains and treated 0 as success will now see 15. That is the
|
|
24
|
+
point — but it is a break, and it is why this is a version rather than a patch to
|
|
25
|
+
the last one.
|
|
26
|
+
|
|
27
|
+
The old answer was not an oversight: `test/anchor_verify.mjs` A6.5 asserted it.
|
|
28
|
+
The test had written the defect down, so the behaviour changed and the
|
|
29
|
+
expectation was corrected — the opposite of vector 008, where the implementation
|
|
30
|
+
was right and the expectation was wrong. A6.9 adds the multi-receipt case and a
|
|
31
|
+
control proving that a run which never asked about anchors still exits 0.
|
|
32
|
+
|
|
33
|
+
Found by applying a rule from the SCITT list to our own tool: a checker must
|
|
34
|
+
report that it did not compare, rather than return a verdict it did not earn.
|
|
35
|
+
|
|
36
|
+
Also here: four more Turkish identifiers in `bin/conarium-verify.mjs`
|
|
37
|
+
(`modelBildirilmemis`, `clientBildirilmemis`, `notlar`, `ek`) that 0.2.39's word
|
|
38
|
+
pass did not carry in its list. Translated, and the words added — which is the
|
|
39
|
+
second time that list has grown by being wrong, and is exactly the limit recorded
|
|
40
|
+
against it.
|
|
41
|
+
|
|
3
42
|
## 0.2.39 — 2026-08-21 — the package speaks the language its documentation is written in
|
|
4
43
|
|
|
5
44
|
The executable package carried operational text in Turkish. Not in the
|
package/bin/conarium-verify.mjs
CHANGED
|
@@ -670,11 +670,11 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
670
670
|
// NOTE: receipts elements are wrapped as {file, receipt} — reading r.model
|
|
671
671
|
// directly silently always yields 0 (this happened exactly once; the e2e run
|
|
672
672
|
// caught it).
|
|
673
|
-
const
|
|
674
|
-
const
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
677
|
-
if (
|
|
673
|
+
const undeclaredModelCount = receipts.filter((r) => r.receipt?.model?.source === 'undeclared').length
|
|
674
|
+
const undeclaredClientCount = receipts.filter((r) => r.receipt?.client?.source === 'undeclared').length
|
|
675
|
+
const notes = []
|
|
676
|
+
if (undeclaredModelCount) notes.push(`${undeclaredModelCount} with undeclared model`)
|
|
677
|
+
if (undeclaredClientCount) notes.push(`${undeclaredClientCount} with undeclared client`)
|
|
678
678
|
|
|
679
679
|
if (opts.requireHeadAnchor && !headAnchored) {
|
|
680
680
|
fail(14, 'head anchor required but head is not anchored', opts.json, {
|
|
@@ -684,6 +684,23 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
684
684
|
})
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
+
// --anchor-check on a chain where no receipt carries an anchor used to exit 0:
|
|
688
|
+
// every null was skipped, nothing was compared, and the caller who asked
|
|
689
|
+
// whether the anchors held was told yes by a path that never reached one.
|
|
690
|
+
// That is the same defect as a checker returning a verdict on an input it
|
|
691
|
+
// never examined. The value for it already exists — 15 means "could not be
|
|
692
|
+
// checked", deliberately distinct from 14 "does not hold" — so this is 15.
|
|
693
|
+
// `--require-head-anchor` above stays 14: the caller asserted an anchor must
|
|
694
|
+
// be there, and its absence is a failed assertion rather than an unread one.
|
|
695
|
+
if (opts.anchorCheck && receipts.length > 0 && anchoredCount === 0) {
|
|
696
|
+
fail(
|
|
697
|
+
15,
|
|
698
|
+
`anchor check requested but no receipt carries an anchor: 0/${receipts.length} anchored, nothing was compared`,
|
|
699
|
+
opts.json,
|
|
700
|
+
{ anchored: 0, total: receipts.length, headAnchored: false },
|
|
701
|
+
)
|
|
702
|
+
}
|
|
703
|
+
|
|
687
704
|
const summary = `${anchoredCount}/${receipts.length} anchored, head anchored: ${headAnchored ? 'yes' : 'no'}`
|
|
688
705
|
const tailPinned = isTailPinned(opts)
|
|
689
706
|
if (!tailPinned) console.error(TAIL_UNPINNED_NOTE)
|
|
@@ -693,16 +710,16 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
693
710
|
ok: true,
|
|
694
711
|
code: 0,
|
|
695
712
|
count: receipts.length,
|
|
696
|
-
undeclaredModel:
|
|
697
|
-
undeclaredClient:
|
|
713
|
+
undeclaredModel: undeclaredModelCount,
|
|
714
|
+
undeclaredClient: undeclaredClientCount,
|
|
698
715
|
anchored: anchoredCount,
|
|
699
716
|
headAnchored,
|
|
700
717
|
anchorSummary: opts.anchorCheck ? summary : undefined,
|
|
701
718
|
tailPinned,
|
|
702
719
|
}))
|
|
703
720
|
} else {
|
|
704
|
-
const
|
|
705
|
-
console.log(`ok: ${receipts.length} receipt(s) verified${
|
|
721
|
+
const suffix = notes.length ? ` (${notes.join(', ')})` : ''
|
|
722
|
+
console.log(`ok: ${receipts.length} receipt(s) verified${suffix}`)
|
|
706
723
|
if (opts.anchorCheck) console.log(summary)
|
|
707
724
|
}
|
|
708
725
|
process.exit(0)
|
package/docs/RECEIPT-SPEC.md
CHANGED
|
@@ -193,12 +193,22 @@ are unchanged.
|
|
|
193
193
|
| 11 | `prevHash` break — deleted or inserted; also `--expect-count` / `--expect-last-hash` mismatch |
|
|
194
194
|
| 12 | `seq` gap / non-increasing — missing or reordered |
|
|
195
195
|
| 13 | Signature invalid / pubkey missing (fail-closed) |
|
|
196
|
-
| 14 | Claimed anchor invalid under `--anchor-check`, or `--require-head-anchor` when the head is unanchored. `anchor:null`
|
|
197
|
-
| 15 | Anchor **could not be checked** — calendar unreachable,
|
|
196
|
+
| 14 | Claimed anchor invalid under `--anchor-check`, or `--require-head-anchor` when the head is unanchored. An individual `anchor:null` receipt is skipped, not failed — periodic anchoring leaves most of them null. |
|
|
197
|
+
| 15 | Anchor **could not be checked** — calendar unreachable, the OpenTimestamps verifier is not installed, or `--anchor-check` reached no anchor at all because every receipt in the chain is unanchored. Deliberately distinct from 14: "I could not verify this" is not "this is invalid". The digest comparison is performed offline and still holds; only the timestamp attestation is unconfirmed. A verifier that collapsed the two would be asserting something it did not measure. |
|
|
198
198
|
| 20 | Schema invalid |
|
|
199
199
|
|
|
200
200
|
Fail-closed: if the verifier is unsure, it does not exit 0.
|
|
201
201
|
|
|
202
|
+
⚠️ `--anchor-check` over a chain where **no** receipt carries an anchor is exit
|
|
203
|
+
**15**, not 0. Each null is still skipped rather than failed, which is right —
|
|
204
|
+
but skipping all of them and then reporting success answers the caller's question
|
|
205
|
+
from a path that never reached an anchor. The summary line always printed
|
|
206
|
+
`0/N anchored`; the exit code was the part that claimed more than was examined,
|
|
207
|
+
and the exit code is what a machine reads. `--require-head-anchor` stays 14: the
|
|
208
|
+
caller asserted an anchor must be there, and its absence is a failed assertion
|
|
209
|
+
rather than an unread one. *Changed in 0.2.40; it was 0 before, and a test had
|
|
210
|
+
written the old answer down.*
|
|
211
|
+
|
|
202
212
|
⚠️ Under `--anchor-check`, an OpenTimestamps **calendar** that cannot be
|
|
203
213
|
reached is exit **15** (`anchor could not be checked`) — not 14. Digest
|
|
204
214
|
comparison is offline and still holds. A `verify()` error that is *not*
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Claims review — 0.2.40
|
|
2
|
+
|
|
3
|
+
- base: v0.2.39
|
|
4
|
+
- head: 0c2239c
|
|
5
|
+
- surface: sha256:976a388eaaa1069876dcc0aaeb2f626abfe3fd731a69c4dc51cbe06c8a02d57d
|
|
6
|
+
- verdict: pass
|
|
7
|
+
- reviewer: maintainer, reading the exit-code table against a behaviour change it
|
|
8
|
+
is describing for the first time
|
|
9
|
+
|
|
10
|
+
The surface change is two rows of one table. The finding below is about what the
|
|
11
|
+
old row said rather than what the new one does, and it is the reason the code
|
|
12
|
+
moved.
|
|
13
|
+
|
|
14
|
+
## Findings
|
|
15
|
+
|
|
16
|
+
### 1. docs/RECEIPT-SPEC.md — exit 14's row described a skip and let a verdict follow it
|
|
17
|
+
|
|
18
|
+
- Claim: "`anchor:null` receipts are skipped (periodic anchoring)."
|
|
19
|
+
- Mechanism: `conarium-verify --anchor-check` skips each receipt whose `anchor`
|
|
20
|
+
is null rather than failing it, and prints `0/N anchored` in its summary.
|
|
21
|
+
- Why it falls short: the sentence is true of each receipt and silent about the
|
|
22
|
+
run. Skipping every receipt in a chain leaves nothing compared, and the tool
|
|
23
|
+
then exited 0 — which a caller reads as "the anchors hold". The claim describes
|
|
24
|
+
a per-receipt policy; the exit code asserted a per-chain result that no
|
|
25
|
+
comparison supported. Two tests had written the old answer down
|
|
26
|
+
(`test/anchor_verify.mjs` A6.5 and `src/receipt.test.ts` T5.8), so this was a
|
|
27
|
+
decision rather than an oversight, and it had to be argued rather than
|
|
28
|
+
corrected on sight.
|
|
29
|
+
- Disposition: behaviour changed in 0c2239c. A chain under `--anchor-check` where
|
|
30
|
+
no receipt carries an anchor is exit **15** — the value that already means
|
|
31
|
+
"could not be checked". Both rows now say what they cover: 14 keeps the
|
|
32
|
+
per-receipt skip and the `--require-head-anchor` failure, 15 gains the
|
|
33
|
+
nothing-reached case. The expectations were corrected along with the code, and
|
|
34
|
+
the direction of that correction is recorded in both tests rather than left to
|
|
35
|
+
the next reader to reconstruct.
|
|
36
|
+
|
|
37
|
+
### 2. The summary line was never silent, and the report of this said less than it should
|
|
38
|
+
|
|
39
|
+
- Claim: the description of this defect, as first written and sent to the SCITT
|
|
40
|
+
list, said the tool "reports success, having compared nothing".
|
|
41
|
+
- Mechanism: the run prints `0/N anchored, head anchored: no` on every
|
|
42
|
+
`--anchor-check` invocation, before this change and after it.
|
|
43
|
+
- Why it falls short: the statement is accurate about the exit code and
|
|
44
|
+
incomplete about the output. A reader watching the terminal could always see
|
|
45
|
+
that nothing was anchored. What could not see it was anything consuming the
|
|
46
|
+
exit code, which is the interface that matters for a checker.
|
|
47
|
+
- Disposition: recorded here rather than corrected in flight. The spec, the
|
|
48
|
+
changelog and both tests now state the distinction explicitly — the count was
|
|
49
|
+
always printed, the exit code was the part that claimed more than had been
|
|
50
|
+
examined.
|
|
51
|
+
|
|
52
|
+
## Limits recorded rather than left to be found
|
|
53
|
+
|
|
54
|
+
- **This is a breaking change for one caller shape.** Anyone running
|
|
55
|
+
`--anchor-check` over chains that are never anchored, and treating 0 as
|
|
56
|
+
success, now gets 15. That is the intent, and it is stated in the changelog
|
|
57
|
+
under its own heading rather than buried in a list.
|
|
58
|
+
- A chain with at least one anchored receipt is unaffected. A run without
|
|
59
|
+
`--anchor-check` is unaffected. Both have a control test, because a fix that
|
|
60
|
+
quietly widened its blast radius would be the same class of defect it was
|
|
61
|
+
written to close.
|
|
62
|
+
- The locale word list grew for the second time by being wrong: four identifiers
|
|
63
|
+
in the shipped verifier (`modelBildirilmemis`, `clientBildirilmemis`, `notlar`,
|
|
64
|
+
`ek`) carried no Turkish-specific letter and were not in the list either. They
|
|
65
|
+
are translated and the words added. The list remains a list of what this
|
|
66
|
+
codebase reached for, not a language detector, and the next miss is expected to
|
|
67
|
+
arrive the same way.
|
|
68
|
+
- Turkish design history under `docs/` still ships in the package. Unchanged from
|
|
69
|
+
0.2.39, still counted on every green run of `test/pack_locale.mjs`, still a
|
|
70
|
+
packaging decision that has not been made.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conarium-ai/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.40",
|
|
4
4
|
"mcpName": "io.github.dogrucanemek-alt/conarium",
|
|
5
5
|
"//files-artefakt": "Generated files under examples/ (private key, receipt/audit JSONL) are EXCLUDED. .gitignore does not bind npm: because the allow-list contained 'examples', `npm publish` on a machine that had run the demo was shipping _keys/audit-ed25519.pem (PRIVATE KEY) and the receipts. test/pack_artefakt.mjs locks this. The exclusions are LIMITED to examples/: receipts.jsonl and .pub.pem under test-vectors/ MUST ship, or a third party cannot run the conformance vectors.",
|
|
6
6
|
"//files": "Allow-list of what enters the package. Without it npm sent everything: 296 files / 1.5 MB — CI workflows, gitleaks config, a 137 KB marketing image, the site's api/chat.js. A bank security team opens the tarball and sees those. scripts/ is here ON PURPOSE: conarium-reconcile references scripts/pg-snapshot.sql at runtime; without it the user files a support mail.",
|