You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0b27f28
Browse filesBrowse the repository at this point in the historyBrowse files
feat(s004): property-based testing, and a planted defect it finds
The canonicalisers, the argument validator, the tighten-only state modifier and
the receipt chain are exercised by generated input rather than only by chosen
input. That matters most where the code answers is this the same thing: a
fingerprint decides whether an approval still matches the call being made, and a
definition digest decides whether a server's tool is the one the owner approved.
Both are wrong in the same two ways, saying different about two spellings of one
value or same about two different values, and an example test covers the spellings
somebody thought of, which is exactly the set an attacker will not use.
The suite proves it can fail. The defect is planted and committed rather than
described: a canonicaliser concatenating its fields with no separator, which is
stable, order-independent, looks right, and identifies two different definitions
whenever a boundary moves between adjacent fields. The example-style assertions
all pass on it; generated input finds the collision.
Running wider than the gate does immediately found a defect in one property. It
passed at the gate's hundred cases and failed at three thousand with
FilterTooNarrowError, because it filtered for an absent key rather than
constructing one. A property that has only ever run at the gate's width is a
property nobody has tested, and the convention now says so.
At twenty thousand cases six properties appear to fail and none does: they are
ExUnit timeouts, since the per-test limit is sixty seconds and a property is one
test however many cases it runs. In the summary a timeout and a violated property
look identical, so the documented wide run carries the timeout with the reason.
Chosen over slices 100 and 110 on the published criteria rather than on
preference. The OpenSSF gold tier asks for dynamic analysis enabling many
assertions; Elixir has no focused fuzzing library and property-based testing is
the recognised equivalent, which Scorecard also accepts. It is the cheapest open
gold criterion and the only candidate with no criterion needing a person at a
desktop.
Slice 120's own check caught this slice on its first real opportunity: adding the
dependency failed trinity.third_party_licenses --check until the published list
was regenerated. It also showed the list did not say which build environments its
components come from, which the generated file now states.
Statement coverage is unchanged at 80.31% against gold's 90%, and this slice does
not claim otherwise: properties exercise existing lines harder rather than
reaching new ones.
mix gate: 746 passed (14 properties, 732 tests), 18 excluded.
Signed-off-by: Ayla Croft <aylacroft@proton.me>
Copy file name to clipboardExpand all lines: VERSIONS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,7 @@ never pin a version hex marks as retired or vulnerable.
90
90
|`pgvector`|~> 0.4.1 | ✅ in `mix.lock`| Vectors on the Postgres path: `memories.embedding_vector vector(384)` under an HNSW cosine index, searched by `Trinity.Memory.VectorStores.Pgvector` (Slice 032). The postgres job runs on the `pgvector/pgvector:pg17` image. Split from the postgrex row at Slice 010. |
91
91
|`oban`|~> 2.24 | ✅ in `mix.lock`| Uses `Oban.Engines.Lite` on SQLite and `Oban.Engines.Basic` on Postgres (the adapter is compile time, ADR-0002, so the engine is too). ⚠️ Oban Pro Workflows/Smart engine are Postgres-only. Added at Slice 050 (2.24.1 measured on hex.pm 2026-09-22, Apache-2.0). |
92
92
|`sbom`|~> 0.11 | ✅ in `mix.lock`| CycloneDX software bill of materials, generated by the gate from mix.lock (`mix sbom.cyclonedx`). Maintained by erlef, the Erlang Ecosystem Foundation; BSD-3-Clause, CC0-1.0, MIT and Apache-2.0; 0.11.0 measured on hex.pm 2026-09-23, released 2026-09-22. Dev and test only: it ships in no artifact, and the gate validates its output, so a defect in it fails the build rather than producing a quietly wrong bill. Added at Slice 002. |
93
+
|`stream_data`|~> 1.4 | ✅ in `mix.lock`| Property-based testing: generated input for `test/property`. Apache-2.0; 1.4.0 measured on hex.pm 2026-09-24, released 2026-07-14. Test only, so it ships in no artifact. Elixir has no focused fuzzing library and property-based testing is what the OpenSSF gold criterion `dynamic_analysis` accepts in its place, which is why this is a dependency rather than a habit. Added at Slice 004. |
93
94
|`jose`|~> 1.11 | ✅ in `mix.lock`| JOSE (JWK, JWS, JWKS) over OTP's crypto, for the MCP resource server's token validation and the personal profile's embedded authorization server. MIT; 1.11.12 measured on hex.pm 2026-09-22. Not joken, a layer over it this tree does not need. Added at Slice 062. |
94
95
|`oban_web`|~> 2.13 | ✅ in `mix.lock`| The Oban dashboard, a LiveView mounted at /oban (dev, and behind `config :trinity, :oban_web, true` elsewhere). Apache-2.0 on hex.pm since the 2.12 line (2.13.0 measured 2026-09-22); the plan of 2026-09-05 wrote it in when it was commercial. Added at Slice 050. |
Copy file name to clipboardExpand all lines: lib/trinity/versions.ex
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,13 @@ defmodule Trinity.Versions do
160
160
note:
161
161
"CycloneDX software bill of materials, generated by the gate from mix.lock (`mix sbom.cyclonedx`). Maintained by erlef, the Erlang Ecosystem Foundation; BSD-3-Clause, CC0-1.0, MIT and Apache-2.0; 0.11.0 measured on hex.pm 2026-09-23, released 2026-09-22. Dev and test only: it ships in no artifact, and the gate validates its output, so a defect in it fails the build rather than producing a quietly wrong bill. Added at Slice 002."
162
162
},
163
+
%{
164
+
name: "stream_data",
165
+
pin: "~> 1.4",
166
+
lock: "stream_data",
167
+
note:
168
+
"Property-based testing: generated input for `test/property`. Apache-2.0; 1.4.0 measured on hex.pm 2026-09-24, released 2026-07-14. Test only, so it ships in no artifact. Elixir has no focused fuzzing library and property-based testing is what the OpenSSF gold criterion `dynamic_analysis` accepts in its place, which is why this is a dependency rather than a habit. Added at Slice 004."
0 commit comments