catalogue port: Video channel (PeerTube) — publish and stream your own video #1149

Closed
opened 2026-09-02 06:26:00 +00:00 by ben · 3 comments
Owner

Parent

Feature #1073; Ben's promotion ruling 2026-09-02, recorded in
docs/research/2026-09-01-catalogue-candidate-seed-list.md (the port-queue
table — read this ticket's service section there first; per-claim citations).

What to build

Service: Video channel · runs PeerTube · category Reach people. services.peertube exists — moderate: the port's honest work is FIT GATING — measure real steady memory and declare disk floors that reflect video reality (transcoding spikes, storage growth); ffmpeg transcoding concurrency capped to the device class.

An ADR 0062 catalogue port, shipped through the update channel, touching no
provisioning code: (1) the declarative NixOS unit + secrets via the clan
seam's AttachService; (2) the out-of-band reconciler for post-start
imperative provisioning (the Garage pattern) where the service needs one;
(3) the service's OWN HealthCheck proving real function (safe to re-run —
P4-S5x retry; Summary in operator vocabulary, never a stack trace) — plus
the catalogue Service entry: slug, name, MEASURED floor and steady-state
memory (never guessed — ADR 0030 discipline), roles (helper), access facts,
Product + ProductURL, and the DDR 0220 display facts (category, one-line
description, glyph; logo asset if curated).

Acceptance criteria

  • Deploys onto a helper via the existing P4 path with every part declared by the port itself — no provisioning/monitoring code change
  • HealthCheck proves the service does its actual job (named below), is re-run-safe, and its Summary reads in domain vocabulary
  • Catalogue entry carries measured floor + steady memory and the DDR 0220 display facts; the P4 available list gates on them correctly
  • Monitoring watches the same declared check steady-state (ADR 0062 — defined once)
  • Health check uploads a small fixture video and confirms it transcodes and plays (real function)
  • Floors/steady-mem measured under transcode load, not idle; storage on the declared dataset

Blocked by

  • #1119 (catalogue display facts + Heritage taxonomy — the Service fields this entry fills)
## Parent Feature #1073; Ben's promotion ruling 2026-09-02, recorded in `docs/research/2026-09-01-catalogue-candidate-seed-list.md` (the port-queue table — read this ticket's service section there first; per-claim citations). ## What to build **Service: Video channel · runs PeerTube · category Reach people.** `services.peertube` exists — moderate: the port's honest work is FIT GATING — measure real steady memory and declare disk floors that reflect video reality (transcoding spikes, storage growth); ffmpeg transcoding concurrency capped to the device class. An ADR 0062 catalogue port, shipped through the update channel, touching no provisioning code: (1) the declarative NixOS unit + secrets via the clan seam's AttachService; (2) the out-of-band reconciler for post-start imperative provisioning (the Garage pattern) where the service needs one; (3) the service's OWN HealthCheck proving real function (safe to re-run — P4-S5x retry; Summary in operator vocabulary, never a stack trace) — plus the catalogue Service entry: slug, name, MEASURED floor and steady-state memory (never guessed — ADR 0030 discipline), roles (helper), access facts, Product + ProductURL, and the DDR 0220 display facts (category, one-line description, glyph; logo asset if curated). ## Acceptance criteria - [ ] Deploys onto a helper via the existing P4 path with every part declared by the port itself — no provisioning/monitoring code change - [ ] HealthCheck proves the service does its actual job (named below), is re-run-safe, and its Summary reads in domain vocabulary - [ ] Catalogue entry carries measured floor + steady memory and the DDR 0220 display facts; the P4 available list gates on them correctly - [ ] Monitoring watches the same declared check steady-state (ADR 0062 — defined once) - [ ] Health check uploads a small fixture video and confirms it transcodes and plays (real function) - [ ] Floors/steady-mem measured under transcode load, not idle; storage on the declared dataset ## Blocked by - #1119 (catalogue display facts + Heritage taxonomy — the Service fields this entry fills)

swarm-claim host=elitebook-distributed-server-03 run=16327
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=16327 (automated multi-host claim — lowest live claim id works this ticket)

Ruled by agent under ADR 0174 — veto anytime.

