Repository navigation
fix!: project review fixes and owner decisions for 0.3.0 - #49
Merged
Merged
Conversation
Read path and core
- an unregistered pipeline is refused in resolve, prewarm, generate and the worker
(RESIZE_PIPELINE_UNKNOWN); Resizer.hasPipeline()
- the original-fits shortcut is taken only for a pipeline without steps
- per-call formats and formats from a beforeEnqueue tap must be keys of encode.formats
(RESIZE_FORMAT_NOT_CONFIGURED)
- a publicUrl throw skips only that preview; resolve(undefined) returns the safe decision
- task payloads are built from the rounded size key; a failed lazy part is retried alone
- dispatch locks are acquired in parallel; prewarm issues list only unconfirmed variants
Images
- animated: true works: WebP and GIF keep the frames that fit, other formats and pipelines
with variantSteps get the first frame
- width-only and height-only sizes never exceed limits.resultDimension
- EXIF-rotated originals are no longer re-encoded before resizing
- very long or thin SVG renders; an own __proto__ filter key keeps its identity
Queue and worker
- optional TaskQueue.release(): a task stopped by a worker shutdown goes back to the queue
with no event and no backoff
- unusable sources are dead-lettered on the first failure
- MongoTaskQueue.verify() rejects a model without the fields the queue writes
(RESIZE_MONGO_MODEL_OUTDATED); leasedBy is hostname:pid
Framework adapter, scaffold, packaging
- export ./framework/ResizeTaskModel.js for the scaffolded model shim, so npm run gen
types getModel('ResizeTask'); --check reports an old shim and an outdated ejected model
- ResizeWorker --config=<name>; worker.concurrency fails in framework config files
- a missing AWS SDK peer for a config-selected driver is RESIZE_PEER_MISSING
- S3: absolute path-style URL without an endpoint, China regions, SVG as attachment
- repository URL; CI job on Node 24 with the minimum peer versions
… one preview row per identity, one task queue per backend
Owner decisions for 0.3.0, made after the 2026-10-05 project review.
- SVG is treated like any other image: it is rendered once per task into a PNG in a child
Node process that is killed at limits.processingTimeoutSeconds, and every format is made
from that raster; beforeSteps receive the PNG (RESIZE_SVG_RENDER_TIMEOUT is terminal;
RESIZE_SVG_RENDER_FAILED; RESIZE_SVG_RENDER_UNAVAILABLE)
- the original file is never served: the original-fits shortcut, ReadyEntry.isOriginal and
ResizeStorage.canServeOriginalPublicly are removed; a raster original no larger than a
requested WxH box gets a preview at its own size with metadata removed (a pipeline with
variantSteps keeps the full box)
- every preview row carries its identity; appendPreviews stores one row per identity and
resolves with the stored rows, written with findOneAndUpdate
(RESIZE_MONGO_MEDIA_MODEL_OUTDATED)
- ResizeTask.availableAt and the index { queue, status, availableAt } replace
{ queue, status, createdAt }: a claim reads one document however many tasks wait in backoff
- after a dead-letter the task's previews are not queued again for lockTtlMs.failed
(default 10 minutes)
- one task queue per backend in the framework adapter: Resizers share one queue object and
one worker loop; different timing is RESIZE_CONFIG_QUEUE_TIMING_CONFLICT
- internal runtime exports removed from the main entry (calculateResizedDimensions,
getFilterSig, getImageContentType, getPreviewIdentity, consumeQueue, timingOf,
listResizers, processTask) and from framework.js (appEvents, appLogger, getApp,
getResizeConfig)
- default JPEG quality 88; CHANGELOG heading 0.3.0
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/node-testThe overall line coverage in commit 13d8a74 in the Show a line coverage summary of the most impacted files.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from the 2026-10-05 project review, plus the decisions made after it, for release 0.3.0. Two commits:
fix: findings of the 2026-10-05 project reviewfeat!: SVG rendered in a separate process, the original never served, one preview row per identity, one task queue per backendDocs-site counterpart: adaptivestone/framework-documentation#23 (stacked on #22 there).
What changes for a host
RESIZE_PIPELINE_UNKNOWN). Register a new or renamed pipeline in the worker before the API requests it.beforeEnqueuehook, must be keys ofencode.formats(RESIZE_FORMAT_NOT_CONFIGURED).resolve()returns only stored previews.ReadyEntry.isOriginalandResizeStorage.canServeOriginalPubliclyare removed. A raster original no larger than a requestedWxHbox gets a preview at its own size with metadata removed; a pipeline withvariantStepskeeps the full box.limits.processingTimeoutSeconds;beforeStepsreceive the PNG. New codesRESIZE_SVG_RENDER_TIMEOUT(dead-lettered at once),RESIZE_SVG_RENDER_FAILED,RESIZE_SVG_RENDER_UNAVAILABLE.identityfield (inresizeMediaSchemaFragment); the database stores one row per identity.verify()reports a model without it (RESIZE_MONGO_MEDIA_MODEL_OUTDATED).ResizeTaskcollection: new fieldavailableAt; index{ queue, status, availableAt }replaces{ queue, status, createdAt }. Create the new index with the deploy, then drop the old one. An ejected model must add the field and the index.RESIZE_CONFIG_QUEUE_TIMING_CONFLICT. After a dead-letter, the task's previews are not queued again forlockTtlMs.failed(default 10 minutes). A task stopped by a worker shutdown goes back to the queue without a failed attempt (new optionalTaskQueue.release()).npm run cli ResizeWorker -- --config=<name>;worker.concurrencyin a framework config file is an error.…/framework/ResizeTaskModel.js, sonpm run gentypesgetModel('ResizeTask');--checkreports an old shim and an outdated ejected model.animated: trueworks (WebP and GIF, pipelines withoutvariantSteps); width-only and height-only sizes respectlimits.resultDimension; EXIF-rotated originals are not re-encoded before resizing; default JPEG quality is 88.…/framework.js(list in the CHANGELOG).Everything is listed in
CHANGELOG.mdunder# 0.3.0; host steps are indocs/host-adoption.md.Checks
types:check,check,build,smoke: passnpm test: 797 tests, 795 pass, 0 fail, 2 skipped (611 before this branch)min-versionsrepeats this.Known limits
prewarm()reportsRESIZE_ENQUEUE_LOCK_CONTENDED(retryable), not a dedicated issue; a re-uploaded original under the same media id waits for the cooldown unless the host uses eagergenerate().processTaskis no longer exported, so there is no public way to process one externally delivered task (for example a Lambda SQS trigger);runWorkeris the entry.identityand are not migrated.