Skip to content

fix(steps): address CodeRabbit review on typed outputs & parameters - #257

Merged
jakub-przepiora merged 1 commit into
developfrom
fix/step-outputs-coderabbit
Aug 21, 2026
Merged

fix(steps): address CodeRabbit review on typed outputs & parameters#257
jakub-przepiora merged 1 commit into
developfrom
fix/step-outputs-coderabbit

Conversation

@jakub-przepiora

Copy link
Copy Markdown
Contributor

Fixes the actionable findings CodeRabbit raised on the v0.21.0 release PR (#256), on the just-merged Feature A/B code. All hardening of unreleased features — no user-facing behaviour change beyond correctness.

Severity Finding Fix
🟠 Major Non-atomic output overwrite could lose the value / 500 on concurrent posts Soft-delete + insert wrapped in one DB::transaction with lockForUpdate() on the live rows
🟡 Minor Picture upload used the runtime-default disk (public default → web-exposed) Pinned put/exists/path to the private local disk
🟡 Minor Boolean output recorded false when value was omitted, satisfying the required gate value now `required
🟡 Minor Positional ["250","40"] passed the array rule and froze with integer keys New shared ValidatesEquipmentParameters rule rejects lists (key:value map only)
🟡 Minor array_filter dropped the string "0" as a select option Explicit non-blank predicate

Tests added: positional-parameters → 422, boolean-requires-value, select-"0" accepted.

Full backend suite: 2489 passed · Pint clean.

- Pin batch-step output picture storage to the private 'local' disk (put,
  exists, path), so a public FILESYSTEM_DISK default can't web-expose it.
- Make output overwrite atomic: soft-delete + insert now run in one DB
  transaction with the live rows locked, so a failed insert can't drop the
  value and two concurrent posts can't collide on the partial-unique index.
- Require an explicit value for boolean outputs — a missing value no longer
  silently records false and satisfies the required-output completion gate.
- Reject positional (list) 'parameters' arrays in the step Form Requests;
  equipment parameters must be a key:value map, not a list.
- Keep the string '0' as a valid select option (explicit non-blank filter).

Adds tests: positional-parameters 422, boolean-requires-value, select-'0'.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jakub-przepiora, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ce55f40-907b-44fc-9546-5fc47de4c3e6

📥 Commits

Reviewing files that changed from the base of the PR and between 8ddbc8c and 2a5262f.

📒 Files selected for processing (10)
  • backend/app/Http/Controllers/Web/Operator/BatchController.php
  • backend/app/Http/Requests/Api/V1/StoreTemplateStepRequest.php
  • backend/app/Http/Requests/Api/V1/UpdateTemplateStepRequest.php
  • backend/app/Http/Requests/Concerns/ValidatesEquipmentParameters.php
  • backend/app/Http/Requests/StoreTemplateStepOutputRequest.php
  • backend/app/Http/Requests/Web/Admin/TemplateStepRequest.php
  • backend/lang/en.json
  • backend/lang/pl.json
  • backend/tests/Feature/Api/ProcessTemplateApiTest.php
  • backend/tests/Feature/StepTypedOutputsTest.php

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jakub-przepiora
jakub-przepiora merged commit beb1cbf into develop Aug 21, 2026
2 checks passed
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