Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ remain stopped historical experiments. Do not resume them.
| Chunk | Purpose | Risk | State |
|---|---|---:|---|
| `WS-QUAL-001-PLAN3` | Replace percentage-only closure with behavior/mutation assurance | L1 | Merged PR #272; late review corrected by PLAN3R1 |
| `WS-QUAL-001-PLAN3R1` | Resolve five valid late CodeRabbit findings from PR #272 | L1 | Corrective planning chunk in progress |
| `WS-QUAL-001-04M` | Pilot pinned changed-scope mutation evidence without a score gate | L1 | Proposed after PLAN3R1 merge and explicit instruction |
| `WS-QUAL-001-PLAN3R1` | Resolve five valid late CodeRabbit findings from PR #272 | L1 | Merged PR #278 |
| `WS-QUAL-001-04P` | Establish protected hash-verified mutation dependency authority | L1 | In progress by explicit instruction |
| `WS-QUAL-001-04M` | Pilot pinned changed-scope mutation evidence without a score gate | L1 | Proposed after 04P merge and explicit instruction |
| `WS-QUAL-001-05M` | Add calibrated blocking behavior-mutation policy | L1 | Proposed only after accepted 04M hosted evidence and explicit instruction |

## Dependency rule

`PLAN3 -> PLAN3R1 -> 04M -> human calibration checkpoint -> 05M`.
`PLAN3 -> PLAN3R1 -> 04P -> 04M -> human calibration checkpoint -> 05M`.

Each chunk maps to one PR. `04M` may prove that the candidate engine or target
strategy is unsuitable and stop without `05M`. Planning does not pre-authorize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ new or materially changed subsystem checks remain blocking at 90 percent.

## Current gate

`WS-QUAL-001-PLAN3` merged through PR #272. `WS-QUAL-001-PLAN3R1` is a
planning-only correction for five valid CodeRabbit findings that arrived before
the merge but were not addressed. It must merge before `04M` starts.
`WS-QUAL-001-PLAN3` merged through PR #272. Its planning-only correction
`WS-QUAL-001-PLAN3R1` merged through PR #278 after resolving all late CodeRabbit
findings.

`WS-QUAL-001-04P` is now the active bounded prerequisite. It establishes the
protected, exactly pinned, hash-verified mutation dependency authority. It does
not execute mutation testing or start `04M`.

The corrected proposal remains two-stage:

Expand All @@ -24,11 +28,10 @@ The corrected proposal remains two-stage:
3. `05M` — separately approved blocking survivor policy for eligible changed
logic and explicit test-only behavior claims.

No mutation dependency, workflow, policy script, or blocking check has been
No mutation workflow, policy script, execution, or blocking check has been
implemented.

## Stop condition

Stop after the PLAN3R1 correction review and PR. Do not start 04M automatically.
Do not start 05M without accepted exact hosted pilot evidence and a new human
instruction.
Stop after the 04P review and PR. Do not start 04M automatically. Do not start
05M without accepted exact hosted pilot evidence and a new human instruction.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Only these PLAN3 records describe possible current work:

- `WS-QUAL-001-PLAN3-behavior-mutation-assurance.md`
- `WS-QUAL-001-04M-changed-scope-mutation-pilot.md`
- `WS-QUAL-001-04P-protected-mutation-dependency-authority.md`
- `WS-QUAL-001-PLAN3R1-late-external-review-correction.md`
- `WS-QUAL-001-05M-blocking-behavior-mutation-gate.md`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,16 @@ checkout credentials, secrets in mutation execution, or unpinned Actions

- [ ] One engine and transitive closure are exactly pinned and hash locked as
development/CI-only dependencies. Pull-request checks obtain the
approved package, version, and hash authority from the protected base
revision (or an equivalently protected allowlist or prebuilt runtime),
never from a requirements manifest editable by the pull request.
approved package, version, and hash authority only from the protected
base-revision copy of `scripts/mutation-requirements.txt`, never from a
requirements manifest editable by the pull request. An alternate
allowlist or prebuilt runtime is not valid authority for 04M.
- [ ] That protected dependency authority exists before the 04M branch starts;
04M cannot introduce or modify it. If no approved authority exists, 04M
stops for a separate bounded prerequisite rather than installing a tool.
- [ ] The only dependency authority is the protected base-revision copy of
`scripts/mutation-requirements.txt`, introduced by 04P; 04M verifies and
installs that exact copy with `pip --require-hashes`.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- [ ] `backend/pyproject.toml` contains configuration only; the mutation engine
is absent from production dependencies and ordinary dev extras.
`backend/uv.lock` remains unchanged and is not a second install path.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Chunk Contract: WS-QUAL-001-04P — Protected Mutation Dependency Authority

## Goal

Place one reviewed, exactly pinned, hash-verified mutation-tool dependency
authority on protected `main` before the separately started 04M pilot.

## Why this chunk exists

