From d32293ccb2e70f0c007a25bd473ae9410a08bd6b Mon Sep 17 00:00:00 2001 From: "benjamin.baker" Date: Wed, 9 Sep 2026 21:40:51 -0400 Subject: [PATCH] Auto-register staged agent builds as a pushable application Gate collect_log on a minimum agent version and bridge the agent version store to the applications table so a staged build can actually be pushed. update_app resolves an install source from the applications table alone; it cannot see agentstore. A build could therefore be staged and current while no application row existed at all, which is what the fleet was in: the agent was unpushable. Staging is now the single source of truth - it packages the current build and upserts the row in the same request, so the row cannot describe a build that is no longer staged. PARTIAL BUILD ADVISORY This is steps 1-4 of a longer rollout and is deliberately incomplete: - There is no push trigger yet. The registered package is resolvable and verifiable, but nothing enqueues an upgrade; the "behind current build" indicator is still display-only. - The upgrade template script, its script row, and the enqueue route (endpoints.agentupdate) are not written. - Blocking constraint for the next slice: run_script executes powershell.exe -File