Skip to content
Open
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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,14 @@ jobs:
run: bash scripts/check_receipt_gate_base_owned.sh --self-test
- name: The PR's own receipt is judged from the base, not the head (PRQ-013)
run: bash scripts/check_receipt_gate_base_owned.sh
# G-10b (PMAT-1063, #3013): every OTHER analyser reference under scripts/ and the
# workflows resolves through the same pin — counted, shrink-only against
# scripts/pmat_unpinned_baseline.txt (measured at the commit it names, never typed);
# the sweep to 0 is G-10c. Case table first, then the live count.
- name: Analyser pin guard case table (scripts/pmat_bin.sh, G-10b PMAT-1063)
run: bash scripts/check_pmat_pinned.sh --self-test
- name: Unpinned analyser references may only fall (shrink-only, G-10b PMAT-1063)
run: bash scripts/check_pmat_pinned.sh
# The case table above is evidence only for the branches it can turn RED,
# and on its first pass it could not turn three of them. Dropping either
# zero-count check left the guard still rejecting on the NEIGHBOURING
Expand Down
1 change: 1 addition & 0 deletions .pr/G-10b-old-tip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21b11c7e298b36e577aa71528be6ada36f1021a9
14 changes: 14 additions & 0 deletions .pr/G-10b-pr-body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PP-066 DAG row **G-10b** · ticket **PMAT-1063** · Closes #3013 · refs #2999 · epic #2873. Receipt: `docs/audits/impl-PMAT-1063-receipt.md`. Follows PR-A (#3011, merged b0a0a51b2).

