Fail closed on incomplete project priority audits - #1488
Conversation
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Adversarial correctness review — changes requestedReviewed exact head MEDIUM — the default audit can still certify a policy-mismatched PR priorityAt Expected fix: make policy-exact fallback checking the clean-audit default (or make every canonical final-audit invocation strict and prevent non-strict mode from claiming policy-clean), and add a regression where a no-reference PR has an existing non-V priority and must be reported for update. MEDIUM — linked closing issues are not part of PR priority derivationThe ProjectV2 query at Expected fix: retrieve and completeness-check MEDIUM — the pre-Apply stamp does not cover the inputs used to build the write planLines 895-900 compare only ProjectV2 Expected fix: immediately before mutation, recompute and compare the complete source-derived update plan (or re-read/compare each affected source and current field before its write), abort with zero writes on drift, and add an injected regression proving source drift produces no LOW — deterministic option-shape failure can occur after partial writesLines 902-919 validate each expected Priority option inside the mutation loop. If an early update uses a valid option and a later update references a missing/drifted option, the early write lands before the helper throws. This is an avoidable partial-apply error path. Expected fix: validate the entire update plan and all option IDs before the pre-Apply stamp and before the first mutation; cover “later option missing => zero writes” in the Apply-path regression tests. Evidence
The cursor pagination, ordinal item/cursor handling, stable page count/stamp checks, nested-connection truncation guards, and invalid-issue-label fail-closed behavior otherwise held under this review. |
Independent project-automation safety review — changes requestedReviewed exact head MEDIUM
LOW
Evidence and residual gate
The 1,458-item count in the docs is a truthful timestamped snapshot; the live total is now 1,459 because the project has grown, so I do not consider that drift a finding. #1458 appropriately remains open and this PR correctly avoids |
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Review-fix evidence — exact head
|
|
@codex review Please review exact head |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Independent project-automation safety re-review — changes requestedReviewed exact head The prior findings are resolved at this head: closing links are complete and take precedence; body references retain repository identity; indeterminate issue priorities fail closed; no-reference fallback is unconditionally MEDIUM — body references do not verify that
|
Exact-head correctness re-review — changes requestedReviewed exact head The prior findings are resolved: canonical MEDIUM — body references do not verify that the target is an Issue
This is not hypothetical: the exact-head audit now fails on “referenced issue #123”, but #123 is a merged pull request, not an Issue, and it has no labels. The helper therefore turns an ordinary PR-to-PR body reference into an invalid-issue gate. If the referenced PR happened to carry a Priority label, it could instead derive a priority from the wrong object class. The PR body, STATUS/MASTERPLAN, and Expected fix: make the body-reference provider return and validate MEDIUM — a partial writer failure bypasses the mandatory post-Apply audit
Expected fix: retain structured attempted/succeeded counts and always attempt the complete post-write audit after any writer attempt, including partial failure; preserve both the original write error and audit result/error in the final diagnostic. Add an injected test where one writer succeeds and the next throws, asserting that the post-audit provider still runs and the partial state is reported truthfully. LOW — successful Apply output still reports the pre-Apply stateAfter a successful post-audit, Expected fix: after successful Apply, expose the post-audit snapshot/audit as current truth ( Verification
The pagination, ordinal identity/cursor checks, closing-link completeness guards, repository-aware issue keys, deterministic fingerprints, source-plan drift guard, and pre-write option validation otherwise held under this pass. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9cfd2526e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Final review-fix evidence — exact head
|
|
@codex review Please review exact head |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Exact-head correctness review — changes requestedReviewed exact head LOW — the new live typed-reference adapter has no deterministic regression
Expected fix: extract/inject the raw-response normalization boundary and add deterministic cases for Issue and PullRequest responses, canonical repository/number extraction, and malformed/incomplete identity rejection. LOW — multi-item writer ordering and option-ID mapping are unassertedThe partial-failure test at lines 1070-1105 proves two writer calls and one post-audit, while the successful-output test at lines 1129-1174 writes only one item. Neither captures the Expected fix: use at least two planned updates with different priorities, capture each writer invocation, and assert the exact ordered item/option pairs as well as counts. Prior findings rechecked
The old Codex inline thread on PR-as-Issue handling is substantively fixed by Verification
|
Exact-head operations and data-safety review - changes requestedReviewed exact head MEDIUM - unresolved cross-repository policy is already enabled in the write planThe handoff and PR body correctly defer whether cross-repository Issues participate in Taskdeck Priority derivation, but the implementation has already chosen yes whenever an external repository happens to expose exactly one label named
Fail closed on every cross-repository Issue until that policy is ratified, or put participation behind an explicit reviewed opt-in whose default is off. Pin the boundary and both same-repository/cross-repository cases in the self-test; do not make an external repository's label taxonomy authoritative by coincidence. LOW - the durable failure ledger still records the false-clean path as resolved
Append a factual #1458 failure/correction entry in Prior operations findings rechecked
Verification
|
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Immediate-wrap checkpoint — exact head
|
|
@codex review Please review exact head |
Chris0Jeky
left a comment
There was a problem hiding this comment.
Exact-head correctness review — changes requested
Reviewed exact head 74af364c3bf7f3b4cc8b957a6a263a7dad4730ca. Before this verdict I re-read all 14 PR conversation comments, both submitted reviews, and the one inline thread (resolved/outdated, with its fix evidence), then independently inspected the exact diff and executable self-test.
MEDIUM — the body-reference parser silently drops later references in one clause
Get-BodyIssueReferences at scripts/github/Sync-TaskdeckProjectPriority.ps1:1499-1527 matches only the first #N following a closing/reference keyword. That conflicts with the documented policy that the highest urgency across derived PR issues determines Priority.
This is reproducible on the exact head: Refs #41, #42 produces only #41. With #41 at Priority II and #42 at Priority I, New-PriorityAuditState derives Priority II and builds an update plan from it; the required highest priority is Priority I. The same omission can hide a second repository-qualified reference such as Refs #41, owner/other#42, bypassing the intended fail-closed cross-repository boundary because the second target is never resolved.
Expected fix: parse every valid reference in a single reference clause while preserving the repository identity for each, then retain the existing typed resolution and cross-repository rejection. Add deterministic regressions for comma/and-separated same-repository references with different priorities and for a later cross-repository reference that must fail closed.
Verification
- Exact-head PowerShell parser: 0 errors.
- Exact-head offline
-SelfTest: 53/53 passed. - Exact-head direct parser probe and injected audit scenario reproduced the dropped-reference/wrong-priority behavior above.
git diff --check 8d45d044..74af364c: passed.- No
-Apply, project-priority write, branch, or working-tree modification was performed by this review.
The pagination, stable snapshot, typed target, source-plan drift, option-preflight, partial-write audit, and post-Apply report paths otherwise held under this correctness pass. Exact-head CI was still running at review time and remains a separate merge gate.
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Security and fail-closed review — changes requestedReviewed exact head MEDIUM — supported colon-form body references are silently ignored
This can build a Expected fix: accept the optional colon in the keyword separator without broadening the reference grammar or dropping repository identity, and add deterministic regressions for same-repository Verification
The final head correctly preserves typed target identity, same-repository-only authority, source/plan rechecks, option preflight, and post-write audit handling in the paths inspected. Exact-head CI remains a separate required merge gate. |
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
|
Fix evidence for the two exact-head review findings:
Exact-head local verification at
This push invalidates the prior review and CI evidence. Fresh independent reviews and exact-head automation are being collected; the PR remains draft, and no |
|
@codex review Please review exact head |
Security and fail-closed re-review — no new findingsReviewed exact head The prior optional-colon finding is resolved. Direct exact-head probes now parse No new CRITICAL/HIGH/MEDIUM/LOW issue found in the security/fail-closed/operator-safety paths reviewed. In particular, the revised clause parser preserves repository identity, feeds all references through typed target checks, and retains the pre-write source/plan/options guard plus mandatory post-write audit behavior. Verification
Residual gate: no live Apply or exact-head CI/Extended success is claimed here; both remain separate merge evidence. |
Chris0Jeky
left a comment
There was a problem hiding this comment.
Exact-head correctness re-review — no findings
Reviewed exact head 34c163c30ebf7e2594ac7d29a61f2bcf3c727f95. I re-read all current PR conversation comments, submitted reviews, and the single inline thread (resolved/outdated), then independently inspected the full exact diff and exercised the changed parser plus the priority derivation boundary.
The prior multi-reference finding is resolved: Refs #41, #42 and #43 returns all three references and the injected Priority II/I/III scenario derives Priority I. Colon forms also retain all identities, and Refs: #41, owner/other#42 reaches the existing fail-closed cross-repository check rather than being silently dropped.
No new CRITICAL/HIGH/MEDIUM/LOW correctness or data-integrity issue found in this pass. The revised parser preserves per-reference repository identity and order, while the already-reviewed complete-snapshot, typed-reference, source/write-plan recheck, option preflight, partial-write/post-audit, and post-Apply reporting paths remain coherent.
Verification
- Exact-head PowerShell parser: 0 errors.
- Exact-head offline
-SelfTest: 57/57, including-StrictFallbackPrioritycompatibility. - Direct exact-head probes: multi-reference, colon, qualified, and late cross-repository forms passed; injected derivation selected the highest Priority.
git diff --check 8d45d044..34c163c3: passed.- No
-Apply, project-priority write, branch, or working-tree modification was performed.
Residual gates: this is not live ProjectV2/Apply evidence, and exact-head CI was still in progress at review time.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Exact-head gate checkpoint —
|
…iority-pagination Signed-off-by: Chris0Jeky <jeky.tck@gmail.com> # Conflicts: # docs/STATUS.md # docs/agentic/FAILURE_LEDGER.md # docs/agentic/failure_ledger.jsonl
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Live data-remediation checkpoint — 2026-07-27The missing Issue authority is now repaired without running
Current project-field drift on that stable snapshot is 142 items: 131 Issues and 11 PRs. Of those, 137 fields are empty (131 Issues, including new #1497, plus PRs #1477/#1478/#1479/#1481/#1483/#1484). The five non-empty PR drifts are #66 I→V, #269 IV→V, #1342 I→II, #1373 II→V, and this PR #1488 I→V while its body has no eligible No project-field |
Signed-off-by: Chris0Jeky <jeky.tck@gmail.com>
Chris0Jeky
left a comment
There was a problem hiding this comment.
Independent exact-head review — findings fixed
Reviewed commit e78a6ef18c070c360c9a1807f74a22ae564b5e78 with separate correctness and operations/security lenses.
MEDIUM
-
Canonical live-state docs described the superseded external-reference policy and pre-remediation data gate.
- Affected:
docs/STATUS.md,docs/IMPLEMENTATION_MASTERPLAN.md, and the uncheckedOUTSTANDING_TASKS.mditem. - Fixed in
e78a6ef1: all three now record the verified 130-label remediation, stable 1,472-item snapshot, 142 field drifts, and visible/non-authoritative external-reference policy. The historical 2026-07-26 changelog entry remains intact with a dated superseding entry.
- Affected:
-
The PR body lacked an intentional issue directive, so the reviewed plan would have treated this PR as fallback
Priority V.- Fixed in current PR metadata: the body now contains exactly one closing directive for the Priority-I implementation issue. The complete live plan will be regenerated before Apply.
No CRITICAL, HIGH, LOW, implementation-correctness, security, or data-integrity findings remain from either lens.
Fix verification
- PowerShell parser: passed.
- SelfTest: 64/64.
- Docs governance: passed.
- Golden Principles: passed.
- GitHub operations governance: passed.
git diff --check: passed.- DCO: 16/16.
- Worktree clean; current
origin/mainis an ancestor.
Hosted exact-head checks, closing-reference verification, live Apply, and a separate complete zero-drift audit remain merge gates.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Live Apply and zero-drift evidence — exact head
|
Summary
Priority V, and same-repository body fallback remains available after an external closing reference.Live data remediation
updatedAt=2026-07-27T01:28:11Z: 1,472/1,472 items across 15 pages, 12 ignored external references, zero updates.Exact-head local verification
Head:
e78a6ef18c070c360c9a1807f74a22ae564b5e78e78a6ef1. No implementation, correctness, security, or data-integrity findings remain locally.Remaining merge gate
Hosted exact-head CI, CI Extended, CodeQL, fresh Codex review triage, and final conversation/thread inspection remain required before merge.
Closes #1458