Skip to content

fix: restore cross-platform batch crop workflows - #51

Merged
Pluze merged 17 commits into
mainfrom
codex/repair-batch-crop-cross-platform
Jul 29, 2026
Merged

fix: restore cross-platform batch crop workflows#51
Pluze merged 17 commits into
mainfrom
codex/repair-batch-crop-cross-platform

Conversation

@Pluze

@Pluze Pluze commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Goal and scope

  • Goal: Restore Batch Crop duplication and native diagnostic ZIP destination selection across supported MATLAB platforms, then expose release-dependent regressions with an oldest/latest CI matrix.
  • In scope: Batch Crop parallel-state shape normalization, private native dialog filter normalization, focused regressions, compatible component version/history updates, and CI validation on R2021a plus the latest release available to matlab-actions/setup-matlab.
  • Intentionally out of scope: A new public SDK API, project schema migration, scientific crop behavior changes, and automated native-dialog interaction.

User-visible behavior

  • Before: A row-shaped multi-image state could make Duplicate fail with a concatenation dimension mismatch; MATLAB R2024b on Windows could reject string-valued file filters when exporting a diagnostic ZIP.
  • After: Duplicate column-aligns the four parallel Batch Crop collections before insertion, and the private MATLAB adapter passes character-cell filter tables to native open/save dialogs.
  • Compatibility / upgrade note: The repair preserves public signatures, project payload version 3, calculations, and export schemas. The expanded CI matrix is compatibility evidence rather than a standalone product-support promise.

Validation

  • I ran the smallest relevant local validation from docs/development/maintain-and-release/testing.md.
  • I ran the required final gate for this handoff, or this PR is not ready for final review.
  • Automated validation was not run; reason and risk are recorded below.

Commands and results:

python3 .github/scripts/test_classify_ci_scope.py — 5/5 passed
Ruby YAML parse of .github/workflows/ci.yml — passed
labkittest.run(Owner="system/repository", Contract="system") — 10/10 passed
maintainLabKitDocLinks; renderLabKitDocs; checkLabKitDocs — passed, 374 generated files compared
buildtool changedFast — 50/50 passed
Earlier repair checkpoint: buildtool changedFast — 109/109 passed

Manual / native behavior not verified:

  • Native Windows MATLAB R2024b save-dialog interaction and the complete interactive Batch Crop duplicate workflow remain developer-led manual checks.

Documentation and boundaries

  • Human docs were updated where user-facing behavior or public contracts changed.
  • Agent guidance was updated where execution, ownership, or governance rules changed.
  • Docs and agent guidance were left unchanged because their contracts were preserved.
  • Versioned component docs and a related docs/history/records/**/*.md record were updated where required.
  • App-specific workflow logic stayed in the owning app.
  • Reusable +labkit changes, if any, are domain-neutral and app-facing.

Delivery state

  • The branch is committed and pushed.
  • Required GitHub checks are linked below, or are pending:

CI / review links:

  • Continuous Integration is pending on this draft PR for commit 3693003c.

Data hygiene

  • This PR does not add raw lab files, identifying file names, subject names, device serials, local absolute paths, timestamps, or private experiment labels.

Unverified behavior

  • Hidden GUI automation cannot prove native dialog rendering/interaction quality or pointer feel.
  • The new R2021a/latest matrix result is pending and will determine whether the current repository is compatible at the official setup action's oldest installable release.

Copilot AI 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.

Pull request overview

Restores cross-platform robustness for Batch Crop duplication and native file-dialog filter handling, adds a diagnostic ZIP-to-text fallback path, and expands CI to validate across an oldest/latest MATLAB matrix with improved, evidence-oriented job summaries.

Changes:

  • Normalizes Batch Crop’s parallel state collections to column shape before duplicate insertion to prevent dimension mismatches.
  • Normalizes native dialog filter tables to legacy char-cell format and adds a plain-text diagnostic fallback when ZIP export fails.
  • Reworks CI into a per-platform/per-release matrix and replaces per-profile summaries with a single platform-level summary (with regression tests).

Reviewed changes

