Repository navigation
fix(worldview): exact BlueMap gzip routing and CSP-safe asset readiness - #610
Conversation
|
Showcase capture owner is ready and blocked only on this fix. Once #610 is green/merged, please allow a short single main showcase run with worlds=true; parallel main merges previously broke provenance monotonicity. I will visually inspect the real rendered PNG before any README link. |
Forward Accept-Encoding/Content-Encoding for all renderers; scope the .gz fallback to BlueMap textures/tile paths with Range and non-BlueMap behavior unchanged. Require real textures.json bytes before READY. Pin the unchanged CSP and add fail-closed regressions. ADR 0047 and knowledge updated.
Probe the exact .gz sibling in readiness so gzip-only roots can become READY; validate a JSON textures document for every configured map with a bounded probe count; make explicit gzip refusal override Accept-Encoding wildcard. Update ADR/docs/knowledge.
ST1023: omit redundant io.Reader type; QF1002: use a tagged switch on r.URL.Path.
bf4b664 to
6817d0f
Compare
|
Final evidence for exact head 6817d0f (rebased onto main 9e2f0e0; ADR renumbered 0047 -> 0048 because main claimed 0047): all 15 CI checks pass on run 44548520569. Backend Lint & Vet issues ST1023/QF1002 were fixed, not waived. The first Backend Test Suite failure was the unrelated playerskin wall-clock flake; rerun of that exact job on the unchanged head passed (job 135632680080). Go Race Detector first hit a 10-minute timeout in unrelated internal/rpc/services.TestLifecycleRPCPersistsPartialRecreationAfterCancellation (job package set excludes internal/worldview); rerun of that exact job on the unchanged head passed in 8m57s (job 135654533805). Independent exact-head review at this head: APPROVED, no blockers (proxy.go and proxy_asset_test.go byte-identical to the previously approved 5ad1f35). Pinned Go 1.26.11 test/vet, golangci-lint (0 issues) and knowledge-lint all green. Pinned JIT webapp artifact, manifest, fixture recipe, ADR 0048 and evidence limits are in the audit handoff folder. No showcase edits, no publication. |
Summary
Fix the black-map false pass from preview 44530053075 on the backend product
path only. No showcase, capture,
scripts/review,showcase.ymlor READMEfile was edited by this lane; the screenshot owner remains the sole showcase
editor. No publication/release.
Root causes addressed
maps/world/textures.jsonreturned 404 because the disposable stack used aplain static web root with no BlueMap compressed-resource routing.
new Function) was blocked bythe unchanged panel CSP.
Changes
internal/worldview/proxy.go: forwardsAccept-Encodingand relaysContent-Encodingfor every renderer (native BlueMap webserver unchanged).Only for the BlueMap adapter and only for map
textures.json/PRBM/PNG tile payloads, a plain-path 404 retries exactly the
+".gz"sibling, labelled with the uncompressed media type plus
Content-Encoding: gzip. Literal.gzclient-decompression paths get noContent-Encoding.Rangenever switches representation; other renderers,other paths and auth/session/scope/private-cache gates are unchanged.
internal/worldview/adapters.go: READY requires a bounded JSON texturesdocument for every configured map (capped at 32 probes), via the plain
encoded route or the exact
.gzsibling. Missing/empty/SPA-fallback datareports ABSENT and no map session is issued.
unsafe-eval,no per-route CSP and no screenshot-only bypass.
docs/world-viewing.mdand the governing knowledge concept updatedin the same commits.
Pinned CSP-safe webapp build
Upstream BlueMap
v5.29source commita61e143fe1e069c536159e0bc79410d5b6da3885rebuilt with__INTLIFY_JIT_COMPILATION__: trueinvite.config.js. Verified JIT bundleindex-BA9KJ4pi.jsSHA-256ba940f930de0642acfd2ca8b0eda6aa0914ce02fcf673cee18262b3dd5217da3has 0new Function/ 0compileToFunction; pristine v5.29 has 1 / 2. The builtartifact, manifest and exact fixture recipe are in the audit handoff folder
bluemap-asset-csp-handoff/so the next preview can actually serve it.Verification
GOTOOLCHAIN=go1.26.11 go test ./... -count=1: PASS.GOTOOLCHAIN=go1.26.11 go vet ./...: PASS.go run ./cmd/knowledge-lint -root . -fixthen without-fix: 40/40 queries,85 concepts, indexes current.
missing texture stays 404, literal
.gzencoding rules, native encodingrelay, BlueMap-only/path-only scoping, Range preservation, q=0 refusal,
gzip-only readiness, non-textures body rejection, every-map probing.
5ad1f35eby a separate OpenCode agent on afree model: no blockers, recommendation to merge. First review found 5
issues (including a HIGH: readiness lacked the
.gzfallback); all werefixed and re-reviewed. Full verdict in the handoff folder.
Evidence limits
Backend tests are local
httptestfixtures with real gzip bytes; no livecontainer, browser or WebGL render is claimed here. Two-host product
integration and the actual screenshot are separate and owned by the sole
screenshot owner: do not report the map capture as qualified until a new
capture with the pinned bundle and fail-closed assertions has been produced.