Skip to content

Show a Process by name and send its Run notification - #1420

Merged
JacobStephens2 merged 3 commits into
issue-877from
issue-1387
Oct 27, 2026
Merged

JacobStephens2 merged 3 commits into
issue-877from
issue-1387

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

A Process shows up as Process <name> and sends a Run notification the way a Ticket run does. The stored kind stays Process. The show and stop selector stays process-<name>-<stamp>.

thirdshift process <name>
  RunNotification::new
    missing address or Resend key → stop, no Step
  resolve issue / prepare / repo
    failure → notify failed, no Step
  logs::started
  execute Steps
  notify
    skipped → send none
    succeeded, failed, interrupted → save, and email when asked

status, Inbox, Lanes, Stages, spans
  CommandRecord::process_label / process_heading
show and Console details
  process_steps
    step line, and the result file when the Step wrote one

Evidence

  • Before: CARGO_TARGET_DIR=/tmp/ts1387-red cargo nextest run --test process -E 'test(show_prints_the_result_path) | test(lanes_and_spans_name_the_process) | test(peek_shows_each_step_line_and_result_path) | test(an_origin_mismatch_still_sends_the_run_notification)' failed 4 tests. show printed step gather notes: 0s succeeded and no result: line. Lanes rendered Process on acme/widgets with the selector as the title. The details peek had no Step line. An origin mismatch exited 1 and sent 0 emails.
    After: the same filter, plus the colon-name show test, the pre-existing origin-mismatch rejection, the missing-key stop, and the shared email-flag parser tests: 10 passed. Compilation of that target was included (3m 39s); the tests themselves took 1.238s.

/usr/bin/time -p scripts/affected-tests issue-877 on 79ee65b1 exited 0. Wall time 1802.60s (real), compilation included. Site: npm test --prefix site, 50 passed, about 68s. Rust: cargo nextest run, 3156 passed, 70 skipped, nextest summary 1646.716s, compile 1m 23s inside that wall time.

Merge Danger

Door: two-way

The stored kind is still Process, and process_name is omitted when absent, so older records still read. Rolling the binary back leaves those records readable. Display and notification changes revert with the code.

Blast Radius: Process display, and every command that shares take_flag

Status, show, the Activity log, the Inbox, Lanes, Stages, spans and the details peek name a Process as Process <name>. A failure after the email check and before any Step now sends the Run notification. take_flag calls the same email helper process uses, so Ticket runs and Passes parse email, email-unless-merged and no-email through that helper.

Seam

Tests go through the thirdshift binary and tests/support Scenario (real Git, fake gh and Harnesses). No new test seam.

Unaddressed findings

None. Standards raised 3, Spec raised 4, and Security raised 0. Each behaviour finding failed as written, then the code was fixed and the test kept.

  • Standards 1, src/logs/status.rs, src/logs/status/inbox.rs, src/logs/status/inspect.rs: the Process-name fallback now lives on CommandRecord::process_label and process_heading.
  • Standards 2, src/args.rs take_flag: it calls take_email_flag instead of repeating the three email arms.
  • Standards 3 and Spec 3, src/logs/status/inspect.rs step_name: show_prints_the_result_path_when_the_step_name_has_a_space and show_prints_the_result_path_when_the_step_name_has_a_space_or_a_colon failed on the red run (the Step line was present and result: was not) and pass after the duration split.
  • Spec 1, Lanes, Stages and spans: lanes_and_spans_name_the_process failed because Lanes said Process on acme/widgets, and passes with Process notes.
  • Spec 2, Console details: peek_shows_each_step_line_and_result_path failed because the peek had no step gather: line, and passes. The finding's query used urlencoding::encode; that crate is not a dependency, so the test builds the same /peek?command= query with reqwest::Url. The assertions are the finding's.
  • Spec 4, src/processes.rs failed_before_steps: an_origin_mismatch_still_sends_the_run_notification failed with 0 Resend requests against 1, and passes.
  • Security: no introduced findings, so nothing is unaddressed here. Checked src/notification.rs (Process subject goes to Resend as JSON over HTTPS, so a process name cannot break out of an email header), src/processes.rs (step names must be a single path component, and running a process already executes its steps' commands, so the result-file write adds no new authority), and src/logs/status/inspect.rs process_steps (a forged step line resolves at most to displaying a path via is_file, never file contents, and only to the invoking user). A temporary probe test confirmed a traversal step line yields no result file; it was removed after the run since no finding was fixed.

Security review outcome

No unaddressed introduced findings.

Review coverage

site/docs/index.html was not read. It is generated from docs/guide.md by site/generate-docs.mjs. cd site && npm run docs exited 0, and both reviewers confirmed the exclusion. No other changed file was left unread.

Closes #1387

Built with grok grok 1.0.70 (f50904eaee6c) [stable] · default model · default effort

status, show, the Console and the Activity log name a Custom process as Process <name>. A succeeded, failed or interrupted Process sends a Run notification under the same email rules as a Ticket run. A skipped one sends none. The stored kind stays Process.
Lanes, Stages and spans say Process <name>. show and the Console details print a Step result when the name has a space or a colon. A failure after the email check and before any Step still sends the Run notification.
# Conflicts:
#	README.md
#	docs/guide.md
#	site/docs/index.html
#	site/how-it-works/index.html
#	site/index.html
#	src/processes.rs
#	tests/process.rs
@JacobStephens2
JacobStephens2 merged commit c35eeb8 into issue-877 Oct 27, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1387 branch October 27, 2026 02:58
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