Copilot reviewed 37 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/specs/system/repository/TestArchitectureSpec.m Updates workflow contract assertions for new CI matrix + summary flow.
tests/specs/system/build/TestCatalogSpec.m Adds regression ensuring actionable diagnostics appear in generated JUnit.
tests/specs/framework/app/SessionDiagnosticBundleSpec.m Adds coverage for ZIP failure → text fallback behavior and sanitization expectations.
tests/specs/framework/app/AppSdkSpec.m Adds regression for native dialog filter normalization output type.
tests/specs/apps/labkit_core/figure_studio/workbench/FigureStudioWorkflowSpec.m Adapts Figure Studio export workflow test to filter-driven output selection; adds SVG export coverage.
tests/specs/apps/labkit_core/figure_studio/resultFiles/FigureStudioResultSpec.m Improves failure diagnostics for canvas-bound checks.
tests/specs/apps/image_measurement/batch_crop/sourceFiles/BatchCropSourceSpec.m Adds regression for row-shaped state duplication alignment.
tests/+labkittest/run.m Records diagnostics for JUnit output and enriches failure/error payloads.
site/history/records/2026/07/LK-20260729-cross-version-dialog-and-duplicate-repair.html Generated history record for this change set.
site/history/records/2026/07/LK-20260726-actionable-session-diagnostics.html Updates generated navigation links to include the new record.
site/history/index.html Updates generated timeline ordering to include the new record.
site/framework/index.html Updates generated framework history links to include the new record.
site/framework/guides/runtime.html Updates generated runtime guide with dialog-filter normalization + text fallback behavior.
site/framework/app-sdk-api.html Updates generated history links to include the new record.
site/development/maintain-and-release/testing.html Updates generated testing doc to describe oldest/latest CI matrix and job summaries.
site/apps/labkit-core/figure-studio.html Updates generated Figure Studio doc for pre-R2025a export behavior and history.
site/apps/image-measurement/batch-crop.html Updates generated Batch Crop doc for row/column state duplication alignment and history.
docs/history/records/2026/07/LK-20260729-cross-version-dialog-and-duplicate-repair.md Adds authored history record documenting rationale, scope, and evidence.
docs/framework/guides/runtime.md Documents dialog filter normalization and diagnostic text fallback behavior.
docs/development/maintain-and-release/testing.md Updates CI evidence + matrix documentation (floor/latest, runner pinning, and summaries).
docs/apps/labkit-core/figure-studio/README.md Documents pre-R2025a export backend behavior for Figure Studio.
docs/apps/image-measurement/batch-crop/README.md Documents duplicate alignment behavior for row/column file-list state.
buildfile.m Adds Build Tool task descriptions to improve build results readability.
apps/labkit_core/figure_studio/+figure_studio/definition.m Bumps Figure Studio app version/date metadata.
apps/labkit_core/figure_studio/+figure_studio/+resultFiles/exportGraphic.m Switches export backend based on MATLAB release (print vs exportgraphics).
apps/labkit_core/figure_studio/+figure_studio/+resultFiles/applyFigureStyle.m Improves export-canvas convergence and post-fit text overflow correction.
apps/image_measurement/batch_crop/+batch_crop/definition.m Bumps Batch Crop app version/date metadata.
apps/image_measurement/batch_crop/+batch_crop/+sourceFiles/duplicateCurrent.m Normalizes parallel collections to column shape before duplicate insertion.
+labkit/+app/version.m Bumps LabKit App SDK facade version metadata.
+labkit/+app/+internal/SessionDiagnostics.m Adds SessionDiagnostics text-fallback exporter using in-memory snapshot.
+labkit/+app/+internal/SessionDiagnosticBundle.m Adds writeFallback implementation and fallback snapshot validation/formatting.
+labkit/+app/+internal/RuntimeKernel.m Routes diagnostic export failures to text fallback and alerts when applicable.
+labkit/+app/+internal/@MatlabPlatformAdapter/MatlabPlatformAdapter.m Normalizes dialog filters before calling uigetfile/uiputfile.
.github/workflows/ci.yml Replaces single-release CI with platform/release matrix, adds Xvfb, and platform-level summary + artifacts.
.github/scripts/test_summarize_junit.py Adds regression tests for the new platform-level CI summary script.
.github/scripts/summarize_junit.py Refactors to a platform-level summary combining headless/gui/isolated outcomes.
.agents/dos-and-donts.md Captures newly reinforced operational lessons (dialog filters, shape normalization, CI floor/runner pairing).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/+labkittest/run.m
Comment on lines +302 to +304
separator = string(newline) + string(newline);
detail = strjoin(reports, separator);
firstLine = extractBefore(detail + string(newline), string(newline));
Comment thread .github/workflows/ci.yml
Comment on lines +58 to +62
- os: ubuntu-22.04
id: linux
label: Linux
release: R2022b
claim: Supported MATLAB floor on the pinned Linux runner and legacy graphics/export paths
@Pluze
Pluze marked this pull request as ready for review July 29, 2026 21:09
@Pluze
Pluze merged commit 412e875 into main Jul 29, 2026
8 checks passed
@Pluze
Pluze deleted the codex/repair-batch-crop-cross-platform branch July 29, 2026 21:10
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.

2 participants