Phase 9: Conversion Job Core (CONV-112–CONV-129)#122
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…126/CONV-128) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…CONV-127/CONV-129) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… missing result file, share factory user - CreateConversionJobAction stores the driver-style converter_key (e.g. png_to_jpg) so ProcessConversionJob's ConverterDriverRegistry lookup resolves. - RecordConversionResultFileAction throws when the result file is missing instead of hashing an empty string. - ConversionJobFactory keeps the source file owned by the same user as the job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Phase 9 — Conversion Job Core (CONV-112 → CONV-129)
Backend domain + application layer for creating and processing conversion jobs through a queue + driver architecture. No real image/PDF conversion (Phase 10), no Convert Now UI (Phase 11), no billing (Phase 14/15) — lifecycle is proven end-to-end with a fake driver.
What's included
jobs/failed_jobsmigration andQUEUE_CONNECTION=databasein.env.example(no change needed).ConversionStatusenum (draft/queued/processing/completed/failed/cancelled/expired).conversion_jobstable +ConversionJobmodel + factory.user,sourceFile,resultFile; reverse onUser/FileRecord).ConversionContextandConversionResultDTOs.ConverterDriverinterface,ConverterDriverRegistry(+MissingConverterDriverException), and a test-onlyFakeConverterDriver.RecordConversionResultFileAction(turns aConversionResultinto aFileRecord).CreateConversionJobAction— validates the source→target pair and options, persists aqueuedjob, dispatchesProcessConversionJob.ProcessConversionJob—queued → processing → completedhappy path via the driver + recorder, andqueued → processing → failedwitherror_code/error_messageon driver exception.Deviations from the plan (reconciled with the real codebase)
app/Support/Conversions/*convention (notapp/Services/*/app/DTO), mirroringapp/Support/Converters/*.App\Support\Converters\ConverterRegistry::find()andConverter::validateOptions()(which normalizes + fills defaults) instead of inventing new validators. Unsupported pairs raise a newUnsupportedConversionException; invalid options raise the existingInvalidConverterOptionsException.users/files), not ULID.ConverterDriverRegistryis registered empty inConverterServiceProvideras the Phase 10 extension point.Verification
composer test— green (256 tests / 700 assertions)composer lint(Pint) — cleannpm run build— passesSummary by cubic
Adds the backend core for conversion jobs (Phase 9, CONV-112–CONV-129): create, queue, and process jobs via a driver registry with a fake driver to prove the lifecycle. Uses the existing
ConverterRegistryfor pair/option validation; real drivers land in Phase 10.New Features
conversion_jobstable,ConversionJobmodel + factory, and relations onUser/FileRecord.ConversionStatusenum;UnsupportedConversionExceptionandMissingConverterDriverException.CreateConversionJobActionvalidates source→target and options, stores driver-styleconverter_key(e.g. png_to_jpg), saves a queued job, and dispatchesProcessConversionJob.ProcessConversionJobmovesqueued → processing → completed/failed, resolves drivers viaConverterDriverRegistry, records result viaRecordConversionResultFileAction, and persists error code/message on failure.ConversionContext,ConversionResult. Driver contract:ConverterDriver. Registry is bound empty in the service provider; a fake driver is used only in tests.RecordConversionResultFileActionnow throws if the output file is missing before recording.Migration
QUEUE_CONNECTION=databaseis set.Written for commit 0ebc5cc. Summary will update on new commits.