# Granite integration status — runtime unavailable

The unified entry point is `/live-lab/`. OG and V3 run the original browser policies in independent habitats. The two assisted arms are unavailable until an operator verifies a real Granite Switch runtime. No Granite comparison or benefit has been measured. OWEN B is not connected.

## Implemented relay

`/api/live-lab/granite` is owner-only for inference. It needs four server-side settings: `OWEN_GRANITE_URL`, `OWEN_GRANITE_TOKEN`, `OWEN_GRANITE_MODEL`, `OWEN_GRANITE_REVISION`. No credential is sent to the browser. The URL must be HTTPS; model and revision must match every response. The configured service must implement this lab contract; an arbitrary chat-completions endpoint is not sufficient.

Authenticated upstream contract:
- GET `/health`: `{model, revision, ready}`.
- POST `/verify` receives `{nonce}`. It must perform real model inference, then return `{model, revision, nonce, inference:true, outputHash}`. `outputHash` identifies that generated output. A health ping alone does not enable the arms. The operator must also inspect server logs/model loading evidence; a JSON assertion alone is not independent proof of execution.
- POST `/advise` receives one lane's observation, run UUID, lane ID, advice index, `allowedTargets`, `maxTokens:64`, `deadlineMs:12000`. Return `{model, revision, targetId, tokens}` after actual inference. No scripted fallback is permitted. The identity must describe the actually loaded model/adapter configuration.

The browser receives a one-hour verification grant. The relay checks the grant, the 5-simulation-second schedule, 36 advice slots per lane, token receipt, target validity and model identity. It stores response receipts keyed by run/lane/slot. The operator is the only caller; this is not a public unlimited inference service. The runtime must enforce the same token/deadline budget and serialize duplicate concurrent requests. Server responses are bounded and time out after 15 seconds.

Inputs include current object types/positions, visible gate state, walls, needs and that lane's recent targets. They exclude future condition changes, gate linkage IDs and scoring rules. Legacy baselines access global state, so this is not a vision-only test. Recommendations change only a target; the native engine handles movement and learning from outcomes. The four clocks wait for advice. Failures stop and mark the trial incomplete, rather than substituting unassisted behaviour. Receipts record proposed/accepted targets, token count, identity, latency and input/output hashes. Subsequent target events show the native controller's response; an accepted proposal does not prove execution or causation.

## Learning and storage

Repeat retains each lane's own pet memory, V3 prediction state, object memories, exploration grid, research history and experience clock. It resets physical starts, needs, transient plans, maps and per-trial metrics. Remove assistance is enabled only after a completed assisted trial; it preserves those learners and makes no inference calls. Independent trials reset learning. Original baseline policy functions and the free-play habitat are unchanged.

IndexedDB keeps separate run IDs and archived learner checkpoints for each experiment family. Results sync automatically to authenticated R2 records; unsynced browser records retry on connection recovery. Account results are private to the visitor and project owner. Reports are browser-reported, not independently verified. Full checkpoints remain in the browser; cloud reports contain bounded histories and metrics. Clearing browser storage removes those local checkpoints. Cloud reports do not restore full learners on another device.

## Verification and outstanding work

Native-policy provenance, map equality/isolation, full-duration scenarios, wall/gate geometry, retained-learning stores, advice removal, report ownership, and off-topic rejection have automated tests. Runtime tests use explicit fixtures only and are not Granite performance evidence.

A real runtime still needs installation/connection, pinned model and adapter revisions, and a successful inference trial before four-way experiments can run. On 16 November 2026 no Granite service was configured on the site; Foundry exposed no model start/install recipe and the Desktop Commander device was offline. Nothing was installed into OWEN A or B. References: https://github.com/generative-computing/granite-switch and https://huggingface.co/ibm-granite/granite-switch-4.1-8b.

## Connection adapter added 17 November 2026

`services/granite/gateway.mjs` and `server.mjs` now implement the required service contract against a Granite Switch endpoint supporting the decision adapter. See `services/granite/README.md`. Mocked contract checks pass; no actual model inference has been verified. The gateway is not part of the Cloudflare Worker and must run alongside the model server. Bramble / Static are the display names for unchanged OG / V3 controllers; IDs and existing reports remain unchanged. The saved Veedul-snish artwork could not be retrieved during this pass, so existing Pip visuals are preserved.
