Skip to content

Commit 5ee439a

Browse files
jonfroehlichclaude
andcommitted
Say what recovering a lost crop store would actually take (#4926)
The previous commit called crops irreplaceable and left it there, which overstates it: the lab's research pano store keeps the source panoramas (a 300-pano sample of expired-pano labels found 292/300 for Seattle, 300/300 for Chicago), so sidewalk-panorama-tools' CropRunner could re-cut them. It is still not a rebuild — a cross-machine batch job over ~700k labels, producing a tighter, differently framed image, out of a store this deployment has no contract over — so the tier stands. The docs now name that path instead of implying there is none. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 310a638 commit 5ee439a

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

app/modules/PersistentMediaDirCheck.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ object PersistentMediaDirCheck {
8080

8181
val persistentDirs: Seq[PersistentDir] = Seq(
8282
// A crop is a screenshot of the pano canvas taken in the labeler's browser as the label was placed
83-
// (Canvas.saveCanvasScreenshot); nothing regenerates one server-side. The Static API still we fall back to is a
84-
// different image, and only exists while the provider still serves that pano — about half the labels on prod
85-
// already sit on panos marked expired, where the crop is the only surviving picture of what was labeled.
83+
// (Canvas.saveCanvasScreenshot); nothing here rebuilds one, and the Static API still we fall back to is a
84+
// different image that only exists while the provider still serves that pano — about half the labels on prod sit
85+
// on panos already marked expired. Re-cutting them from the lab's research pano store (sidewalk-panorama-tools
86+
// CropRunner) is a cross-machine batch job producing a differently framed image, not a rebuild.
8687
PersistentDir("cropped.image.directory", "SIDEWALK_IMAGES_DIR", irreplaceable = true),
8788
// The self-hosted pano store backs up GSV imagery Google has already expired (pano_data.has_backup) — for those
8889
// panos it is the only copy left anywhere, as unrecoverable as a user upload.

conf/application.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ custom.news.ribbon.link = null
266266
# the write paths.
267267

268268
# Directory for label crops, organized as <dir>/<city-id>/<labelType>/crop_<labelId>.png. Each crop is a screenshot
269-
# of the pano canvas taken in the labeler's browser as the label was placed, so nothing can rebuild one — and once
270-
# the pano expires it is the only picture left of what was labeled. Irreplaceable, like the pano and story dirs.
269+
# of the pano canvas taken in the labeler's browser as the label was placed, and nothing here rebuilds one.
270+
# Irreplaceable, like the pano and story dirs.
271271
cropped.image.directory = ".crops"
272272
cropped.image.directory = ${?SIDEWALK_IMAGES_DIR}
273273

docs/deployment-and-stages.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,18 @@ outside the build tree** via its environment variable (a variable that is set bu
290290
|---|---|---|---|
291291
| `story.media.directory` | `SIDEWALK_STORY_MEDIA_DIR` | User-uploaded story photos (**irreplaceable**) | **App refuses to start** |
292292
| `pano.images.directory` | `SIDEWALK_PANO_DIR` | Self-hosted pano store — the only copies of GSV imagery Google has expired (**irreplaceable**) | **App refuses to start** |
293-
| `cropped.image.directory` | `SIDEWALK_IMAGES_DIR` | Label crops — browser captures of the pano as it was labeled, with no second copy (**irreplaceable**) | **App refuses to start** |
293+
| `cropped.image.directory` | `SIDEWALK_IMAGES_DIR` | Label crops — browser captures of the pano as it was labeled, with no rebuild path in the app (**irreplaceable**) | **App refuses to start** |
294294
| `share.image.directory` | `SIDEWALK_SHARE_IMAGES_DIR` | Cached social-share previews (regenerable) | Error logged at boot |
295295

296+
Crops sit in the fatal tier because nothing in this app regenerates one: `/saveImage` stores a canvas screenshot the
297+
labeler's browser took as the label was placed, and the Street View Static still used as a fallback elsewhere is a
298+
different, smaller image of a pano the provider must still serve — roughly half the labels on prod sit on panos
299+
already marked expired. They are not *unrecoverable* in the absolute sense: the lab's research pano store keeps the
300+
source panoramas (a 300-pano sample of expired-pano labels found 292/300 for Seattle and 300/300 for Chicago), so
301+
[`sidewalk-panorama-tools`](https://github.com/ProjectSidewalk/sidewalk-panorama-tools)' `CropRunner.py` could re-cut
302+
them. That is a cross-machine batch job over ~700k labels, producing a tighter, differently framed crop, and it
303+
depends on a store outside this deployment — not something to trade a boot check for.
304+
296305
`PersistentMediaDirCheck` enforces this at boot in **prod mode** — what every staged binary runs in — so it covers
297306
every deployed stage *and* a staged binary run by hand (export the four variables to `/tmp` paths for that; CI's
298307
`e2e-smoke` job does exactly this). It deliberately does not key on `ENV_TYPE`: that variable arrives through the

0 commit comments

Comments
 (0)