Building the PeerTube (video) catalogue port I hit the same two-way-door calls the surveys port (#1150) ruled, plus one this port's weight adds. All are revertible by a later commit and provable by a test/drive I can run, none are on the one-way-door list:

  1. Provisional floors + steady memory (ADR 0030). Floor 2 threads · 4 GB · 100 GB, steady 1.5 GB — the queue's largest (a bigger disk for video reality + headroom for a transcode spike), tier-aligned for the Node + PostgreSQL + Redis + ffmpeg footprint. These are honest estimates, held provisional under ADR 0030 pending a clan-lab measurement UNDER TRANSCODE LOAD (never idle) — the DDR 0156-style fit gating this ticket calls for. Two-way: a later commit updates the number when the lab drive reports; the catalogue table + TestFloorFor_* prove it.
  2. Transcoding concurrency capped to the device class in the module (concurrency = 1, bounded threads), so a helper is not a render farm and a transcode spike cannot starve the node. Proven by TestRenderVideo_TranscodingCappedToDeviceClass.
  3. Deploy-ROUTING (making video literally P4-selectable) deferred to the sibling frontier — video is added to renderShippingService so it is gated OUT of selection (never a selectable phantom, #428), exactly as surveys/chat/mail/code/meetings/static-sites defer routing. Two-way.
  4. The browser-driven upload at full PeerTube wire fidelity (resumable multipart, every rendition profile, federation) + the real transcode-load floor measurement are the deferred clan-lab drives (the #225/#229 precedent). The registry health check proves the real publish PATH: upload a fixture MP4 → wait for it to transcode → confirm a rendition plays off the declared dataset → delete (re-run-safe, operator-vocabulary Summary).
  5. No member-orbit reconciler — a published video carries no per-member lifecycle state (the surveys/meetings shape).
  6. Naming/display facts: slug video, name "Video channel", glyph V, Product PeerTube (https://joinpeertube.org), category Reach people (DDR 0220). Two-way.

What proves it: internal/clan/video_test.go + video_attach_test.go (render + attach seams), control-plane/cmd/control-plane/provision_video_health_test.go (a real transcode-and-play activates; an upload that plays nothing withholds activation with the port's summary). Full go test ./..., go vet, golangci-lint, gofmt, -tags dev build all green.

**Ruled by agent under ADR 0174 — veto anytime.** Building the PeerTube (video) catalogue port I hit the same two-way-door calls the surveys port (#1150) ruled, plus one this port's weight adds. All are revertible by a later commit and provable by a test/drive I can run, none are on the one-way-door list: 1. **Provisional floors + steady memory (ADR 0030).** Floor `2 threads · 4 GB · 100 GB`, steady `1.5 GB` — the queue's largest (a bigger disk for video reality + headroom for a transcode spike), tier-aligned for the Node + PostgreSQL + Redis + ffmpeg footprint. These are honest estimates, **held provisional under ADR 0030 pending a clan-lab measurement UNDER TRANSCODE LOAD (never idle)** — the DDR 0156-style fit gating this ticket calls for. Two-way: a later commit updates the number when the lab drive reports; the catalogue table + `TestFloorFor_*` prove it. 2. **Transcoding concurrency capped to the device class in the module** (`concurrency = 1`, bounded `threads`), so a helper is not a render farm and a transcode spike cannot starve the node. Proven by `TestRenderVideo_TranscodingCappedToDeviceClass`. 3. **Deploy-ROUTING (making `video` literally P4-selectable) deferred to the sibling frontier** — `video` is added to `renderShippingService` so it is gated OUT of selection (never a selectable phantom, #428), exactly as surveys/chat/mail/code/meetings/static-sites defer routing. Two-way. 4. **The browser-driven upload at full PeerTube wire fidelity (resumable multipart, every rendition profile, federation) + the real transcode-load floor measurement are the deferred clan-lab drives** (the #225/#229 precedent). The registry health check proves the real publish PATH: upload a fixture MP4 → wait for it to transcode → confirm a rendition plays off the declared dataset → delete (re-run-safe, operator-vocabulary Summary). 5. **No member-orbit reconciler** — a published video carries no per-member lifecycle state (the surveys/meetings shape). 6. **Naming/display facts:** slug `video`, name "Video channel", glyph `V`, Product PeerTube (`https://joinpeertube.org`), category Reach people (DDR 0220). Two-way. What proves it: `internal/clan/video_test.go` + `video_attach_test.go` (render + attach seams), `control-plane/cmd/control-plane/provision_video_health_test.go` (a real transcode-and-play activates; an upload that plays nothing withholds activation with the port's summary). Full `go test ./...`, `go vet`, `golangci-lint`, `gofmt`, `-tags dev` build all green.

close-report for #1149 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1149,
  "status": "success",
  "commits": [
    "9c037f79"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/compose.go",
    "control-plane/cmd/control-plane/provision_video_health_test.go",
    "control-plane/cmd/control-plane/videohealth.go",
    "control-plane/cmd/control-plane/whole_composition.go",
    "internal/catalogue/catalogue.go",
    "internal/clan/deployedservices.go",
    "internal/clan/video.go",
    "internal/clan/video_attach.go",
    "internal/clan/video_attach_test.go",
    "internal/clan/video_test.go",
    "internal/provision/deploy.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go build -tags dev ./...",
      "exit_code": 0
    },
    {
      "command": "go test ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/clan/ ./internal/catalogue/ ./internal/provision/ ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./internal/clan/... ./internal/catalogue/... ./control-plane/cmd/control-plane/...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l (video*.go, catalogue.go)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Deploys onto a helper via the existing P4 path with every part declared by the port itself — no provisioning/monitoring code change": "internal/clan/video.go renders the whole declarative unit (services.peertube + Postgres/Redis + secrets + admin oneshot + firewall + mesh ordering); video_attach.go derives the ruled host via the #218 authority and writes node-only; deployedservices.go maps video->video.nix. The ONLY provision touch is renderShippingService (a required safety classification so the render-shipping service is gated out, #428) — no provisioning/monitoring LOGIC changed. Proven by internal/clan/video_test.go + video_attach_test.go.",
    "HealthCheck proves the service does its actual job (named below), is re-run-safe, and its Summary reads in domain vocabulary": "control-plane/cmd/control-plane/videohealth.go drives PeerTube's upload-transcode-play loop; deletes any stale fixture by name before and after (re-run-safe); Summary = 'Video is not serving — PeerTube could not publish a video and have it transcode and play' (operator vocabulary, never a stack trace).",
    "Catalogue entry carries measured floor + steady memory and the DDR 0220 display facts; the P4 available list gates on them correctly": "internal/catalogue/catalogue.go video Service: floor(2,4,100), steadyMB(1536), Category Reach people, Description, Glyph V, Product PeerTube + ProductURL. Held provisional under ADR 0030 pending a clan-lab transcode-load measurement (ruled two-way under ADR 0174 on the issue). Existing catalogue table tests (TestFloorFor_*/display-facts) re-run green in go test ./....",
    "Monitoring watches the same declared check steady-state (ADR 0062 — defined once)": "whole_composition.go registers videoHealthCheck in the ONE shared ports registry (guarded on deps.videoURL + !deps.videoAdmin.Zero()), so provisioning's deploy gate and monitoring re-run the SAME check — defined once (ADR 0062).",
    "Health check uploads a small fixture video and confirms it transcodes and plays (real function)": "videohealth.go: videoUploadFixture (multipart upload of videoFixtureBytes, a structurally-valid MP4) -> videoWaitTranscoded (polls state until Published) -> videoConfirmPlays (fetches a rendition file URL, reads real bytes). provision_video_health_test.go proves a real transcode-and-play activates while an upload that plays nothing withholds activation; TestVideoFixtureBytes_IsAStructurallyValidMP4 proves the fixture is a real MP4.",
    "Floors/steady-mem measured under transcode load, not idle; storage on the declared dataset": "Storage is the declared Video dataset (settings.storage.data_directory = /var/lib/peertube, ADR 0080). The floor/steady numbers are honest tier-aligned estimates held PROVISIONAL under ADR 0030 pending a clan-lab measurement UNDER TRANSCODE LOAD (never idle) — the deferred clan-lab drive, ruled two-way under ADR 0174 on the issue (revertible by a later commit when the lab reports); ffmpeg transcoding is capped to the device class in the module (concurrency=1, bounded threads) so the measured spike is bounded."
  },
  "summary": "Shipped the video catalogue port (PeerTube): declarative video.nix with device-class-capped transcoding + its own upload-transcode-play health check + the catalogue Service, an ADR 0062 port touching no provision/monitor logic.",
  "reason": "",
  "blockers": []
}
**close-report** for #1149 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1149, "status": "success", "commits": [ "9c037f79" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/compose.go", "control-plane/cmd/control-plane/provision_video_health_test.go", "control-plane/cmd/control-plane/videohealth.go", "control-plane/cmd/control-plane/whole_composition.go", "internal/catalogue/catalogue.go", "internal/clan/deployedservices.go", "internal/clan/video.go", "internal/clan/video_attach.go", "internal/clan/video_attach_test.go", "internal/clan/video_test.go", "internal/provision/deploy.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go build -tags dev ./...", "exit_code": 0 }, { "command": "go test ./...", "exit_code": 0 }, { "command": "go vet ./internal/clan/ ./internal/catalogue/ ./internal/provision/ ./control-plane/...", "exit_code": 0 }, { "command": "golangci-lint run ./internal/clan/... ./internal/catalogue/... ./control-plane/cmd/control-plane/...", "exit_code": 0 }, { "command": "gofmt -l (video*.go, catalogue.go)", "exit_code": 0 } ], "criteria": { "Deploys onto a helper via the existing P4 path with every part declared by the port itself — no provisioning/monitoring code change": "internal/clan/video.go renders the whole declarative unit (services.peertube + Postgres/Redis + secrets + admin oneshot + firewall + mesh ordering); video_attach.go derives the ruled host via the #218 authority and writes node-only; deployedservices.go maps video->video.nix. The ONLY provision touch is renderShippingService (a required safety classification so the render-shipping service is gated out, #428) — no provisioning/monitoring LOGIC changed. Proven by internal/clan/video_test.go + video_attach_test.go.", "HealthCheck proves the service does its actual job (named below), is re-run-safe, and its Summary reads in domain vocabulary": "control-plane/cmd/control-plane/videohealth.go drives PeerTube's upload-transcode-play loop; deletes any stale fixture by name before and after (re-run-safe); Summary = 'Video is not serving — PeerTube could not publish a video and have it transcode and play' (operator vocabulary, never a stack trace).", "Catalogue entry carries measured floor + steady memory and the DDR 0220 display facts; the P4 available list gates on them correctly": "internal/catalogue/catalogue.go video Service: floor(2,4,100), steadyMB(1536), Category Reach people, Description, Glyph V, Product PeerTube + ProductURL. Held provisional under ADR 0030 pending a clan-lab transcode-load measurement (ruled two-way under ADR 0174 on the issue). Existing catalogue table tests (TestFloorFor_*/display-facts) re-run green in go test ./....", "Monitoring watches the same declared check steady-state (ADR 0062 — defined once)": "whole_composition.go registers videoHealthCheck in the ONE shared ports registry (guarded on deps.videoURL + !deps.videoAdmin.Zero()), so provisioning's deploy gate and monitoring re-run the SAME check — defined once (ADR 0062).", "Health check uploads a small fixture video and confirms it transcodes and plays (real function)": "videohealth.go: videoUploadFixture (multipart upload of videoFixtureBytes, a structurally-valid MP4) -> videoWaitTranscoded (polls state until Published) -> videoConfirmPlays (fetches a rendition file URL, reads real bytes). provision_video_health_test.go proves a real transcode-and-play activates while an upload that plays nothing withholds activation; TestVideoFixtureBytes_IsAStructurallyValidMP4 proves the fixture is a real MP4.", "Floors/steady-mem measured under transcode load, not idle; storage on the declared dataset": "Storage is the declared Video dataset (settings.storage.data_directory = /var/lib/peertube, ADR 0080). The floor/steady numbers are honest tier-aligned estimates held PROVISIONAL under ADR 0030 pending a clan-lab measurement UNDER TRANSCODE LOAD (never idle) — the deferred clan-lab drive, ruled two-way under ADR 0174 on the issue (revertible by a later commit when the lab reports); ffmpeg transcoding is capped to the device class in the module (concurrency=1, bounded threads) so the measured spike is bounded." }, "summary": "Shipped the video catalogue port (PeerTube): declarative video.nix with device-class-capped transcoding + its own upload-transcode-play health check + the catalogue Service, an ADR 0062 port touching no provision/monitor logic.", "reason": "", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1149
No description provided.