Skip to content

Add assembly status busy/terminal helpers#280

Merged
kvz merged 7 commits into
mainfrom
feature/assembly-status-helpers
Jan 21, 2026
Merged

Add assembly status busy/terminal helpers#280
kvz merged 7 commits into
mainfrom
feature/assembly-status-helpers

Conversation

@kvz

@kvz kvz commented Jan 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Add busy status codes for ASSEMBLY_UPLOADING, ASSEMBLY_EXECUTING, and ASSEMBLY_REPLAYING.
  • Add status helpers (isAssemblyBusyStatus, isAssemblyOkStatus, isAssemblyErrorStatus, isAssemblyTerminalOkStatus) plus assembly-level helpers (isAssemblyBusy, isAssemblyTerminalOk, isAssemblyTerminalError, isAssemblyTerminal).
  • Keep helpers aligned with existing hasOk/hasError semantics.

Why

  • api2 treats ASSEMBLY_EXECUTING and ASSEMBLY_UPLOADING as in-flight states, and ASSEMBLY_REPLAYING is returned immediately after a replay is triggered.
  • A shared, canonical notion of busy/terminal states avoids duplicated status sets in client apps.

Notes

  • ASSEMBLY_FAILED / ASSEMBLY_ABORTED are not present in api2 or alphalib today, so they are intentionally omitted.
  • Helpers are additive; no behavioral changes beyond expanded busy codes.

@kvz kvz changed the title Feature/assembly status helpers Add assembly status busy/terminal helpers Jan 21, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c55bcc6769

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +793 to +794
export function isAssemblyTerminalError(assembly: AssemblyStatus | undefined | null): boolean {
return isAssemblyErrorStatus(getError(assembly))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat sys-error assemblies as terminal in helpers

isAssemblyTerminalError only checks getError(assembly), so assemblies that match assemblyStatusSysErrSchema (the schema explicitly documents system errors without ok/error) will return false here and therefore isAssemblyTerminal will also be false. This means callers relying on these helpers will treat low-level system failures as non-terminal and may wait indefinitely for completion. Consider treating the sys-error shape (e.g., presence of errno/code/syscall) as a terminal error in these helpers.

Useful? React with 👍 / 👎.

Comment thread CONTRIBUTING.md Outdated
@kvz kvz merged commit 0318b97 into main Jan 21, 2026
9 checks passed
@kvz kvz deleted the feature/assembly-status-helpers branch January 21, 2026 13:26
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