Add Repixelizer witness advertisement export

This commit is contained in:
Meta Vens 2026-06-03 03:22:39 +01:00
commit 1e1a3441fe
9 changed files with 673 additions and 14 deletions

View file

@ -0,0 +1,191 @@
{
"commands": [
{
"authority": "repixelizer-route-policy",
"command": "repixelizer.job.submit",
"method": "POST",
"result": "accepted-denied-or-queued",
"route": "/api/jobs",
"surfaceId": "repixelizer.web.app",
"transport": "http"
},
{
"authority": "repixelizer-job-owner",
"command": "repixelizer.job.cancel_own",
"method": "DELETE",
"result": "accepted-denied-or-not-found",
"route": "/api/jobs/{job_id}",
"surfaceId": "repixelizer.web.app",
"transport": "http"
}
],
"contacts": [
{
"kind": "repo",
"path": "E:\\Projects\\repixelizer"
}
],
"freshness": {
"lastSeenAt": "2026-06-03T00:00:00Z",
"maxAgeMs": 15000,
"state": "fresh"
},
"kind": "service.product",
"nestedVerses": [
{
"authorityBoundary": "repixelizer-local-session-or-heimdall-account",
"carryRules": {
"commands": "repixelizer-route-policy-only",
"identity": "heimdall-claims-projected-when-enabled"
},
"kind": "session-space",
"parentVerseId": "gamecult.local",
"stateSchemas": [
"repixelizer.job.v0",
"repixelizer.job_event.v0",
"repixelizer.auth_projection.v0"
],
"surfaceIds": [
"repixelizer.web.app"
],
"verseId": "repixelizer.session.{sessionId}"
},
{
"authorityBoundary": "read-only-first-cut",
"kind": "hosted-operator-space",
"parentVerseId": "gamecult.local",
"stateSchemas": [
"repixelizer.job.v0",
"repixelizer.queue_snapshot.v0",
"repixelizer.job_event.v0",
"repixelizer.runtime_config.v0",
"repixelizer.auth_projection.v0"
],
"surfaceIds": [
"repixelizer.operator.surface"
],
"verseId": "repixelizer.operator"
}
],
"providerId": "repixelizer",
"runtime": {
"auth": {
"enabled": false,
"mode": "off",
"protectQueue": false,
"providers": [],
"required": false
},
"hostedDemo": false,
"queueCapacity": 32,
"showQueuePanel": false,
"spoolPath": "C:\\Users\\Meta\\AppData\\Local\\Temp\\repixelizer-gui-spool"
},
"schema": "gamecult.eve.provider_advertisement.v1",
"schemas": [
{
"authority": "accepted",
"description": "Job id, owner binding, status, timestamps, input/output artifact refs, error summary, and retention state.",
"owner": "repixelizer.gui",
"portable": true,
"schema": "repixelizer.job.v0",
"storage": "memory-dev-only-with-cc-witness-reserved"
},
{
"authority": "accepted",
"description": "Queue capacity, waiting/running counts, active job ids, oldest waiting age, and hosted mode.",
"owner": "repixelizer.gui",
"portable": true,
"schema": "repixelizer.queue_snapshot.v0",
"storage": "memory-dev-only-with-cc-witness-reserved"
},
{
"authority": "redacted-projection",
"description": "Redacted progress event, stage, index, timestamp, and job id.",
"owner": "repixelizer.gui",
"portable": true,
"schema": "repixelizer.job_event.v0",
"storage": "memory-dev-only-with-cc-witness-reserved"
},
{
"authority": "accepted",
"description": "Hosted flags, queue limits, visible UI flags, solver config hash placeholder, deployment id, and spool path.",
"owner": "repixelizer.gui",
"portable": true,
"schema": "repixelizer.runtime_config.v0",
"storage": "memory-dev-only-with-cc-witness-reserved"
},
{
"authority": "external-authority-projection",
"description": "Auth mode, provider availability, subject capability summary, and Heimdall claim freshness without raw tokens.",
"owner": "repixelizer.access",
"portable": true,
"schema": "repixelizer.auth_projection.v0",
"storage": "heimdall-projection-with-cc-witness-reserved"
}
],
"serviceId": "repixelizer.service",
"styleCapabilities": [
{
"lossiness": {
"read-only-first-cut": "operator surface names state and routes but does not own queue truth",
"tui": "no-pixel-canvas-editing; status, queue, artifact refs, and command intents only"
},
"preferredLowerings": [
"css",
"android-native",
"native-eve",
"tui"
],
"styleProfile": "repixelizer.product",
"tokenGroups": [
"repixelizer.comparisonCanvas",
"repixelizer.cleanupTool",
"repixelizer.queuePanel",
"repixelizer.operatorStatus"
]
}
],
"surfaces": [
{
"audience": "operator",
"commands": [],
"key": "cultmesh://repixelizer/surfaces/operator",
"mode": "read-only-first-cut",
"schema": "gamecult.eve.surface.v1",
"status": "planned",
"surfaceId": "repixelizer.operator.surface",
"transport": "cultmesh-document"
},
{
"canonical": false,
"canonicalSurfaceId": "repixelizer.operator.surface",
"schema": "gamecult.eve.surface.v1",
"surfaceId": "repixelizer.web.app",
"transport": "browser-lowering",
"url": "https://repixelizer.gamecult.org/app/"
}
],
"title": "Repixelizer",
"updatedAt": "2026-06-03T00:00:00Z",
"verseId": "gamecult.local",
"witnesses": [
{
"freshness": {
"state": "planned",
"updatedAt": "2026-06-03T00:00:00Z"
},
"id": "repixelizer.hosted.witness",
"kind": "cc-export-path-reserved",
"path": "state/repixelizer.witness.cc",
"redaction": "bulk-images-raw-tokens-and-private-claims-removed",
"schemas": [
"repixelizer.job.v0",
"repixelizer.queue_snapshot.v0",
"repixelizer.job_event.v0",
"repixelizer.runtime_config.v0",
"repixelizer.auth_projection.v0"
]
}
]
}

