Repository navigation
chore: cut v1 product surface - #59
Conversation
📝 WalkthroughWalkthroughThis PR consolidates the repository from a multi-command media tool into a single prepare-image CLI. It updates documentation and package scripts for the v1 workflow, changes prepare-image behavior (default border → 57px, ffmpeg invoked with -n to avoid overwrites, and JPEG EXIF orientations 5–8 now trigger width/height swapping), and refactors tests/helpers to generate fixtures and validate outputs at runtime using ffmpeg/ffprobe. Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
a69c3ed to
30fe2ce
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/domain/prepare_image.ts`:
- Around line 106-120: The JPEG parsing loop in prepare_image.ts uses length =
bytes.readUInt16BE(offset + 2) to compute payloadStart/payloadEnd but doesn't
validate bounds; add a guard inside the while loop (before any bytes.subarray or
readTiffOrientation call) that ensures length is sane and payloadEnd = offset +
2 + length is <= bytes.length (and payloadStart >= 0 and length >= 2) so you
never slice past the buffer; if the check fails, break or return null. Apply
this check around the marker === 0xe1 branch and before updating offset to
payloadEnd to prevent out-of-bounds reads when invoking readTiffOrientation or
bytes.subarray.
- Around line 125-147: In readTiffOrientation, validate all offsets before
calling readUInt32/readUInt16: ensure bytes has at least 8 bytes before reading
the TIFF header, verify ifdOffset (from readUInt32 at offset 4) is a
non-negative integer within bytes.length, check bytes.length >= ifdOffset + 2
before reading entryCount, and for each entry ensure entryOffset + 12 <=
bytes.length before accessing tag/type/count/value fields; if any check fails,
return null instead of attempting out-of-bounds reads. Use the existing symbols
readUInt32, readUInt16, ifdOffset, entryCount, entryOffset and bytes to locate
where to add these guards.
- Around line 100-103: The code currently uses readFileSync(path) which loads
the whole file into memory; change to a partial read of the file header by
opening the file with openSync, allocating a small buffer (e.g., 4KB), using
readSync to fill the buffer, then closeSync; use that buffer instead of bytes
for the JPEG magic check (bytes[0] !== 0xff || bytes[1] !== 0xd8) and subsequent
EXIF parsing. Add imports for openSync, readSync, closeSync from node:fs, ensure
you handle files shorter than the buffer (check bytesRead) and fall back safely,
and keep the function that performs this logic (prepare_image or the block using
readFileSync/path/bytes) returning null for non-JPEGs as before.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: a60d10c7-db22-48fe-b934-92d7cc82dc2d
⛔ Files ignored due to path filters (7)
tests/fixtures/images/landscape_sample_48x32.jpgis excluded by!**/*.jpgtests/fixtures/images/landscape_sample_48x32.pngis excluded by!**/*.pngtests/fixtures/images/landscape_video_640x360.movis excluded by!**/*.movtests/fixtures/images/portrait_sample_30x40.jpgis excluded by!**/*.jpgtests/fixtures/images/portrait_sample_30x40.pngis excluded by!**/*.pngtests/fixtures/images/portrait_video_360x640.mp4is excluded by!**/*.mp4tests/fixtures/images/portrait_video_audio_360x640.mp4is excluded by!**/*.mp4
📒 Files selected for processing (204)
AGENTS.mdREADME.mdconfig/export_profiles.v1.jsonconfig/ruleset.v1.jsondocs/phase1_knowledge.mddocs/plans/decisions-log.mddocs/plans/v1-prepare-image-cli.mddocs/plans/v1-product-split-cleanup.mddocs/repo_refresh_audit.mddocs/repo_refresh_feature_set.mddocs/repo_refresh_merge_plan.mddocs/v1_split_plan.mdpackage.jsonsrc/cli/analyze.tssrc/cli/args.tssrc/cli/benchmark.tssrc/cli/doctor.tssrc/cli/export_image.tssrc/cli/export_video.tssrc/cli/grid_preview.tssrc/cli/overlay.tssrc/cli/recommend.tssrc/cli/report.tssrc/cli/report_export.tssrc/cli/validate_matrix.tssrc/cli/watch_folder.tssrc/domain/analyze.tssrc/domain/benchmark.tssrc/domain/export_image.tssrc/domain/export_profiles.tssrc/domain/export_video.tssrc/domain/grid_preview.tssrc/domain/media_image_inspector.tssrc/domain/media_inspector.tssrc/domain/media_video_inspector.tssrc/domain/objective_metrics.tssrc/domain/overlay.tssrc/domain/prepare_image.tssrc/domain/recommend.tssrc/domain/report.tssrc/domain/report_export.tssrc/domain/rules.tssrc/domain/tier.tssrc/domain/validate_matrix.tssrc/domain/watch_folder.tssrc/domain/white_canvas.tssrc/types/contracts.tstests/e2e/analyze.snapshots.e2e.test.tstests/e2e/benchmark.snapshots.e2e.test.tstests/e2e/export.snapshots.e2e.test.tstests/e2e/export_video.snapshots.e2e.test.tstests/e2e/grid_preview.snapshots.e2e.test.tstests/e2e/overlay.snapshots.e2e.test.tstests/e2e/recommend.matrix.e2e.test.tstests/e2e/recommend.snapshots.e2e.test.tstests/e2e/report.snapshots.e2e.test.tstests/e2e/report_export.snapshots.e2e.test.tstests/e2e/validate_matrix.snapshots.e2e.test.tstests/e2e/watch_folder.snapshots.e2e.test.tstests/export_profiles.test.tstests/fixtures/e2e/analyze_cases.jsontests/fixtures/e2e/benchmark_cases.jsontests/fixtures/e2e/export_cases.jsontests/fixtures/e2e/export_video_cases.jsontests/fixtures/e2e/generate-analyze-snapshots.tstests/fixtures/e2e/generate-benchmark-snapshots.tstests/fixtures/e2e/generate-export-snapshots.tstests/fixtures/e2e/generate-export-video-snapshots.tstests/fixtures/e2e/generate-grid-preview-snapshots.tstests/fixtures/e2e/generate-overlay-snapshots.tstests/fixtures/e2e/generate-report-export-snapshots.tstests/fixtures/e2e/generate-report-snapshots.tstests/fixtures/e2e/generate-snapshots.tstests/fixtures/e2e/generate-validate-matrix-snapshots.tstests/fixtures/e2e/generate-watch-folder-snapshots.tstests/fixtures/e2e/grid_preview_cases.jsontests/fixtures/e2e/overlay_cases.jsontests/fixtures/e2e/recommend_cases.jsontests/fixtures/e2e/report_cases.jsontests/fixtures/e2e/report_export_cases.jsontests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.jsontests/fixtures/e2e/snapshots/experimental-feed-square.jsontests/fixtures/e2e/snapshots/experimental-reel-landscape.jsontests/fixtures/e2e/snapshots/experimental-story-square.jsontests/fixtures/e2e/snapshots/export/export-experimental-story.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.jsontests/fixtures/e2e/snapshots/overlay/overlay-3-4.jsontests/fixtures/e2e/snapshots/overlay/overlay-4-5.jsontests/fixtures/e2e/snapshots/overlay/overlay-9-16.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-app-direct.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-default.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.jsontests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.jsontests/fixtures/e2e/snapshots/reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/reliable-story-portrait.jsontests/fixtures/e2e/snapshots/reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/reliable-story-white-ignored.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.jsontests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.jsontests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.jsontests/fixtures/e2e/validate_matrix_cases.jsontests/fixtures/e2e/watch_folder_cases.jsontests/fixtures/exports/.gitkeeptests/fixtures/images/generate-fixtures.tstests/fixtures/images/generate-raster-fixtures.tstests/fixtures/images/generate-video-fixtures.tstests/fixtures/images/landscape_sample_48x32.ppmtests/fixtures/images/micro_landscape_16x9.ppmtests/fixtures/images/micro_portrait_9x16.ppmtests/fixtures/images/portrait_sample_30x40.ppmtests/fixtures/images/square_sample_36x36.ppmtests/fixtures/images/ultrawide_sample_60x24.ppmtests/fixtures/matrix/cases_basic.jsontests/fixtures/matrix/cases_with_failure.jsontests/fixtures/matrix/only_portrait.txttests/fixtures/pixel/generate-snapshots.tstests/fixtures/pixel/scenarios.tstests/fixtures/visual/generate-snapshots.tstests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txttests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txttests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txttests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txttests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txttests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txttests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txttests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txttests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txttests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txttests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txttests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txttests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txttests/fixtures/visual/snapshots/square_sample_36x36.classic.txttests/fixtures/visual/snapshots/square_sample_36x36.compat.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txttests/grid_preview.test.tstests/helpers/cli.tstests/helpers/image.test.tstests/helpers/image.tstests/helpers/ppm.tstests/helpers/types.tstests/helpers/visual.tstests/integration/analyze.integration.test.tstests/integration/benchmark.integration.test.tstests/integration/cli.integration.test.tstests/integration/export.integration.test.tstests/integration/export_video.integration.test.tstests/integration/grid_preview.integration.test.tstests/integration/overlay.integration.test.tstests/integration/prepare_image.integration.test.tstests/integration/report.integration.test.tstests/integration/report_export.integration.test.tstests/integration/validate_matrix.integration.test.tstests/integration/watch_folder.integration.test.tstests/media_inspector.test.tstests/overlay.test.tstests/property/margins.property.test.tstests/recommend.test.tstests/rules.test.tstests/tier.test.tstests/visual/layout.visual.test.tstests/visual/pixel_diff.visual.test.tstests/white_canvas.test.ts
💤 Files with no reviewable changes (193)
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txt
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.json
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.json
- tests/helpers/image.test.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.json
- tests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txt
- tests/fixtures/images/micro_landscape_16x9.ppm
- tests/fixtures/pixel/generate-snapshots.ts
- tests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txt
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.json
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.json
- tests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txt
- tests/fixtures/e2e/report_cases.json
- tests/fixtures/matrix/only_portrait.txt
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txt
- tests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txt
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.json
- tests/fixtures/e2e/snapshots/reliable-story-portrait.json
- tests/fixtures/images/ultrawide_sample_60x24.ppm
- tests/fixtures/e2e/snapshots/overlay/overlay-3-4.json
- tests/integration/benchmark.integration.test.ts
- tests/fixtures/e2e/grid_preview_cases.json
- tests/fixtures/e2e/recommend_cases.json
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.json
- tests/e2e/overlay.snapshots.e2e.test.ts
- tests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.json
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.json
- tests/fixtures/e2e/generate-snapshots.ts
- tests/e2e/export.snapshots.e2e.test.ts
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txt
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.json
- tests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.json
- docs/repo_refresh_feature_set.md
- tests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txt
- tests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.json
- config/export_profiles.v1.json
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.json
- tests/fixtures/e2e/snapshots/overlay/overlay-9-16.json
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-app-direct.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.json
- tests/integration/report.integration.test.ts
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.json
- src/cli/doctor.ts
- tests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txt
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.json
- tests/fixtures/visual/snapshots/square_sample_36x36.compat.txt
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.json
- tests/fixtures/e2e/generate-report-snapshots.ts
- tests/fixtures/e2e/snapshots/export/export-experimental-story.json
- tests/fixtures/e2e/export_cases.json
- tests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txt
- docs/repo_refresh_merge_plan.md
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.json
- tests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.json
- tests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.json
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.json
- tests/fixtures/e2e/generate-benchmark-snapshots.ts
- tests/e2e/watch_folder.snapshots.e2e.test.ts
- tests/fixtures/images/generate-raster-fixtures.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.json
- tests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txt
- src/domain/export_image.ts
- tests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.json
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.json
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-default.json
- tests/fixtures/visual/generate-snapshots.ts
- tests/fixtures/e2e/generate-analyze-snapshots.ts
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.json
- tests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txt
- src/domain/report_export.ts
- tests/fixtures/e2e/generate-export-snapshots.ts
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.json
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.json
- tests/helpers/visual.ts
- tests/integration/analyze.integration.test.ts
- tests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.json
- src/domain/grid_preview.ts
- tests/fixtures/images/portrait_sample_30x40.ppm
- tests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txt
- src/domain/media_video_inspector.ts
- tests/fixtures/e2e/generate-export-video-snapshots.ts
- tests/fixtures/e2e/snapshots/reliable-feed-portrait.json
- tests/e2e/report_export.snapshots.e2e.test.ts
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.json
- docs/phase1_knowledge.md
- tests/integration/report_export.integration.test.ts
- tests/e2e/validate_matrix.snapshots.e2e.test.ts
- tests/fixtures/e2e/snapshots/reliable-story-white-canvas.json
- tests/integration/grid_preview.integration.test.ts
- tests/fixtures/e2e/benchmark_cases.json
- tests/fixtures/pixel/scenarios.ts
- tests/fixtures/matrix/cases_with_failure.json
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.json
- tests/fixtures/e2e/snapshots/experimental-feed-square.json
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.json
- src/domain/media_image_inspector.ts
- tests/fixtures/e2e/snapshots/overlay/overlay-4-5.json
- tests/integration/overlay.integration.test.ts
- tests/fixtures/images/micro_portrait_9x16.ppm
- tests/grid_preview.test.ts
- tests/fixtures/e2e/generate-report-export-snapshots.ts
- src/cli/export_image.ts
- tests/fixtures/e2e/generate-grid-preview-snapshots.ts
- tests/fixtures/e2e/report_export_cases.json
- tests/fixtures/matrix/cases_basic.json
- tests/fixtures/images/generate-fixtures.ts
- src/domain/report.ts
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.json
- tests/fixtures/e2e/snapshots/experimental-reel-landscape.json
- tests/export_profiles.test.ts
- src/cli/recommend.ts
- tests/tier.test.ts
- tests/integration/export.integration.test.ts
- tests/integration/validate_matrix.integration.test.ts
- tests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txt
- src/domain/recommend.ts
- tests/recommend.test.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.json
- src/domain/tier.ts
- src/cli/export_video.ts
- src/cli/args.ts
- tests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txt
- tests/fixtures/e2e/snapshots/reliable-story-white-ignored.json
- tests/e2e/export_video.snapshots.e2e.test.ts
- tests/helpers/ppm.ts
- tests/fixtures/e2e/snapshots/experimental-story-square.json
- tests/rules.test.ts
- tests/overlay.test.ts
- tests/fixtures/visual/snapshots/square_sample_36x36.classic.txt
- tests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txt
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.json
- tests/fixtures/images/generate-video-fixtures.ts
- tests/fixtures/e2e/generate-validate-matrix-snapshots.ts
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.json
- tests/fixtures/e2e/watch_folder_cases.json
- tests/property/margins.property.test.ts
- src/domain/analyze.ts
- config/ruleset.v1.json
- src/domain/validate_matrix.ts
- tests/helpers/types.ts
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.json
- tests/integration/cli.integration.test.ts
- tests/fixtures/images/square_sample_36x36.ppm
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.json
- src/cli/validate_matrix.ts
- tests/e2e/recommend.snapshots.e2e.test.ts
- src/domain/media_inspector.ts
- docs/repo_refresh_audit.md
- tests/e2e/report.snapshots.e2e.test.ts
- tests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.json
- tests/media_inspector.test.ts
- tests/fixtures/e2e/generate-watch-folder-snapshots.ts
- src/domain/objective_metrics.ts
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.json
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.json
- tests/e2e/analyze.snapshots.e2e.test.ts
- tests/e2e/grid_preview.snapshots.e2e.test.ts
- tests/fixtures/images/landscape_sample_48x32.ppm
- tests/fixtures/e2e/snapshots/reliable-reel-white-canvas.json
- tests/e2e/benchmark.snapshots.e2e.test.ts
- tests/white_canvas.test.ts
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.json
- src/cli/report_export.ts
- tests/integration/watch_folder.integration.test.ts
- tests/fixtures/e2e/analyze_cases.json
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.json
- src/domain/export_profiles.ts
- tests/fixtures/e2e/overlay_cases.json
- src/cli/benchmark.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.json
- src/cli/report.ts
- tests/fixtures/e2e/generate-overlay-snapshots.ts
- tests/integration/export_video.integration.test.ts
- tests/visual/pixel_diff.visual.test.ts
- src/domain/rules.ts
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.json
- tests/fixtures/e2e/validate_matrix_cases.json
- src/domain/benchmark.ts
- tests/fixtures/e2e/export_video_cases.json
- tests/helpers/image.ts
- src/domain/overlay.ts
- src/cli/analyze.ts
- src/domain/export_video.ts
- src/domain/white_canvas.ts
- src/cli/overlay.ts
- src/cli/grid_preview.ts
- src/types/contracts.ts
- src/cli/watch_folder.ts
- tests/e2e/recommend.matrix.e2e.test.ts
- src/domain/watch_folder.ts
- tests/visual/layout.visual.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
docs/plans/**/*.md
📄 CodeRabbit inference engine (AGENTS.md)
Update relevant markdown in
docs/plans/with problem, decisions, commands run, and lessons learned for feature branches
Files:
docs/plans/v1-product-split-cleanup.mddocs/plans/v1-prepare-image-cli.mddocs/plans/decisions-log.md
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)
**/*.{js,ts,jsx,tsx}: Prioritize using plain JavaScript/TypeScript instead of libraries for fundamental algorithms (e.g., use Array methods instead of lodash)
Use functional programming patterns and immutable data structures in JavaScript/TypeScript code
Files:
tests/integration/prepare_image.integration.test.tssrc/domain/prepare_image.tstests/helpers/cli.ts
**/*.test.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run
bun run test:unitfor pure layout and output path tests
Files:
tests/integration/prepare_image.integration.test.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript with
bunx tscfor type checking in the prepare-image tool
Files:
tests/integration/prepare_image.integration.test.tssrc/domain/prepare_image.tstests/helpers/cli.ts
src/domain/prepare_image.ts
📄 CodeRabbit inference engine (AGENTS.md)
Implement source probing, layout selection, and FFmpeg export in the domain layer
Files:
src/domain/prepare_image.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: edhor1608/passepartout
Timestamp: 2026-05-14T18:58:22.883Z
Learning: Use `bun run check` before PRs to run typecheck, Biome lint, unit tests, and the v1 integration test
🪛 LanguageTool
README.md
[style] ~27-~27: The double modal “required output” is nonstandard (only accepted in certain dialects). Consider “to be output”.
Context: ...tions: - --out <file-path>: required output file path. The extension is normalized ...
(NEEDS_FIXED)
AGENTS.md
[grammar] ~42-~42: Use a hyphen to join words.
Context: ...all`: every Bun test with an explicit 30 second timeout. ## Architecture Map - ...
(QB_NEW_EN_HYPHEN)
🔇 Additional comments (12)
docs/v1_split_plan.md (1)
3-13: LGTM!Also applies to: 40-40
docs/plans/v1-prepare-image-cli.md (1)
12-12: LGTM!docs/plans/decisions-log.md (1)
224-243: LGTM!docs/plans/v1-product-split-cleanup.md (1)
1-21: LGTM!src/domain/prepare_image.ts (2)
7-7: LGTM!
87-89: LGTM!AGENTS.md (1)
5-54: LGTM!README.md (1)
1-54: LGTM!tests/integration/prepare_image.integration.test.ts (2)
7-153: LGTM!
155-282: LGTM!package.json (1)
2-2: LGTM!Also applies to: 9-9, 13-17
tests/helpers/cli.ts (1)
11-26: LGTM!
30fe2ce to
68ae402
Compare
|
@coderabbitai review\n\nLatest push addresses the EXIF parsing bounds/partial-read feedback and downstack review notes. Please re-review. |
|
✅ Actions performedFull review triggered. |
a4eed1d to
838391e
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/plans/v1-product-split-cleanup.md (1)
18-21:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd a short “Lessons learned” section for this branch plan.
This file has context, decisions, and validation commands, but it is missing lessons learned. Add a brief section (1–3 bullets) capturing what changed during this split and why.
As per coding guidelines
docs/plans/**/*.md: "Update relevant markdown documentation indocs/plans/with problem statement, decisions, commands run, and lessons learned for feature branches".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/plans/v1-product-split-cleanup.md` around lines 18 - 21, Add a new "## Lessons learned" section to the v1-product-split-cleanup.md plan (place it after the existing "## Validation" section) containing 1–3 concise bullet points summarizing what changed during the product split and why (e.g., surprising trade-offs, migration steps that worked/failed, and recommended follow-ups), following the docs/plans/*.md guideline to include problem statement, decisions, commands run, and lessons learned; ensure the header is exactly "## Lessons learned" and the bullets are short actionable observations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/plans/decisions-log.md`:
- Around line 226-243: The decisions log now declares "2026-05-14: Use 57px as
the default final export border" but other entries still assert 165px; find the
later entries that claim 165px as the default and either update their wording to
note they are superseded by the 2026-05-14 decision or add an explicit
"Superseded by 2026-05-14: Use 57px..." note beneath those headings; ensure the
log contains a single active default by adding a supersession note to each older
165px entry (or by changing their phrasing to historical/obsolete) and keep the
57px decision unchanged.
In `@README.md`:
- Line 27: Update the README entry for the CLI option `--out <file-path>` by
changing the phrase "required output file path" to "required output path" while
keeping the rest of the description (including "The extension is normalized to
`.jpg`.") intact; modify the line that currently reads "`--out <file-path>`:
required output file path. The extension is normalized to `.jpg`." to use the
tightened wording.
---
Outside diff comments:
In `@docs/plans/v1-product-split-cleanup.md`:
- Around line 18-21: Add a new "## Lessons learned" section to the
v1-product-split-cleanup.md plan (place it after the existing "## Validation"
section) containing 1–3 concise bullet points summarizing what changed during
the product split and why (e.g., surprising trade-offs, migration steps that
worked/failed, and recommended follow-ups), following the docs/plans/*.md
guideline to include problem statement, decisions, commands run, and lessons
learned; ensure the header is exactly "## Lessons learned" and the bullets are
short actionable observations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: b46ac546-bcde-45dd-bb0d-22970c51c7a4
⛔ Files ignored due to path filters (7)
tests/fixtures/images/landscape_sample_48x32.jpgis excluded by!**/*.jpgtests/fixtures/images/landscape_sample_48x32.pngis excluded by!**/*.pngtests/fixtures/images/landscape_video_640x360.movis excluded by!**/*.movtests/fixtures/images/portrait_sample_30x40.jpgis excluded by!**/*.jpgtests/fixtures/images/portrait_sample_30x40.pngis excluded by!**/*.pngtests/fixtures/images/portrait_video_360x640.mp4is excluded by!**/*.mp4tests/fixtures/images/portrait_video_audio_360x640.mp4is excluded by!**/*.mp4
📒 Files selected for processing (205)
.github/workflows/ci.ymlAGENTS.mdREADME.mdconfig/export_profiles.v1.jsonconfig/ruleset.v1.jsondocs/phase1_knowledge.mddocs/plans/decisions-log.mddocs/plans/v1-prepare-image-cli.mddocs/plans/v1-product-split-cleanup.mddocs/repo_refresh_audit.mddocs/repo_refresh_feature_set.mddocs/repo_refresh_merge_plan.mddocs/v1_split_plan.mdpackage.jsonsrc/cli/analyze.tssrc/cli/args.tssrc/cli/benchmark.tssrc/cli/doctor.tssrc/cli/export_image.tssrc/cli/export_video.tssrc/cli/grid_preview.tssrc/cli/overlay.tssrc/cli/recommend.tssrc/cli/report.tssrc/cli/report_export.tssrc/cli/validate_matrix.tssrc/cli/watch_folder.tssrc/domain/analyze.tssrc/domain/benchmark.tssrc/domain/export_image.tssrc/domain/export_profiles.tssrc/domain/export_video.tssrc/domain/grid_preview.tssrc/domain/media_image_inspector.tssrc/domain/media_inspector.tssrc/domain/media_video_inspector.tssrc/domain/objective_metrics.tssrc/domain/overlay.tssrc/domain/prepare_image.tssrc/domain/recommend.tssrc/domain/report.tssrc/domain/report_export.tssrc/domain/rules.tssrc/domain/tier.tssrc/domain/validate_matrix.tssrc/domain/watch_folder.tssrc/domain/white_canvas.tssrc/types/contracts.tstests/e2e/analyze.snapshots.e2e.test.tstests/e2e/benchmark.snapshots.e2e.test.tstests/e2e/export.snapshots.e2e.test.tstests/e2e/export_video.snapshots.e2e.test.tstests/e2e/grid_preview.snapshots.e2e.test.tstests/e2e/overlay.snapshots.e2e.test.tstests/e2e/recommend.matrix.e2e.test.tstests/e2e/recommend.snapshots.e2e.test.tstests/e2e/report.snapshots.e2e.test.tstests/e2e/report_export.snapshots.e2e.test.tstests/e2e/validate_matrix.snapshots.e2e.test.tstests/e2e/watch_folder.snapshots.e2e.test.tstests/export_profiles.test.tstests/fixtures/e2e/analyze_cases.jsontests/fixtures/e2e/benchmark_cases.jsontests/fixtures/e2e/export_cases.jsontests/fixtures/e2e/export_video_cases.jsontests/fixtures/e2e/generate-analyze-snapshots.tstests/fixtures/e2e/generate-benchmark-snapshots.tstests/fixtures/e2e/generate-export-snapshots.tstests/fixtures/e2e/generate-export-video-snapshots.tstests/fixtures/e2e/generate-grid-preview-snapshots.tstests/fixtures/e2e/generate-overlay-snapshots.tstests/fixtures/e2e/generate-report-export-snapshots.tstests/fixtures/e2e/generate-report-snapshots.tstests/fixtures/e2e/generate-snapshots.tstests/fixtures/e2e/generate-validate-matrix-snapshots.tstests/fixtures/e2e/generate-watch-folder-snapshots.tstests/fixtures/e2e/grid_preview_cases.jsontests/fixtures/e2e/overlay_cases.jsontests/fixtures/e2e/recommend_cases.jsontests/fixtures/e2e/report_cases.jsontests/fixtures/e2e/report_export_cases.jsontests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.jsontests/fixtures/e2e/snapshots/experimental-feed-square.jsontests/fixtures/e2e/snapshots/experimental-reel-landscape.jsontests/fixtures/e2e/snapshots/experimental-story-square.jsontests/fixtures/e2e/snapshots/export/export-experimental-story.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.jsontests/fixtures/e2e/snapshots/overlay/overlay-3-4.jsontests/fixtures/e2e/snapshots/overlay/overlay-4-5.jsontests/fixtures/e2e/snapshots/overlay/overlay-9-16.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-app-direct.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-default.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.jsontests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.jsontests/fixtures/e2e/snapshots/reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/reliable-story-portrait.jsontests/fixtures/e2e/snapshots/reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/reliable-story-white-ignored.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.jsontests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.jsontests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.jsontests/fixtures/e2e/validate_matrix_cases.jsontests/fixtures/e2e/watch_folder_cases.jsontests/fixtures/exports/.gitkeeptests/fixtures/images/generate-fixtures.tstests/fixtures/images/generate-raster-fixtures.tstests/fixtures/images/generate-video-fixtures.tstests/fixtures/images/landscape_sample_48x32.ppmtests/fixtures/images/micro_landscape_16x9.ppmtests/fixtures/images/micro_portrait_9x16.ppmtests/fixtures/images/portrait_sample_30x40.ppmtests/fixtures/images/square_sample_36x36.ppmtests/fixtures/images/ultrawide_sample_60x24.ppmtests/fixtures/matrix/cases_basic.jsontests/fixtures/matrix/cases_with_failure.jsontests/fixtures/matrix/only_portrait.txttests/fixtures/pixel/generate-snapshots.tstests/fixtures/pixel/scenarios.tstests/fixtures/visual/generate-snapshots.tstests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txttests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txttests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txttests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txttests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txttests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txttests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txttests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txttests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txttests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txttests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txttests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txttests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txttests/fixtures/visual/snapshots/square_sample_36x36.classic.txttests/fixtures/visual/snapshots/square_sample_36x36.compat.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txttests/grid_preview.test.tstests/helpers/cli.tstests/helpers/image.test.tstests/helpers/image.tstests/helpers/ppm.tstests/helpers/types.tstests/helpers/visual.tstests/integration/analyze.integration.test.tstests/integration/benchmark.integration.test.tstests/integration/cli.integration.test.tstests/integration/export.integration.test.tstests/integration/export_video.integration.test.tstests/integration/grid_preview.integration.test.tstests/integration/overlay.integration.test.tstests/integration/prepare_image.integration.test.tstests/integration/report.integration.test.tstests/integration/report_export.integration.test.tstests/integration/validate_matrix.integration.test.tstests/integration/watch_folder.integration.test.tstests/media_inspector.test.tstests/overlay.test.tstests/property/margins.property.test.tstests/recommend.test.tstests/rules.test.tstests/tier.test.tstests/visual/layout.visual.test.tstests/visual/pixel_diff.visual.test.tstests/white_canvas.test.ts
💤 Files with no reviewable changes (194)
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.json
- tests/fixtures/e2e/recommend_cases.json
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.json
- tests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.json
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.json
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.json
- tests/fixtures/images/generate-raster-fixtures.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.json
- docs/phase1_knowledge.md
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.json
- tests/fixtures/e2e/analyze_cases.json
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.json
- tests/fixtures/pixel/scenarios.ts
- tests/fixtures/e2e/overlay_cases.json
- tests/fixtures/visual/snapshots/square_sample_36x36.classic.txt
- tests/fixtures/e2e/snapshots/reliable-feed-portrait.json
- tests/fixtures/images/square_sample_36x36.ppm
- tests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txt
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.json
- tests/fixtures/e2e/snapshots/reliable-reel-white-canvas.json
- tests/fixtures/images/generate-fixtures.ts
- tests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txt
- tests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txt
- tests/fixtures/e2e/snapshots/experimental-story-square.json
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.json
- src/domain/media_inspector.ts
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.json
- docs/repo_refresh_feature_set.md
- tests/integration/watch_folder.integration.test.ts
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txt
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.json
- tests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txt
- tests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txt
- src/domain/analyze.ts
- tests/e2e/export.snapshots.e2e.test.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.json
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.json
- tests/fixtures/e2e/snapshots/overlay/overlay-4-5.json
- tests/media_inspector.test.ts
- tests/fixtures/e2e/report_cases.json
- tests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.json
- tests/fixtures/e2e/snapshots/overlay/overlay-3-4.json
- tests/fixtures/images/ultrawide_sample_60x24.ppm
- tests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.json
- tests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txt
- tests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.json
- tests/fixtures/images/micro_landscape_16x9.ppm
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.json
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.json
- tests/integration/grid_preview.integration.test.ts
- tests/fixtures/e2e/validate_matrix_cases.json
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.json
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.json
- tests/e2e/recommend.matrix.e2e.test.ts
- docs/repo_refresh_merge_plan.md
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-default.json
- src/domain/grid_preview.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.json
- tests/fixtures/e2e/generate-overlay-snapshots.ts
- tests/e2e/export_video.snapshots.e2e.test.ts
- tests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txt
- tests/fixtures/e2e/generate-export-video-snapshots.ts
- tests/fixtures/e2e/generate-export-snapshots.ts
- tests/tier.test.ts
- tests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txt
- config/ruleset.v1.json
- tests/fixtures/e2e/snapshots/export/export-experimental-story.json
- tests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.json
- src/cli/report_export.ts
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.json
- src/domain/validate_matrix.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.json
- tests/integration/report.integration.test.ts
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.json
- src/domain/export_image.ts
- tests/helpers/visual.ts
- tests/fixtures/visual/snapshots/square_sample_36x36.compat.txt
- tests/fixtures/e2e/snapshots/experimental-reel-landscape.json
- tests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.json
- tests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.json
- tests/fixtures/e2e/generate-analyze-snapshots.ts
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.json
- tests/integration/overlay.integration.test.ts
- tests/e2e/grid_preview.snapshots.e2e.test.ts
- src/cli/analyze.ts
- tests/fixtures/e2e/generate-report-export-snapshots.ts
- tests/fixtures/matrix/cases_basic.json
- tests/fixtures/e2e/snapshots/reliable-story-white-canvas.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.json
- tests/fixtures/e2e/generate-watch-folder-snapshots.ts
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.json
- tests/recommend.test.ts
- tests/fixtures/e2e/snapshots/reliable-story-portrait.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.json
- tests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.json
- tests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txt
- tests/fixtures/e2e/benchmark_cases.json
- tests/integration/report_export.integration.test.ts
- tests/property/margins.property.test.ts
- tests/integration/cli.integration.test.ts
- src/cli/benchmark.ts
- src/cli/export_image.ts
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.json
- tests/overlay.test.ts
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.json
- tests/fixtures/images/micro_portrait_9x16.ppm
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.json
- src/cli/overlay.ts
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.json
- tests/fixtures/e2e/grid_preview_cases.json
- docs/repo_refresh_audit.md
- tests/integration/benchmark.integration.test.ts
- tests/fixtures/e2e/watch_folder_cases.json
- src/domain/export_profiles.ts
- tests/export_profiles.test.ts
- src/types/contracts.ts
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.json
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-app-direct.json
- tests/rules.test.ts
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txt
- src/domain/recommend.ts
- src/cli/export_video.ts
- tests/e2e/analyze.snapshots.e2e.test.ts
- tests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txt
- src/domain/objective_metrics.ts
- config/export_profiles.v1.json
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.json
- src/cli/watch_folder.ts
- tests/fixtures/pixel/generate-snapshots.ts
- tests/integration/export.integration.test.ts
- tests/e2e/watch_folder.snapshots.e2e.test.ts
- src/cli/validate_matrix.ts
- tests/integration/export_video.integration.test.ts
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.json
- tests/e2e/overlay.snapshots.e2e.test.ts
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txt
- tests/fixtures/images/portrait_sample_30x40.ppm
- tests/e2e/validate_matrix.snapshots.e2e.test.ts
- tests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.json
- tests/fixtures/e2e/generate-grid-preview-snapshots.ts
- tests/fixtures/e2e/export_cases.json
- tests/white_canvas.test.ts
- tests/fixtures/e2e/report_export_cases.json
- tests/fixtures/e2e/generate-report-snapshots.ts
- tests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txt
- tests/helpers/types.ts
- tests/e2e/recommend.snapshots.e2e.test.ts
- tests/e2e/report_export.snapshots.e2e.test.ts
- src/cli/args.ts
- tests/fixtures/e2e/generate-snapshots.ts
- tests/fixtures/e2e/generate-validate-matrix-snapshots.ts
- tests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txt
- tests/helpers/ppm.ts
- tests/helpers/image.test.ts
- src/domain/overlay.ts
- src/cli/doctor.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.json
- tests/fixtures/e2e/snapshots/reliable-story-white-ignored.json
- tests/fixtures/visual/generate-snapshots.ts
- src/domain/report_export.ts
- src/domain/export_video.ts
- tests/visual/pixel_diff.visual.test.ts
- tests/fixtures/e2e/snapshots/overlay/overlay-9-16.json
- tests/fixtures/matrix/cases_with_failure.json
- tests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txt
- tests/fixtures/matrix/only_portrait.txt
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.json
- tests/integration/analyze.integration.test.ts
- tests/fixtures/e2e/export_video_cases.json
- tests/fixtures/e2e/generate-benchmark-snapshots.ts
- src/domain/tier.ts
- tests/e2e/report.snapshots.e2e.test.ts
- src/domain/media_video_inspector.ts
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.json
- src/domain/media_image_inspector.ts
- tests/e2e/benchmark.snapshots.e2e.test.ts
- src/cli/grid_preview.ts
- src/domain/report.ts
- tests/visual/layout.visual.test.ts
- src/domain/watch_folder.ts
- src/domain/benchmark.ts
- tests/helpers/image.ts
- src/cli/recommend.ts
- tests/fixtures/images/generate-video-fixtures.ts
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.json
- tests/fixtures/e2e/snapshots/experimental-feed-square.json
- src/cli/report.ts
- src/domain/white_canvas.ts
- src/domain/rules.ts
- tests/fixtures/images/landscape_sample_48x32.ppm
- tests/grid_preview.test.ts
- tests/integration/validate_matrix.integration.test.ts
- .github/workflows/ci.yml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
docs/plans/**/*.md
📄 CodeRabbit inference engine (AGENTS.md)
Update relevant markdown documentation in
docs/plans/with problem statement, decisions, commands run, and lessons learned for feature branches
Files:
docs/plans/v1-prepare-image-cli.mddocs/plans/v1-product-split-cleanup.mddocs/plans/decisions-log.md
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)
**/*.{js,ts,jsx,tsx}: Prioritize using plain JavaScript/TypeScript instead of libraries for fundamental algorithms (e.g., use Array methods instead of lodash)
Use functional programming patterns and immutable data structures in JavaScript/TypeScript code
Files:
src/domain/prepare_image.tstests/integration/prepare_image.integration.test.tstests/helpers/cli.ts
**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Run
bun run checkbefore submitting PRs to verify typecheck, Biome lint, unit tests, and v1 integration tests pass
Files:
src/domain/prepare_image.tstests/integration/prepare_image.integration.test.tstests/helpers/cli.ts
src/domain/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Implement business logic including source probing, layout selection, FFmpeg export, and pure mathematical calculations in domain modules
Files:
src/domain/prepare_image.ts
**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
Organize tests into unit tests (
bun run test:unit) for pure logic and integration tests (bun run test:integration) for CLI/FFmpeg interaction
Files:
tests/integration/prepare_image.integration.test.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: edhor1608/passepartout
Timestamp: 2026-05-14T20:46:14.567Z
Learning: Maintain v1 as an Instagram image-prep tool that accepts PNG, JPEG, and TIFF images, places them on a white canvas, and exports high-quality baseline sRGB JPEG
Learnt from: CR
Repo: edhor1608/passepartout
Timestamp: 2026-05-14T20:46:14.567Z
Learning: Ensure prerequisites are met: Bun 1.3 or newer, TypeScript through `bunx tsc`, and `ffmpeg`/`ffprobe` on PATH
🪛 GitHub Check: check
tests/integration/prepare_image.integration.test.ts
[failure] 202-202: error: expect(received).toMatchObject(expected)
{
"codec_name": "mjpeg",
"height": 60,
- "width": 45,
- "width": 44,
}
- Expected - 1
-
Received + 1
at <anonymous> (/home/runner/work/passepartout/passepartout/tests/integration/prepare_image.integration.test.ts:202:50)
🪛 LanguageTool
README.md
[style] ~27-~27: The double modal “required output” is nonstandard (only accepted in certain dialects). Consider “to be output”.
Context: ...tions: - --out <file-path>: required output file path. The extension is normalized ...
(NEEDS_FIXED)
AGENTS.md
[grammar] ~42-~42: Use a hyphen to join words.
Context: ...all`: every Bun test with an explicit 30 second timeout. ## Architecture Map - ...
(QB_NEW_EN_HYPHEN)
🔇 Additional comments (7)
docs/plans/v1-prepare-image-cli.md (1)
12-12: LGTM!src/domain/prepare_image.ts (1)
1-1: LGTM!Also applies to: 7-7, 36-36, 87-178
docs/v1_split_plan.md (1)
3-13: LGTM!Also applies to: 40-40
tests/helpers/cli.ts (1)
11-26: LGTM!tests/integration/prepare_image.integration.test.ts (1)
193-203: ⚡ Quick winThe actual code at these lines already uses even dimensions (48x64 for the TIFF fixture) and asserts against
width: 48, height: 64. The review comment references outdated code ("45x60") that doesn't exist in the current state of the repository, making the suggested fix unnecessary.> Likely an incorrect or invalid review comment.AGENTS.md (1)
5-11: LGTM!Also applies to: 27-27, 32-34, 39-42, 46-50, 54-54
package.json (1)
2-2: LGTM!Also applies to: 9-9, 13-17
7d1afd5 to
b1e6ea8
Compare
838391e to
b70942b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
docs/plans/decisions-log.md (1)
224-243:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winResolve remaining default-border contradictions in this log.
This section establishes
57px, but later entries still read like165pxis active (Line 248, Line 252, Line 267, Line 695). Please mark those older entries as superseded so the log has one active default.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/plans/decisions-log.md` around lines 224 - 243, Update the decisions log so only the 57px default remains active: locate older entries that still claim 165px (search for the string "165px" and the headings or paragraphs that mention the earlier default) and mark them as superseded or update their text to reference that they were superseded by "## 2026-05-14: Use 57px as the default final export border"; ensure the CLI default paragraph and any rationale/consequence bullets reflect 57px as the current active default while preserving the original historical notes as explicitly superseded.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/domain/prepare_image.ts`:
- Around line 147-170: Validate the TIFF header magic and orientation entry
fields before returning the orientation: after computing
littleEndian/readUInt16/readUInt32 and ifdOffset, check that
readUInt16.call(bytes, 2) === 42 (the TIFF magic) and that ifdOffset is within
bounds; when iterating entries (using entryOffset, entryCount), for the matching
tag 0x0112 also validate the entry's type and count by reading type =
readUInt16.call(bytes, entryOffset + 2) and count = readUInt32.call(bytes,
entryOffset + 4) and only accept the value if type === 3 (SHORT) and count === 1
and the value offset (entryOffset + 8 or the pointed data) is in-range;
otherwise skip and continue or return null on out-of-bounds, preventing
misinterpreting corrupt EXIF as orientation 5–8.
---
Duplicate comments:
In `@docs/plans/decisions-log.md`:
- Around line 224-243: Update the decisions log so only the 57px default remains
active: locate older entries that still claim 165px (search for the string
"165px" and the headings or paragraphs that mention the earlier default) and
mark them as superseded or update their text to reference that they were
superseded by "## 2026-05-14: Use 57px as the default final export border";
ensure the CLI default paragraph and any rationale/consequence bullets reflect
57px as the current active default while preserving the original historical
notes as explicitly superseded.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7fe6a55f-78e8-4b62-9580-b2fd0b719097
⛔ Files ignored due to path filters (7)
tests/fixtures/images/landscape_sample_48x32.jpgis excluded by!**/*.jpgtests/fixtures/images/landscape_sample_48x32.pngis excluded by!**/*.pngtests/fixtures/images/landscape_video_640x360.movis excluded by!**/*.movtests/fixtures/images/portrait_sample_30x40.jpgis excluded by!**/*.jpgtests/fixtures/images/portrait_sample_30x40.pngis excluded by!**/*.pngtests/fixtures/images/portrait_video_360x640.mp4is excluded by!**/*.mp4tests/fixtures/images/portrait_video_audio_360x640.mp4is excluded by!**/*.mp4
📒 Files selected for processing (205)
.github/workflows/ci.ymlAGENTS.mdREADME.mdconfig/export_profiles.v1.jsonconfig/ruleset.v1.jsondocs/phase1_knowledge.mddocs/plans/decisions-log.mddocs/plans/v1-prepare-image-cli.mddocs/plans/v1-product-split-cleanup.mddocs/repo_refresh_audit.mddocs/repo_refresh_feature_set.mddocs/repo_refresh_merge_plan.mddocs/v1_split_plan.mdpackage.jsonsrc/cli/analyze.tssrc/cli/args.tssrc/cli/benchmark.tssrc/cli/doctor.tssrc/cli/export_image.tssrc/cli/export_video.tssrc/cli/grid_preview.tssrc/cli/overlay.tssrc/cli/recommend.tssrc/cli/report.tssrc/cli/report_export.tssrc/cli/validate_matrix.tssrc/cli/watch_folder.tssrc/domain/analyze.tssrc/domain/benchmark.tssrc/domain/export_image.tssrc/domain/export_profiles.tssrc/domain/export_video.tssrc/domain/grid_preview.tssrc/domain/media_image_inspector.tssrc/domain/media_inspector.tssrc/domain/media_video_inspector.tssrc/domain/objective_metrics.tssrc/domain/overlay.tssrc/domain/prepare_image.tssrc/domain/recommend.tssrc/domain/report.tssrc/domain/report_export.tssrc/domain/rules.tssrc/domain/tier.tssrc/domain/validate_matrix.tssrc/domain/watch_folder.tssrc/domain/white_canvas.tssrc/types/contracts.tstests/e2e/analyze.snapshots.e2e.test.tstests/e2e/benchmark.snapshots.e2e.test.tstests/e2e/export.snapshots.e2e.test.tstests/e2e/export_video.snapshots.e2e.test.tstests/e2e/grid_preview.snapshots.e2e.test.tstests/e2e/overlay.snapshots.e2e.test.tstests/e2e/recommend.matrix.e2e.test.tstests/e2e/recommend.snapshots.e2e.test.tstests/e2e/report.snapshots.e2e.test.tstests/e2e/report_export.snapshots.e2e.test.tstests/e2e/validate_matrix.snapshots.e2e.test.tstests/e2e/watch_folder.snapshots.e2e.test.tstests/export_profiles.test.tstests/fixtures/e2e/analyze_cases.jsontests/fixtures/e2e/benchmark_cases.jsontests/fixtures/e2e/export_cases.jsontests/fixtures/e2e/export_video_cases.jsontests/fixtures/e2e/generate-analyze-snapshots.tstests/fixtures/e2e/generate-benchmark-snapshots.tstests/fixtures/e2e/generate-export-snapshots.tstests/fixtures/e2e/generate-export-video-snapshots.tstests/fixtures/e2e/generate-grid-preview-snapshots.tstests/fixtures/e2e/generate-overlay-snapshots.tstests/fixtures/e2e/generate-report-export-snapshots.tstests/fixtures/e2e/generate-report-snapshots.tstests/fixtures/e2e/generate-snapshots.tstests/fixtures/e2e/generate-validate-matrix-snapshots.tstests/fixtures/e2e/generate-watch-folder-snapshots.tstests/fixtures/e2e/grid_preview_cases.jsontests/fixtures/e2e/overlay_cases.jsontests/fixtures/e2e/recommend_cases.jsontests/fixtures/e2e/report_cases.jsontests/fixtures/e2e/report_export_cases.jsontests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.jsontests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.jsontests/fixtures/e2e/snapshots/experimental-feed-square.jsontests/fixtures/e2e/snapshots/experimental-reel-landscape.jsontests/fixtures/e2e/snapshots/experimental-story-square.jsontests/fixtures/e2e/snapshots/export/export-experimental-story.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.jsontests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.jsontests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.jsontests/fixtures/e2e/snapshots/overlay/overlay-3-4.jsontests/fixtures/e2e/snapshots/overlay/overlay-4-5.jsontests/fixtures/e2e/snapshots/overlay/overlay-9-16.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-app-direct.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-default.jsontests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.jsontests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.jsontests/fixtures/e2e/snapshots/reliable-feed-portrait.jsontests/fixtures/e2e/snapshots/reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/reliable-story-portrait.jsontests/fixtures/e2e/snapshots/reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/reliable-story-white-ignored.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.jsontests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.jsontests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.jsontests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.jsontests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.jsontests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.jsontests/fixtures/e2e/validate_matrix_cases.jsontests/fixtures/e2e/watch_folder_cases.jsontests/fixtures/exports/.gitkeeptests/fixtures/images/generate-fixtures.tstests/fixtures/images/generate-raster-fixtures.tstests/fixtures/images/generate-video-fixtures.tstests/fixtures/images/landscape_sample_48x32.ppmtests/fixtures/images/micro_landscape_16x9.ppmtests/fixtures/images/micro_portrait_9x16.ppmtests/fixtures/images/portrait_sample_30x40.ppmtests/fixtures/images/square_sample_36x36.ppmtests/fixtures/images/ultrawide_sample_60x24.ppmtests/fixtures/matrix/cases_basic.jsontests/fixtures/matrix/cases_with_failure.jsontests/fixtures/matrix/only_portrait.txttests/fixtures/pixel/generate-snapshots.tstests/fixtures/pixel/scenarios.tstests/fixtures/visual/generate-snapshots.tstests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txttests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txttests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txttests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txttests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txttests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txttests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txttests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txttests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txttests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txttests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txttests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txttests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txttests/fixtures/visual/snapshots/square_sample_36x36.classic.txttests/fixtures/visual/snapshots/square_sample_36x36.compat.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txttests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txttests/grid_preview.test.tstests/helpers/cli.tstests/helpers/image.test.tstests/helpers/image.tstests/helpers/ppm.tstests/helpers/types.tstests/helpers/visual.tstests/integration/analyze.integration.test.tstests/integration/benchmark.integration.test.tstests/integration/cli.integration.test.tstests/integration/export.integration.test.tstests/integration/export_video.integration.test.tstests/integration/grid_preview.integration.test.tstests/integration/overlay.integration.test.tstests/integration/prepare_image.integration.test.tstests/integration/report.integration.test.tstests/integration/report_export.integration.test.tstests/integration/validate_matrix.integration.test.tstests/integration/watch_folder.integration.test.tstests/media_inspector.test.tstests/overlay.test.tstests/property/margins.property.test.tstests/recommend.test.tstests/rules.test.tstests/tier.test.tstests/visual/layout.visual.test.tstests/visual/pixel_diff.visual.test.tstests/white_canvas.test.ts
💤 Files with no reviewable changes (194)
- tests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txt
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.json
- tests/fixtures/images/micro_landscape_16x9.ppm
- tests/e2e/recommend.snapshots.e2e.test.ts
- tests/fixtures/e2e/validate_matrix_cases.json
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txt
- tests/fixtures/e2e/snapshots/overlay/overlay-9-16.json
- config/ruleset.v1.json
- tests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.json
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.json
- tests/helpers/visual.ts
- tests/fixtures/e2e/analyze_cases.json
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.json
- tests/fixtures/images/generate-raster-fixtures.ts
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.json
- tests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txt
- tests/fixtures/e2e/snapshots/overlay/overlay-3-4.json
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.json
- tests/e2e/export_video.snapshots.e2e.test.ts
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-app-direct.json
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.json
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.json
- tests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txt
- tests/visual/layout.visual.test.ts
- tests/fixtures/e2e/snapshots/overlay/overlay-4-5.json
- tests/fixtures/e2e/overlay_cases.json
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.json
- tests/grid_preview.test.ts
- docs/repo_refresh_feature_set.md
- tests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.json
- tests/e2e/analyze.snapshots.e2e.test.ts
- tests/e2e/grid_preview.snapshots.e2e.test.ts
- src/cli/benchmark.ts
- tests/integration/export.integration.test.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.json
- src/cli/grid_preview.ts
- tests/fixtures/e2e/export_cases.json
- docs/phase1_knowledge.md
- tests/recommend.test.ts
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.json
- tests/fixtures/e2e/snapshots/reliable-story-portrait.json
- src/domain/media_video_inspector.ts
- tests/fixtures/matrix/only_portrait.txt
- tests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txt
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.json
- tests/fixtures/e2e/generate-grid-preview-snapshots.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.json
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.json
- tests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txt
- tests/fixtures/images/square_sample_36x36.ppm
- tests/e2e/validate_matrix.snapshots.e2e.test.ts
- tests/fixtures/images/generate-video-fixtures.ts
- tests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txt
- tests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.json
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.json
- tests/fixtures/e2e/grid_preview_cases.json
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.json
- tests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txt
- tests/fixtures/e2e/snapshots/reliable-feed-portrait.json
- tests/fixtures/images/generate-fixtures.ts
- tests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txt
- tests/rules.test.ts
- src/domain/media_image_inspector.ts
- tests/fixtures/images/portrait_sample_30x40.ppm
- .github/workflows/ci.yml
- src/cli/watch_folder.ts
- tests/fixtures/e2e/watch_folder_cases.json
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txt
- tests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.json
- tests/fixtures/e2e/report_cases.json
- tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.json
- src/cli/export_image.ts
- tests/integration/overlay.integration.test.ts
- tests/fixtures/images/ultrawide_sample_60x24.ppm
- tests/fixtures/e2e/snapshots/reliable-reel-white-canvas.json
- tests/fixtures/e2e/generate-snapshots.ts
- tests/fixtures/matrix/cases_basic.json
- tests/fixtures/images/micro_portrait_9x16.ppm
- tests/integration/grid_preview.integration.test.ts
- tests/fixtures/e2e/recommend_cases.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.json
- tests/helpers/image.ts
- src/domain/export_image.ts
- tests/fixtures/e2e/report_export_cases.json
- tests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.json
- tests/fixtures/e2e/snapshots/experimental-feed-square.json
- tests/property/margins.property.test.ts
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.json
- tests/fixtures/pixel/scenarios.ts
- tests/e2e/report.snapshots.e2e.test.ts
- tests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txt
- src/domain/watch_folder.ts
- tests/visual/pixel_diff.visual.test.ts
- tests/fixtures/pixel/generate-snapshots.ts
- tests/fixtures/e2e/snapshots/export/export-experimental-story.json
- tests/helpers/types.ts
- tests/fixtures/visual/snapshots/square_sample_36x36.compat.txt
- tests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.json
- tests/fixtures/matrix/cases_with_failure.json
- tests/media_inspector.test.ts
- src/domain/validate_matrix.ts
- src/domain/overlay.ts
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.json
- tests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.json
- src/cli/overlay.ts
- tests/e2e/watch_folder.snapshots.e2e.test.ts
- tests/fixtures/e2e/generate-export-video-snapshots.ts
- tests/fixtures/e2e/generate-validate-matrix-snapshots.ts
- tests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txt
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.json
- tests/fixtures/e2e/generate-overlay-snapshots.ts
- tests/fixtures/e2e/generate-export-snapshots.ts
- tests/export_profiles.test.ts
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.json
- docs/repo_refresh_audit.md
- config/export_profiles.v1.json
- tests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.json
- src/domain/white_canvas.ts
- tests/helpers/image.test.ts
- tests/integration/report_export.integration.test.ts
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.json
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.json
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.json
- tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.json
- tests/fixtures/e2e/snapshots/reliable-story-white-ignored.json
- tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.json
- tests/fixtures/e2e/generate-report-snapshots.ts
- tests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txt
- src/domain/media_inspector.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.json
- tests/fixtures/e2e/generate-report-export-snapshots.ts
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.json
- src/cli/export_video.ts
- tests/integration/export_video.integration.test.ts
- tests/fixtures/e2e/snapshots/experimental-reel-landscape.json
- tests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txt
- src/domain/tier.ts
- src/cli/report.ts
- tests/integration/watch_folder.integration.test.ts
- tests/integration/validate_matrix.integration.test.ts
- src/cli/analyze.ts
- tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.json
- src/cli/report_export.ts
- src/domain/report.ts
- tests/tier.test.ts
- src/domain/recommend.ts
- tests/e2e/recommend.matrix.e2e.test.ts
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.json
- tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.json
- tests/fixtures/e2e/export_video_cases.json
- src/domain/rules.ts
- tests/fixtures/e2e/benchmark_cases.json
- tests/integration/analyze.integration.test.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.json
- tests/integration/cli.integration.test.ts
- tests/fixtures/e2e/generate-analyze-snapshots.ts
- src/domain/export_profiles.ts
- src/domain/grid_preview.ts
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.json
- tests/e2e/overlay.snapshots.e2e.test.ts
- tests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.json
- src/cli/validate_matrix.ts
- docs/repo_refresh_merge_plan.md
- src/domain/export_video.ts
- tests/fixtures/visual/generate-snapshots.ts
- tests/overlay.test.ts
- tests/fixtures/images/landscape_sample_48x32.ppm
- tests/fixtures/e2e/snapshots/experimental-story-square.json
- tests/fixtures/e2e/generate-watch-folder-snapshots.ts
- tests/fixtures/e2e/snapshots/reliable-story-white-canvas.json
- tests/white_canvas.test.ts
- tests/fixtures/visual/snapshots/square_sample_36x36.classic.txt
- tests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.json
- src/cli/args.ts
- tests/integration/benchmark.integration.test.ts
- tests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txt
- src/domain/objective_metrics.ts
- src/cli/recommend.ts
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.json
- tests/e2e/export.snapshots.e2e.test.ts
- src/cli/doctor.ts
- tests/integration/report.integration.test.ts
- tests/fixtures/e2e/generate-benchmark-snapshots.ts
- tests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txt
- src/domain/analyze.ts
- src/domain/report_export.ts
- tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-default.json
- tests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.json
- tests/helpers/ppm.ts
- tests/e2e/benchmark.snapshots.e2e.test.ts
- src/types/contracts.ts
- src/domain/benchmark.ts
- tests/e2e/report_export.snapshots.e2e.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)
**/*.{js,ts,jsx,tsx}: Prioritize using plain JavaScript/TypeScript instead of libraries for fundamental algorithms (e.g., use Array methods instead of lodash)
Use functional programming patterns and immutable data structures in JavaScript/TypeScript code
Files:
src/domain/prepare_image.tstests/integration/prepare_image.integration.test.tstests/helpers/cli.ts
src/domain/prepare_image.ts
📄 CodeRabbit inference engine (AGENTS.md)
The domain layer at
src/domain/prepare_image.tsshould handle source probing, layout selection, and FFmpeg export
Files:
src/domain/prepare_image.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: edhor1608/passepartout
Timestamp: 2026-05-14T20:52:23.066Z
Learning: Run `bun run check` before PRs to ensure typecheck, Biome lint, unit tests, and v1 integration test all pass
Learnt from: CR
Repo: edhor1608/passepartout
Timestamp: 2026-05-14T20:52:23.066Z
Learning: Use `bun install --frozen-lockfile` to install dependencies with exact locked versions
Learnt from: CR
Repo: edhor1608/passepartout
Timestamp: 2026-05-14T20:52:23.066Z
Learning: Update relevant markdown in `docs/plans/` with problem, decisions, commands run, and lessons learned for feature branches
🪛 LanguageTool
README.md
[style] ~27-~27: The double modal “required output” is nonstandard (only accepted in certain dialects). Consider “to be output”.
Context: ...tions: - --out <file-path>: required output file path. The extension is normalized ...
(NEEDS_FIXED)
AGENTS.md
[grammar] ~42-~42: Use a hyphen to join words.
Context: ...all`: every Bun test with an explicit 30 second timeout. ## Architecture Map - ...
(QB_NEW_EN_HYPHEN)
🔇 Additional comments (8)
AGENTS.md (1)
5-11: LGTM!Also applies to: 27-27, 32-34, 39-42, 46-50, 54-54
README.md (1)
1-6: LGTM!Also applies to: 19-23, 25-38, 40-47, 50-53
docs/plans/v1-prepare-image-cli.md (1)
12-12: LGTM!docs/plans/v1-product-split-cleanup.md (1)
1-20: LGTM!docs/v1_split_plan.md (1)
3-13: LGTM!Also applies to: 40-40
package.json (1)
2-2: LGTM!Also applies to: 9-17
tests/helpers/cli.ts (1)
11-26: LGTM!tests/integration/prepare_image.integration.test.ts (1)
1-154: LGTM!Also applies to: 166-282
b70942b to
9162b34
Compare
b1e6ea8 to
9e86a92
Compare
Dismissed after requested changes were addressed and fresh CodeRabbit status passed on current head.
9162b34 to
7c8c5c9
Compare
Merge activity
|
7c8c5c9 to
39941e5
Compare

Note
Replace multi-command lab CLI with a single
prepare-imagecommandprepare-imageentrypoint at src/cli/prepare_image.ts.prepare-imageaccepts an input path,--out, and optional--border-px(default 57px); applies layout rules (3:2 landscape up to 2160×1440, 3:4 portrait/square up to 1440×1920, no upscaling), strips metadata, and writes a JPEG via FFmpeg.bun run checkis now the only quality gate.instagram-upload-quality-labtopassepartoutand rewrites README and AGENTS.md around the v1 surface.Macroscope summarized 7c8c5c9.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores