Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/incidents.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pipeline still calls it there.
| bi. `bi_own_review_finishes` | A run's own review asked for changes; its fix rounds were blocked by a refused edit, checks skipped for time and a tool input error, the loop called that "no progress" at its cap of two, deferred a one-line config omission and a placeholder line, and marked the run completed while the run page said a fix round was taking them. The finding contradicted a comment on the ticket, and an outside step asked a person to add labels. | Each finding is tracked on its own: a blocked round is not a stall and the next one removes the block; a stalled finding climbs its own ladder; a finding the ticket, its comments or the plan rule out is settled by their words; only a person-gate reason defers one. A run is never completed while its own review asks for changes on the head or with a deferred item lacking such a reason. A finished run's card never says it is working. CoderHelm adds pull request labels itself. |
| bj. `bj_release_through_a_busy_hour` | Two repositories' Security pages read hundreds of findings "in a pull request" for two days, through two releases meant to give them back. The sweep that compares findings with GitHub logged only when it changed something, so a sweep that found every pull request still open left no trace; and while GitHub's budget was low it was held before its first read, three sweeps in a row. Both pull requests were in fact open. | Every sweep leaves one line with what it read, what GitHub said (open, merged, closed, unanswered), what it changed and what it left. A held budget slows the release and never stops it: a few reads a sweep go on a small allowance of their own (`github_budget::caller::FLOOR`), in a turn that reaches every pull request within a few sweeps. |
| bk. `bk_owns_the_outside_work` | A run with its pull request open ended waiting on people and its ticket comment handed over work CoderHelm could do: reading workflow runs, a lint, page checks (all failing on one 400 because a page check written as the confirm "query" was sent to the CMS's GROQ API), the production release (a tag after one approval), a review look, and a step number the ticket never showed; it opened on a raw Jira account id and counted nothing as handed over. | Each outside step's action comes from its own words; a failed attempt reaches a person only for a permission or credential in its own cause; a tool failure is diagnosed and reported once and its steps take another way; the release is one approval; a run waits on a person only with a gate-approved item and nothing it can still do; every comment, description, chat message and outside report passes the sink check; replies show names, never account ids; the team's history replays with no doable item reaching a person. |
| bl. `bl_description_final_review` | A pull request description showed six checks as "still running when this was written" in its results and never changed them, asked a person for deploy credentials or to run the staging deploy in a repository that deploys staging from a label CoderHelm adds, said the file to read first and the way back twice each, closed its review focus with "nothing is out of the ordinary", named a page by its raw id beside its name, and listed still-running and did-not-run checks on one line. The repository's template only guided the first draft. A run could also end as needing an outside change instead of delivering the code. | Every description passes a final review in the one save (`common::pr_review`): a running check reads Running and is never a result, and the stamp keeps the description rebuilt until the checks end; nothing the gate does not let through reaches a person, and a staging deploy the repository lets CoderHelm start (a dispatchable workflow, or a job a pull request label starts) is CoderHelm's step: the gate is told it can deploy, and the executor adds the label or dispatches, waits for the run and records its end; nothing is said twice; no filler; no raw id beside a name; running and did-not-run are said apart. The repository's template is the visible structure, filled with CoderHelm's content (`common::pr_template`). A plan with code is implemented and its pull request opened whatever outside work it needs, a person's feedback that part of the fix is outside the code keeps the code and its open pull request with the outside part attached, and the run ends delivered with only person-only items listed once under Needed from you. |

## Adding a case

Expand Down
4 changes: 4 additions & 0 deletions services/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,13 @@ pub mod pr_layout;
pub mod pr_outcome;
/// The last read of a description before it is saved, verified.
pub mod pr_reader;
/// The final read of a description before it is posted.
pub mod pr_review;
/// The work around a pull request that is not in its diff, each step with
/// one owner and one state.
pub mod pr_steps;
/// A repository's pull request template as the description's structure.
pub mod pr_template;
pub mod run_prs;
// review_stats: time-ordered review records for analytics
/// What people write on a ticket while a run works on it: kept, acknowledged, acted on.
Expand Down
15 changes: 11 additions & 4 deletions services/common/src/person_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,10 +976,17 @@ pub fn decide(a: &Ask, ctx: &Context) -> Outcome {
/// A deploy: CoderHelm runs it when it holds the credentials; else the one
/// missing thing is said once.
fn deploy_item(a: &Ask, t: &str, ctx: &Context) -> Outcome {
if ctx.can_deploy {
if let Some(c) = command_in(a) {
return Outcome::Do(Work::Command(c));
}
// A deploy CoderHelm can start (a workflow it dispatches or one a label
// starts, or credentials it holds) is its own: never a credential item
// for a person while it has not tried. An attempt whose own cause is a
// listed reason still reaches a person.
let tried_and_refused =
a.kind == Kind::Attempt && reason_in(&one_line(&a.why_not).to_lowercase()).is_some();
if ctx.can_deploy && !tried_and_refused {
return Outcome::Do(match command_in(a) {
Some(c) => Work::Command(c),
None => Work::Own(one_line(&a.text)),
});
}
let reason = reason_in(t).unwrap_or(Reason::Credential);
let missing = match reason {
Expand Down
Loading
Loading