carlos / platform Public

docs: media copy deck, Luna pass 5 approves the remaining rows

Luna pass 5 reviewed the 160 rows still pending: the engine binary's
log lines, mediaimage, the rollout checks and endpoint drill script, the
AWS adapter diagnostics, the console's boot, retry and cancelled-launch
lines (a new deck row for spec A5), the infra refusals and the reaper,
and, in a docs pass, the media-engine, modules, image and region-host
READMEs and variable descriptions.

Applied verbatim: engine.encode.failed_unlogged,
engine.selftest.reason.tls, image.base.refused, engine.aws.rejected (now
lists the retryable form), and six docs passages. Three flags were facts,
settled in the deck against the code; the no_credentials gap is a
follow-up. The image README's weekly-lock paragraph waits for Paul.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 461f35346cc9318ba6e07c28e3bf1ea92aeddf91 parent 5dbedef
31 files changed, +333 −233
  • cmd/carlos-media/drill.go +3 −3
  • cmd/carlos-media/drill_linux.go +2 −2
  • cmd/carlos-media/drill_other.go +1 −1
  • cmd/carlos-media/main.go +2 −2
  • cmd/mediaimage/oci.go +1 −1
  • deploy/media-image/README.md +1 −1
  • docs/superpowers/notes/LUNA-COPY-BRIEF-media-conversion-5.md +30 −0
  • docs/superpowers/notes/LUNA-COPY-RESULT-media-conversion-5.md +14 −0
  • docs/superpowers/notes/LUNA-DOCS-BRIEF-media-conversion-5.md +22 −0
  • docs/superpowers/notes/LUNA-DOCS-RESULT-media-conversion-5.md +14 −0
  • docs/superpowers/notes/media-conversion-copy-deck.md +177 −161
  • docs/superpowers/notes/media-conversion-followups.md +1 −0
  • infra/modules/README.md +1 −1
  • infra/modules/media-engine/README.md +6 −3
  • infra/modules/region-host/README.md +1 −1
  • infra/modules/region-host/variables.tf +2 −2
  • internal/console/mediapass.go +1 −1
  • internal/mediahandler/download.go +2 −2
  • internal/mediahandler/ffmpeg.go +5 −5
  • internal/mediahandler/loudness.go +4 −4
  • internal/mediahandler/peaks.go +1 −1
  • internal/mediahandler/playlist.go +2 −2
  • internal/mediahandler/probe.go +6 −6
  • internal/mediahandler/procs_linux.go +1 −1
  • internal/mediahandler/procs_other.go +1 −1
  • internal/mediahandler/result.go +2 −2
  • internal/mediahandler/run.go +11 −11
  • internal/mediahandler/selftest.go +3 −3
  • internal/mediahandler/selftesttls.go +3 −3
  • internal/mediahandler/selftesttls_test.go +2 −2
  • internal/mediahandler/upload.go +11 −11

CI failed — run details