View file

@ -0,0 +1,80 @@
# Repixelizer Witness Contract
Repixelizer's hosted queue is still owned by `src/repixelizer/gui.py`.
This document defines the read-only first cut for making that state visible to
Odin, Huginn, CultMesh, and Eve without moving queue authority.
## Objective
Publish a `gamecult.eve.provider_advertisement.v1` fixture/export that names
Repixelizer's typed witness shapes and reserved CultCache `.cc` witness path.
The export is an authority map. It is not the queue store, not an Eve renderer,
and not a replacement for the current hosted routes.
Generate it with:
```powershell
repixelize witness-advertisement --out docs/fixtures/repixelizer.provider-advertisement.json
```
The checked-in fixture is:
`docs/fixtures/repixelizer.provider-advertisement.json`
## Authority Map
- Owner: `src/repixelizer/gui.py` owns queue admission, job lifecycle, progress
events, cancellation, heartbeat expiry, and spool cleanup.
- Inputs: uploaded image bytes, normalized hosted options, queue capacity,
worker heartbeat, cancellation requests, app-local subject binding, and
Heimdall-derived access projection.
- Outputs: in-process job records, queue summaries, SSE progress events, output
image artifacts, diagnostics refs, and route-level JSON projections.
- Derived state: provider advertisement JSON, future `.cc` witness export,
CultMesh publication, Odin discovery state, and Eve operator surfaces.
- Forbidden writers: Odin, Eve renderers, provider-advertisement fixtures,
witness exporters, and `.cc` inspection tools do not decide queue truth.
- Shared paths: browser GUI, hosted API routes, future `.cc` witness export,
future CultMesh publication, and Eve surfaces must describe the same
Repixelizer-owned job state.
- Cut line: this pass reserves witness names and paths only. A later pass may
add a real `.cc` writer or move queue ownership, but that must be an explicit
rebuild of ownership, not an exporter pretending to be persistence.
## Witness Schemas
The first advertisement names these schemas:
- `repixelizer.job.v0`: job id, account/session binding, status, timestamps,
input artifact ref, output artifact ref, error summary, and retention state.
- `repixelizer.queue_snapshot.v0`: queue capacity, waiting/running counts,
active job ids, oldest waiting age, and hosted-demo mode.
- `repixelizer.job_event.v0`: redacted progress event, stage, index, timestamp,
and job id.
- `repixelizer.runtime_config.v0`: hosted flags, queue protection, visible UI
flags, solver config hash placeholder, deployment id, and spool path.
- `repixelizer.auth_projection.v0`: auth mode, provider availability, subject
capability summary, and Heimdall claim freshness without raw tokens.
The reserved witness path is `state/repixelizer.witness.cc`.
## Provider Advertisement
`repixelize witness-advertisement` emits:
- `schema: gamecult.eve.provider_advertisement.v1`
- `providerId: repixelizer`
- schema catalog entries for the witness shapes above
- a reserved `.cc` witness entry with bulk image bytes, raw tokens, and private
claims marked as redacted
- a planned canonical Eve operator surface key:
`cultmesh://repixelizer/surfaces/operator`
- the current browser lowering at `/app/`
- route-owned command boundaries for job submit and own-job cancellation
- nested Verse declarations for session and hosted-operator spaces
- runtime projection from `HostedDemoConfig.from_env()` and
`AccessController.from_env()`
This is deliberately read-only. The current queue is still in-process memory.
The advertisement only tells discovery organs where truth lives and what shape
future durable witnesses must take.

View file

@ -87,20 +87,35 @@ tool palettes, and component variants. A Kotlin Android Eve runtime should be
able to run the cleanup flow with native controls while preserving the same
command boundary and product identity.
## Read-Only Witness Export
The first read-only provider advertisement is generated by:
```powershell
repixelize witness-advertisement --out docs/fixtures/repixelizer.provider-advertisement.json
```
It names the witness schemas above, reserves `state/repixelizer.witness.cc` for
the future CultCache export, and publishes the planned Eve operator surface key
without changing queue ownership. The detailed authority map lives in
`docs/repixelizer-witness-contract.md`.
## Migration Order
1. Define Repixelizer CultCache document shapes for job, queue, runtime, event,
and auth projection witness state.
2. Add a read-only export from the current `gui.py` queue/job manager into a
2. Publish a read-only `gamecult.eve.provider_advertisement.v1` fixture/export
that names those shapes and the reserved `.cc` witness path.
3. Add a read-only export from the current `gui.py` queue/job manager into a
`.cc` witness.
3. Publish the witness through CultMesh.
4. Add an Eve DSL provider over the witness and existing health/config routes.
5. Translate the existing browser GUI style and tool behavior into Eve style
4. Publish the witness through CultMesh.
5. Add an Eve DSL provider over the witness and existing health/config routes.
6. Translate the existing browser GUI style and tool behavior into Eve style
tokens, canvas primitives, and command descriptors.
6. Lower the current website from the Eve surface instead of treating it as the
7. Lower the current website from the Eve surface instead of treating it as the
product UI owner.
7. Register the surface with Odin.
8. Only after the witness is stable, decide whether queue ownership should move
8. Register the surface with Odin.
9. Only after the witness is stable, decide whether queue ownership should move
from in-process memory into the typed store.
The invariant: Heimdall owns shared auth; Repixelizer owns jobs and artifacts.