Skip to content

chore: cut v1 product surface - #59

Merged
edhor1608 merged 1 commit into
mainfrom
codex/v1-product-split-cleanup
May 14, 2026
Merged

edhor1608 merged 1 commit into
mainfrom
codex/v1-product-split-cleanup

Conversation

@edhor1608

@edhor1608 edhor1608 commented May 14, 2026 •

Copy link
Copy Markdown
Owner

Note

Replace multi-command lab CLI with a single prepare-image command

  • Removes all previous lab CLI scripts (recommend, analyze, overlay, grid-preview, watch-folder, etc.) and replaces them with a single prepare-image entrypoint at src/cli/prepare_image.ts.
  • prepare-image accepts 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.
  • Adds domain modules for layout computation (src/domain/prepare_image_layout.ts), output path resolution (src/domain/output_path.ts), and EXIF/rotation-aware dimension inspection (src/domain/prepare_image.ts).
  • Consolidates tests to unit suites and a single integration test at tests/integration/prepare_image.integration.test.ts; bun run check is now the only quality gate.
  • Renames the package from instagram-upload-quality-lab to passepartout and rewrites README and AGENTS.md around the v1 surface.
  • Risk: all previously exposed lab CLI commands are permanently removed.

Macroscope summarized 7c8c5c9.

Summary by CodeRabbit

  • New Features

    • Single-command CLI: prepare-image (bun run prepare-image --out [--border-px ]); on success prints only the output path.
    • EXIF orientation applied visually before sizing; outputs have EXIF/XMP stripped.
  • Bug Fixes

    • Default final border changed to 57px.
    • Exports are collision-safe and will not overwrite existing files.
  • Documentation

    • README/AGENTS rewritten to focus on the prepare-image workflow and simplified install/run instructions.
  • Chores

    • Quality gate simplified: bun run check runs typecheck, lint, unit tests and a v1 integration test.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This 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
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/v1-product-split-cleanup
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/v1-product-split-cleanup

edhor1608 commented May 14, 2026 •

Copy link
Copy Markdown
Owner Author

@edhor1608
edhor1608 force-pushed the codex/v1-product-split-cleanup branch 2 times, most recently from a69c3ed to 30fe2ce Compare May 14, 2026 18:58
coderabbitai[bot]
coderabbitai Bot previously requested changes May 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7d1afd5 and 30fe2ce.

⛔ Files ignored due to path filters (7)
  • tests/fixtures/images/landscape_sample_48x32.jpg is excluded by !**/*.jpg
  • tests/fixtures/images/landscape_sample_48x32.png is excluded by !**/*.png
  • tests/fixtures/images/landscape_video_640x360.mov is excluded by !**/*.mov
  • tests/fixtures/images/portrait_sample_30x40.jpg is excluded by !**/*.jpg
  • tests/fixtures/images/portrait_sample_30x40.png is excluded by !**/*.png
  • tests/fixtures/images/portrait_video_360x640.mp4 is excluded by !**/*.mp4
  • tests/fixtures/images/portrait_video_audio_360x640.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (204)
  • AGENTS.md
  • README.md
  • config/export_profiles.v1.json
  • config/ruleset.v1.json
  • docs/phase1_knowledge.md
  • docs/plans/decisions-log.md
  • docs/plans/v1-prepare-image-cli.md
  • docs/plans/v1-product-split-cleanup.md
  • docs/repo_refresh_audit.md
  • docs/repo_refresh_feature_set.md
  • docs/repo_refresh_merge_plan.md
  • docs/v1_split_plan.md
  • package.json
  • src/cli/analyze.ts
  • src/cli/args.ts
  • src/cli/benchmark.ts
  • src/cli/doctor.ts
  • src/cli/export_image.ts
  • src/cli/export_video.ts
  • src/cli/grid_preview.ts
  • src/cli/overlay.ts
  • src/cli/recommend.ts
  • src/cli/report.ts
  • src/cli/report_export.ts
  • src/cli/validate_matrix.ts
  • src/cli/watch_folder.ts
  • src/domain/analyze.ts
  • src/domain/benchmark.ts
  • src/domain/export_image.ts
  • src/domain/export_profiles.ts
  • src/domain/export_video.ts
  • src/domain/grid_preview.ts
  • src/domain/media_image_inspector.ts
  • src/domain/media_inspector.ts
  • src/domain/media_video_inspector.ts
  • src/domain/objective_metrics.ts
  • src/domain/overlay.ts
  • src/domain/prepare_image.ts
  • src/domain/recommend.ts
  • src/domain/report.ts
  • src/domain/report_export.ts
  • src/domain/rules.ts
  • src/domain/tier.ts
  • src/domain/validate_matrix.ts
  • src/domain/watch_folder.ts
  • src/domain/white_canvas.ts
  • src/types/contracts.ts
  • tests/e2e/analyze.snapshots.e2e.test.ts
  • tests/e2e/benchmark.snapshots.e2e.test.ts
  • tests/e2e/export.snapshots.e2e.test.ts
  • tests/e2e/export_video.snapshots.e2e.test.ts
  • tests/e2e/grid_preview.snapshots.e2e.test.ts
  • tests/e2e/overlay.snapshots.e2e.test.ts
  • tests/e2e/recommend.matrix.e2e.test.ts
  • tests/e2e/recommend.snapshots.e2e.test.ts
  • tests/e2e/report.snapshots.e2e.test.ts
  • tests/e2e/report_export.snapshots.e2e.test.ts
  • tests/e2e/validate_matrix.snapshots.e2e.test.ts
  • tests/e2e/watch_folder.snapshots.e2e.test.ts
  • tests/export_profiles.test.ts
  • tests/fixtures/e2e/analyze_cases.json
  • tests/fixtures/e2e/benchmark_cases.json
  • tests/fixtures/e2e/export_cases.json
  • tests/fixtures/e2e/export_video_cases.json
  • tests/fixtures/e2e/generate-analyze-snapshots.ts
  • tests/fixtures/e2e/generate-benchmark-snapshots.ts
  • tests/fixtures/e2e/generate-export-snapshots.ts
  • tests/fixtures/e2e/generate-export-video-snapshots.ts
  • tests/fixtures/e2e/generate-grid-preview-snapshots.ts
  • tests/fixtures/e2e/generate-overlay-snapshots.ts
  • tests/fixtures/e2e/generate-report-export-snapshots.ts
  • tests/fixtures/e2e/generate-report-snapshots.ts
  • tests/fixtures/e2e/generate-snapshots.ts
  • tests/fixtures/e2e/generate-validate-matrix-snapshots.ts
  • tests/fixtures/e2e/generate-watch-folder-snapshots.ts
  • tests/fixtures/e2e/grid_preview_cases.json
  • tests/fixtures/e2e/overlay_cases.json
  • tests/fixtures/e2e/recommend_cases.json
  • tests/fixtures/e2e/report_cases.json
  • tests/fixtures/e2e/report_export_cases.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.json
  • tests/fixtures/e2e/snapshots/experimental-feed-square.json
  • tests/fixtures/e2e/snapshots/experimental-reel-landscape.json
  • tests/fixtures/e2e/snapshots/experimental-story-square.json
  • tests/fixtures/e2e/snapshots/export/export-experimental-story.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.json
  • tests/fixtures/e2e/snapshots/overlay/overlay-3-4.json
  • tests/fixtures/e2e/snapshots/overlay/overlay-4-5.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/reliable-feed-landscape-white-default.json
  • tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.json
  • tests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.json
  • tests/fixtures/e2e/snapshots/reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/reliable-story-portrait.json
  • tests/fixtures/e2e/snapshots/reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/reliable-story-white-ignored.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.json
  • tests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.json
  • tests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.json
  • tests/fixtures/e2e/validate_matrix_cases.json
  • tests/fixtures/e2e/watch_folder_cases.json
  • tests/fixtures/exports/.gitkeep
  • tests/fixtures/images/generate-fixtures.ts
  • tests/fixtures/images/generate-raster-fixtures.ts
  • tests/fixtures/images/generate-video-fixtures.ts
  • tests/fixtures/images/landscape_sample_48x32.ppm
  • tests/fixtures/images/micro_landscape_16x9.ppm
  • tests/fixtures/images/micro_portrait_9x16.ppm
  • tests/fixtures/images/portrait_sample_30x40.ppm
  • tests/fixtures/images/square_sample_36x36.ppm
  • tests/fixtures/images/ultrawide_sample_60x24.ppm
  • tests/fixtures/matrix/cases_basic.json
  • tests/fixtures/matrix/cases_with_failure.json
  • tests/fixtures/matrix/only_portrait.txt
  • tests/fixtures/pixel/generate-snapshots.ts
  • tests/fixtures/pixel/scenarios.ts
  • tests/fixtures/visual/generate-snapshots.ts
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txt
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txt
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.classic.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.compat.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txt
  • tests/grid_preview.test.ts
  • tests/helpers/cli.ts
  • tests/helpers/image.test.ts
  • tests/helpers/image.ts
  • tests/helpers/ppm.ts
  • tests/helpers/types.ts
  • tests/helpers/visual.ts
  • tests/integration/analyze.integration.test.ts
  • tests/integration/benchmark.integration.test.ts
  • tests/integration/cli.integration.test.ts
  • tests/integration/export.integration.test.ts
  • tests/integration/export_video.integration.test.ts
  • tests/integration/grid_preview.integration.test.ts
  • tests/integration/overlay.integration.test.ts
  • tests/integration/prepare_image.integration.test.ts
  • tests/integration/report.integration.test.ts
  • tests/integration/report_export.integration.test.ts
  • tests/integration/validate_matrix.integration.test.ts
  • tests/integration/watch_folder.integration.test.ts
  • tests/media_inspector.test.ts
  • tests/overlay.test.ts
  • tests/property/margins.property.test.ts
  • tests/recommend.test.ts
  • tests/rules.test.ts
  • tests/tier.test.ts
  • tests/visual/layout.visual.test.ts
  • tests/visual/pixel_diff.visual.test.ts
  • tests/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.md
  • docs/plans/v1-prepare-image-cli.md
  • docs/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.ts
  • src/domain/prepare_image.ts
  • tests/helpers/cli.ts
**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run bun run test:unit for 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 tsc for type checking in the prepare-image tool

Files:

  • tests/integration/prepare_image.integration.test.ts
  • src/domain/prepare_image.ts
  • tests/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!

Comment thread src/domain/prepare_image.ts Outdated
Comment thread src/domain/prepare_image.ts
Comment thread src/domain/prepare_image.ts
@edhor1608
edhor1608 force-pushed the codex/v1-product-split-cleanup branch from 30fe2ce to 68ae402 Compare May 14, 2026 20:14
@edhor1608

Copy link
Copy Markdown
Owner Author

@coderabbitai review\n\nLatest push addresses the EXIF parsing bounds/partial-read feedback and downstack review notes. Please re-review.

@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown

@edhor1608 Understood! I'll kick off a fresh review of the latest push, focusing on the updated EXIF parsing bounds/partial-read handling in src/domain/prepare_image.ts along with all other changes in the PR.

✅ Actions performed

Full review triggered.

@edhor1608
edhor1608 force-pushed the codex/v1-product-split-cleanup branch 2 times, most recently from a4eed1d to 838391e Compare May 14, 2026 20:50
coderabbitai[bot]
coderabbitai Bot previously requested changes May 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Add 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 in docs/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

📥 Commits

Reviewing files that changed from the base of the PR and between 68ae402 and a4eed1d.

⛔ Files ignored due to path filters (7)
  • tests/fixtures/images/landscape_sample_48x32.jpg is excluded by !**/*.jpg
  • tests/fixtures/images/landscape_sample_48x32.png is excluded by !**/*.png
  • tests/fixtures/images/landscape_video_640x360.mov is excluded by !**/*.mov
  • tests/fixtures/images/portrait_sample_30x40.jpg is excluded by !**/*.jpg
  • tests/fixtures/images/portrait_sample_30x40.png is excluded by !**/*.png
  • tests/fixtures/images/portrait_video_360x640.mp4 is excluded by !**/*.mp4
  • tests/fixtures/images/portrait_video_audio_360x640.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (205)
  • .github/workflows/ci.yml
  • AGENTS.md
  • README.md
  • config/export_profiles.v1.json
  • config/ruleset.v1.json
  • docs/phase1_knowledge.md
  • docs/plans/decisions-log.md
  • docs/plans/v1-prepare-image-cli.md
  • docs/plans/v1-product-split-cleanup.md
  • docs/repo_refresh_audit.md
  • docs/repo_refresh_feature_set.md
  • docs/repo_refresh_merge_plan.md
  • docs/v1_split_plan.md
  • package.json
  • src/cli/analyze.ts
  • src/cli/args.ts
  • src/cli/benchmark.ts
  • src/cli/doctor.ts
  • src/cli/export_image.ts
  • src/cli/export_video.ts
  • src/cli/grid_preview.ts
  • src/cli/overlay.ts
  • src/cli/recommend.ts
  • src/cli/report.ts
  • src/cli/report_export.ts
  • src/cli/validate_matrix.ts
  • src/cli/watch_folder.ts
  • src/domain/analyze.ts
  • src/domain/benchmark.ts
  • src/domain/export_image.ts
  • src/domain/export_profiles.ts
  • src/domain/export_video.ts
  • src/domain/grid_preview.ts
  • src/domain/media_image_inspector.ts
  • src/domain/media_inspector.ts
  • src/domain/media_video_inspector.ts
  • src/domain/objective_metrics.ts
  • src/domain/overlay.ts
  • src/domain/prepare_image.ts
  • src/domain/recommend.ts
  • src/domain/report.ts
  • src/domain/report_export.ts
  • src/domain/rules.ts
  • src/domain/tier.ts
  • src/domain/validate_matrix.ts
  • src/domain/watch_folder.ts
  • src/domain/white_canvas.ts
  • src/types/contracts.ts
  • tests/e2e/analyze.snapshots.e2e.test.ts
  • tests/e2e/benchmark.snapshots.e2e.test.ts
  • tests/e2e/export.snapshots.e2e.test.ts
  • tests/e2e/export_video.snapshots.e2e.test.ts
  • tests/e2e/grid_preview.snapshots.e2e.test.ts
  • tests/e2e/overlay.snapshots.e2e.test.ts
  • tests/e2e/recommend.matrix.e2e.test.ts
  • tests/e2e/recommend.snapshots.e2e.test.ts
  • tests/e2e/report.snapshots.e2e.test.ts
  • tests/e2e/report_export.snapshots.e2e.test.ts
  • tests/e2e/validate_matrix.snapshots.e2e.test.ts
  • tests/e2e/watch_folder.snapshots.e2e.test.ts
  • tests/export_profiles.test.ts
  • tests/fixtures/e2e/analyze_cases.json
  • tests/fixtures/e2e/benchmark_cases.json
  • tests/fixtures/e2e/export_cases.json
  • tests/fixtures/e2e/export_video_cases.json
  • tests/fixtures/e2e/generate-analyze-snapshots.ts
  • tests/fixtures/e2e/generate-benchmark-snapshots.ts
  • tests/fixtures/e2e/generate-export-snapshots.ts
  • tests/fixtures/e2e/generate-export-video-snapshots.ts
  • tests/fixtures/e2e/generate-grid-preview-snapshots.ts
  • tests/fixtures/e2e/generate-overlay-snapshots.ts
  • tests/fixtures/e2e/generate-report-export-snapshots.ts
  • tests/fixtures/e2e/generate-report-snapshots.ts
  • tests/fixtures/e2e/generate-snapshots.ts
  • tests/fixtures/e2e/generate-validate-matrix-snapshots.ts
  • tests/fixtures/e2e/generate-watch-folder-snapshots.ts
  • tests/fixtures/e2e/grid_preview_cases.json
  • tests/fixtures/e2e/overlay_cases.json
  • tests/fixtures/e2e/recommend_cases.json
  • tests/fixtures/e2e/report_cases.json
  • tests/fixtures/e2e/report_export_cases.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.json
  • tests/fixtures/e2e/snapshots/experimental-feed-square.json
  • tests/fixtures/e2e/snapshots/experimental-reel-landscape.json
  • tests/fixtures/e2e/snapshots/experimental-story-square.json
  • tests/fixtures/e2e/snapshots/export/export-experimental-story.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.json
  • tests/fixtures/e2e/snapshots/overlay/overlay-3-4.json
  • tests/fixtures/e2e/snapshots/overlay/overlay-4-5.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/reliable-feed-landscape-white-default.json
  • tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.json
  • tests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.json
  • tests/fixtures/e2e/snapshots/reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/reliable-story-portrait.json
  • tests/fixtures/e2e/snapshots/reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/reliable-story-white-ignored.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.json
  • tests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.json
  • tests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.json
  • tests/fixtures/e2e/validate_matrix_cases.json
  • tests/fixtures/e2e/watch_folder_cases.json
  • tests/fixtures/exports/.gitkeep
  • tests/fixtures/images/generate-fixtures.ts
  • tests/fixtures/images/generate-raster-fixtures.ts
  • tests/fixtures/images/generate-video-fixtures.ts
  • tests/fixtures/images/landscape_sample_48x32.ppm
  • tests/fixtures/images/micro_landscape_16x9.ppm
  • tests/fixtures/images/micro_portrait_9x16.ppm
  • tests/fixtures/images/portrait_sample_30x40.ppm
  • tests/fixtures/images/square_sample_36x36.ppm
  • tests/fixtures/images/ultrawide_sample_60x24.ppm
  • tests/fixtures/matrix/cases_basic.json
  • tests/fixtures/matrix/cases_with_failure.json
  • tests/fixtures/matrix/only_portrait.txt
  • tests/fixtures/pixel/generate-snapshots.ts
  • tests/fixtures/pixel/scenarios.ts
  • tests/fixtures/visual/generate-snapshots.ts
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txt
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txt
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.classic.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.compat.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txt
  • tests/grid_preview.test.ts
  • tests/helpers/cli.ts
  • tests/helpers/image.test.ts
  • tests/helpers/image.ts
  • tests/helpers/ppm.ts
  • tests/helpers/types.ts
  • tests/helpers/visual.ts
  • tests/integration/analyze.integration.test.ts
  • tests/integration/benchmark.integration.test.ts
  • tests/integration/cli.integration.test.ts
  • tests/integration/export.integration.test.ts
  • tests/integration/export_video.integration.test.ts
  • tests/integration/grid_preview.integration.test.ts
  • tests/integration/overlay.integration.test.ts
  • tests/integration/prepare_image.integration.test.ts
  • tests/integration/report.integration.test.ts
  • tests/integration/report_export.integration.test.ts
  • tests/integration/validate_matrix.integration.test.ts
  • tests/integration/watch_folder.integration.test.ts
  • tests/media_inspector.test.ts
  • tests/overlay.test.ts
  • tests/property/margins.property.test.ts
  • tests/recommend.test.ts
  • tests/rules.test.ts
  • tests/tier.test.ts
  • tests/visual/layout.visual.test.ts
  • tests/visual/pixel_diff.visual.test.ts
  • tests/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.md
  • docs/plans/v1-product-split-cleanup.md
  • docs/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.ts
  • tests/integration/prepare_image.integration.test.ts
  • tests/helpers/cli.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Run bun run check before submitting PRs to verify typecheck, Biome lint, unit tests, and v1 integration tests pass

Files:

  • src/domain/prepare_image.ts
  • tests/integration/prepare_image.integration.test.ts
  • tests/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 win

The 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

Comment thread docs/plans/decisions-log.md
Comment thread README.md Outdated
@edhor1608
edhor1608 marked this pull request as ready for review May 14, 2026 20:54
@edhor1608
edhor1608 force-pushed the codex/v1-prepare-image-cli branch from 7d1afd5 to b1e6ea8 Compare May 14, 2026 20:56
@edhor1608
edhor1608 force-pushed the codex/v1-product-split-cleanup branch from 838391e to b70942b Compare May 14, 2026 20:57
coderabbitai[bot]
coderabbitai Bot previously requested changes May 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/plans/decisions-log.md (1)

224-243: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Resolve remaining default-border contradictions in this log.

This section establishes 57px, but later entries still read like 165px is 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

📥 Commits

Reviewing files that changed from the base of the PR and between a4eed1d and 838391e.

⛔ Files ignored due to path filters (7)
  • tests/fixtures/images/landscape_sample_48x32.jpg is excluded by !**/*.jpg
  • tests/fixtures/images/landscape_sample_48x32.png is excluded by !**/*.png
  • tests/fixtures/images/landscape_video_640x360.mov is excluded by !**/*.mov
  • tests/fixtures/images/portrait_sample_30x40.jpg is excluded by !**/*.jpg
  • tests/fixtures/images/portrait_sample_30x40.png is excluded by !**/*.png
  • tests/fixtures/images/portrait_video_360x640.mp4 is excluded by !**/*.mp4
  • tests/fixtures/images/portrait_video_audio_360x640.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (205)
  • .github/workflows/ci.yml
  • AGENTS.md
  • README.md
  • config/export_profiles.v1.json
  • config/ruleset.v1.json
  • docs/phase1_knowledge.md
  • docs/plans/decisions-log.md
  • docs/plans/v1-prepare-image-cli.md
  • docs/plans/v1-product-split-cleanup.md
  • docs/repo_refresh_audit.md
  • docs/repo_refresh_feature_set.md
  • docs/repo_refresh_merge_plan.md
  • docs/v1_split_plan.md
  • package.json
  • src/cli/analyze.ts
  • src/cli/args.ts
  • src/cli/benchmark.ts
  • src/cli/doctor.ts
  • src/cli/export_image.ts
  • src/cli/export_video.ts
  • src/cli/grid_preview.ts
  • src/cli/overlay.ts
  • src/cli/recommend.ts
  • src/cli/report.ts
  • src/cli/report_export.ts
  • src/cli/validate_matrix.ts
  • src/cli/watch_folder.ts
  • src/domain/analyze.ts
  • src/domain/benchmark.ts
  • src/domain/export_image.ts
  • src/domain/export_profiles.ts
  • src/domain/export_video.ts
  • src/domain/grid_preview.ts
  • src/domain/media_image_inspector.ts
  • src/domain/media_inspector.ts
  • src/domain/media_video_inspector.ts
  • src/domain/objective_metrics.ts
  • src/domain/overlay.ts
  • src/domain/prepare_image.ts
  • src/domain/recommend.ts
  • src/domain/report.ts
  • src/domain/report_export.ts
  • src/domain/rules.ts
  • src/domain/tier.ts
  • src/domain/validate_matrix.ts
  • src/domain/watch_folder.ts
  • src/domain/white_canvas.ts
  • src/types/contracts.ts
  • tests/e2e/analyze.snapshots.e2e.test.ts
  • tests/e2e/benchmark.snapshots.e2e.test.ts
  • tests/e2e/export.snapshots.e2e.test.ts
  • tests/e2e/export_video.snapshots.e2e.test.ts
  • tests/e2e/grid_preview.snapshots.e2e.test.ts
  • tests/e2e/overlay.snapshots.e2e.test.ts
  • tests/e2e/recommend.matrix.e2e.test.ts
  • tests/e2e/recommend.snapshots.e2e.test.ts
  • tests/e2e/report.snapshots.e2e.test.ts
  • tests/e2e/report_export.snapshots.e2e.test.ts
  • tests/e2e/validate_matrix.snapshots.e2e.test.ts
  • tests/e2e/watch_folder.snapshots.e2e.test.ts
  • tests/export_profiles.test.ts
  • tests/fixtures/e2e/analyze_cases.json
  • tests/fixtures/e2e/benchmark_cases.json
  • tests/fixtures/e2e/export_cases.json
  • tests/fixtures/e2e/export_video_cases.json
  • tests/fixtures/e2e/generate-analyze-snapshots.ts
  • tests/fixtures/e2e/generate-benchmark-snapshots.ts
  • tests/fixtures/e2e/generate-export-snapshots.ts
  • tests/fixtures/e2e/generate-export-video-snapshots.ts
  • tests/fixtures/e2e/generate-grid-preview-snapshots.ts
  • tests/fixtures/e2e/generate-overlay-snapshots.ts
  • tests/fixtures/e2e/generate-report-export-snapshots.ts
  • tests/fixtures/e2e/generate-report-snapshots.ts
  • tests/fixtures/e2e/generate-snapshots.ts
  • tests/fixtures/e2e/generate-validate-matrix-snapshots.ts
  • tests/fixtures/e2e/generate-watch-folder-snapshots.ts
  • tests/fixtures/e2e/grid_preview_cases.json
  • tests/fixtures/e2e/overlay_cases.json
  • tests/fixtures/e2e/recommend_cases.json
  • tests/fixtures/e2e/report_cases.json
  • tests/fixtures/e2e/report_export_cases.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-experimental-story-square.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-jpg.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-mov.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-reel-portrait-mp4.json
  • tests/fixtures/e2e/snapshots/analyze/analyze-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/benchmark/benchmark-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/experimental-feed-portrait-white-app-direct.json
  • tests/fixtures/e2e/snapshots/experimental-feed-square.json
  • tests/fixtures/e2e/snapshots/experimental-reel-landscape.json
  • tests/fixtures/e2e/snapshots/experimental-story-square.json
  • tests/fixtures/e2e/snapshots/export/export-experimental-story.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/export/export-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-experimental-story.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-portrait.json
  • tests/fixtures/e2e/snapshots/export_video/export-video-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-3-4.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-4-5.json
  • tests/fixtures/e2e/snapshots/grid_preview/grid-preview-9-16.json
  • tests/fixtures/e2e/snapshots/overlay/overlay-3-4.json
  • tests/fixtures/e2e/snapshots/overlay/overlay-4-5.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/reliable-feed-landscape-white-default.json
  • tests/fixtures/e2e/snapshots/reliable-feed-landscape-white-fallback.json
  • tests/fixtures/e2e/snapshots/reliable-feed-portrait-white-classic.json
  • tests/fixtures/e2e/snapshots/reliable-feed-portrait.json
  • tests/fixtures/e2e/snapshots/reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/reliable-story-portrait.json
  • tests/fixtures/e2e/snapshots/reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/reliable-story-white-ignored.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-landscape-white.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/report/report-reliable-story-white-canvas.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-landscape-white-classic.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-feed-portrait-png.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-portrait-mp4-audio.json
  • tests/fixtures/e2e/snapshots/report_export/report-export-reliable-reel-white-canvas.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-basic.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-max-cases-1.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-file-portrait.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-portrait.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-only-unknown-id.json
  • tests/fixtures/e2e/snapshots/validate_matrix/validate-matrix-with-failure-fail-on-error.json
  • tests/fixtures/e2e/snapshots/watch_folder/watch-folder-once-reliable-feed.json
  • tests/fixtures/e2e/snapshots/watch_folder/watch-folder-two-cycles-reliable-feed.json
  • tests/fixtures/e2e/validate_matrix_cases.json
  • tests/fixtures/e2e/watch_folder_cases.json
  • tests/fixtures/exports/.gitkeep
  • tests/fixtures/images/generate-fixtures.ts
  • tests/fixtures/images/generate-raster-fixtures.ts
  • tests/fixtures/images/generate-video-fixtures.ts
  • tests/fixtures/images/landscape_sample_48x32.ppm
  • tests/fixtures/images/micro_landscape_16x9.ppm
  • tests/fixtures/images/micro_portrait_9x16.ppm
  • tests/fixtures/images/portrait_sample_30x40.ppm
  • tests/fixtures/images/square_sample_36x36.ppm
  • tests/fixtures/images/ultrawide_sample_60x24.ppm
  • tests/fixtures/matrix/cases_basic.json
  • tests/fixtures/matrix/cases_with_failure.json
  • tests/fixtures/matrix/only_portrait.txt
  • tests/fixtures/pixel/generate-snapshots.ts
  • tests/fixtures/pixel/scenarios.ts
  • tests/fixtures/visual/generate-snapshots.ts
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.app_direct.txt
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.classic.txt
  • tests/fixtures/visual/snapshots/landscape_sample_48x32.compat.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.app_direct.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.classic.txt
  • tests/fixtures/visual/snapshots/micro_landscape_16x9.compat.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.app_direct.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.classic.txt
  • tests/fixtures/visual/snapshots/micro_portrait_9x16.compat.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.app_direct.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.classic.txt
  • tests/fixtures/visual/snapshots/portrait_sample_30x40.compat.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.app_direct.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.classic.txt
  • tests/fixtures/visual/snapshots/square_sample_36x36.compat.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.app_direct.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.classic.txt
  • tests/fixtures/visual/snapshots/ultrawide_sample_60x24.compat.txt
  • tests/grid_preview.test.ts
  • tests/helpers/cli.ts
  • tests/helpers/image.test.ts
  • tests/helpers/image.ts
  • tests/helpers/ppm.ts
  • tests/helpers/types.ts
  • tests/helpers/visual.ts
  • tests/integration/analyze.integration.test.ts
  • tests/integration/benchmark.integration.test.ts
  • tests/integration/cli.integration.test.ts
  • tests/integration/export.integration.test.ts
  • tests/integration/export_video.integration.test.ts
  • tests/integration/grid_preview.integration.test.ts
  • tests/integration/overlay.integration.test.ts
  • tests/integration/prepare_image.integration.test.ts
  • tests/integration/report.integration.test.ts
  • tests/integration/report_export.integration.test.ts
  • tests/integration/validate_matrix.integration.test.ts
  • tests/integration/watch_folder.integration.test.ts
  • tests/media_inspector.test.ts
  • tests/overlay.test.ts
  • tests/property/margins.property.test.ts
  • tests/recommend.test.ts
  • tests/rules.test.ts
  • tests/tier.test.ts
  • tests/visual/layout.visual.test.ts
  • tests/visual/pixel_diff.visual.test.ts
  • tests/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.ts
  • tests/integration/prepare_image.integration.test.ts
  • tests/helpers/cli.ts
src/domain/prepare_image.ts

📄 CodeRabbit inference engine (AGENTS.md)

The domain layer at src/domain/prepare_image.ts should 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

Comment thread src/domain/prepare_image.ts
@edhor1608
edhor1608 force-pushed the codex/v1-product-split-cleanup branch from b70942b to 9162b34 Compare May 14, 2026 20:59
@edhor1608
edhor1608 force-pushed the codex/v1-prepare-image-cli branch from b1e6ea8 to 9e86a92 Compare May 14, 2026 20:59
@edhor1608
edhor1608 dismissed stale reviews from coderabbitai[bot], coderabbitai[bot], and coderabbitai[bot] May 14, 2026 21:01

Dismissed after requested changes were addressed and fresh CodeRabbit status passed on current head.

@edhor1608
edhor1608 force-pushed the codex/v1-product-split-cleanup branch from 9162b34 to 7c8c5c9 Compare May 14, 2026 21:03

edhor1608 commented May 14, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • May 14, 9:04 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 14, 9:07 PM UTC: Graphite rebased this pull request as part of a merge.
  • May 14, 9:08 PM UTC: @edhor1608 merged this pull request with Graphite.

@edhor1608
edhor1608 changed the base branch from codex/v1-prepare-image-cli to graphite-base/59 May 14, 2026 21:05
@edhor1608
edhor1608 changed the base branch from graphite-base/59 to main May 14, 2026 21:06
@edhor1608
edhor1608 force-pushed the codex/v1-product-split-cleanup branch from 7c8c5c9 to 39941e5 Compare May 14, 2026 21:07
@edhor1608
edhor1608 merged commit a0e66df into main May 14, 2026
3 checks passed
@edhor1608
edhor1608 deleted the codex/v1-product-split-cleanup branch May 15, 2026 18: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