diff --git a/cmd/carlos-media/drill.go b/cmd/carlos-media/drill.go
index ce275921b..3a6691ec0 100644
--- a/cmd/carlos-media/drill.go
+++ b/cmd/carlos-media/drill.go
@@ -29,7 +29,7 @@ import (
// that need Linux (signals to every process, a child subreaper, a full
// scratch), which drill_other.go refuses elsewhere (preflight F23).
-// drillUsage is copy deck row engine.drill.usage (pending Luna pass).
+// drillUsage is copy deck row engine.drill.usage (approved, Luna pass 5).
const drillUsage = "usage: carlos-media drill <creds|dns|net <address>…|endpoints|endpoints-verdict <A> <B> <C>|hostile-timer|fill-scratch|many-files|bad-outputs>"
// DrillEnv names the endpoint drill's input (the run directory's
@@ -412,7 +412,7 @@ func drillEndpoints(ctx context.Context, env drillEnv, stdout, stderr io.Writer)
os.Unsetenv(drillInputEnv)
in, ok := parseEndpointInput(raw)
if !ok {
- // engine.drill.endpoints.input (pending Luna pass).
+ // engine.drill.endpoints.input (approved, Luna pass 5).
fmt.Fprintln(stderr, "drill endpoints: "+drillInputEnv+" does not hold the drill's input")
return 1
}
@@ -536,7 +536,7 @@ func endpointsVerdict(files []string, stdout io.Writer) int {
for i, p := range phases {
cells[p] = readPass(files[i])
}
- // engine.drill.verdict.* (pending Luna pass).
+ // engine.drill.verdict.* (approved, Luna pass 5).
fmt.Fprintf(stdout, "%-12s %-14s %-14s %-14s\n", "endpoint", "A (saved)", "B (open)", "C (restored)")
for _, e := range endpointNames {
fmt.Fprintf(stdout, "%-12s %-14s %-14s %-14s\n", e, cells["A"][e], cells["B"][e], cells["C"][e])
diff --git a/cmd/carlos-media/drill_linux.go b/cmd/carlos-media/drill_linux.go
index 630358427..57512abbe 100644
--- a/cmd/carlos-media/drill_linux.go
+++ b/cmd/carlos-media/drill_linux.go
@@ -166,7 +166,7 @@ func realTimerOS() timerOS {
// rounds channel closes (tests), or it refuses.
func hostileTimer(o timerOS, stdout io.Writer) int {
if o.getpid() != 1 {
- // engine.drill.hostile_timer.refused (pending Luna pass).
+ // engine.drill.hostile_timer.refused (approved, Luna pass 5).
fmt.Fprintln(stdout, "FAIL hostile-timer: not PID 1 of its own PID namespace; refusing to signal every process")
return 1
}
@@ -182,7 +182,7 @@ func hostileTimer(o timerOS, stdout io.Writer) int {
return n
}
n := killAll()
- // engine.drill.hostile_timer.running (pending Luna pass).
+ // engine.drill.hostile_timer.running (approved, Luna pass 5).
fmt.Fprintf(stdout, "hostile-timer: ignoring SIGTERM and SIGINT; sent SIGKILL to %d other processes and to -1; repeating until the deadline ends the task\n", n)
for range o.rounds() {
killAll()
diff --git a/cmd/carlos-media/drill_other.go b/cmd/carlos-media/drill_other.go
index aba68eb9d..e5ee52332 100644
--- a/cmd/carlos-media/drill_other.go
+++ b/cmd/carlos-media/drill_other.go
@@ -17,7 +17,7 @@ func linuxDrill(_ context.Context, name string, rest []string, r *report, _ io.W
if len(rest) != 0 {
return 0, false
}
- // engine.drill.unsupported (pending Luna pass).
+ // engine.drill.unsupported (approved, Luna pass 5).
r.fail(name, "unsupported on this system")
return r.exit(), true
}
diff --git a/cmd/carlos-media/main.go b/cmd/carlos-media/main.go
index 0222f69cf..1443372f2 100644
--- a/cmd/carlos-media/main.go
+++ b/cmd/carlos-media/main.go
@@ -43,7 +43,7 @@ import (
// exitUsage is the exit for an unknown command or none.
const exitUsage = 2
-// usageLine is copy deck row engine.usage (pending Luna pass).
+// usageLine is copy deck row engine.usage (approved, Luna pass 5).
const usageLine = "usage: carlos-media <deadline|codec|selftest|drill|version>"
func main() {
@@ -146,7 +146,7 @@ var harden = notDumpable
// hardened makes the process non-dumpable before it reads a payload,
// a drill input or anything a child could steal, and reports whether it
// could. A process it could not harden stops: copy deck row
-// engine.harden.failed (pending Luna pass).
+// engine.harden.failed (approved, Luna pass 5).
func hardened(stderr io.Writer) bool {
if err := harden(); err != nil {
fmt.Fprintf(stderr, "carlos-media: cannot make the process non-dumpable: %v\n", err)
diff --git a/cmd/mediaimage/oci.go b/cmd/mediaimage/oci.go
index 5581784db..52a7a713a 100644
--- a/cmd/mediaimage/oci.go
+++ b/cmd/mediaimage/oci.go
@@ -509,7 +509,7 @@ func loadBase(ctx context.Context, store blobStore, ref imageRef) (baseImage, er
return baseImage{}, fmt.Errorf("%w: %w", errBadBase, err)
}
if base.Config.Architecture != "arm64" || base.Config.OS != "linux" {
- return baseImage{}, fmt.Errorf("%w: the image is %s/%s", errBadBase, base.Config.OS, base.Config.Architecture)
+ return baseImage{}, fmt.Errorf("%w: the image is %s/%s, want linux/arm64", errBadBase, base.Config.OS, base.Config.Architecture)
}
if len(base.Config.RootFS.DiffIDs) != len(base.Manifest.Layers) {
return baseImage{}, fmt.Errorf("%w: %d layers and %d diff ids", errBadBase, len(base.Manifest.Layers), len(base.Config.RootFS.DiffIDs))
diff --git a/deploy/media-image/README.md b/deploy/media-image/README.md
index 1d6b70768..73aaa0aef 100644
--- a/deploy/media-image/README.md
+++ b/deploy/media-image/README.md
@@ -44,7 +44,7 @@ Applying that change is a production infrastructure change, so it needs the usua
## Roll back
-Set the three values back to the previous image’s and apply.
+Set the three values back to the previous image’s values and apply.
## Refresh the packages
diff --git a/docs/superpowers/notes/LUNA-COPY-BRIEF-media-conversion-5.md b/docs/superpowers/notes/LUNA-COPY-BRIEF-media-conversion-5.md
new file mode 100644
index 000000000..d12d8fce4
--- /dev/null
+++ b/docs/superpowers/notes/LUNA-COPY-BRIEF-media-conversion-5.md
@@ -0,0 +1,30 @@
+# Copy pass 5: media conversion, operator strings (plan 3 and the branch review)
+
+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.
+
+Same feature, house rules and rulings as `docs/superpowers/notes/LUNA-COPY-BRIEF-media-conversion.md` (read it). The spec is `docs/superpowers/specs/2026-11-16-video-conversion-design.md` (plan 3's engine, §11 A1-A6) if a fact needs checking; the code is in the tree and you may read it.
+
+In `docs/superpowers/notes/media-conversion-copy-deck.md`, review ONLY the rows marked "(pending Luna pass ...)" in the tables listed below. Every string has been checked against the code at this commit. The README, `description` and README-section rows (`image.readme`, `infra.media_engine.readme*`, `infra.modules_readme.media_engine`, `infra.media_engine.descriptions`, `infra.region_host.readme.*`, `infra.region_host.*.description`) are in the docs pass, not this one; skip them.
+
+Readers are the deployment's operator and whoever builds and rolls the engine, reading a task's log, a terminal or a plan's output. Nobody's app shows these strings to an end user.
+
+## The rows, in five groups
+
+1. **The engine binary** ("The engine binary (plan 3)"): `engine.usage` and every `engine.codec.*`, `engine.download.*`, `engine.probe.*`, `engine.child.*`, `engine.encode.*`, `engine.loudness.*`, `engine.version.*`, `engine.collect.*`, `engine.upload.*` and `engine.result.*` row. These are a Fargate task's log lines.
+2. **The image tool** ("Image tool: `mediaimage`"): every `image.*` row except `image.readme`. Stderr of a release tool, including its flag help.
+3. **Rollout checks** ("Rollout checks: `selftest`, `drill` and the endpoint drill script"): every `engine.selftest.*`, `engine.drill.*`, `engine.harden.failed`, `engine.loudness.reason.lra` and `script.endpoint_drill.*` row.
+4. **AWS adapter and console log** ("AWS adapter diagnostics"): every `engine.aws.*` row, the three boot and retry lines `console.media.off_at_boot`, `console.media.on_after_retry` and `console.media.retry_refused`, and the new `console.media.launch_cancelled` (spec A5).
+5. **Infra refusals and the reaper**: `infra.media_engine.refused.*` (and every `error_message` in `infra/modules/media-engine/variables.tf`, which `infra.media_engine.refused.variables` names), `engine.reaper.*`, and the `infra.region_host.store_conversion.refused*` and `infra.region_host.managed_fleets.refused_*` rows.
+
+## Rules for this set, on top of pass 1's house rules
+
+- Log and CLI lines: lower case after any prefix, no trailing full stop, as the rows already are. Plan-time refusals (`error_message`) are whole sentences ending with a full stop; keep each one's opening word as it is (some start with a variable name).
+- Keep every prefix as it is: `codec:`, `mediaimage:`, `carlos-media:`, `media:`, `media jobs:`, `console:`, `media-endpoint-drill:`, `hostile child:`, `carlos media reaper:`, `usage:`, and the category prefixes before a colon (`bad lock file:`, `bad deb:`, `sha256 mismatch:`, `push refused:` and the like); tests and operators match on them.
+- Scripts and tests read these words, so leave them exactly: `PASS`, `FAIL`, `ok`, `refused`, `missing`, `malformed`, `cleaned`, `NOT CLEANED`, the selftest case names, the endpoint names (`s3`, `ecr-api`, `ecr-docker`, `logs`), the drill subcommand names, the phase letters A, B and C, and the column layout of the `engine.drill.verdict` table head.
+- Not copy, leave them: ECS's own reason words in `engine.aws.failure.known` (`MISSING`, `RESOURCE:CPU` and so on; only `RESOURCE (a resource this console does not name)` and `Capacity is unavailable` are ours), AWS operation names (`ecs RunTask`, `sts AssumeRole`), API and error codes, job codes, file names, flag names, environment variable and OpenTofu variable names, `ENOSPC`, `EDQUOT`, `SIGKILL`, `SIGTERM`.
+- Keep every placeholder (`%s`, `%d`, `%q`, `%v`, `%T`, `%.1f`, `%.2f`, `%t`) in the same order and count. Placeholders are never filled with a URL, a header, a credential or a payload value; don't add wording that would need one.
+- Change a row only when the change helps an operator act: a sentence that misleads, can't be parsed, contradicts its sibling, or doesn't say what to do when the reader can do something. Consistency across a group matters more than polish on one line. Don't rewrite for taste.
+
+## What to return
+
+A table `key | new | why`, with only the rows you change. Where a row holds several strings, give the full new text of each string you change, in the row's own form, and say in "why" which string it replaces. Unchanged rows are approved as they are. Then `## Flags` with only what Paul must decide or a fact you could not verify against the code or spec, each with your recommendation, or "none".
diff --git a/docs/superpowers/notes/LUNA-COPY-RESULT-media-conversion-5.md b/docs/superpowers/notes/LUNA-COPY-RESULT-media-conversion-5.md
new file mode 100644
index 000000000..e4ae3d8df
--- /dev/null
+++ b/docs/superpowers/notes/LUNA-COPY-RESULT-media-conversion-5.md
@@ -0,0 +1,14 @@
+Review report. No files modified.
+
+| key | new | why |
+|---|---|---|
+| `engine.encode.failed_unlogged` | `codec: ffmpeg (%s) failed; its diagnostics are not logged` | “Its output” can be read as the converted file. This identifies the missing data as diagnostics. |
+| `engine.selftest.reason.tls` | `no root trusted by this binary can verify S3's certificate` | The current wording is difficult to parse. |
+| `image.base.refused` | `bad base image: the image is %s/%s, want linux/arm64` | Tells the operator which platform the image must use. |
+| `engine.aws.rejected` | `engine rejected the launch: %s`; `engine rejected the launch (retryable): %s` | Includes the retryable form emitted by `media.Rejected.Error()`. |
+
+## Flags
+
+- `image.http`: `%s` is filled with a full URL by the current code, violating the brief’s no-URL rule. Recommendation: sanitize the operation before approving this row.
+- `engine.aws.cause.no_credentials`: the current adapter converts this case to the generic request-failure text, so this row is not emitted. Recommendation: preserve the safe cause or remove the row.
+- `console.media.retry_refused`: `%v` can include account IDs and bucket-prefix values, despite the deck saying it names only the setting. Recommendation: sanitize the configuration error before logging it.
\ No newline at end of file
diff --git a/docs/superpowers/notes/LUNA-DOCS-BRIEF-media-conversion-5.md b/docs/superpowers/notes/LUNA-DOCS-BRIEF-media-conversion-5.md
new file mode 100644
index 000000000..2e57c523a
--- /dev/null
+++ b/docs/superpowers/notes/LUNA-DOCS-BRIEF-media-conversion-5.md
@@ -0,0 +1,22 @@
+# Docs pass 5: media conversion, the engine's READMEs and variable descriptions
+
+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. Check facts against the code beside each file (the `.tf` files of the module, `cmd/mediaimage`, `scripts/media-endpoint-drill.sh`) and `docs/superpowers/specs/2026-11-16-video-conversion-design.md` (plan 3's engine, §11 A1-A6).
+
+Readers are the operators who deploy the platform: they build the engine image, apply the OpenTofu modules and roll them out. Plain, direct, no em or en dashes, no filler, no marketing tone. These files use curly quotes and apostrophes in prose (keep them); code, paths, commands and variable names stay as they are. Neutral examples only (`carlos-example-…`, `shop`); never a customer name.
+
+Review ONLY these passages, the deck rows in `docs/superpowers/notes/media-conversion-copy-deck.md` marked "(pending Luna pass ...)":
+
+1. `image.readme`: the whole of `deploy/media-image/README.md`.
+2. `infra.media_engine.readme`, `infra.media_engine.readme.rollout`, `infra.media_engine.readme.transfers_gate` and `infra.media_engine.readme.console_policy`: the whole of `infra/modules/media-engine/README.md`.
+3. `infra.modules_readme.media_engine`: the `## media-engine` section of `infra/modules/README.md`.
+4. `infra.media_engine.descriptions`: every variable and output `description` in `infra/modules/media-engine/variables.tf` and `outputs.tf`. (Their `error_message`s are in the copy pass, not this one.)
+5. `infra.region_host.readme.store_conversion` and `infra.region_host.readme.managed_fleets_move`: the `## Media conversion and browser uploads` and `## Moving the managed fleet grant` sections of `infra/modules/region-host/README.md`.
+6. `infra.region_host.store_conversion.description` and `infra.region_host.managed_fleets_inline_retired.description`: the `description` of `variable "store_conversion"` and of `variable "managed_fleets_inline_retired"` in `infra/modules/region-host/variables.tf`.
+
+Change a passage when it is wrong against the code or spec, when an operator could misread a step, or when it is hard to follow. Don't rewrite for taste.
+
+## What to return
+
+A table `key | new | why`, with only the passages you change. In `new`, write the file, then the exact current text you replace and its replacement: `file: “<exact current text>” → “<new text>”`, so it can be applied verbatim (keep the current text exact, including its curly quotes and backticks; a sentence or paragraph is enough, not the whole file). Unchanged passages are approved as they are. Then `## Flags` with facts you could not verify or Paul must decide, each with your recommendation, or "none".
diff --git a/docs/superpowers/notes/LUNA-DOCS-RESULT-media-conversion-5.md b/docs/superpowers/notes/LUNA-DOCS-RESULT-media-conversion-5.md
new file mode 100644
index 000000000..819203810
--- /dev/null
+++ b/docs/superpowers/notes/LUNA-DOCS-RESULT-media-conversion-5.md
@@ -0,0 +1,14 @@
+No files were modified.
+
+| key | new | why |
+|---|---|---|
+| `infra.modules_readme.media_engine` | `infra/modules/README.md`: “Apply it once to create the repository, push the image, then apply again with the image's digest.” → “Apply it once to create the repository, push the image, then apply again with the image's \`digest\`, \`built_at\` and \`ffmpeg\` values from \`image.json\`.” | All three values are required when `image_digest` is set. |
+| `infra.media_engine.readme` | `infra/modules/media-engine/README.md`: “Set the console’s \`CARLOS_MEDIA_ENGINE\` to the \`carlos_media_engine\` output and restart the console. The console also needs \`CARLOS_STORE_CONVERSION=1\` and a store backend in the engine’s region, account and bucket prefix. While \`CARLOS_MEDIA_ENGINE\` is unset, the media API answers 503.” → “Set the console’s \`CARLOS_MEDIA_ENGINE\` to the \`carlos_media_engine\` output and restart the console. If the cloud does not answer during that boot, conversion stays off. The console retries the wiring in the background and turns conversion on when the cloud answers. The console also needs \`CARLOS_STORE_CONVERSION=1\` and a store backend in the engine’s region, account and bucket prefix. While \`CARLOS_MEDIA_ENGINE\` is unset, the conversion API answers 503.” | Documents A6’s background retry and distinguishes conversion from browser-upload APIs. |
+| `infra.media_engine.readme` | `deploy/media-image/README.md`: “Set the three values back to the previous image’s and apply.” → “Set the three values back to the previous image’s values and apply.” | Removes an incomplete possessive phrase. |
+| `infra.region_host.readme.managed_fleets_move` | `infra/modules/region-host/README.md`: “1. Upgrade and apply with \`managed_fleets_inline_retired\` left at \`false\`. The role keeps its inline copy and gains the managed one.” → “1. Upgrade and apply with \`managed_fleets_inline_retired\` left at \`false\`. If the grant fits IAM’s 6,144-character customer-managed policy limit, the role keeps its inline copy and gains the managed one. If it does not fit, the module keeps the inline copy and refuses step 2 until the grant fits.” | The module does not create the managed policy when the grant exceeds 6,144 characters. |
+| `infra.region_host.store_conversion.description` | `infra/modules/region-host/variables.tf`: “Let this host's role check and set the bucket settings media conversion and browser uploads rely on, for buckets under store_bucket_prefix, and let store users list and abort their multipart uploads. Off by default: the role gets no new grant and the store user boundary does not change. Set it only on the box that runs the console, together with CARLOS_STORE_CONVERSION=1 on the console. Requires a dedicated store_bucket_prefix ending in -store-, such as carlos-store-, that none of the deployment, data or sibling staging buckets start with.” → “Let this host's role check and set the bucket settings media conversion and browser uploads rely on, for buckets under store_bucket_prefix, and let store users list and abort their multipart uploads. Off by default: the role gets no new grant and the store user boundary does not change. Set it only on the box that runs the console, together with CARLOS_STORE_CONVERSION=1 on the console. Requires a dedicated store_bucket_prefix ending in -store-, such as carlos-store-, that none of the deployment, data or sibling staging buckets start with and that does not overlap managed_fleet_bucket_prefix. With managed fleets on, managed_fleets_inline_retired must be true.” | Adds two enforced prerequisites documented in the README and plan-time checks. |
+| `infra.region_host.managed_fleets_inline_retired.description` | `infra/modules/region-host/variables.tf`: “Temporary, for moving the managed fleet grant to a customer-managed policy without a gap. Leave it false for the first apply after upgrading: the role keeps its inline copy of the grant and gains the managed one. Then set it true and apply again to remove the inline copy. store_conversion with managed fleets on requires it to be true. This variable goes once every root has set it.” → “Temporary, for moving the managed fleet grant to a customer-managed policy without a gap. Leave it false for the first apply after upgrading: the role keeps its inline copy and gains the managed one when the grant fits IAM's 6,144-character customer-managed policy limit. If the grant is too large, the module keeps the inline copy and refuses setting it true until the grant fits. Then set it true and apply again to remove the inline copy. store_conversion with managed fleets on requires it to be true. This variable goes once every root has set it.” | Prevents operators from assuming the managed copy is created for oversized grants. |
+
+## Flags
+
+- The weekly package-lock job owner is unresolved in the code and approved spec. Recommend choosing either an amadan schedule or a Paseo schedule before the first release.
\ 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 0778775c6..a05ffc701 100644
--- a/docs/superpowers/notes/media-conversion-copy-deck.md
+++ b/docs/superpowers/notes/media-conversion-copy-deck.md
@@ -158,7 +158,7 @@ because its plan values reach `12,000`.
| `system_media.forbidden` (403) | `media status needs a deployment operator (CARLOS_SYSTEM_OPERATORS or CARLOS_STORE_OPERATORS)` (approved, Luna pass 2) |
| `cli.system_media.check_error` | `check %-17s could not be read (%s), so these jobs wait` (approved, Luna pass 2) |
-The two `email.` rows (added in Task 6 fix round 1, pending a Luna pass)
+The two `email.` rows (added in Task 6 fix round 1, approved in Luna pass 2)
are the owners' notice email lines for the same two states. Without them
the email fell back to the generic `email.over`, "Nothing changes until",
while the door already refuses at twice the allowance. They are the
@@ -524,6 +524,21 @@ carries them yet (plan 3 writes it); the pack's price is left out.
## The engine binary (plan 3)
+**Approved 2026-11-19** by Luna pass 5, every row from here to the end of
+this file (briefs `LUNA-COPY-BRIEF-media-conversion-5.md` and
+`LUNA-DOCS-BRIEF-media-conversion-5.md`, results
+`LUNA-COPY-RESULT-media-conversion-5.md` and
+`LUNA-DOCS-RESULT-media-conversion-5.md`). Changed and applied verbatim:
+`engine.encode.failed_unlogged`, `engine.selftest.reason.tls`,
+`image.base.refused` and `engine.aws.rejected` (which now lists the
+retryable form the code already printed); in the docs, the media-engine
+and modules READMEs, the image README, the region-host fleet move section
+and the two region-host `description`s. Three flags were facts, settled
+against the code in the rows: `image.http`'s `GET %s`,
+`engine.aws.cause.no_credentials` (a follow-up) and
+`console.media.retry_refused`'s `%v`. One paragraph of `image.readme`
+waits for Paul.
+
Operator-facing text from `cmd/carlos-media`, the engine image's one
binary. The usage line reaches a task's log only when the binary is
started wrongly; the `codec` lines are the task's log, and never carry a
@@ -532,68 +547,68 @@ prints nothing.
| Key | Text |
|---|---|
-| `engine.usage` | `usage: carlos-media <deadline\|codec\|selftest\|drill\|version>` (pending Luna pass; plan 3 Task 1) |
-| `engine.codec.payload_refused` | `codec: payload refused: %s` (pending Luna pass; plan 3 Task 2). `%s` is one of `engine.codec.payload.*`, never a value from the payload |
-| `engine.codec.payload.none` | `no payload` (pending Luna pass; plan 3 Task 2) |
-| `engine.codec.payload.too_long` | `payload is over the override limit` (pending Luna pass; plan 3 Task 2) |
-| `engine.codec.payload.undecodable` | `payload does not decode as a payload` (pending Luna pass; plan 3 Task 2) |
-| `engine.codec.payload.trailing` | `payload has data after the object` (pending Luna pass; plan 3 Task 2) |
-| `engine.codec.payload.no_cap` | `payload has no source byte cap` (pending Luna pass; plan 3 Task 2) |
-| `engine.codec.payload.no_expiry` | `payload has no grant expiry` (pending Luna pass; plan 3 Task 2) |
-| `engine.codec.payload.shape` | `payload does not have the payload's shape` (pending Luna pass; plan 3 Task 2 fix 1). Any refusal by `Payload.Validate`, whose own reason is not logged |
-| `engine.codec.scratch` | `codec: scratch directory unusable: %s` (pending Luna pass; plan 3 Task 2). `%s` is the system's error for a path under the scratch directory |
-| `engine.codec.grant_expired` | `codec: the grant has expired; no result is written` (pending Luna pass; plan 3 Task 2) |
-| `engine.codec.failed` | `codec: failed: %s` (pending Luna pass; plan 3 Task 2). `%s` is the job error code |
-| `engine.codec.stopped` | `codec: stopped: %s` (pending Luna pass; plan 3 Task 2). `%s` is Go's context error. Since Task 6, the line of a SIGTERM (ECS stopping the task): the codec exits 143 and writes no result |
-| `engine.download.resume` | `source download: broke after %d bytes; resume %d of %d` (pending Luna pass; plan 3 Task 2) |
-| `engine.download.gave_up` | `source download: broke %d times; giving up` (pending Luna pass; plan 3 Task 2) |
-| `engine.codec.source_unopenable` | `codec: the downloaded source cannot be read: %s` (pending Luna pass; plan 3 Task 3). `%s` is the system's error for the scratch source path |
-| `engine.probe.failed` | `codec: ffprobe failed: %q` (pending Luna pass; plan 3 Task 3). `%q` is the last 4 KiB of ffprobe's stderr at `-loglevel error`, quoted so it stays one line |
-| `engine.probe.timeout` | `codec: ffprobe did not finish in time` (pending Luna pass; plan 3 Task 3) |
-| `engine.probe.unusable` | `codec: ffprobe's answer is over %d bytes` (pending Luna pass; plan 3 Task 3). `%d` is 1048576 |
-| `engine.probe.unparsable` | `codec: ffprobe's answer is unusable: %s` (pending Luna pass; plan 3 Task 3). `%s` is one of `engine.probe.reason.*` |
-| `engine.probe.reason.not_json` | `not ffprobe's JSON` (pending Luna pass; plan 3 Task 3) |
-| `engine.probe.reason.trailing` | `data after ffprobe's JSON` (pending Luna pass; plan 3 Task 3) |
-| `engine.probe.reason.negative` | `stream %d has a negative field` (pending Luna pass; plan 3 Task 3). `%d` is the stream's index |
-| `engine.probe.reason.preset` | `unknown preset` (pending Luna pass; plan 3 Task 3 fix 1). Never reached through `Run`: sniff refuses an unknown preset first |
-| `engine.probe.reason.rate` | `stream %d avg_frame_rate: not a rational of non-negative integers`, and the same with `r_frame_rate` (pending Luna pass; plan 3 Task 3) |
-| `engine.probe.reason.rotate` | `stream %d rotate tag is not an integer` (pending Luna pass; plan 3 Task 3) |
-| `engine.probe.reason.duration` | `format duration: not a duration`, `stream %d duration: not a duration` (pending Luna pass; plan 3 Task 3) |
-| `engine.probe.no_duration` | `codec: the source has no duration in its header or its packets` (pending Luna pass; plan 3 Task 3) |
-| `engine.child.failed` | `codec: child process: %s: %s`, or without the second `%s` (pending Luna pass; plan 3 Task 3). The first `%s` is one of `cannot become a subreaper`, `no pipe`, `cannot start <binary path>`, `the child outlived SIGKILL`, `descendants outlived the cleanup`, `a pipe stayed open`, `wait failed`; the second is the system's error |
-| `engine.child.unsupported` | `codec: child processes need Linux` (pending Luna pass; plan 3 Task 3). Only off Linux, where the handler never runs |
-| `engine.encode.failed` | `codec: ffmpeg (%s) failed: %q` (pending Luna pass; plan 3 Task 4). `%s` is one of `video`, `poster`, `poster from the first frame`, `audio`, `peaks` (Task 5); `%q` is the last 4 KiB of ffmpeg's stderr at `-loglevel error`, quoted so it stays one line |
-| `engine.encode.failed_unlogged` | `codec: ffmpeg (%s) failed; its output is not logged` (pending Luna pass; plan 3 Task 5). `%s` is `loudness` or `output meter` (fix 1): those passes run at `-loglevel info`, where ffmpeg prints the input's tags, so none of their stderr is logged (preflight F19) |
-| `engine.encode.killed` | `codec: ffmpeg (%s) was killed by SIGKILL, likely out of memory` (pending Luna pass; plan 3 Task 4). `%s` as `engine.encode.failed`, or `loudness` or `output meter` (Task 5) |
-| `engine.encode.empty` | `codec: ffmpeg wrote no sample to %s` (pending Luna pass; plan 3 Task 4). `%s` is `video.mp4`, `audio.mp4` or `peaks.raw` (Task 5) |
-| `engine.encode.unusable` | `codec: %s: %s` (pending Luna pass; plan 3 Task 4). The first `%s` is an output's name, `the output directory`, or (Task 5) `peaks.raw` or `the scratch tmp directory`; the second is the system's error, one of readFMP4's fixed reasons (a box type and a byte offset, never the file's bytes), or (Task 5) `not a regular file`, `fewer samples than the file's size`, `negative sample count`, `negative duration` |
-| `engine.loudness.unmeasured` | `codec: ffmpeg (%s) gave no measurement: %s` (pending Luna pass; plan 3 Task 5, fix 1). The first `%s` is `loudness` or `output meter`; the second is one of `engine.loudness.reason.*`, never the stderr |
-| `engine.loudness.reason.none` | `no ebur128 summary` (pending Luna pass; plan 3 Task 5, fix 1) |
-| `engine.loudness.reason.fields` | `the ebur128 summary has no I or no true peak` (pending Luna pass; plan 3 Task 5, fix 1) |
-| `engine.loudness.reason.number` | `the ebur128 summary's I is not a number`, `the ebur128 summary's true peak is not a number` (pending Luna pass; plan 3 Task 5, fix 1) |
-| `engine.loudness.gain` | `codec: loudness %.1f LUFS, true peak %.1f dBTP, measurable %t; gain %.2f dB` (pending Luna pass; plan 3 Task 5, fix 1: one decimal, the meter's). Numbers only: the measurement and the gain the first encode uses |
-| `engine.loudness.over_ceiling` | `codec: audio.mp4 peaks %.2f dB over the %.1f dBTP ceiling; encoding again at %.2f dB` (pending Luna pass; plan 3 Task 5, fix 1). The excess (true peak plus 0.05 over -1.5), the ceiling, and the second encode's gain |
-| `engine.loudness.still_over` | `codec: audio.mp4 still peaks %.2f dB over the ceiling after the second encode; kept` (pending Luna pass; plan 3 Task 5, fix 1). Never a third encode |
-| `engine.encode.scratch_full` | `codec: ffmpeg (%s) failed with the scratch disk full` (pending Luna pass; plan 3 Task 6). `%s` as `engine.encode.failed`; the job fails `engine_failed`, not `unreadable` |
-| `engine.encode.no_frame` | `codec: ffmpeg wrote no frame to %s` (pending Luna pass; plan 3 Task 6). `%s` is `poster.jpg` |
-| `engine.version.unknown` | `codec: ffmpeg's version cannot be read; the result names none` (pending Luna pass; plan 3 Task 6) |
-| `engine.collect.refused` | `codec: output %s refused: %s` (pending Luna pass; plan 3 Task 6). The first `%s` is an output's name or `the output directory`; the second one of `a symlink`, `not a regular file`, `not a regular file when opened`, `not a directory`, `not the file checked before the open`, `not the directory checked before the open`, `has %d links`, `empty`, `over its %d-byte bound`, `not an output name`, `no file status`, `cannot be read: %s`, `cannot be opened: %s` (the system's error number's text), `collecting outputs needs Linux` |
-| `engine.upload.retry` | `codec: the upload of %s broke; retry %d of %d` (pending Luna pass; plan 3 Task 6). `%s` is an output's name or `the result` |
-| `engine.upload.gave_up` | `codec: the upload of %s broke %d times; giving up` (pending Luna pass; plan 3 Task 6) |
-| `engine.upload.exists` | `codec: the store already holds %s` (pending Luna pass; plan 3 Task 6). A 412 on the first attempt |
-| `engine.upload.exists_after_retry` | `codec: the store holds %s after a broken attempt; reported with this upload's MD5` (pending Luna pass; plan 3 Task 6, fix 1). The console then requires the object's ETag to equal that MD5 |
-| `engine.upload.denied` | `codec: the store refused %s (403) before the grant's expiry` (pending Luna pass; plan 3 Task 6, fix 1). More than a minute before it: the job fails `engine_failed` and the failure result is still written |
-| `engine.upload.expired` | `codec: the store refused %s (403) at the grant's expiry` (pending Luna pass; plan 3 Task 6, fix 1). Within a minute of it: exit 75, no result |
-| `engine.upload.other_bytes` | `codec: the store's ETag for %s is not the MD5 of the bytes sent` (pending Luna pass; plan 3 Task 6, fix 1) |
-| `engine.upload.unhashable` | `codec: %s cannot be read to hash it: %s` (pending Luna pass; plan 3 Task 6, fix 1). An output's name or `the result`, and the system's error number's text |
-| `engine.upload.status` | `codec: the store answered %d to %s` (pending Luna pass; plan 3 Task 6). The HTTP status and an output's name or `the result` |
-| `engine.upload.mismatch` | `codec: the upload of %s does not match its transfer` (pending Luna pass; plan 3 Task 6) |
-| `engine.upload.unbuildable` | `codec: a request for the store cannot be built` (pending Luna pass; plan 3 Task 6) |
-| `engine.result.unmarshalable` | `codec: the result cannot be written as at most %d bytes of JSON` (pending Luna pass; plan 3 Task 6). `%d` is 65536 |
-| `engine.codec.done` | `codec: done; outputs and result written` (pending Luna pass; plan 3 Task 6) |
-| `engine.codec.result_unwritten` | `codec: converted, but the result could not be written` (pending Luna pass; plan 3 Task 6) |
-| `engine.codec.error_unwritten` | `codec: the result naming %s could not be written` (pending Luna pass; plan 3 Task 6). `%s` is the job error code |
-| `engine.codec.unexpected` | `codec: an unexpected %T ends the job` (pending Luna pass; plan 3 Task 6). `%T` is a Go error type, never its text |
+| `engine.usage` | `usage: carlos-media <deadline\|codec\|selftest\|drill\|version>` (approved, Luna pass 5; plan 3 Task 1) |
+| `engine.codec.payload_refused` | `codec: payload refused: %s` (approved, Luna pass 5; plan 3 Task 2). `%s` is one of `engine.codec.payload.*`, never a value from the payload |
+| `engine.codec.payload.none` | `no payload` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.codec.payload.too_long` | `payload is over the override limit` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.codec.payload.undecodable` | `payload does not decode as a payload` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.codec.payload.trailing` | `payload has data after the object` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.codec.payload.no_cap` | `payload has no source byte cap` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.codec.payload.no_expiry` | `payload has no grant expiry` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.codec.payload.shape` | `payload does not have the payload's shape` (approved, Luna pass 5; plan 3 Task 2 fix 1). Any refusal by `Payload.Validate`, whose own reason is not logged |
+| `engine.codec.scratch` | `codec: scratch directory unusable: %s` (approved, Luna pass 5; plan 3 Task 2). `%s` is the system's error for a path under the scratch directory |
+| `engine.codec.grant_expired` | `codec: the grant has expired; no result is written` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.codec.failed` | `codec: failed: %s` (approved, Luna pass 5; plan 3 Task 2). `%s` is the job error code |
+| `engine.codec.stopped` | `codec: stopped: %s` (approved, Luna pass 5; plan 3 Task 2). `%s` is Go's context error. Since Task 6, the line of a SIGTERM (ECS stopping the task): the codec exits 143 and writes no result |
+| `engine.download.resume` | `source download: broke after %d bytes; resume %d of %d` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.download.gave_up` | `source download: broke %d times; giving up` (approved, Luna pass 5; plan 3 Task 2) |
+| `engine.codec.source_unopenable` | `codec: the downloaded source cannot be read: %s` (approved, Luna pass 5; plan 3 Task 3). `%s` is the system's error for the scratch source path |
+| `engine.probe.failed` | `codec: ffprobe failed: %q` (approved, Luna pass 5; plan 3 Task 3). `%q` is the last 4 KiB of ffprobe's stderr at `-loglevel error`, quoted so it stays one line |
+| `engine.probe.timeout` | `codec: ffprobe did not finish in time` (approved, Luna pass 5; plan 3 Task 3) |
+| `engine.probe.unusable` | `codec: ffprobe's answer is over %d bytes` (approved, Luna pass 5; plan 3 Task 3). `%d` is 1048576 |
+| `engine.probe.unparsable` | `codec: ffprobe's answer is unusable: %s` (approved, Luna pass 5; plan 3 Task 3). `%s` is one of `engine.probe.reason.*` |
+| `engine.probe.reason.not_json` | `not ffprobe's JSON` (approved, Luna pass 5; plan 3 Task 3) |
+| `engine.probe.reason.trailing` | `data after ffprobe's JSON` (approved, Luna pass 5; plan 3 Task 3) |
+| `engine.probe.reason.negative` | `stream %d has a negative field` (approved, Luna pass 5; plan 3 Task 3). `%d` is the stream's index |
+| `engine.probe.reason.preset` | `unknown preset` (approved, Luna pass 5; plan 3 Task 3 fix 1). Never reached through `Run`: sniff refuses an unknown preset first |
+| `engine.probe.reason.rate` | `stream %d avg_frame_rate: not a rational of non-negative integers`, and the same with `r_frame_rate` (approved, Luna pass 5; plan 3 Task 3) |
+| `engine.probe.reason.rotate` | `stream %d rotate tag is not an integer` (approved, Luna pass 5; plan 3 Task 3) |
+| `engine.probe.reason.duration` | `format duration: not a duration`, `stream %d duration: not a duration` (approved, Luna pass 5; plan 3 Task 3) |
+| `engine.probe.no_duration` | `codec: the source has no duration in its header or its packets` (approved, Luna pass 5; plan 3 Task 3) |
+| `engine.child.failed` | `codec: child process: %s: %s`, or without the second `%s` (approved, Luna pass 5; plan 3 Task 3). The first `%s` is one of `cannot become a subreaper`, `no pipe`, `cannot start <binary path>`, `the child outlived SIGKILL`, `descendants outlived the cleanup`, `a pipe stayed open`, `wait failed`; the second is the system's error |
+| `engine.child.unsupported` | `codec: child processes need Linux` (approved, Luna pass 5; plan 3 Task 3). Only off Linux, where the handler never runs |
+| `engine.encode.failed` | `codec: ffmpeg (%s) failed: %q` (approved, Luna pass 5; plan 3 Task 4). `%s` is one of `video`, `poster`, `poster from the first frame`, `audio`, `peaks` (Task 5); `%q` is the last 4 KiB of ffmpeg's stderr at `-loglevel error`, quoted so it stays one line |
+| `engine.encode.failed_unlogged` | `codec: ffmpeg (%s) failed; its diagnostics are not logged` (approved, Luna pass 5; plan 3 Task 5). `%s` is `loudness` or `output meter` (fix 1): those passes run at `-loglevel info`, where ffmpeg prints the input's tags, so none of their stderr is logged (preflight F19) |
+| `engine.encode.killed` | `codec: ffmpeg (%s) was killed by SIGKILL, likely out of memory` (approved, Luna pass 5; plan 3 Task 4). `%s` as `engine.encode.failed`, or `loudness` or `output meter` (Task 5) |
+| `engine.encode.empty` | `codec: ffmpeg wrote no sample to %s` (approved, Luna pass 5; plan 3 Task 4). `%s` is `video.mp4`, `audio.mp4` or `peaks.raw` (Task 5) |
+| `engine.encode.unusable` | `codec: %s: %s` (approved, Luna pass 5; plan 3 Task 4). The first `%s` is an output's name, `the output directory`, or (Task 5) `peaks.raw` or `the scratch tmp directory`; the second is the system's error, one of readFMP4's fixed reasons (a box type and a byte offset, never the file's bytes), or (Task 5) `not a regular file`, `fewer samples than the file's size`, `negative sample count`, `negative duration` |
+| `engine.loudness.unmeasured` | `codec: ffmpeg (%s) gave no measurement: %s` (approved, Luna pass 5; plan 3 Task 5, fix 1). The first `%s` is `loudness` or `output meter`; the second is one of `engine.loudness.reason.*`, never the stderr |
+| `engine.loudness.reason.none` | `no ebur128 summary` (approved, Luna pass 5; plan 3 Task 5, fix 1) |
+| `engine.loudness.reason.fields` | `the ebur128 summary has no I or no true peak` (approved, Luna pass 5; plan 3 Task 5, fix 1) |
+| `engine.loudness.reason.number` | `the ebur128 summary's I is not a number`, `the ebur128 summary's true peak is not a number` (approved, Luna pass 5; plan 3 Task 5, fix 1) |
+| `engine.loudness.gain` | `codec: loudness %.1f LUFS, true peak %.1f dBTP, measurable %t; gain %.2f dB` (approved, Luna pass 5; plan 3 Task 5, fix 1: one decimal, the meter's). Numbers only: the measurement and the gain the first encode uses |
+| `engine.loudness.over_ceiling` | `codec: audio.mp4 peaks %.2f dB over the %.1f dBTP ceiling; encoding again at %.2f dB` (approved, Luna pass 5; plan 3 Task 5, fix 1). The excess (true peak plus 0.05 over -1.5), the ceiling, and the second encode's gain |
+| `engine.loudness.still_over` | `codec: audio.mp4 still peaks %.2f dB over the ceiling after the second encode; kept` (approved, Luna pass 5; plan 3 Task 5, fix 1). Never a third encode |
+| `engine.encode.scratch_full` | `codec: ffmpeg (%s) failed with the scratch disk full` (approved, Luna pass 5; plan 3 Task 6). `%s` as `engine.encode.failed`; the job fails `engine_failed`, not `unreadable` |
+| `engine.encode.no_frame` | `codec: ffmpeg wrote no frame to %s` (approved, Luna pass 5; plan 3 Task 6). `%s` is `poster.jpg` |
+| `engine.version.unknown` | `codec: ffmpeg's version cannot be read; the result names none` (approved, Luna pass 5; plan 3 Task 6) |
+| `engine.collect.refused` | `codec: output %s refused: %s` (approved, Luna pass 5; plan 3 Task 6). The first `%s` is an output's name or `the output directory`; the second one of `a symlink`, `not a regular file`, `not a regular file when opened`, `not a directory`, `not the file checked before the open`, `not the directory checked before the open`, `has %d links`, `empty`, `over its %d-byte bound`, `not an output name`, `no file status`, `cannot be read: %s`, `cannot be opened: %s` (the system's error number's text), `collecting outputs needs Linux` |
+| `engine.upload.retry` | `codec: the upload of %s broke; retry %d of %d` (approved, Luna pass 5; plan 3 Task 6). `%s` is an output's name or `the result` |
+| `engine.upload.gave_up` | `codec: the upload of %s broke %d times; giving up` (approved, Luna pass 5; plan 3 Task 6) |
+| `engine.upload.exists` | `codec: the store already holds %s` (approved, Luna pass 5; plan 3 Task 6). A 412 on the first attempt |
+| `engine.upload.exists_after_retry` | `codec: the store holds %s after a broken attempt; reported with this upload's MD5` (approved, Luna pass 5; plan 3 Task 6, fix 1). The console then requires the object's ETag to equal that MD5 |
+| `engine.upload.denied` | `codec: the store refused %s (403) before the grant's expiry` (approved, Luna pass 5; plan 3 Task 6, fix 1). More than a minute before it: the job fails `engine_failed` and the failure result is still written |
+| `engine.upload.expired` | `codec: the store refused %s (403) at the grant's expiry` (approved, Luna pass 5; plan 3 Task 6, fix 1). Within a minute of it: exit 75, no result |
+| `engine.upload.other_bytes` | `codec: the store's ETag for %s is not the MD5 of the bytes sent` (approved, Luna pass 5; plan 3 Task 6, fix 1) |
+| `engine.upload.unhashable` | `codec: %s cannot be read to hash it: %s` (approved, Luna pass 5; plan 3 Task 6, fix 1). An output's name or `the result`, and the system's error number's text |
+| `engine.upload.status` | `codec: the store answered %d to %s` (approved, Luna pass 5; plan 3 Task 6). The HTTP status and an output's name or `the result` |
+| `engine.upload.mismatch` | `codec: the upload of %s does not match its transfer` (approved, Luna pass 5; plan 3 Task 6) |
+| `engine.upload.unbuildable` | `codec: a request for the store cannot be built` (approved, Luna pass 5; plan 3 Task 6) |
+| `engine.result.unmarshalable` | `codec: the result cannot be written as at most %d bytes of JSON` (approved, Luna pass 5; plan 3 Task 6). `%d` is 65536 |
+| `engine.codec.done` | `codec: done; outputs and result written` (approved, Luna pass 5; plan 3 Task 6) |
+| `engine.codec.result_unwritten` | `codec: converted, but the result could not be written` (approved, Luna pass 5; plan 3 Task 6) |
+| `engine.codec.error_unwritten` | `codec: the result naming %s could not be written` (approved, Luna pass 5; plan 3 Task 6). `%s` is the job error code |
+| `engine.codec.unexpected` | `codec: an unexpected %T ends the job` (approved, Luna pass 5; plan 3 Task 6). `%T` is a Go error type, never its text |
### Image tool: `mediaimage` (plan 3 Task 8)
@@ -601,31 +616,31 @@ Operator-facing text from `cmd/mediaimage`, which builds and pushes the engine i
| Key | Text |
|---|---|
-| `image.usage` | `usage: mediaimage <lock\|build\|push> [flags]` (pending Luna pass; plan 3 Task 8) |
-| `image.error` | `mediaimage: %s`, the prefix of every failure on stderr (pending Luna pass; plan 3 Task 8) |
-| `image.flags` | `snapshot.debian.org timestamp, YYYYMMDDTHHMMSSZ`; `base image, docker.io/library/debian@sha256:<digest>`; `lock file to write`; `Debian archive keyring that authenticates the snapshot`; `directory that keeps downloads between runs`; `lock file`; `carlos-media built for linux/arm64`; `image creation time, RFC 3339`; `directory to write the OCI layout to`; `OCI layout written by build`; `image repository, <registry>/<repo>`; `release tag; each release has its own, never reused` (pending Luna pass; plan 3 Task 8) |
-| `image.lock.refused` | `bad lock file: line %d: %s`, the reason one of `the snapshot is not YYYYMMDDTHHMMSSZ`, `the base is not pinned by digest`, `the lock starts with # snapshot and # base`, `packages are not sorted`, `a package line has five columns`, `the size is not a positive number`, `the sha256 is not 64 hex digits`, `the url is not https`, `the package or version is empty`; `bad lock file: no packages`; `bad lock file: no ffmpeg package`; `bad lock file: --snapshot is not YYYYMMDDTHHMMSSZ`; `bad lock file: --out is required`; `bad lock file: --keyring must name a keyring file: %s` (pending Luna pass; plan 3 Task 8) |
-| `image.lock.unresolved` | `unresolved dependency: no package %s in the snapshot`; `unresolved dependency: %s depends on %s` (pending Luna pass; plan 3 Task 8) |
-| `image.base.refused` | `bad base image: %q is not <registry>/<repo>@sha256:<digest>`; `bad base image: no linux/arm64 image`; `bad base image: the image is %s/%s`; `bad base image: %d layers and %d diff ids`; `bad base image: layer type %s`; `bad base image: the base image has no var/lib/dpkg/status`; `bad base image: the registry asked for %q sign-in`; `bad base image: the registry's token address is not https` (pending Luna pass; plan 3 Task 8) |
-| `image.hash` | `sha256 mismatch: %s holds %s, want %s`; `sha256 mismatch: downloaded %s, want %s` (pending Luna pass; plan 3 Task 8) |
-| `image.deb.refused` | `bad deb: not an ar archive`; `bad deb: no %s member`; `bad deb: no control file`; `bad deb: the control file of %s says %s %s for %s`; `bad deb: a member header is damaged`; `bad deb: a member size is damaged`; `bad deb: a member is cut short`; `bad deb: %s is not a compression this tool reads` (pending Luna pass; plan 3 Task 8) |
-| `image.entry.refused` | `refused package entry: %s leaves the root`; `refused package entry: %s would delete files from a lower layer`; `refused package entry: hard link %s has no target in its package`; `refused package entry: %s is not a file, directory or link` (pending Luna pass; plan 3 Task 8) |
-| `image.conflict` | `conflicting paths: two packages ship different %s`; `conflicting paths: a package directory %s covers a base file`; `conflicting paths: a package entry %s covers a base directory` (pending Luna pass; plan 3 Task 8) |
-| `image.library` | `unresolved library: /%s needs %s`, joined by `; ` when there are several; `unresolved library: %s no longer ships %s` (pending Luna pass; plan 3 Task 8) |
-| `image.executable` | `missing executable: /%s is not an arm64 program` (pending Luna pass; plan 3 Task 8) |
-| `image.build.refused` | `--out, --binary and --cache are required`; `--created: %s`; `%s exists and is not an image layout` (pending Luna pass; plan 3 Task 8) |
-| `image.release.gpgv` | `gpgv is required to verify Debian's signatures: %s` (pending Luna pass; plan 3 Task 8) |
-| `image.release.refused` | `unauthenticated release: ` then one of `not one clearsigned message`, `text after the signature`, `a signature does not match`, `no good signature from a Debian archive key`, `gpgv wrote no signed content`, `not one release stanza`, `the SHA256 list is damaged`, `Date: %s`, `Valid-Until: %s`, `the release is %q, want %q`, `%s is dated after the snapshot`, `%s had expired at the snapshot`, `%s does not list %s` (pending Luna pass; plan 3 Task 8) |
-| `image.release.index` | `sha256 mismatch: %s %s is not the file its release names` (pending Luna pass; plan 3 Task 8) |
-| `image.privileged` | `setuid or setgid path in the image: %s`, the paths joined by `, ` (pending Luna pass; plan 3 Task 8) |
-| `image.tls_roots` | `carlos-media embeds no TLS roots: %s does not link golang.org/x/crypto/x509roots/fallback, and the image has no CA bundle, so no transfer to S3 would verify`; `carlos-media embeds no TLS roots: %s names no Go build record: %s` (pending Luna pass; branch review round 1) |
-| `image.toolchain` | `wrong Go toolchain: mediaimage runs on %s, releases use %s`; `wrong Go toolchain: %s was built with %s, releases use %s`; `wrong Go toolchain: %s names no Go version: %s` (pending Luna pass; plan 3 Task 8) |
-| `image.location` | `the registry pointed outside itself: %s://%s`; `the registry pointed outside itself: an upload answer has no Location`; `the registry pointed outside itself: an upload Location does not parse`; `the registry pointed outside itself: more than %d redirects` (pending Luna pass; plan 3 Task 8) |
-| `image.push.refused` | `push refused: CARLOS_REGISTRY_PASSWORD is not set`; `push refused: --tag must be a release tag`; `push refused: --repo must be <registry>/<repo>`; `push refused: the layout holds %d manifests` (pending Luna pass; plan 3 Task 8) |
-| `image.push.tag` | `tag already holds another image: %s is %s, this image is %s` (pending Luna pass; plan 3 Task 8) |
-| `image.push.digest` | `the registry holds a different image: %s after the push, want %s` (pending Luna pass; plan 3 Task 8) |
-| `image.http` | `%s: HTTP %d`, the operation one of `GET %s`, `read manifest %s`, `check blob`, `start upload`, `upload`, `finish upload`, `write manifest`. The registry's own answer is never repeated (pending Luna pass; plan 3 Task 8) |
-| `image.readme` | The whole of `deploy/media-image/README.md` (pending Luna pass; plan 3 Task 8) |
+| `image.usage` | `usage: mediaimage <lock\|build\|push> [flags]` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.error` | `mediaimage: %s`, the prefix of every failure on stderr (approved, Luna pass 5; plan 3 Task 8) |
+| `image.flags` | `snapshot.debian.org timestamp, YYYYMMDDTHHMMSSZ`; `base image, docker.io/library/debian@sha256:<digest>`; `lock file to write`; `Debian archive keyring that authenticates the snapshot`; `directory that keeps downloads between runs`; `lock file`; `carlos-media built for linux/arm64`; `image creation time, RFC 3339`; `directory to write the OCI layout to`; `OCI layout written by build`; `image repository, <registry>/<repo>`; `release tag; each release has its own, never reused` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.lock.refused` | `bad lock file: line %d: %s`, the reason one of `the snapshot is not YYYYMMDDTHHMMSSZ`, `the base is not pinned by digest`, `the lock starts with # snapshot and # base`, `packages are not sorted`, `a package line has five columns`, `the size is not a positive number`, `the sha256 is not 64 hex digits`, `the url is not https`, `the package or version is empty`; `bad lock file: no packages`; `bad lock file: no ffmpeg package`; `bad lock file: --snapshot is not YYYYMMDDTHHMMSSZ`; `bad lock file: --out is required`; `bad lock file: --keyring must name a keyring file: %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.lock.unresolved` | `unresolved dependency: no package %s in the snapshot`; `unresolved dependency: %s depends on %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.base.refused` | `bad base image: %q is not <registry>/<repo>@sha256:<digest>`; `bad base image: no linux/arm64 image`; `bad base image: the image is %s/%s, want linux/arm64`; `bad base image: %d layers and %d diff ids`; `bad base image: layer type %s`; `bad base image: the base image has no var/lib/dpkg/status`; `bad base image: the registry asked for %q sign-in`; `bad base image: the registry's token address is not https` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.hash` | `sha256 mismatch: %s holds %s, want %s`; `sha256 mismatch: downloaded %s, want %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.deb.refused` | `bad deb: not an ar archive`; `bad deb: no %s member`; `bad deb: no control file`; `bad deb: the control file of %s says %s %s for %s`; `bad deb: a member header is damaged`; `bad deb: a member size is damaged`; `bad deb: a member is cut short`; `bad deb: %s is not a compression this tool reads` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.entry.refused` | `refused package entry: %s leaves the root`; `refused package entry: %s would delete files from a lower layer`; `refused package entry: hard link %s has no target in its package`; `refused package entry: %s is not a file, directory or link` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.conflict` | `conflicting paths: two packages ship different %s`; `conflicting paths: a package directory %s covers a base file`; `conflicting paths: a package entry %s covers a base directory` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.library` | `unresolved library: /%s needs %s`, joined by `; ` when there are several; `unresolved library: %s no longer ships %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.executable` | `missing executable: /%s is not an arm64 program` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.build.refused` | `--out, --binary and --cache are required`; `--created: %s`; `%s exists and is not an image layout` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.release.gpgv` | `gpgv is required to verify Debian's signatures: %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.release.refused` | `unauthenticated release: ` then one of `not one clearsigned message`, `text after the signature`, `a signature does not match`, `no good signature from a Debian archive key`, `gpgv wrote no signed content`, `not one release stanza`, `the SHA256 list is damaged`, `Date: %s`, `Valid-Until: %s`, `the release is %q, want %q`, `%s is dated after the snapshot`, `%s had expired at the snapshot`, `%s does not list %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.release.index` | `sha256 mismatch: %s %s is not the file its release names` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.privileged` | `setuid or setgid path in the image: %s`, the paths joined by `, ` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.tls_roots` | `carlos-media embeds no TLS roots: %s does not link golang.org/x/crypto/x509roots/fallback, and the image has no CA bundle, so no transfer to S3 would verify`; `carlos-media embeds no TLS roots: %s names no Go build record: %s` (approved, Luna pass 5; branch review round 1) |
+| `image.toolchain` | `wrong Go toolchain: mediaimage runs on %s, releases use %s`; `wrong Go toolchain: %s was built with %s, releases use %s`; `wrong Go toolchain: %s names no Go version: %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.location` | `the registry pointed outside itself: %s://%s`; `the registry pointed outside itself: an upload answer has no Location`; `the registry pointed outside itself: an upload Location does not parse`; `the registry pointed outside itself: more than %d redirects` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.push.refused` | `push refused: CARLOS_REGISTRY_PASSWORD is not set`; `push refused: --tag must be a release tag`; `push refused: --repo must be <registry>/<repo>`; `push refused: the layout holds %d manifests` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.push.tag` | `tag already holds another image: %s is %s, this image is %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.push.digest` | `the registry holds a different image: %s after the push, want %s` (approved, Luna pass 5; plan 3 Task 8) |
+| `image.http` | `%s: HTTP %d`, the operation one of `GET %s` (a public package URL from the lock or the snapshot, or a registry path; never a credential), `read manifest %s`, `check blob`, `start upload`, `upload`, `finish upload`, `write manifest`. The registry's own answer is never repeated (approved, Luna pass 5; plan 3 Task 8) |
+| `image.readme` | The whole of `deploy/media-image/README.md` (approved, Luna pass 5; plan 3 Task 8), except the paragraph on who runs the weekly lock (“The weekly run belongs to…”), still pending: Paul picks an amadan or a Paseo schedule |
### Rollout checks: `selftest`, `drill` and the endpoint drill script (plan 3 Task 7)
@@ -633,35 +648,35 @@ Operator-facing text the rollout reads (R2-R4): one-off tasks' logs and
the drill script's terminal. Every line is fixed words, numbers, an
environment variable's name, a host name, an address the operator typed
or an output's name: never a credential, a URL or a header. `%s` and
-`%d` are what each row says. All rows are pending a Luna pass.
+`%d` are what each row says. All rows are approved, Luna pass 5.
| Key | Text |
|---|---|
-| `engine.selftest.usage` | `usage: carlos-media selftest <video\|audio>` (pending Luna pass; plan 3 Task 7) |
-| `engine.selftest.pass` | `PASS %s` (pending Luna pass; plan 3 Task 7). `%s` is a case: `tls-roots` (first in both selftests; branch review round 1), `video-1080p`, `video-portrait-rotated`, `video-pq-4k`, `video-location-tag`, `audio-voice-webm-live`, `audio-silent-wav`, `audio-mp3-cover-art` |
-| `engine.selftest.fail` | `FAIL %s: %s` (pending Luna pass; plan 3 Task 7). A case and one of `engine.selftest.reason.*` |
-| `engine.selftest.no_scratch` | `FAIL selftest: no directory in the scratch: %s`, `FAIL selftest: no local store: %s` (pending Luna pass; plan 3 Task 7). The system's error number's text |
-| `engine.selftest.reason.*` | `no case directory: %s`; `ffmpeg could not make the source: %s`; `the source cannot be read: %s`; `the source does not sniff: %s`; `the source does not probe: %s`; `no payload: %s`; `the conversion exited %d`; `the handler broke the presigned contract: %s` (`a request the store did not sign` or `a signed header missing or changed`); `the result is not a success result`; `converted %d ms of a %d ms source`; `%s: stored %d bytes, the result says %d`; `%s does not read as a fragmented MP4: %s`; `%s: no playlist: %s`; `%s is not the playlist of %s`; `the result gives %s as %dx%d, want %dx%d`; `poster.jpg is not a JPEG`; `poster.jpg is %dx%d, want %dx%d`; `video.mp4 does not probe: %s`; `video.mp4 is %s %dx%d (rotation %d, SAR %d:%d), want h264 %dx%d` (fix 1: as encoded, never scaled first); `peaks.json does not hold %d peaks`; `peaks.json has a peak outside 0 to 255`; `a silent source has a peak of %d`; `every peak is 0`; `the source does not measure: %s`; `audio.mp4 does not measure: %s`; `audio.mp4's true peak is %.1f dBTP, over %.1f`; `audio.mp4 is %.1f LUFS, louder than %.0f LUFS`; `audio.mp4's loudness range is %.1f LU, the source's %.1f`; `a log line carries the source's metadata`; `%s carries the source's metadata` (pending Luna pass; plan 3 Task 7). Each `%s` after a colon is a job code, a system error number's text or one of the meter's fixed reasons |
-| `engine.selftest.reason.tls` | `tls-roots`'s reasons: `no root this binary trusts signs S3's certificate`; `S3's certificate does not verify`; `the embedded S3 chain does not parse` (pending Luna pass; branch review round 1) |
-| `engine.selftest.measured` | `%s: source %.1f LUFS, %.1f dBTP, LRA %.1f LU; audio.mp4 %.1f LUFS, %.1f dBTP, LRA %.1f LU` (pending Luna pass; plan 3 Task 7). On stderr, the voice case only |
-| `engine.loudness.reason.lra` | `the ebur128 summary's LRA is not a number`, `the ebur128 summary has no LRA` (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.usage` | `usage: carlos-media drill <creds\|dns\|net <address>…\|endpoints\|endpoints-verdict <A> <B> <C>\|hostile-timer\|fill-scratch\|many-files\|bad-outputs>` (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.creds` | `PASS creds env: no credential variable; AWS variables set: %s` (names, or `none`); `FAIL creds env: %s is set` (a variable's name); `PASS creds 169.254.170.2: unreachable`, `PASS creds 169.254.170.2: answered with no credential`, `FAIL creds 169.254.170.2: answered with a credential`; `PASS creds 169.254.169.254: unreachable`, `FAIL creds 169.254.169.254: reachable`; `PASS creds task metadata: %s is not set`, `PASS creds task metadata: no answer holds a credential`, `FAIL creds task metadata: an answer holds a credential` (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.dns` | `PASS dns %s: resolves`, `FAIL dns %s: does not resolve` (an allowed name); `PASS dns %s: does not resolve`, `FAIL dns %s: resolves` (a blocked one); `FAIL dns: no region in AWS_REGION or AWS_DEFAULT_REGION` (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.net` | `PASS net %s: no connection`, `FAIL net %s: connected` (an address and port); `FAIL net: an argument is not an IP address with an optional port` (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.endpoints` | `%s ok`, `%s refused %s` (an endpoint: `s3`, `ecr-api`, `ecr-docker`, `logs`; a status code or `conn`), the only stdout of a pass; `drill endpoints: CARLOS_MEDIA_DRILL does not hold the drill's input` on stderr (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.verdict` | the table head `endpoint A (saved) B (open) C (restored)`, then one row per endpoint of cells (`ok`, `refused %s`, `missing`, `malformed`); `FAIL %s phase %s: %s, want %s` (an endpoint, A/B/C, a cell, `refused` or `ok`); `PASS endpoints: refused under the saved and restored policies, ok under the open one, at all four endpoints` (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.hostile_timer` | `FAIL hostile-timer: not PID 1 of its own PID namespace; refusing to signal every process`; `hostile-timer: ignoring SIGTERM and SIGINT; sent SIGKILL to %d other processes and to -1; repeating until the deadline ends the task` (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.child_job` | `PASS %s: the job failed %s in %s; %s; no child left; outputs reset` (the evidence: `the child met %s and the scratch read full`, ENOSPC or EDQUOT, or `%d files were made`); `FAIL %s: %s (job %s, in %s)`, the reason one of `the child never met a full file system`, `the scratch did not read full`, `the job did not end %s`, `the child made %d files, not 100000`, `a child outlived the cleanup`, `the outputs were not reset: %s`, `the scratch is unusable: %s`; `FAIL %s: the binary's own path is unknown` (`fill-scratch` or `many-files`; a job code or `no error`; a duration) (pending Luna pass; plan 3 Task 7, fix 1) |
-| `engine.harden.failed` | `carlos-media: cannot make the process non-dumpable: %s` (pending Luna pass; plan 3 Task 7 fix 1). The system's error; codec, selftest and the drills then exit 1 having read nothing |
-| `engine.drill.bad_outputs` | `PASS bad-outputs %s %s: refused (%s)` (an output's name, a kind: `symlink`, `hardlink`, `fifo`, `directory`, `empty`, `oversize`; `engine.collect.refused`'s text), `FAIL bad-outputs %s %s: not refused`, `FAIL bad-outputs: the drill could not run: %s`, `FAIL bad-outputs: %d PUTs attempted, want 0`, `PASS bad-outputs: 0 PUTs attempted` (pending Luna pass; plan 3 Task 7) |
-| `engine.drill.unsupported` | `FAIL %s: unsupported on this system` (pending Luna pass; plan 3 Task 7). Off Linux only |
-| `engine.drill.child` | `hostile child: exhausted: ENOSPC` or `EDQUOT` (on the child's stdout: the drill's evidence, fix 1), `hostile child: unknown kind`, `hostile child: no file system status: %s`, `hostile child: refusing to fill a %d-byte file system`, `hostile child: %s` (on the hostile child's stderr; it reaches the task's log only as `engine.encode.failed`'s tail) (pending Luna pass; plan 3 Task 7) |
-| `script.endpoint_drill.usage` | `usage: media-endpoint-drill.sh run --profile <p> --foreign-profile <p> --cluster <arn> --task-definition <arn> --repository <name> --bucket <name> --subnets <id,...> --security-group <id> --engine-root <dir> \| restore <run dir>` (pending Luna pass; plan 3 Task 7 fix 2) |
-| `script.endpoint_drill.progress` | `media-endpoint-drill: run directory %s`; `media-endpoint-drill: applying the fixture`; `media-endpoint-drill: phase A: the endpoints' real policies`; `media-endpoint-drill: phase B: the endpoints opened to full access`; `media-endpoint-drill: phase C: the endpoints' real policies again`; `media-endpoint-drill: phase A was not refused at every endpoint; the endpoints are not opened`; `media-endpoint-drill: kept %s; finish with: %s restore %s` (pending Luna pass; plan 3 Task 7 fix 2). On stderr |
-| `script.endpoint_drill.restore` | `cleaned %s`, `NOT CLEANED %s` (an item: `engine-policies`, `fixture`, `input`) (pending Luna pass; plan 3 Task 7 fix 2). On stdout |
-| `script.endpoint_drill.refused` | `media-endpoint-drill: refusing to run with xtrace on: it would print the drill's secrets`; `media-endpoint-drill: refusing to run with BASH_XTRACEFD set: it would print the drill's secrets`; `media-endpoint-drill: %s/drill.conf is damaged; nothing was changed. Restore the engine root and destroy the fixture by hand.`; `media-endpoint-drill: the engine root's normal media_engine_drill input is not null: its next ordinary apply would reopen the drill`; `media-endpoint-drill: the fixture's first apply did not finish, so a resource may exist that tofu never saved.`; `media-endpoint-drill: look for the user carlos-media-drill-%s and the log group carlos-media-endpoint-drill-%s in the foreign account, and the bucket %s in dev`; `media-endpoint-drill: delete what you find, then remove %s` (pending Luna pass; plan 3 Task 7 fixes 2 and 3). On stderr |
-| `script.endpoint_drill.error` | `media-endpoint-drill: ` then one of: `--engine-root is not a directory`; `--engine-root has characters the drill cannot record`; `--cluster is not a cluster ARN`; `the dev profile does not answer`; `the dev profile is not the cluster's account`; `the foreign profile does not answer`; `the foreign profile has no account`; `the foreign profile is the dev account: the drill needs an unrelated account`; `the task definition cannot be read`; `the codec image is not pinned by digest`; `the codec image is not from --repository`; `the codec container has no awslogs group and prefix`; `no run directory`; `no run id`; `the run directory cannot be written`; `the engine root declares no media_engine_drill variable`; `the engine root does not initialise`; `TF_VAR_media_engine_drill is set; unset it first`; `the engine root's normal media_engine_drill input is not null; set it back first`; `the engine root's policies have changes pending; apply or revert them first`; `the engine root's variables cannot be written`; `the engine root was not applied`; `the fixture cannot be copied`; `the fixture's variables cannot be written`; `the fixture does not initialise`; `the fixture was not applied`; `the fixture has no user`; `the fixture's user is not the expected one`; `the user's key was not created`; `the GET was not presigned`; `the registry token was not minted`; `the log stream was not created`; `a minted value cannot be written as JSON`; `the drill's input cannot be written`; `a drill task did not start`; `the drill task did not stop in time`; `the drill task's output is incomplete` (pending Luna pass; plan 3 Task 7 fix 2). On stderr |
+| `engine.selftest.usage` | `usage: carlos-media selftest <video\|audio>` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.selftest.pass` | `PASS %s` (approved, Luna pass 5; plan 3 Task 7). `%s` is a case: `tls-roots` (first in both selftests; branch review round 1), `video-1080p`, `video-portrait-rotated`, `video-pq-4k`, `video-location-tag`, `audio-voice-webm-live`, `audio-silent-wav`, `audio-mp3-cover-art` |
+| `engine.selftest.fail` | `FAIL %s: %s` (approved, Luna pass 5; plan 3 Task 7). A case and one of `engine.selftest.reason.*` |
+| `engine.selftest.no_scratch` | `FAIL selftest: no directory in the scratch: %s`, `FAIL selftest: no local store: %s` (approved, Luna pass 5; plan 3 Task 7). The system's error number's text |
+| `engine.selftest.reason.*` | `no case directory: %s`; `ffmpeg could not make the source: %s`; `the source cannot be read: %s`; `the source does not sniff: %s`; `the source does not probe: %s`; `no payload: %s`; `the conversion exited %d`; `the handler broke the presigned contract: %s` (`a request the store did not sign` or `a signed header missing or changed`); `the result is not a success result`; `converted %d ms of a %d ms source`; `%s: stored %d bytes, the result says %d`; `%s does not read as a fragmented MP4: %s`; `%s: no playlist: %s`; `%s is not the playlist of %s`; `the result gives %s as %dx%d, want %dx%d`; `poster.jpg is not a JPEG`; `poster.jpg is %dx%d, want %dx%d`; `video.mp4 does not probe: %s`; `video.mp4 is %s %dx%d (rotation %d, SAR %d:%d), want h264 %dx%d` (fix 1: as encoded, never scaled first); `peaks.json does not hold %d peaks`; `peaks.json has a peak outside 0 to 255`; `a silent source has a peak of %d`; `every peak is 0`; `the source does not measure: %s`; `audio.mp4 does not measure: %s`; `audio.mp4's true peak is %.1f dBTP, over %.1f`; `audio.mp4 is %.1f LUFS, louder than %.0f LUFS`; `audio.mp4's loudness range is %.1f LU, the source's %.1f`; `a log line carries the source's metadata`; `%s carries the source's metadata` (approved, Luna pass 5; plan 3 Task 7). Each `%s` after a colon is a job code, a system error number's text or one of the meter's fixed reasons |
+| `engine.selftest.reason.tls` | `tls-roots`'s reasons: `no root trusted by this binary can verify S3's certificate`; `S3's certificate does not verify`; `the embedded S3 chain does not parse` (approved, Luna pass 5; branch review round 1) |
+| `engine.selftest.measured` | `%s: source %.1f LUFS, %.1f dBTP, LRA %.1f LU; audio.mp4 %.1f LUFS, %.1f dBTP, LRA %.1f LU` (approved, Luna pass 5; plan 3 Task 7). On stderr, the voice case only |
+| `engine.loudness.reason.lra` | `the ebur128 summary's LRA is not a number`, `the ebur128 summary has no LRA` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.usage` | `usage: carlos-media drill <creds\|dns\|net <address>…\|endpoints\|endpoints-verdict <A> <B> <C>\|hostile-timer\|fill-scratch\|many-files\|bad-outputs>` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.creds` | `PASS creds env: no credential variable; AWS variables set: %s` (names, or `none`); `FAIL creds env: %s is set` (a variable's name); `PASS creds 169.254.170.2: unreachable`, `PASS creds 169.254.170.2: answered with no credential`, `FAIL creds 169.254.170.2: answered with a credential`; `PASS creds 169.254.169.254: unreachable`, `FAIL creds 169.254.169.254: reachable`; `PASS creds task metadata: %s is not set`, `PASS creds task metadata: no answer holds a credential`, `FAIL creds task metadata: an answer holds a credential` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.dns` | `PASS dns %s: resolves`, `FAIL dns %s: does not resolve` (an allowed name); `PASS dns %s: does not resolve`, `FAIL dns %s: resolves` (a blocked one); `FAIL dns: no region in AWS_REGION or AWS_DEFAULT_REGION` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.net` | `PASS net %s: no connection`, `FAIL net %s: connected` (an address and port); `FAIL net: an argument is not an IP address with an optional port` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.endpoints` | `%s ok`, `%s refused %s` (an endpoint: `s3`, `ecr-api`, `ecr-docker`, `logs`; a status code or `conn`), the only stdout of a pass; `drill endpoints: CARLOS_MEDIA_DRILL does not hold the drill's input` on stderr (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.verdict` | the table head `endpoint A (saved) B (open) C (restored)`, then one row per endpoint of cells (`ok`, `refused %s`, `missing`, `malformed`); `FAIL %s phase %s: %s, want %s` (an endpoint, A/B/C, a cell, `refused` or `ok`); `PASS endpoints: refused under the saved and restored policies, ok under the open one, at all four endpoints` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.hostile_timer` | `FAIL hostile-timer: not PID 1 of its own PID namespace; refusing to signal every process`; `hostile-timer: ignoring SIGTERM and SIGINT; sent SIGKILL to %d other processes and to -1; repeating until the deadline ends the task` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.child_job` | `PASS %s: the job failed %s in %s; %s; no child left; outputs reset` (the evidence: `the child met %s and the scratch read full`, ENOSPC or EDQUOT, or `%d files were made`); `FAIL %s: %s (job %s, in %s)`, the reason one of `the child never met a full file system`, `the scratch did not read full`, `the job did not end %s`, `the child made %d files, not 100000`, `a child outlived the cleanup`, `the outputs were not reset: %s`, `the scratch is unusable: %s`; `FAIL %s: the binary's own path is unknown` (`fill-scratch` or `many-files`; a job code or `no error`; a duration) (approved, Luna pass 5; plan 3 Task 7, fix 1) |
+| `engine.harden.failed` | `carlos-media: cannot make the process non-dumpable: %s` (approved, Luna pass 5; plan 3 Task 7 fix 1). The system's error; codec, selftest and the drills then exit 1 having read nothing |
+| `engine.drill.bad_outputs` | `PASS bad-outputs %s %s: refused (%s)` (an output's name, a kind: `symlink`, `hardlink`, `fifo`, `directory`, `empty`, `oversize`; `engine.collect.refused`'s text), `FAIL bad-outputs %s %s: not refused`, `FAIL bad-outputs: the drill could not run: %s`, `FAIL bad-outputs: %d PUTs attempted, want 0`, `PASS bad-outputs: 0 PUTs attempted` (approved, Luna pass 5; plan 3 Task 7) |
+| `engine.drill.unsupported` | `FAIL %s: unsupported on this system` (approved, Luna pass 5; plan 3 Task 7). Off Linux only |
+| `engine.drill.child` | `hostile child: exhausted: ENOSPC` or `EDQUOT` (on the child's stdout: the drill's evidence, fix 1), `hostile child: unknown kind`, `hostile child: no file system status: %s`, `hostile child: refusing to fill a %d-byte file system`, `hostile child: %s` (on the hostile child's stderr; it reaches the task's log only as `engine.encode.failed`'s tail) (approved, Luna pass 5; plan 3 Task 7) |
+| `script.endpoint_drill.usage` | `usage: media-endpoint-drill.sh run --profile <p> --foreign-profile <p> --cluster <arn> --task-definition <arn> --repository <name> --bucket <name> --subnets <id,...> --security-group <id> --engine-root <dir> \| restore <run dir>` (approved, Luna pass 5; plan 3 Task 7 fix 2) |
+| `script.endpoint_drill.progress` | `media-endpoint-drill: run directory %s`; `media-endpoint-drill: applying the fixture`; `media-endpoint-drill: phase A: the endpoints' real policies`; `media-endpoint-drill: phase B: the endpoints opened to full access`; `media-endpoint-drill: phase C: the endpoints' real policies again`; `media-endpoint-drill: phase A was not refused at every endpoint; the endpoints are not opened`; `media-endpoint-drill: kept %s; finish with: %s restore %s` (approved, Luna pass 5; plan 3 Task 7 fix 2). On stderr |
+| `script.endpoint_drill.restore` | `cleaned %s`, `NOT CLEANED %s` (an item: `engine-policies`, `fixture`, `input`) (approved, Luna pass 5; plan 3 Task 7 fix 2). On stdout |
+| `script.endpoint_drill.refused` | `media-endpoint-drill: refusing to run with xtrace on: it would print the drill's secrets`; `media-endpoint-drill: refusing to run with BASH_XTRACEFD set: it would print the drill's secrets`; `media-endpoint-drill: %s/drill.conf is damaged; nothing was changed. Restore the engine root and destroy the fixture by hand.`; `media-endpoint-drill: the engine root's normal media_engine_drill input is not null: its next ordinary apply would reopen the drill`; `media-endpoint-drill: the fixture's first apply did not finish, so a resource may exist that tofu never saved.`; `media-endpoint-drill: look for the user carlos-media-drill-%s and the log group carlos-media-endpoint-drill-%s in the foreign account, and the bucket %s in dev`; `media-endpoint-drill: delete what you find, then remove %s` (approved, Luna pass 5; plan 3 Task 7 fixes 2 and 3). On stderr |
+| `script.endpoint_drill.error` | `media-endpoint-drill: ` then one of: `--engine-root is not a directory`; `--engine-root has characters the drill cannot record`; `--cluster is not a cluster ARN`; `the dev profile does not answer`; `the dev profile is not the cluster's account`; `the foreign profile does not answer`; `the foreign profile has no account`; `the foreign profile is the dev account: the drill needs an unrelated account`; `the task definition cannot be read`; `the codec image is not pinned by digest`; `the codec image is not from --repository`; `the codec container has no awslogs group and prefix`; `no run directory`; `no run id`; `the run directory cannot be written`; `the engine root declares no media_engine_drill variable`; `the engine root does not initialise`; `TF_VAR_media_engine_drill is set; unset it first`; `the engine root's normal media_engine_drill input is not null; set it back first`; `the engine root's policies have changes pending; apply or revert them first`; `the engine root's variables cannot be written`; `the engine root was not applied`; `the fixture cannot be copied`; `the fixture's variables cannot be written`; `the fixture does not initialise`; `the fixture was not applied`; `the fixture has no user`; `the fixture's user is not the expected one`; `the user's key was not created`; `the GET was not presigned`; `the registry token was not minted`; `the log stream was not created`; `a minted value cannot be written as JSON`; `the drill's input cannot be written`; `a drill task did not start`; `the drill task did not stop in time`; `the drill task's output is incomplete` (approved, Luna pass 5; plan 3 Task 7 fix 2). On stderr |
### AWS adapter diagnostics: `internal/mediaaws` (plan 3 Task 9)
@@ -673,30 +688,31 @@ for whoever deploys the console and are not listed here.
| Key | Text |
|---|---|
-| `engine.aws.error` | `media: %s: %s`, an operation (`ecs RunTask`, `ecs DescribeTasks`, `ecs ListTasks`, `ecs StopTask`, `ecs DescribeTaskDefinition`, `sts AssumeRole`, `assume the conversion role`, `presign a transfer`, `grant`, `store bucket`, `bucket settings`, `load AWS configuration`, or `s3 ` and the S3 call) and one of the `engine.aws.cause.*` or `engine.aws.grant.*` texts (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.canceled` | `canceled` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.timeout` | `timed out` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.api` | `%s (HTTP %d)` or `%s` (an AWS error code), or `HTTP %d` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.transport` | `the request failed before an answer came back` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.task_unreadable` | `a task could not be read: %s`, `%s` one of the `engine.aws.failure.*` words, never the reason ECS gave (pending Luna pass; plan 3 Task 9, branch review round 1) |
-| `engine.aws.failure.known` | The words shown for a failure reason ECS gave that this console recognises: `MISSING`, `RESOURCE:CPU`, `RESOURCE:MEMORY`, `RESOURCE:PORTS`, `RESOURCE:PORTS_TCP`, `RESOURCE:PORTS_UDP`, `RESOURCE:ENI`, `RESOURCE:GPU`, `RESOURCE (a resource this console does not name)`, `Capacity is unavailable`, `AGENT`, `ATTRIBUTE`, `LOCATION` (pending Luna pass; branch review round 1) |
-| `engine.aws.failure.unrepeated` | `the engine gave a reason this console does not repeat`, for any other reason; `no reason reported` for an empty one (pending Luna pass; branch review round 1) |
-| `engine.aws.cause.other_revision` | `the answer is not about the revision asked for` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.no_etag` | `the answer holds no ETag` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.listed_key` | `a listed key is not URL encoded` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.outside_derived` | `refused a key outside derived/` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.canonical_rule` | `the canonical rule cannot be read` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.no_credentials` | `media: sts AssumeRole: the answer holds no complete credentials` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.no_expiry` | `the session has no expiry` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.policy` | `the session policy cannot be built` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.cause.store_bucket` | `the bucket is not a bucket name`, `the bucket is outside this deployment's store prefix` (pending Luna pass; plan 3 Task 9 fix 1) |
-| `engine.aws.cause.no_account` | `no account to expect as the bucket's owner` (pending Luna pass; plan 3 Task 9 fix 1) |
-| `engine.aws.grant.request` | `the execution is not 32 hex characters`, `the source key is not valid`, `the source ETag is not valid`, `the output prefix is not a directory under derived/`, `the grant does not name %d outputs`, `an output's name or content type is not one the engine writes` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.grant.presign` | `the presigned transfers do not share one credential`, `an output's URL is not under the output prefix`, `a presigned URL does not have the expected shape`, `a presigned URL does not sign the expected headers` (pending Luna pass; plan 3 Task 9) |
-| `engine.aws.rejected` | The reason in `engine rejected the launch: %s`: an AWS error code, `HTTP 429`, one of the `engine.aws.failure.*` words, `no task definition for this class`, `no task and no failure reported`, or `the API refused the request` (pending Luna pass; plan 3 Task 9, branch review round 1) |
-| `console.media.off_at_boot` | `console: media conversion is off until the cloud answers; trying again in the background: %v`, logged once at boot when the cloud account cannot be read or a client cannot be built (changed in branch review round 1: the console retries the wiring instead of waiting for the next start). `%v` is `the cloud account could not be reached: <step>: <cause>`. The step is `sts GetCallerIdentity`, `build the S3 client` or `build the conversion engine`; the cause is one of the `engine.aws.cause.*` texts, never the error's own message (pending Luna pass; plan 3 Task 10 fix 2) |
-| `console.media.on_after_retry` | `console: media conversion is on: the cloud answered`, logged once when the background retry wires media after `console.media.off_at_boot` (pending Luna pass; branch review round 1) |
-| `console.media.retry_refused` | `console: media conversion stays off: %v`, logged once when the background retry finds a setting that is wrong (the engine's account is not the console's, or its limits are refused); `%v` names the setting, never its value (pending Luna pass; branch review round 1) |
+| `engine.aws.error` | `media: %s: %s`, an operation (`ecs RunTask`, `ecs DescribeTasks`, `ecs ListTasks`, `ecs StopTask`, `ecs DescribeTaskDefinition`, `sts AssumeRole`, `assume the conversion role`, `presign a transfer`, `grant`, `store bucket`, `bucket settings`, `load AWS configuration`, or `s3 ` and the S3 call) and one of the `engine.aws.cause.*` or `engine.aws.grant.*` texts (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.canceled` | `canceled` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.timeout` | `timed out` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.api` | `%s (HTTP %d)` or `%s` (an AWS error code), or `HTTP %d` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.transport` | `the request failed before an answer came back` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.task_unreadable` | `a task could not be read: %s`, `%s` one of the `engine.aws.failure.*` words, never the reason ECS gave (approved, Luna pass 5; plan 3 Task 9, branch review round 1) |
+| `engine.aws.failure.known` | The words shown for a failure reason ECS gave that this console recognises: `MISSING`, `RESOURCE:CPU`, `RESOURCE:MEMORY`, `RESOURCE:PORTS`, `RESOURCE:PORTS_TCP`, `RESOURCE:PORTS_UDP`, `RESOURCE:ENI`, `RESOURCE:GPU`, `RESOURCE (a resource this console does not name)`, `Capacity is unavailable`, `AGENT`, `ATTRIBUTE`, `LOCATION` (approved, Luna pass 5; branch review round 1) |
+| `engine.aws.failure.unrepeated` | `the engine gave a reason this console does not repeat`, for any other reason; `no reason reported` for an empty one (approved, Luna pass 5; branch review round 1) |
+| `engine.aws.cause.other_revision` | `the answer is not about the revision asked for` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.no_etag` | `the answer holds no ETag` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.listed_key` | `a listed key is not URL encoded` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.outside_derived` | `refused a key outside derived/` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.canonical_rule` | `the canonical rule cannot be read` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.no_credentials` | `media: sts AssumeRole: the answer holds no complete credentials` (approved, Luna pass 5; plan 3 Task 9). Not logged as written today: the grant replaces any error that is not the adapter's own, so this case reaches the log as `media: assume the conversion role: the request failed before an answer came back` (a follow-up in `media-conversion-followups.md`) |
+| `engine.aws.cause.no_expiry` | `the session has no expiry` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.policy` | `the session policy cannot be built` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.cause.store_bucket` | `the bucket is not a bucket name`, `the bucket is outside this deployment's store prefix` (approved, Luna pass 5; plan 3 Task 9 fix 1) |
+| `engine.aws.cause.no_account` | `no account to expect as the bucket's owner` (approved, Luna pass 5; plan 3 Task 9 fix 1) |
+| `engine.aws.grant.request` | `the execution is not 32 hex characters`, `the source key is not valid`, `the source ETag is not valid`, `the output prefix is not a directory under derived/`, `the grant does not name %d outputs`, `an output's name or content type is not one the engine writes` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.grant.presign` | `the presigned transfers do not share one credential`, `an output's URL is not under the output prefix`, `a presigned URL does not have the expected shape`, `a presigned URL does not sign the expected headers` (approved, Luna pass 5; plan 3 Task 9) |
+| `engine.aws.rejected` | `engine rejected the launch: %s`; `engine rejected the launch (retryable): %s`. The reason: an AWS error code, `HTTP 429`, one of the `engine.aws.failure.*` words, `no task definition for this class`, `no task and no failure reported`, or `the API refused the request` (approved, Luna pass 5; plan 3 Task 9, branch review round 1) |
+| `console.media.off_at_boot` | `console: media conversion is off until the cloud answers; trying again in the background: %v`, logged once at boot when the cloud account cannot be read or a client cannot be built (changed in branch review round 1: the console retries the wiring instead of waiting for the next start). `%v` is `the cloud account could not be reached: <step>: <cause>`. The step is `sts GetCallerIdentity`, `build the S3 client` or `build the conversion engine`; the cause is one of the `engine.aws.cause.*` texts, never the error's own message (approved, Luna pass 5; plan 3 Task 10 fix 2) |
+| `console.media.on_after_retry` | `console: media conversion is on: the cloud answered`, logged once when the background retry wires media after `console.media.off_at_boot` (approved, Luna pass 5; branch review round 1) |
+| `console.media.retry_refused` | `console: media conversion stays off: %v`, logged once when the background retry finds a setting that is wrong (the engine's account is not the console's, or its limits are refused); `%v` is the refusal the boot would have stopped on: it names the setting, and an account mismatch quotes both account IDs; never a credential (approved, Luna pass 5; branch review round 1) |
+| `console.media.launch_cancelled` | `media jobs: launch %s: grant: %v; the launch was cancelled, back to queued`, `media jobs: launch %s: %v before RunTask; the launch was cancelled, back to queued`, logged when the console stops during a launch (spec A5): the row goes back to `queued`, uncharged, without using its one retry. `%s` is the job (account/app/id); `%v` is the grant's `engine.aws.error` text in the first, Go's context error in the second (approved, Luna pass 5; A5) |
### The media-engine module (plan 3 Task 11)
@@ -705,17 +721,17 @@ reaper's lines reach only the task's stop reason and the function's own log.
| Key | Text |
|---|---|
-| `infra.media_engine.readme` | The whole of `infra/modules/media-engine/README.md` (pending Luna pass; plan 3 Task 11) |
-| `infra.modules_readme.media_engine` | The `media-engine` section of `infra/modules/README.md` (pending Luna pass; plan 3 Task 11) |
-| `infra.media_engine.readme.rollout` | The `Change the image` and `Roll back` sections of `infra/modules/media-engine/README.md`, and the sentence on deregistering revisions under `Removing the module` (pending Luna pass; plan 3 Task 11 fix 1) |
-| `infra.media_engine.readme.transfers_gate` | The last activation check in `infra/modules/media-engine/README.md`, on transfers resolving and the ECR image pull (pending Luna pass; plan 3 Task 11 fix 1) |
-| `infra.media_engine.descriptions` | Every variable and output `description` in `infra/modules/media-engine/variables.tf` and `outputs.tf` (pending Luna pass; plan 3 Task 11) |
-| `infra.media_engine.refused.variables` | Every `error_message` in `infra/modules/media-engine/variables.tf` (pending Luna pass; plan 3 Task 11) |
-| `infra.media_engine.refused.region` | `The media engine must run in the store region: region and store_region differ.` (pending Luna pass; plan 3 Task 11) |
-| `infra.media_engine.refused.drill_account` | `The drill's foreign principal must be in another account.` (pending Luna pass; plan 3 Task 11) |
-| `engine.reaper.stop_reason` | `carlos media reaper: older than %d minutes`, the stop reason ECS records. `%d` is `MAX_AGE_MINUTES` (pending Luna pass; plan 3 Task 11) |
-| `engine.reaper.undescribed` | `carlos media reaper: a task could not be described` (pending Luna pass; plan 3 Task 11) |
-| `engine.reaper.not_stopped` | `carlos media reaper: %d of %d tasks were not stopped` (pending Luna pass; plan 3 Task 11) |
+| `infra.media_engine.readme` | The whole of `infra/modules/media-engine/README.md` (approved, Luna pass 5; plan 3 Task 11) |
+| `infra.modules_readme.media_engine` | The `media-engine` section of `infra/modules/README.md` (approved, Luna pass 5; plan 3 Task 11) |
+| `infra.media_engine.readme.rollout` | The `Change the image` and `Roll back` sections of `infra/modules/media-engine/README.md`, and the sentence on deregistering revisions under `Removing the module` (approved, Luna pass 5; plan 3 Task 11 fix 1) |
+| `infra.media_engine.readme.transfers_gate` | The last activation check in `infra/modules/media-engine/README.md`, on transfers resolving and the ECR image pull (approved, Luna pass 5; plan 3 Task 11 fix 1) |
+| `infra.media_engine.descriptions` | Every variable and output `description` in `infra/modules/media-engine/variables.tf` and `outputs.tf` (approved, Luna pass 5; plan 3 Task 11) |
+| `infra.media_engine.refused.variables` | Every `error_message` in `infra/modules/media-engine/variables.tf` (approved, Luna pass 5; plan 3 Task 11) |
+| `infra.media_engine.refused.region` | `The media engine must run in the store region: region and store_region differ.` (approved, Luna pass 5; plan 3 Task 11) |
+| `infra.media_engine.refused.drill_account` | `The drill's foreign principal must be in another account.` (approved, Luna pass 5; plan 3 Task 11) |
+| `engine.reaper.stop_reason` | `carlos media reaper: older than %d minutes`, the stop reason ECS records. `%d` is `MAX_AGE_MINUTES` (approved, Luna pass 5; plan 3 Task 11) |
+| `engine.reaper.undescribed` | `carlos media reaper: a task could not be described` (approved, Luna pass 5; plan 3 Task 11) |
+| `engine.reaper.not_stopped` | `carlos media reaper: %d of %d tasks were not stopped` (approved, Luna pass 5; plan 3 Task 11) |
### The region-host store_conversion switch (plan 3 Task 12)
@@ -724,15 +740,15 @@ refusal, for whoever deploys it.
| Key | Text |
|---|---|
-| `infra.region_host.readme.store_conversion` | The `Media conversion and browser uploads` section of `infra/modules/region-host/README.md`, including the prefix rule and the customer-managed policy paragraphs (pending Luna pass; plan 3 Task 12, fix 1) |
-| `infra.region_host.store_conversion.description` | The `description` of `variable "store_conversion"` in `infra/modules/region-host/variables.tf` (pending Luna pass; plan 3 Task 12) |
-| `infra.region_host.store_conversion.refused` | `store_conversion needs store_bucket_prefix: with no prefix there are no object stores on this deployment to convert, and the grant would name every bucket in the account.` (pending Luna pass; plan 3 Task 12) |
-| `infra.region_host.store_conversion.refused_prefix` | `store_conversion needs a dedicated store_bucket_prefix: lower-case letters, digits and hyphens, ending in -store-, such as carlos-store-. A broader prefix such as carlos- can match the platform's own buckets, and this grant can replace the CORS, lifecycle and tag settings of every bucket it matches.` (pending Luna pass; plan 3 Task 12 fix 1) |
-| `infra.region_host.store_conversion.refused_overlap` | `store_conversion refuses a store_bucket_prefix that matches the deployment, data or sibling staging buckets, because this grant can replace the CORS, lifecycle and tag settings of every bucket it matches. Choose a prefix none of those bucket names start with.` (pending Luna pass; plan 3 Task 12 fix 1) |
-| `infra.region_host.store_conversion.refused_fleet_overlap` | `store_conversion refuses a store_bucket_prefix that overlaps managed_fleet_bucket_prefix, even with managed fleets off, because fleet buckets outlive the switch and this grant can replace the CORS, lifecycle and tag settings of every bucket it matches. Choose prefixes where neither starts with the other.` (pending Luna pass; plan 3 Task 12 fix 2) |
-| `infra.region_host.store_conversion.refused_inline_fleets` | `store_conversion with managed fleets on needs managed_fleets_inline_retired = true, so the inline copy of the managed fleet grant stops taking up the console role's limited inline policy space. Apply once with it false to attach the managed copy, then set it true and apply again.` (pending Luna pass; plan 3 Task 12 fix 2) |
-| `infra.region_host.managed_fleets.refused_size` | `The managed fleet grant has too many regions for a customer-managed policy (6,144 characters), so its inline copy cannot be retired yet. Set managed_fleets_inline_retired back to false, or name fewer managed fleet regions, subnets or security groups.` (pending Luna pass; plan 3 Task 12 fix 3) |
-| `infra.region_host.managed_fleets.refused_inline_total` | Once the inline copy is retired: `This host role's inline policies exceed IAM's 10,240-character total. Turn off a grant this host does not need.` Before: `With the managed fleet grant this host role's inline policies exceed IAM's 10,240-character total. Name fewer managed fleet regions, subnets or security groups, turn off a grant this host does not need, or retire the inline copy (managed_fleets_inline_retired).` (pending Luna pass; plan 3 Task 12 fix 3) |
-| `infra.region_host.managed_fleets_inline_retired.description` | The `description` of `variable "managed_fleets_inline_retired"` in `infra/modules/region-host/variables.tf` (pending Luna pass; plan 3 Task 12 fix 2) |
-| `infra.region_host.readme.managed_fleets_move` | The `Moving the managed fleet grant` section of `infra/modules/region-host/README.md`, and the fleet prefix sentences in `Media conversion and browser uploads` (pending Luna pass; plan 3 Task 12 fix 2) |
-| `infra.media_engine.readme.console_policy` | The paragraph on the customer-managed console policy in `infra/modules/media-engine/README.md`, before `Region` (pending Luna pass; plan 3 Task 12 fix 1) |
+| `infra.region_host.readme.store_conversion` | The `Media conversion and browser uploads` section of `infra/modules/region-host/README.md`, including the prefix rule and the customer-managed policy paragraphs (approved, Luna pass 5; plan 3 Task 12, fix 1) |
+| `infra.region_host.store_conversion.description` | The `description` of `variable "store_conversion"` in `infra/modules/region-host/variables.tf` (approved, Luna pass 5; plan 3 Task 12) |
+| `infra.region_host.store_conversion.refused` | `store_conversion needs store_bucket_prefix: with no prefix there are no object stores on this deployment to convert, and the grant would name every bucket in the account.` (approved, Luna pass 5; plan 3 Task 12) |
+| `infra.region_host.store_conversion.refused_prefix` | `store_conversion needs a dedicated store_bucket_prefix: lower-case letters, digits and hyphens, ending in -store-, such as carlos-store-. A broader prefix such as carlos- can match the platform's own buckets, and this grant can replace the CORS, lifecycle and tag settings of every bucket it matches.` (approved, Luna pass 5; plan 3 Task 12 fix 1) |
+| `infra.region_host.store_conversion.refused_overlap` | `store_conversion refuses a store_bucket_prefix that matches the deployment, data or sibling staging buckets, because this grant can replace the CORS, lifecycle and tag settings of every bucket it matches. Choose a prefix none of those bucket names start with.` (approved, Luna pass 5; plan 3 Task 12 fix 1) |
+| `infra.region_host.store_conversion.refused_fleet_overlap` | `store_conversion refuses a store_bucket_prefix that overlaps managed_fleet_bucket_prefix, even with managed fleets off, because fleet buckets outlive the switch and this grant can replace the CORS, lifecycle and tag settings of every bucket it matches. Choose prefixes where neither starts with the other.` (approved, Luna pass 5; plan 3 Task 12 fix 2) |
+| `infra.region_host.store_conversion.refused_inline_fleets` | `store_conversion with managed fleets on needs managed_fleets_inline_retired = true, so the inline copy of the managed fleet grant stops taking up the console role's limited inline policy space. Apply once with it false to attach the managed copy, then set it true and apply again.` (approved, Luna pass 5; plan 3 Task 12 fix 2) |
+| `infra.region_host.managed_fleets.refused_size` | `The managed fleet grant has too many regions for a customer-managed policy (6,144 characters), so its inline copy cannot be retired yet. Set managed_fleets_inline_retired back to false, or name fewer managed fleet regions, subnets or security groups.` (approved, Luna pass 5; plan 3 Task 12 fix 3) |
+| `infra.region_host.managed_fleets.refused_inline_total` | Once the inline copy is retired: `This host role's inline policies exceed IAM's 10,240-character total. Turn off a grant this host does not need.` Before: `With the managed fleet grant this host role's inline policies exceed IAM's 10,240-character total. Name fewer managed fleet regions, subnets or security groups, turn off a grant this host does not need, or retire the inline copy (managed_fleets_inline_retired).` (approved, Luna pass 5; plan 3 Task 12 fix 3) |
+| `infra.region_host.managed_fleets_inline_retired.description` | The `description` of `variable "managed_fleets_inline_retired"` in `infra/modules/region-host/variables.tf` (approved, Luna pass 5; plan 3 Task 12 fix 2) |
+| `infra.region_host.readme.managed_fleets_move` | The `Moving the managed fleet grant` section of `infra/modules/region-host/README.md`, and the fleet prefix sentences in `Media conversion and browser uploads` (approved, Luna pass 5; plan 3 Task 12 fix 2) |
+| `infra.media_engine.readme.console_policy` | The paragraph on the customer-managed console policy in `infra/modules/media-engine/README.md`, before `Region` (approved, Luna pass 5; plan 3 Task 12 fix 1) |
diff --git a/docs/superpowers/notes/media-conversion-followups.md b/docs/superpowers/notes/media-conversion-followups.md
index 4d3a48910..6e09efa56 100644
--- a/docs/superpowers/notes/media-conversion-followups.md
+++ b/docs/superpowers/notes/media-conversion-followups.md
@@ -10,3 +10,4 @@ starts a review round; each is a later change.
- Warn at boot when an engine is set and the default plan's `media_minutes_month` is 0, which means no limit: `cmd/console/media.go:216` (`mediaConfig`), `internal/console/mediawire.go:229` (`mediaAllowance`).
- The refusal gate does not check the codec container's environment, so a hand-registered revision could set `CARLOS_MEDIA_FFMPEG` (Task 13): `internal/media/gate.go:109`.
- Remove `managed_fleets_inline_retired` once every root has retired the inline copy: `infra/modules/region-host/variables.tf:504`.
+- An AssumeRole answer with incomplete credentials reaches the log as the generic `media: assume the conversion role: the request failed before an answer came back`, not the deck's `engine.aws.cause.no_credentials`, because `assumeSession` replaces any error that is not an `adapterError`; return an `adapterError` there (Luna pass 5 flag): `internal/mediaaws/config.go:230`, `internal/mediaaws/grants.go:322`.
diff --git a/infra/modules/README.md b/infra/modules/README.md
index dc87d4629..235b24de4 100644
--- a/infra/modules/README.md
+++ b/infra/modules/README.md
@@ -139,7 +139,7 @@ Outputs: `clamd_addr` (set as the console's `CARLOS_CLAMD_ADDR`), `stream_max_by
## media-engine
-Media conversion: one Fargate task per conversion, in a private VPC with no route to the internet. The module creates the image repository, the network and its endpoints, a DNS firewall, the IAM roles, a task definition for each preset and class, and a reaper for tasks left running too long. Apply it once to create the repository, push the image, then apply again with the image's digest. The module's `README.md` has the steps and the checks to pass before turning conversion on.
+Media conversion: one Fargate task per conversion, in a private VPC with no route to the internet. The module creates the image repository, the network and its endpoints, a DNS firewall, the IAM roles, a task definition for each preset and class, and a reaper for tasks left running too long. Apply it once to create the repository, push the image, then apply again with the image's `digest`, `built_at` and `ffmpeg` values from `image.json`. The module's `README.md` has the steps and the checks to pass before turning conversion on.
Outputs: `carlos_media_engine` (set as the console's `CARLOS_MEDIA_ENGINE`), `repository_url`, `cluster_arn`, `conversion_role_arn`.
diff --git a/infra/modules/media-engine/README.md b/infra/modules/media-engine/README.md
index 244f05599..bc3215279 100644
--- a/infra/modules/media-engine/README.md
+++ b/infra/modules/media-engine/README.md
@@ -62,9 +62,12 @@ The image has to be pushed to a repository that the first apply creates.
## Connect the console
Set the console’s `CARLOS_MEDIA_ENGINE` to the `carlos_media_engine` output and
-restart the console. The console also needs `CARLOS_STORE_CONVERSION=1` and a
-store backend in the engine’s region, account and bucket prefix. While
-`CARLOS_MEDIA_ENGINE` is unset, the media API answers 503.
+restart the console. If the cloud does not answer during that boot, conversion
+stays off. The console retries the wiring in the background and turns
+conversion on when the cloud answers. The console also needs
+`CARLOS_STORE_CONVERSION=1` and a store backend in the engine’s region, account
+and bucket prefix. While `CARLOS_MEDIA_ENGINE` is unset, the conversion API
+answers 503.
The other outputs are `repository_url`, `cluster_arn` and `conversion_role_arn`.
diff --git a/infra/modules/region-host/README.md b/infra/modules/region-host/README.md
index f16c4708a..db045e38d 100644
--- a/infra/modules/region-host/README.md
+++ b/infra/modules/region-host/README.md
@@ -118,7 +118,7 @@ The grant is a customer-managed policy attached to the role, so it does not coun
The managed fleet grant is a customer-managed policy attached to the console’s role, so it does not count toward IAM’s 10,240-character limit on the role’s inline policies. A role set up by an earlier release holds it as an inline policy. To move it without a moment where the role lacks the grant, apply twice:
-1. Upgrade and apply with `managed_fleets_inline_retired` left at `false`. The role keeps its inline copy and gains the managed one.
+1. Upgrade and apply with `managed_fleets_inline_retired` left at `false`. If the grant fits IAM’s 6,144-character customer-managed policy limit, the role keeps its inline copy and gains the managed one. If it does not fit, the module keeps the inline copy and refuses step 2 until the grant fits.
2. Set `managed_fleets_inline_retired = true` and apply again. The inline copy goes.
`store_conversion` with managed fleets on is refused until step 2. `managed_fleets_inline_retired` is temporary, and goes once every root has set it.
diff --git a/infra/modules/region-host/variables.tf b/infra/modules/region-host/variables.tf
index b45b42c51..0a8b88109 100644
--- a/infra/modules/region-host/variables.tf
+++ b/infra/modules/region-host/variables.tf
@@ -301,7 +301,7 @@ variable "store_scanning" {
}
variable "store_conversion" {
- description = "Let this host's role check and set the bucket settings media conversion and browser uploads rely on, for buckets under store_bucket_prefix, and let store users list and abort their multipart uploads. Off by default: the role gets no new grant and the store user boundary does not change. Set it only on the box that runs the console, together with CARLOS_STORE_CONVERSION=1 on the console. Requires a dedicated store_bucket_prefix ending in -store-, such as carlos-store-, that none of the deployment, data or sibling staging buckets start with."
+ description = "Let this host's role check and set the bucket settings media conversion and browser uploads rely on, for buckets under store_bucket_prefix, and let store users list and abort their multipart uploads. Off by default: the role gets no new grant and the store user boundary does not change. Set it only on the box that runs the console, together with CARLOS_STORE_CONVERSION=1 on the console. Requires a dedicated store_bucket_prefix ending in -store-, such as carlos-store-, that none of the deployment, data or sibling staging buckets start with and that does not overlap managed_fleet_bucket_prefix. With managed fleets on, managed_fleets_inline_retired must be true."
type = bool
default = false
}
@@ -502,7 +502,7 @@ variable "managed_fleets_regions" {
}
variable "managed_fleets_inline_retired" {
- description = "Temporary, for moving the managed fleet grant to a customer-managed policy without a gap. Leave it false for the first apply after upgrading: the role keeps its inline copy of the grant and gains the managed one. Then set it true and apply again to remove the inline copy. store_conversion with managed fleets on requires it to be true. This variable goes once every root has set it."
+ description = "Temporary, for moving the managed fleet grant to a customer-managed policy without a gap. Leave it false for the first apply after upgrading: the role keeps its inline copy and gains the managed one when the grant fits IAM's 6,144-character customer-managed policy limit. If the grant is too large, the module keeps the inline copy and refuses setting it true until the grant fits. Then set it true and apply again to remove the inline copy. store_conversion with managed fleets on requires it to be true. This variable goes once every root has set it."
type = bool
default = false
nullable = false
diff --git a/internal/console/mediapass.go b/internal/console/mediapass.go
index fa62f6b50..b14c0a7d3 100644
--- a/internal/console/mediapass.go
+++ b/internal/console/mediapass.go
@@ -80,7 +80,7 @@ const (
)
// The deck's console.media.on_after_retry and console.media.retry_refused
-// (pending Luna pass), each logged at most once.
+// (approved, Luna pass 5), each logged at most once.
const (
mediaOnAfterRetry = "console: media conversion is on: the cloud answered"
mediaRetryRefused = "console: media conversion stays off: %v"
diff --git a/internal/mediahandler/download.go b/internal/mediahandler/download.go
index e99b83d61..a00998529 100644
--- a/internal/mediahandler/download.go
+++ b/internal/mediahandler/download.go
@@ -157,11 +157,11 @@ func download(ctx context.Context, cfg Config, p media.Payload, dst string) (err
return err
}
if resumes == maxResumes {
- // engine.download.gave_up (pending Luna pass).
+ // engine.download.gave_up (approved, Luna pass 5).
cfg.Logf("source download: broke %d times; giving up", maxResumes+1)
return jobError{media.CodeUnreadable}
}
- // engine.download.resume (pending Luna pass).
+ // engine.download.resume (approved, Luna pass 5).
cfg.Logf("source download: broke after %d bytes; resume %d of %d", d.written, resumes+1, maxResumes)
if err := cfg.wait(ctx, resumeDelay(resumes)); err != nil {
return err
diff --git a/internal/mediahandler/ffmpeg.go b/internal/mediahandler/ffmpeg.go
index fd71eea70..c0e9171b7 100644
--- a/internal/mediahandler/ffmpeg.go
+++ b/internal/mediahandler/ffmpeg.go
@@ -307,19 +307,19 @@ func ffmpegOutcome(ctx context.Context, cfg Config, what string, err error, tail
case errors.As(err, &je) && je.code == media.CodeEngineFailed:
return err
case killedBySIGKILL(err):
- // engine.encode.killed (pending Luna pass).
+ // engine.encode.killed (approved, Luna pass 5).
cfg.Logf("codec: ffmpeg (%s) was killed by SIGKILL, likely out of memory", what)
return jobError{media.CodeEngineFailed}
case cfg.diskFull(cfg.Scratch):
- // engine.encode.scratch_full (pending Luna pass).
+ // engine.encode.scratch_full (approved, Luna pass 5).
cfg.Logf("codec: ffmpeg (%s) failed with the scratch disk full", what)
return jobError{media.CodeEngineFailed}
case !logTail:
- // engine.encode.failed_unlogged (pending Luna pass).
- cfg.Logf("codec: ffmpeg (%s) failed; its output is not logged", what)
+ // engine.encode.failed_unlogged (approved, Luna pass 5).
+ cfg.Logf("codec: ffmpeg (%s) failed; its diagnostics are not logged", what)
return jobError{media.CodeUnreadable}
}
- // engine.encode.failed (pending Luna pass).
+ // engine.encode.failed (approved, Luna pass 5).
cfg.Logf("codec: ffmpeg (%s) failed: %q", what, tail[max(0, len(tail)-encodeLogTail):])
return jobError{media.CodeUnreadable}
}
diff --git a/internal/mediahandler/loudness.go b/internal/mediahandler/loudness.go
index 939410abd..654c1e897 100644
--- a/internal/mediahandler/loudness.go
+++ b/internal/mediahandler/loudness.go
@@ -176,7 +176,7 @@ func meter(ctx context.Context, cfg Config, what string, args []string) (inputI,
}
inputI, inputTP, measurable, err = parseMeter(tail)
if err != nil {
- // engine.loudness.unmeasured (pending Luna pass). err is one of
+ // engine.loudness.unmeasured (approved, Luna pass 5). err is one of
// parseMeter's fixed reasons.
cfg.Logf("codec: ffmpeg (%s) gave no measurement: %v", what, err)
return 0, 0, false, jobError{media.CodeUnreadable}
@@ -195,7 +195,7 @@ func measureLoudness(ctx context.Context, cfg Config, p media.Payload, demuxer s
return 0, err
}
gain := gainDB(inputI, inputTP, measurable)
- // engine.loudness.gain (pending Luna pass).
+ // engine.loudness.gain (approved, Luna pass 5).
cfg.Logf("codec: loudness %.1f LUFS, true peak %.1f dBTP, measurable %t; gain %.2f dB", inputI, inputTP, measurable, gain)
return gain, nil
}
@@ -218,7 +218,7 @@ func encodeAudioUnderCeiling(ctx context.Context, cfg Config, p media.Payload, d
return gain, err
}
second := floorHundredth(gain - over - reencodeMarginDB)
- // engine.loudness.over_ceiling (pending Luna pass).
+ // engine.loudness.over_ceiling (approved, Luna pass 5).
cfg.Logf("codec: audio.mp4 peaks %.2f dB over the %.1f dBTP ceiling; encoding again at %.2f dB", over, ceilingDBTP, second)
if err := os.Remove(outPath(cfg, audioNames[0])); err != nil && !errors.Is(err, fs.ErrNotExist) {
return gain, packageFailed(cfg, audioNames[0], err)
@@ -230,7 +230,7 @@ func encodeAudioUnderCeiling(ctx context.Context, cfg Config, p media.Payload, d
return second, err
}
if over > 0 {
- // engine.loudness.still_over (pending Luna pass).
+ // engine.loudness.still_over (approved, Luna pass 5).
cfg.Logf("codec: audio.mp4 still peaks %.2f dB over the ceiling after the second encode; kept", over)
}
return second, nil
diff --git a/internal/mediahandler/peaks.go b/internal/mediahandler/peaks.go
index d664189c0..9e6c32e3e 100644
--- a/internal/mediahandler/peaks.go
+++ b/internal/mediahandler/peaks.go
@@ -128,7 +128,7 @@ func makePeaks(ctx context.Context, cfg Config, p media.Payload, demuxer string,
defer func() { _ = tmp.Remove(peaksRaw) }()
lfi, err := tmp.Lstat(peaksRaw)
if errors.Is(err, fs.ErrNotExist) {
- // engine.encode.empty (pending Luna pass).
+ // engine.encode.empty (approved, Luna pass 5).
cfg.Logf("codec: ffmpeg wrote no sample to %s", peaksRaw)
return jobError{media.CodeUnreadable}
}
diff --git a/internal/mediahandler/playlist.go b/internal/mediahandler/playlist.go
index 7cfd969a5..29a7dd711 100644
--- a/internal/mediahandler/playlist.go
+++ b/internal/mediahandler/playlist.go
@@ -100,7 +100,7 @@ func packageOutput(cfg Config, p media.Payload, mediaName, playlistName string)
}
initLen, frags, durationMS, err := readFMP4(f, fi.Size())
if errors.Is(err, errNoFragments) {
- // engine.encode.empty (pending Luna pass).
+ // engine.encode.empty (approved, Luna pass 5).
cfg.Logf("codec: ffmpeg wrote no sample to %s", mediaName)
return 0, jobError{media.CodeUnreadable}
}
@@ -125,7 +125,7 @@ func packageOutput(cfg Config, p media.Payload, mediaName, playlistName string)
// written and answers engine_failed. what is an output's name; err is
// the system's or readFMP4's, which quotes no byte of the file.
func packageFailed(cfg Config, what string, err error) error {
- // engine.encode.unusable (pending Luna pass).
+ // engine.encode.unusable (approved, Luna pass 5).
cfg.Logf("codec: %s: %v", what, err)
return jobError{media.CodeEngineFailed}
}
diff --git a/internal/mediahandler/probe.go b/internal/mediahandler/probe.go
index f14c882f2..f76045e37 100644
--- a/internal/mediahandler/probe.go
+++ b/internal/mediahandler/probe.go
@@ -171,13 +171,13 @@ func probe(ctx context.Context, cfg Config, demuxer, preset string) (probeFacts,
return probeFacts{}, err
}
if out.over {
- // engine.probe.unusable (pending Luna pass).
+ // engine.probe.unusable (approved, Luna pass 5).
cfg.Logf("codec: ffprobe's answer is over %d bytes", maxProbeOutput)
return probeFacts{}, jobError{media.CodeUnreadable}
}
f, err := parseProbe(out.buf.Bytes(), preset)
if err != nil {
- // engine.probe.unparsable (pending Luna pass). err names a
+ // engine.probe.unparsable (approved, Luna pass 5). err names a
// field or a fixed reason, never a value.
cfg.Logf("codec: ffprobe's answer is unusable: %v", err)
return probeFacts{}, jobError{media.CodeUnreadable}
@@ -203,7 +203,7 @@ func probe(ctx context.Context, cfg Config, demuxer, preset string) (probeFacts,
return probeFacts{}, err
}
if f.DurationMS = pm.result(); f.DurationMS <= 0 {
- // engine.probe.no_duration (pending Luna pass).
+ // engine.probe.no_duration (approved, Luna pass 5).
cfg.Logf("codec: the source has no duration in its header or its packets")
return probeFacts{}, jobError{media.CodeUnreadable}
}
@@ -228,11 +228,11 @@ func probeFailed(ctx context.Context, cfg Config, tail []byte, err error) error
case errors.As(err, &je) && je.code == media.CodeEngineFailed:
return err
case errors.Is(err, context.DeadlineExceeded):
- // engine.probe.timeout (pending Luna pass).
+ // engine.probe.timeout (approved, Luna pass 5).
cfg.Logf("codec: ffprobe did not finish in time")
return jobError{media.CodeUnreadable}
}
- // engine.probe.failed (pending Luna pass). The tail is ffprobe's
+ // engine.probe.failed (approved, Luna pass 5). The tail is ffprobe's
// stderr at -loglevel error: its errors, never the payload.
cfg.Logf("codec: ffprobe failed: %q", tail[max(0, len(tail)-probeLogTail):])
return jobError{media.CodeUnreadable}
@@ -600,7 +600,7 @@ func check(f probeFacts, preset string, l media.JobLimits) error {
func inspectSource(ctx context.Context, cfg Config, p media.Payload) (demuxer string, f probeFacts, probed bool, err error) {
head, err := readHead(sourcePath(cfg))
if err != nil {
- // engine.codec.source_unopenable (pending Luna pass). The error
+ // engine.codec.source_unopenable (approved, Luna pass 5). The error
// names the scratch path only.
cfg.Logf("codec: the downloaded source cannot be read: %v", err)
return "", probeFacts{}, false, jobError{media.CodeEngineFailed}
diff --git a/internal/mediahandler/procs_linux.go b/internal/mediahandler/procs_linux.go
index 603664c7a..c6af62ae1 100644
--- a/internal/mediahandler/procs_linux.go
+++ b/internal/mediahandler/procs_linux.go
@@ -178,7 +178,7 @@ func childrenDead(cfg Config) error {
// childFailed logs why a child could not be run or cleaned up and
// answers engine_failed.
func childFailed(cfg Config, why string, err error) error {
- // engine.child.failed (pending Luna pass). why is fixed text or a
+ // engine.child.failed (approved, Luna pass 5). why is fixed text or a
// binary's path; err is the system's.
if err != nil {
cfg.Logf("codec: child process: %s: %v", why, err)
diff --git a/internal/mediahandler/procs_other.go b/internal/mediahandler/procs_other.go
index 9c4ecfa1c..f72c57c11 100644
--- a/internal/mediahandler/procs_other.go
+++ b/internal/mediahandler/procs_other.go
@@ -18,7 +18,7 @@ func runChild(ctx context.Context, cfg Config, name string, args []string, dir s
// runChildTo is runChild with the child's stdout; see runChild.
func runChildTo(_ context.Context, cfg Config, _ string, _ []string, _ string, _ io.Writer) ([]byte, error) {
- // engine.child.unsupported (pending Luna pass).
+ // engine.child.unsupported (approved, Luna pass 5).
cfg.Logf("codec: child processes need Linux")
return nil, jobError{media.CodeEngineFailed}
}
diff --git a/internal/mediahandler/result.go b/internal/mediahandler/result.go
index 9d5efe584..af7e3e922 100644
--- a/internal/mediahandler/result.go
+++ b/internal/mediahandler/result.go
@@ -18,7 +18,7 @@ import (
func writeResult(ctx context.Context, cfg Config, p media.Payload, r media.Result) error {
b, err := json.Marshal(r)
if err != nil || len(b) > media.MaxResultBytes {
- // engine.result.unmarshalable (pending Luna pass).
+ // engine.result.unmarshalable (approved, Luna pass 5).
cfg.Logf("codec: the result cannot be written as at most %d bytes of JSON", media.MaxResultBytes)
return jobError{media.CodeEngineFailed}
}
@@ -47,7 +47,7 @@ func ffmpegVersion(ctx context.Context, cfg Config) (string, error) {
v = parseVersion(out.buf.Bytes())
}
if v == "" {
- // engine.version.unknown (pending Luna pass).
+ // engine.version.unknown (approved, Luna pass 5).
cfg.Logf("codec: ffmpeg's version cannot be read; the result names none")
}
return v, nil
diff --git a/internal/mediahandler/run.go b/internal/mediahandler/run.go
index ebde392b5..ed81b496a 100644
--- a/internal/mediahandler/run.go
+++ b/internal/mediahandler/run.go
@@ -57,7 +57,7 @@ func Run(ctx context.Context, cfg Config, payload string) int {
defer stop()
p, err := parsePayload(payload)
if err != nil {
- // engine.codec.payload_refused (pending Luna pass). The reason
+ // engine.codec.payload_refused (approved, Luna pass 5). The reason
// is one of parsePayload's fixed strings, never a value from the
// payload.
cfg.Logf("codec: payload refused: %v", err)
@@ -69,7 +69,7 @@ func Run(ctx context.Context, cfg Config, payload string) int {
// runJob is Run's flow from the scratch to the result object.
func runJob(ctx context.Context, cfg Config, p media.Payload) error {
if err := prepareScratch(cfg.Scratch); err != nil {
- // engine.codec.scratch (pending Luna pass).
+ // engine.codec.scratch (approved, Luna pass 5).
cfg.Logf("codec: scratch directory unusable: %v", err)
return jobError{media.CodeEngineFailed}
}
@@ -164,7 +164,7 @@ func convertVideo(ctx context.Context, cfg Config, p media.Payload, demuxer stri
return 0, err
}
if _, err := os.Lstat(outPath(cfg, videoNames[2])); errors.Is(err, fs.ErrNotExist) {
- // engine.encode.no_frame (pending Luna pass).
+ // engine.encode.no_frame (approved, Luna pass 5).
cfg.Logf("codec: ffmpeg wrote no frame to %s", videoNames[2])
return 0, jobError{media.CodeUnreadable}
}
@@ -254,7 +254,7 @@ func deliver(ctx context.Context, cfg Config, p media.Payload, f probeFacts) ([]
names := media.OutputNames(p.Preset)
cs, err := collect(filepath.Join(cfg.Scratch, "out"), names, outputBounds(p))
if err != nil {
- // engine.collect.refused (pending Luna pass). err is an
+ // engine.collect.refused (approved, Luna pass 5). err is an
// outputRefused: an output's name and a fixed reason.
cfg.Logf("codec: %v", err)
return nil, err
@@ -291,24 +291,24 @@ func finish(ctx context.Context, cfg Config, p media.Payload, err error) int {
var unwritten resultUnwritten
switch {
case err == nil:
- // engine.codec.done (pending Luna pass).
+ // engine.codec.done (approved, Luna pass 5).
cfg.Logf("codec: done; outputs and result written")
return media.ExitDone
case ctx.Err() != nil:
- // engine.codec.stopped (pending Luna pass). Go's context error.
+ // engine.codec.stopped (approved, Luna pass 5). Go's context error.
cfg.Logf("codec: stopped: %v", ctx.Err())
return exitStopped
case errors.Is(err, errGrantExpired):
- // engine.codec.grant_expired (pending Luna pass).
+ // engine.codec.grant_expired (approved, Luna pass 5).
cfg.Logf("codec: the grant has expired; no result is written")
return media.ExitGrantExpired
case errors.As(err, &unwritten):
- // engine.codec.result_unwritten (pending Luna pass). Why is
+ // engine.codec.result_unwritten (approved, Luna pass 5). Why is
// logged where the PUT failed.
cfg.Logf("codec: converted, but the result could not be written")
return media.ExitFailed
case !errors.As(err, &je):
- // engine.codec.unexpected (pending Luna pass). The type alone:
+ // engine.codec.unexpected (approved, Luna pass 5). The type alone:
// an error's text could quote a URL (preflight F6).
cfg.Logf("codec: an unexpected %T ends the job", err)
je = jobError{media.CodeEngineFailed}
@@ -318,7 +318,7 @@ func finish(ctx context.Context, cfg Config, p media.Payload, err error) int {
if errors.As(err, &probed) {
facts = probed.facts
}
- // engine.codec.failed (pending Luna pass).
+ // engine.codec.failed (approved, Luna pass 5).
cfg.Logf("codec: failed: %s", je.code)
werr := writeResult(ctx, cfg, p, failureResult(p.Execution, je.code, facts))
switch {
@@ -332,7 +332,7 @@ func finish(ctx context.Context, cfg Config, p media.Payload, err error) int {
cfg.Logf("codec: the grant has expired; no result is written")
return media.ExitGrantExpired
default:
- // engine.codec.error_unwritten (pending Luna pass).
+ // engine.codec.error_unwritten (approved, Luna pass 5).
cfg.Logf("codec: the result naming %s could not be written", je.code)
}
return media.ExitFailed
diff --git a/internal/mediahandler/selftest.go b/internal/mediahandler/selftest.go
index f4802a477..32808f9fe 100644
--- a/internal/mediahandler/selftest.go
+++ b/internal/mediahandler/selftest.go
@@ -130,7 +130,7 @@ func Selftest(ctx context.Context, cfg Config, kind string, w io.Writer) error {
cfg = cfg.withDefaults()
dir, err := os.MkdirTemp(cfg.Scratch, "selftest-")
if err != nil {
- // engine.selftest.no_scratch (pending Luna pass).
+ // engine.selftest.no_scratch (approved, Luna pass 5).
fmt.Fprintf(w, "FAIL selftest: no directory in the scratch: %s\n", sysReason(err))
return err
}
@@ -147,11 +147,11 @@ func Selftest(ctx context.Context, cfg Config, kind string, w io.Writer) error {
_ = os.RemoveAll(caseDir)
if err != nil {
failed++
- // engine.selftest.fail (pending Luna pass).
+ // engine.selftest.fail (approved, Luna pass 5).
fmt.Fprintf(w, "FAIL %s: %v\n", c.name, err)
continue
}
- // engine.selftest.pass (pending Luna pass).
+ // engine.selftest.pass (approved, Luna pass 5).
fmt.Fprintf(w, "PASS %s\n", c.name)
}
if failed > 0 {
diff --git a/internal/mediahandler/selftesttls.go b/internal/mediahandler/selftesttls.go
index 50903de06..c3ba34701 100644
--- a/internal/mediahandler/selftesttls.go
+++ b/internal/mediahandler/selftesttls.go
@@ -43,11 +43,11 @@ func SelftestTLS(w io.Writer) error { return selftestTLS(w, nil) }
func selftestTLS(w io.Writer, roots *x509.CertPool) error {
err := verifySelftestChain(selftestS3Chain, roots)
if err != nil {
- // engine.selftest.fail (pending Luna pass).
+ // engine.selftest.fail (approved, Luna pass 5).
fmt.Fprintf(w, "FAIL %s: %v\n", selftestTLSCase, err)
return err
}
- // engine.selftest.pass (pending Luna pass).
+ // engine.selftest.pass (approved, Luna pass 5).
fmt.Fprintf(w, "PASS %s\n", selftestTLSCase)
return nil
}
@@ -85,7 +85,7 @@ func verifySelftestChain(chain []byte, roots *x509.CertPool) error {
case err == nil:
return nil
case errors.As(err, &unknown):
- return errors.New("no root this binary trusts signs S3's certificate")
+ return errors.New("no root trusted by this binary can verify S3's certificate")
}
return errors.New("S3's certificate does not verify")
}
diff --git a/internal/mediahandler/selftesttls_test.go b/internal/mediahandler/selftesttls_test.go
index 85059687b..9f2dd9dec 100644
--- a/internal/mediahandler/selftesttls_test.go
+++ b/internal/mediahandler/selftesttls_test.go
@@ -36,14 +36,14 @@ func TestSelftestChainVerifies(t *testing.T) {
if err := verifySelftestChain(selftestS3Chain, selftestIssuerRoots(t)); err != nil {
t.Fatalf("the chain under its own issuer: %v", err)
}
- if err := verifySelftestChain(selftestS3Chain, x509.NewCertPool()); err == nil || err.Error() != "no root this binary trusts signs S3's certificate" {
+ if err := verifySelftestChain(selftestS3Chain, x509.NewCertPool()); err == nil || err.Error() != "no root trusted by this binary can verify S3's certificate" {
t.Fatalf("no roots at all: %v", err)
}
if err := verifySelftestChain([]byte("not a chain"), nil); err == nil || err.Error() != "the embedded S3 chain does not parse" {
t.Fatalf("garbage: %v", err)
}
var out bytes.Buffer
- if err := selftestTLS(&out, x509.NewCertPool()); err == nil || out.String() != "FAIL tls-roots: no root this binary trusts signs S3's certificate\n" {
+ if err := selftestTLS(&out, x509.NewCertPool()); err == nil || out.String() != "FAIL tls-roots: no root trusted by this binary can verify S3's certificate\n" {
t.Fatalf("selftestTLS with no roots: %v %q", err, out.String())
}
out.Reset()
diff --git a/internal/mediahandler/upload.go b/internal/mediahandler/upload.go
index ed25061e1..57bb04706 100644
--- a/internal/mediahandler/upload.go
+++ b/internal/mediahandler/upload.go
@@ -32,7 +32,7 @@ const deniedMargin = 60 * time.Second
// HEAD to match exactly (mediajobs Track). See put for the rules.
func upload(ctx context.Context, cfg Config, p media.Payload, t media.Transfer, c collected) (etag string, err error) {
if t.Method != http.MethodPut || t.Name != c.Name || c.File == nil || c.Size < 1 {
- // engine.upload.mismatch (pending Luna pass).
+ // engine.upload.mismatch (approved, Luna pass 5).
cfg.Logf("codec: the upload of %s does not match its transfer", c.Name)
return "", jobError{media.CodeEngineFailed}
}
@@ -102,43 +102,43 @@ func put(ctx context.Context, cfg Config, p media.Payload, t media.Transfer, wha
}
}
if storeETag != "" && storeETag != sent {
- // engine.upload.other_bytes (pending Luna pass).
+ // engine.upload.other_bytes (approved, Luna pass 5).
cfg.Logf("codec: the store's ETag for %s is not the MD5 of the bytes sent", what)
return "", jobError{media.CodeEngineFailed}
}
return sent, nil
case http.StatusPreconditionFailed:
if broken {
- // engine.upload.exists_after_retry (pending Luna pass).
+ // engine.upload.exists_after_retry (approved, Luna pass 5).
cfg.Logf("codec: the store holds %s after a broken attempt; reported with this upload's MD5", what)
return hashAll(cfg, what, body())
}
- // engine.upload.exists (pending Luna pass).
+ // engine.upload.exists (approved, Luna pass 5).
cfg.Logf("codec: the store already holds %s", what)
return "", jobError{media.CodeEngineFailed}
case http.StatusForbidden:
if !cfg.Now().Before(expiry.Add(-deniedMargin)) {
- // engine.upload.expired (pending Luna pass).
+ // engine.upload.expired (approved, Luna pass 5).
cfg.Logf("codec: the store refused %s (403) at the grant's expiry", what)
return "", errGrantExpired
}
- // engine.upload.denied (pending Luna pass).
+ // engine.upload.denied (approved, Luna pass 5).
cfg.Logf("codec: the store refused %s (403) before the grant's expiry", what)
return "", storeDenied{}
case statusBroken, http.StatusConflict, http.StatusInternalServerError, http.StatusBadGateway,
http.StatusServiceUnavailable, http.StatusGatewayTimeout:
default:
- // engine.upload.status (pending Luna pass).
+ // engine.upload.status (approved, Luna pass 5).
cfg.Logf("codec: the store answered %d to %s", status, what)
return "", jobError{media.CodeEngineFailed}
}
if attempt == putRetries {
- // engine.upload.gave_up (pending Luna pass).
+ // engine.upload.gave_up (approved, Luna pass 5).
cfg.Logf("codec: the upload of %s broke %d times; giving up", what, putRetries+1)
return "", jobError{media.CodeEngineFailed}
}
broken = true
- // engine.upload.retry (pending Luna pass).
+ // engine.upload.retry (approved, Luna pass 5).
cfg.Logf("codec: the upload of %s broke; retry %d of %d", what, attempt+1, putRetries)
if err := cfg.wait(ctx, resumeDelay(attempt)); err != nil {
return "", err
@@ -163,7 +163,7 @@ func putOnce(ctx context.Context, cfg Config, p media.Payload, t media.Transfer,
req, err := http.NewRequestWithContext(actx, http.MethodPut, p.Transfers.URL(t), b)
if err != nil {
// url.Parse's error quotes the URL: drop it.
- // engine.upload.unbuildable (pending Luna pass).
+ // engine.upload.unbuildable (approved, Luna pass 5).
cfg.Logf("codec: a request for the store cannot be built")
return 0, "", "", jobError{media.CodeEngineFailed}
}
@@ -274,7 +274,7 @@ func (b *sentBody) seal(size int64) string {
func hashAll(cfg Config, what string, r io.Reader) (string, error) {
h := md5.New()
if _, err := io.Copy(h, r); err != nil {
- // engine.upload.unhashable (pending Luna pass).
+ // engine.upload.unhashable (approved, Luna pass 5).
cfg.Logf("codec: %s cannot be read to hash it: %s", what, sysReason(err))
return "", jobError{media.CodeEngineFailed}
}