Repository navigation
Conversation
Keep the gate order in the workflow. Status, sync, worktree, merge, session lookup, and evidence redaction are scripts.
commit: |
Pie Review record: Request changes (blocking), not merged
Gate 1: CIAll 3 required checks passed on this head: Independent verification (clean detached worktree at the reviewed head)
Blocking findings
Non-blocking notes
Gaps
What warrants re-reviewA new head that addresses findings 1 and 2, or a decision recorded on this PR by the Developer that finding 2's removals are intentional. |
Review of head
|
| Base | a617dcea |
| Rules judged against | the trusted base (main's rules) |
| Required CI | green |
| Reviewer | independent, not the author |
Blocking
tools/pr/pr-mergecan post a false "Merged as X" record (:71-100).- When
gh pr mergeis refused,plain_mergeprints the error and still callsconfirm_and_comment. poll_mergedreadsheadRefOidbut never compares it with--sha, so anystate == MERGEDcounts as success.- Scenario: the author pushes after the gates, and
--match-head-commitcorrectly refuses. Someone else then merges the new head inside the 30 s poll. The script reports success and posts a durable record claiming the reviewed SHA was merged. - Fix: fail non-zero as soon as the merge is refused, and require
headRefOid == EXPECTEDinpoll_merged. - Add a harness case for this, and for merging when the PR is conflicting, has failed checks, or is behind base.
- When
- Undisclosed security-rule edit (
security.md:19-20).- The new line "A joined Project is treated as approved: every Pi process … is launched with
--approve" matches current code (project-resource-policy.ts:7). However, it is a security-rule change and the PR body does not mention it. - "Every Pi process" is also broader than
CONTEXT.md, which covers only session children and Pie-owned children. - Fix: disclose it in the PR body or split it into its own PR, and match the wording to
CONTEXT.md.
- The new line "A joined Project is treated as approved: every Pi process … is launched with
Rule changes the PR body does not disclose
These need explicit Developer sign-off.
-
"Do not retry until green" is gone. The body says only that the single infrastructure-failure retry was removed. With the retry ban gone too, flaky checks can now be re-run until they pass.
-
The default scope "author
oxwen11" is gone. Autonomous merge now covers PRs from any same-repo author. The ruleset requires 0 approving reviews, so nothing on GitHub backs this up. -
The verification-surface rules are gone. These were:
- shared SPA/UI paths need both Web and Desktop;
- starting from source cannot prove an installed package;
- a fake Pi cannot prove real model execution.
They do not appear in
acceptance.mdortools/verify/README.md. -
"Keep strict base-up-to-date protection enabled" is gone. Strict is on today, but the rule explained why the head guard alone is not enough.
-
"Record that a run changed shared Pi settings; do not guess-restore" is gone.
-
The unresolved-review-threads check is gone.
pr-mergeonly blocks onCHANGES_REQUESTED. -
The PR record shrank. It lost the base SHA, the checks and their results, "what change warrants re-review", and the line about sanitising evidence.
These removals are safe: the CI-only exception (stricter now), "unchanged conclusions are not repeated", and the trusted-rules commit.
Non-blocking
- CI coverage.
tools/pr/test.shis not run by CI or bypnpm test, and nothing lints the shell files. detect_stackfails open. It falls back to a plain merge on any error containing "404".--match-head-commitstill guards that merge.pr-sessionaborts on one malformed session file. It stops the whole scan with a jq error and exit 5 (reproduced).redact-evidencefile handling.- A file named
-x.pngafter--reaches magick/ffmpeg as an option. .redactedcopies sit next to the originals, so a glob attach would upload both.
- A file named
Checks run
| Check | Result |
|---|---|
bash tools/pr/test.sh |
22/22, exit 0 |
| shellcheck | false positives only |
pr-status 477 (read-only) |
ready |
pr-session against real sessions |
read-only (directory mtime unchanged); correct matches for 458/460 |
redact-evidence on PNG/webm |
cropped or blurred, metadata stripped, inputs unchanged, refuses to overwrite and refuses blur on video |
Gaps
pr-mergeandpr-syncwere not run against the real repo (by design).- The false-record race in finding 1 comes from reading the code; it was not executed.
Re-review starts from CI on the next push.
pr-merge exits as soon as gh pr merge fails and only records a merge whose headRefOid is the reviewed SHA. pr-session skips malformed session files, and redact-evidence keeps leading-dash names from reaching magick/ffmpeg as options. CI runs tools/pr/test.sh. security.md now scopes --approve to Pie-owned children, as CONTEXT.md does.
Review record — not merged
Required Check failed on this head: https://github.com/oxwen11/pie/actions/runs/37641743772/job/112862209991 Observed failure: Findings recorded on What warrants another review: a new head that contains current |
Review record — not merged yet
Waiting on required CI for |
CI on
|
One Check retry
|
Requirement
The review-and-merge workflow mixed gate decisions with command-level steps. Reviewers repeated worktree setup, branch updates, stack merges, session lookups, and evidence redaction by hand.
Expected behavior
pull-requests.mdis the judgment checklist: CI, review, independent verification, record, then merge. A gate with no evidence stops the review and is explained on the pull request. The author of a version does not review that version. Merge is a squash of the reviewed SHA with--match-head-commit, and protections stay on. Host writes, shared Pi settings, production operations, and other irreversible actions still wait for the Developer.Changes and risks
New host writes, or a dependency on Pi's physical files? No.
pr-sessiononly reads existing session JSON when an operator runs it.This is a rules change, not a CI-only exception.
Security rule (disclosed)
security.mdgains one rule, worded likeCONTEXT.mdand matchingpackages/server/src/pi/project-resource-policy.ts:This records existing behavior. It does not change code.
What each script replaces
pull-requests.mdpie-verify?pr-statusgh pr checks --requiredplus theMERGEABLE/ SHA recheck before mergingpr-syncmainmoves:update-branchwithexpected_head_shapr-worktreepie-verifyneeds a checkout but does not create onepr-mergegh pr merge --squash --match-head-commit, the merge-commit record, and merge-async for a stacked pull request (plain merge returns 403)pr-sessiondata.pullRequests[].ref.numberunder~/.pie*/storage/sessionsby handredact-evidencepie-verifyredacts only the daemon token record, not screenshots or videoIsolated launch, doctor, cleanup, and daemon-token redaction stay in
pie-verify. Parallel isolation and cleanup semantics stay intools/verify/README.md.Moved, removed, or awaiting sign-off
tools/verify/README.md: the screenshot, note, recording, and attach commands from acceptance.md's Capture and delivery section.oxwen11, the verification-surface rules (Web + Desktop, installed package versus source, fake Pi versus a real model), the strict base-up-to-date rationale, recording shared Pi settings changes without guess-restoring, the unresolved-review-threads check, and the smaller record (base SHA, checks, what warrants re-review, sanitising).Review fixes in 41d5735
pr-mergeexits 2 as soon asgh pr mergefails and records nothing.poll_mergedacceptsMERGEDonly whenheadRefOidis the reviewed--sha. Otherwise it exits 1 without commenting. This closes the false "Merged as X" race.pr-sessionskips a malformed session file instead of aborting the scan.redact-evidenceprefixes a leading-dash file name with./. The README says to attach only*.redacted.*.Code check) installsjqif it is missing and runsbash tools/pr/test.sh.Verification
Tested at 41d5735:
bash tools/pr/test.shpasses (fakegh, no GitHub writes). New cases: CONFLICTING, failed checks, behind base, a refused merge while another head merges, a merge that lands at a different head, a malformed session file, and a leading-dash file name.pr-merge(exit 0, false record) and passes now.pnpm build && pnpm checkpasses. A barepnpm checkwithout a build fails only on typed lint in untouched TS files.actionlint .github/workflows/quality.ymlpasses.pr-mergeandpr-sync.