@consiliency/contract 0.1.0 → 0.2.0
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/README.md +3 -1
- package/conformance/vectors/adoption-absent-ungoverned.json +16 -0
- package/conformance/vectors/adoption-adopted-governed.json +18 -0
- package/conformance/vectors/adoption-declared-false-ungoverned.json +17 -0
- package/conformance/vectors/adoption-partial-scope.json +18 -0
- package/conformance/vectors/coordination-announce-intent-does-not-lease.json +38 -0
- package/conformance/vectors/coordination-done-does-not-release-lease.json +38 -0
- package/conformance/vectors/coordination-handoff-does-not-transfer-holder.json +38 -0
- package/conformance/vectors/coordination-message-does-not-mutate-lease.json +38 -0
- package/conformance/vectors/doc-label-foreign-governed-false.json +19 -0
- package/conformance/vectors/doc-label-present-nonconforming.json +19 -0
- package/conformance/vectors/edge-label-unmanaged-cross-repo.json +30 -0
- package/conformance/vectors/governed-set-undeclared-ungoverned.json +18 -0
- package/conformance/vectors/ignore-set-nested-path-any-depth.json +19 -0
- package/conformance/vectors/ignore-set-scratch-never-governed.json +19 -0
- package/conformance/vectors/interface-valid-realized-and-promised.json +1 -1
- package/conformance/vectors/lease-acquire.json +35 -0
- package/conformance/vectors/lease-event-carries-lease.json +28 -0
- package/conformance/vectors/lease-expire.json +25 -0
- package/conformance/vectors/lease-expiry-boundary.json +25 -0
- package/conformance/vectors/lease-hard-degrades-to-soft.json +35 -0
- package/conformance/vectors/lease-hard-mode-atomic.json +35 -0
- package/conformance/vectors/lease-release.json +26 -0
- package/conformance/vectors/lease-renew.json +36 -0
- package/conformance/vectors/manifest-invalid-absolute-path.json +1 -1
- package/conformance/vectors/manifest-invalid-certified-maturity.json +1 -1
- package/conformance/vectors/manifest-invalid-path-and-ref.json +1 -1
- package/conformance/vectors/manifest-invalid-unknown-archetype.json +1 -1
- package/conformance/vectors/manifest-valid-baseline-only.json +1 -1
- package/conformance/vectors/manifest-valid-product.json +1 -1
- package/conformance/vectors/version-skew-compatible.json +3 -3
- package/conformance/vectors/version-skew-incompatible-warns.json +2 -2
- package/core/contract.json +16 -6
- package/core/registries/default-ignore-set.json +30 -0
- package/core/registries/maturity-labels.json +26 -0
- package/core/schemas/coordination-channel-protocol.schema.json +53 -0
- package/core/schemas/coordination-scenario.schema.json +67 -0
- package/core/schemas/decision.schema.json +5 -0
- package/core/schemas/governance-scope-scenario.schema.json +62 -0
- package/core/schemas/interface-declaration.schema.json +2 -0
- package/core/schemas/lease-event.schema.json +17 -0
- package/core/schemas/lease-store-protocol.schema.json +117 -0
- package/core/schemas/lease.schema.json +42 -0
- package/core/schemas/manifest.schema.json +44 -1
- package/core/schemas/version-skew-protocol.schema.json +3 -3
- package/package.json +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -10,10 +10,12 @@ The Consiliency cross-repo **contract package** — the single, neutral rulebook
|
|
|
10
10
|
- the loop-gate protocol (presence / freshness / integrity / version-skew)
|
|
11
11
|
- the `canonical_html.v1` display schema
|
|
12
12
|
- the version-skew protocol
|
|
13
|
+
- **adoption + governance-scoping (CS-0.12)** — the adoption profile (a partial-adoption profile, not a boolean; its presence = consent to be governed), the governed-set allowlist-by-declaration, the default ignore-set registry, and the `present-nonconforming` / `foreign` / `unmanaged` governance labels
|
|
14
|
+
- **lease + inbox coordination (CS-0.10b)** — the `lease` (TTL + heartbeat + auto-expiry, soft/hard, repo/path-set/symbol scope), the append-only `lease_event` stream, the `lease_store` protocol (sole source of truth) and the `coordination_channel` inbox protocol (never authoritative)
|
|
13
15
|
|
|
14
16
|
Dual-published: **npm** [`@consiliency/contract`](https://www.npmjs.com/package/@consiliency/contract) + **PyPI** [`consiliency-contract`](https://pypi.org/project/consiliency-contract/), from shared JSON data + conformance vectors so the two language readers stay byte-identical.
|
|
15
17
|
|
|
16
|
-
> **Status — `0.
|
|
18
|
+
> **Status — `0.2.0` adds CS-0.12 adoption/governance-scoping and CS-0.10b lease/inbox coordination on top of the `0.1.0` Phase-0 L0 content.**
|
|
17
19
|
> The shared JSON data lives under `core/` and `conformance/`; npm and PyPI
|
|
18
20
|
> readers are intentionally thin loaders over those same bytes.
|
|
19
21
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "adoption-absent-ungoverned",
|
|
3
|
+
"description": "Without an adoption profile there is no consent to be governed; every doc is ungoverned even when a governed_set selector would match it.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"governed_set": [{"by": "path", "value": "README.md"}],
|
|
7
|
+
"subject": {"kind": "doc", "path": "README.md"}
|
|
8
|
+
},
|
|
9
|
+
"decision": {
|
|
10
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
11
|
+
"status": "accepted",
|
|
12
|
+
"maturity": "presence-only",
|
|
13
|
+
"findings": [{"code": "governance.not_adopted", "severity": "info", "message": "Repo has no adoption profile; the document is ungoverned."}]
|
|
14
|
+
},
|
|
15
|
+
"expected": {"governed": false, "reason": "not-adopted"}
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "adoption-adopted-governed",
|
|
3
|
+
"description": "An adopted repo (a valid profile = consent to be governed) governs a doc it declares in the governed set within an adopted scope facet.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"adoption": {"adopted": true, "adopted_scope": ["layout", "gates", "projections"]},
|
|
7
|
+
"governed_set": [{"by": "path", "value": "README.md"}],
|
|
8
|
+
"facet": "layout",
|
|
9
|
+
"subject": {"kind": "doc", "path": "README.md"}
|
|
10
|
+
},
|
|
11
|
+
"decision": {
|
|
12
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
13
|
+
"status": "accepted",
|
|
14
|
+
"maturity": "presence-only",
|
|
15
|
+
"findings": [{"code": "governance.governed", "severity": "info", "message": "Document is declared in the governed set and within an adopted scope facet."}]
|
|
16
|
+
},
|
|
17
|
+
"expected": {"governed": true, "reason": "declared"}
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "adoption-declared-false-ungoverned",
|
|
3
|
+
"description": "An explicit adopted:false profile is a recorded declaration of non-adoption: the repo is ungoverned for every doc even when a governed_set selector would match. It is the auditable form of having no profile at all.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"adoption": {"adopted": false, "adopted_scope": []},
|
|
7
|
+
"governed_set": [{"by": "path", "value": "README.md"}],
|
|
8
|
+
"subject": {"kind": "doc", "path": "README.md"}
|
|
9
|
+
},
|
|
10
|
+
"decision": {
|
|
11
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
12
|
+
"status": "accepted",
|
|
13
|
+
"maturity": "presence-only",
|
|
14
|
+
"findings": [{"code": "governance.adoption_declined", "severity": "info", "message": "Adoption is explicitly declined (adopted:false); the document is ungoverned."}]
|
|
15
|
+
},
|
|
16
|
+
"expected": {"governed": false, "reason": "adoption-declined"}
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "adoption-partial-scope",
|
|
3
|
+
"description": "Adoption is a profile, not a boolean: a facet outside adopted_scope is ungoverned even for a declared doc.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"adoption": {"adopted": true, "adopted_scope": ["layout"]},
|
|
7
|
+
"governed_set": [{"by": "path", "value": "docs/projection.md"}],
|
|
8
|
+
"facet": "projections",
|
|
9
|
+
"subject": {"kind": "doc", "path": "docs/projection.md", "class": "proj-S"}
|
|
10
|
+
},
|
|
11
|
+
"decision": {
|
|
12
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
13
|
+
"status": "accepted",
|
|
14
|
+
"maturity": "presence-only",
|
|
15
|
+
"findings": [{"code": "governance.out_of_scope_facet", "severity": "info", "message": "The projections facet is not in adopted_scope; the document is ungoverned for this facet."}]
|
|
16
|
+
},
|
|
17
|
+
"expected": {"governed": false, "reason": "out-of-scope-facet", "facet": "projections"}
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "coordination-announce-intent-does-not-lease",
|
|
3
|
+
"description": "Sole-truth guardrail: an announce-intent message from a non-holder does NOT create or transfer a lease. The projected view still shows the original holder; announcing intent never grants a lease.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:00:30Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"}
|
|
12
|
+
],
|
|
13
|
+
"messages": [
|
|
14
|
+
{"type": "announce-intent", "from": "agent-b", "target_lease": "lease-src-mod"}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"decision": {
|
|
18
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
19
|
+
"status": "accepted",
|
|
20
|
+
"maturity": "presence-only",
|
|
21
|
+
"findings": [{"code": "coordination.announce_intent_advisory_only", "severity": "info", "message": "Announce-intent is advisory; it does not create or transfer a lease. agent-a remains the holder."}]
|
|
22
|
+
},
|
|
23
|
+
"expected": {
|
|
24
|
+
"effective_mode": "soft",
|
|
25
|
+
"changed_by_message": false,
|
|
26
|
+
"current_lease": {
|
|
27
|
+
"schema": "consiliency.lease.v1",
|
|
28
|
+
"lease_id": "lease-src-mod",
|
|
29
|
+
"holder": "agent-a",
|
|
30
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
31
|
+
"ttl_seconds": 300,
|
|
32
|
+
"heartbeat_at": "2026-01-01T00:00:00Z",
|
|
33
|
+
"mode": "soft",
|
|
34
|
+
"scope": {"granularity": "path-set", "selector": ["src/mod/**"]},
|
|
35
|
+
"phase": "implement"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "coordination-done-does-not-release-lease",
|
|
3
|
+
"description": "Sole-truth guardrail: a done message is advisory. It does NOT release the lease; the projected view still shows the holder. Only an explicit release store op frees the lease.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:00:30Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"}
|
|
12
|
+
],
|
|
13
|
+
"messages": [
|
|
14
|
+
{"type": "done", "from": "agent-a", "target_lease": "lease-src-mod"}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"decision": {
|
|
18
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
19
|
+
"status": "accepted",
|
|
20
|
+
"maturity": "presence-only",
|
|
21
|
+
"findings": [{"code": "coordination.done_advisory_only", "severity": "info", "message": "A done message does not release the lease; the holder still holds it until an explicit release store op."}]
|
|
22
|
+
},
|
|
23
|
+
"expected": {
|
|
24
|
+
"effective_mode": "soft",
|
|
25
|
+
"changed_by_message": false,
|
|
26
|
+
"current_lease": {
|
|
27
|
+
"schema": "consiliency.lease.v1",
|
|
28
|
+
"lease_id": "lease-src-mod",
|
|
29
|
+
"holder": "agent-a",
|
|
30
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
31
|
+
"ttl_seconds": 300,
|
|
32
|
+
"heartbeat_at": "2026-01-01T00:00:00Z",
|
|
33
|
+
"mode": "soft",
|
|
34
|
+
"scope": {"granularity": "path-set", "selector": ["src/mod/**"]},
|
|
35
|
+
"phase": "implement"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "coordination-handoff-does-not-transfer-holder",
|
|
3
|
+
"description": "Sole-truth guardrail: a handoff message (HandoffPacket) is advisory. It does NOT transfer the lease; the holder is unchanged in the projected view. agent-b becomes holder only by acquiring via the store after agent-a releases.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:00:30Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"}
|
|
12
|
+
],
|
|
13
|
+
"messages": [
|
|
14
|
+
{"type": "handoff", "from": "agent-a", "target_lease": "lease-src-mod"}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"decision": {
|
|
18
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
19
|
+
"status": "accepted",
|
|
20
|
+
"maturity": "presence-only",
|
|
21
|
+
"findings": [{"code": "coordination.handoff_advisory_only", "severity": "info", "message": "Handoff is advisory; it does not transfer the lease. The holder is unchanged until agent-b acquires via the store."}]
|
|
22
|
+
},
|
|
23
|
+
"expected": {
|
|
24
|
+
"effective_mode": "soft",
|
|
25
|
+
"changed_by_message": false,
|
|
26
|
+
"current_lease": {
|
|
27
|
+
"schema": "consiliency.lease.v1",
|
|
28
|
+
"lease_id": "lease-src-mod",
|
|
29
|
+
"holder": "agent-a",
|
|
30
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
31
|
+
"ttl_seconds": 300,
|
|
32
|
+
"heartbeat_at": "2026-01-01T00:00:00Z",
|
|
33
|
+
"mode": "soft",
|
|
34
|
+
"scope": {"granularity": "path-set", "selector": ["src/mod/**"]},
|
|
35
|
+
"phase": "implement"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "coordination-message-does-not-mutate-lease",
|
|
3
|
+
"description": "Sole-truth guardrail: an inbox request-yield message is advisory only. It never mutates lease state; the projected current-lease view is identical to the no-message projection. Only a lease-store operation can change the lease.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:00:30Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"}
|
|
12
|
+
],
|
|
13
|
+
"messages": [
|
|
14
|
+
{"type": "request-yield", "from": "agent-b", "target_lease": "lease-src-mod"}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"decision": {
|
|
18
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
19
|
+
"status": "accepted",
|
|
20
|
+
"maturity": "presence-only",
|
|
21
|
+
"findings": [{"code": "coordination.message_advisory_only", "severity": "info", "message": "Coordination message is advisory; it does not mutate lease state. agent-b must acquire via the store after agent-a releases or the lease expires."}]
|
|
22
|
+
},
|
|
23
|
+
"expected": {
|
|
24
|
+
"effective_mode": "soft",
|
|
25
|
+
"changed_by_message": false,
|
|
26
|
+
"current_lease": {
|
|
27
|
+
"schema": "consiliency.lease.v1",
|
|
28
|
+
"lease_id": "lease-src-mod",
|
|
29
|
+
"holder": "agent-a",
|
|
30
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
31
|
+
"ttl_seconds": 300,
|
|
32
|
+
"heartbeat_at": "2026-01-01T00:00:00Z",
|
|
33
|
+
"mode": "soft",
|
|
34
|
+
"scope": {"granularity": "path-set", "selector": ["src/mod/**"]},
|
|
35
|
+
"phase": "implement"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "doc-label-foreign-governed-false",
|
|
3
|
+
"description": "A present but undeclared doc is labeled foreign (governed:false); it is neither owed nor checked.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"adoption": {"adopted": true, "adopted_scope": ["layout"]},
|
|
7
|
+
"governed_set": [{"by": "glob", "value": "docs/**"}],
|
|
8
|
+
"facet": "layout",
|
|
9
|
+
"subject": {"kind": "doc", "path": "vendor/thirdparty.md", "observed_label": "foreign"}
|
|
10
|
+
},
|
|
11
|
+
"decision": {
|
|
12
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
13
|
+
"status": "accepted",
|
|
14
|
+
"maturity": "presence-only",
|
|
15
|
+
"labels": ["foreign"],
|
|
16
|
+
"findings": [{"code": "governance.foreign", "severity": "info", "message": "Present artifact is not in the governed set; labeled foreign (governed:false)."}]
|
|
17
|
+
},
|
|
18
|
+
"expected": {"governed": false, "reason": "undeclared-ungoverned"}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "doc-label-present-nonconforming",
|
|
3
|
+
"description": "A governed doc that is present but does not conform to its declared class is labeled present-nonconforming and warns in Phase 0.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"adoption": {"adopted": true, "adopted_scope": ["layout", "projections"]},
|
|
7
|
+
"governed_set": [{"by": "path", "value": "docs/architecture.md"}],
|
|
8
|
+
"facet": "projections",
|
|
9
|
+
"subject": {"kind": "doc", "path": "docs/architecture.md", "class": "proj-S", "observed_label": "present-nonconforming"}
|
|
10
|
+
},
|
|
11
|
+
"decision": {
|
|
12
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
13
|
+
"status": "warn",
|
|
14
|
+
"maturity": "presence-only",
|
|
15
|
+
"labels": ["present-nonconforming"],
|
|
16
|
+
"findings": [{"code": "governance.present_nonconforming", "severity": "warn", "message": "Governed document is present but does not conform to its declared class."}]
|
|
17
|
+
},
|
|
18
|
+
"expected": {"governed": true, "reason": "declared"}
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "edge-label-unmanaged-cross-repo",
|
|
3
|
+
"description": "A cross-repo edge into a repo that has not adopted the contract is labeled unmanaged (governed:false at the far end).",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.interface_declaration.v1",
|
|
6
|
+
"repo_id": "consiliency-portal",
|
|
7
|
+
"realized_edges": [
|
|
8
|
+
{
|
|
9
|
+
"id": "legacy-crm-export",
|
|
10
|
+
"provider_repo": "legacy-crm",
|
|
11
|
+
"consumer_repo": "consiliency-portal",
|
|
12
|
+
"interface_id": "crm-export-feed",
|
|
13
|
+
"ref": {"kind": "opaque-external-ref", "value": "legacy-crm://export/v3"},
|
|
14
|
+
"maturity": "realized-edge-observed",
|
|
15
|
+
"governed": false,
|
|
16
|
+
"governance_label": "unmanaged",
|
|
17
|
+
"evidence": []
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"promised_edges": []
|
|
21
|
+
},
|
|
22
|
+
"decision": {
|
|
23
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
24
|
+
"status": "accepted",
|
|
25
|
+
"maturity": "realized-edge-observed",
|
|
26
|
+
"labels": ["unmanaged"],
|
|
27
|
+
"findings": [{"code": "governance.unmanaged_edge", "severity": "info", "message": "Cross-repo edge points into a repo that has not adopted the contract; the far end is unmanaged."}]
|
|
28
|
+
},
|
|
29
|
+
"expected": {"governed": false, "reason": "unmanaged-far-end", "far_end_adopted": false}
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "governed-set-undeclared-ungoverned",
|
|
3
|
+
"description": "Allowlist by declaration: a doc not matched by any governed_set selector is ungoverned (the safety property for undeclared docs).",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"adoption": {"adopted": true, "adopted_scope": ["layout"]},
|
|
7
|
+
"governed_set": [{"by": "glob", "value": "docs/**"}],
|
|
8
|
+
"facet": "layout",
|
|
9
|
+
"subject": {"kind": "doc", "path": "NOTES.md"}
|
|
10
|
+
},
|
|
11
|
+
"decision": {
|
|
12
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
13
|
+
"status": "accepted",
|
|
14
|
+
"maturity": "presence-only",
|
|
15
|
+
"findings": [{"code": "governance.undeclared", "severity": "info", "message": "No governed_set selector matches the document; it is ungoverned."}]
|
|
16
|
+
},
|
|
17
|
+
"expected": {"governed": false, "reason": "undeclared-ungoverned"}
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ignore-set-nested-path-any-depth",
|
|
3
|
+
"description": "A bare-directory ignore entry (.claude/) matches at ANY depth, so a nested tools/.claude/notes.md is ungoverned even when a governed_set glob would match it.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"adoption": {"adopted": true, "adopted_scope": ["layout"]},
|
|
7
|
+
"governed_set": [{"by": "glob", "value": "**/*.md"}],
|
|
8
|
+
"ignore_set": [".claude/"],
|
|
9
|
+
"facet": "layout",
|
|
10
|
+
"subject": {"kind": "doc", "path": "tools/.claude/notes.md"}
|
|
11
|
+
},
|
|
12
|
+
"decision": {
|
|
13
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
14
|
+
"status": "accepted",
|
|
15
|
+
"maturity": "presence-only",
|
|
16
|
+
"findings": [{"code": "governance.ignored", "severity": "info", "message": "A bare-directory ignore entry matches at any depth; the nested path is ungoverned and never ingested."}]
|
|
17
|
+
},
|
|
18
|
+
"expected": {"governed": false, "reason": "ignored-nested"}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ignore-set-scratch-never-governed",
|
|
3
|
+
"description": "The ignore-set is the safety floor: a scratch path is ungoverned even when a governed_set glob would match it.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.governance_scope_scenario.v1",
|
|
6
|
+
"adoption": {"adopted": true, "adopted_scope": ["layout"]},
|
|
7
|
+
"governed_set": [{"by": "glob", "value": "**/*.md"}],
|
|
8
|
+
"ignore_set": ["scratch/"],
|
|
9
|
+
"facet": "layout",
|
|
10
|
+
"subject": {"kind": "doc", "path": "scratch/notes.md"}
|
|
11
|
+
},
|
|
12
|
+
"decision": {
|
|
13
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
14
|
+
"status": "accepted",
|
|
15
|
+
"maturity": "presence-only",
|
|
16
|
+
"findings": [{"code": "governance.ignored", "severity": "info", "message": "Path matches the ignore-set; it is ungoverned and never ingested, overriding the governed_set match."}]
|
|
17
|
+
},
|
|
18
|
+
"expected": {"governed": false, "reason": "ignored-scratch"}
|
|
19
|
+
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"provider_repo": "consiliency-contract",
|
|
22
22
|
"consumer_repo": "governed-pipeline",
|
|
23
23
|
"interface_id": "consiliency-contract-v1",
|
|
24
|
-
"ref": {"kind": "package-coordinate", "value": "@consiliency/contract@^0.
|
|
24
|
+
"ref": {"kind": "package-coordinate", "value": "@consiliency/contract@^0.2.0"},
|
|
25
25
|
"maturity": "presence-only",
|
|
26
26
|
"evidence": []
|
|
27
27
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lease-acquire",
|
|
3
|
+
"description": "Acquiring a soft path-set lease projects to an active current-lease view within its TTL.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:01:00Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"decision": {
|
|
15
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
16
|
+
"status": "accepted",
|
|
17
|
+
"maturity": "presence-only",
|
|
18
|
+
"findings": [{"code": "coordination.lease_active", "severity": "info", "message": "Lease is held and within its TTL at the evaluation time."}]
|
|
19
|
+
},
|
|
20
|
+
"expected": {
|
|
21
|
+
"effective_mode": "soft",
|
|
22
|
+
"changed_by_message": false,
|
|
23
|
+
"current_lease": {
|
|
24
|
+
"schema": "consiliency.lease.v1",
|
|
25
|
+
"lease_id": "lease-src-mod",
|
|
26
|
+
"holder": "agent-a",
|
|
27
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
28
|
+
"ttl_seconds": 300,
|
|
29
|
+
"heartbeat_at": "2026-01-01T00:00:00Z",
|
|
30
|
+
"mode": "soft",
|
|
31
|
+
"scope": {"granularity": "path-set", "selector": ["src/mod/**"]},
|
|
32
|
+
"phase": "implement"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lease-event-carries-lease",
|
|
3
|
+
"description": "An acquire lease-event carries the full lease snapshot. Exercises the lease-event -> lease cross-file $ref (the event's lease field validates against lease.schema.json by $id).",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.lease_event.v1",
|
|
6
|
+
"event": "acquire",
|
|
7
|
+
"lease_id": "lease-src-mod",
|
|
8
|
+
"holder": "agent-a",
|
|
9
|
+
"at": "2026-01-01T00:00:00Z",
|
|
10
|
+
"lease": {
|
|
11
|
+
"schema": "consiliency.lease.v1",
|
|
12
|
+
"lease_id": "lease-src-mod",
|
|
13
|
+
"holder": "agent-a",
|
|
14
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
15
|
+
"ttl_seconds": 300,
|
|
16
|
+
"heartbeat_at": "2026-01-01T00:00:00Z",
|
|
17
|
+
"mode": "soft",
|
|
18
|
+
"scope": {"granularity": "path-set", "selector": ["src/mod/**"]},
|
|
19
|
+
"phase": "implement"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"decision": {
|
|
23
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
24
|
+
"status": "accepted",
|
|
25
|
+
"maturity": "presence-only",
|
|
26
|
+
"findings": [{"code": "coordination.lease_event_recorded", "severity": "info", "message": "Append-only acquire event carries the full lease snapshot; the current-lease view is the projection of such events."}]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lease-expire",
|
|
3
|
+
"description": "TTL is authoritative: with no heartbeat, the lease auto-expires and the current-lease view is empty past acquired_at + ttl.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:05:01Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"decision": {
|
|
15
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
16
|
+
"status": "accepted",
|
|
17
|
+
"maturity": "presence-only",
|
|
18
|
+
"findings": [{"code": "coordination.lease_expired", "severity": "info", "message": "No heartbeat before TTL elapsed; the lease auto-expired."}]
|
|
19
|
+
},
|
|
20
|
+
"expected": {
|
|
21
|
+
"effective_mode": "soft",
|
|
22
|
+
"changed_by_message": false,
|
|
23
|
+
"current_lease": null
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lease-expiry-boundary",
|
|
3
|
+
"description": "Expiry boundary is EXCLUSIVE: at now == heartbeat_at + ttl_seconds the lease is already expired (the interval is [acquired_at, expires_at)). This pins the contention instant so two vendoring consumers agree.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:05:00Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"decision": {
|
|
15
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
16
|
+
"status": "accepted",
|
|
17
|
+
"maturity": "presence-only",
|
|
18
|
+
"findings": [{"code": "coordination.lease_expired", "severity": "info", "message": "At now == expires_at the exclusive boundary treats the lease as already expired; it is free for the next acquirer."}]
|
|
19
|
+
},
|
|
20
|
+
"expected": {
|
|
21
|
+
"effective_mode": "soft",
|
|
22
|
+
"changed_by_message": false,
|
|
23
|
+
"current_lease": null
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lease-hard-degrades-to-soft",
|
|
3
|
+
"description": "Hard mode requires an atomic acquire; without an atomic backend the requested hard lease degrades to soft and warns.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:00:10Z",
|
|
7
|
+
"requested_mode": "hard",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-symbol-parse", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "hard", "scope": {"granularity": "symbol", "selector": ["src/parser.rs::parse"]}, "phase": "implement"}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"decision": {
|
|
15
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
16
|
+
"status": "warn",
|
|
17
|
+
"maturity": "presence-only",
|
|
18
|
+
"findings": [{"code": "coordination.hard_degraded_to_soft", "severity": "warn", "message": "Backend does not support atomic acquire; hard lease degraded to soft advisory mode."}]
|
|
19
|
+
},
|
|
20
|
+
"expected": {
|
|
21
|
+
"effective_mode": "soft",
|
|
22
|
+
"changed_by_message": false,
|
|
23
|
+
"current_lease": {
|
|
24
|
+
"schema": "consiliency.lease.v1",
|
|
25
|
+
"lease_id": "lease-symbol-parse",
|
|
26
|
+
"holder": "agent-a",
|
|
27
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
28
|
+
"ttl_seconds": 300,
|
|
29
|
+
"heartbeat_at": "2026-01-01T00:00:00Z",
|
|
30
|
+
"mode": "soft",
|
|
31
|
+
"scope": {"granularity": "symbol", "selector": ["src/parser.rs::parse"]},
|
|
32
|
+
"phase": "implement"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lease-hard-mode-atomic",
|
|
3
|
+
"description": "Hard mode is granted only over an atomic backend; the atomic acquire yields an active hard lease.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:00:10Z",
|
|
7
|
+
"requested_mode": "hard",
|
|
8
|
+
"backend": "coordinator",
|
|
9
|
+
"atomic_backend": true,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-symbol-parse", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "hard", "scope": {"granularity": "symbol", "selector": ["src/parser.rs::parse"]}, "phase": "implement"}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"decision": {
|
|
15
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
16
|
+
"status": "accepted",
|
|
17
|
+
"maturity": "presence-only",
|
|
18
|
+
"findings": [{"code": "coordination.hard_granted", "severity": "info", "message": "Atomic backend present; hard lease granted and active."}]
|
|
19
|
+
},
|
|
20
|
+
"expected": {
|
|
21
|
+
"effective_mode": "hard",
|
|
22
|
+
"changed_by_message": false,
|
|
23
|
+
"current_lease": {
|
|
24
|
+
"schema": "consiliency.lease.v1",
|
|
25
|
+
"lease_id": "lease-symbol-parse",
|
|
26
|
+
"holder": "agent-a",
|
|
27
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
28
|
+
"ttl_seconds": 300,
|
|
29
|
+
"heartbeat_at": "2026-01-01T00:00:00Z",
|
|
30
|
+
"mode": "hard",
|
|
31
|
+
"scope": {"granularity": "symbol", "selector": ["src/parser.rs::parse"]},
|
|
32
|
+
"phase": "implement"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lease-release",
|
|
3
|
+
"description": "An explicit release clears the lease; the current-lease view is empty even though the TTL had not elapsed.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:02:10Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"},
|
|
12
|
+
{"event": "release", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:02:00Z"}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"decision": {
|
|
16
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
17
|
+
"status": "accepted",
|
|
18
|
+
"maturity": "presence-only",
|
|
19
|
+
"findings": [{"code": "coordination.lease_released", "severity": "info", "message": "Holder released the lease before its TTL; the lease is free."}]
|
|
20
|
+
},
|
|
21
|
+
"expected": {
|
|
22
|
+
"effective_mode": "soft",
|
|
23
|
+
"changed_by_message": false,
|
|
24
|
+
"current_lease": null
|
|
25
|
+
}
|
|
26
|
+
}
|