proof-harness 0.1.0-next.5 → 0.1.0-next.6
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/COMPATIBILITY.md +25 -1
- package/PROOF_SDK_CONTRACT.md +9 -86
- package/README.md +5 -5
- package/cli/config.mjs +5 -15
- package/cli/proof-harness.mjs +1 -5
- package/dist/{mission-types-Dr5rBHYO.d.ts → mission-types-bdwBGf7O.d.ts} +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js.map +1 -1
- package/dist/playwright.d.ts +1 -1
- package/dist/shared.d.ts +2 -167
- package/dist/shared.js +0 -32
- package/dist/shared.js.map +1 -1
- package/dist/{trace-types-DkIzq-l9.d.ts → trace-types-CbMb65OB.d.ts} +1 -22
- package/package.json +1 -1
- package/cli/engines/proof_module_check.mjs +0 -653
- package/cli/engines/scan_module_meta.mjs +0 -352
package/COMPATIBILITY.md
CHANGED
|
@@ -11,7 +11,7 @@ Consumers must pin an exact prerelease version, for example:
|
|
|
11
11
|
```json
|
|
12
12
|
{
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"proof-harness": "0.1.0-next.
|
|
14
|
+
"proof-harness": "0.1.0-next.6"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
```
|
|
@@ -27,6 +27,30 @@ versions rather than guessing how to interpret them.
|
|
|
27
27
|
|
|
28
28
|
## Prerelease migration notes
|
|
29
29
|
|
|
30
|
+
### 0.1.0-next.6
|
|
31
|
+
|
|
32
|
+
**Removed: the module-descriptor system.** It served the consumer's planner
|
|
33
|
+
(what a module is for, what a buyer must decide, where answers land) and never
|
|
34
|
+
fed verification, so it is now consumer-owned. Gone from the package:
|
|
35
|
+
|
|
36
|
+
- CLI commands `modules` and `modules-check` (and the `modules` step inside
|
|
37
|
+
`build`); the `.proof/module-policy.json` accept-list introduced in
|
|
38
|
+
`next.5` went with the checker.
|
|
39
|
+
- `proof-harness/shared` exports `ModuleMeta`, `ModuleDecision`,
|
|
40
|
+
`ModuleInput`, `ModuleDefault`, `ModuleSeam`, `ScannedModule`,
|
|
41
|
+
`ModulesArtifact`, `MODULE_DESCRIPTOR_SCHEMA_VERSION`, `MODULE_KINDS`,
|
|
42
|
+
`APPLIED_BY`, `ModuleKind`, `AppliedBy`, `isModuleKind`, `isAppliedBy`.
|
|
43
|
+
- The `proof.config.mjs` keys `artifacts.modules`, `policies.module`,
|
|
44
|
+
`roots.modules`, `roots.sharedModules`, and `moduleKinds` (now ignored if
|
|
45
|
+
supplied).
|
|
46
|
+
|
|
47
|
+
Migration: consumers using the system vendor it from
|
|
48
|
+
`proof-harness@0.1.0-next.5` (Apache-2.0) — `cli/engines/scan_module_meta.mjs`,
|
|
49
|
+
`cli/engines/proof_module_check.mjs`, and `src/shared/module-types.ts` plus the
|
|
50
|
+
two vocabularies above — and point their `module.meta.ts` type imports at the
|
|
51
|
+
vendored copy. Consumers that never ran `proof:modules` are unaffected. Trace,
|
|
52
|
+
mission, and health protocol versions are unchanged.
|
|
53
|
+
|
|
30
54
|
### 0.1.0-next.5
|
|
31
55
|
|
|
32
56
|
No artifact schema or protocol changes. Three behavioral changes:
|
package/PROOF_SDK_CONTRACT.md
CHANGED
|
@@ -9,9 +9,6 @@ instead; this document is for anyone _consuming_ the template.
|
|
|
9
9
|
|
|
10
10
|
> **"Manifest" in this document always means the _mission_ manifest**
|
|
11
11
|
> (`.proof/current-mission.json`) — the file that pins what one PR must prove.
|
|
12
|
-
> It is unrelated to a **module descriptor** (`module.meta.ts` →
|
|
13
|
-
> `.proof/modules.json`), which describes what a module is for and what a buyer
|
|
14
|
-
> must decide before using it. See §3.1 below.
|
|
15
12
|
|
|
16
13
|
- **Version:** 1 (`schemaVersion` in every manifest and artifact)
|
|
17
14
|
- **Stability:** The shapes in this document are the contract. Additive
|
|
@@ -534,7 +531,6 @@ Everything the template produces that the consumer consumes.
|
|
|
534
531
|
| Output | Location | Emitted by | Cadence |
|
|
535
532
|
| --------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------- | -------------------------------------- |
|
|
536
533
|
| Capability map | `.proof/capabilities.json` (gitignored) | `pnpm proof:scan` (via `proof:build` in setup/CI) | Every setup + CI run |
|
|
537
|
-
| Module descriptors | `.proof/modules.json` (gitignored) | `pnpm proof:modules` (via `proof:build` in setup/CI) | Every setup + CI run |
|
|
538
534
|
| Schema + RLS classification | `.proof/schema.json` (gitignored) | `pnpm proof:parse` (via `proof:build` in setup/CI) | Every setup + CI run |
|
|
539
535
|
| Proof action allowlist | `app/__shared/proof-runtime/action-registry.generated.ts` | `pnpm proof:registry` | When action requirements/probes change |
|
|
540
536
|
| PR verification status | GitHub check `Proof` | `pnpm proof:check` in `.github/workflows/ci.yml` | Every PR push |
|
|
@@ -714,82 +710,16 @@ from another commit or whose `specFile` no longer exists with `stale_trace`.
|
|
|
714
710
|
|
|
715
711
|
---
|
|
716
712
|
|
|
717
|
-
### 3.1 Module descriptors —
|
|
713
|
+
### 3.1 Module descriptors — moved to the consumer
|
|
718
714
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
what a
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
Docker, database, or migration aggregate** — it reads the filesystem and
|
|
728
|
-
`capabilities.json`, and takes about a second.
|
|
729
|
-
|
|
730
|
-
Each entry has a declared half and a derived half:
|
|
731
|
-
|
|
732
|
-
```jsonc
|
|
733
|
-
{
|
|
734
|
-
"schemaVersion": 1,
|
|
735
|
-
"modules": [
|
|
736
|
-
{
|
|
737
|
-
// Declared in app/__core/<module>/module.meta.ts
|
|
738
|
-
"id": "user-auth",
|
|
739
|
-
"kind": "core", // core | extension | business | generated
|
|
740
|
-
"purpose": "Signs people in and proves who they are — …",
|
|
741
|
-
"env": [],
|
|
742
|
-
"decisions": [
|
|
743
|
-
{
|
|
744
|
-
"id": "mfa_enforcement", // snake_case, unique across all modules
|
|
745
|
-
"ask": "Must people use a second factor to sign in?",
|
|
746
|
-
"because": "Stricter is safer but adds a step for everyone.",
|
|
747
|
-
"options": [{ "value": "optional", "means": "…" }],
|
|
748
|
-
"applied_by": "config", // config | content | code
|
|
749
|
-
"applies": ["app/__core/user-auth/src/config.ts#MFA_POLICY"],
|
|
750
|
-
},
|
|
751
|
-
],
|
|
752
|
-
"inputs": [
|
|
753
|
-
/* values the buyer supplies rather than picks */
|
|
754
|
-
],
|
|
755
|
-
"defaults": [
|
|
756
|
-
/* what we chose for them, each with a seam */
|
|
757
|
-
],
|
|
758
|
-
|
|
759
|
-
// Derived from source — never written by hand
|
|
760
|
-
"path": "app/__core/user-auth",
|
|
761
|
-
"entities": [], // tables its own migrations create
|
|
762
|
-
"requires": ["config", "user-management"],
|
|
763
|
-
"uses_shared": ["ui", "db-supabase"],
|
|
764
|
-
"actions": [{ "name": "signin", "verb": null, "object": null }],
|
|
765
|
-
"proven": { "specs": 1, "mutations": 0 },
|
|
766
|
-
},
|
|
767
|
-
],
|
|
768
|
-
// Tables no descriptor claims — today, the ones owned by __shared modules.
|
|
769
|
-
"unowned_tables": [
|
|
770
|
-
{
|
|
771
|
-
"table": "audit_logs",
|
|
772
|
-
"module": "audit-logging",
|
|
773
|
-
"path": "app/__shared/audit-logging",
|
|
774
|
-
},
|
|
775
|
-
],
|
|
776
|
-
}
|
|
777
|
-
```
|
|
778
|
-
|
|
779
|
-
**Two audiences, one file.** A planner reads `purpose`, `decisions`, `inputs`
|
|
780
|
-
and `applied_by` — business language, no paths, roughly 80 tokens per decision.
|
|
781
|
-
The agent that _applies_ an answer additionally reads `applies`, which names
|
|
782
|
-
every place the answer lands, including files in other modules.
|
|
783
|
-
|
|
784
|
-
**Every claim is checked.** `pnpm proof:modules:check` fails when a module has
|
|
785
|
-
no descriptor, when an id does not match its directory, when a decision has
|
|
786
|
-
fewer than two options or a duplicate id, when a declared environment variable
|
|
787
|
-
is undocumented or an undeclared one is read, and — the one that matters most in
|
|
788
|
-
practice — **when a seam no longer exists**. A moved file fails CI instead of
|
|
789
|
-
quietly sending the next agent to the wrong place.
|
|
790
|
-
|
|
791
|
-
Circular dependencies in the derived graph are **reported, not failed**, while a
|
|
792
|
-
known inversion is being resolved.
|
|
715
|
+
Until `0.1.0-next.5` the package also shipped a module-descriptor system
|
|
716
|
+
(`module.meta.ts` → `.proof/modules.json`, plus the `modules` and
|
|
717
|
+
`modules-check` commands). It served the consumer's *planner* — what a module
|
|
718
|
+
is for, what a buyer must decide, where answers land — and never fed
|
|
719
|
+
verification, so as of `0.1.0-next.6` it is consumer-owned and no longer part
|
|
720
|
+
of this package. The last release carrying it is `proof-harness@0.1.0-next.5`
|
|
721
|
+
(Apache-2.0), whose implementation is the reference for consumers vendoring
|
|
722
|
+
the system into their own repository.
|
|
793
723
|
|
|
794
724
|
## 4. Failure contract
|
|
795
725
|
|
|
@@ -956,13 +886,6 @@ operation }` assertion has neither a matching mutation nor a valid entry in
|
|
|
956
886
|
`seed.workspace` writes only `name`; a schema that requires more states it
|
|
957
887
|
via `seed.workspace(name, { columns })` or `workspaceColumns` on
|
|
958
888
|
`assert.tenantIsolation`.
|
|
959
|
-
- **Accepted descriptor gaps expire.** `proof:modules:check` accepts an
|
|
960
|
-
undescribed required-root module only through `.proof/module-policy.json`
|
|
961
|
-
(`schemaVersion: 1`, `acceptedUndescribed: [{ module, reason }]`), each
|
|
962
|
-
entry carrying a written reason, and prints the accepted backlog on every
|
|
963
|
-
run. An acceptance whose module gains a descriptor or no longer exists
|
|
964
|
-
fails as `module_policy_stale`, so paid-down debt leaves the file rather
|
|
965
|
-
than lingering as invisible permission.
|
|
966
889
|
- **A mutation that is not demonstrably live cannot judge a proof.** The
|
|
967
890
|
mutation runner never (re)applies migrations; it starts (or adopts) the
|
|
968
891
|
shared dev server before the first defect is planted, then reads each
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Public prereleases are published under the npm `next` tag. Pin an exact
|
|
|
17
17
|
prerelease version while the API is stabilizing:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
pnpm add proof-harness@0.1.0-next.
|
|
20
|
+
pnpm add proof-harness@0.1.0-next.6
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
The package exposes environment-specific entry points:
|
|
@@ -39,8 +39,8 @@ on:
|
|
|
39
39
|
|
|
40
40
|
- **Assumes nothing about your schema** — trace recording and the assertion
|
|
41
41
|
vocabulary, mission validation, coverage and its ratchet, drift, mutation
|
|
42
|
-
testing,
|
|
43
|
-
|
|
42
|
+
testing, and the CLI. These read your generated schema and config, or take
|
|
43
|
+
what you give them.
|
|
44
44
|
- **Assumes the conventional Supabase/workspace layout** — `seed.*` (a
|
|
45
45
|
`workspaces` table with a `name` column, a `workspace_members` join table,
|
|
46
46
|
and a `public.users` mirror maintained by a `handle_new_user` trigger) and
|
|
@@ -61,8 +61,8 @@ code via `allowProofServiceHosts`; there is deliberately no environment
|
|
|
61
61
|
override.
|
|
62
62
|
|
|
63
63
|
The package also provides one `proof-harness` executable with `scan`, `parse`,
|
|
64
|
-
`registry`, `build`, `verify`, `coverage`, `inventory`, `drift`, `
|
|
65
|
-
|
|
64
|
+
`registry`, `build`, `verify`, `coverage`, `inventory`, `drift`, and `mutate`
|
|
65
|
+
subcommands. Commands read repository paths from
|
|
66
66
|
`proof.config.mjs`; without one they use a conventional application layout.
|
|
67
67
|
Product migration aggregation and explicit mutation definitions remain
|
|
68
68
|
repository-owned trust inputs rather than package defaults.
|
package/cli/config.mjs
CHANGED
|
@@ -6,11 +6,15 @@ const DEFAULT_CONFIG = Object.freeze({
|
|
|
6
6
|
artifacts: {
|
|
7
7
|
capabilities: ".proof/capabilities.json",
|
|
8
8
|
schema: ".proof/schema.json",
|
|
9
|
-
modules: ".proof/modules.json",
|
|
10
9
|
traces: ".proof/traces",
|
|
11
10
|
drift: ".proof/drift.json",
|
|
12
11
|
mutations: ".proof/mutations",
|
|
13
12
|
},
|
|
13
|
+
// The module-descriptor system (module.meta.ts → modules.json and its
|
|
14
|
+
// checker) moved to the consumer template in 0.1.0-next.6: it serves the
|
|
15
|
+
// planner, which is product, not verification. Its former config keys
|
|
16
|
+
// (artifacts.modules, policies.module, roots.modules, roots.sharedModules,
|
|
17
|
+
// moduleKinds) are ignored if a proof.config.mjs still supplies them.
|
|
14
18
|
mission: {
|
|
15
19
|
current: ".proof/current-mission.json",
|
|
16
20
|
directory: ".proof/missions",
|
|
@@ -19,13 +23,10 @@ const DEFAULT_CONFIG = Object.freeze({
|
|
|
19
23
|
coverage: ".proof/coverage-policy.json",
|
|
20
24
|
mutation: ".proof/mutation-policy.json",
|
|
21
25
|
migration: ".proof/migration-policy.json",
|
|
22
|
-
module: ".proof/module-policy.json",
|
|
23
26
|
},
|
|
24
27
|
roots: {
|
|
25
28
|
source: "app",
|
|
26
29
|
actions: ["app/__core", "app/__business-logic", "app/__extensions"],
|
|
27
|
-
modules: ["app/__core", "app/__extensions", "app/__business-logic"],
|
|
28
|
-
sharedModules: "app/__shared",
|
|
29
30
|
proofs: "e2e/proofs",
|
|
30
31
|
fixtures: "e2e/fixtures",
|
|
31
32
|
migrations: "supabase/migrations",
|
|
@@ -42,13 +43,6 @@ const DEFAULT_CONFIG = Object.freeze({
|
|
|
42
43
|
envExample: ".env.local.example",
|
|
43
44
|
supabaseConfig: "supabase/config.toml",
|
|
44
45
|
},
|
|
45
|
-
moduleKinds: {
|
|
46
|
-
required: [
|
|
47
|
-
{ root: "app/__core", kind: "core" },
|
|
48
|
-
{ root: "app/__extensions", kind: "extension" },
|
|
49
|
-
],
|
|
50
|
-
optional: [{ root: "app/__business-logic", kind: "business" }],
|
|
51
|
-
},
|
|
52
46
|
driftSources: ["app", "package.json"],
|
|
53
47
|
mutationCatalog: null,
|
|
54
48
|
});
|
|
@@ -66,10 +60,6 @@ function mergeConfig(config = {}) {
|
|
|
66
60
|
...DEFAULT_CONFIG.registryAliases,
|
|
67
61
|
...config.registryAliases,
|
|
68
62
|
},
|
|
69
|
-
moduleKinds: {
|
|
70
|
-
...DEFAULT_CONFIG.moduleKinds,
|
|
71
|
-
...config.moduleKinds,
|
|
72
|
-
},
|
|
73
63
|
};
|
|
74
64
|
}
|
|
75
65
|
|
package/cli/proof-harness.mjs
CHANGED
|
@@ -15,8 +15,6 @@ const ENGINES = {
|
|
|
15
15
|
verify: "proof_verify.mjs",
|
|
16
16
|
coverage: "proof_coverage.mjs",
|
|
17
17
|
drift: "proof_drift.mjs",
|
|
18
|
-
modules: "scan_module_meta.mjs",
|
|
19
|
-
"modules-check": "proof_module_check.mjs",
|
|
20
18
|
mutate: "proof_mutation_check.mjs",
|
|
21
19
|
};
|
|
22
20
|
|
|
@@ -24,8 +22,7 @@ function printHelp() {
|
|
|
24
22
|
console.log(`Usage: proof-harness [--config <path>] <command> [flags]
|
|
25
23
|
|
|
26
24
|
Commands:
|
|
27
|
-
scan, parse, registry, build, verify, coverage, inventory, drift,
|
|
28
|
-
modules, modules-check, mutate
|
|
25
|
+
scan, parse, registry, build, verify, coverage, inventory, drift, mutate
|
|
29
26
|
|
|
30
27
|
Repository paths and the protected mutation catalog are read from
|
|
31
28
|
proof.config.mjs. Missing config falls back to a conventional application layout.`);
|
|
@@ -74,7 +71,6 @@ export async function runCli(argv = process.argv.slice(2)) {
|
|
|
74
71
|
["scan", []],
|
|
75
72
|
["parse", []],
|
|
76
73
|
["registry", ["--check"]],
|
|
77
|
-
["modules", []],
|
|
78
74
|
]) {
|
|
79
75
|
const status = runEngine(step, stepArgs, config);
|
|
80
76
|
if (status !== 0) return status;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as ProofKind, a as AssertionRole, g as ProofVerb, h as RlsClassification, t as PolicyCommand } from './trace-types-CbMb65OB.js';
|
|
2
2
|
import { ACTION_CHANGE_KINDS, TABLE_CHANGE_KINDS } from './portable-vocabulary.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -296,4 +296,4 @@ interface ValidationResult {
|
|
|
296
296
|
evidence?: RequirementEvidence[];
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
export { type CapabilityRequirement as C, MISSION_MANIFEST_SCHEMA_VERSION as M, type SchemaRequirement as S, type TraceRequirement as T, type
|
|
299
|
+
export { type CapabilityRequirement as C, MISSION_MANIFEST_SCHEMA_VERSION as M, type SchemaRequirement as S, type TraceRequirement as T, type ValidationCategory as V, type MissionManifest as a, type MissionRequirements as b, type ValidationIssue as c, type ValidationResult as d };
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { d as ValidationResult } from './mission-types-bdwBGf7O.js';
|
|
2
|
+
import { j as TraceArtifact, k as TraceAssertion } from './trace-types-CbMb65OB.js';
|
|
3
3
|
import './portable-vocabulary.js';
|
|
4
4
|
|
|
5
5
|
interface CapabilitiesArtifact {
|