Skip to content

fix(tests): rewire u.process consumers to the fail-loud PR #504 contract - #204

Merged
marlon-costa-dc merged 1 commit into
0.12.0-devfrom
fix/process-fail-loud-consumer
Sep 26, 2026
Merged

marlon-costa-dc merged 1 commit into
0.12.0-devfrom
fix/process-fail-loud-consumer

Conversation

@marlon-costa-dc

@marlon-costa-dc marlon-costa-dc commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • flext-core PR #504 (merged 8de52fa6b) removed the on_error parameter from u.process (FlextUtilitiesCollection.process). The first processor failure now returns r.fail carrying the processor's original exception, with no skip/collect mode.
  • tests/unit/test_utilities_cov.py:37 dropped the removed on_error="fail" kwarg (no behavior change — "fail" was already the only real mode).
  • tests/unit/test_utilities_cov.py:43 (the on_error="skip" test) is deleted — that behaviour no longer exists.
  • Added test_process_fails_loud_with_original_exception_and_stops_at_first_failure, a behavioural test through the public u facade proving the run stops at the first failing item (later items are never visited) and result.exception is the processor's original raised exception.
  • src/flext_cli/_utilities/validation.py and tests/unit/test_cmd_runtime_validation_branch_cov.py were checked for leftover process_mapping modes from flext-cli PR fix(cli): fail loud at the remaining CLI_SAFE_EXCEPTIONS sites; timing-free process tests #203 — none found; that cleanup already landed on the tip.
  • make upg re-resolved the lock, pinning flext-core to 8de52fa6b (the exact PR #504 merge commit); make gen regenerated the managed projections that follow from that lock bump (docs, Makefile, pyproject.toml, mkdocs.yml, a couple of generated catalog files).

Evidence (worktree /home/marlonsc/flext-work/v8-process-consumers/flext-cli)

  • make upg: exit 0 — lock pins flext-core @ git+...@0.12.0-dev#8de52fa6b117ef54a840ac655c4518aff26ba027.
  • make setup: exit 0.
  • make gen x2: exit 0 both times; identical working-tree diff after the second run (fixed point).
  • make fix: exit 0, 0 errors.
  • make fmt: exit 0, 1 file reformatted (unrelated cosmetic reflow in tests/unit/test_runtime_process_descendants.py).
  • make check: exit 0, Total: 1 Success: 1 Failed: 0 Skipped: 0, 15 gates at 0 errors (duplication/codemod/boundary/namespace/runtime-census gates suspended by operator authority flext-itpd1.3).
  • make test: exit 0, 1193 passed — includes test_process_fails_when_processor_raises, test_process_fails_loud_with_original_exception_and_stops_at_first_failure, test_process_predicate_excludes_items_before_processing, all passing.
  • Runtime proof, direct u.process call through the installed flext-cli package (not just pytest):
    success: [10, 5, 2]
    failure ok? True exception= ZeroDivisionError('integer division or modulo by zero') error= Processing failed for item 0: integer division or modulo by zero
    

Test plan

  • make check green (15 gates, 0 errors)
  • make test green (1193 passed)
  • Runtime proof of u.process fail-loud contract through the flext-cli public u facade

🤖 Generated with Claude Code


Summary by cubic

Rewires u.process test consumers to the fail-loud contract from flext-core PR #504, which removed the on_error parameter. The first processor failure now returns r.fail carrying the processor's original exception, with no skip/collect mode.

  • Dropped the removed on_error="fail" kwarg — no behavior change, since "fail" was the only real mode.
  • Deleted the on_error="skip" test, as that mode no longer exists.
  • Added a behavioral test asserting the run stops at the first failure, never visiting later items, and that result.exception is the processor's original exception.
  • Pinned flext-core in uv.lock to the PR #504 merge commit and regenerated the managed projections (docs, Makefile, pyproject.toml, mkdocs.yml).

Written for commit 62b3156. Summary will update on new commits.

Review in cubic

flext-core PR #504 (merged 8de52fa6b) removed the on_error parameter from
u.process: the first processor failure now returns r.fail carrying the
original exception, and there is no skip/collect mode. Drop the removed
on_error="fail" kwarg from the success-path test, delete the skip-policy
test (that behaviour no longer exists), and add a behavioural replacement
through the public u facade asserting the run stops at the first failure
and result.exception is the processor's original exception.

Also regenerate managed projections (pyproject.toml, uv.lock, docs, Makefile)
via make upg/gen so the lock pins flext-core at 8de52fa6b.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@marlon-costa-dc
marlon-costa-dc merged commit 57b750a into 0.12.0-dev Sep 26, 2026
7 of 9 checks passed
@marlon-costa-dc
marlon-costa-dc deleted the fix/process-fail-loud-consumer branch September 26, 2026 15:46
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