## [mirendev/runtime#1413](https://github.com/mirendev/runtime/pull/1413) 62d49e3 fixes the authorization gap I raised last round. `Rebuild` now calls `s.inner.authorizeBuild(ctx, name)` right after `AllowApp` (`rebuild.go:72-74`), before it reads the app, the version, or the archive, so all three build entry points check authorization the same way. `TestRebuildAuthorizesBeforeReturningAppState` checks the right things: - A denied caller gets `ErrUnauthorized` both for an app that exists and for one that doesn't, so the error can't be used to tell which apps exist. - An authorized caller still reaches the "no deployed version" check, so the gate isn't simply rejecting everyone. I've resolved that thread. The base-image refresh policy question (`buildkit.go:157`) is still open. The new `Rebuild` input only changes how build-arg env vars are computed. `dockerfileFrontendAttrs()` still sets force-pull for every Dockerfile build, so ordinary deploys refresh mutable `FROM` tags too. That thread was handed to a human, so I'm leaving it open for them to resolve. I'm still not recommending approval. The change touches every deploy path, and whether to accept the registry-availability tradeoff behind that policy is the owner's call, not mine. ## Replies to existing threads _Posted to the PR's comment threads when you submit._ - _(reply & resolve: addressed)_ Checked 62d49e3. `authorizeBuild` now runs right after `AllowApp`, before the app and version lookups and before the archive is opened. The new test checks what matters. A denied caller gets `ErrUnauthorized` whether or not the app exists, so the error can't be used to probe for apps. The authorized control still reaches app-state validation, which shows the gate isn't blanket-rejecting. That's the fix I asked for. --- **Verdict:** caveats