runtime: edit a batch of pictures with libvips, shared out across the pool #730
No Reviewers
Labels
Clear labels
accessibility
all-platforms
area:agents
area:ai
area:chain
area:ci
area:client
area:daemon
area:p2p
area:project
area:protocol
area:runtime
area:storage
bug
chore
community
dependencies
discussion
discussion/Announcements
discussion/General
discussion/Ideas
discussion/Q&A
discussion/Show and tell
discussion/answered
documentation
duplicate
enhancement
good first issue
help wanted
i18n
infra
invalid
needs:decision
needs:hardware
paired
question
research
security
status:in-review
test
testing
tracking
wontfix
Barrier affecting people with disabilities
Run every platform's packaging and checks on this pull request, not only the three main ones
MCP server, skill, and thinking on the pool
Planner and model providers
Blockchain, SISY, verification
Continuous integration and build workflows
Desktop and web clients
sisyphusd coordinator, worker, scheduler
libp2p hosts, relays, discovery, connections between nodes
Project planning, roadmap, and governance
Protobuf schemas and RPC contracts
Workload execution and environments
Content-addressed storage, IPFS, Kubo, Cluster, S3, names, pinning
Something isn't working
Repository health, templates, Discussions, contributor experience
Updates to actions, Go modules or npm packages
Migrated from GitHub Discussions
GitHub Discussions category: Announcements
GitHub Discussions category: General
GitHub Discussions category: Ideas
GitHub Discussions category: Q&A
GitHub Discussions category: Show and tell
Q&A discussion with an accepted answer
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
Translations and right-to-left layouts
Build, CI, releases
This doesn't seem right
Waits on a decision from both owners
Waits on a machine we do not have yet
Built together by both maintainers, with co-authored commits
Further information is requested
Needs investigation or a design decision
Sealing, keys, access control, tokens, the security model
Built and in an open pull request; closes when it merges
Tests, test harnesses and the rehearsal
Roadmap and meta issues
This will not be worked on
type
Feature
A request, idea, or new functionality (GitHub issue type)
type
Task
A specific piece of work (GitHub issue type)
Milestone
No items
No Milestone
Real workloads
Projects
Clear projects
No projects
Sisyphus roadmap
Done
No Assignees
rvnminers-A-and-N
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Sisyphus/Sisyphus#730
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #729. Part of #584: the catalog's "Batch image edits".
A new fixed-image container workload,
images, built the same way asocrandprep. It runs libvips'vipsthumbnailfrom Alpine 3.20'svips-tools(libvips 8.15).What a job does
Each picture is:
widthand/orheight, keeping its shape. It is only shrunk unlessenlargeis set;jpeg,png,webp,tifforgif, or in its own format (same, the default). JPEG and WebP usequality, 85 by default;keep_metadatais set. A phone's photo can say where it was taken.The pictures are shared out across the pool in contiguous runs, as
prepdoes with its systems. Each task is given only its own pictures. There are never more tasks than pictures, and at least enough that no task has more than 16. A job can have up to 256 pictures.The result lists each picture with its CID, name, format, size and bytes, or with an
errorand libvips' last lines when it could not be read. It also has afilesmap by name (image-000.webpand so on) and a zip of them all. A broken picture is listed on its own and does not fail the job; the job fails only if no picture is made.What is trusted
VIPS_BLOCK_UNTRUSTED=1, so its loaders for SVG, PDF, FITS and the like stay closed whatever a file is called. It also runs on one thread.summary.jsonand the files named from each picture's index and format. It checks that every picture was edited once and in order, with the job's settings, and that each one fits the box and begins as its format does. The names infilesand the zip are made by the coordinator, never taken from a worker.Variesis true. On one machine libvips gives the same bytes, and the test checks this across splits. But each worker builds the image from Alpine's packages on the day, and libvips picks its vector code by processor, so comparing bytes across workers would fail honest ones.Tests
images.gois covered.go test -race -count=5passes.TestRealPicturesAreEdited(realimages, about 5 s once the image is built): it uses an 800×600 JPEG made in the test, with an EXIF block saying "turn a quarter clockwise" and naming a camera, plus a 40×30 PNG and a broken JPEG.VipsJpeg: Premature end of JPEG file.enlargeandkeep_metadata, both keep their formats at 90×120 and 120×90, and the photo keeps its EXIF.Docs
apps/sisyphusd/README.md: a new "Batch image edits" section, plus the workload list, the list of workloads with forms, and the hardened-worker list.docs/security-model.md: whatimagestrusts, and its place in the non-determinism and hardened lists. The hardened list there was also missingtrajandprep, which the README already names.docs/user-guide.mdanddocs/desktop-backend.md: the new card and its parameters.Upscaling with Real-ESRGAN is left for later: it needs a graphics card and a model download.