Skip to content

split distribution builds + task output - #9

Merged
willyrgf merged 16 commits into
devfrom
distr-build
Aug 6, 2026
Merged

split distribution builds + task output#9
willyrgf merged 16 commits into
devfrom
distr-build

Conversation

@willyrgf

@willyrgf willyrgf commented Aug 3, 2026

Copy link
Copy Markdown
Owner

No description provided.

@willyrgf

willyrgf commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review this

@willyrgf willyrgf changed the title split distribution builds split distribution builds + task output Aug 4, 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: 8019a42b89

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

print_error(&args, &error);
std::process::exit(exit_code(&error));
}
let exit = match ProcessSignalGuard::install() {

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 Keep cancellation handlers scoped to run commands

Installing ProcessSignalGuard before dispatch also replaces SIGINT/SIGTERM/SIGHUP for check, ps, down, and clean, but those control paths never create or inspect a CancellationToken. Consequently Ctrl-C or an orchestrator's SIGTERM merely sets PROCESS_SIGNAL_CANCELED and these commands continue running instead of terminating; install the cancellation handlers only for run, or make every dispatched command consume the signal state.

Useful? React with 👍 / 👎.

Comment on lines +73 to +76
// Replay writes must observe EPIPE as a typed projection issue. The
// default disposition would terminate the runtime before the worker can
// report the broken pipe. The prior disposition is restored by Drop.
match install_ignore_handler(libc::SIGPIPE) {

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 Reset SIGPIPE before spawning declared children

Ignoring SIGPIPE is process-wide, and an ignored disposition survives exec, so every task and service child spawned while this guard is active inherits SIG_IGN. A declared executable that does not reset SIGPIPE will receive EPIPE rather than the normal signal termination when one of its own pipes closes, potentially changing its exit status or behavior; reset SIGPIPE to SIG_DFL in child pre_exec hooks while retaining the runtime's ignored disposition.

AGENTS.md reference: AGENTS.md:L61-L63

Useful? React with 👍 / 👎.

Comment on lines +343 to +345
match print_error(&args, &error) {
Ok(()) => exit,
Err(projection_error) => exit_code(&projection_error),

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 Preserve safety failures when error output breaks

When a containment, registry, lease, or state failure has already been selected and writing its final diagnostic to stderr fails—for example because the sink is closed—print_error returns OUTPUT_PROJECTION_FAILED and this branch replaces the original safety failure's exit status with 38. That reverses the documented failure precedence and leaves automation unable to distinguish a process escape or corrupt registry from an output problem; combine the two errors using the same priority rules as run finalization and retain the higher-priority exit code.

AGENTS.md reference: AGENTS.md:L87-L90

Useful? React with 👍 / 👎.

Comment on lines +407 to +408
"--both" => both = true,
"--json" => json = true,

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 Honor the final metadata output flag for errors

Metadata output flags are accepted together and parse_run_options uses the last one, but this error-only scanner remembers every earlier --json/--both occurrence and ignores --summary. Thus --both --json emits JSON-only on success but human plus JSON on failure, while --json --summary still emits a JSON error instead of the selected human projection; parse the flags sequentially into one mode so success and failure use the same final selection.

AGENTS.md reference: AGENTS.md:L87-L90

Useful? React with 👍 / 👎.

@willyrgf
willyrgf merged commit ae11760 into dev Aug 6, 2026
0 of 2 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.

1 participant