Repository navigation
fix(free): reconcile ambiguous apply commits and refresh Undo authorization (#297) - #302
Merged
Merged
Conversation
MrDarkRoot
commented
Oct 16, 2026
MrDarkRoot
left a comment
Owner
Author
There was a problem hiding this comment.
Maintainer technical review of HEAD 216641d:
I inspected the full PR patch and found no blocking correctness issue in the diff.
Findings:
- Durable reconciliation only adopts a journal row when state is APPLIED, the plan/product binding matches, applied_at passes strict format + calendar + clock validation, and record_item succeeds under the current claim token. Otherwise the path remains fail-closed to NEEDS_REVIEW; it does not replay the Woo mutation.
- Undo authorization refreshes site role definitions and the current executor's user cache before capability checks. The new warm-cache revoke test exercises the stale-user-cache failure mode.
- The new timestamp validator correctly rejects impossible dates/times that passed the previous shape-only regex. The unit matrix includes leap-day, month-end, invalid month/day/hour/minute/second, null/missing, zero-date, and malformed strings.
- Integration coverage addresses post-commit ambiguous outcomes, pre-commit rollback/retry, binding mismatch, conditional Undo conflicts, and missing/zero-date timestamp evidence.
- CI run 38888114929 reports success for this exact HEAD.
Technical recommendation: GO / merge-ready from code + CI review. No code changes requested. Note: this is a COMMENT review, not an APPROVE review, because GitHub rejects approval of the PR by its author; a different authorized maintainer must provide the formal approval if repository rules require it.
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #297.
Authorization
Founder GO on #297 (after dependencies). Verified merged before branching: #296 CAS (PR #300, merge 2be5576) and #295 allowlist (PR #301, merge 73e1bed). Base:
73e1bed002f594ba5b45580fc954200f8d8b90dd. Scope is #297 only.Objective A — live-worker reconciliation
Job_Worker::attempt_item()re-reads the journal on the independent observer connection before theNEEDS_REVIEWfallback. Adopts only boundAPPLIEDrows under the worker's own claim token (APPLYING->APPLIED, reasonDURABLE_RECONCILED, journalapplied_at). Missing/unreadable/non-APPLIED/bad-binding/lost-token all fail closed to review. No mutator re-call, no setters/save(), noNEEDS_REVIEW->APPLIEDtransition, no inference fromAMBIGUOUS_COMMIT.Objective B — Undo authorization refresh
Woo_Undo_Mutator::authorize()reloadswp_roles()->for_site()+clean_user_cache(executor)after the existing row locks, before evaluation. Same two calls and order as Apply; principal unchanged; no broad flush.Tests (5 files, +180/-0)
mutator_fault=throwsupport; post-commit throw adopts APPLIEDx2 with journal applied_at and 1 save each; same fixture feeds conditional Undo (sibling newer price conflicts, zero overwrite); pre-commit throw stays PENDING then retries once; material-tamper stays NEEDS_REVIEW with zero mutation.Validation
php -lclean; allowlist PASS; no-replan PASS; i18n-catalog PASS; free/unit 2607 PASS; outcome-copy PASS;pr-fast.shPR_FAST PASS.Maintainer: inspect diff + CI before merge. Do not merge until jobs/undo/admin/journal workflows pass.