the watcher can authenticate, and the HEVC decoder is declared

TWO BUGS, one in each half.

the watcher demanded OFFICER_AUTH_TOKEN and nothing supplied it. the commander's
credential is written to `officer.env` beside the script, under OFFICER_API_KEY —
a sibling file this never sourced. so a commander created from this template would
have died on its first tick with "OFFICER_AUTH_TOKEN is not set", and I had missed
it by appending the values by hand while testing, which is exactly how a thing
looks like it works.

two files rather than one because they have different lifetimes: officer.env is the
platform's and can be re-minted, config.env is the owner's answers and must survive
that. the name is bridged in the script rather than renamed at either end — a
commander sources the platform's file and a task reads the platform's env, and
neither is this plugin's to rename.

AND libheif-plugin-libde265 IS NOW DECLARED, which cost an hour to find. libheif
packages its CODECS SEPARATELY: `libheif1` alone parses a HEIC container and
reports 4032x3024, then fails on the pixels with "Unsupported codec". ubuntu ships
the AV1 plugin in the common install and not the HEVC one — which is what every
iPhone actually writes.

observed today: identical libheif 1.17.6 on two hosts, HEIC decoding on fofos and
not on officer-dev, the only difference being that package. a plugin that silently
half-works on some machines is worse than one that refuses to install.

no dnf entry for imagemagick. fedora's package is literally `ImageMagick` with
capitals and the manifest validator refuses uppercase — correctly, since these
strings reach a root command line as a closed vocabulary. naming `imagemagick`
there would name a package that does not exist. left for the conversation the
manifest documentation says a case like this wants.

the validator caught that on the way through, and discovery refused the plugin
until it was fixed. verified after: no problems, no broken plugins, 3 osDeps read
back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-29 07:29:03 +01:00
co-authored by Claude Opus 5
parent 5b2fe03ffd
commit cb5dfabce2
2 changed files with 65 additions and 1 deletions
+17 -1
View File
@@ -13,8 +13,15 @@
set -uo pipefail
STATE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/state"
HOME_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
STATE="$HOME_DIR/state"
CONFIG="$STATE/config.env"
# The commander's own credential, written beside this script when the directory was created. Two files
# rather than one because they have different lifetimes: `officer.env` is minted by the platform and can
# be re-minted without touching what the owner configured, and `config.env` is the owner's answers and
# must survive that. Sourcing both is the join.
CREDENTIAL="$HOME_DIR/officer.env"
LOG="$STATE/convert.log"
SEEN="$STATE/converted.list"
@@ -22,6 +29,15 @@ SEEN="$STATE/converted.list"
# shellcheck disable=SC1090
source "$CONFIG"
# shellcheck disable=SC1090
[[ -f "$CREDENTIAL" ]] && source "$CREDENTIAL"
# The platform writes the key as OFFICER_API_KEY. This script asks for OFFICER_AUTH_TOKEN because that
# is what a TASK is given, and the two names are the same secret from two directions. Bridged here
# rather than renamed in either place: a commander sources the platform's file and a task reads the
# platform's env, and neither is this plugin's to rename.
: "${OFFICER_AUTH_TOKEN:=${OFFICER_API_KEY:-}}"
: "${WATCH_DIR:?WATCH_DIR is not set}"
: "${EXTENSIONS:=heic,heif}"
: "${OUTPUT_FORMAT:=webp}"