Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
96c11ac
fix(ci): support declaration mutation evidence
Abiorh001 Aug 5, 2026
a02de6b
ci: bind declaration mutation correction
Abiorh001 Aug 5, 2026
d6b4e4f
fix(ci): close declaration provenance bypasses
Abiorh001 Aug 5, 2026
c11ba41
ci: align protected mutation ownership
Abiorh001 Aug 5, 2026
d133a5c
fix(ci): validate declaration call shape
Abiorh001 Aug 5, 2026
663cf00
fix(ci): restrict declaration decorators
Abiorh001 Aug 5, 2026
6e03f87
fix(ci): constrain dataclass declaration decorators
Abiorh001 Aug 5, 2026
30bc80f
ci: bind dataclass decorator validation
Abiorh001 Aug 5, 2026
545395a
test(ci): bind complete mutation policy contract
Abiorh001 Aug 5, 2026
5b4e48c
test(ci): execute owned mutation scenarios
Abiorh001 Aug 5, 2026
3f0abf6
Revert "test(ci): execute owned mutation scenarios"
Abiorh001 Aug 5, 2026
c077d27
Revert "test(ci): bind complete mutation policy contract"
Abiorh001 Aug 5, 2026
1e1a776
Revert "ci: bind dataclass decorator validation"
Abiorh001 Aug 5, 2026
8f62ab5
Revert "fix(ci): constrain dataclass declaration decorators"
Abiorh001 Aug 5, 2026
1a8a251
Revert "fix(ci): restrict declaration decorators"
Abiorh001 Aug 5, 2026
5eff288
Revert "fix(ci): validate declaration call shape"
Abiorh001 Aug 5, 2026
67217fe
Revert "ci: align protected mutation ownership"
Abiorh001 Aug 5, 2026
1be5435
Revert "fix(ci): close declaration provenance bypasses"
Abiorh001 Aug 5, 2026
bd852b5
Revert "ci: bind declaration mutation correction"
Abiorh001 Aug 5, 2026
a5925bf
Revert "fix(ci): support declaration mutation evidence"
Abiorh001 Aug 5, 2026
79e1369
ci: retire blocking mutation workflow
Abiorh001 Aug 5, 2026
22eda94
test(ci): bind retired mutation workflow state
Abiorh001 Aug 5, 2026
54cd358
docs(ci): close retired mutation chunk
Abiorh001 Aug 5, 2026
1d8c45a
docs(ci): bind mutation reactivation guard
Abiorh001 Aug 5, 2026
e48fb9e
Merge remote-tracking branch 'origin/main' into codex/ws-qual-001-05m…
Abiorh001 Aug 5, 2026
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 @@ -24,12 +24,12 @@ remain stopped historical experiments. Do not resume them.
| `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 | Merged PR #281 |
| `WS-QUAL-001-04M` | Pilot pinned changed-scope mutation evidence without a score gate | L1 | Merged PR #285 as `7f395d47`; hosted calibration accepted |
| `WS-QUAL-001-05M` | Add calibrated blocking behavior-mutation policy | L1 | Active by explicit human instruction |
| `WS-QUAL-001-05M` | Add calibrated blocking behavior-mutation policy | L1 | Retired after callable-wide enforcement proved unsuitable; requires a fresh changed-line-aware plan |

## Dependency rule

`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
either implementation chunk.
The completed pilot evidence remains historical input. Do not restart `05M` or
another blocking mutation workflow without a fresh bounded plan proving that
unchanged executable lines cannot block a declaration-only change.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ wall time, and a 464.471-second slowest lane.
The global blocking floor remains 78 percent by explicit human decision. Named
new or materially changed subsystem checks remain blocking at 90 percent.

## Current gate
## Mutation-gate disposition

