2.2 KiB
2.2 KiB
S004 — /caption checks
Run in Discord (owner) unless noted. Bot must have the S004 build.
Doubts
- Video path never run: needs ffmpeg with libx264 on the server; check
ffmpeg -encoders | grep libx264there. - Band height unit test depends on the font in
assets/(missing in worktrees). - Slash option names with hyphens (
source-attachment) never registered with Discord yet.
Checks
/imageandD!fxno longer exist (slash list,D!help)./caption text:hellowith a PNG attached: PNG back, white band with centred black text above, same width.- Same with a JPG and a still WebP: works.
- GIF attached: GIF back, still animated, every frame has the band.
- Animated WebP: comes back as an animated GIF.
- MP4, WebM and MOV: MP4 back that plays in Discord, band on top, no sound, at most about 10 s.
/caption source-link:<public image link> text:hi: works.D!caption hireplying to a picture: works.D!caption hi <link>: works./caption text:hiwith no source after someone posted a picture: uses that picture.- Empty text (
D!captionalone,/caption text:blank): clear error card, no upload. - Text of 600 characters: "too long" error. Text of about 200 characters: band grows, still readable.
- Multi-line text: band is as tall as the lines need (3 lines taller than 1).
- Huge input (over 15 MB): "couldn't download" card, no hang.
- Bad link (
http://127.0.0.1/x,not a link): error card, no crash. - Non-media file (a PDF or audio only): "none of those" error.
- Result over the upload budget: smaller retry, else "too big" card.
cargo test band_height caption_keepspasses where assets exist; help-limits test passes.
Results (S010, 2026-12-01)
- 1 pass (no
fxcommand;cargo testregistry/help tests pass). 2 pass, 4 pass (rendered by a test: PNG gets a white band + text, GIF keeps 2+ frames, contact sheet looked at). 12, 17 pass (band_height_grows_with_lines_and_is_even,caption_keeps_picture_kind, help limits). - 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 3: not run: need Discord or a live bot (owner, S011). Video path not run here either.
- Doubt libx264: ffmpeg on this PC has the same helper tests passing (
ffmpeg.rsmp4 tests); the server's ffmpeg not checked.