console: the policy door reads instance records through the judged reader
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+2
−2
internal/console/apipolicy.go+2 −2
diff --git a/internal/console/apipolicy.go b/internal/console/apipolicy.go| index dff055678..032a20b58 100644 |
| --- a/internal/console/apipolicy.go |
| +++ b/internal/console/apipolicy.go |
| @@ -1046,7 +1046,7 @@ func (s *Server) applyPolicyChange(ctx context.Context, acct *Account, app strin |
| if !provision.ValidHostShape(host) { |
| return p, http.StatusBadRequest, policyInvalidHostMsg |
| } |
| - rec, err := provision.GetRecord(ctx, s.cfg.Releases, acct.Sqid, app, host) |
| + rec, _, err := s.readRecord(ctx, acct.Sqid, app, host) |
| if errors.Is(err, os.ErrNotExist) { |
| return p, http.StatusNotFound, fmt.Sprintf(policyNoInstanceMsg, host) |
| } |
| @@ -1083,7 +1083,7 @@ func (s *Server) applyPolicyChange(ctx context.Context, acct *Account, app strin |
| // overrideCurrent reports whether host's override was set on the instance |
| // that exists now: its record is present and has the override's CreatedAt. |
| func (s *Server) overrideCurrent(ctx context.Context, acct *Account, app, host string, o apppolicy.SizeOverride) (bool, error) { |
| - rec, err := provision.GetRecord(ctx, s.cfg.Releases, acct.Sqid, app, host) |
| + rec, _, err := s.readRecord(ctx, acct.Sqid, app, host) |
| if errors.Is(err, os.ErrNotExist) { |
| return false, nil |
| } |