Skip to content

refactor: StatusCode.isError() for audit outcome checks#430

Merged
kacy merged 1 commit into
mainfrom
refactor/status-iserror
May 25, 2026
Merged

refactor: StatusCode.isError() for audit outcome checks#430
kacy merged 1 commit into
mainfrom
refactor/status-iserror

Conversation

@kacy
Copy link
Copy Markdown
Owner

@kacy kacy commented May 25, 2026

follow-up from the review. three audited handlers (app apply, app rollback,
agent register) decided success/failure with a bare @intFromEnum(resp.status) < 400.
move the intent onto the type as StatusCode.isError() (>= 400), so the call
sites read if (resp.status.isError()) .failed else .ok.

tested

  • YOQ_SKIP_SLOW_TESTS=1 zig build test — 2183 passed, 2 skipped, 0 failed.
  • zig fmt --check clean.

three audit sites computed success with a bare @intFromEnum(status) < 400.
name the intent with StatusCode.isError() (>= 400) on the type itself.
@kacy kacy merged commit 4f0af53 into main May 25, 2026
2 checks passed
@kacy kacy deleted the refactor/status-iserror branch May 25, 2026 21:15
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