repopact 3.1.0__py3-none-win_amd64.whl
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.
- repopact/AGENTS.md +37 -0
- repopact/__init__.py +36 -0
- repopact/_audit/README.md +4 -0
- repopact/_audit/alignment-report.md +305 -0
- repopact/_audit/inventory.md +38 -0
- repopact/adapters.py +129 -0
- repopact/admission.py +804 -0
- repopact/admission_conformance.py +39 -0
- repopact/adopt_repo.py +501 -0
- repopact/check_frozen_surface.py +136 -0
- repopact/cli.py +564 -0
- repopact/dev_fixtures.py +234 -0
- repopact/doctor.py +430 -0
- repopact/enforcement.py +218 -0
- repopact/engine_client.py +278 -0
- repopact/fleet_verify.py +702 -0
- repopact/frontmatter.py +48 -0
- repopact/generate_dashboard.py +131 -0
- repopact/generate_spec.py +101 -0
- repopact/graph_cli.py +462 -0
- repopact/guard.py +262 -0
- repopact/guard_ipc.py +385 -0
- repopact/init_repo.py +183 -0
- repopact/legacy_validate.py +48 -0
- repopact/new.py +115 -0
- repopact/package_version.py +69 -0
- repopact/plan_import.py +409 -0
- repopact/platform_backends.py +800 -0
- repopact/release_build.py +418 -0
- repopact/release_local.py +437 -0
- repopact/repo_model.py +245 -0
- repopact/run_admission_platform_conformance.py +86 -0
- repopact/run_conformance.py +203 -0
- repopact/schemas/adapter-capabilities.schema.json +57 -0
- repopact/schemas/admission-policy.schema.json +58 -0
- repopact/schemas/adopter-fleet.schema.json +108 -0
- repopact/schemas/assurance-mapping.schema.json +252 -0
- repopact/schemas/audit-finding.schema.json +15 -0
- repopact/schemas/authorization-receipt.schema.json +24 -0
- repopact/schemas/authorization-request.schema.json +41 -0
- repopact/schemas/conformance-manifest.schema.json +53 -0
- repopact/schemas/evidence-run.schema.json +17 -0
- repopact/schemas/frozen-surface.schema.json +21 -0
- repopact/schemas/invariants.schema.json +27 -0
- repopact/schemas/operator-authority.schema.json +76 -0
- repopact/schemas/record-frontmatter.schema.json +29 -0
- repopact/schemas/repository-registration.schema.json +35 -0
- repopact/schemas/rog-capability.schema.json +21 -0
- repopact/schemas/verification-profile.schema.json +76 -0
- repopact/schemas/work-item.schema.json +41 -0
- repopact/takeover.py +438 -0
- repopact/templates/README.md +14 -0
- repopact/templates/admission-policy.json +22 -0
- repopact/templates/decision.md +25 -0
- repopact/templates/evidence-run.json +12 -0
- repopact/templates/policy.md +20 -0
- repopact/templates/work-item.README.md +24 -0
- repopact/templates/work-item.json +14 -0
- repopact/track_import.py +204 -0
- repopact/validate_repo.py +1889 -0
- repopact/validate_research.py +463 -0
- repopact/validate_verification.py +25 -0
- repopact/verification.py +817 -0
- repopact/verify_cli.py +69 -0
- repopact/verify_status.py +266 -0
- repopact/windows_guard_service.py +106 -0
- repopact-3.1.0.data/scripts/repopact-engine.exe +0 -0
- repopact-3.1.0.data/scripts/repopact.exe +0 -0
- repopact-3.1.0.dist-info/METADATA +219 -0
- repopact-3.1.0.dist-info/RECORD +72 -0
- repopact-3.1.0.dist-info/WHEEL +4 -0
- repopact-3.1.0.dist-info/sboms/repopact-engine.cyclonedx.json +4044 -0
repopact/AGENTS.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Tooling Agent Contract
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
This subtree owns the Python compatibility CLI, retained Python workflows,
|
|
6
|
+
derived-report generation, and bootstrap/record-stamping tools. Canonical Rust
|
|
7
|
+
semantic behavior for migrated surfaces is invoked through `repopact-engine`;
|
|
8
|
+
the Python validator remains an explicit comparator or retained-surface
|
|
9
|
+
implementation, never a hidden fallback.
|
|
10
|
+
|
|
11
|
+
## Constraints
|
|
12
|
+
|
|
13
|
+
- Prefer the Python standard library. Declared, operator-approved dependencies are
|
|
14
|
+
permitted: `jsonschema` validates records against repository-local
|
|
15
|
+
`schemas/*.json` with packaged `repopact/schemas/*.json` as the upstream
|
|
16
|
+
fallback (decision `0003`). Pin new dependencies in `requirements.txt`.
|
|
17
|
+
- Validators return nonzero on errors and produce deterministic diagnostics.
|
|
18
|
+
- Schemas are authoritative for record *structure*; the canonical validator is
|
|
19
|
+
authoritative for cross-record *semantics* (references, lifecycle, cycles)
|
|
20
|
+
on migrated Rust-supported surfaces. The Python implementation remains a
|
|
21
|
+
named comparator.
|
|
22
|
+
- Generators may overwrite only files under `audits/reports/`.
|
|
23
|
+
- Tests must cover every rule that can block a lifecycle transition.
|
|
24
|
+
|
|
25
|
+
## Required checks
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
python -m pip install -e ".[dev]"
|
|
29
|
+
repopact validate --root <supported-repository>
|
|
30
|
+
python -m repopact.run_conformance --legacy-python
|
|
31
|
+
python -m unittest discover -s tests -v
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Traceability
|
|
35
|
+
|
|
36
|
+
Maintain `repopact/_audit/inventory.md` and `repopact/_audit/alignment-report.md`
|
|
37
|
+
when enforcement behavior changes.
|
repopact/__init__.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""RepoPact — a repository-native governance kernel for durable agent work.
|
|
2
|
+
|
|
3
|
+
The public entry point is the ``repopact`` console script (``repopact.cli``).
|
|
4
|
+
Submodules are importable but are not a supported API surface; they moved under
|
|
5
|
+
this package in 3.0.0 so that installing RepoPact claims exactly one name in the
|
|
6
|
+
environment instead of seventeen (decision 0029).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
__all__ = ["__version__"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _version() -> str:
|
|
15
|
+
"""The release line, preferring a checkout's VERSION over installed metadata.
|
|
16
|
+
|
|
17
|
+
Order matters. When running from a checkout, a differently-versioned RepoPact
|
|
18
|
+
may also be installed in the environment, and `importlib.metadata` would
|
|
19
|
+
report *that* one — so the checkout's own `VERSION` record wins when present.
|
|
20
|
+
An installed package has no sibling `VERSION`, so it falls through to its
|
|
21
|
+
distribution metadata.
|
|
22
|
+
"""
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
root = Path(__file__).resolve().parent.parent
|
|
25
|
+
candidate = root / "VERSION"
|
|
26
|
+
if candidate.is_file():
|
|
27
|
+
from .package_version import package_version
|
|
28
|
+
return package_version(root)
|
|
29
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
30
|
+
try:
|
|
31
|
+
return version("repopact")
|
|
32
|
+
except PackageNotFoundError:
|
|
33
|
+
return "unknown"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
__version__ = _version()
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# Tooling Alignment Report
|
|
2
|
+
|
|
3
|
+
## 2026-09-13 WI037 adopter-boundary reconciliation
|
|
4
|
+
|
|
5
|
+
- `governance/adopters.json` now describes the five-adopter fleet at the public
|
|
6
|
+
RepoPact 3.0.2 boundary. Moto is a package adopter with a declared
|
|
7
|
+
repository-owned local extension, not a vendored core or checksum overlay.
|
|
8
|
+
- `fleet_verify.py` now verifies that a declared package local extension exists
|
|
9
|
+
at the immutable public default head and proves canonical-first invocation of
|
|
10
|
+
the namespaced RepoPact CLI. The contract is adopter-neutral and does not
|
|
11
|
+
encode Moto-specific rules.
|
|
12
|
+
- Legacy vendored contract support remains in the verifier for historical or
|
|
13
|
+
separately declared adopters; WI037 no longer declares Moto against obsolete
|
|
14
|
+
upstream scripts.
|
|
15
|
+
|
|
16
|
+
## 2026-09-10 canonical Rust engine cutover
|
|
17
|
+
|
|
18
|
+
- WI056 makes the Rust engine the canonical authority for the proven repository,
|
|
19
|
+
validation, dashboard, graph, analysis, and typed work-item mutation surfaces.
|
|
20
|
+
- `repopact` remains the Python compatibility CLI. `validate`, `dashboard`, and
|
|
21
|
+
typed work-item commands cross the versioned local JSON engine boundary;
|
|
22
|
+
`validate_repo.py` remains an explicit comparator and retained workflows keep
|
|
23
|
+
their documented Python authority.
|
|
24
|
+
- Maturin `bin` packaging installs the platform-native `repopact-engine` beside
|
|
25
|
+
the Python package. WI050 admission/guard/enforcement remains protected and
|
|
26
|
+
Python-owned.
|
|
27
|
+
|
|
28
|
+
## 2026-09-03 WI050 opt-in provider boundary
|
|
29
|
+
|
|
30
|
+
- `admission.evaluate_action` checks the adopter-owned policy before guard or
|
|
31
|
+
lease state: no policy and `enabled=false` are valid standalone modes with
|
|
32
|
+
`instruction-only`/`enforcement_required=false`; enabled policy remains
|
|
33
|
+
fail-closed when registration or required provider coverage is absent.
|
|
34
|
+
- `repopact.enforcement.EnforcementProvider` is the generic health,
|
|
35
|
+
discovery, authorization, check, delegation, and revoke contract. Adapters
|
|
36
|
+
and providers report separate classes and the resolver computes their
|
|
37
|
+
non-widening intersection. `NativeGuardClient` implements the contract but
|
|
38
|
+
is not its definition; external providers are covered by a fixture without
|
|
39
|
+
built-in guard classes.
|
|
40
|
+
- Package metadata keeps `jsonschema` as the base dependency and moves
|
|
41
|
+
cryptography to the optional `enforcement` (and `dev`) extras. No frozen
|
|
42
|
+
schema was changed; `minimum_enforcement` and `failure_mode` retain their
|
|
43
|
+
existing structure while the resolver ensures degraded mode cannot satisfy
|
|
44
|
+
an unmet explicit minimum.
|
|
45
|
+
|
|
46
|
+
## 2026-09-03 WI050 admission architecture review
|
|
47
|
+
|
|
48
|
+
- Reviewed validate_repo.py, check_frozen_surface.py, init_repo.py,
|
|
49
|
+
adopt_repo.py, doctor.py, and the CLI against the f2c80b7/WI049
|
|
50
|
+
first-write bypass.
|
|
51
|
+
- Current validation and frozen checks remain deterministic repository
|
|
52
|
+
backstops; check-frozen --ack is a caller assertion and is not operator
|
|
53
|
+
proof in the accepted WI050 design.
|
|
54
|
+
- Decision 0038 selects a protected guard plus vendor-neutral adapter SPI for
|
|
55
|
+
a later implementation pass. No tooling/runtime behavior or frozen path was
|
|
56
|
+
changed in this architecture phase.
|
|
57
|
+
|
|
58
|
+
## 2026-09-03 deterministic evidence timestamp chronology
|
|
59
|
+
|
|
60
|
+
- `validate_repo.validate_evidence` retains ISO-8601 validation for all runs and
|
|
61
|
+
applies the explicit `timestamp_basis: "git-recording"` rule against the first
|
|
62
|
+
recording commit plus a five-minute clock/write tolerance.
|
|
63
|
+
- Naive timestamps are UTC; aware timestamps normalize to UTC. Git-free,
|
|
64
|
+
exported, and uncommitted records retain structural validation without a
|
|
65
|
+
fabricated history comparison, preserving deterministic behavior and legacy
|
|
66
|
+
evidence history.
|
|
67
|
+
- Regression coverage proves far-future rejection, tolerance/offset/naive and
|
|
68
|
+
historical acceptance, malformed input rejection, Git-free behavior, and
|
|
69
|
+
repeated validation that cannot heal through passage of time. Decision 0037
|
|
70
|
+
records the alternatives and the WI049 reconciliation boundary.
|
|
71
|
+
|
|
72
|
+
## 2026-09-02 structural worktree-aware contract discovery
|
|
73
|
+
|
|
74
|
+
- `repo_model.iter_contracts` now prunes same-repository linked worktrees using
|
|
75
|
+
both Git's porcelain worktree registry and embedded `.git` files pointing into
|
|
76
|
+
the primary `.git/worktrees` directory.
|
|
77
|
+
- The literal `worktrees` entry in `IGNORED_PARTS` remains as a compatibility
|
|
78
|
+
fallback for stale/orphaned conventional scratch trees with no usable metadata.
|
|
79
|
+
- Independent nested repositories with `.git/` directories remain discoverable;
|
|
80
|
+
exported trees and Git-unavailable environments retain deterministic fallback
|
|
81
|
+
behavior.
|
|
82
|
+
- Regression coverage includes Windows paths with spaces, real conventional and
|
|
83
|
+
non-conventional linked worktrees, stale linked metadata, nested repositories,
|
|
84
|
+
negative controls, and worktree cleanup.
|
|
85
|
+
|
|
86
|
+
## 2026-09-02 source_of_truth resolution semantics
|
|
87
|
+
|
|
88
|
+
- `doctor._dead_source_of_truth` now resolves every path token relative to the
|
|
89
|
+
declaring record's directory, matching decision 0016 and `takeover.py`'s
|
|
90
|
+
preserved leading `../` behavior.
|
|
91
|
+
- Bare names are deliberately record-relative; a coincident root-level file
|
|
92
|
+
cannot make a missing sibling target appear healthy.
|
|
93
|
+
- Regression coverage exercises nested `../` targets, valid and invalid bare
|
|
94
|
+
targets, root coincidence, and the non-destructive `doctor --fix` contract.
|
|
95
|
+
|
|
96
|
+
## 2026-09-02 stable source/artifact identity reconciliation
|
|
97
|
+
|
|
98
|
+
- `validate_repo` now recognizes the exact matching stable tag as a valid
|
|
99
|
+
unlabeled release tree and rejects later package/runtime source at the same
|
|
100
|
+
`VERSION` unless a valid VERSION-pinned `RELEASE_LABEL` is present.
|
|
101
|
+
- `package_version` gives labeled development builds deterministic PEP 440
|
|
102
|
+
metadata while preserving the strict `VERSION` adopter compatibility core.
|
|
103
|
+
- `release-build` uses the derived artifact identity for wheel/sdist names and
|
|
104
|
+
still performs its independent-export and structural package checks.
|
|
105
|
+
- Regression tests cover exact-tag acceptance, unlabeled post-tag rejection,
|
|
106
|
+
labeled development acceptance, and deterministic metadata mapping.
|
|
107
|
+
|
|
108
|
+
## 2026-07-26 RepoPact 3.0 release boundary
|
|
109
|
+
|
|
110
|
+
- Decision 0029's package/CLI boundary is released as the approved major version,
|
|
111
|
+
rather than remaining an unreleased source change under the immutable public
|
|
112
|
+
2.3.0 artifact.
|
|
113
|
+
- `release-build` constructs artifacts twice from independent exports of the
|
|
114
|
+
committed tree and structurally rejects stale flat modules even if
|
|
115
|
+
`top_level.txt` is misleading.
|
|
116
|
+
- Adopter-manifest validation checks declaration structure and local overlay
|
|
117
|
+
integrity; remote version currency remains the fleet verifier's responsibility,
|
|
118
|
+
so package publication and ecosystem rollout are genuinely separate phases.
|
|
119
|
+
- The declared development extra installs pytest, Maturin, and twine while the
|
|
120
|
+
required repository suite remains standard-library unittest.
|
|
121
|
+
|
|
122
|
+
## 2026-07-26 semantic freshness and ledger reconciliation
|
|
123
|
+
|
|
124
|
+
- Audit registry deadlines now block validation after expiry even if the
|
|
125
|
+
dashboard was regenerated; source review, not projection refresh, is required.
|
|
126
|
+
- Upstream research metadata registers every top-level claim document under a
|
|
127
|
+
dated, maximum-30-day review contract. Missing documents and expired contracts
|
|
128
|
+
have regression coverage.
|
|
129
|
+
- `repopact new` stamps upstream work items against
|
|
130
|
+
`repopact/schemas/work-item.schema.json` after the package-resource move while
|
|
131
|
+
retaining the conventional root `schemas/` URI in adopter repositories.
|
|
132
|
+
- WI 020–022 preserve partial evidence criterion by criterion without converting
|
|
133
|
+
missing launch, benchmark, statistical, or real-model proof into completion.
|
|
134
|
+
|
|
135
|
+
## 2026-07-26 package-resource seed closure
|
|
136
|
+
|
|
137
|
+
- Canonical schemas and templates live inside the `repopact` package and ship
|
|
138
|
+
through setuptools package data; the deprecated `data-files` install surface
|
|
139
|
+
is removed.
|
|
140
|
+
- `init`, `adopt`, `doctor`, validation, record stamping, conformance, and fleet
|
|
141
|
+
verification resolve packaged resources through `importlib.resources`, while
|
|
142
|
+
adopter repositories retain their conventional root `schemas/` and
|
|
143
|
+
`templates/` copies.
|
|
144
|
+
- The protected schema surface moved from `schemas/**` to
|
|
145
|
+
`repopact/schemas/**` with explicit operator approval for WI-036 AC-2.
|
|
146
|
+
|
|
147
|
+
## 2026-07-26 single-package execution and ownership closure
|
|
148
|
+
|
|
149
|
+
- The distribution exposes one top-level package, `repopact`; all internal modules use
|
|
150
|
+
package-relative imports and the console script remains the supported interface.
|
|
151
|
+
- Seeded repositories contain governed state but no vendored tooling. The installed
|
|
152
|
+
package executes validation, generation, and record-stamping (decision 0029).
|
|
153
|
+
- RepoPact enables exact Git-tracked path ownership in `governance/owners.json`.
|
|
154
|
+
Deterministic diagnostics reject both unowned paths and overlapping ownership,
|
|
155
|
+
while adopters can opt into the checkout-relative rule after mapping their tree.
|
|
156
|
+
- Test copies exclude virtual environments and build caches, schema validators
|
|
157
|
+
are reused by content, and exported trees skip unnecessary Git probes. These
|
|
158
|
+
remove the dominant local suite-time cost while preserving isolated repository
|
|
159
|
+
state per test.
|
|
160
|
+
|
|
161
|
+
## 2026-07-22 canonical research metadata and trace repair
|
|
162
|
+
|
|
163
|
+
- `research/metadata.json` is the machine source for lifecycle states, PactBench task
|
|
164
|
+
count, study/hypothesis mappings, threat identifiers, and the proposed-state trace.
|
|
165
|
+
- `validate_research.py` cross-checks repeated human-authored facts without generating
|
|
166
|
+
or token-substituting semantic research claims.
|
|
167
|
+
- The normal repository gate activates this check only for the upstream research record,
|
|
168
|
+
so adopters are not required to carry RepoPact's paper metadata.
|
|
169
|
+
- Mutation tests reject duplicate/missing threats, a four-state figure, stale task count,
|
|
170
|
+
stale hypothesis range, and pre-2.0 provenance wording.
|
|
171
|
+
|
|
172
|
+
## 2026-07-18 complete conformance rule coverage
|
|
173
|
+
|
|
174
|
+
- The conformance manifest now inventories every repository-tree rule named by the
|
|
175
|
+
SPEC and machine-enforced invariants covered by the reference validator.
|
|
176
|
+
- Coverage is bidirectional: omitted-rule and unknown-rule mappings fail before
|
|
177
|
+
conformance execution, and repository tests reject undeclared fixture directories.
|
|
178
|
+
- Reject fixtures must produce exactly one intended reference violation. The runner
|
|
179
|
+
reports unexpected secondary diagnostics deterministically and fails the case.
|
|
180
|
+
- Added provenance acceptance/rejection, lifecycle identity, semantic version,
|
|
181
|
+
schema validity, orphan work, disjoint scope, and missing/stale dashboard cases.
|
|
182
|
+
|
|
183
|
+
## 2026-07-18 deterministic adopter fleet verification
|
|
184
|
+
|
|
185
|
+
- Added a versioned, schema-validated public adopter manifest covering exact PyPI
|
|
186
|
+
pins and vendored consumers as distinct contracts.
|
|
187
|
+
- `repopact fleet-verify` resolves each declared public default branch, reads its
|
|
188
|
+
version marker at the resolved commit, and fails closed on stale or unreachable
|
|
189
|
+
state while reporting unregistered local candidates separately.
|
|
190
|
+
- Vendored parity is checksum-backed: exact files must remain byte-identical and
|
|
191
|
+
declared overlays must reconstruct the adopter bytes from an immutable upstream
|
|
192
|
+
revision. A version marker alone cannot pass.
|
|
193
|
+
- `repopact release-closeout` reports package publication and ecosystem rollout as
|
|
194
|
+
separate phases and succeeds only when both have evidence.
|
|
195
|
+
|
|
196
|
+
## 2026-06-29 proposed lifecycle state (025)
|
|
197
|
+
|
|
198
|
+
- Added `proposed` to the shared lifecycle model as candidate work that does not
|
|
199
|
+
grant implementation authority.
|
|
200
|
+
- Validator accepts structurally valid proposed work items but rejects active or
|
|
201
|
+
completed work that depends on proposed work.
|
|
202
|
+
- Bootstrap and CLI record-stamping now create/use `work/proposed/`; conformance
|
|
203
|
+
covers the new lifecycle rule.
|
|
204
|
+
|
|
205
|
+
## 2026-06-15 adoption surface and hardening (003)
|
|
206
|
+
|
|
207
|
+
- Records are now validated against `schemas/*.json` via `jsonschema` (decision
|
|
208
|
+
0003); the validator retains cross-record semantic checks. Finding 001 closed.
|
|
209
|
+
- Added: audit-finding validation, spec-version check, dependency-cycle detection,
|
|
210
|
+
symbol-level frozen-surface enforcement.
|
|
211
|
+
- Added bootstrap (`init_repo.py`) and record-stamping (`new.py`) tooling plus
|
|
212
|
+
`templates/`, making RepoPact installable into a new repository.
|
|
213
|
+
|
|
214
|
+
## 2026-06-15 governance primitives (002)
|
|
215
|
+
|
|
216
|
+
- Validator enforces invariants, frozen-surface structure, role/scope references,
|
|
217
|
+
decision and policy front matter, and registry-driven contract coverage.
|
|
218
|
+
- Mandatory per-contract `_audit` triples relaxed; an `_audit/` companion is
|
|
219
|
+
validated for completeness only when present (INV-7, policy 001).
|
|
220
|
+
- Optional disjoint-active-scope check, off by default.
|
|
221
|
+
|
|
222
|
+
## 2026-06-14 bootstrap
|
|
223
|
+
|
|
224
|
+
- The validator is read-only and reports deterministic path-scoped errors.
|
|
225
|
+
- Dashboard generation writes only `audits/reports/dashboard.md`.
|
|
226
|
+
- Lifecycle-blocking rules have unit-test coverage.
|
|
227
|
+
|
|
228
|
+
## 2026-07-18 deterministic dashboard enforcement
|
|
229
|
+
|
|
230
|
+
- `validate_repo.py` compares the committed dashboard with a fresh canonical render
|
|
231
|
+
and rejects missing or stale output.
|
|
232
|
+
- The generator no longer embeds its run date, so output stays byte-stable until a
|
|
233
|
+
displayed source value or audit-cadence state changes.
|
|
234
|
+
- Bootstrap, adoption, record stamping, plan import, takeover, conformance
|
|
235
|
+
materialization, and doctor repair refresh the derived dashboard as part of their
|
|
236
|
+
governed mutation path.
|
|
237
|
+
- Regression tests cover missing/stale rejection, stable rendering, doctor repair,
|
|
238
|
+
and command compatibility.
|
|
239
|
+
|
|
240
|
+
## 2026-09-03 WI050 implementation pass
|
|
241
|
+
|
|
242
|
+
- Added the six approved admission schemas only; existing frozen schemas,
|
|
243
|
+
invariants, charter, and workflows remain unchanged.
|
|
244
|
+
- Added the vendor-neutral canonical policy core, Ed25519 approval receipts,
|
|
245
|
+
external registration/trust pin, short leases, revocation and delegation
|
|
246
|
+
subset checks, plus fail-closed guard and truthful adapter/platform SPI.
|
|
247
|
+
- CLI, validator, doctor, SPEC, guide, tests, and audit inventory now expose the
|
|
248
|
+
opt-in admission plane. Reference adapters are pre-action gates and do not
|
|
249
|
+
claim arbitrary process or filesystem confinement.
|
|
250
|
+
|
|
251
|
+
## 2026-09-03 WI050 protected enforcement substrate phase
|
|
252
|
+
|
|
253
|
+
- Replaced the caller-controlled `protected_storage` assertion with a
|
|
254
|
+
backend-owned `BackendAttestation` carrying integrity, service identity,
|
|
255
|
+
protected-state, host-configuration, path, and process facts.
|
|
256
|
+
- Added the Windows `RepoPactGuard` installation/status/register/uninstall
|
|
257
|
+
contract, protected runtime/state locations, LocalSystem SCM service host,
|
|
258
|
+
authenticated AF_PIPE protocol, and conservative ACL/interpreter checks.
|
|
259
|
+
- Added Linux system-service and macOS launch-daemon backend contracts plus the
|
|
260
|
+
cross-platform `run_admission_platform_conformance` harness. Testing-only
|
|
261
|
+
attestations are explicitly marked and excluded from production proof.
|
|
262
|
+
- Current Windows token is non-elevated, so native installation and tamper E2E
|
|
263
|
+
are pending operator elevation; the backend reports `not-covered` and the
|
|
264
|
+
enforced path fails closed rather than using a fake service.
|
|
265
|
+
|
|
266
|
+
## 2026-09-03 WI050 protected-service correction review
|
|
267
|
+
|
|
268
|
+
- The prior substrate's ordinary lease dictionary was a client-forgeable
|
|
269
|
+
authority representation. `LeaseStore` now mints opaque high-entropy tokens,
|
|
270
|
+
keeps canonical lease records in the guard process, and invalidates all live
|
|
271
|
+
capabilities on restart; `issue_lease` is retained only as a reference policy
|
|
272
|
+
helper and is not accepted over production IPC.
|
|
273
|
+
- `NativeGuardClient` is the production adapter seam for health, discovery,
|
|
274
|
+
authorization, checks, revocation, and delegation. It never reads ProgramData
|
|
275
|
+
state and fails closed on unavailable/spoofed IPC. Service-side delegation
|
|
276
|
+
mints child tokens only after strict-subset validation.
|
|
277
|
+
- Windows IPC now has an explicit SDDL DACL and verifies the server PID against
|
|
278
|
+
SCM plus LocalSystem service configuration. Client lease binding is derived
|
|
279
|
+
from the pipe peer (PID, process-start identity, SID where available, and
|
|
280
|
+
transport), not caller-provided session or PID fields.
|
|
281
|
+
- The SCM image is machine-wide and contains only the protected state root;
|
|
282
|
+
adoption-id registration directories support multiple repositories and
|
|
283
|
+
linked-worktree common-dir resolution. `guard install --preflight` performs
|
|
284
|
+
all possible checks without mutation, and installation stages/rolls back its
|
|
285
|
+
exact root/service artifacts on failure.
|
|
286
|
+
- Native destructive proof remains intentionally unrun. AC-14, AC-15, AC-16,
|
|
287
|
+
and AC-18 remain pending until elevated installation and real cross-process,
|
|
288
|
+
multi-repository, and three-OS evidence exist.
|
|
289
|
+
|
|
290
|
+
## 2026-09-03 WI050 interpreter trust-chain correction review
|
|
291
|
+
|
|
292
|
+
- Windows guard installation accepts an explicit `--interpreter`; omitted
|
|
293
|
+
selection is still recorded as the canonical `sys.executable` candidate and
|
|
294
|
+
receives identical validation. The selected canonical path is persisted in
|
|
295
|
+
the install manifest and exact SCM command.
|
|
296
|
+
- Preflight executes that candidate with Python `-I` and hostile Python
|
|
297
|
+
environment variables, performs Ed25519 verification, and records actual
|
|
298
|
+
cryptography/native module origins. The service command uses the same
|
|
299
|
+
isolated mode and the protected installed runtime path.
|
|
300
|
+
- Every required origin and its parent chain is rejected when it is in a
|
|
301
|
+
checkout, `.venv`, known user-writable root (including user site, AppData,
|
|
302
|
+
TEMP, and Downloads), reparse hierarchy, or broad-user-writable ACL. A
|
|
303
|
+
dependency failure is non-mutating and leaves `mutations=[]`.
|
|
304
|
+
- Native installation remains unperformed; AC-14, AC-15, AC-16, and AC-18
|
|
305
|
+
remain pending, and Linux/macOS proof remains reserved for their machines.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Tooling Audit Inventory
|
|
2
|
+
|
|
3
|
+
| path | owner | last_reviewed | alignment | next_review | notes |
|
|
4
|
+
| --- | --- | --- | --- | --- | --- |
|
|
5
|
+
| repopact/validate_repo.py | tooling-owner | 2026-09-10 | current | 2026-12-09 | Historical Python schema/cross-record validator retained as a comparator component; canonical migrated product validation is owned by the Rust engine. |
|
|
6
|
+
| repopact/validate_verification.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | Independent Python WI046 verification-contract compatibility validator used to keep conformance fixture isolation and Python parity current without making Python product authority. |
|
|
7
|
+
| repopact/legacy_validate.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | Explicit Python compatibility comparator composing the historical validator with post-cutover compatibility validators such as WI046. |
|
|
8
|
+
| repopact/engine_client.py | tooling-owner | 2026-09-10 | current | 2026-12-09 | Fail-closed Python compatibility client for same-environment `repopact-engine` discovery, versioned JSON transport, handshake, timeout, request identity, and structured error mapping. |
|
|
9
|
+
| repopact/verification.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | WI046 local-first contract loader/executor with shell-free argv execution, host/complete coverage aggregation, explicit platform/capability states, stable pass/fail/incomplete/error results, and immutable repository-native evidence capture tied to an existing work item. |
|
|
10
|
+
| repopact/verify_cli.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | Scriptable local verification entry point with human/JSON output, stable 0/1/2 exit semantics, and explicit `--evidence-work-item`/`--evidence-id` recording controls. |
|
|
11
|
+
| repopact/release_local.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | WI046 local release verification/build/manifest/inspect/publish boundary; publication is explicit, manifest hashes are rechecked, and credentials remain external. |
|
|
12
|
+
| rust/crates/repopact-validation/src/verification.rs | tooling-owner | 2026-09-12 | current | 2026-12-11 | Shared canonical WI046 verification-contract semantics now execute inside the common Rust validator used by core/engine, Workbench, and mutation post-validation: schema, default-profile reference, duplicate-step, repository-contained cwd, and placeholder checks. No subprocess execution is owned here. |
|
|
13
|
+
| rust/crates/repopact-repository/src/lib.rs | tooling-owner | 2026-09-12 | current | 2026-12-11 | Immutable repository snapshot/read-set includes `governance/verification.json`, so verification-policy changes participate in snapshot identity and canonical engine validation. |
|
|
14
|
+
| rust/apps/repopact-engine/src/bin/repopact.rs | tooling-owner | 2026-09-12 | current | 2026-12-11 | Native command shim routes `verify` and `release` to installed local Python command modules while retaining legacy CLI dispatch; it owns no governance semantics. |
|
|
15
|
+
| repopact/admission.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | WI050 canonical JSON/SHA-256 identity, Ed25519 receipts, external protected registration/trust pin, opt-in admission policy, leases, revocation, delegation subsets, and safe audit records. No policy or enabled=false is valid standalone mode. |
|
|
16
|
+
| repopact/enforcement.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | WI050 adopter-neutral EnforcementProvider SPI and canonical adapter/provider/effective enforcement intersection resolver; no downstream product dependency. |
|
|
17
|
+
| repopact/guard.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | WI050 backend-attested fail-closed guard plus ephemeral server-side opaque lease store, peer binding, global service dispatch, and explicit testing client. |
|
|
18
|
+
| repopact/adapters.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | WI050 truthful adapter capability SPI, generic provider-backed pre-action/launcher gates, and native-client-compatible production boundary; reference families remain non-sandbox claims. |
|
|
19
|
+
| repopact/platform_backends.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | WI050 Windows/Linux/macOS backend contracts; Windows global service install has explicit isolated-interpreter selection, transitive dependency-origin/ACL-chain preflight, and transactional rollback. |
|
|
20
|
+
| repopact/guard_ipc.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | WI050 portable JSON protocol, NativeGuardClient, explicit Windows named-pipe SDDL, SCM/PID identity verification, and OS-derived peer binding. |
|
|
21
|
+
| repopact/windows_guard_service.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | WI050 machine-wide LocalSystem service host; only protected global state root is in SCM command line, with OS-derived client identity. |
|
|
22
|
+
| repopact/run_admission_platform_conformance.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | WI050 semantic corpus plus explicit native-client case matrix; testing backend is never counted as native proof. |
|
|
23
|
+
| repopact/doctor.py | tooling-owner | 2026-09-02 | current | 2026-12-01 | Drift diagnosis and safe repairs; `source-of-truth-stale` resolves every token relative to its declaring record and remains advisory/non-destructive. |
|
|
24
|
+
| repopact/package_version.py | tooling-owner | 2026-09-10 | current | 2026-12-09 | Deterministically maps the VERSION-pinned RELEASE_LABEL to PEP 440 package metadata shared by the Python package and Rust engine build identity. |
|
|
25
|
+
| MANIFEST.in | tooling-owner | 2026-09-02 | current | 2026-12-01 | Ensures VERSION and optional RELEASE_LABEL survive source exports so isolated builds derive the governed package identity. |
|
|
26
|
+
| repopact/validate_research.py | tooling-owner | 2026-07-26 | current | 2026-10-24 | Cross-checks canonical upstream research metadata against lifecycle implementation, paper/figure/protocol facts, threat identifiers, benchmark counts/mappings, the proposed-state evidence trace, complete top-level claim coverage, and a maximum 30-day review deadline. |
|
|
27
|
+
| repopact/generate_dashboard.py | tooling-owner | 2026-07-26 | current | 2026-10-24 | Deterministically derives status, record counts, spec version, and audit freshness under audits/reports; omits run-date churn and exposes the canonical writer used by mutation and repair commands. |
|
|
28
|
+
| repopact/repo_model.py | tooling-owner | 2026-09-02 | current | 2026-12-01 | Shared record discovery, lifecycle status list, JSON loading, and structural same-repository linked-worktree detection while preserving independent nested repositories and stale conventional worktree fallback. |
|
|
29
|
+
| repopact/frontmatter.py | tooling-owner | 2026-07-26 | current | 2026-10-24 | Minimal front-matter parser for decision and policy records. |
|
|
30
|
+
| repopact/check_frozen_surface.py | tooling-owner | 2026-07-26 | current | 2026-10-24 | Diff-time backstop for INV-6: path and symbol matching; best-effort outside git. |
|
|
31
|
+
| repopact/init_repo.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | Bootstraps governed state without vendoring tooling and now seeds the optional local-first verification contract with hosted CI/CD default off. |
|
|
32
|
+
| repopact/new.py | tooling-owner | 2026-07-26 | current | 2026-10-24 | Stamps work item / decision / policy records from templates; work items accept a lifecycle status and resolve their schema URI to an upstream package schema or an adopter root schema (003 B2, 0023). |
|
|
33
|
+
| repopact/generate_spec.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | Generates SPEC.md catalog + invariant blocks from schemas and invariants, including the WI046 verification-contract record type. |
|
|
34
|
+
| scripts/demo.sh / scripts/demo.ps1 | tooling-owner | 2026-06-15 | current | 2026-09-15 | Scripted demo of the init -> work -> evidence loop (004). |
|
|
35
|
+
| repopact/cli.py | tooling-owner | 2026-09-03 | current | 2026-12-02 | `repopact` compatibility CLI including opt-in WI050 admission setup/status/begin/revoke, bounded proposal/approval operations, and existing governance/release commands; WI046 verify/release grouping dispatches at the native command shim. |
|
|
36
|
+
| repopact/fleet_verify.py | tooling-owner | 2026-09-13 | current | 2026-12-13 | Deterministically verifies declared public adopter heads and version contracts, supports package adopters with canonical-first local extensions, retains reviewable vendored-overlay comparison for legacy manifests, collapses duplicate local checkouts by remote identity, and gates release closeout on separate publication and ecosystem phases. |
|
|
37
|
+
| repopact/release_build.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | Exports a clean committed tree twice, builds Maturin platform artifacts with a fixed source-date epoch, requires byte-identical artifacts, rejects package drift, and accounts for the packaged WI046 verification schema. |
|
|
38
|
+
| repopact/run_conformance.py | tooling-owner | 2026-09-12 | current | 2026-12-11 | Materializes the published fixture corpus, enforces bidirectional rule/case coverage, isolates each reject fixture with the explicit Python compatibility oracle, runs canonical Rust by default, and can run that comparator as named regression evidence. |
|
repopact/adapters.py
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"""Vendor-neutral adapter SPI and two reference integration families."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, asdict
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Any, Callable, Mapping
|
|
7
|
+
import subprocess
|
|
8
|
+
|
|
9
|
+
from .admission import AdmissionDecision, iso
|
|
10
|
+
from .enforcement import (
|
|
11
|
+
EnforcementProvider,
|
|
12
|
+
adapter_enforcement_class,
|
|
13
|
+
intersect_enforcement,
|
|
14
|
+
provider_enforcement_class,
|
|
15
|
+
resolve_enforcement_requirement,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@dataclass(frozen=True)
|
|
20
|
+
class AdapterCapabilities:
|
|
21
|
+
adapter_id: str
|
|
22
|
+
adapter_version: str = "1"
|
|
23
|
+
host: str = "generic"
|
|
24
|
+
os: str = "unknown"
|
|
25
|
+
repo_discovery: bool = True
|
|
26
|
+
session_identity: bool = True
|
|
27
|
+
session_start_gate: bool = True
|
|
28
|
+
pre_action_interception: bool = True
|
|
29
|
+
path_reporting: bool = True
|
|
30
|
+
path_confinement: bool = False
|
|
31
|
+
process_confinement: bool = False
|
|
32
|
+
network_confinement: bool = False
|
|
33
|
+
protected_host_config: bool = False
|
|
34
|
+
operator_handoff: bool = False
|
|
35
|
+
subprincipal_propagation: bool = False
|
|
36
|
+
fail_closed_health: bool = True
|
|
37
|
+
audit_receipt: bool = True
|
|
38
|
+
|
|
39
|
+
def enforcement_class(self, required: str = "pre-action") -> str:
|
|
40
|
+
if not self.fail_closed_health or not self.repo_discovery or not self.session_identity: return "not-covered"
|
|
41
|
+
if required == "sandbox/process-enforced" and self.path_confinement and self.process_confinement: return "sandbox/process-enforced"
|
|
42
|
+
if self.pre_action_interception: return "pre-action"
|
|
43
|
+
if self.session_start_gate: return "session-start"
|
|
44
|
+
return "instruction-only"
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def security_level(self) -> str:
|
|
48
|
+
# A capability vector alone is not an enforcement witness. The bound
|
|
49
|
+
# adapter's ``enforcement_class`` method combines it with backend-owned
|
|
50
|
+
# guard health before exposing an effective class.
|
|
51
|
+
return "not-covered"
|
|
52
|
+
|
|
53
|
+
def record(self) -> dict[str, Any]:
|
|
54
|
+
raw = asdict(self)
|
|
55
|
+
caps = {name: raw.pop(name) for name in ("repo_discovery", "session_identity", "session_start_gate", "pre_action_interception", "path_reporting", "path_confinement", "process_confinement", "network_confinement", "protected_host_config", "operator_handoff", "subprincipal_propagation", "fail_closed_health", "audit_receipt")}
|
|
56
|
+
raw["spi_version"] = "1"
|
|
57
|
+
raw["capabilities"] = caps
|
|
58
|
+
raw["guard"] = {"endpoint_id": "protected-local", "protocol_version": "1", "required_health": "fail-closed"}
|
|
59
|
+
raw["action_families"] = ["mutation", "process", "read-only"]
|
|
60
|
+
raw["health"] = {"status": "healthy", "checked_at": iso()}
|
|
61
|
+
raw["os"] = raw["os"] if raw["os"] in {"windows", "linux", "macos"} else "other"
|
|
62
|
+
return raw
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class PreActionAdapter:
|
|
66
|
+
"""Reference pre-action adapter over any adopter-owned provider.
|
|
67
|
+
|
|
68
|
+
``guard`` remains the parameter name for source compatibility, but it is
|
|
69
|
+
deliberately typed and treated as the generic provider SPI. No adapter
|
|
70
|
+
imports or requires the built-in ``ProtectedGuard`` implementation.
|
|
71
|
+
"""
|
|
72
|
+
def __init__(self, provider: EnforcementProvider | Any, capabilities: AdapterCapabilities | None = None):
|
|
73
|
+
self.provider = provider
|
|
74
|
+
# Compatibility for callers that used the old attribute; semantics are
|
|
75
|
+
# provider-based and do not depend on the concrete guard class.
|
|
76
|
+
self.guard = provider
|
|
77
|
+
self.capabilities = capabilities or AdapterCapabilities("repopact-reference")
|
|
78
|
+
|
|
79
|
+
def before(self, action: Mapping[str, Any], callback: Callable[[], Any], lease: Mapping[str, Any] | None = None) -> tuple[AdmissionDecision, Any | None]:
|
|
80
|
+
decision = self.provider.check(action, lease)
|
|
81
|
+
if not decision.allowed: return decision, None
|
|
82
|
+
return decision, callback()
|
|
83
|
+
|
|
84
|
+
def start(self, action: Mapping[str, Any]) -> AdmissionDecision:
|
|
85
|
+
return self.provider.check(action)
|
|
86
|
+
|
|
87
|
+
def enforcement_class(self, required: str = "pre-action") -> str:
|
|
88
|
+
"""Return adapter/provider assurance intersection, never an adapter claim."""
|
|
89
|
+
return intersect_enforcement(
|
|
90
|
+
adapter_enforcement_class(self.capabilities, required),
|
|
91
|
+
provider_enforcement_class(self.provider),
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
def enforcement_resolution(self, policy: Mapping[str, Any] | None, *, root: Path | None = None):
|
|
95
|
+
return resolve_enforcement_requirement(policy, self.provider, self.capabilities, root=root)
|
|
96
|
+
|
|
97
|
+
def capability_record(self) -> dict[str, Any]:
|
|
98
|
+
record = self.capabilities.record()
|
|
99
|
+
health = self.provider.health()
|
|
100
|
+
record["health"] = {"status": "healthy" if health.healthy and health.protected else "failed", "checked_at": iso()}
|
|
101
|
+
return record
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class LauncherAdapter(PreActionAdapter):
|
|
105
|
+
"""Independent launcher gate; child creation happens only after admission."""
|
|
106
|
+
def __init__(self, provider: EnforcementProvider | Any, capabilities: AdapterCapabilities | None = None):
|
|
107
|
+
super().__init__(provider, capabilities or AdapterCapabilities(
|
|
108
|
+
"repopact-launcher-reference", pre_action_interception=False,
|
|
109
|
+
path_reporting=False, session_start_gate=True))
|
|
110
|
+
|
|
111
|
+
def launch(self, action: Mapping[str, Any], launch: Callable[[], Any] | list[str] | tuple[str, ...], lease: Mapping[str, Any] | None = None, *, cwd: str | Path | None = None, env: Mapping[str, str] | None = None) -> tuple[AdmissionDecision, Any | None]:
|
|
112
|
+
decision = self.provider.check(action, lease)
|
|
113
|
+
if not decision.allowed:
|
|
114
|
+
return decision, None
|
|
115
|
+
if callable(launch):
|
|
116
|
+
return decision, launch()
|
|
117
|
+
if not launch:
|
|
118
|
+
return AdmissionDecision.deny("NOT_COVERED", "launcher command is empty"), None
|
|
119
|
+
# No shell interpolation: this is a launcher/proxy integration, not a
|
|
120
|
+
# claim that arbitrary children are confined after creation.
|
|
121
|
+
return decision, subprocess.Popen(list(launch), cwd=str(cwd) if cwd else None, env=dict(env) if env else None)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class CodexReferenceAdapter(PreActionAdapter):
|
|
125
|
+
def __init__(self, provider: EnforcementProvider | Any): super().__init__(provider, AdapterCapabilities("repopact-codex-reference", host="coding-surface"))
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class ClaudeReferenceAdapter(PreActionAdapter):
|
|
129
|
+
def __init__(self, provider: EnforcementProvider | Any): super().__init__(provider, AdapterCapabilities("repopact-claude-reference", host="coding-surface"))
|