sidrefresh's picture
Add files using upload-large-folder tool
2e7de11 verified
Raw History Blame Contribute Delete
7.83 kB
# t16-shottracer-effects — Friction (frame-by-frame shot tracer, one clip per
# swing) + Shotcut (assembly) over REAL golf footage.
#
# Layers onto vedit-task:base (Kdenlive + Natron + Shotcut + xterm + desktop
# stack, built by `./suite/suite.sh base build` — REBUILD it if it predates
# 2026-08-24, the stale Aug-19 base had no Shotcut/xterm):
# - Friction 1.0.0-rc.3, the open-source After-Effects-tier 2D motion
# graphics app (layers, paths, keyframes, ffmpeg video import/export).
# Natron was the original AE tier for this task but crashes on the
# author's Mac, so no rubric could be built against it (2026-09-02).
# - four 1080x1920 swing clips shot_01..04.mp4 (environment/media/,
# gitignored, ~22 MB, built by tools/prepare-media.sh from Sid's 4K
# splits, checksummed in tests/source.sha256) REPLACING the synthetic
# seed media.
#
# Build (from the repo root, after `suite base build`):
# docker build --platform linux/amd64 \
# -f tasks/t16-shottracer-effects/environment/Dockerfile \
# -t refresh-fcpx-t16:dev tasks/t16-shottracer-effects/environment
#
# REMOTE RUNS: push the Daytona snapshot from THIS image with
# `-e /usr/local/bin/start-editor --cpu 4 --memory 8 --disk 10` and record it
# as current_t16 in environments/vedit/env.toml [snapshots].
FROM vedit-task:base
# Friction: pinned portable tarball (bundles its own Qt5, Skia, ffmpeg, xcb
# libs — ldd against vedit-task:base resolved everything except
# libpulse-mainloop-glib.so.0) plus a PulseAudio server: Friction's audio
# handler pops a modal "Critical Error: audiohandler.cpp toAVAudioFormat()
# Unsupported sample format 0" at EVERY launch when no Pulse server answers
# (Xvfb smoke, 2026-09-02); the launcher below starts one with a null sink.
# All artifacts are COPIED from the build context, fetched beforehand by
# tools/fetch-friction.sh (sha256-pinned): the build needs no network and no
# apt, which that day's "invalid signature" mirror failure showed matters.
# The ldd assertion fails the build if the bundle's layout or deps change,
# instead of letting a broken launcher reach a live run. bin/portable.txt is
# removed: with it Friction opens a modal "You are in portable mode" box on
# every launch — without it config lives in ~/.config like any Qt app.
COPY friction.tar.xz /tmp/
COPY debs/ /tmp/debs/
RUN dpkg -i /tmp/debs/*.deb \
&& mkdir -p /opt/friction \
&& tar -xJf /tmp/friction.tar.xz -C /opt/friction --strip-components=1 \
&& rm -rf /tmp/friction.tar.xz /tmp/debs \
&& test -x /opt/friction/bin/friction \
&& rm -f /opt/friction/bin/portable.txt \
&& missing="$(ldd /opt/friction/bin/friction | grep 'not found' || true)" \
&& { [ -z "$missing" ] || { echo "friction: unresolved libs:"; echo "$missing"; exit 1; }; }
COPY friction-launcher.sh /usr/local/bin/friction
RUN chmod 755 /usr/local/bin/friction
# The clips the agent edits with (one swing each). The synthetic seed media
# from the base image is replaced entirely so the bin isn't cluttered with
# distractors. ASSERT all four are present — a build from an empty media/
# (fresh clone without tools/prepare-media.sh) must not reach a snapshot.
RUN rm -f /root/media/*.mp4
COPY media/ /root/media/
RUN rm -f /root/media/.DS_Store \
&& for i in 1 2 3 4; do test -s /root/media/shot_0$i.mp4; done \
&& mkdir -p /root/edit/traced /root/edit/svg
# Shotcut: skip the first-run wizard, software GL (t08/t09 standing rules),
# default to the vertical 1080x1920 30fps profile the deliverable asks for.
RUN mkdir -p /root/.config/Meltytech /root/edit /root/Desktop \
&& printf '[General]\nfirstRun=false\ncheckUpgradeAutomatic=false\naskUpgradeAutomatic=false\ndrawMethod=2\nplayerGPU=false\nvideoMode=vertical_hd_30\n' \
> /root/.config/Meltytech/Shotcut.conf
# Friction AUTOSTARTS with the XFCE session (APP=friction → start-editor
# copies /opt/autostart/friction-autostart.desktop, t18 pattern) — the work
# starts with the tracers. Shotcut stays reachable via the base's
# shotcut.desktop launcher, the Applications menu and `shotcut` in xterm.
# Desktop launcher for Friction (relaunch after a quit/crash). The icon
# layer that renders them is xfdesktop4 (in debs/ above): the vedit base has
# xfce4-panel/xfwm4/xfce4-session but no xfdesktop, and the first Daytona
# smoke (t16-smoke-cu-opus5-a1, 2026-09-02) saw a bare black root window with
# no way to start Friction. The applications-menu copy is a second route.
# ASSERTS at the end: the base this was layered on must be the post-t08 one
# (Shotcut + xterm) — the same smoke ran on a stale Aug-19 base that had
# neither, with Kdenlive autostarting instead.
COPY friction-autostart.desktop /opt/autostart/friction-autostart.desktop
COPY friction.desktop /root/Desktop/friction.desktop
RUN chmod 755 /root/Desktop/friction.desktop \
&& mkdir -p /usr/share/applications \
&& cp /root/Desktop/friction.desktop /usr/share/applications/friction.desktop \
&& test -x /usr/local/bin/shotcut \
&& test -x /usr/bin/xfdesktop \
&& test -f /opt/autostart/shotcut-autostart.desktop \
&& test -f /root/Desktop/shotcut.desktop
# GUI-ONLY (Sid, 2026-09-04): both first live runs solved the ball tracking
# with Python scripts typed into xterm (opus5 from step 6, fable5.1 from step
# 290) although the task is meant to measure GUI skill in Friction + Shotcut.
# Every terminal route goes: the xterm family binaries and
# x-terminal-emulator become a logging stub (attempt -> /logs/artifacts/
# terminal-attempts.log -> reward 0, see tests), the Terminal Desktop icon,
# the terminal/python/ImageMagick-display/Kdenlive menu entries and the
# Ctrl+Alt+T shortcut are removed, and XFCE kiosk mode stops the agent from
# adding a panel launcher (arbitrary Exec) or editing the desktop menu.
# Shotcut gets a proper Applications-menu entry (it had none — another reason
# agents reached for xterm). python3 stays: the verifier (pytest) needs it and
# without a shell there is no GUI way left to run it.
COPY no-terminal.sh /usr/local/bin/no-terminal
COPY kiosk/kioskrc /etc/xdg/xfce4/kiosk/kioskrc
COPY shotcut-menu.desktop /usr/share/applications/shotcut.desktop
RUN chmod 755 /usr/local/bin/no-terminal \
&& for t in xterm uxterm lxterm koi8rxterm x-terminal-emulator xfce4-terminal xfce4-appfinder xfrun4; do \
rm -f "/usr/bin/$t" "/etc/alternatives/$t"; ln -s /usr/local/bin/no-terminal "/usr/bin/$t"; done \
&& rm -f /usr/share/applications/debian-xterm.desktop /usr/share/applications/debian-uxterm.desktop \
/usr/share/applications/xfce4-terminal-emulator.desktop /usr/share/applications/python3*.desktop \
/usr/share/applications/display-im6*.desktop /usr/share/applications/org.kde.kdenlive.desktop \
/usr/share/applications/xfce4-file-manager.desktop /usr/share/applications/xfce4-mail-reader.desktop \
/usr/share/applications/xfce4-web-browser.desktop /usr/share/applications/xfce4-settings-editor.desktop \
/usr/share/xfce4/helpers/*.desktop \
/root/Desktop/terminal.desktop /root/Desktop/kdenlive.desktop \
&& sed -i '/exo-open --launch TerminalEmulator/d' /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml \
&& sed -i 's/^TerminalEmulator=.*/TerminalEmulator=/; s/^FileManager=.*/FileManager=/' /etc/xdg/xfce4/helpers.rc \
&& test -x /usr/local/bin/shotcut && test -x /usr/local/bin/friction \
&& [ "$(readlink -f /usr/bin/xterm)" = /usr/local/bin/no-terminal ] \
&& ! ls /usr/share/applications | grep -qiE 'xterm|terminal|python|display-im6'
# Reference artifacts (see reference/README.md): the approved renders, SVG paths
# and .friction the oracle installs (~30 MB). Not part of the agent's brief; the
# instruction never points here and there is no shell to find it with.
COPY reference/ /opt/t16-reference/
WORKDIR /root