carlos / platform Public

console: perf target for the DPA record and the logo upload in the census

GET /a/{sqid}/settings/dpa gets a perfTargets entry like GET
/a/{sqid}/settings. The claim authority census records legalFoldLogo's
files[0].Open(): it opens only the operator's uploaded multipart logo and
reads at most 200 KB + 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev e3585c0ae82f0db527c2ba31ea7df3d296e06793 parent 47926fe
3 files changed, +5 −0
  • internal/console/claim_authority_census_test.go +3 −0
  • internal/console/perfwalk_test.go +1 −0
  • internal/console/testdata/claim-authority-sites.txt +1 −0
diff --git a/internal/console/claim_authority_census_test.go b/internal/console/claim_authority_census_test.go
index d6425e4cf..e86064f9c 100644
--- a/internal/console/claim_authority_census_test.go
+++ b/internal/console/claim_authority_census_test.go
@@ -32,6 +32,9 @@ import (
// the S3 client behind Config.StoreBuckets, which reads and sets store bucket
// settings. Its only callers are the media and store uploads doors and the
// media pass, and all of them refuse on a host-claim console.
+// legalFoldLogo (oplegal.go) opens only the operator's uploaded letterhead
+// logo from the request's own multipart form and reads at most 200 KB + 1;
+// it is a multipart file, not a store, database or claim.
func claimAuthoritySites(t *testing.T) []string {
t.Helper()
selected := map[string]bool{
diff --git a/internal/console/perfwalk_test.go b/internal/console/perfwalk_test.go
index b2f3b6c85..974a8a725 100644
--- a/internal/console/perfwalk_test.go
+++ b/internal/console/perfwalk_test.go
@@ -512,6 +512,7 @@ func perfTargets(fx *consoleFixture) map[string][]perfTarget {
"GET /a/{sqid}/fleet/byo": ok(fx.path("/fleet/byo")),
"GET /a/{sqid}/fleets/{fleet}": ok(fx.path("/fleets/fleet-a")),
"GET /a/{sqid}/settings": ok(fx.path("/settings")),
+ "GET /a/{sqid}/settings/dpa": ok(fx.path("/settings/dpa")),
"GET /a/{sqid}/team": ok(fx.path("/team")),
"GET /a/{sqid}/trash": ok(fx.path("/trash")),
"GET /a/{sqid}/apps/{app}": ok(app),
diff --git a/internal/console/testdata/claim-authority-sites.txt b/internal/console/testdata/claim-authority-sites.txt
index 5ef73f52b..f0e024ca6 100644
--- a/internal/console/testdata/claim-authority-sites.txt
+++ b/internal/console/testdata/claim-authority-sites.txt
@@ -162,3 +162,4 @@ managedhistory.go|openManagedEnrolCredentials|seal.Open(sealed)
hacapacity_observe.go|Get|os.Open(filepath.Join(s.directory, filepath.FromSlash(key)))
hacapacity_observe.go|dirPage|os.Open(filepath.Join(s.directory, filepath.FromSlash(prefix)))
demo_claim_seed.go|publishDemoClaimSeed|os.Open(path)
+oplegal.go|legalFoldLogo|files[0].Open()