Skip to content

fix(reinforcement): preserve FaaS business errors and request context - #226

Merged
luk384090-cloud merged 2 commits into
mainfrom
dev/v2.1-2
Nov 10, 2026
Merged

luk384090-cloud merged 2 commits into
mainfrom
dev/v2.1-2

Conversation

@lzsweb

@lzsweb lzsweb commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Detect FaaS business-level rejections even when the HTTP response is 200.
  • Reject empty layer codes and distinguish rejected layer-status queries from missing build status.
  • Preserve upstream request_id and response context through layer, load, and tuning failures while keeping existing numeric SDK error codes.
  • Mask error-message payloads and exclude the raw response body from ResponseFC repr.
  • Add regression coverage for layer creation/status queries, runtime loading, and error-context propagation.
  • Fix regression-test formatting and make the legacy RL CLI help check independent of Rich's truncation of long option names.

Scope

This PR merges dev/v2.1-2 into main and contains:

  • cb6e3668: SDK business-error handling and request-context preservation.
  • 7e5042be: test-only CI fixes for formatting and the legacy RL CLI help assertion; no SDK behavior changes.

It improves SDK error handling and diagnostics; it does not change gateway URLs, request headers, or region parameters, and does not fix the server-side FaaS layer not found for region null issue. A fresh curl-first probe reproduced the same business error as the earlier SDK-first probe.

Local Validation

  • python -m pytest -q tests/legacy_1x/unit/test_cli_main.py tests/test_agentic_rl_fc_errors.py tests/legacy_1x/unit/test_agentic_rl_layer_status.py — 78 passed.
  • python -m pytest -q tests/legacy_1x — 1122 passed, 42 skipped.
  • pre-commit run --all-files — all applicable hooks passed.
  • CLI validation used the CI versions of Typer (0.29.0) and Click (8.5.1); the previous help-output assertion was reproduced as failing before the fix.

@luk384090-cloud
luk384090-cloud merged commit d06c5e4 into main Nov 10, 2026
12 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.

2 participants