04M must not install a mutation toolchain selected by its own pull request.
Protected `main` therefore needs to own the approved engine and complete
transitive dependency manifest first.

## Risk class

L1 — development/CI supply-chain prerequisite.

## Allowed files

```text
scripts/mutation-requirements.in
scripts/mutation-requirements.txt
.agent-loop/initiatives/WS-QUAL-001-backend-coverage-floor/CHUNK_MAP.md
.agent-loop/initiatives/WS-QUAL-001-backend-coverage-floor/STATUS.md
.agent-loop/initiatives/WS-QUAL-001-backend-coverage-floor/chunks/README.md
.agent-loop/initiatives/WS-QUAL-001-backend-coverage-floor/chunks/WS-QUAL-001-04M-changed-scope-mutation-pilot.md
.agent-loop/initiatives/WS-QUAL-001-backend-coverage-floor/chunks/WS-QUAL-001-04P-protected-mutation-dependency-authority.md
.agent-loop/initiatives/WS-QUAL-001-backend-coverage-floor/reviews/WS-QUAL-001-04P-internal-review-evidence.md
.agent-loop/initiatives/WS-QUAL-001-backend-coverage-floor/reviews/WS-QUAL-001-04P-external-review-response.md
.agent-loop/initiatives/WS-QUAL-001-backend-coverage-floor/reviews/WS-QUAL-001-04P-pr-trust-bundle.md
```

## Not allowed

```text
workflow or mutation execution
backend application, test, pyproject, or uv.lock changes
production dependency changes
coverage-threshold or existing CI changes
automatic start of 04M or 05M
```

## Acceptance criteria

- [ ] `mutmut==3.7.0` is the sole mutation engine.
- [ ] The complete transitive closure is exactly pinned and every requirement
carries one or more SHA-256 hashes.
- [ ] The mutation runner uses the backend-aligned `pytest==8.4.2` and
`coverage==7.15.2` versions, and every other overlapping package matches
`backend/uv.lock`.
- [ ] A clean Python 3.12 `pip --require-hashes` dry run accepts the manifest,
and Python 3.11 resolves a complete compatible hashed wheel set.
- [ ] The manifest contains no project production dependency or index override.
- [ ] 04M may read only the protected base-revision manifest and cannot modify
either authority file.
- [ ] Apart from `scripts/mutation-requirements.in` and its compiled manifest,
no workflow, Backend runtime, test, production dependency, lockfile, or
coverage gate changes.

## Verification commands

```bash
mutation_tmp=$(mktemp -d)
python3.12 -m venv "$mutation_tmp/venv"
"$mutation_tmp/venv/bin/python" --version
"$mutation_tmp/venv/bin/python" -m pip install --dry-run --require-hashes -r scripts/mutation-requirements.txt
python3 scripts/check_markdown_links.py
python3 scripts/check_stale_workstream_wording.py
python3 scripts/check_stale_authorization_docs.py
python3 scripts/check_stale_artifact_contracts.py
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python3 -m pytest -q scripts/test_lightweight_agent_gates.py
git diff --check
```

## Required reviewers

- security/auth
- CI integrity
- reuse/dedup
- docs

## Human review focus

Confirm the manifest is development/CI-only, exactly pinned and hashed, aligned
with the backend test toolchain, and immutable to 04M PR-head code.

## Stop conditions

Stop if the engine cannot coexist with the backend's Python 3.11/3.12 contract,
requires a production dependency change, or cannot be installed with hash
checking enabled.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# WS-QUAL-001-04P External Review Response

## Comments addressed

- 04M now names only the protected base-revision
`scripts/mutation-requirements.txt` as dependency authority and explicitly
rejects an alternate allowlist or prebuilt runtime for this pilot.
- The 04P acceptance criterion now permits its two authority files while
preserving the prohibition on production dependency, lockfile, workflow,
Backend, test, and coverage-gate changes.
- The verification command now creates a disposable Python 3.12 virtual
environment, records its interpreter version, and runs the hash-checked dry
run through that environment's Python executable.

## Comments deferred

None.

## Commands rerun

- Disposable Python 3.12 `pip --dry-run --require-hashes`: passed for all 20
dependencies.
- `python3 scripts/check_markdown_links.py`: passed.
- `PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python3 -m pytest -q scripts/test_lightweight_agent_gates.py`:
10 passed.
- `git diff --check`: passed.

## CI status at repair time

Agent Gates and CodeRabbit passed on the prior remote head. The five Backend
lanes were pending, not failed. Rebasing onto current `main` intentionally
restarts exact-head checks.

## Remaining risk

None for 04P dependency custody. Mutation behavior and runtime remain 04M work.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# WS-QUAL-001-04P Internal Review Evidence

## Reviewed scope

- Reconciled base: `c7270d1969830f436a8f119c0dc771785ca0c62a`
- Reviewed implementation head: `275f0d104f95b09329cc96713d94810589193318`
- Seven changed paths: two dependency-authority files and five QUAL planning
records.
- No workflow, Backend runtime, test, pyproject, lockfile, coverage command, or
threshold change.

## Reviewer results

| Track | Result | Disposition |
|---|---|---|
| Security/auth | PASS | All 20 requirements are exact and SHA-256 hashed; no index, path, VCS, editable, trusted-host, or nested-requirement override exists. |
| CI integrity | PASS | Manifest is development/CI-only; no existing CI or coverage gate changed. |
| Reuse/dedup | PASS after fix | Aligned `packaging==26.2`; all nine packages shared with `backend/uv.lock` now match exactly. |
| Docs | PASS | Contract, status, chunk map, regeneration command, and 04M handoff are consistent. |

## Deterministic evidence

- Python 3.12 clean `pip --dry-run --require-hashes`: passed for all 20
requirements.
- Python 3.11 cross-platform hashed wheel resolution: passed for all 20
requirements.
- Static manifest validation: 20 exact pins, every entry hashed, no index
override.
- Markdown links, stale wording, stale authorization docs, stale artifact
contracts, diff integrity, and 10 lightweight Agent Gates: passed.
- CodeRabbit follow-up: unified 04M on the base-revision manifest, corrected the
production-dependency scope statement, and proved a disposable Python 3.12
verification command.

## Remaining risk

Tool behavior, mutant quality, and hosted runtime remain intentionally unproved
until separately started 04M. This chunk establishes dependency custody only.
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# WS-QUAL-001-04P PR Trust Bundle

## Chunk

`WS-QUAL-001-04P` — Protected Mutation Dependency Authority.

## Goal

Establish a protected-main mutation-tool dependency authority before 04M so
untrusted PR-head code cannot select its own toolchain.

## Human-approved intent

The user explicitly instructed the orchestrator to start this prerequisite.
04M is not started by this PR.

## What changed

- Added a small source authority pinning `mutmut==3.7.0` and backend-aligned
pytest, Coverage, and Packaging versions.
- Added the generated complete 20-package SHA-256 manifest.
- Updated QUAL sequencing and the 04M contract to consume only the protected
base-revision manifest.

## Why it changed

Hashes verify downloaded bytes but do not make PR-selected packages trusted.
The approved package/version/hash set must exist on protected `main` before the
04M branch can use it.

## Design chosen

`scripts/mutation-requirements.in` is the human-reviewed source list;
`scripts/mutation-requirements.txt` is the complete generated install authority.
04M reads the protected base copy and installs with `pip --require-hashes`; it
cannot modify either file.

## Alternatives rejected

- Let 04M create its own hashed lock: PR code would still choose the packages.
- Add mutmut to production or ordinary backend dev dependencies: unnecessary
coupling and lock churn.
- Prebuilt image now: more infrastructure than this bounded prerequisite needs.

## Scope control

Only the two authority files and QUAL planning/review records change. No
workflow, Backend runtime, test, lockfile, or coverage policy changes.

## Product behavior

None.

## Acceptance criteria proof

- Engine: `mutmut==3.7.0`.
- Complete closure: 20 exact pins, all SHA-256 hashed.
- Backend-aligned overlap: all nine shared packages match `backend/uv.lock`.
- Python 3.12 hash-checked dry run: passed.
- Python 3.11 compatible hashed wheel resolution: 20/20 passed.

## Tests/checks run

- Clean Python 3.12 `pip --dry-run --require-hashes`.
- Python 3.11 cross-platform `pip download --require-hashes`.
- Static exact-pin/hash/index validation.
- Markdown links and all stale-document scans.
- 10 lightweight Agent Gates.
- `git diff --check`.

## Test delta

No test changed, skipped, removed, or weakened.

## CI integrity

No workflow, lane, runner, coverage command, dependency installation path, or
threshold changed.

## Reviewer results

Security, CI integrity, reuse/dedup, and docs pass after aligning the sole
shared transitive mismatch. See `WS-QUAL-001-04P-internal-review-evidence.md`.

## External review

Three valid CodeRabbit findings were fixed and verified. See
`WS-QUAL-001-04P-external-review-response.md`. Agent Gates passed on the prior
head; exact rebased-head GitHub checks rerun after push.

## Remaining risks

04M must still prove mutmut behavior, target selection, result evidence, and
hosted runtime. This manifest does not authorize or execute mutation testing.

## Follow-up work

After this PR merges, 04M still requires a separate human instruction.

## Human review focus

Confirm package selection, exact hashes, backend version alignment, and the
protected-base consumption boundary.

## Human merge ownership

Only the user may approve and merge this PR.
7 changes: 7 additions & 0 deletions scripts/mutation-requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Development/CI-only mutation engine. The compiled, hashed manifest is the
# protected-main authority consumed by WS-QUAL-001-04M.
mutmut==3.7.0
# Keep the mutation runner aligned with the backend's tested toolchain.
coverage==7.15.2
packaging==26.2
pytest==8.4.2
Loading
Loading