**What lands.** `scripts/check_pmat_pinned.sh` — the operator assertion as a **shrink-only** guard: `grep -rEn '(^|[^_/])pmat ' scripts/ .github/workflows/ | grep -v pmat_bin`, counted against `scripts/pmat_unpinned_baseline.txt`. The baseline is **243, measured by the guard itself at the commit it names** (`--update` writes the command and the sha into the file; the "281" of the driver was the pre-PR-A count). A count above the baseline is RED naming every line; below it is an improvement to record; a missing or `INVALID` baseline is ENV (exit 2), never a pass. Kind-table entry (`count`) in `check_baseline_ratchets.sh`; two CI steps in `guard-runner-labels` (case table, then live); contract `apr-pinned-analyser-ratchet-v1` 1.0.0 → **1.1.0** (PIN-OB-005 / PIN-F-005). The sweep to 0 is G-10c (#3014).

**Mutation evidence (I3) — on this branch, never in the queue.**
| leg | commit | what | run |
|---|---|---|---|
| RED | `c4f6b618a` mutant: one bare `pmat analyze satd` comment appended to `scripts/ci_target_watch.sh` | `FAIL check_pmat_pinned: unpinned=244 baseline=243 — 1 new line(s) …` naming the line | _run id filled in after CI reports_ |
| GREEN | the revert (next commit) | `PASS … unpinned=243 baseline=243` | _run id filled in_ |

Case table `bash scripts/check_pmat_pinned.sh --self-test` → **20/20**: rows 1–11 the spellings (five match, six sanctioned do not), rows 12–15 the resolver (at-pin resolves; off-pin and absent refused; option-neutral), rows 16–20 the ratchet on a fixture tree (baseline 2 PASS · baseline 1 RED naming both lines · baseline 3 PASS + improvement · no baseline ENV 2 · `INVALID` ENV 2).

**Acceptance (re-run by the orchestrator on the re-cut base b0a0a51b2 — `.pr/G-10b-verify.log`):** self-test 20/20 · live `unpinned=243 baseline=243` · `check_baseline_ratchets.sh` PASS · `check_guards_are_wired.sh` PASS · `pv validate` valid · `check_shell_lint_ratchet.sh` PASS · `check_no_claim_literals.sh` rc 0.
**Write set:** the guard, the baseline, the kind-table line, two ci.yml steps, the contract, the receipt. No DAG/roadmap/README/spec edit.
36 changes: 28 additions & 8 deletions contracts/apr-pinned-analyser-ratchet-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
# scripts/hardcoded_path_shipped_baseline.txt (stamped: count, pmat_version,
# basis) and scripts/check_hardcoded_paths.sh --full-if-capable (absolute
# compare only under a matching stamp; otherwise REPORT and decide HEAD vs
# merge-base under the same binary). The guard that every OTHER analyser
# reference under scripts/ and .github/workflows/ resolves through the pin
# (check_pmat_pinned.sh) is G-10b and extends this contract; the sweep of
# the references it counts is G-10c.
# merge-base under the same binary). 1.1.0 (G-10b, PMAT-1063): the guard
# that every OTHER analyser reference under scripts/ and .github/workflows/
# resolves through the pin — scripts/check_pmat_pinned.sh, counted and
# shrink-only against scripts/pmat_unpinned_baseline.txt. The sweep of the
# references it counts to 0 is G-10c (PMAT-1064).
#
# PROOF LADDER, STATED HONESTLY (F-26)
# * L1 — the resolver and the ratchet exist and are wired in ci.yml job
Expand All @@ -24,7 +25,7 @@
# * L3/L4 — NOT APPLICABLE and not declared: shell guards over a text file.
# ─────────────────────────────────────────────────────────────────────────────
name: apr-pinned-analyser-ratchet
version: "1.0.0"
version: "1.1.0"
scope: >
The analyser pin, the stamped shipped-tier baseline and the differential
ratchet. Out of scope: what the analyser detects (pmat#1017 owns the
Expand All @@ -35,14 +36,15 @@ status: active

metadata:
kind: pattern # a pin-and-compare rule over shell guards and a text file, not a kernel
version: "1.0.0"
version: "1.1.0"
created: '2026-09-06'
last_modified: '2026-09-06'
last_modified: '2026-09-06' # 1.1.0: G-10b adds PIN-OB-005 / PIN-F-005 (the pin guard, shrink-only)
author: PAIML Engineering
references:
- 'scripts/pmat_bin.sh — PMAT_PIN, resolution order, refusal with both versions named'
- 'scripts/check_hardcoded_paths.sh — --full-if-capable: stamped baseline, REPORT BASELINE-STALE/INVALID, HEAD vs merge-base'
- 'scripts/hardcoded_path_shipped_baseline.txt — count:, pmat_version:, basis:'
- 'scripts/check_pmat_pinned.sh — the operator assertion as a shrink-only guard: grep -rEn "(^|[^_/])pmat " scripts/ .github/workflows/ | grep -v pmat_bin, counted against scripts/pmat_unpinned_baseline.txt (G-10b)'
- 'scripts/lib/resolve_base.sh — the base resolver shared with check_roadmap_diff_additive.sh (G-6)'
- 'paiml/infra machines/intel/forjar.yaml — the fleet pin (3.31.0 -> 3.37.0, PMAT-231) that armed the ratchet on 2026-09-06'
- 'PP-066 DAG row G-10, issue #2999, epic #2873'
Expand Down Expand Up @@ -182,8 +184,26 @@ falsification_tests:
delete the three check_hardcoded_paths.sh steps from ci.yml;
check_guards_are_wired.sh must turn RED naming the script.

- id: PIN-F-005
rule: one pin for every reference — counted, shrink-only (G-10b)
prediction: >-
case-table rows 1-11: the five unpinned spellings match, the six sanctioned
ones do not; rows 12-15: the resolver resolves at the pin, refuses off-pin
and absent, leaks no option; rows 16-20 (a fixture tree with 2 unpinned
lines): baseline 2 PASS, baseline 1 RED naming the lines, baseline 3 PASS
with an improvement reported, no baseline ENV exit 2, an INVALID baseline
ENV exit 2. One --self-test run exercises every row.
test: 'bash scripts/check_pmat_pinned.sh --self-test'
if_fails: >-
a gate's number silently depends on whichever analyser PATH resolves, one
script at a time
mutation: >-
reintroduce one bare `pmat comply check` in any script under scripts/;
`bash scripts/check_pmat_pinned.sh` must turn RED naming the line
(count = baseline + 1). Make the guard compare count <= 0 regardless of
the baseline; row 16 must turn RED.

non_goals:
- "check_pmat_pinned.sh — every other analyser reference resolves through the pin (G-10b, shrink-only from the 281 counted on 2026-09-06)."
- "The sweep of those 281 references to 0 (G-10c)."
- "The re-baseline (PMAT-1061): measured under the pin, stamped, its own PR."
- "What counts as a machine-specific path: the analyser's detector (pmat#1017)."
Expand Down
54 changes: 54 additions & 0 deletions docs/audits/impl-PMAT-1063-receipt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
status: complete
ticket: PMAT-1063
row: G-10b
issue: 3013
epic: 2873
branch: agent/G-10b
pr: "#3021 — re-cut onto main b0a0a51b2 by rebase --onto; RED leg run 34038557827 (job 101501015300: 'Unpinned analyser references may only fall' FAILED on the mutant c4f6b618a, unpinned=244 > 243); GREEN leg = the run of this revert commit"
model: claude-fable-5-1 (orchestrator, direct)
tokens_used: orchestrator [U] (not exposed to the orchestrator)
wall_clock_s: 900 (basis=session clock, claim to the receipt commit; [U] precision)
turns: 3 (orchestrator turns on this ticket, counted from the transcript)
---
# impl receipt — PMAT-1063 (PP-066 row G-10b, #3013): the analyser pin guard, shrink-only

## Identity
- kind: code · branch `agent/G-10b` off `agent/G-10` (PR-A, 0c35f8cfb) · this receipt is the first commit's companion
- write set: `scripts/check_pmat_pinned.sh` (new; from `agent/G-10-full` 4592b0572 plus the shrink-only ratchet, `--update`, fixture rows 16–20), `scripts/pmat_unpinned_baseline.txt` (new, measured), `scripts/check_baseline_ratchets.sh` (kind-table entry), `.github/workflows/ci.yml` (two steps after the ratchet step), `contracts/apr-pinned-analyser-ratchet-v1.yaml` (1.0.0 → 1.1.0: PIN-OB-005 / PIN-F-005), this receipt. No DAG, roadmap, README or spec edit.

## The baseline is measured, not typed
The driver named "281"; that was the count on the pre-PR-A tree (2026-09-06, before the ratchet rewrite removed some references). On PR-A's tip this guard's own scan counts **243** — recorded by `bash scripts/check_pmat_pinned.sh --update`, whose written line carries the command, the commit and the kind. Derive: `grep -rEn '(^|[^_/])pmat ' scripts/ .github/workflows/ | grep -v pmat_bin | wc -l`.

## Plan and routing (direct; `quorum: review-only` — the pre-PR review lanes are recorded when run)
| phase | content | A_i | result |
|---|---|---|---|
| P1 | guard with the shrink-only compare, `--update`, `PIN_SCAN_ROOT`/`PIN_BASELINE` fixtures, rows 16–20 | `bash scripts/check_pmat_pinned.sh --self-test` | 20/20 |
| P2 | baseline kind `count`; CI steps case-table-then-live | `bash scripts/check_baseline_ratchets.sh` · `bash scripts/check_guards_are_wired.sh` | PASS · PASS |
| P3 | contract 1.1.0 | `pv validate` via `scripts/pv_bin.sh` | valid |

K̂ [U] (third receipt of the guard class after PMAT-1059 and PMAT-1062; the class basis can be computed once all three record turns).

## Mutations observed RED → GREEN
| mutation | RED | GREEN |
|---|---|---|
| live: append `# probe: run pmat analyze satd here` to `scripts/ci_target_watch.sh` | `FAIL check_pmat_pinned: unpinned=244 baseline=243 — 1 new line(s) …` naming the file:line | reverted → `PASS … unpinned=243 baseline=243` |
| fixture rows 16–20 | row 17 (baseline 1 under 2 lines) RED naming both lines; row 19 no baseline → exit 2; row 20 `INVALID` → exit 2 | row 16 (baseline 2) PASS; row 18 (baseline 3) PASS with `Improved: 3 -> 2` |
| case-table rows 1–15 (from PR-A's design) | rows 1–5 match, row 13 off-pin refused, row 14 absent refused | rows 6–11 clean, row 12 at-pin resolves, row 15 option-neutral |

## Verification (orchestrator's own runs, `.pr/G-10b-verify.log`)
self-test 20/20 · live PASS 243/243 · `check_baseline_ratchets.sh` PASS · `check_guards_are_wired.sh` PASS · `pv validate` valid · `check_shell_lint_ratchet.sh` PASS · `check_no_claim_literals.sh` rc 0.

## Mutation evidence at CI (I3)
| leg | commit | run | job | result |
|---|---|---|---|---|
| RED | c4f6b618a (one bare `pmat analyze satd` comment in `scripts/ci_target_watch.sh`) | 34038557827 | 101501015300 | guard-runner-labels FAILED at "Unpinned analyser references may only fall (shrink-only, G-10b PMAT-1063)" |
| GREEN | this commit (the revert) | the run of this commit (cited in the PR body) | — | expected PASS `unpinned=243 baseline=243` |

## Gaps
- G-10c (PMAT-1064, #3014): the sweep 243 → 1 is on `agent/G-10c` (the last reference is `render_dag.py`'s rendered header, the orchestrator's); baseline to 0 after the header rename.
- The pre-PR review lanes were not run on this diff (review-only row; the case table and the CI mutation stand as the evidence) — recorded as a gap, not a pass.
- Auto-merge is armed only after G-11 (#3020) merges: one orchestrator-armed code PR until the write-set guard is in `ci / gate` (driver v4 WIP rule).

## Verdict
DONE on the branch: every A_i re-run by the orchestrator, the mutation RED at CI and reverted; complete = this receipt ∧ the merge of #3021.
2 changes: 1 addition & 1 deletion docs/specifications/PP-066-release-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ _Rendered from `docs/specifications/pp-066-dag.yaml` (epic #2873, 105 rows). Edi
| G-4 | the obligation DAG as data with invariants in CI: scripts/check_dag_invariants.sh + scripts/lib/dag_invariants.py over docs/specifications/pp-066-dag.yaml (0 cycles, >=6 days slack blocker->blockee, per-host queue ordered by expiry, owner present, exactly one expiry form, rows past expiry listed); scripts/render_dag.py renders §5/§6 tables byte-identical; pmat rule owed upstream [U] | — | — | any | 2026-09-19 | spec-owner | review-only | #2902 | PMAT-987 | complete |
| G-10 | check_hardcoded_paths.sh --full-if-capable arms itself at pmat >= 3.32.0 and the fleet runs 3.31.0: under pmat 3.37.0 pristine main reports 317 shipped findings against a baseline of 277, so the day the fleet upgrades every PR goes red (found 2026-09-05 running the guard-runner-labels steps locally; the guard must name the pmat version it armed under and the baseline must carry a measured, versioned basis) | — | — | any | 2026-09-06 | spec-owner | review-only | #2999 | PMAT-1059 | complete |
| G-11 | shared-file write contention: a row PR never writes pp-066-dag.yaml, roadmap.yaml, the rendered spec block or a README count line (check_row_pr_write_set.sh); DAG status DERIVED from the receipt (dag_status.py; render_dag.py; dag_invariants.py D7); README counts a ratchet (lag allowed, overstatement RED, --exact for the orchestrator); one orchestrator docs commit per merge writes the shared files | G-10 | — | any | 2026-09-12 | spec-owner | review-only | #3012 | PMAT-1062 | complete |
| G-10b | analyser pin guard: scripts/check_pmat_pinned.sh — every analyser reference under scripts/ and .github/workflows/ resolves through scripts/pmat_bin.sh; scripts/pmat_unpinned_baseline.txt 281 shrink-only; wired case table then live; extends apr-pinned-analyser-ratchet-v1 (PIN-OB-005) | G-10, G-11 | — | any | 2026-09-19 | spec-owner | review-only | #3013 | PMAT-1063 | open |
| G-10b | analyser pin guard: scripts/check_pmat_pinned.sh — every analyser reference under scripts/ and .github/workflows/ resolves through scripts/pmat_bin.sh; scripts/pmat_unpinned_baseline.txt 281 shrink-only; wired case table then live; extends apr-pinned-analyser-ratchet-v1 (PIN-OB-005) | G-10, G-11 | — | any | 2026-09-19 | spec-owner | review-only | #3013 | PMAT-1063 | complete |
| G-10c | analyser reference sweep: the 281 unpinned references under scripts/ and .github/workflows/ resolve through scripts/pmat_bin.sh (presence probes become ENV failures; dogfood/verifier_pin/ci.sh take the pin; workflow installs at the pin); baseline to 0 | G-10b, G-11 | — | any | 2026-09-26 | spec-owner | review-only | #3014 | PMAT-1064 | open |
| G-11b | one-call state (scripts/pp066_state.sh: head row, complete receipts, PR states, main reds with ticket ids, U-1 poll), the session docs commit (scripts/session_docs_commit.sh), the .pr/<row>/accept.sh convention in pp-066-plan.md, make fleet-verify ROW=<row> (forjar/make only) | G-10, G-11 | — | any | 2026-09-19 | spec-owner | review-only | #3018 | PMAT-1066 | open |
| SPEC-2.0 | spec v2.0 (driver v5): the 18-row scope with each cut row naming the claim it protected; the claims ratchet (README, notes, CLI output carry no performance, training-parity or proof-count number; check_no_claim_literals.sh + check_perf_claims_cite_receipts.sh over notes and README in ci / gate, mutation: one number → RED); scripts/release_criteria.sh C0 C4 C5 C6 C7 C8 C9 C11 C13 C14 one exit-coded command each (C1 C2 C3 C10 C12 → 0.67 with their tracks); C8 via scripts/run_clean_room.sh requiring ../infra; C11 = 15 fixtures; refusal codes from error.rs; REG-15 in R-0; §4 credited-first one reading; rescope quorum (three adversarial agy lanes over README/notes/CLI claims) | G-11 | — | any | 2026-09-19 | spec-owner | rescope quorum: three adversarial agy lanes | #3023 | PMAT-1083 | open |
Expand Down
1 change: 1 addition & 0 deletions scripts/check_baseline_ratchets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ classify() { # classify <basename> -> "<kind>[<TAB>reason]", rc 1 if unclassifie
pipe_grep_q_baseline.txt) printf 'count\n' ;; # `producer | grep -q` sites under pipefail (scripts/check_no_pipe_into_grep_q.sh)
roadmap_uncited_completion_baseline.txt) printf 'set\n' ;;
shell_lint_baseline.txt) printf 'count\n' ;;
pmat_unpinned_baseline.txt) printf 'count\n' ;; # G-10b (PMAT-1063): unpinned analyser references, measured by check_pmat_pinned.sh
cb200_baseline.txt) printf 'count\n' ;; # mirrors .pmat-gates.toml [tdg] baseline (PMAT-937)
test_fixture_path_baseline.txt) printf 'count\n' ;;
tracked_ignored_baseline.txt) printf 'count\n' ;;
Expand Down
Loading
Loading