Repository navigation
fix(pm-stack): kaneo-sync-guard heal persists the complete repaired statusTransitions map (#10528) - #10535
Conversation
…tatusTransitions map (#10528) The heal computed the complete repaired map in memory (EXPECTED applied, non-expected transitions targeting a forbidden state removed) but the UPDATE only set the three expected keys via nested jsonb_set, so a forbidden transition the heal had deleted stayed live in the stored config — and the post-heal check, which verified only the expected keys, still printed HEALED. - Persist the computed healed map with one jsonb_set at the {statusTransitions} path (also creates the object when missing). - Post-heal verification now checks the full invariant: expected values present AND no non-expected transition targets a forbidden state. - New pm-stack/tests/test_kaneo_sync_guard.py (fake psql; oracle = persisted config equals the computed healed map): missing statusTransitions, extra forbidden transition, drifted expected value, conforming no-write, and unpersisted-heal-is-an-error cases. 5/5 pass on the fix; fails on the original code. Task 17379. Source PR #10190 review thread is not replied to (pr-comment-review rules); discussion lives on issue #10528. Overlapping PR #10316 touches the same block for #10140 — this change is scoped to compose with it on rebase. Fixes #10528
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
What
Fixes #10528 (Codex P2 on merged PR #10190, task 17379): the kaneo-sync-guard heal computed the complete repaired
statusTransitionsmap in memory — EXPECTED applied, non-expected transitions targeting a forbidden state removed — but the UPDATE only set the three expected keys via nestedjsonb_set. A forbidden transition the heal had deleted in memory (e.g. an extraonIssueReopen: "done") stayed live in the stored config, and the post-heal check — which verified only the expected keys — still printed HEALED.Changes (
pm-stack/kaneo-sync-guard.py)jsonb_setat the{statusTransitions}path (SQL-escaped JSON literal; also creates the object when it is missing entirely).Tests
New
pm-stack/tests/test_kaneo_sync_guard.py— fake-psql unit tests; oracle = the persisted config equals the computed healed map:statusTransitionsobject is created completeResult: 5/5 pass on this branch; the same tests fail on the original code (1 failure, 3 errors — regression proof).
py_compileclean.Notes
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.