You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(init): derive folded init-error reporting from invoke outcome and rapid's init duration
Reporting fixes for the on-demand folded-into-invoke (suppressed init) path:
- The invoke handler no longer unconditionally forces error status from the
recorded init failure: the REPORT Status/Error Type lines and the /error
routing now apply only when the invocation actually failed, and the
recorded failure is cleared once an invocation succeeds. Previously one
init failure permanently tainted a recovered environment - every later
(successful) invocation was posted to /error with an error REPORT line.
Persistent failures keep re-emitting the full failure envelope per invoke.
- RecordInitError captures the failure type detected by rapidcore for
runtimes that crashed WITHOUT calling /init/error (sys.exit, segfault,
invalid entrypoint), so those failures render the same
INIT_REPORT(phase=invoke) and REPORT Status/Error Type lines as the
/init/error-reported flavor instead of a healthy-looking envelope.
- REPORT's Init Duration now uses rapid's authoritative Init-phase
measurement captured from the INIT_REPORT(phase=init) lifecycle event,
instead of wall-clock time.Since(initStart) at invoke arrival, which
wrongly included the idle gap between init completion and the first
invoke (minutes for provisioned concurrency). It is also omitted for
non-on-demand invokes, matching AWS, which reports provisioned
concurrency init in separate provisioning-time log streams.
- Document that SnapStart environments intentionally use the on-demand
error model in LocalStack (they initialize lazily at the first invoke,
not at version publish).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments