Skip to content

OSS-388: discover installed BlueMap and add managed in-context install - #542

Merged
athNdev merged 5 commits into
mainfrom
codex/bluemap-install
Nov 19, 2026
Merged

athNdev merged 5 commits into
mainfrom
codex/bluemap-install

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Exact head: 5a0197d

Fixes the originally reported symptom: a running builtin-bluemap module with
a private web server still showed World View ABSENT because Resolver only
read explicit world_view.endpoints.

Key changes

  • Private identity-bound discovery: exact server/node/module identity plus
    node-scoped container metadata (labels, pinned v5.29 image, unprivileged,
    owned-network IP, effective read-only level bind). Dials the inspected IP,
    not a Docker DNS alias; no port probing, host-port binding, public listener or
    cross-server fallback. Explicit endpoints always win.
  • Readiness honesty: a listening web server / HTTP 200 is not READY. The renderer
    must report the exact target map list in /settings.json and serve real tiles.
  • Managed in-context install through the existing ModuleService: per-controller
    process singleton held through persist/rollback, server-derived consent,
    backend-constructed private -1 port, read-only canonical level mount, pinned
    image/command, staged per-dimension config with no-clobber promotion; adoption
    is read-only; startImmediately needs modules/start; generic Modules-page
    creation is isolated from the managed signal.
  • The in-view install button now uses an explicit grouped-RPC adapter
    (adaptBlueMapRpc) instead of an unsafe cast: the prior cast left
    listModules/createModule undefined at runtime and the install always
    failed. Regression test added.
  • Template pins v5.29, removes browser access URL and silent accept-download
    init; world mount derives from the actual level folder.
  • ADR 0040, docs and knowledge updated.

Verification (pinned Go 1.26.11)

Original red loop RED then GREEN; go build, go vet, go test ./..., frozen
bun install, bun run check (0/0), bun test, bun run lint, packed frontend
build, golangci-lint no new issues, knowledge-lint -fix and final
(40/40 queries, 75 concepts). Full required CI green on this exact head.

Evidence: what is REAL and what is MOCKED

REAL (task-owned disposable fixtures only, all disposed afterward):

  • Docker relay tcp://[::1]:2375 with separately named containers, volumes and
    network. A real Java Edition 1.20.4 server generated a real world (level.dat
    plus real region files, EULA accepted); a real BlueMap v5.29 container rendered
    it to real map tiles and served /settings.json with the target map identity.
    Exact image identity/labels/owned-network IP/exposed port/read-only level bind
    were recorded for both a pinned v5.29 install and a legacy :latest adoption.
  • A packaged, opt-in controller integration (integration_live Go test) used
    the REAL store/auth/RBAC, REAL Docker metadata, REAL bluemapdiscovery and
    the REAL Go worldview.NewProxyHandler (no explicit endpoint, no mock proxy)
    to fetch /settings.json and a real rendered PNG tile under real token
    grants; wrong-scope and missing tokens were denied before any upstream asset.
    This is the originally reported discovery path, now closed. Evidence:
    browser-qa-2026-11-18/bluemap/controller-integration-live.md in the audit
    folder.

MOCKED (deterministic fixtures, not a live controller-to-renderer install):

  • The owned Chromium run served the real rendered assets through a LOCAL
    same-origin proxy fixture that enforced a session cookie, and mocked
    ConnectRPC responses for auth/nodes/world-view/modules. It drove consent,
    managed create, idempotency and legacy adoption in the browser with zero
    page/console errors. That separated browser run is not evidence of a live
    controller-to-renderer install and is not the real Go proxy: it is
    browser/UI evidence against real map assets. The real controller/discovery/
    proxy path is the packaged Go integration above, not this harness.

No live WSL module, server, world, network or host port was changed. No release.

Remaining limits

The singleton guarantee is per controller process (no cross-controller or
distributed atomicity); private discovery is local-node only (remote nodes need
an explicit node-local endpoint). The browser harness mocked RPCs and used a
local proxy fixture; the real controller/discovery/proxy path is covered by the
packaged Go integration and unit tests, not by that browser run. No live
controller-to-renderer install journal was driven, no measured latency and no
production deployment is claimed.

Do not merge until the exact required CI is green and independent review is
recorded on this exact head.

…all (OSS-388)

Root cause: Resolver.Resolve only consulted explicit world_view.endpoints, so a
running builtin-bluemap module still projected ABSENT. Discovery now binds a
renderer to exact server/node/module identity via node-scoped container metadata
and the inspected owned-network IP (no DNS alias, host port or port probing).
Explicit operator endpoints always win; readiness requires the target world,
rendered tiles and the renderer's own map list, not a listening web server.

Managed install uses existing ModuleService authorization: per-controller-process
singleton, server-derived consent actor/time, backend-constructed private port,
read-only canonical level mount, pinned image and staged per-dimension config.
Rollback holds the lock; no-clobber promotion preserves operator config.

Verified with the original red loop (RED then GREEN), concurrent/refusal/failure
fixtures, Go tests/vet, frozen Bun check/test/lint and knowledge-lint.
@athNdev
athNdev force-pushed the codex/bluemap-install branch from da229e5 to b86063e Compare November 18, 2026 13:37
The World View install panel cast the grouped rpcClient to a flat RPC interface, leaving listModules/createModule undefined at runtime so the install always failed. Add an explicit adaptBlueMapRpc seam with regression coverage; real-browser QA now drives consent, create, idempotency and legacy adoption against real rendered tiles. Reconcile ADR 0040 evidence limits with the disposable Docker qualification.
…renderer

Add an opt-in, env-gated Go test that uses real store/auth/RBAC, real Docker metadata from a task-owned relay container, real bluemapdiscovery and the real world-view proxy to fetch /settings.json and a real tile under real access checks. No gates are loosened. Document the real-vs-mocked evidence distinction in ADR 0040.
@athNdev
athNdev merged commit c29303f into main Nov 19, 2026
14 checks passed
@athNdev
athNdev deleted the codex/bluemap-install branch November 19, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant