-
Notifications
You must be signed in to change notification settings - Fork 0
Repair merged review-doctrine gate regressions #1534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2bdd816
f1532a4
20b9926
22ea10e
f2b991f
1106460
9607d10
75fa47b
ec264eb
3db668c
6e70341
f200013
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| --- | ||
| name: pre-merge-gate | ||
| description: "Final validation gate before merging a PR: tests, lint, type-check, build, self-review, CI green check. Use before merging." | ||
| description: "Final validation gate before merging a PR: tests, lint, type-check, build, review evidence, and CI green check. Use before merging." | ||
| user-invocable: true | ||
| --- | ||
|
|
||
|
|
@@ -15,7 +15,7 @@ Run all validation checks before a PR can be merged. Execute as one atomic opera | |
| ## Step 1: Identify PR and branch | ||
|
|
||
| ```bash | ||
| gh pr view $ARGUMENTS --json number,headRefName,baseRefName,mergeable,statusCheckRollup | ||
| gh pr view $ARGUMENTS --json number,headRefName,baseRefName,headRefOid,baseRefOid,mergeable,statusCheckRollup | ||
| ``` | ||
|
|
||
| If mergeable is "CONFLICTING", stop and report — do not auto-resolve. | ||
|
|
@@ -24,19 +24,25 @@ If mergeable is "CONFLICTING", stop and report — do not auto-resolve. | |
|
|
||
| Read ALL comments on the PR: | ||
| ```bash | ||
| gh api repos/{owner}/{repo}/pulls/{number}/comments | ||
| gh api repos/{owner}/{repo}/issues/{number}/comments | ||
| gh api --paginate repos/{owner}/{repo}/pulls/{number}/comments | ||
| gh api --paginate repos/{owner}/{repo}/pulls/{number}/reviews | ||
| gh api --paginate repos/{owner}/{repo}/issues/{number}/comments | ||
| gh pr view $ARGUMENTS --comments | ||
| ``` | ||
|
|
||
| Also query the PR's GraphQL `reviewThreads` connection (or the equivalent GitHub MCP review-thread | ||
| read) through its final cursor because REST comment lists do not expose `isResolved` and a partial | ||
| connection is not evidence that all threads are settled. | ||
|
|
||
| Check for unaddressed findings from any source: | ||
| - Human review comments not yet resolved | ||
| - Dependabot alerts or suggestions | ||
| - CodeQL / security scanning findings | ||
| - CI bot failure messages | ||
| - Previous adversarial review comments not yet resolved | ||
|
|
||
| If actionable comments exist, fix them before proceeding. | ||
| If any comment lacks a recorded disposition from the global `review-and-ship` pipeline, report the | ||
| PR as blocked and stop. This gate does not create a separate finding-disposition or fix loop. | ||
|
|
||
| ## Step 3: Run local checks | ||
|
|
||
|
|
@@ -50,29 +56,39 @@ cd frontend/taskdeck-web && npm run build && npx vitest --run --reporter=verbose | |
|
|
||
| Report any failures immediately — do not proceed to merge. | ||
|
|
||
| ## Step 4: Self-review | ||
|
|
||
| Read the full diff (`gh pr diff $ARGUMENTS`) and check for: | ||
|
|
||
| - Secrets accidentally committed (.env, tokens, keys, connection strings) | ||
| - Debug code left in (console.log, Console.WriteLine used for debugging, breakpoints) | ||
| - TODO comments without issue references | ||
| - Hardcoded values that violate conventions | ||
| - Missing tests for behavior changes | ||
| - Clean architecture violations (Domain referencing Infrastructure) | ||
| - Agent safety violations (GP-06: no approve_proposal or direct board mutation) | ||
| - HTTP semantics violations (wrong status codes) | ||
| - Unused `using` statements or dead code | ||
|
|
||
| If any issues found, fix them, commit, and push before proceeding. | ||
| ## Step 4: Refresh external state and confirm exact-head/base declared-review evidence | ||
|
|
||
| Immediately after the local checks, rerun the Step 1 PR query, every Step 2 comment/review/thread | ||
| read through its final cursor, and `gh pr checks`. This is the final external-state snapshot used by | ||
| the verdict. Compare its `headRefOid` and `baseRefOid` with the initial values. If either OID changed, | ||
|
Comment on lines
+61
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the base or head changes after Step 4's opening PR query but before the comment, thread, and check reads finish, this procedure has no closing query with which to detect that change and can validate evidence against the obsolete OIDs. Fresh evidence beyond the earlier refresh fix is that the implemented sequence performs the Step 1 query only once at the start of the multi-request snapshot while nevertheless claiming it can detect changes during that snapshot; re-read and compare the OIDs after the final external-state request before issuing the verdict. Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed HIGH / merge blocker after independent current-base review. Without a closing OID/mergeability read, a concurrent push or base move can combine stale H1 identity with later H2 comments/checks and incorrectly declare readiness. This remains unresolved under parked #1532. |
||
| if mergeability changed, if a cursor is incomplete, or if the PR changes while the snapshot is being | ||
| read, fail closed and return the PR to the canonical pipeline; never combine old review evidence with | ||
| new local-check evidence. | ||
|
|
||
| Read the repository's current authority and the canonical pipeline result instead of copying its | ||
| tier row here. When that declared gate requires independent review, use the refreshed `headRefOid`, | ||
| `baseRefOid`, reviews, review summaries, comments, threads, and checks from this final snapshot. | ||
| Require an **arrived independent review of that exact head and base** which posts either findings or | ||
| an explicit no-finding result. The evidence artifact must record both reviewed OIDs (or a stable | ||
| diff identity derived from both), and the gate must compare them with the current values. GitHub's | ||
| review `commit_id` binds only the head; it is not proof of the reviewed base. A review request, | ||
| acknowledgement/reaction, evidence authored by the PR author, implementation worker, or coordinator, | ||
| or a coordinator metadata scan does not satisfy an independent-review requirement. A distinct, | ||
| declared read-only reviewer artifact does satisfy the authorship boundary when it records both exact | ||
| OIDs, whether that fresh-context reviewer ran inline or as a reviewer worker. Evidence from an older | ||
| head or an older base is stale. | ||
|
|
||
| Confirm that every finding from that review has a recorded disposition and that all review threads | ||
| are settled. If exact-head independent-review evidence is missing or unsettled, report the PR as | ||
| blocked and return it to the global `review-and-ship` pipeline. This gate confirms the completed | ||
| review; it does not perform another review lens or start a separate review/fix cycle. | ||
|
|
||
| ## Step 5: CI status | ||
|
|
||
| ```bash | ||
| gh pr checks $ARGUMENTS | ||
| ``` | ||
|
|
||
| All checks must be green. If any are failing, diagnose and fix. | ||
| Use the `gh pr checks` result from Step 4's refreshed snapshot. All checks must be terminal and green. | ||
| If any are pending or red, report the PR as not ready. Route | ||
| red-check diagnosis and any canonical-pipeline-selected fix batch through | ||
| `taskdeck-ci-conflict-recovery`; this gate does not choose or execute fixes. | ||
|
|
||
| ## Step 6: Report | ||
|
|
||
|
|
@@ -86,7 +102,7 @@ Output a merge-readiness summary: | |
| - [ ] Frontend build: PASS/FAIL | ||
| - [ ] Frontend tests: PASS/FAIL | ||
| - [ ] CI checks: GREEN/RED | ||
| - [ ] Self-review: CLEAN/ISSUES FIXED | ||
| - [ ] Declared exact-head/base review evidence: SATISFIED/MISSING (head SHA, base SHA, and evidence URL) | ||
| - [ ] Bot comments: ADDRESSED/NONE | ||
| - [ ] Secrets scan: CLEAN | ||
|
|
||
|
|
@@ -96,6 +112,7 @@ Output a merge-readiness summary: | |
| ## Rules | ||
|
|
||
| - Do NOT merge the PR — only validate and report readiness | ||
| - If CI is red, attempt to fix — only report "blocked" if the fix is non-trivial | ||
| - If CI is red or review evidence is missing, report not ready and return the PR to the owning | ||
| canonical pipeline/recovery lane; do not introduce a local fix threshold | ||
| - Finding severity, comment triage, and how many review rounds are owed: the global | ||
| `review-and-ship` skill and global laws 2 and 11. This skill only runs the local checks. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| interface: | ||
| display_name: "Taskdeck PR Review Loop" | ||
| short_description: "Review PRs and address feedback" | ||
| default_prompt: "Use $taskdeck-pr-review-loop to perform adversarial review, post findings, address comments, and re-review Taskdeck PRs." | ||
| default_prompt: "Use $taskdeck-pr-review-loop for Taskdeck-specific review lenses while the global review-and-ship skill owns the review pipeline." |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,10 @@ Companion Active Docs: | |
| - **`#1513` local review-fix implementation:** the registered OpenAI, Gemini, Ollama, and outbound-webhook handlers set `UseProxy = false`, keeping the configured origin as the connect-time validation target. Just before send, protected registrations mask the URI seen by outer .NET HTTP diagnostics; the inner handler restores the real URI for transport and re-masks it for retry/completion. Public caller-owned provider clients keep normal `HttpClient` behavior. The four protected clients remove default request loggers, disable distributed-trace header propagation, and use a private HTTP metric scope; Taskdeck's configured OpenTelemetry provider drops their marked activities and scope. Enabled Sentry removes its outbound factory handler only from these four client pipelines, so unrelated clients retain instrumentation and server-side exception tracking remains active. The proven boundary includes pre-handler `System.Net.Http` EventSource path/query suppression, but excludes independently installed process-global activity/meter listeners and transport-stage host/IP observers. Existing localhost opt-ins and automatic-redirect blocking remain unchanged. No proxy-aware outbound mode exists; corporate proxy-only deployments fail closed. | ||
| - **Current evidence boundary:** the exact documented filters pass 66/66 API and 158/158 Application tests (151 provider/policy compatibility plus seven constructor/remasking controls); registered EventSource and scoped-Sentry controls pass three fresh-process repetitions. At pre-documentation head `dad8d22a`, the full serialized backend passed 7,539 tests with five intentional skips and no failures, including Architecture 20/20 with one intentional skip and Integration 35/35. The independent security review was clean; the correctness review found only the now-corrected seven-test evidence omission. The merged Dockerless Testcontainers repair is absorbed, and the only later issue-scope change is this verification-document correction; the current-main merge touched only the independently reviewed `#1522` frontend/docs slice. Signed publication, exact hosted Required CI, CodeQL, and merge remain outstanding, so this is not yet a shipped delivery entry. | ||
|
|
||
| ## Delivery update (2026-07-27, agentic review-doctrine consolidation) | ||
|
|
||
| - **Single review-workflow home (`#1531` merged; remediation `#1532` / PR `#1534`):** Taskdeck's local instructions, skills, overnight manuals, and PR-create hook are reduced to routing, Taskdeck-specific lenses, and repository mechanics while the estate-wide `review-and-ship` skill owns the executable pipeline. PR `#1531` landed before two HIGH and six MEDIUM exact-head review findings were repaired; the bounded remediation restores the issue-to-PR external-state contract, the mandatory T3 independent pass, policy-neutral Fable/pre-merge/worker/hook routing, runtime-mirror risk-lens parity, and current documentation. This supersedes the review/aging portion of `#1269` without rewriting historical delivery records. The live `.codex` mirror is retained until its separately tracked retirement under `#1291`. | ||
|
Chris0Jeky marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The claimed single-home transition remains incomplete for normal contributors: AGENTS.md reference: AGENTS.md:L5-L7 Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed HIGH / merge blocker for this executable instruction change. The active contributor entrypoint still mandates a parallel reviewer-style loop, directly preserving the review rabbit hole this PR claims to remove. No third fix cascade: the PR is parked and #1532 owns the repair. |
||
|
|
||
| ## Delivery update (2026-07-27, test substrate, Windows API diagnostics, and realtime reconciliation) | ||
|
|
||
| - **Dockerless Testcontainers gate (`#1518`):** the PostgreSQL collection fixture now evaluates `DockerAvailableCheck` before `PostgreSqlBuilder.Build`, restoring the documented graceful-skip behavior on hosts without Docker. Public-constructor and injected-factory regressions prove the unavailable path cannot construct a container, while a timed-out Docker CLI probe is killed as a process tree and boundedly reaped. The local exact tree finishes with 7 passed / 28 skipped / 0 failed and no surviving `docker info`; at reviewed head `6650370b`, the full serialized backend passed 7,465 tests with 33 intentional skips and hosted Container Integration proved the positive lifecycle with 35 passed / 0 skipped / 0 failed. Four DCO-signed-off commits merged as `ff1ee066`; exact-main Required CI `30257236213` and CodeQL `30257235538` are green. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a PR has any ordinary informational comment—such as a successful bot notice, status update, or maintainer note—this condition blocks it because such comments naturally have no
review-and-shipfinding disposition. The surrounding checks and lines 81–84 only require dispositions for actionable findings, so retain that narrower scope rather than making every issue or review comment a permanent merge blocker.AGENTS.md reference: AGENTS.md:L5-L7
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed HIGH / merge blocker. The condition directly converts normal status, bot-success, and maintainer notes into permanent blockers. The bounded two-round pipeline is exhausted, so this remains unresolved and the PR is parked; #1532 owns the repair.