[codex] Structure agent awareness registration errors#3328
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
9792f0e to
8410521
Compare
ApprovabilityVerdict: Approved This PR adds structured error typing to existing error handling without changing control flow. All catch handlers already existed; they now wrap errors in a tagged No code changes detected at You can customize Macroscope's approvability policy. Learn more. |
Dismissing prior approval to re-evaluate e44a51c
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
e44a51c to
eee9112
Compare
Summary
Validation
Note
Low Risk
Error-shape and observability changes only; registration success/skip behavior and background coalescing are largely unchanged.
Overview
Agent awareness remote registration now wraps native, storage, relay-auth, and Live Activity failures in a Schema-tagged
AgentAwarenessOperationErrorinstead of passing through raw thrown values.Each failure gets a stable
operationlabel (for exampleread-live-activity-push-token,load-device-registration-identifier,read-device-registration-relay-token) and keeps the original defect incause, with a fixed message shape for logging and correlation. Relay token lookup is split so device registration and live activity registration record distinct operation names on auth failures.A test asserts that a rejected
getPushToken()surfaces asAgentAwarenessOperationErrorwith the expected operation and preserved cause. Existing “soft” paths (e.g. native APNs lookup falling back to null, active activity listing returning[]) are unchanged aside from the wrapped error type where errors are logged or propagated.Reviewed by Cursor Bugbot for commit eee9112. Bugbot is set up for automated code reviews on this repo. Configure here.