mirror of
https://github.com/hanzoai/trust.git
synced 2026-10-30 14:54:58 +00:00
A cloud plugin (HIP-0106, the captable/plans shape) that publishes a control inventory, folds it onto published framework clause lists, and reads evidence from the platform's audit trail at /v1/trust/*. The inventory is the product. Every entry names the repo and path where the mechanism lives, and five entries record that a mechanism is weaker than a Hanzo page claims — the segment-wise prefix test and in-module key custody do not exist, the trail captures no request body, and its user column is unindexed. An inventory that cannot say that is worth nothing. Coverage is a fold, never a field. A mapping is worth the weakest of what the control claims, how much of the clause it answers, and whether anything can fail on its behalf; an absent control is worth nothing however it maps. The denominator is each framework's whole published clause list, so uncovered clauses stay visible. Every count carries its unit and nothing emits a boolean. The build validates before it bundles: an unknown status, a mapping to an undeclared clause, or prose claiming a certification stops the build, so there is no artifact and therefore no number to misread. No database and no writes — the inventory compiles into the bundle, so no tenant can inflate its own coverage. The audit query carries no org field; the host binds the trail to the tenant it validated. 77 tests over the built artifact in a bare vm, proven to fail by mutation.
15 lines
453 B
JavaScript
15 lines
453 B
JavaScript
// Runs every *.test.mjs beside this file. `npm --prefix goja test`.
|
|
|
|
import { readdirSync } from "node:fs";
|
|
import { fileURLToPath } from "node:url";
|
|
import { dirname, join } from "node:path";
|
|
import { settled } from "./harness.mjs";
|
|
|
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
|
|
for (const f of readdirSync(here).filter((f) => f.endsWith(".test.mjs")).sort()) {
|
|
console.log(`\n# ${f}`);
|
|
await import(join(here, f));
|
|
await settled();
|
|
}
|