Skip to content

Operation runtime hardening - #45

Merged
343dev merged 5 commits into
mainfrom
improvement/operation-runtime-hardening
Sep 25, 2026
Merged

343dev merged 5 commits into
mainfrom
improvement/operation-runtime-hardening

Conversation

@343dev

@343dev 343dev commented Sep 25, 2026

Copy link
Copy Markdown
Owner

This PR adds a shared runtime for image operations and removes invocation state from global modules.

Optimization and conversion now use the same execution flow. Each invocation owns its options, lifecycle, reporting, and signal handlers.

User-visible changes

  • Optimizt selects the lossless JPEG resource limit from detected image data, not the file extension.
  • Renamed JPEG files now use Guetzli’s single-operation limit.
  • An interruption stops queued work and terminates active encoders when cancellation is available.
  • The interruption summary reports completed operations separately.
  • Abandoned operations do not appear as skipped or failed.
  • Guetzli errors preserve up to 64 KiB of encoder output.
  • Guetzli errors distinguish startup failures, input write failures, exit codes, and termination signals.
  • One failed image operation does not stop independent operations.

Implementation

  • Add a shared runtime for concurrency, resource limits, outcomes, and interruption checks.
  • Use the shared runtime for optimization and conversion.
  • Replace global options and lifecycle state with invocation-specific objects.
  • Consolidate progress output, failure details, and summaries in one reporter.
  • Remove the old global program options and summary modules.
  • Add tests for runtime behavior, invocation isolation, Guetzli errors, and interruption reporting.

Breaking change

The internal execution contract now requires invocation-specific options, lifecycle, and reporting objects.

Centralize bounded operation execution, resource-specific limits, outcome collection, and interruption-aware scheduling behind one runtime.
Route optimization and conversion through the shared runtime, replace module-level options and lifecycle state with per-invocation dependencies, and consolidate progress and summary reporting.

BREAKING CHANGE: operation execution now uses invocation-scoped runtime, lifecycle, and reporting contracts.
@343dev 343dev self-assigned this Sep 25, 2026
Dispatch from detected image metadata, serialize Guetzli work independently of file extensions, preserve bounded stderr diagnostics, and distinguish spawn, stream, exit, and signal failures.
@343dev
343dev force-pushed the improvement/operation-runtime-hardening branch from 8de1922 to 1f9409c Compare September 25, 2026 11:43
@343dev
343dev merged commit 9e98967 into main Sep 25, 2026
10 checks passed
@343dev
343dev deleted the improvement/operation-runtime-hardening branch September 25, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant