ZT-531 · Parent blocks that never resume after their child block closes

Status Done (second-round reset open with Red Oak; see Config check)
Ticket ZT-531
Requested by Michael Lowry (from the "Projects outside work queues" dashboard, 2026-11-02)
Made by Michael Lowry (Albatross audit data: rules 3885–3887, controls 427, 486, 517, 523, 421, 424, 740, 741, 2026-11-05 16:54–17:28 UTC); requested by Michael Lowry
Date made 2026-11-05
Sections affected 04 · Funding (M1, M2), 06 · Utility interconnection (PTO), 09 · Inspection & energization (Energization), 11 · Service
Project types Residential. All 47 projects found are object type 6.

Request

Some blocks pause in a status with no work queue while a child block does the work: Energization at Pending Service Work waits on Service Work, and M1 Funding, M2 Funding, PTO and Inspection wait on Correction Work. An auto control is meant to move the parent on when the child closes. When it doesn't fire, nobody sees the project again. The dashboard found 19 open projects stuck like this on 2026-11-02.

Proposed solution (from the handoff)

  1. Make 427 accept Complete or Canceled Service Work.
  2. Make 523 and 517 (and M1's equivalent) match Inspection 248's "Complete or Canceled, and no open correction work".
  3. Make 248's ESC rule pass when no ESC block exists.
  4. Flag 517 as auto.

Review

Checked against production (Phoenix) on 2026-11-02.

The four controls today

Control Block Flags Condition Action
427 Service Work Complete (auto) Energization auto, not repeatable Energization = Pending Service Work and [There is a Complete Service Work Block] and not [There is an Active Service Work Block] → Review Service Work (queue: Review Service Work, 3d)
523 Correction Work Complete (auto) M2 Funding auto, not repeatable Correction Work = Complete (fail if none exist) and M2 = Pending Correction Work → Resubmit (queue: Resubmit M2, 2d)
517 Correction Work Complete (auto) PTO not auto, not repeatable Correction Work = Complete and PTO = Pending Correction Work → Ready to Resubmit PTO (queue, 2d)
248 Correction Work Complete (auto) Inspection auto, not repeatable; reset by Send to Corrections (779) and Send to Correction Work (256) Inspection = Pending Review or Correction Work and ESC = ESC Complete and [Correction Work Complete or Canceled] and not [Open Correction Work Exists v2] and not [Final Inspection in Failure Review v2] → Ready to Schedule Re-Inspection (queue, 5d)

Correction (2026-11-05): M1 Funding does have an exit control, Correction Work Complete (auto) (486, KAJ, last changed 2026-10-06). Claude missed it on 11-02 because the search read the controls' rule-group records, and 486's are stale (archived rules and blanks); its live condition is only in the control's logic. tools/queries/14-block-dependencies.sql had the same blind spot and now reads the logic instead. Re-running it found one other control that reads Correction Work, Inspection's M1 Audit Complete - Ready to Schedule (auto) (1176). This change doesn't edit any existing rule, so 1176 is unaffected. It moves M1 to Resubmit when M1 is at Pending Correction Work, there's no active correction appointment, and Correction Work is either Complete, or Canceled with Inspection at All Inspections Passed. It's auto but Allow Reset Run Flag is off. Correction Work Pending (1294) on M1 has a condition but no actions.

How these controls behave (from block audit history)

Why each parent gets stuck

  1. Canceled child isn't accepted (427, 523, 517). This is the main cause: 26 of the 33 Energization/M2 cases.
  2. One-shot control already used. The parent goes back into the waiting status a second time and the control can't fire again. Paths that put the parent back without a reset:
    • Energization: Needs Service Work (421) and the Energization Visit's Needs Service Work (424). Neither resets 427.
    • M2: Post Rejection Audit Complete - Correction Work (741) and manual status changes. Neither resets 523.
    • Inspection: Inspection Failed or Partial Pass (255, on Final Inspection) and update to pending correction (245). Neither resets 248. This is deliberate in effect: if 255 reset 248, an old Complete Correction Work would bounce the project straight to Re-Inspection without anyone reviewing the failure.
  3. M1 Funding: same one-shot problem, not a missing control (see the correction above). 25946 and 14045 went to Resubmit in May through 486, and were then set back to Pending Correction Work by hand.
  4. Not auto (PTO 517).
  5. No Correction Work block at all (Inspection, 13 projects, almost all entered review on 2026-02-14 to 03-05, so they look like the Spark migration). 248 needs a Correction Work block, so it can never fire. Corrections Not Needed (715) moves these on by hand.

Live projects in the waiting statuses (not canceled, 2026-11-02)

Parent, status Child still open Child closed, latest Canceled Child closed, latest Complete No child block
Energization, Pending Service Work 23 15 0 0
M2 Funding, Pending Correction Work 86 11 1 (27230) 0
M1 Funding, Pending Correction Work 52 1 (14045) 1 (25946) 0
PTO, Pending Correction Work 2 0 2 (22755, 23099) 0
Inspection, Pending Review or Correction Work 40 1 (4478) 3 (21300, 25804, 28061) 13

The "child closed" and "no child" columns add up to 47 stuck projects, more than the dashboard's 19:

The three handoff projects with Service Work at Ready to Schedule (1770, 4669, 15068) have their child still open, so this fix won't move them. They belong to the "statuses with no queue" issue: Ready to Schedule on Service Work has no queue.

The July Service Work cancellations (Michael asked)

Other checks

Double check (2026-11-05, before the change was built)

Decisions (Michael Lowry)

Admin checklist

Rules are created global (no origin block) so all four controls can use them. Don't edit the existing rules: [There is a Complete Service Work Block] and the Correction Work = Complete rules are used elsewhere. Several controls are named Correction Work Complete (auto), so pick the one on the block named in each step.

Rules

  1. Create a global rule. System Data, Process Block: Service Work, Process Block Object Status IN Complete, Canceled, Fail if none exist = true. Description: Latest Service Work Complete or Canceled (global).
  2. Create a global rule. System Data, Process Block: Correction Work, Process Block Object Status IN Complete, Canceled, Fail if none exist = true. Description: Latest Correction Work Complete or Canceled (global).
  3. Create a global rule. System Data, Process Block: Correction Work, Process Block Object Status IN Ready for AM Review, Ready for Field Audit Review, Ready to Schedule, Pending Correction Work, Disposition Remaining Work, Fail if none exist = true. Description: Open Correction Work Exists (global).

Energization: Service Work Complete (auto) 4. [ ] In the condition, replace There is a Complete Service Work Block with Latest Service Work Complete or Canceled (global). The condition becomes: (Process Block: Energization) System Data: Process Block Object Status EQUAL Pending Service Work (Fail if none exist = false) and Latest Service Work Complete or Canceled (global) and not There is an Active Service Work Block. 5. [ ] Check that Auto and Allow Reset Run Flag are both on (they already are). No change to the action (Set block status → Review Service Work). 6. [ ] Energization block screen › Actions section › Needs Service Work button (the one Activation uses): add a last action, Reset Other Control → Energization Service Work Complete (auto). 7. [ ] Energization Visit appointment screen › Actions section › Needs Service Work button. This is a different button with the same name. It also creates Service Work and sets Energization to Pending Service Work. Add the same last action, Reset Other Control → Energization Service Work Complete (auto). It's rarely used: no Energization Visit has ever been left at Needs Another Visit, which this button sets. It's still live, so it gets the same reset.

M2 Funding: Correction Work Complete (auto) 8. [ ] Set the condition to: (Process Block: M2 Funding) System Data: Process Block Object Status EQUAL Pending Correction Work (Fail if none exist = false) and Latest Correction Work Complete or Canceled (global) and not Open Correction Work Exists (global). This removes (Process Block: Correction Work) System Data: Process Block Object Status EQUAL Complete (Fail if none exist = true). 9. [ ] Check that Auto and Allow Reset Run Flag are both on (they already are). No change to the action (Set block status → Resubmit). 10. [ ] On M2 Funding's Post Rejection Audit Complete - Correction Work button, add a last action: Reset Other Control → M2 Funding Correction Work Complete (auto).

PTO: Correction Work Complete (auto) 11. [ ] Set the condition to: (Process Block: PTO) System Data: Process Block Object Status EQUAL Pending Correction Work (Fail if none exist = false) and Latest Correction Work Complete or Canceled (global) and not Open Correction Work Exists (global). 12. [ ] Tick Auto and Allow Reset Run Flag. No change to the action (Set block status → Ready to Resubmit PTO). It stays in the PTO Automatic Controls section. No reset action is needed: PTO Rejected - Correction Work always creates a new PTO block.

M1 Funding (revised 2026-11-05: M1 already had Correction Work Complete (auto). Michael built a new M1 Correction Work Complete (auto) (1439) from the first version of these steps before this was found. It has not fired.) 13. [ ] Remove M1 Correction Work Complete (auto) from M1 Actions and archive it. 14. [ ] On the existing M1 Correction Work Complete (auto), tick Allow Reset Run Flag. Leave its condition and action as they are. 15. [ ] On M1's Post Rejection Audit Complete - Correction Work button, point the Reset Other Control action at M1 Correction Work Complete (auto) instead of the new control. This button has no live placement on an M1 screen today, so this reset is insurance. 16. [ ] Move M1 on 25946 to Resubmit by hand. Its control already used its one run in May. For 14045, see step 18. 17. [ ] (Not needed. Kept so the step numbers match the ticket.)

Before the change 18. [ ] Funding decides what to do with the M2 blocks on Finalized projects 3553, 14045 and 22007, and the M1 block on 14045. Otherwise the new conditions drop them into Resubmit M2 or Resubmit M1 the next time those projects are saved. If they don't need resubmitting, set those blocks to Canceled before the change.

Test on project 28349 (28349 has no M2 Funding or Correction Work block, so we add them) 19. [ ] On 28349, add a Correction Work block, then an M2 Funding block. Set M2 Funding to Pending Correction Work by hand. M2 should stay there, because the Correction Work is open. 20. [ ] Cancel the Correction Work. M2 should move to Resubmit in the same save. This proves the Canceled path. 21. [ ] On the test M2, fill Post Rejection AM Audit Complete and Post Rejection AM Audit Completed By, then press Post Rejection Audit Complete - Correction Work. M2 should go to Pending Correction Work with a new Correction Work at Ready for Field Audit Review, and it should stay there. 22. [ ] Cancel that new Correction Work. M2 should move to Resubmit again. This proves the reset works. 23. [ ] Cancel the test M2 Funding block. 24. [ ] If the UI won't add blocks to 28349, skip the test. Instead, open stuck project 2570 (M2, latest Correction Work Canceled) and save anything on it. M2 should go to Resubmit. Claude checks the reset on the first real use of Post Rejection Audit Complete - Correction Work.

Catch-up of projects already stuck (after the test) 25. [ ] Energization (15), M2 (11; 27230 was moved by hand on 11-04), PTO (2) should move the next time anything on the project is saved; M1 (2) won't, because their control already ran in May (step 16 and 18). Claude checks which ones moved and lists the rest. Move those to the target status by hand: Review Service Work, Resubmit, Resubmit or Ready to Resubmit PTO. 26. [ ] Inspection (17): the Inspection team reviews each one and presses Corrections Not Needed or Send to Corrections. The list is in the Review. 27. [ ] Claude re-checks production: no M2, M1 or PTO moved while its Correction Work was still open.

New SOP

Rollback

  1. Put back the old conditions: Energization There is a Complete Service Work Block; M2 and PTO (Process Block: Correction Work) System Data: Process Block Object Status EQUAL Complete (Fail if none exist = true).
  2. On PTO's Correction Work Complete (auto), untick Auto and Allow Reset Run Flag.
  3. Remove the Reset Other Control actions added to the two Needs Service Work buttons and the two Post Rejection Audit Complete - Correction Work buttons.
  4. On M1 Correction Work Complete (auto), untick Allow Reset Run Flag. Make sure M1 Correction Work Complete (auto) is archived.
  5. Leave the three new global rules; unused, they do nothing.

Config check

Checked in production (Phoenix) on 2026-11-05 after Michael built steps 1–17, including the revised M1 steps. All changes were made by Michael Lowry between 16:54 and 17:28 UTC.

Steps 1–17: all match.

Step Result
1–3 Rules Latest Service Work Complete or Canceled (3886), Latest Correction Work Complete or Canceled (3887) and Open Correction Work Exists (3885) are global, IN the right statuses, Fail if none exist = true. Named without "(global)", which is fine. Two earlier copies (3883, 3884, Fail if none exist = false) are archived and unused.
4–5 Energization Service Work Complete (auto) Condition = Pending Service Work and not [There is an Active Service Work Block] and [Latest Service Work Complete or Canceled]. Auto and Allow Reset Run Flag on. Action unchanged.
6 Needs Service Work (Energization) Last action resets Service Work Complete (auto).
7 Needs Service Work (Energization Visit) Last action resets Service Work Complete (auto).
8–9 M2 Condition matches; Auto and Allow Reset Run Flag on. Renamed M2 Correction Work Complete (auto).
10 M2 Post Rejection Audit Complete - Correction Work Last action resets M2 Correction Work Complete (auto).
11–12 PTO Correction Work Complete (auto) Condition matches; Auto and Allow Reset Run Flag now on. Still in Automatic Controls.
13 New M1 control M1 Correction Work Complete (auto) (1439) archived and unplaced. It never fired.
14 Existing M1 control Allow Reset Run Flag on; condition and action unchanged. Renamed M1 Correction Work Complete (auto) (486). It's still in M1 Actions.
15 M1 Post Rejection Audit Complete - Correction Work Last action resets 486.
16 25946 M1 moved to Resubmit by Michael at 17:28.

Found while checking

Revised test (replaces steps 19–24; the Canceled path is already proven by 28645's real case above)

  1. On 28349, add an Energization block. Press Needs Service Work. Energization should go to Pending Service Work with a new Service Work.
  2. Cancel the Service Work. Energization should go to Review Service Work.
  3. Press Needs Service Work again, then cancel the new Service Work. Energization should go to Review Service Work again. This proves the reset.
  4. Cancel the test Energization block.

Reset test on 28349 (checked 2026-11-05)

Save test (2026-11-05): Michael saved a field on 28349's Energization block at 17:50:05 UTC. Energization stayed at Pending Service Work. So the reset doesn't make the control fire again, whether the trigger is a child block change or a save on the parent block. Escalated to Red Oak (ticket text below).

Red Oak support ticket (draft, 2026-11-05)

Subject: Auto control does not fire again after "Reset Other Control" (Allow Reset Run Flag is on)

Tenant: Zeo Energy, production

Summary An auto control with Allow Reset Run Flag turned on fires correctly the first time. After another control resets it with a Reset Other Control action, the UI shows it as ready to run again, but it never fires again, even when its condition is true and the block is saved. We rely on this pattern so that blocks waiting on a child block move on when that child closes. When the control doesn't fire, projects get stuck in statuses that have no work queue.

Setup

Steps to reproduce (test project 28349; Energization block instance 185702; all times 2026-11-05 UTC)

Time Action Result
17:38:14 Press Needs Service Work Service Work 185703 created. Energization → Pending Service Work. ✅
17:38:52 Cancel Service Work 185703 Control 427 fires in the same save. Energization → Review Service Work. ✅
17:41:04 Press Needs Service Work again Service Work 185705 created. Energization → Pending Service Work. Control 427 shows as ready to run again in the UI (reset applied). ✅
17:41:37 Cancel Service Work 185705 Control 427 does not fire. Energization stays at Pending Service Work. ❌
17:50:05 Save a field on the Energization block Control 427 still does not fire. ❌

Expected: after the reset, control 427 fires at 17:41:37, because its condition is the same as at 17:38:52, when it did fire. Energization should move to Review Service Work.

Actual: the control never fires a second time.

Possibly the same issue elsewhere: control 248, "Correction Work Complete (auto)", on the Inspection block (id 13). It's reset by controls 779 ("Send to Corrections") and 256 ("Send to Correction Work"). On project 28061 (Inspection block instance 156668), a reset path ran on 2026-10-19 at 21:20:47 UTC. The new Correction Work (161914) was completed on 2026-10-27 at 17:57:17 UTC, but Inspection never moved.

Questions

  1. Is Reset Other Control supposed to re-arm an auto control so it fires again when its condition is next true?
  2. Can you check the control history for control 427 on block instance 185702 at 17:41:37 and 17:50:05 UTC? Did it evaluate, what did each rule return, and why didn't it run? (The history table times out on our read-only copy.)
  3. Does the reset need to happen in a different save from the status change, or after it?
  4. If this isn't supported, what's the recommended way to let an auto control fire more than once on the same block?

We've left project 28349 in this state (Energization at Pending Service Work, both Service Work blocks Canceled) so you can inspect it.

Still open after recording (2026-11-05)

Catch-up re-check (2026-11-06, 17:33 UTC)

Re-check (2026-11-12)

Re-check (2026-11-12, 22:30 UTC)