Skip to content
Closed
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
207 changes: 207 additions & 0 deletions docs/audits/quorum-PMAT-3673.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
{
"ticket": "PMAT-3673",
"base": "origin/main",
"base_resolved": "origin/main",
"base_note": "no origin/origin/main exists; judged against the local ref",
"head": "eebd642c85a3cbe974d8177a58c72b6c0d0e1801",
"diff_sha256": "33accb56a764c6bc6884689eff02ff0eb49f61261d941278d7aad0d1bbae58f8",
"width": 3,
"executor": "agy",
"prompt_mode": "inline",
"prompt_bytes": 37168,
"author": {
"model": "claude-opus-5",
"family": "claude",
"source": "flag"
},
"agreed": true,
"lanes": [
{
"lane": 1,
"status": "SUCCESS",
"verdict": "PASS",
"summary": "The PR successfully implements the integration batching procedure. `scripts/batch_fold.sh` accurately implements the fold rules, strictly distinguishing between generated/non-generated conflicts. The `--regen` flag executes correctly and checks fixed points. The comprehensive `scripts/check_batch_fold.sh` correctly prevents tampering through its self-test mutation capability. `APR-RELEASE-001` documentation covers all procedures accurately.",
"findings": [
{
"claim": "The script resolves ONLY the specified generated set on conflicts, takes '--theirs' for them, and skips on any other real conflicts.",
"command": "bash check_batch_fold.sh",
"file": "scripts/batch_fold.sh",
"grounding": "measured",
"line": 139,
"output": "=== batch_fold.sh folds only what it may, and says so (check_batch_fold.sh) ===\nok row 1 a branch touching no generated path folds, generated=[]\nok row 2 a conflict ONLY in roadmap.yaml folds, marked for regeneration\nok row 3 an independent code change folds\nok row 4 a conflict in real code is SKIPPED, never resolved by picking a side"
},
{
"claim": "README conflicts are strictly partitioned using readme_counts_only to fold only CONTRACT_COUNT block differences and SKIP prose conflicts.",
"command": "bash check_batch_fold.sh",
"file": "scripts/batch_fold.sh",
"grounding": "measured",
"line": 61,
"output": "ok row 8 a README conflict ONLY in a CONTRACT_COUNT block folds, marked for regeneration\nok row 9 ...and the other side's clean README prose edit is kept\nok row 10 ...and the count block stays numeric (well-formed for readme_sync)\nok row 11 a folded, unregenerated generated set is never silent: REGEN REQUIRED, exit 3 (rc=3)\nok row 12 a README conflict OUTSIDE a count block is a real conflict: SKIP"
},
{
"claim": "§13 explicitly defines the batching procedure as default, covers generated-set regeneration, assembly, what needs a new quorum, and red batches.",
"file": "docs/specifications/APR-RELEASE-001-train-and-build-kaizen.md",
"grounding": "cited",
"line": 1001
},
{
"claim": "The self-test case table exists, tests exact mutant cases that would violate the ticket (like taking all conflicts or ignoring README prose conflicts), and successfully fails on them.",
"command": "bash check_batch_fold.sh --self-test",
"file": "scripts/check_batch_fold.sh",
"grounding": "measured",
"line": 150,
"output": "=== check_batch_fold.sh --self-test: each wrong folder must turn the table RED ===\nok mutant RED: README treated as wholly generated (the draft's rule) (row 8 a README conflict ONLY in a CONTRACT_COUNT block folds, marked for regenerati)\nok mutant RED: every conflict taken, as if generated (row 4 a conflict in real code is SKIPPED, never resolved by picking a side)\nok mutant RED: a clean fold never marks the set stale (row 14 a CLEAN fold that touches the census still marks the set stale (exit 3, rc=0))\nok mutant RED: a failed fixed-point check ignored (row 21 a failed fixed-point check is exit 2 and names the check (rc=0))\nSELF-TEST PASSED: 4 mutants, all RED"
}
],
"raw_bytes": 8554,
"err_bytes": 100,
"envelope_status": "SUCCESS",
"verdict_source": "structured_output",
"grounding_check": "parity",
"model": "gemini-3.1-pro-high",
"model_measured": "gemini-3.1-pro-high",
"model_source": "measured",
"family": "gemini"
},
{
"lane": 2,
"status": "SUCCESS",
"verdict": "PASS",
"summary": "The diff perfectly implements PMAT-3673. `scripts/batch_fold.sh` correctly resolves only the generated set and the README `CONTRACT_COUNT` blocks, skipping branches with real conflicts and leaving no half-merged state. The regeneration mechanism (`--regen`) correctly asserts the three fixed points and commits. The required exit codes are implemented, and an unregenerated set gracefully fails with exit code 3. The `check_batch_fold.sh` table properly covers these cases and is wired into CI as a `check_*.sh` script. The updates to the release specification fully define all requested rules (assembly, left-out, quorum, push/disarm, red batch, and the VOID rule).",
"findings": [],
"raw_bytes": 3477,
"err_bytes": 0,
"envelope_status": "SUCCESS",
"verdict_source": "structured_output",
"grounding_check": "parity",
"model": "gemini-3.1-pro-low",
"model_measured": "gemini-3.1-pro-low",
"model_source": "measured",
"family": "gemini"
},
{
"lane": 3,
"status": "SUCCESS",
"verdict": "PASS",
"summary": "Independent Review Lane 3: Verdict PASS for PMAT-3673.\n\nThe diff completely satisfies all ticket requirements:\n1. `scripts/batch_fold.sh` correctly implements folding of receipted PR branches into `release/<train>-batch`, resolving only conflicts in the generated set ({roadmap.yaml, census.json, contracts.nt, shapes.ttl, README.md CONTRACT_COUNT blocks}) and aborting/reporting SKIP (exit 1) for any real conflict elsewhere. Fixed points are asserted upon `--regen`, returning exit 0 on clean completion, exit 2 on usage/git/regen error, and exit 3 when regeneration is required.\n2. `scripts/check_batch_fold.sh` provides a comprehensive 21-row test table verifying all folding and regeneration edge cases, along with a self-test verifying 4 mutants are caught (RED).\n3. `APR-RELEASE-001-train-and-build-kaizen.md` is updated with Revision 2026-09-21, amended Rule 9, amended §8 stop, and full §13 integration batch specifications (including VOID review lane rules and falsifiers FX-B1..FX-B3).\n4. All shell scripts pass `bash -n` and `shellcheck -S error`.",
"findings": [
{
"claim": "check_batch_fold.sh test table passes all 21 test rows and --self-test catches all 4 mutants",
"command": "bash /tmp/test_batch_fold/check_batch_fold.sh && bash /tmp/test_batch_fold/check_batch_fold.sh --self-test",
"file": "scripts/check_batch_fold.sh",
"grounding": "measured",
"output": "=== batch_fold.sh folds only what it may, and says so (check_batch_fold.sh) ===\nok row 1 a branch touching no generated path folds, generated=[]\nok row 2 a conflict ONLY in roadmap.yaml folds, marked for regeneration\nok row 3 an independent code change folds\nok row 4 a conflict in real code is SKIPPED, never resolved by picking a side\nok row 5 any SKIP makes the exit 1 (rc=1)\nok row 6 the aborted merge leaves no half-merged state (dirty=0)\nok row 7 the skipped branch's code did not leak in (lib=y)\nok row 8 a README conflict ONLY in a CONTRACT_COUNT block folds, marked for regeneration\nok row 9 ...and the other side's clean README prose edit is kept\nok row 10 ...and the count block stays numeric (well-formed for readme_sync)\nok row 11 a folded, unregenerated generated set is never silent: REGEN REQUIRED, exit 3 (rc=3)\nok row 12 a README conflict OUTSIDE a count block is a real conflict: SKIP\nok row 13 ...and the README keeps the side already in the batch\nok row 14 a CLEAN fold that touches the census still marks the set stale (exit 3, rc=3)\nok row 15 a dirty batch worktree is refused (exit 2, rc=2)\nok row 16 a branch that does not exist is ERROR, exit 2 (rc=2)\nok row 17 --regen regenerates once, asserts the fixed points, commits (rc=0)\nok row 18 ...the last commit is the regeneration (batch: regenerate the generated set once (batch_fold.sh --regen))\nok row 19 ...roadmap aggregated and README counts rewritten\nok row 20 ...and the tree is clean after it (dirty=0)\nok row 21 a failed fixed-point check is exit 2 and names the check (rc=2)\n21 rows, PASS\nPASS\n=== check_batch_fold.sh --self-test: each wrong folder must turn the table RED ===\nok mutant RED: README treated as wholly generated (the draft's rule) (row 8 a README conflict ONLY in a CONTRACT_COUNT block folds, marked for regenerati)\nok mutant RED: every conflict taken, as if generated (row 4 a conflict in real code is SKIPPED, never resolved by picking a side)\nok mutant RED: a clean fold never marks the set stale (row 14 a CLEAN fold that touches the census still marks the set stale (exit 3, rc=0))\nok mutant RED: a failed fixed-point check ignored (row 21 a failed fixed-point check is exit 2 and names the check (rc=0))\nSELF-TEST PASSED: 4 mutants, all RED"
},
{
"claim": "scripts/batch_fold.sh and scripts/check_batch_fold.sh pass bash syntax checking and shellcheck with zero errors",
"command": "bash -n /tmp/test_batch_fold/batch_fold.sh /tmp/test_batch_fold/check_batch_fold.sh && shellcheck -S error /tmp/test_batch_fold/batch_fold.sh /tmp/test_batch_fold/check_batch_fold.sh",
"file": "scripts/batch_fold.sh",
"grounding": "cited",
"output": "",
"grounding_downgraded": "measured-without-command-or-output"
},
{
"claim": "APR-RELEASE-001 is updated with §13 defining batching procedure, disarm/close rules, VOID review-lane rule, and falsifiers FX-B1..FX-B3",
"file": "docs/specifications/APR-RELEASE-001-train-and-build-kaizen.md",
"grounding": "cited"
}
],
"raw_bytes": 11296,
"err_bytes": 100,
"envelope_status": "SUCCESS",
"verdict_source": "structured_output",
"grounding_check": "parity",
"model": "gemini-3.6-flash-high",
"model_measured": "gemini-3.6-flash-high",
"model_source": "measured",
"family": "gemini"
}
],
"dissent": [],
"dedup": [
{
"file": "docs/specifications/APR-RELEASE-001-train-and-build-kaizen.md",
"line": null,
"lanes_agreeing": [
3
],
"claims": [
"APR-RELEASE-001 is updated with §13 defining batching procedure, disarm/close rules, VOID review-lane rule, and falsifiers FX-B1..FX-B3"
]
},
{
"file": "docs/specifications/APR-RELEASE-001-train-and-build-kaizen.md",
"line": 1001,
"lanes_agreeing": [
1
],
"claims": [
"§13 explicitly defines the batching procedure as default, covers generated-set regeneration, assembly, what needs a new quorum, and red batches."
]
},
{
"file": "scripts/batch_fold.sh",
"line": null,
"lanes_agreeing": [
3
],
"claims": [
"scripts/batch_fold.sh and scripts/check_batch_fold.sh pass bash syntax checking and shellcheck with zero errors"
]
},
{
"file": "scripts/batch_fold.sh",
"line": 61,
"lanes_agreeing": [
1
],
"claims": [
"README conflicts are strictly partitioned using readme_counts_only to fold only CONTRACT_COUNT block differences and SKIP prose conflicts."
]
},
{
"file": "scripts/batch_fold.sh",
"line": 139,
"lanes_agreeing": [
1
],
"claims": [
"The script resolves ONLY the specified generated set on conflicts, takes '--theirs' for them, and skips on any other real conflicts."
]
},
{
"file": "scripts/check_batch_fold.sh",
"line": null,
"lanes_agreeing": [
3
],
"claims": [
"check_batch_fold.sh test table passes all 21 test rows and --self-test catches all 4 mutants"
]
},
{
"file": "scripts/check_batch_fold.sh",
"line": 150,
"lanes_agreeing": [
1
],
"claims": [
"The self-test case table exists, tests exact mutant cases that would violate the ticket (like taking all conflicts or ignoring README prose conflicts), and successfully fails on them."
]
}
],
"uncovered": [],
"coverage_source": "lanes",
"partial": false,
"partial_reasons": [],
"auto_merge": {
"checked": true,
"was_armed": false,
"disarmed": false,
"note": "auto-merge not armed"
},
"lint": {
"ok": true,
"output": "receipt complete: kind=artifact lanes=3 author=claude-opus-5/claude"
}
}
17 changes: 17 additions & 0 deletions docs/roadmaps/entries/PMAT-3673.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- id: PMAT-3673
github_issue: 3673
item_type: task
title: 'Batching is the default merge path: scripts/batch_fold.sh + APR-RELEASE-001 §13 (operator 2026-09-21)'
status: planned
priority: critical
assigned_to: null
created: 2026-09-21T08:23:21Z
updated: 2026-09-21T08:23:21Z
spec: docs/specifications/APR-RELEASE-001-train-and-build-kaizen.md
acceptance_criteria: []
phases: []
subtasks: []
estimated_effort: null
labels:
- kind:code
notes: 'ACCEPTANCE (quoted from issue #3673 "What lands"): 1. scripts/batch_fold.sh — fold receipted PR branches into one release/<train>-batch branch, git merge --no-ff in the given order: a conflict ONLY in the generated set {docs/roadmaps/roadmap.yaml, contracts/census.json, contracts/contracts.nt, contracts/shapes.ttl, the CONTRACT_COUNT blocks of README.md} is taken and marked for regeneration; a conflict ANYWHERE else — including README prose outside a count block — aborts that branch''s merge and reports SKIP with the paths, never resolved by picking a side; --regen regenerates the generated set ONCE with the tree-built pv (scripts/pv_bin.sh), asserts the fixed points (aggregate --check, pv extract --check, readme_sync.sh --check), and commits the regeneration; exit 0 all folded; 1 any SKIP; 2 usage/git/regeneration failure; a folded-but-unregenerated generated set is never silent; --self-test case table, wired into CI. 2. APR-RELEASE-001 §13 — the batching procedure as the default path (cop prompt §7): assembly, generated-set regeneration, left-out rules, what needs a new quorum (only content new to the batch), constituent disarm/close, a red batch, and the review-lane VOID rule while paiml-implement#317 is open. AUTHOR NOTES (not criteria): the case table lives in scripts/check_batch_fold.sh (guard-tree runs it) because a --self-test case inside batch_fold.sh made check_guards_are_wired.sh RED; §13 required amending hard rule 9 ("No hand-squash of batches") and the matching §8 stop, which the new default contradicts.'
17 changes: 17 additions & 0 deletions docs/roadmaps/roadmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19007,3 +19007,20 @@ roadmap:
labels:
- kind:code
notes: 'ACCEPTANCE (hand-entered from issue #3629 done_when; minted on the PR branch so the AD-04 quorum can run -- pmat work status refuses a missing item). Done when: scripts/fleet_utilization.sh --selftest has no pipe into grep -q; a mutation that restores the pipe AND forces EPIPE (out padded to >64 KiB so the write cannot complete before grep exits) turns the self-test RED deterministically — the positive control for the race, in the PR body the 55-site count is in the PR body from the command that produced it, and a guard refuses a new site (check_guards_are_wired.sh names it; ratchet baseline committed) main''s guard-tree green on the merge commit without rerun '
- id: PMAT-3673
github_issue: 3673
item_type: task
title: 'Batching is the default merge path: scripts/batch_fold.sh + APR-RELEASE-001 §13 (operator 2026-09-21)'
status: planned
priority: critical
assigned_to: null
created: 2026-09-21T08:23:21Z
updated: 2026-09-21T08:23:21Z
spec: docs/specifications/APR-RELEASE-001-train-and-build-kaizen.md
acceptance_criteria: []
phases: []
subtasks: []
estimated_effort: null
labels:
- kind:code
notes: 'ACCEPTANCE (quoted from issue #3673 "What lands"): 1. scripts/batch_fold.sh — fold receipted PR branches into one release/<train>-batch branch, git merge --no-ff in the given order: a conflict ONLY in the generated set {docs/roadmaps/roadmap.yaml, contracts/census.json, contracts/contracts.nt, contracts/shapes.ttl, the CONTRACT_COUNT blocks of README.md} is taken and marked for regeneration; a conflict ANYWHERE else — including README prose outside a count block — aborts that branch''s merge and reports SKIP with the paths, never resolved by picking a side; --regen regenerates the generated set ONCE with the tree-built pv (scripts/pv_bin.sh), asserts the fixed points (aggregate --check, pv extract --check, readme_sync.sh --check), and commits the regeneration; exit 0 all folded; 1 any SKIP; 2 usage/git/regeneration failure; a folded-but-unregenerated generated set is never silent; --self-test case table, wired into CI. 2. APR-RELEASE-001 §13 — the batching procedure as the default path (cop prompt §7): assembly, generated-set regeneration, left-out rules, what needs a new quorum (only content new to the batch), constituent disarm/close, a red batch, and the review-lane VOID rule while paiml-implement#317 is open. AUTHOR NOTES (not criteria): the case table lives in scripts/check_batch_fold.sh (guard-tree runs it) because a --self-test case inside batch_fold.sh made check_guards_are_wired.sh RED; §13 required amending hard rule 9 ("No hand-squash of batches") and the matching §8 stop, which the new default contradicts.'
Loading
Loading