@conarium-ai/core 0.3.7 → 0.3.8
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 +15 -0
- package/LIMITATIONS.md +12 -6
- package/LIMITATIONS.tr.md +14 -7
- package/bin/conarium-reconcile.mjs +62 -8
- package/conformance/cases/reconciliation/v2-multiplicity-join-neighbour.json +18 -0
- package/conformance/fixtures/reconciliation/after-join-and-orders.json +1 -0
- package/conformance/fixtures/reconciliation/receipts-join-whole-and-parts.jsonl +3 -0
- package/docs/RECEIPT-SPEC.md +23 -11
- package/docs/claims/reviews/0.3.8.md +122 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.8 - the patterns beside a join that a Receipt names in part are decided together
|
|
4
|
+
|
|
5
|
+
0.3.7 said its comparison errs toward `indeterminate` for a pattern over
|
|
6
|
+
several objects that a Receipt names in part. That was not so for the patterns
|
|
7
|
+
beside it. With a bound of 1, Receipts naming customers and orders, customers,
|
|
8
|
+
and orders, two statements of a customers-orders join and one on orders, 0.3.7
|
|
9
|
+
reported the orders pattern `matched`. Covering both join statements, one with
|
|
10
|
+
the join Receipt and one with the other two, leaves the orders statement
|
|
11
|
+
uncovered and covers as many statements as any assignment can, so the orders
|
|
12
|
+
pattern is `indeterminate`. In 0.3.8 the patterns that share a Receipt with
|
|
13
|
+
such a pattern are decided together: if any of their statements is left
|
|
14
|
+
uncovered, each of them not over the bound on its own is `indeterminate`. The
|
|
15
|
+
conformance case `v2-multiplicity-join-neighbour` is added; it fails on 0.3.7.
|
|
16
|
+
The `/1` JSON body and the exit codes do not change.
|
|
17
|
+
|
|
3
18
|
## 0.3.7 - a multiplicity bound counts per Receipt
|
|
4
19
|
|
|
5
20
|
`multiplicity.maxStatementsPerReceipt` is documented as how many source
|
package/LIMITATIONS.md
CHANGED
|
@@ -320,12 +320,18 @@ bound × the receipts in the window that name one of its objects is
|
|
|
320
320
|
pattern that draws, whose statements the receipts cannot be shown to cover
|
|
321
321
|
beside the patterns that draw on the same receipts, is `indeterminate` with reason `multiplicity-shared`, because the
|
|
322
322
|
evidence does not say which statements the receipts covered. The comparison
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
whole,
|
|
326
|
-
|
|
327
|
-
two of its objects once for each, unless every receipt that names one of
|
|
328
|
-
two names the other.
|
|
323
|
+
is approximate for a pattern that draws, over several objects, when a receipt
|
|
324
|
+
in the window names one of its objects but not all of them. If some receipt in the window
|
|
325
|
+
names the pattern whole, it draws only on the receipts that name it whole, even
|
|
326
|
+
when the others would cover the rest. If none does, it counts a receipt that
|
|
327
|
+
names two of its objects once for each, unless every receipt that names one of
|
|
328
|
+
the two names the other. Either way, a pattern beside it could look covered
|
|
329
|
+
when another assignment would leave it short. So every pattern that draws and
|
|
330
|
+
shares a receipt in the window with such a pattern, directly or through other
|
|
331
|
+
patterns that draw, is decided together with it: if any of their statements is left uncovered,
|
|
332
|
+
each of them not over the bound on its own is `indeterminate`, even one that a
|
|
333
|
+
closer count would show covered. The comparison errs only toward
|
|
334
|
+
`indeterminate`. Receipts outside the window do not count toward this comparison, even
|
|
329
335
|
when one of them would cover the shortfall: such an item is decided by the
|
|
330
336
|
in-window receipts alone, not reported as a boundary item. `/2` does not change the exit
|
|
331
337
|
codes, so a run whose `/2` outcome is `exceptions` can still exit 0. A check on
|
package/LIMITATIONS.tr.md
CHANGED
|
@@ -316,13 +316,20 @@ fazla olan desen `observed-without-receipt` olur, gerekçesi
|
|
|
316
316
|
`multiplicity-exceeded`. Pay alan ve ifadelerinin, aynı makbuzlardan pay alan
|
|
317
317
|
desenlerin yanında makbuzlarca karşılandığı gösterilemeyen başka her desen
|
|
318
318
|
`indeterminate` olur, gerekçesi `multiplicity-shared`; çünkü kanıt, makbuzların hangi ifadeleri karşıladığını
|
|
319
|
-
söylemez.
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
319
|
+
söylemez. Pay alan ve birden çok nesneli bir desende, pencere içindeki bir
|
|
320
|
+
makbuz nesnelerinden birini adlandırıp hepsini adlandırmıyorsa kıyas
|
|
321
|
+
yaklaşıktır.
|
|
322
|
+
Deseni pencere içinde bütünüyle adlandıran bir makbuz varsa desen yalnız onu
|
|
323
|
+
bütünüyle adlandıran makbuzlardan pay alır, ötekiler kalanı karşılayacak olsa
|
|
324
|
+
bile. Yoksa iki nesnesini adlandıran bir makbuzu her biri için ayrı sayar; o
|
|
325
|
+
iki nesneden birini adlandıran her makbuz ötekini de adlandırıyorsa saymaz. İki
|
|
326
|
+
durumda da yanındaki bir desen, başka bir atamada açıkta kalacakken karşılanmış
|
|
327
|
+
görünebilir. Bu yüzden pay alan ve böyle bir desenle pencere içinde doğrudan ya
|
|
328
|
+
da pay alan başka desenler üzerinden makbuz paylaşan her desen onunla birlikte
|
|
329
|
+
karara bağlanır:
|
|
330
|
+
ifadelerinden biri açıkta kalırsa, tek başına sınırı aşmayan her biri
|
|
331
|
+
`indeterminate` olur, daha yakın bir sayımın karşılanmış göstereceği bir desen
|
|
332
|
+
bile. Kıyas yalnız `indeterminate` yönüne yanılır. Pencere dışındaki makbuzlar bu
|
|
326
333
|
kıyasa girmez, açığı kapatacak olsalar bile: böyle bir kalem yalnız pencere
|
|
327
334
|
içindeki makbuzlarla karara bağlanır, sınır kalemi olarak raporlanmaz. `/2` çıkış kodlarını
|
|
328
335
|
değiştirmez; bu yüzden `/2` sonucu `exceptions` olan bir koşu yine 0 ile
|
|
@@ -394,16 +394,21 @@ class FlowNetwork {
|
|
|
394
394
|
* a bound of `max` statements per Receipt.
|
|
395
395
|
*
|
|
396
396
|
* A statement is covered by one Receipt that names all of its pattern's
|
|
397
|
-
* objects or
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
397
|
+
* objects or by one Receipt for each object; a Receipt covers at most `max`
|
|
398
|
+
* statements. Every reconciled pattern draws on the Receipts, including one
|
|
399
|
+
* over the bound on its own, because its statements were observed. A pattern
|
|
400
|
+
* is shared when some maximum assignment leaves one of its statements
|
|
401
|
+
* uncovered: the evidence does not say which statements the Receipts covered.
|
|
402
|
+
* The rest are covered in every maximum assignment.
|
|
403
|
+
*
|
|
404
|
+
* The flow is exact except for a pattern over several objects that a Receipt
|
|
405
|
+
* names in part (rough). Where one draws, the patterns that share Receipts with
|
|
406
|
+
* it are all shared unless the flow covers every one of their statements, so
|
|
407
|
+
* the result errs only toward shared.
|
|
404
408
|
*
|
|
405
409
|
* A shared pattern's `group` is the patterns and Receipt groups it competes
|
|
406
|
-
* with: their statements are more than those Receipts admit
|
|
410
|
+
* with: their statements are more than those Receipts admit, or, for a pattern
|
|
411
|
+
* shared only beside a rough one, all the patterns taken together with it.
|
|
407
412
|
*/
|
|
408
413
|
export function boundAssignment(reconciled, groups, max) {
|
|
409
414
|
const S = 0
|
|
@@ -411,6 +416,18 @@ export function boundAssignment(reconciled, groups, max) {
|
|
|
411
416
|
const groupNode = (gi) => 2 + gi
|
|
412
417
|
let next = 2 + groups.length
|
|
413
418
|
const nodes = [] // { pattern, demand, targets }
|
|
419
|
+
// The groups a pattern can draw on in fact: every one that names one of its
|
|
420
|
+
// objects. A pattern over several objects that one of them names without the
|
|
421
|
+
// rest is drawn on fewer, or on some twice, so the assignment below only
|
|
422
|
+
// approximates it (rough).
|
|
423
|
+
const reach = new Map()
|
|
424
|
+
const rough = new Set()
|
|
425
|
+
for (const [pi, d] of reconciled.entries()) {
|
|
426
|
+
const tables = [...new Set(d.tables)]
|
|
427
|
+
const naming = groups.flatMap((g, gi) => (tables.some((t) => g.objects.includes(t)) ? [gi] : []))
|
|
428
|
+
reach.set(pi, naming)
|
|
429
|
+
if (tables.length > 1 && naming.some((gi) => !tables.every((t) => groups[gi].objects.includes(t)))) rough.add(pi)
|
|
430
|
+
}
|
|
414
431
|
for (const [pi, d] of reconciled.entries()) {
|
|
415
432
|
const tables = [...new Set(d.tables)]
|
|
416
433
|
const full = groups.flatMap((g, gi) => (tables.every((t) => g.objects.includes(t)) ? [gi] : []))
|
|
@@ -475,6 +492,43 @@ export function boundAssignment(reconciled, groups, max) {
|
|
|
475
492
|
}
|
|
476
493
|
for (const pi of c.patterns) if (!shared.has(pi) || over(group) > over(shared.get(pi))) shared.set(pi, group)
|
|
477
494
|
}
|
|
495
|
+
|
|
496
|
+
// Where a rough pattern draws, the assignment can leave a neighbour covered
|
|
497
|
+
// that another maximum assignment would not. So when the patterns that share
|
|
498
|
+
// Receipts with a rough pattern are not all covered, none of them is shown
|
|
499
|
+
// covered. When they are all covered, the assignment is a real one, and every
|
|
500
|
+
// maximum assignment covers them all.
|
|
501
|
+
const all = new Map()
|
|
502
|
+
const findAll = (x) => (all.get(x) === x ? x : (all.set(x, findAll(all.get(x))), all.get(x)))
|
|
503
|
+
const unite = (a, b) => {
|
|
504
|
+
for (const x of [a, b]) if (!all.has(x)) all.set(x, x)
|
|
505
|
+
all.set(findAll(a), findAll(b))
|
|
506
|
+
}
|
|
507
|
+
const patternKey = (pi) => `p${pi}`
|
|
508
|
+
for (const [pi] of reconciled.entries()) {
|
|
509
|
+
unite(patternKey(pi), patternKey(pi))
|
|
510
|
+
for (const gi of reach.get(pi)) unite(patternKey(pi), `g${gi}`)
|
|
511
|
+
}
|
|
512
|
+
const components = new Map()
|
|
513
|
+
for (const [pi] of reconciled.entries()) {
|
|
514
|
+
const root = findAll(patternKey(pi))
|
|
515
|
+
if (!components.has(root)) components.set(root, { patterns: new Set(), objects: new Set(), groups: new Set(), short: false, rough: false })
|
|
516
|
+
const c = components.get(root)
|
|
517
|
+
c.patterns.add(pi)
|
|
518
|
+
for (const t of reconciled[pi].tables || []) c.objects.add(t)
|
|
519
|
+
for (const gi of reach.get(pi)) c.groups.add(gi)
|
|
520
|
+
if (rough.has(pi)) c.rough = true
|
|
521
|
+
}
|
|
522
|
+
for (const n of nodes) if (inS(n.id)) components.get(findAll(patternKey(n.pattern))).short = true
|
|
523
|
+
for (const c of components.values()) {
|
|
524
|
+
if (!c.rough || !c.short) continue
|
|
525
|
+
const group = {
|
|
526
|
+
objects: [...c.objects].sort(),
|
|
527
|
+
receipts: [...c.groups].reduce((sum, gi) => sum + groups[gi].count, 0),
|
|
528
|
+
statements: [...c.patterns].reduce((sum, pi) => sum + reconciled[pi].delta, 0),
|
|
529
|
+
}
|
|
530
|
+
for (const pi of c.patterns) if (!shared.has(pi)) shared.set(pi, group)
|
|
531
|
+
}
|
|
478
532
|
return shared
|
|
479
533
|
}
|
|
480
534
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "reconciliation/v2-multiplicity-join-neighbour",
|
|
3
|
+
"regime": "conformance",
|
|
4
|
+
"profile": "GACS-C1",
|
|
5
|
+
"claim": "reconciliation",
|
|
6
|
+
"harness": "reconcile-v2",
|
|
7
|
+
"before": "conformance/fixtures/reconciliation/before-empty.json",
|
|
8
|
+
"after": "conformance/fixtures/reconciliation/after-join-and-orders.json",
|
|
9
|
+
"receipts": "conformance/fixtures/reconciliation/receipts-join-whole-and-parts.jsonl",
|
|
10
|
+
"mappingProfile": "conformance/fixtures/reconciliation/profile-multiplicity-1.json",
|
|
11
|
+
"expectOutcome": "exceptions",
|
|
12
|
+
"expectCounts": { "matched": 0, "indeterminate": 2, "observed-without-receipt": 0 },
|
|
13
|
+
"expectItemOutcomes": ["indeterminate"],
|
|
14
|
+
"forbidItemOutcomes": ["matched", "observed-without-receipt"],
|
|
15
|
+
"expectItemFields": { "reason": "multiplicity-shared" },
|
|
16
|
+
"rationale": "The bound is 1. One Receipt names customers and orders, one names customers, one names orders. A customers-orders join has two statements and an orders pattern has one. Covering both join statements, one with the join Receipt and one with the customers Receipt and the orders Receipt, leaves the orders statement uncovered, and no assignment covers more than two statements. So the orders pattern is not shown covered, and neither is the join.",
|
|
17
|
+
"doesNotTest": "Whether the Receipts belong to the statements. The comparison is a count against a declared bound."
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"v":"conarium-dbsnapshot/0.1","ts":"2026-08-06T12:00:00.000Z","role":"conarium_c2","source":"pg_stat_statements","entries":[{"queryid":"1","query":"SELECT \"public\".\"customers\".\"id\" FROM \"public\".\"customers\" JOIN \"public\".\"orders\" ON \"public\".\"orders\".\"customer_id\" = \"public\".\"customers\".\"id\"","calls":2},{"queryid":"2","query":"SELECT \"public\".\"orders\".* FROM \"public\".\"orders\" LIMIT $1","calls":1}]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{"v":"conarium-receipt/0.3","ts":"2026-08-06T11:00:00.000Z","request":{"tool":"query","target":"zion-rest","argsHash":"sha256:00"},"dataRefs":[{"source":"zion-rest","object":"zion.customers","fieldsRequested":[]},{"source":"zion-rest","object":"zion.orders","fieldsRequested":[]}],"policy":{"decision":"allow"},"chain":{"seq":1}}
|
|
2
|
+
{"v":"conarium-receipt/0.3","ts":"2026-08-06T11:10:00.000Z","request":{"tool":"query","target":"zion-rest","argsHash":"sha256:00"},"dataRefs":[{"source":"zion-rest","object":"zion.customers","fieldsRequested":[]}],"policy":{"decision":"allow"},"chain":{"seq":2}}
|
|
3
|
+
{"v":"conarium-receipt/0.3","ts":"2026-08-06T11:20:00.000Z","request":{"tool":"query","target":"zion-rest","argsHash":"sha256:00"},"dataRefs":[{"source":"zion-rest","object":"zion.orders","fieldsRequested":[]}],"policy":{"decision":"allow"},"chain":{"seq":3}}
|
package/docs/RECEIPT-SPEC.md
CHANGED
|
@@ -581,8 +581,8 @@ when the profile lists at least one exclusion rule.
|
|
|
581
581
|
|
|
582
582
|
A declared multiplicity bound is how many statements one Receipt may cover,
|
|
583
583
|
however many objects the Receipt names. A statement is covered by one in-window
|
|
584
|
-
Receipt that names all of its pattern's objects or
|
|
585
|
-
|
|
584
|
+
Receipt that names all of its pattern's objects or by an in-window Receipt for
|
|
585
|
+
each object. The patterns whose
|
|
586
586
|
objects all have a Receipt in the Window draw on the in-window Receipts; a
|
|
587
587
|
pattern with an object no Receipt in the Window names takes its outcome from
|
|
588
588
|
that object and draws on none.
|
|
@@ -594,14 +594,23 @@ were observed. The statements of the patterns that draw are assigned to
|
|
|
594
594
|
Receipts as a maximum flow. Of the patterns not over the bound on their own,
|
|
595
595
|
one that some maximum assignment leaves with a statement uncovered is
|
|
596
596
|
`indeterminate` with reason `multiplicity-shared`: the evidence does not say
|
|
597
|
-
which statements the Receipts covered. Every other pattern is `matched`.
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
draw
|
|
597
|
+
which statements the Receipts covered. Every other pattern is `matched`.
|
|
598
|
+
|
|
599
|
+
The assignment is exact except for a pattern that draws, over several objects,
|
|
600
|
+
where an in-window Receipt names one of its objects but not all of them. Such a
|
|
601
|
+
pattern
|
|
602
|
+
draws only on the Receipts that name it whole, where there are any. Where there
|
|
603
|
+
are none, it is drawn against each object's Receipts: objects named by exactly
|
|
604
|
+
the same Receipts share one draw, and a Receipt that names two of its objects
|
|
605
|
+
that do not share a draw is counted once for each. Either way the assignment
|
|
606
|
+
can show a pattern beside it covered when another maximum assignment would not.
|
|
607
|
+
So the patterns that draw and share an in-window Receipt with such a pattern,
|
|
608
|
+
directly or through other patterns that draw, are taken together; a pattern
|
|
609
|
+
that draws on none is not among them. When the assignment leaves any
|
|
610
|
+
of their statements uncovered, every one of them not over the bound on its own
|
|
611
|
+
is `indeterminate` with reason `multiplicity-shared`. When it covers them all,
|
|
612
|
+
the assignment is a real one, and they are `matched`. The comparison therefore
|
|
613
|
+
errs only toward `indeterminate`.
|
|
605
614
|
|
|
606
615
|
A `multiplicity-exceeded` item carries
|
|
607
616
|
`multiplicity: { bound, object, receipts, statements }`: `object` is the object
|
|
@@ -613,7 +622,10 @@ competes with for Receipts: `objects` are the objects they draw for, `receipts`
|
|
|
613
622
|
the in-window Receipts they can draw on, and `statements` their call deltas
|
|
614
623
|
added together. A pattern drawn one Receipt per object can compete in two such
|
|
615
624
|
groups; it reports the one whose statements are furthest over
|
|
616
|
-
`receipts × bound`.
|
|
625
|
+
`receipts × bound`. A pattern that is `indeterminate` only because it is taken
|
|
626
|
+
together with a pattern over several objects reports all the patterns taken
|
|
627
|
+
together: their objects, the in-window Receipts that name one of them, and
|
|
628
|
+
their call deltas added together.
|
|
617
629
|
|
|
618
630
|
A `/2` item whose `reason` is `window-boundary` carries `requiredSkewMs` and the
|
|
619
631
|
uncovered `objects`. When the profile declares a multiplicity bound it also
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Claims review — 0.3.8
|
|
2
|
+
|
|
3
|
+
- base: v0.3.7
|
|
4
|
+
- head: 438c920
|
|
5
|
+
- surface: sha256:0d261576d21c47737ed2ba9096af608c3d7574dcbcfdbbb5652acc49c0a870ce
|
|
6
|
+
- verdict: pass
|
|
7
|
+
- reviewer: Claude. Three claim surfaces changed between v0.3.7 and HEAD:
|
|
8
|
+
`LIMITATIONS.md`, `LIMITATIONS.tr.md` and `docs/RECEIPT-SPEC.md`
|
|
9
|
+
(`node test/denetci.mjs input v0.3.7 HEAD`).
|
|
10
|
+
|
|
11
|
+
The release changes `boundAssignment` in `bin/conarium-reconcile.mjs`: the
|
|
12
|
+
patterns that draw and share an in-window Receipt with a pattern that draws,
|
|
13
|
+
over several objects, that a Receipt names in part are decided together. It
|
|
14
|
+
adds one conformance case, two tests in `test/reconcile_cli.test.mjs` and
|
|
15
|
+
`test/bound_assignment_brute.test.mjs`, which enumerates every assignment of
|
|
16
|
+
400 random inputs (up to three patterns of one or two objects each, over three
|
|
17
|
+
objects, up to three Receipt groups, a bound of 1 or 2) and compares
|
|
18
|
+
`boundAssignment` with the rule.
|
|
19
|
+
|
|
20
|
+
Each new sentence was set against what establishes it. "Seen failing" means
|
|
21
|
+
the test went red when the code it names was changed, and green again when it
|
|
22
|
+
was restored.
|
|
23
|
+
|
|
24
|
+
- "A statement is covered by one in-window Receipt that names all of its
|
|
25
|
+
pattern's objects or by an in-window Receipt for each object": the rule the
|
|
26
|
+
brute-force test enumerates, and `one receipt that names both objects of a
|
|
27
|
+
join covers one statement of it`, `a join is covered by one receipt for each
|
|
28
|
+
of its objects`.
|
|
29
|
+
- "The assignment is exact except for a pattern that draws, over several
|
|
30
|
+
objects, where an in-window Receipt names one of its objects but not all of
|
|
31
|
+
them": the
|
|
32
|
+
brute-force test requires the same answer as the rule, both ways, on every
|
|
33
|
+
input with no such pattern (more than 50 of the 400). Seen failing with
|
|
34
|
+
every pattern treated as one a Receipt names in part.
|
|
35
|
+
- "Such a pattern draws only on the Receipts that name it whole, where there
|
|
36
|
+
are any. Where there are none, it is drawn against each object's Receipts":
|
|
37
|
+
`a join that some receipt names whole draws only on receipts that name it
|
|
38
|
+
whole (LIMITATIONS.md)` and `a join no receipt names whole, named by
|
|
39
|
+
receipts that overlap, counts a shared receipt once per object
|
|
40
|
+
(LIMITATIONS.md)`.
|
|
41
|
+
- "Either way the assignment can show a pattern beside it covered when another
|
|
42
|
+
maximum assignment would not": the brute-force test fails on 0.3.7's
|
|
43
|
+
`boundAssignment`, and so do `a pattern beside a join that some receipt
|
|
44
|
+
names whole is not matched when the join could take its receipt` and
|
|
45
|
+
`conformance/cases/reconciliation/v2-multiplicity-join-neighbour.json`.
|
|
46
|
+
- "So the patterns that draw and share an in-window Receipt with such a
|
|
47
|
+
pattern, directly or through other patterns that draw, are taken together":
|
|
48
|
+
`a pattern on a receipt that a join could take for one of its objects is not
|
|
49
|
+
matched beside the join` (the Receipt names one object of the join). Seen
|
|
50
|
+
failing with the patterns not joined through their Receipts, with only the
|
|
51
|
+
Receipts that name a pattern whole joined, and with no pattern marked; each
|
|
52
|
+
also turns the brute-force test and the test above red. "a pattern that
|
|
53
|
+
draws on none is not among them": `a pattern with an object no receipt names
|
|
54
|
+
does not draw on its neighbour's receipts` (the customers pattern stays
|
|
55
|
+
matched beside a join whose orders no Receipt names).
|
|
56
|
+
- "When the assignment leaves any of their statements uncovered, every one of
|
|
57
|
+
them not over the bound on its own is `indeterminate` with reason
|
|
58
|
+
`multiplicity-shared`": the two tests above read both items.
|
|
59
|
+
- "When it covers them all, the assignment is a real one, and they are
|
|
60
|
+
`matched`": the brute-force test finds no pattern returned matched that some
|
|
61
|
+
maximum assignment leaves uncovered; `a join no receipt names whole is
|
|
62
|
+
covered by receipts that each name some of its objects` stays matched.
|
|
63
|
+
- "The comparison therefore errs only toward `indeterminate`": the
|
|
64
|
+
brute-force test, within its inputs. See finding 2.
|
|
65
|
+
- `LIMITATIONS.md` "even one that a closer count would show covered": the
|
|
66
|
+
brute-force test requires at least one pattern the rule matches that
|
|
67
|
+
`boundAssignment` shares.
|
|
68
|
+
- "reports all the patterns taken together: their objects, the in-window
|
|
69
|
+
Receipts that name one of them, and their call deltas added together": the
|
|
70
|
+
first test above reads `{ bound: 1, objects: [customers, orders],
|
|
71
|
+
receipts: 3, statements: 3 }` on the orders item. Seen failing with the
|
|
72
|
+
Receipt count set to 0.
|
|
73
|
+
- `LIMITATIONS.tr.md` says the same as `LIMITATIONS.md`, sentence for
|
|
74
|
+
sentence.
|
|
75
|
+
|
|
76
|
+
## Findings
|
|
77
|
+
|
|
78
|
+
### 1. LIMITATIONS.md — which way 0.3.7's comparison errs
|
|
79
|
+
|
|
80
|
+
- Claim: "The comparison errs toward `indeterminate` in two cases. A pattern
|
|
81
|
+
over several objects that some receipt in the window names whole draws only
|
|
82
|
+
on the receipts that name it whole, even when the others would cover the
|
|
83
|
+
rest." (0.3.7, also in `LIMITATIONS.tr.md` and `docs/RECEIPT-SPEC.md`).
|
|
84
|
+
- Mechanism: in 0.3.7 such a pattern's node drew only on the groups that name
|
|
85
|
+
it whole.
|
|
86
|
+
- Why it falls short: that errs toward `indeterminate` for the pattern itself,
|
|
87
|
+
not for the patterns beside it. With a bound of 1, Receipts naming customers
|
|
88
|
+
and orders, customers, and orders, two statements of the join and one on
|
|
89
|
+
orders, 0.3.7 reported the orders pattern `matched`; one maximum assignment
|
|
90
|
+
covers both join statements and leaves the orders statement uncovered. An
|
|
91
|
+
independent read of draft-08 found it; it was reproduced on the published
|
|
92
|
+
0.3.7 package.
|
|
93
|
+
- Disposition: fixed in `db4941b`; the sentence is replaced in all three
|
|
94
|
+
files.
|
|
95
|
+
|
|
96
|
+
### 2. docs/RECEIPT-SPEC.md — how far "errs only toward" is established
|
|
97
|
+
|
|
98
|
+
- Claim: "The comparison therefore errs only toward `indeterminate`."
|
|
99
|
+
- Mechanism: the argument in the comment on `boundAssignment` (a flow that
|
|
100
|
+
covers every statement of a component is an assignment the rule accepts;
|
|
101
|
+
otherwise every pattern in a component with a rough pattern is shared), and
|
|
102
|
+
the brute-force test.
|
|
103
|
+
- Why it falls short: the test enumerates inputs of up to three patterns of
|
|
104
|
+
one or two objects each, three objects and three Receipt groups. Patterns
|
|
105
|
+
over three objects, and anything larger, rest on the argument.
|
|
106
|
+
- Disposition: accepted, with the test's inputs stated here.
|
|
107
|
+
|
|
108
|
+
### 3. docs/RECEIPT-SPEC.md — which patterns are taken together
|
|
109
|
+
|
|
110
|
+
- Claim: "So the patterns that share an in-window Receipt with such a pattern,
|
|
111
|
+
directly or through other patterns, are taken together" (a draft of this
|
|
112
|
+
release, also in `LIMITATIONS.md` and `LIMITATIONS.tr.md`).
|
|
113
|
+
- Mechanism: the components in `boundAssignment` are built over
|
|
114
|
+
`result.reconciled` only.
|
|
115
|
+
- Why it falls short: a pattern with an object no in-window Receipt names
|
|
116
|
+
shares a Receipt with its neighbours but draws on none, and is not taken
|
|
117
|
+
together with them. With one Receipt naming customers, two statements of a
|
|
118
|
+
customers-orders join and one on customers, the join is
|
|
119
|
+
`observed-without-receipt` and the customers pattern stays `matched`. An
|
|
120
|
+
independent read of the pull request text found it.
|
|
121
|
+
- Disposition: reworded in `438c920` to name the patterns that draw, in all
|
|
122
|
+
three files.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conarium-ai/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
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.",
|