Repository navigation
test: pin protected pushes beside a multi-line gh body - #32285
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS This PR only adds a test. It changes no code path and takes nothing away. Notes
[DESIGN-REVIEWED] d3a7585 Description read[DESCRIPTION-READ] 1631deab3eb9f30fa0ea22539a793ded7515f5442941b9e5811819834608da54 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
a502d72 to
33be79e
Compare
|
[operator: bolichen97] The red |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (1 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: adds one test that a protected push beside a multi-line gh body stays refused; test file only.
33be79e to
b6f4929
Compare
A push to main beside a multi-line gh pr body is refused today: before or after the body, through a filter that strips its quotes, or on a line inside the body itself. Nothing pinned that, and a change to how the push gate reads a quoted newline in a gh body could let one through. The test asserts a refusal by the push floor, not one exact rule. Refs #20846
b6f4929 to
d3a7585
Compare
|
Rebased: main moved in .github/workflows since this head went green (21597a3 -> 3686b1c); CI re-running. PR Readiness was stuck waiting on [operator: bolichen97] |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (1 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: regression test for a protected push beside a multi-line gh body.
Problem / Motivation
Goal: A push to
mainthat runs beside a multi-lineghbody stays refused by the push gate, and a test says so.gh pr create --body "notes⏎git push⏎more"is refused today because the push gate reads each line on its own (#20846). That false positive is not being fixed yet. The same per-line reading is what refuses a real push tomainplaced before or after such a body, or behind a filter that strips its quotes, and nothing pinned those refusals.Why it matters
A change to how the push gate reads a quoted newline in a
ghbody is the natural fix for #20846. Without a pin, such a change could let a push tomainthrough and every existing test would stay green.Not a goal
What changed (motivation → approach → change)
One test in
test/test_push_branch_gate.py::TestGitPushEnforcementasserts that five commands, each pushing tomainbeside a multi-linegh pr createbody, are refused by a push-floor rule (rule=git-publish-…); any push-floor rule passes, so a reading that reports a different one still passes. Four rows put the push outside the body: after the closing quote, after&&, before theghline, and through atr -d '"' | bashfilter. The fifth holds the push line inside the body itself; it pins today's reading of that shape, so a later change to it has to change this test on purpose.Backwards compatibility
Compatible: test-only; no code path changes.
Removes nothing: the diff only adds a test.
Tests
TestGitPushEnforcement::test_protected_push_beside_a_multi_line_gh_body_blocked: every row is refused with arule=git-publish-reason. Each row is refused onmaintoday; withargv_floor._git_publish_floor_tagsreturning no tags,is_deniedallows every row, the in-body one included, so the test can fail.b6f49296bf12): 20 runs at-n0and 10 at-n 4 --dist loadgroup --max-worker-restart=2besidetest_push_branch_gate_parser.pyandtest_security_stream_redaction.py, all green; the file's 106 ids in a shuffled order (seed=21), green.Manual verification
is_deniedon each row on this branch: refused withgit-publish-push-protected-branch-name, orgit-publish-target-unverifiablefor the&&row.Screenshots / video
N/A: no user-visible change.
Related Issues
Refs #20846
Refs #24964
Sibling sweep
N/A: test-only PR, no fix.
Pattern harvest
N/A: test-only PR, no fix.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.