carlos / platform Public

docs: media page, Luna docs pass applied with two overrides

Luna's nine rows are applied verbatim to the deck, the page and nav.json,
except docs.media.example.6 (the console is console.example.com, not the
app's host) and docs.media.uploads.8 (the 5 GB single-PUT limit is
AWS-documented, so the original stays). The approved job messages
media.job.engine_unavailable and engine_lost now say "upload the file
under a new key to try again", in the deck and in media_copy.go. The
deck's Task 11 section is marked approved; the plan values keep "As a
starting point". The Luna brief and result are committed with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev b5735d6323a16c0cfb73fbe1b6f22205bfea5c64 parent 004765b
6 files changed, +59 −20
  • docs/site/media-conversion.md +8 −8
  • docs/site/nav.json +1 −1
  • docs/superpowers/notes/LUNA-DOCS-BRIEF-media-conversion.md +10 −0
  • docs/superpowers/notes/LUNA-DOCS-RESULT-media-conversion.md +16 −0
  • docs/superpowers/notes/media-conversion-copy-deck.md +22 −9
  • internal/console/media_copy.go +2 −2

CI failed — run details

diff --git a/docs/site/media-conversion.md b/docs/site/media-conversion.md
index 60c828907..9090c54bb 100644
--- a/docs/site/media-conversion.md
+++ b/docs/site/media-conversion.md
@@ -1,16 +1,16 @@
# Media conversion
-A phone hands your app a video that won't play everywhere: HEVC in a `.mov`, 4K at 60 frames a second, turned on its side. Media conversion turns it into a file every browser plays. Your app uploads the original to its own store, asks the console to convert it, and checks back until the job is done. The converted files land in the same store, and your app serves them like any other object.
+A phone hands your app a video that won't play everywhere: HEVC in a `.mov`, 4K at 60 frames a second, turned on its side. Media conversion produces files for browser playback. Your app uploads the original to its own store, asks the console to convert it, and checks back until the job is done. The converted files land in the same store, and your app serves them like any other object.
## What you get
-`video-720p` is the default. It makes an H.264 video with AAC sound, at most 1280 by 720 in either orientation and 30 frames a second. It never scales a video up, it applies the rotation, and it converts HDR to standard range. You get three files:
+`video-720p` is the default. It makes an H.264 video, with AAC sound when the source has audio, at most 1280 by 720 in either orientation and 30 frames a second. It never scales a video up, it applies the rotation, and it converts HDR to standard range. You get three files:
- `video.mp4`, the video. It plays progressively with `Range` requests.
- `video.m3u8`, an HLS playlist over that same file, for players that want a stream.
- `poster.jpg`, a still from one second in, or from the middle of a shorter clip.
-`audio-aac` takes an audio file, or the first audio track of a video, and makes one AAC file at an even loudness. It raises or lowers the volume as a whole and never compresses the dynamics. You get `audio.mp4`, its playlist `audio.m3u8`, and `peaks.json`, a waveform of 1,000 peaks from 0 to 255 with the duration:
+`audio-aac` takes an audio file, or the first audio track of a video, and makes one AAC file. It raises or lowers the volume as a whole and never compresses the dynamics. You get `audio.mp4`, its playlist `audio.m3u8`, and `peaks.json`, a waveform of 1,000 peaks from 0 to 255 with the duration:
```json
{"version": 1, "duration_ms": 61250, "peaks": [0, 12, 87, 140, ...]}
@@ -43,14 +43,14 @@ Replace `<secret>` with the secret the second command prints. If your app alread
Your app presigns the upload with its S3 library and the store credentials the platform gives it: `CARLOS_STORE_BUCKET`, `CARLOS_STORE_REGION`, `CARLOS_STORE_ACCESS_KEY` and `CARLOS_STORE_SECRET_KEY`. For a large file, use a multipart upload instead (see [Uploads from a browser](/docs/media-conversion#uploads-from-a-browser)).
-With your console at [https://example.com](https://example.com), step 2 is:
+With your console at [https://console.example.com](https://console.example.com), step 2 is:
```sh
curl --fail-with-body \
--header "Authorization: Bearer $CARLOS_SERVICE_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"key": "uploads/a1b2.mov"}' \
- 'https://example.com/api/cli/apps/{account}/shop/media/conversions'
+ 'https://console.example.com/api/cli/apps/{account}/shop/media/conversions'
```
Step 3 is a `GET` of `/api/cli/apps/{account}/shop/media/conversions/<id>` with the same header. When the job is done, the answer looks like this:
@@ -144,8 +144,8 @@ A job is `queued` while it waits for a place, `running` while the engine works o
| `grant_expired` | `the conversion ran past its one-hour window` |
| `deadline_exceeded` | `the conversion took longer than its time limit and was stopped` |
| `engine_failed` | `the conversion engine failed on this file. ask this deployment's operator` |
-| `engine_unavailable` | `the conversion engine could not start. upload the file again to try once more` |
-| `engine_lost` | `the conversion engine lost track of this job. upload the file again to try once more` |
+| `engine_unavailable` | `the conversion engine could not start. upload the file under a new key to try again` |
+| `engine_lost` | `the conversion engine lost track of this job. upload the file under a new key to try again` |
| `store_changed` | `the store was replaced while this job waited. submit it again` |
| `store_writes_denied` | `this store refuses new objects because the account is past its storage allowance. delete objects or add storage, then try again` |
@@ -214,7 +214,7 @@ Fair use applies on every deployment. By default an account can have 20 conversi
Your deployment can give your account a monthly allowance of media minutes, shared by its apps. Where billing is on, the account's Billing page shows the allowance and how much you've used. A minute of video counts as 1 media minute and a minute of audio as 0.1, so 10 minutes of audio is 1 media minute.
-A done job is charged for the length of its source. A failed job is charged for the engine time it used, at the same rates, which is nothing if it never started. While a job runs, the most it could cost is held against the allowance.
+A done job is charged for the length of its source. A failed job is charged for the engine time it used, or the full reserved time if the engine loses the task record. A job that never starts is uncharged. While a job runs, the most it could cost is held against the allowance.
As with other monthly limits, the account's owners get a warning at 80% of the limit. At twice the monthly limit, new conversions are refused with `402` until the 1st of the UTC month, or until the account buys a media pack or moves to a larger plan. A job can also fail `allowance_exceeded` when what's left of the allowance won't cover the file. See [Plans](/docs/plans).
diff --git a/docs/site/nav.json b/docs/site/nav.json
index ce3305b17..ec8ce392c 100644
--- a/docs/site/nav.json
+++ b/docs/site/nav.json
@@ -46,7 +46,7 @@
{
"slug": "media-conversion",
"label": "Media conversion",
- "blurb": "Turn an uploaded video or audio file into one every browser plays, and serve it from your app."
+ "blurb": "Turn an uploaded video or audio file into files for browser playback, and serve them from your app."
},
{
"slug": "scan-callbacks",
diff --git a/docs/superpowers/notes/LUNA-DOCS-BRIEF-media-conversion.md b/docs/superpowers/notes/LUNA-DOCS-BRIEF-media-conversion.md
new file mode 100644
index 000000000..dec76dbf7
--- /dev/null
+++ b/docs/superpowers/notes/LUNA-DOCS-BRIEF-media-conversion.md
@@ -0,0 +1,10 @@
+# Docs and copy pass 5: media conversion page
+
+You are the copy-review gate itself for this set. Paul delegated copy review of platform UI, CLI, email and docs copy inside a plan to you on 2026-10-25; your verdicts ARE the review. Do NOT run the copy-review skill or start any server. You are writing a review report.
+
+Read `docs/superpowers/notes/LUNA-COPY-BRIEF-media-conversion.md` for the feature and Paul's house rules, and `docs/superpowers/specs/2026-11-16-video-conversion-design.md` (§5, §7, §11 A1-A4) to check facts. Then review:
+
+1. Every row under "Pending Luna docs pass" in `docs/superpowers/notes/media-conversion-copy-deck.md` (the docs.media.* rows and the plans.md sentence). Readers are app builders and operators. Plain, direct, no em dashes, no filler, no marketing tone, neutral examples (`shop`, `shop.example.com`). Flag any statement the spec contradicts or that promises more than the spec (for example exact figures marked provisional).
+2. Two already-approved rows that turned out factually wrong: `media.job.engine_unavailable` and `media.job.engine_lost` say "upload the file again to try once more", but the job id is derived from the key, the object's ETag, the preset and the class, so the same bytes uploaded to the same key map to the same failed job. Propose corrected text that tells the developer what actually works (uploading under a new key), keeping the voice of the other `media.job.*` rows (lower case, no trailing full stop).
+
+Return a table `key | new | why` with only rows you change (unchanged rows are approved), then `## Flags` with facts you could not verify or Paul must decide, or "none".
diff --git a/docs/superpowers/notes/LUNA-DOCS-RESULT-media-conversion.md b/docs/superpowers/notes/LUNA-DOCS-RESULT-media-conversion.md
new file mode 100644
index 000000000..8e05bfb0d
--- /dev/null
+++ b/docs/superpowers/notes/LUNA-DOCS-RESULT-media-conversion.md
@@ -0,0 +1,16 @@
+| key | new | why |
+|---|---|---|
+| `docs.media.nav_blurb` | Turn an uploaded video or audio file into files for browser playback, and serve them from your app. | “Every browser plays” overpromises compatibility. |
+| `docs.media.intro.2` | Replace “turns it into a file every browser plays” with “produces files for browser playback” | Same compatibility issue. |
+| `docs.media.what.2` | Say “an H.264 video, with AAC sound when the source has audio” | The spec permits video output without audio. |
+| `docs.media.what.6` | Remove “at an even loudness”: “makes one AAC file. It raises or lowers the volume as a whole and never compresses the dynamics.” | The spec applies one gain, but peak limits can leave quiet sources below the loudness target. |
+| `docs.media.example.6` | `With your console at [https://shop.example.com](https://shop.example.com), step 2 is:` | `example.com` is not the required neutral example. |
+| `docs.media.allowance.3` | A done job is charged for the length of its source. A failed job is charged for the engine time it used, or the full reserved time if the engine loses the task record. A job that never starts is uncharged. While a job runs, the most it could cost is held against the allowance. | Lost-task jobs are charged their full bound, not measured engine time. |
+| `docs.media.uploads.8` | The current design assumes a single presigned `PUT` carries up to 5 GB. Above that, the upload must be multipart, and for anything over a few hundred megabytes from a phone it should be: | The spec marks the 5 GB figure unverified. |
+| `media.job.engine_unavailable` | `the conversion engine could not start. upload the file under a new key to try again` | Re-uploading to the same key returns the same job. |
+| `media.job.engine_lost` | `the conversion engine lost track of this job. upload the file under a new key to try again` | A new key is required to derive a new job id. |
+
+## Flags
+
+- The 5 GB single-upload limit is marked unverified in spec §5.6. Keep the qualification until the spike confirms it.
+- The plan allowance values are proposed starting points, not live catalog values. Keep “As a starting point” and do not present them as final.
\ No newline at end of file
diff --git a/docs/superpowers/notes/media-conversion-copy-deck.md b/docs/superpowers/notes/media-conversion-copy-deck.md
index dbe9b8e58..5414d8bc7 100644
--- a/docs/superpowers/notes/media-conversion-copy-deck.md
+++ b/docs/superpowers/notes/media-conversion-copy-deck.md
@@ -104,8 +104,8 @@ marked "door copy" reuse the door's message for the same code.
| `media.job.grant_expired` | `the conversion ran past its one-hour window` |
| `media.job.deadline_exceeded` | `the conversion took longer than its time limit and was stopped` |
| `media.job.engine_failed` | `the conversion engine failed on this file. ask this deployment's operator` |
-| `media.job.engine_unavailable` | `the conversion engine could not start. upload the file again to try once more` |
-| `media.job.engine_lost` | `the conversion engine lost track of this job. upload the file again to try once more` |
+| `media.job.engine_unavailable` | `the conversion engine could not start. upload the file under a new key to try again` |
+| `media.job.engine_lost` | `the conversion engine lost track of this job. upload the file under a new key to try again` |
| `media.job.store_changed` | `the store was replaced while this job waited. submit it again` |
| `media.job.store_writes_denied` | door copy (`media.store_writes_denied`) |
@@ -401,7 +401,20 @@ author's proposal.
A failed job under `--wait` prints the deck's lines and exits 1 with no
extra message.
-## Pending Luna docs pass (Task 11)
+## Luna docs pass (Task 11), approved
+
+**Approved 2026-11-17** by the Luna docs pass (brief
+`LUNA-DOCS-BRIEF-media-conversion.md`, result
+`LUNA-DOCS-RESULT-media-conversion.md`): nine rows changed and applied
+verbatim, with two controller overrides. `docs.media.example.6` names the
+console as `https://console.example.com` instead of Luna's
+`https://shop.example.com`, because the console is not the app's host.
+`docs.media.uploads.8` keeps the original "One presigned `PUT` carries
+up to 5 GB", because that limit is AWS-documented. Two of Luna's rows
+change approved job messages, `media.job.engine_unavailable` and
+`media.job.engine_lost` ("upload the file under a new key to try
+again"), in the job table above and in `media_copy.go`. Per Luna's flag,
+the plan values keep "As a starting point".
The media page, `docs/site/media-conversion.md`, is written from the
`docs.media.*` rows below, one row per heading, paragraph, list item and
@@ -415,15 +428,15 @@ row is applied to the page verbatim.
| Key | Text |
|---|---|
-| `docs.media.nav_blurb` | Turn an uploaded video or audio file into one every browser plays, and serve it from your app. |
+| `docs.media.nav_blurb` | Turn an uploaded video or audio file into files for browser playback, and serve them from your app. |
| `docs.media.intro.1` | # Media conversion |
-| `docs.media.intro.2` | A phone hands your app a video that won't play everywhere: HEVC in a `.mov`, 4K at 60 frames a second, turned on its side. Media conversion turns it into a file every browser plays. Your app uploads the original to its own store, asks the console to convert it, and checks back until the job is done. The converted files land in the same store, and your app serves them like any other object. |
+| `docs.media.intro.2` | A phone hands your app a video that won't play everywhere: HEVC in a `.mov`, 4K at 60 frames a second, turned on its side. Media conversion produces files for browser playback. Your app uploads the original to its own store, asks the console to convert it, and checks back until the job is done. The converted files land in the same store, and your app serves them like any other object. |
| `docs.media.what.1` | ## What you get |
-| `docs.media.what.2` | `video-720p` is the default. It makes an H.264 video with AAC sound, at most 1280 by 720 in either orientation and 30 frames a second. It never scales a video up, it applies the rotation, and it converts HDR to standard range. You get three files: |
+| `docs.media.what.2` | `video-720p` is the default. It makes an H.264 video, with AAC sound when the source has audio, at most 1280 by 720 in either orientation and 30 frames a second. It never scales a video up, it applies the rotation, and it converts HDR to standard range. You get three files: |
| `docs.media.what.3` | - `video.mp4`, the video. It plays progressively with `Range` requests. |
| `docs.media.what.4` | - `video.m3u8`, an HLS playlist over that same file, for players that want a stream. |
| `docs.media.what.5` | - `poster.jpg`, a still from one second in, or from the middle of a shorter clip. |
-| `docs.media.what.6` | `audio-aac` takes an audio file, or the first audio track of a video, and makes one AAC file at an even loudness. It raises or lowers the volume as a whole and never compresses the dynamics. You get `audio.mp4`, its playlist `audio.m3u8`, and `peaks.json`, a waveform of 1,000 peaks from 0 to 255 with the duration: |
+| `docs.media.what.6` | `audio-aac` takes an audio file, or the first audio track of a video, and makes one AAC file. It raises or lowers the volume as a whole and never compresses the dynamics. You get `audio.mp4`, its playlist `audio.m3u8`, and `peaks.json`, a waveform of 1,000 peaks from 0 to 255 with the duration: |
| `docs.media.what.7` | (code: json fence, not copy) |
| `docs.media.what.8` | Both presets drop the original's metadata, location included. |
| `docs.media.what.9` | Conversion reads MP4, MOV, 3GP, WebM and MKV, and for audio also MP3, WAV, FLAC and Ogg. It can't convert encrypted media. If your app encrypts files on the device before uploading them, convert them on the device first. |
@@ -432,7 +445,7 @@ row is applied to the page verbatim.
| `docs.media.example.3` | (code: text fence, not copy) |
| `docs.media.example.4` | Replace `<secret>` with the secret the second command prints. If your app already has a Service credential for PDFs or scanning, use that one. `$CARLOS_CONSOLE` is your console's origin and `<account>` is your account ID. |
| `docs.media.example.5` | Your app presigns the upload with its S3 library and the store credentials the platform gives it: `CARLOS_STORE_BUCKET`, `CARLOS_STORE_REGION`, `CARLOS_STORE_ACCESS_KEY` and `CARLOS_STORE_SECRET_KEY`. For a large file, use a multipart upload instead (see [Uploads from a browser](/docs/media-conversion#uploads-from-a-browser)). |
-| `docs.media.example.6` | With your console at [https://example.com](https://example.com), step 2 is: |
+| `docs.media.example.6` | With your console at [https://console.example.com](https://console.example.com), step 2 is: |
| `docs.media.example.7` | (code: sh fence, not copy) |
| `docs.media.example.8` | Step 3 is a `GET` of `/api/cli/apps/{account}/shop/media/conversions/<id>` with the same header. When the job is done, the answer looks like this: |
| `docs.media.example.9` | (code: json fence, not copy) |
@@ -484,7 +497,7 @@ row is applied to the page verbatim.
| `docs.media.limits.13` | Fair use applies on every deployment. By default an account can have 20 conversions waiting or running, and send 30 a minute with bursts of 10. An account runs up to 2 short jobs and 1 long job at once, and the rest wait their turn. The deployment holds at most 200 waiting jobs. Your operator can change these numbers. |
| `docs.media.allowance.1` | ### The allowance |
| `docs.media.allowance.2` | Your deployment can give your account a monthly allowance of media minutes, shared by its apps. Where billing is on, the account's Billing page shows the allowance and how much you've used. A minute of video counts as 1 media minute and a minute of audio as 0.1, so 10 minutes of audio is 1 media minute. |
-| `docs.media.allowance.3` | A done job is charged for the length of its source. A failed job is charged for the engine time it used, at the same rates, which is nothing if it never started. While a job runs, the most it could cost is held against the allowance. |
+| `docs.media.allowance.3` | A done job is charged for the length of its source. A failed job is charged for the engine time it used, or the full reserved time if the engine loses the task record. A job that never starts is uncharged. While a job runs, the most it could cost is held against the allowance. |
| `docs.media.allowance.4` | As with other monthly limits, the account's owners get a warning at 80% of the limit. At twice the monthly limit, new conversions are refused with `402` until the 1st of the UTC month, or until the account buys a media pack or moves to a larger plan. A job can also fail `allowance_exceeded` when what's left of the allowance won't cover the file. See [Plans](/docs/plans). |
| `docs.media.residency.1` | ## Where conversion runs |
| `docs.media.residency.2` | Conversion runs in your store's region: the engine reads the source from your store and writes the outputs back to it there. A store in a region with no conversion engine is refused with `no_engine_in_region`. It is never converted somewhere else. |
diff --git a/internal/console/media_copy.go b/internal/console/media_copy.go
index c9d724f9f..6597303c6 100644
--- a/internal/console/media_copy.go
+++ b/internal/console/media_copy.go
@@ -75,8 +75,8 @@ var mediaCopy = map[string]string{
"media.job.grant_expired": "the conversion ran past its one-hour window",
"media.job.deadline_exceeded": "the conversion took longer than its time limit and was stopped",
"media.job.engine_failed": "the conversion engine failed on this file. ask this deployment's operator",
- "media.job.engine_unavailable": "the conversion engine could not start. upload the file again to try once more",
- "media.job.engine_lost": "the conversion engine lost track of this job. upload the file again to try once more",
+ "media.job.engine_unavailable": "the conversion engine could not start. upload the file under a new key to try again",
+ "media.job.engine_lost": "the conversion engine lost track of this job. upload the file under a new key to try again",
"media.job.store_changed": "the store was replaced while this job waited. submit it again",
// Store teardown (browser): a store destroy, an app purge or a seed