`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
Expand All @@ -27,19 +27,18 @@ error, timeout, or suspicious outcomes. Strong calibration killed two
representative mutants and the deliberately weak calibration left two alive.
The human accepted this evidence and explicitly started `WS-QUAL-001-05M`.

The corrected proposal remains two-stage:
The subsequent blocking rollout proved unsuitable for ordinary work: its
callable-wide selection treated unchanged executable lines as part of every
small changed declaration and produced unresolvable survivor sets. The hosted
workflow is therefore retired pending a separately reviewed changed-line-aware
design. Existing policy and evidence files remain historical input, not an
active PR requirement.

1. `04M` — merged bounded, pinned, changed-scope mutation pilot with complete
evidence and no blocking score.
2. Human calibration checkpoint — accepted.
3. `05M` — implemented and internally reviewed bounded blocking survivor
policy for eligible changed logic and explicit test-only behavior claims;
exact-head hosted CI and external review remain before human merge.

The mutation score remains observational. Existing Backend semantic lanes,
global 78-percent coverage, and protected 90-percent subsystem floors remain
unchanged and blocking on their existing terms.
Existing Backend semantic lanes, global 78-percent coverage, protected
90-percent subsystem floors, lint, and review gates remain unchanged and
blocking on their existing terms.

## Stop condition

Stop after the 05M PR is merge-ready. Do not start another QUAL chunk.
Do not restart mutation enforcement without a fresh bounded plan and proof that
unchanged executable lines cannot block a declaration-only change.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,41 @@ behavior. The textual TOML rewrite remains fail closed; typed failure is the
required safety property for unsupported legacy shapes.

Exact-head hosted CI and CodeRabbit rereview remain required after publication.

## PR #289 retirement review on `54cd358a`

Comments addressed:

- Rewrote the PR description using the complete repository trust-bundle
template so its title, intent, scope, evidence, reviewer results, deliberate
workflow retirement, remaining risk, and follow-up boundary match the final
diff.
- Added the same reactivation guard to `CONTRIBUTING.md`, the behavior-claim
guide, and the Backend operations guide: enforcement cannot resume without an
approved fresh changed-line-aware plan proving unchanged executable lines do
not block declaration-only changes.
- Reworded the remaining claim-discovery and fail-closed guidance as historical
behavior rather than an active contribution requirement.

Comments deferred:

- Two mutation-policy inline threads are outdated because the referenced
implementation was fully reverted and is absent from the final PR diff.

Human decisions needed:

- A repository administrator must remove the retired check from external
branch-protection settings if it was configured there.

Commands rerun:

```text
python3 scripts/check_markdown_links.py
python3 scripts/check_stale_workstream_wording.py
git diff --check
```

Remaining risks:

- Behavior mutation is no longer enforced in hosted CI. Reintroduction requires
the separately approved changed-line-aware design recorded in current status.
58 changes: 35 additions & 23 deletions .ci/behavior-claims/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
# Behavior mutation claims

Schema-v1 claim files provide bounded owning pytest nodes for mutation targets.
They are additive: every eligible changed production or CI-runtime Python target
is selected independently, and a claim cannot remove or replace one.

The filename and `chunk_id` must match. Targets are repository-relative Python
files under `backend/app/` or `backend/scripts/`; each target also names its
The hosted behavior-mutation workflow is temporarily retired. These files are
retained as historical design input and are not currently required for pull
requests. The claim-discovery and fail-closed rules below describe the retired
design only; do not infer a blocking check from them. Behavior-mutation
enforcement must not resume until a fresh changed-line-aware plan is approved
and proves that unchanged executable lines cannot block a declaration-only
change.

Historically, schema-v1 claim files provided bounded owning pytest nodes for
mutation targets. They were additive: every eligible changed production or
CI-runtime Python target was selected independently, and a claim could not
remove or replace one.

Under that retired design, the filename and `chunk_id` had to match. Targets
were repository-relative Python files under `backend/app/` or
`backend/scripts/`; each target also named its
qualified callables, exact owning pytest nodes, typed observable outcomes, and
any essential real boundaries. Unknown fields, unsafe paths, missing files,
duplicate entries, unowned changed targets, or stale chunk identifiers fail
duplicate entries, unowned changed targets, or stale chunk identifiers failed
closed.

The required behavior-mutation check discovers the one claim changed by the
The retired behavior-mutation check discovered the one claim changed by the
pull request; labels, workflow inputs, environment variables, and PR prose
cannot select it. Copy `example.behavior-claim.json`, rename it to the bounded
chunk identifier, and replace every example target, callable, test, outcome,
and boundary. Eligible production changes without exactly one changed claim
fail closed. A test-only behavior claim is additive and cannot remove an
could not select it. Contributors copied `example.behavior-claim.json`, renamed
it to the bounded chunk identifier, and replaced every example target,
callable, test, outcome, and boundary. Eligible production changes without exactly one changed claim
failed closed. A test-only behavior claim was additive and could not remove an
eligible changed target.

The check has no mutation percentage. Killed mutants pass. A meaningful
The retired check had no mutation percentage. Killed mutants passed. A meaningful
survivor, timeout, suspicious result, engine error, malformed or stale evidence,
target escape, or excluded mutant inside the selected callable scope blocks.
The only surviving control allowed by policy is Workstream's exact deliberately
weak calibration callable; contributors cannot add survivor allowlists,
target escape, or excluded mutant inside the selected callable scope blocked.
The only surviving control allowed by policy was Workstream's exact deliberately
weak calibration callable; contributors could not add survivor allowlists,
free-form exemptions, or source mutation pragmas.

Changes with no eligible target and no claim produce typed `not_applicable`
evidence before the mutation toolchain is installed. Ordinary PR verdicts are
Under the retired design, changes with no eligible target and no claim produced
typed `not_applicable`
evidence before the mutation toolchain was installed. Ordinary PR verdicts were
calculated by the evaluator and Git-delta helper archived from protected base,
not by PR-head policy code.

Validate claim discovery locally from the repository root:
For historical diagnostics only, claim discovery can still be inspected locally
from the repository root:

```bash
backend/.venv/bin/python backend/scripts/mutation_policy.py \
Expand All @@ -42,7 +54,7 @@ backend/.venv/bin/python backend/scripts/mutation_policy.py \
--selection-output /tmp/workstream-mutation-selection.json
```

An unrelated delta reports `applicability: not_applicable`. An applicable
delta must report the exact changed targets, callable ownership, and owning
tests expected by the contributor. Discovery errors are policy failures; fix
the claim or delta rather than editing generated evidence.
Under the retired design, an unrelated delta reported
`applicability: not_applicable`. An applicable delta reported the exact changed
targets, callable ownership, and owning tests expected by the contributor.
This command does not produce active PR evidence or authorize reactivation.
146 changes: 0 additions & 146 deletions .github/workflows/mutation-pilot.yml

This file was deleted.

39 changes: 11 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,34 +72,17 @@ rerun affected checks; unchanged evidence does not need ceremonial repetition.

## Behavior Mutation Claims

Eligible Python changes under `backend/app/` or `backend/scripts/` require one
schema-v1 claim at `.ci/behavior-claims/<chunk-id>.json`. Start from
[the copyable example](.ci/behavior-claims/example.behavior-claim.json) and name
the exact changed callable, its owning pytest node, the observable outcome, and
any essential PostgreSQL, MinIO, HTTP, lock, trigger, or concurrency boundary.
The [claim guide](.ci/behavior-claims/README.md) contains the closed rules.

Run `cd backend && .venv/bin/python -m pytest -q <owning-test-node>` before
opening the PR. From the repository root, validate discovery against the PR
delta with:

```bash
backend/.venv/bin/python backend/scripts/mutation_policy.py \
--repository-root . \
--base-sha "$(git merge-base origin/main HEAD)" \
--head-sha "$(git rev-parse HEAD)" \
--discover \
--selection-output /tmp/workstream-mutation-selection.json
```

Inspect `applicability`, `changed_targets`, `changed_callables`, `tests`, and
`target_owners` in that output. The required mutation check derives targets from the exact git
delta and uses the claim only for bounded callable/test ownership. It does not
use a global score: meaningful survivors and incomplete or unsafe evidence
block. Repair a survivor by strengthening the owning behavior assertion or by
correcting the production behavior; do not add skips, exclusions, allowlists,
or mutation pragmas. Unrelated changes return `not_applicable` automatically
and do not install the mutation engine.
The hosted behavior-mutation check is temporarily retired because its
callable-wide survivor policy blocked declaration-only changes by mutating
unchanged executable lines. Do not treat a behavior claim as a required PR
gate while the replacement is being designed.

Existing claim, schema, policy, dependency, and evidence files remain as
historical design input. They do not replace focused tests, hosted Backend
lanes, coverage floors, internal review, CodeRabbit, or human merge approval.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Behavior-mutation enforcement must not resume until a fresh changed-line-aware
plan is approved and proves that unchanged executable lines cannot block a
declaration-only change.

## Durable Records

Expand Down
Loading
Loading