ZT-498 · Site Survey: close blocks stuck at Pending Engineering Audit

Status Done
Ticket ZT-498
Requested by Claude's Oct 27 config audit (for Michael Lowry)
Made by Michael Lowry (Albatross audit data: control created 18:06–18:12 UTC on 2026-11-13; tested in staging first), from Claude's config audit
Date made 2026-11-13
Sections affected 03 · Survey and deal review
Project types Residential, Battery Only

Request

944 live projects have their Site Survey block stuck at Pending Engineering Audit (919 on Oct 27). The status has no work queue, and most of these jobs were built long ago. The backlog distorts Site Survey reporting and hides the few real ones.

Re-checked 2026-11-12: still there, and the Oct 27 fix needs changing. The engineering audit isn't separate work. It closes on its own when Engineering completes Scope Review: Close Site Survey (auto) on Scope Review stamps Site Survey Verified by Engineering, and Engineering Audit Passed (auto) on Site Survey then completes the block. The backlog is jobs where that didn't happen, because their Scope Review was finished before Close Site Survey (auto) existed (2026-08-20), or before the survey reached Pending Engineering Audit. An auto doesn't fire on a block that's already complete (ZT-576). So the fix is an auto on the Site Survey block that closes these, not a new Engineering queue.

Review

Checked against production through Phoenix on 2026-11-12.

The 944, by Scope Review state:

Scope Review Projects What happens
Complete (some with a canceled one too) 877 Stuck. This fix closes them.
Open (Active / rework) 47 Close when Scope Review completes, as today.
None yet (mostly Qualification) 17 Same, once Scope Review opens and completes.
None, but the project is in Installation Prep or later 3 (28970, 28971, 28995) No Deal Review, Scope Review or Plan Set at all. Check by hand.

By project status: Finalized 417, Finalization 224, Inspection 138, Installation 54, Installation Prep 45, Engineering 36, Qualification 12, other holds 18.

Likely cause: Close Site Survey (auto) was added on 2026-08-20 and only fires while its Scope Review block is still open. Jobs whose Scope Review closed before then, or before the survey reached Pending Engineering Audit, were never swept up. The planned migration (ZT-189) was never run.

Admin checklist

Before you start

  1. Brendan Fillmore (Engineering) confirms that a completed Scope Review means the site survey audit is done. Close Site Survey (auto) already assumes this.
  2. Michael confirms ZT-361 won't change Pending Engineering Audit or Close Site Survey (auto).

Site Survey block

  1. Create control (Button) Scope Review Already Complete (auto), flags auto and timed.
  2. Set its condition: (Process Block: Site Survey) System Data: Process Block Object Status EQUAL Pending Engineering Audit (Fail if none exist = false) AND (Process Block: Scope Review) Custom Field: Review Details-Scope Review Completed IS NOT NULL (use a global copy; several exist with this description, and the copy on Scope Review itself is local) AND NOT (Process Block: Scope Review) System Data: Process Block Object Status IN Active, Ready for Rework Review (Fail if none exist = false) (global) AND NOT (Process Block: Site Survey) Custom Field: Site Survey Milestones-Resurvey Pending EQUAL true (global). The last two keep it away from jobs mid-rework or mid-resurvey.
  3. Action 1: set Site Survey Verified by Engineering (OSC 2829) = now().
  4. Action 2: set block status → Complete.
  5. Place it on Site Survey › Automatic Controls, next to Engineering Audit Passed (auto).

Test and roll out

  1. Test in staging first (new auto + timed). A Site Survey at Pending Engineering Audit with its Scope Review complete goes to Complete after the nightly run, and Site Survey Verified by Engineering is stamped. One with an open Scope Review or Resurvey Pending = true stays put.
  2. Heads-up to Engineering and anyone reporting on Site Survey: the first nightly run closes about 877 blocks at once.
  3. Ask Engineering to look at 28970, 28971 and 28995 by hand.

No work queue is added: Pending Engineering Audit is a waiting status, and the work sits in the Scope Review queues.

New SOP

No change for end users. Engineering keeps completing Scope Review as today, and the site survey closes on its own.

Rollback

  1. Archive Scope Review Already Complete (auto). Blocks it closed stay Complete. They can be reopened by hand, but nothing reads the difference.

How to verify

Claude checks in Phoenix: the control's flags, condition, actions and placement; the morning after, Pending Engineering Audit drops from 944 to about 70, and none of those left has a completed Scope Review and no open one.

Open questions

Config check

Checked in production through Phoenix on 2026-11-13. Everything matches the Admin checklist.

Sample to check after the nightly run

Verification after the first nightly run

Checked in Phoenix on 2026-11-14 at 21:00 UTC.