From 90c102c0a38d2b8caf3492546958d9c8ff5ed04b Mon Sep 17 00:00:00 2001 From: Karibhou <157208370+Karibhou@users.noreply.github.com> Date: Sun, 8 Nov 2026 21:23:12 +0100 Subject: [PATCH 001/123] =?UTF-8?q?=F0=9F=90=9B=20fix(crux/runs):=20resolv?= =?UTF-8?q?e=20symlinks=20before=20the=20workspace=5Froots=20check=20(#172?= =?UTF-8?q?74)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit validateWorkspace cleaned workspace_path and compared it to workspace_roots as a string prefix, then os.Stat followed symlinks. A link under a root (/x -> /), which a previous run can plant in its read-write workspace, passed the check and the backend mounted its target read-write. The path is now resolved with filepath.EvalSymlinks and the resolved form is checked against the resolved roots (so a root reached through a link still works); a path resolving outside is refused 403. The run mounts and records the resolved directory, so the backend never follows a link the check did not see. Fixes #17029 Hive-Run: hivecommons/hive#17029 Hive-Plan: review-backlog/security Hive-Spec: crux-runs#workspace-roots Signed-off-by: Karibhou Co-authored-by: Karibhou Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- ...urity-17029-crux-workspace-path-symlink.md | 1 + src/crux/runs/service.go | 36 +++++++++++++++- src/crux/runs/service_test.go | 41 ++++++++++++++++++- 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 changelog.d/security-17029-crux-workspace-path-symlink.md diff --git a/changelog.d/security-17029-crux-workspace-path-symlink.md b/changelog.d/security-17029-crux-workspace-path-symlink.md new file mode 100644 index 0000000000..707163665a --- /dev/null +++ b/changelog.d/security-17029-crux-workspace-path-symlink.md @@ -0,0 +1 @@ +- crux: a contained run's `workspace_path` is now checked against `workspace_roots` after resolving symlinks, and the run mounts the resolved directory ([#17029](https://github.com/hivecommons/hive/issues/17029)). Previously the root check was lexical, so a symlink under a workspace root — one a previous run could plant in its read-write workspace — pointing at `/` passed the check and the backend mounted the link's target read-write. Such a request is now refused with 403 (`resolves outside this server's workspace_roots`); roots that are themselves reached through a symlink keep working. diff --git a/src/crux/runs/service.go b/src/crux/runs/service.go index bb35bab36d..3a39e602f3 100644 --- a/src/crux/runs/service.go +++ b/src/crux/runs/service.go @@ -458,10 +458,22 @@ func (s *Service) validateWorkspace(caller Caller, req api.ContainedRunRequest, if !pathUnder(path, s.Config.WorkspaceRoots) { return &ForbiddenError{fmt.Sprintf("workspace_path %q is not under this server's workspace_roots", path)} } - if st, err := os.Stat(path); err != nil || !st.IsDir() { + // The lexical check above cannot see symlinks: /x pointing at / + // passes it, and a previous run can plant such a link in its rw + // workspace. Resolve the path, check the resolved form against the + // resolved roots, and mount the resolved path so the backend never + // follows a link the check did not see. + resolved, err := filepath.EvalSymlinks(path) + if err != nil { + return &RequestError{fmt.Sprintf("workspace_path %q is not a directory", path)} + } + if !pathUnder(resolved, resolvedRoots(s.Config.WorkspaceRoots)) { + return &ForbiddenError{fmt.Sprintf("workspace_path %q resolves outside this server's workspace_roots", path)} + } + if st, err := os.Stat(resolved); err != nil || !st.IsDir() { return &RequestError{fmt.Sprintf("workspace_path %q is not a directory", path)} } - p.workspace = path + p.workspace = resolved return nil } @@ -511,6 +523,26 @@ func pathUnder(path string, roots []string) bool { return false } +// resolvedRoots returns roots with symlinks resolved, so a root that is +// itself reached through a link (a symlinked /tmp, a bind-mount alias) +// still contains the resolved paths beneath it. A root that cannot be +// resolved (it does not exist) is kept as written: nothing resolves +// under a missing directory, so it admits nothing it should not. +func resolvedRoots(roots []string) []string { + out := make([]string, 0, len(roots)) + for _, root := range roots { + root = filepath.Clean(strings.TrimSpace(root)) + if root == "" || root == "." { + continue + } + if r, err := filepath.EvalSymlinks(root); err == nil { + root = r + } + out = append(out, root) + } + return out +} + // execute runs one accepted run to a terminal status. Every exit path // writes the record and then the run's done signal; nothing is left // accepted or running by this process. diff --git a/src/crux/runs/service_test.go b/src/crux/runs/service_test.go index 73cdb96750..bac0c9cc27 100644 --- a/src/crux/runs/service_test.go +++ b/src/crux/runs/service_test.go @@ -70,7 +70,13 @@ func newFixture(t *testing.T, launcher *fakeLauncher) *fixture { if err != nil { t.Fatal(err) } - root := filepath.Join(t.TempDir(), "ws") + // Resolved so a symlinked TMPDIR does not make the mounted (resolved) + // workspace differ from f.workspace(). + tmp, err := filepath.EvalSymlinks(t.TempDir()) + if err != nil { + t.Fatal(err) + } + root := filepath.Join(tmp, "ws") if err := os.MkdirAll(filepath.Join(root, "proj"), 0o755); err != nil { t.Fatal(err) } @@ -435,6 +441,12 @@ func (p provisionFunc) Provision(ctx context.Context, dir string, wt api.Contain func TestValidationErrors(t *testing.T) { f := newFixture(t, blocking()) ws := f.workspace() + // A link under a root naming a directory outside it: the lexical + // prefix check admits it, the resolved check must not. + escape := filepath.Join(f.root, "escape") + if err := os.Symlink(filepath.Dir(f.root), escape); err != nil { + t.Fatal(err) + } wt := &api.ContainedRunWorktree{Repo: "https://github.com/hivecommons/hive", Commit: testSHA} cases := []struct { name string @@ -472,6 +484,7 @@ func TestValidationErrors(t *testing.T) { {"workspace outside roots", api.ContainedRunRequest{Command: []string{"x"}, WorkspacePath: filepath.Dir(f.root)}, &ForbiddenError{}, "workspace_roots"}, {"workspace sibling prefix", api.ContainedRunRequest{Command: []string{"x"}, WorkspacePath: f.root + "2"}, &ForbiddenError{}, "workspace_roots"}, {"workspace missing", api.ContainedRunRequest{Command: []string{"x"}, WorkspacePath: filepath.Join(ws, "nope")}, &RequestError{}, "not a directory"}, + {"workspace symlink escape", api.ContainedRunRequest{Command: []string{"x"}, WorkspacePath: escape}, &ForbiddenError{}, "resolves outside"}, } for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { @@ -501,6 +514,32 @@ func TestValidationErrors(t *testing.T) { } } +// A root reached through a link, and a link that stays inside the root, +// are still admitted; the run mounts the resolved directory, never the +// link the check followed. +func TestWorkspacePathSymlinksResolveInsideRoots(t *testing.T) { + f := newFixture(t, newFakeLauncher(func(context.Context, sandbox.LaunchSpec) (sandbox.Result, error) { + return sandbox.Result{}, nil + })) + alias := filepath.Join(t.TempDir(), "alias") + if err := os.Symlink(f.root, alias); err != nil { + t.Fatal(err) + } + if err := os.Symlink(f.workspace(), filepath.Join(f.root, "inner")); err != nil { + t.Fatal(err) + } + f.svc.Config.WorkspaceRoots = []string{alias} + for _, path := range []string{filepath.Join(alias, "proj"), filepath.Join(alias, "inner")} { + run := f.start(api.ContainedRunRequest{WorkspacePath: path, Command: []string{"x"}}) + if spec := f.spec(); spec.Workspace != f.workspace() { + t.Fatalf("%s mounted %q, want resolved %q", path, spec.Workspace, f.workspace()) + } + if done := f.wait(run.ID); done.Workdir != f.workspace() { + t.Fatalf("%s recorded workdir %q", path, done.Workdir) + } + } +} + func TestNotConfiguredServesRecordsButRefusesCreates(t *testing.T) { store, err := runstate.Open(t.TempDir()) if err != nil { From 6a38fcc55a803674a51a5e8aafeebc8d7b9385ad Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Sun, 8 Nov 2026 20:31:36 +0000 Subject: [PATCH 002/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.205.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.205.0 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/added-crux-s7-saved-run-results.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/added-crux-s7-saved-run-results.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 10e34bc80a..c1a187f1c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-08 (v5.205.0) + +### Added + +- crux: saved run results complete, the seventh work service of the Crux work-services RFC ([hivecommons/crux#114](https://github.com/hivecommons/crux/issues/114) S7). A finished run can now be re-run with `POST /v1/runs/{id}/restart` (`crux --server … runs restart`): the server re-validates the request the run was accepted with as its original owner against the current configuration, links the two records (`restarted_from` / `restarted_by`), audits the restart with its reason, and refuses with `409 conflict` while the old run is still live so two drivers never resume one task. `GET /v1/runs` lists the caller's runs newest first (the operator's view is every run; `?status=` and `?limit=` narrow it), `GET /v1/runs/{id}/history` is the record's status transitions, and a `crux serve` restart now settles the `running` steps of an unfinished session to `unfinished` alongside the run. `crux runs list|restart|history` round out the CLI. + ## 2026-11-08 (v5.204.1) ### Fixed diff --git a/changelog.d/added-crux-s7-saved-run-results.md b/changelog.d/added-crux-s7-saved-run-results.md deleted file mode 100644 index a425d23083..0000000000 --- a/changelog.d/added-crux-s7-saved-run-results.md +++ /dev/null @@ -1 +0,0 @@ -- crux: saved run results complete, the seventh work service of the Crux work-services RFC ([hivecommons/crux#114](https://github.com/hivecommons/crux/issues/114) S7). A finished run can now be re-run with `POST /v1/runs/{id}/restart` (`crux --server … runs restart`): the server re-validates the request the run was accepted with as its original owner against the current configuration, links the two records (`restarted_from` / `restarted_by`), audits the restart with its reason, and refuses with `409 conflict` while the old run is still live so two drivers never resume one task. `GET /v1/runs` lists the caller's runs newest first (the operator's view is every run; `?status=` and `?limit=` narrow it), `GET /v1/runs/{id}/history` is the record's status transitions, and a `crux serve` restart now settles the `running` steps of an unfinished session to `unfinished` alongside the run. `crux runs list|restart|history` round out the CLI. From dc8c3706dfba0b50d2ca9b60eba06eaca483afe7 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Sun, 8 Nov 2026 20:59:21 +0000 Subject: [PATCH 003/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.206.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.206.0 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 10 ++++++++++ changelog.d/added-etag-cache-size-setting.md | 1 - .../security-17029-crux-workspace-path-symlink.md | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/added-etag-cache-size-setting.md delete mode 100644 changelog.d/security-17029-crux-workspace-path-symlink.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c1a187f1c7..b844446c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,16 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-08 (v5.206.0) + +### Added + +- The GitHub conditional-request (ETag / 304) response cache is now sized by `github.etag_cache_max_mb` and `github.etag_cache_max_entries` (env `HIVE_GITHUB_ETAG_CACHE_MAX_MB` / `HIVE_GITHUB_ETAG_CACHE_MAX_ENTRIES`), editable under Settings → Forge App and applied without a restart. The built-in default rises from 64 MiB / 4096 entries to 128 MiB / 8192 entries, cached bodies are stored gzip-compressed so the cap holds several times as many responses, and `/api/gh-rate-limits` plus the Debug → GitHub API budget panel show the cache's fill level (`bytes` / `max_bytes` / `max_entries`) so an operator can see eviction pressure before the hit rate slides. + +### Security + +- crux: a contained run's `workspace_path` is now checked against `workspace_roots` after resolving symlinks, and the run mounts the resolved directory ([#17029](https://github.com/hivecommons/hive/issues/17029)). Previously the root check was lexical, so a symlink under a workspace root — one a previous run could plant in its read-write workspace — pointing at `/` passed the check and the backend mounted the link's target read-write. Such a request is now refused with 403 (`resolves outside this server's workspace_roots`); roots that are themselves reached through a symlink keep working. + ## 2026-11-08 (v5.205.0) ### Added diff --git a/changelog.d/added-etag-cache-size-setting.md b/changelog.d/added-etag-cache-size-setting.md deleted file mode 100644 index edabb9259f..0000000000 --- a/changelog.d/added-etag-cache-size-setting.md +++ /dev/null @@ -1 +0,0 @@ -- The GitHub conditional-request (ETag / 304) response cache is now sized by `github.etag_cache_max_mb` and `github.etag_cache_max_entries` (env `HIVE_GITHUB_ETAG_CACHE_MAX_MB` / `HIVE_GITHUB_ETAG_CACHE_MAX_ENTRIES`), editable under Settings → Forge App and applied without a restart. The built-in default rises from 64 MiB / 4096 entries to 128 MiB / 8192 entries, cached bodies are stored gzip-compressed so the cap holds several times as many responses, and `/api/gh-rate-limits` plus the Debug → GitHub API budget panel show the cache's fill level (`bytes` / `max_bytes` / `max_entries`) so an operator can see eviction pressure before the hit rate slides. diff --git a/changelog.d/security-17029-crux-workspace-path-symlink.md b/changelog.d/security-17029-crux-workspace-path-symlink.md deleted file mode 100644 index 707163665a..0000000000 --- a/changelog.d/security-17029-crux-workspace-path-symlink.md +++ /dev/null @@ -1 +0,0 @@ -- crux: a contained run's `workspace_path` is now checked against `workspace_roots` after resolving symlinks, and the run mounts the resolved directory ([#17029](https://github.com/hivecommons/hive/issues/17029)). Previously the root check was lexical, so a symlink under a workspace root — one a previous run could plant in its read-write workspace — pointing at `/` passed the check and the backend mounted the link's target read-write. Such a request is now refused with 403 (`resolves outside this server's workspace_roots`); roots that are themselves reached through a symlink keep working. From 3f148023726f216ce6aafdb595d3c056f01f27ad Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2026 21:23:32 +0000 Subject: [PATCH 004/123] =?UTF-8?q?=F0=9F=90=9B=20crux:=20confine=20agents?= =?UTF-8?q?tep=20workspace=20file=20access=20with=20os.Root=20(#17295)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 crux: confine agentstep workspace file access with os.Root agentstep read and wrote step files on the host with plain os calls after only a lexical '..' check, so a symlink in the workspace (carried by a provisioned repo, or planted by the sandboxed agent for answer files) redirected host-side reads/writes as the serve uid. All prompt_path reads, prompt writes and answer reads now go through an os.Root opened on the workspace, as review_request_sandbox_spool.go and runs.validateWorkspace do. Closes #17293 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 crux: create .crux parent before symlinking steps dir in agentstep test TestSymlinkedCruxDirCannotRedirectThePromptWrite symlinked .crux/steps without creating .crux first, so os.Symlink failed with ENOENT before the assertion ran. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .../security-crux-agentstep-workspace-root.md | 1 + src/crux/agentstep/agentstep.go | 26 ++++++-- src/crux/agentstep/agentstep_test.go | 59 +++++++++++++++++++ 3 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 changelog.d/security-crux-agentstep-workspace-root.md diff --git a/changelog.d/security-crux-agentstep-workspace-root.md b/changelog.d/security-crux-agentstep-workspace-root.md new file mode 100644 index 0000000000..0fc1c93ee1 --- /dev/null +++ b/changelog.d/security-crux-agentstep-workspace-root.md @@ -0,0 +1 @@ +- crux agentstep: step prompt/answer file access on the host now goes through an os.Root at the workspace, so a symlink inside a provisioned worktree (or one planted by the sandboxed agent) can no longer read or write host paths outside it ([#17293](https://github.com/hivecommons/hive/issues/17293)). A `prompt_path` that resolves outside the workspace is refused with the existing "must be relative to the workspace and stay inside it" 400. diff --git a/src/crux/agentstep/agentstep.go b/src/crux/agentstep/agentstep.go index 1a831e2da5..3ffdd682d2 100644 --- a/src/crux/agentstep/agentstep.go +++ b/src/crux/agentstep/agentstep.go @@ -158,10 +158,20 @@ func validate(host Host, req api.StepRequest) (plan, error) { if filepath.IsAbs(rel) || rel == ".." || strings.HasPrefix(rel, "../") { return p, &RequestError{"prompt_path must be relative to the workspace and stay inside it"} } - data, err := os.ReadFile(filepath.Join(host.Workspace, rel)) + root, err := os.OpenRoot(host.Workspace) if err != nil { return p, &RequestError{fmt.Sprintf("prompt_path %q: %v", req.PromptPath, err)} } + data, err := root.ReadFile(rel) + root.Close() + if err != nil { + // os.Root's escape error is unexported; a symlink leaving the + // workspace is reported like a lexical escape. + if strings.Contains(err.Error(), "escapes from parent") { + return p, &RequestError{"prompt_path must be relative to the workspace and stay inside it"} + } + return p, &RequestError{fmt.Sprintf("prompt_path %q: %v", req.PromptPath, err)} + } p.prompt = string(data) default: return p, &RequestError{"one of prompt or prompt_path is required"} @@ -251,10 +261,18 @@ func runAttempt(ctx context.Context, host Host, store Store, step api.Step, p pl spec := p.spec spec.PromptRel = rel + fmt.Sprintf("/prompt-%d.md", n) spec.AnswerRel = rel + fmt.Sprintf("/answer-%d.txt", n) - if err := os.MkdirAll(filepath.Join(host.Workspace, rel), 0o770); err != nil { + // Every host-side workspace access goes through root so a symlink in the + // workspace (provisioned, or planted by the sandboxed agent) cannot + // redirect it outside (#17293). + root, err := os.OpenRoot(host.Workspace) + if err != nil { + return a, Outcome{Status: api.StepBackendError, Reason: "writing the prompt: " + host.scrub(err.Error())} + } + defer root.Close() + if err := root.MkdirAll(rel, 0o770); err != nil { return a, Outcome{Status: api.StepBackendError, Reason: "writing the prompt: " + host.scrub(err.Error())} } - if err := os.WriteFile(filepath.Join(host.Workspace, filepath.FromSlash(spec.PromptRel)), []byte(prompt), 0o660); err != nil { + if err := root.WriteFile(filepath.FromSlash(spec.PromptRel), []byte(prompt), 0o660); err != nil { return a, Outcome{Status: api.StepBackendError, Reason: "writing the prompt: " + host.scrub(err.Error())} } cmd, err := p.backend.Command(spec) @@ -298,7 +316,7 @@ func runAttempt(ctx context.Context, host Host, store Store, step api.Step, p pl out = Outcome{Status: api.StepBackendError, Reason: host.scrub(runErr.Error())} default: out = p.backend.Parse(spec, res, func(rel string) ([]byte, error) { - return os.ReadFile(filepath.Join(host.Workspace, filepath.FromSlash(rel))) + return root.ReadFile(filepath.FromSlash(rel)) }) out.Reason = host.scrub(out.Reason) } diff --git a/src/crux/agentstep/agentstep_test.go b/src/crux/agentstep/agentstep_test.go index 35bd5eec52..989a81cf0e 100644 --- a/src/crux/agentstep/agentstep_test.go +++ b/src/crux/agentstep/agentstep_test.go @@ -6,6 +6,7 @@ import ( "errors" "os" "path/filepath" + "runtime" "strings" "sync" "testing" @@ -223,6 +224,64 @@ func TestPromptPathReadsFromTheWorkspace(t *testing.T) { } } +func TestPromptPathSymlinkOutsideWorkspaceIsRefused(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("symlinks need privileges on windows") + } + f := newFixture(t, answers(`{"verdict":"pass"}`)) + outside := filepath.Join(t.TempDir(), "secret") + if err := os.WriteFile(outside, []byte("host-secret"), 0o600); err != nil { + t.Fatal(err) + } + if err := os.Symlink(outside, filepath.Join(f.host.Workspace, "task.md")); err != nil { + t.Fatal(err) + } + req := f.process("", okSchema) + req.PromptPath = "task.md" + _, err := Run(context.Background(), f.host, req) + var reqErr *RequestError + if !errors.As(err, &reqErr) { + t.Fatalf("err = %v, want *RequestError", err) + } + if strings.Contains(err.Error(), "host-secret") || len(f.launcher.prompts) != 0 { + t.Fatalf("outside file reached the step: %v, prompts %q", err, f.launcher.prompts) + } +} + +func TestSymlinkedCruxDirCannotRedirectThePromptWrite(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("symlinks need privileges on windows") + } + f := newFixture(t, answers(`{"verdict":"pass"}`)) + outside := t.TempDir() + link := filepath.Join(f.host.Workspace, filepath.FromSlash(workspaceDir)) + if err := os.MkdirAll(filepath.Dir(link), 0o770); err != nil { + t.Fatal(err) + } + if err := os.Symlink(outside, link); err != nil { + t.Fatal(err) + } + step := Step(t, f) + if step.Status != api.StepBackendError { + t.Fatalf("status = %q, want %q", step.Status, api.StepBackendError) + } + var found []string + _ = filepath.WalkDir(outside, func(p string, d os.DirEntry, _ error) error { + if p != outside { + found = append(found, p) + } + return nil + }) + if len(found) != 0 { + t.Fatalf("wrote outside the workspace: %v", found) + } +} + +func Step(t *testing.T, f *fixture) api.Step { + t.Helper() + return f.run(f.process("hello", okSchema)) +} + func TestRequestRefusals(t *testing.T) { f := newFixture(t, answers(`{}`)) long := strings.Repeat("x", MaxPromptBytes+1) From 95e696119870a300c9679b92fa98f931b78c4eec Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Sun, 8 Nov 2026 21:50:42 +0000 Subject: [PATCH 005/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.206.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.206.1 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/security-crux-agentstep-workspace-root.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/security-crux-agentstep-workspace-root.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b844446c2b..b99b66739a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-08 (v5.206.1) + +### Security + +- crux agentstep: step prompt/answer file access on the host now goes through an os.Root at the workspace, so a symlink inside a provisioned worktree (or one planted by the sandboxed agent) can no longer read or write host paths outside it ([#17293](https://github.com/hivecommons/hive/issues/17293)). A `prompt_path` that resolves outside the workspace is refused with the existing "must be relative to the workspace and stay inside it" 400. + ## 2026-11-08 (v5.206.0) ### Added diff --git a/changelog.d/security-crux-agentstep-workspace-root.md b/changelog.d/security-crux-agentstep-workspace-root.md deleted file mode 100644 index 0fc1c93ee1..0000000000 --- a/changelog.d/security-crux-agentstep-workspace-root.md +++ /dev/null @@ -1 +0,0 @@ -- crux agentstep: step prompt/answer file access on the host now goes through an os.Root at the workspace, so a symlink inside a provisioned worktree (or one planted by the sandboxed agent) can no longer read or write host paths outside it ([#17293](https://github.com/hivecommons/hive/issues/17293)). A `prompt_path` that resolves outside the workspace is refused with the existing "must be relative to the workspace and stay inside it" 400. From 502dc9686145fe6ad0d1896c7bcdb5e59e2c99a5 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2026 22:00:42 +0000 Subject: [PATCH 006/123] =?UTF-8?q?=F0=9F=90=9B=20hold=20guard:=20log=20de?= =?UTF-8?q?ferred=20base=20refresh=20at=20debug=20instead=20of=20WARN=20(#?= =?UTF-8?q?17297)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 hold guard: log deferred base refresh at debug instead of WARN Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 hold guard: scope base-refresh deferral to behind so dirty held PRs keep their conflict notice Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- ...ixed-hold-guard-awaiting-admission-warn.md | 1 + src/cmd/hive/hold_guard_mergeability_test.go | 59 +++++++++++++++++++ src/cmd/hive/main_helpers.go | 6 ++ src/pkg/github/pullrequest.go | 13 +++- .../github/pullrequest_update_branch_test.go | 20 +++++++ 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 changelog.d/fixed-hold-guard-awaiting-admission-warn.md diff --git a/changelog.d/fixed-hold-guard-awaiting-admission-warn.md b/changelog.d/fixed-hold-guard-awaiting-admission-warn.md new file mode 100644 index 0000000000..5856166d4c --- /dev/null +++ b/changelog.d/fixed-hold-guard-awaiting-admission-warn.md @@ -0,0 +1 @@ +- hold guard no longer logs a WARN every tick when a held PR's base refresh is deliberately deferred to the automerge preparation front; the deferral is logged at debug level and no longer trips the selfreport error classifier. diff --git a/src/cmd/hive/hold_guard_mergeability_test.go b/src/cmd/hive/hold_guard_mergeability_test.go index 7dfe81d46d..aaf4d54eab 100644 --- a/src/cmd/hive/hold_guard_mergeability_test.go +++ b/src/cmd/hive/hold_guard_mergeability_test.go @@ -5,7 +5,9 @@ package main // integration style of hold_guard_test.go. import ( + "bytes" "context" + "log/slog" "strings" "testing" @@ -339,3 +341,60 @@ func TestMaintainHeldPRMergeabilityLeavesDependencyBotBranchesToTheBot(t *testin }) } } + +// A held PR whose repo's base refresh belongs to the automerge preparation +// front is a policy deferral: it must not log the failure WARN every tick. +func TestMaintainHeldPRMergeabilityDefersScheduledBaseRefreshWithoutWarn(t *testing.T) { + store := newTestHoldGuardStore(t) + fake := &holdGuardServer{commits: map[int][]map[string]any{ + 7: {ghCommit("c1", "strategist-bot", "docs: plan")}, + }} + client := newHoldGuardClient(t, fake) + client.SetScheduledBaseRefresh(func(string) bool { return true }) + cfg := escalationTestConfig() + store.Snapshot("acme/widgets", 7, "c1", []holdguard.Commit{{SHA: "c1", Author: "strategist-bot"}}) + + var buf bytes.Buffer + logger := slog.New(slog.NewTextHandler(&buf, &slog.HandlerOptions{Level: slog.LevelDebug})) + held := heldPRsActionable(github.PullRequest{Repo: "widgets", Number: 7, HeadSHA: "c1", BaseSHA: "b1", MergeableState: "behind"}) + if got := enforceHoldGuard(context.Background(), cfg, client, client, held, logger); len(got) != 0 { + t.Fatalf("deferred base refresh must not flag the PR for re-review, got %v", got) + } + + out := buf.String() + if strings.Contains(out, "keeping held PR mergeable failed") || strings.Contains(out, "level=WARN") { + t.Fatalf("deferred base refresh logged a warning:\n%s", out) + } + if !strings.Contains(out, "base refresh deferred to the automerge preparation front") { + t.Fatalf("missing debug deferral log:\n%s", out) + } +} + +// The deferral is scoped to `behind`: a held PR that GitHub reports `dirty` on +// a scheduled-base-refresh repo is a real conflict, and the preparation front +// does not tell the human about held PRs, so the conflict notice must still +// be posted. +func TestMaintainHeldPRMergeabilityStillNotesConflictWhenBaseRefreshIsScheduled(t *testing.T) { + store := newTestHoldGuardStore(t) + fake := &holdGuardServer{commits: map[int][]map[string]any{ + 7: {ghCommit("c1", "strategist-bot", "docs: plan")}, + }} + client := newHoldGuardClient(t, fake) + client.SetScheduledBaseRefresh(func(string) bool { return true }) + cfg := escalationTestConfig() + store.Snapshot("acme/widgets", 7, "c1", nil) + + held := heldPRsActionable(github.PullRequest{Repo: "widgets", Number: 7, HeadSHA: "c1", BaseSHA: "b1", MergeableState: "dirty"}) + _ = enforceHoldGuard(context.Background(), cfg, client, client, held, discardLogger()) + + if len(fake.comments) != 1 { + t.Fatalf("want one conflict notice on a dirty held PR, got %v", fake.comments) + } + if !strings.Contains(fake.comments[0], "conflict") { + t.Fatalf("conflict comment = %q, want it to name the conflict", fake.comments[0]) + } + rec, ok := store.Recorded("acme/widgets", 7) + if !ok || !rec.ConflictNoted { + t.Fatalf("snapshot = %+v ok=%v, want ConflictNoted set", rec, ok) + } +} diff --git a/src/cmd/hive/main_helpers.go b/src/cmd/hive/main_helpers.go index 0ff529d6d5..56cf0ff913 100644 --- a/src/cmd/hive/main_helpers.go +++ b/src/cmd/hive/main_helpers.go @@ -383,6 +383,12 @@ func maintainHeldPRMergeability( continue } if state != "dirty" { + if github.IsBaseRefreshAwaitingAdmission(err) { + // Policy deferral, not a failure: it recurs every tick by design. + logger.Debug("hold guard: held PR base refresh deferred to the automerge preparation front", + "repo", repo, "pr", pr.Number, "mergeable_state", state) + continue + } // "behind" is expected to be a trivial fast-forward; a // failure here is an anomaly (race, API hiccup), not the // known-unresolvable conflict the comment below is for. diff --git a/src/pkg/github/pullrequest.go b/src/pkg/github/pullrequest.go index e85e62e876..87e9364543 100644 --- a/src/pkg/github/pullrequest.go +++ b/src/pkg/github/pullrequest.go @@ -582,6 +582,17 @@ func (c *Client) UpdateBranchExpectedHead(ctx context.Context, repo string, numb return c.updateBranch(ctx, repo, number, expectedHeadSHA, observedBaseSHA) } +// ErrBaseRefreshAwaitingAdmission marks an update-branch call deferred by +// policy: the repo's base refresh is owned by the automerge preparation front. +var ErrBaseRefreshAwaitingAdmission = errors.New("base-refresh:awaiting-admission") + +// IsBaseRefreshAwaitingAdmission reports whether err is that deliberate +// deferral rather than a failed update. +func IsBaseRefreshAwaitingAdmission(err error) bool { + return err != nil && (errors.Is(err, ErrBaseRefreshAwaitingAdmission) || + strings.Contains(err.Error(), ErrBaseRefreshAwaitingAdmission.Error())) +} + // IsUpdateBranchStaleHead reports whether err is GitHub refusing an // UpdateBranchExpectedHead call because the PR head is no longer the expected // SHA: a 422 naming the expected head. Callers treat it as "the head moved @@ -614,7 +625,7 @@ func (c *Client) updateBranch(ctx context.Context, repo string, number int, expe } var inputs map[string]string if c.baseRefreshScheduled(owner + "/" + repo) { - return fmt.Errorf("base-refresh:awaiting-admission: %s/%s#%d is refreshed only by the automerge preparation front", owner, repo, number) + return fmt.Errorf("%w: %s/%s#%d is refreshed only by the automerge preparation front", ErrBaseRefreshAwaitingAdmission, owner, repo, number) } if expectedHeadSHA != "" || observedBaseSHA != "" { inputs = map[string]string{"expected_head_sha": expectedHeadSHA, "observed_base_sha": observedBaseSHA} diff --git a/src/pkg/github/pullrequest_update_branch_test.go b/src/pkg/github/pullrequest_update_branch_test.go index d208bfb3c9..b50d748c33 100644 --- a/src/pkg/github/pullrequest_update_branch_test.go +++ b/src/pkg/github/pullrequest_update_branch_test.go @@ -69,3 +69,23 @@ func TestIsUpdateBranchStaleHead(t *testing.T) { }) } } + +func TestIsBaseRefreshAwaitingAdmission(t *testing.T) { + cases := []struct { + name string + err error + want bool + }{ + {"nil", nil, false}, + {"sentinel", fmt.Errorf("%w: acme/widgets#1 is refreshed only by the automerge preparation front", ErrBaseRefreshAwaitingAdmission), true}, + {"flattened message", fmt.Errorf("base-refresh:awaiting-admission: acme/widgets#1"), true}, + {"other error", fmt.Errorf("boom"), false}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + if got := IsBaseRefreshAwaitingAdmission(tc.err); got != tc.want { + t.Fatalf("IsBaseRefreshAwaitingAdmission(%v) = %v, want %v", tc.err, got, tc.want) + } + }) + } +} From 9955acb648bb78abafac78c8469c78c2ba9f4b99 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2026 22:10:43 +0000 Subject: [PATCH 007/123] =?UTF-8?q?=F0=9F=90=9B=20pr-overlap:=20list=20eve?= =?UTF-8?q?ry=20shared=20path,=20including=20add/add=20and=20clean=20paths?= =?UTF-8?q?=20beside=20a=20conflict=20(#17304)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .github/scripts/pr-overlap.sh | 25 +++++++++++++++++----- .github/scripts/test-pr-overlap.sh | 34 ++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 11 deletions(-) diff --git a/.github/scripts/pr-overlap.sh b/.github/scripts/pr-overlap.sh index 85ac5bc1a7..f5fdaa2692 100755 --- a/.github/scripts/pr-overlap.sh +++ b/.github/scripts/pr-overlap.sh @@ -76,7 +76,7 @@ changed_files() { local base=$1 ref=$2 local mb mb=$(git merge-base "origin/${base}" "$ref") - git diff --name-only "${mb}...${ref}" | sort -u + git diff --no-renames --name-only "${mb}...${ref}" | sort -u } join_files() { @@ -101,6 +101,21 @@ intersect_files() { done | sort -u } +# Lists the union of conflicted and shared paths, marking the conflicted ones, +# so a CONFLICT row never hides shared paths that merged cleanly. +join_shared_files() { + local -n conflicts=$1 + local -n shared=$2 + local f out='' item + while IFS= read -r f; do + [[ -n "$f" ]] || continue + item=$(join_files '' "$f") + if printf '%s\n' "${conflicts[@]}" | grep -qxF -- "$f"; then item+=' (conflict)'; fi + if [[ -z "$out" ]]; then out=$item; else out+="
${item}"; fi + done < <(printf '%s\n' "${conflicts[@]}" "${shared[@]}" | sort -u) + [[ -n "$out" ]] && printf '%s' "$out" || printf '—' +} + # Prints the paths `git merge-tree` reports as conflicted when merging $a and # $b; prints nothing when they merge cleanly. With --name-only, a conflicted # merge prints the tree OID, then one conflicted path per line, then a blank @@ -177,17 +192,17 @@ make_report_for_pr() { mapfile -t conflict_files < <(merge_conflicts "$target_on_base" "$other_on_base") fi fi + # shellcheck disable=SC2034 # consumed by intersect_files via nameref + mapfile -t other_files < <(changed_files "$base" "$other_ref") + mapfile -t overlap_files < <(intersect_files target_files other_files) if ((${#conflict_files[@]})); then relation='CONFLICT' report_has_conflicts=1 report_has_any=1 - files_md=$(join_files '
' "${conflict_files[@]}") + files_md=$(join_shared_files conflict_files overlap_files) report_rows+="| #${number} | ${title//'|'/'\|'} | ${relation} | ${files_md} |"$'\n' continue fi - # shellcheck disable=SC2034 # consumed by intersect_files via nameref - mapfile -t other_files < <(changed_files "$base" "$other_ref") - mapfile -t overlap_files < <(intersect_files target_files other_files) if ((${#overlap_files[@]})); then relation='same files' report_has_any=1 diff --git a/.github/scripts/test-pr-overlap.sh b/.github/scripts/test-pr-overlap.sh index ccce9ed7be..f3581977cc 100755 --- a/.github/scripts/test-pr-overlap.sh +++ b/.github/scripts/test-pr-overlap.sh @@ -78,8 +78,19 @@ commit_file c.txt "$(printf 'c%s\n' 1 2 3 4 5 6 7 8 9 PR3)" 'pr3 c' git -C "$SEED" checkout -q -b pr4 "$b0" commit_file d.txt 'd' 'pr4' +# PRs 5 and 6 both add new.txt with different content (add/add conflict); PRs 7 +# and 8 both add same.txt with identical content (merges cleanly). +git -C "$SEED" checkout -q -b pr5 "$b1" +commit_file new.txt 'new-from-pr5' 'pr5' +git -C "$SEED" checkout -q -b pr6 "$b1" +commit_file new.txt 'new-from-pr6' 'pr6' +git -C "$SEED" checkout -q -b pr7 "$b1" +commit_file same.txt 'same-content' 'pr7' +git -C "$SEED" checkout -q -b pr8 "$b1" +commit_file same.txt 'same-content' 'pr8' + git -C "$SEED" push -q "$ORIGIN" v6 -for n in 1 2 3 4; do +for n in 1 2 3 4 5 6 7 8; do git -C "$SEED" push -q "$ORIGIN" "pr${n}:refs/pull/${n}/head" done @@ -94,7 +105,7 @@ shift case "$*" in -X*) printf '%s\n' "$*" >>"$GH_WRITE_LOG"; exit 0 ;; *'/pulls?base=v6'*) - for n in 4 3 2 1; do printf '%s\tPR %s\t%s\t2026-01-01T00:00:00Z\n' "$n" "$n" "$REPO_SLUG"; done ;; + for n in 8 7 6 5 4 3 2 1; do printf '%s\tPR %s\t%s\t2026-01-01T00:00:00Z\n' "$n" "$n" "$REPO_SLUG"; done ;; *'.head.repo.full_name'*) printf '%s\n' "$REPO_SLUG" ;; *'.head.sha'*) printf '%s\n' "${FALLBACK_SHA:-}" ;; *'.base.ref'*) printf 'v6\n' ;; @@ -127,13 +138,24 @@ LABEL_DEL="-X DELETE repos/${REPO_SLUG}/issues/%s/labels/conflicts-with-open-pr" echo 'PR 2: real sibling conflict with PR 3, stale PR 1 is not blamed' run_pr 2 assert_exit0 -assert_contains "$OUT" '| #3 | PR 3 | CONFLICT | `b.txt` |' 'reports the real b.txt conflict with PR 3, and only b.txt' -assert_not_contains "$OUT" 'c.txt' 'does not list the cleanly auto-merged c.txt' +assert_contains "$OUT" '| #3 | PR 3 | CONFLICT | `b.txt` (conflict)
`c.txt` |' 'marks b.txt as the conflict with PR 3 and lists shared clean c.txt unmarked' +assert_not_contains "$OUT" '`c.txt` (conflict)' 'does not mark the cleanly auto-merged c.txt as conflicting' assert_not_contains "$OUT" '| #1 |' 'does not blame PR 1 for its conflict with the base' assert_not_contains "$OUT" '| #4 |' 'does not link the unrelated stale PR 4' # shellcheck disable=SC2059 assert_contains "$WRITES" "$(printf -- "$LABEL_ADD" 2)" 'labels PR 2 conflicts-with-open-pr' +echo 'PR 5: add/add of the same new path with different content' +run_pr 5 +assert_exit0 +assert_contains "$OUT" '| #6 | PR 6 | CONFLICT | `new.txt` (conflict) |' 'reports the add/add conflict on new.txt' + +echo 'PR 7: add/add of the same new path with identical content' +run_pr 7 +assert_exit0 +assert_contains "$OUT" '| #8 | PR 8 | same files | `same.txt` |' 'reports same.txt as shared, not conflicting' +assert_not_contains "$OUT" 'CONFLICT |' 'does not call identical add/add a conflict' + echo 'PR 1: conflicts with the base itself' run_pr 1 assert_exit0 @@ -158,12 +180,12 @@ git -C "$WORK" update-ref refs/heads/pr-3 "$(git -C "$SEED" rev-parse pr4)" run_pr 2 assert_exit0 assert_contains "$OUT" 'PR #3 pull ref unavailable; fetching head' 'reports the fallback' -assert_contains "$OUT" '| #3 | PR 3 | CONFLICT | `b.txt` |' 'still detects the sibling conflict using the current head' +assert_contains "$OUT" '| #3 | PR 3 | CONFLICT | `b.txt` (conflict)
`c.txt` |' 'still detects the sibling conflict using the current head' echo 'PR 3: fallback also works when the target PR has no pull ref' run_pr 3 assert_exit0 -assert_contains "$OUT" '| #2 | PR 2 | CONFLICT | `b.txt` |' 'checks the target fetched by SHA' +assert_contains "$OUT" '| #2 | PR 2 | CONFLICT | `b.txt` (conflict)
`c.txt` |' 'checks the target fetched by SHA' echo 'PR 3: invalid API head fails without publishing a partial report' FALLBACK_SHA=null From f415681658874ddadd188610533a332f7b9520cb Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Sun, 8 Nov 2026 22:31:24 +0000 Subject: [PATCH 008/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.206.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.206.2 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-hold-guard-awaiting-admission-warn.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-hold-guard-awaiting-admission-warn.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b99b66739a..eba882ac29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-08 (v5.206.2) + +### Fixed + +- hold guard no longer logs a WARN every tick when a held PR's base refresh is deliberately deferred to the automerge preparation front; the deferral is logged at debug level and no longer trips the selfreport error classifier. + ## 2026-11-08 (v5.206.1) ### Security diff --git a/changelog.d/fixed-hold-guard-awaiting-admission-warn.md b/changelog.d/fixed-hold-guard-awaiting-admission-warn.md deleted file mode 100644 index 5856166d4c..0000000000 --- a/changelog.d/fixed-hold-guard-awaiting-admission-warn.md +++ /dev/null @@ -1 +0,0 @@ -- hold guard no longer logs a WARN every tick when a held PR's base refresh is deliberately deferred to the automerge preparation front; the deferral is logged at debug level and no longer trips the selfreport error classifier. From acb37aec7d32493870f24326d6422ebbf46ee362 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2026 22:58:53 +0000 Subject: [PATCH 009/123] =?UTF-8?q?=F0=9F=90=9B=20contribute:=20keep=20a?= =?UTF-8?q?=20PR-covered=20contributor=20claim=20on=20lease=20revoke=20(#1?= =?UTF-8?q?7305)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 contribute: convert a PR-covered contributor claim instead of releasing it on lease revoke Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 📖 api-reference: refresh claims_api.go citations after lease-revoke change Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 contribute: hold the claim from the verified task_complete PR, not the scan ledger Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../fixed-lease-revoke-keeps-covered-claim.md | 1 + src/docs/api-reference/contribute.md | 8 +- src/pkg/claims/claims.go | 47 +++++++ src/pkg/claims/claims_test.go | 33 +++++ src/pkg/dashboard/claims_api.go | 104 ++++++++++++++- src/pkg/dashboard/claims_api_test.go | 126 ++++++++++++++++++ src/pkg/dashboard/contribute_ws.go | 17 ++- src/pkg/github/stage_facts_sink.go | 4 +- 8 files changed, 329 insertions(+), 11 deletions(-) create mode 100644 changelog.d/fixed-lease-revoke-keeps-covered-claim.md diff --git a/changelog.d/fixed-lease-revoke-keeps-covered-claim.md b/changelog.d/fixed-lease-revoke-keeps-covered-claim.md new file mode 100644 index 0000000000..e21b04bfa7 --- /dev/null +++ b/changelog.d/fixed-lease-revoke-keeps-covered-claim.md @@ -0,0 +1 @@ +- contribute: when a relay contributor's lease ends while their own open PR covers the issue, the claim is now kept as a PR-held claim by the same contributor until that PR merges or closes, instead of being released with `lease revoked` and leaving the issue looking unclaimed to dispatch, the PR-request gate and the claim listing ([#17300](https://github.com/hivecommons/hive/issues/17300)). diff --git a/src/docs/api-reference/contribute.md b/src/docs/api-reference/contribute.md index db2ec66379..05fca9515e 100644 --- a/src/docs/api-reference/contribute.md +++ b/src/docs/api-reference/contribute.md @@ -67,10 +67,10 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | Method | Path | Auth | Purpose | Source | |---|---|---|---|---| -| `GET` | `/api/claims` | Dashboard auth | Every live worker claim (`{enabled, claims:[…]}`); `enabled:false` when `claims.enabled: false` | `pkg/dashboard/claims_api.go:53` | -| `GET` | `/api/claims/{owner}/{repo}/{number}` | Dashboard auth | `{held, claim}` for one issue | `pkg/dashboard/claims_api.go:54` | -| `POST` | `/api/claims/{owner}/{repo}/{number}` | Signed-in / hub-proxied / GitHub-token caller claims as a **human** under their login; a verified owner token claims as the owner | Body `{force, ttl_s, session}`. 200 with `outcome` `claimed`/`renewed`/`taken_over`; 409 with `outcome` `held` (same rank, retry with `force`) or `refused` (higher rank holds it) and a `hint` | `pkg/dashboard/claims_api.go:55` | -| `DELETE` | `/api/claims/{owner}/{repo}/{number}` | Same identity rules | Body `{force, reason}`. Releases your claim or a lower-ranked holder's; `force` with a verified owner role releases regardless of holder | `pkg/dashboard/claims_api.go:56` | +| `GET` | `/api/claims` | Dashboard auth | Every live worker claim (`{enabled, claims:[…]}`); `enabled:false` when `claims.enabled: false` | `pkg/dashboard/claims_api.go:54` | +| `GET` | `/api/claims/{owner}/{repo}/{number}` | Dashboard auth | `{held, claim}` for one issue | `pkg/dashboard/claims_api.go:55` | +| `POST` | `/api/claims/{owner}/{repo}/{number}` | Signed-in / hub-proxied / GitHub-token caller claims as a **human** under their login; a verified owner token claims as the owner | Body `{force, ttl_s, session}`. 200 with `outcome` `claimed`/`renewed`/`taken_over`; 409 with `outcome` `held` (same rank, retry with `force`) or `refused` (higher rank holds it) and a `hint` | `pkg/dashboard/claims_api.go:56` | +| `DELETE` | `/api/claims/{owner}/{repo}/{number}` | Same identity rules | Body `{force, reason}`. Releases your claim or a lower-ranked holder's; `force` with a verified owner role releases regardless of holder | `pkg/dashboard/claims_api.go:57` | ### `/api/v1` contributor subpaths diff --git a/src/pkg/claims/claims.go b/src/pkg/claims/claims.go index 66871d0a4f..2eaf53aa10 100644 --- a/src/pkg/claims/claims.go +++ b/src/pkg/claims/claims.go @@ -114,6 +114,11 @@ type Claim struct { // stage/020-claimed whatever its Kind (hivecommons/hive#13069). Once set // it stays for the claim's life — a renewal never clears it. PRStarted bool `json:"pr_started,omitempty"` + // PRRepo / PRNumber name the open pull request a claim is held for once + // its holder's lease ended with that PR covering the issue + // (hivecommons/hive#17300, HoldForPR). Zero for every other claim. + PRRepo string `json:"pr_repo,omitempty"` + PRNumber int `json:"pr_number,omitempty"` // ClaimedAt is when the current holder took the claim. ClaimedAt time.Time `json:"claimed_at"` // ExpiresAt is when the claim lapses unless renewed. @@ -721,6 +726,48 @@ func (l *Ledger) ReleaseByHolderID(holderID, reason string, onlyKey ...string) [ return out } +// HoldForPR keeps holderID's live claim on key as a PR-held claim instead of +// letting it go with the lease that carried it (hivecommons/hive#17300): it +// records the covering pull request (PRStarted, PRRepo, PRNumber) and pushes +// the expiry out to the policy's longest hold, so every ledger reader keeps +// seeing the issue as taken by the same principal while the PR is open. The +// caller re-confirms the PR and calls it again to renew, or releases the +// claim once the PR merges or closes. OnClaimed fires only when the PR +// evidence changed, so a periodic renewal does not touch GitHub. Reports +// false when holderID holds no live claim on key. +func (l *Ledger) HoldForPR(holderID, key, prRepo string, prNumber int) (Claim, bool) { + prRepo = strings.TrimSpace(prRepo) + if l == nil || holderID == "" || key == "" || prNumber <= 0 { + return Claim{}, false + } + l.mu.Lock() + now := l.now() + c, ok := l.claims[key] + if !ok || c.Expired(now) || c.HolderID != holderID { + l.mu.Unlock() + return Claim{}, false + } + changed := !c.PRStarted || c.PRRepo != prRepo || c.PRNumber != prNumber + c.PRStarted, c.PRRepo, c.PRNumber = true, prRepo, prNumber + hold := l.policy.MaxTTL + if hold <= 0 { + hold = DefaultMaxTTL + } + c.ExpiresAt = now.Add(hold) + l.claims[key] = c + _ = l.saveLocked() + hooks := l.hooks + l.mu.Unlock() + if changed && hooks.OnClaimed != nil { + hooks.OnClaimed(c, OutcomeRenewed) + } + return c, true +} + +// ReasonCoveringPRDone is the release reason for a PR-held claim (HoldForPR) +// whose covering pull request merged, closed, or stopped covering the issue. +const ReasonCoveringPRDone = "covering PR merged or closed" + // ReasonHolderRelaunched is the release reason recorded when a hive agent's // CLI was relaunched (hive boot, operator or self-heal restart): the context // that held the claim is gone, so the issue goes back to the pool at once diff --git a/src/pkg/claims/claims_test.go b/src/pkg/claims/claims_test.go index ff2bbb26f8..9febd47aa2 100644 --- a/src/pkg/claims/claims_test.go +++ b/src/pkg/claims/claims_test.go @@ -624,3 +624,36 @@ func TestReleaseAgentClaimsDropsOnlyThatAgentsClaims(t *testing.T) { t.Fatal("ReleaseComment must stamp at=") } } + +// A contributor claim whose holder's PR covers the issue is kept as a PR-held +// claim rather than dropped with the lease (hivecommons/hive#17300). +func TestHoldForPRKeepsClaimWithPREvidence(t *testing.T) { + var claimed []Claim + l, now := newTestLedger(t, Hooks{OnClaimed: func(c Claim, _ Outcome) { claimed = append(claimed, c) }}) + if _, err := l.Claim(Request{Repo: "o/r", Issue: 9, Holder: "karibhou", HolderID: "c-k#a", Kind: KindContributor}); err != nil { + t.Fatal(err) + } + if _, ok := l.HoldForPR("someone-else", Key("o/r", 9), "o/r", 12); ok { + t.Fatal("another holder must not convert the claim") + } + held, ok := l.HoldForPR("c-k#a", Key("o/r", 9), "o/r", 12) + if !ok || !held.PRStarted || held.PRRepo != "o/r" || held.PRNumber != 12 || held.Holder != "karibhou" || held.Kind != KindContributor { + t.Fatalf("HoldForPR = %+v ok=%v", held, ok) + } + if held.ExpiresAt != now.Add(DefaultMaxTTL) { + t.Fatalf("expires=%v want +%v", held.ExpiresAt, DefaultMaxTTL) + } + got, ok := l.Lookup("o/r", 9) + if !ok || got.HolderID != "c-k#a" || got.PRNumber != 12 || !got.PRStarted { + t.Fatalf("ledger claim = %+v ok=%v", got, ok) + } + if len(claimed) != 2 || !claimed[1].PRStarted { + t.Fatalf("OnClaimed must fire once for the conversion: %+v", claimed) + } + if _, ok := l.HoldForPR("c-k#a", Key("o/r", 9), "o/r", 12); !ok || len(claimed) != 2 { + t.Fatalf("a renewal of the same PR hold must not re-fire OnClaimed: %d", len(claimed)) + } + if _, ok := l.HoldForPR("c-k#a", Key("o/r", 10), "o/r", 12); ok { + t.Fatal("no claim on the key must report false") + } +} diff --git a/src/pkg/dashboard/claims_api.go b/src/pkg/dashboard/claims_api.go index 9bd5516adc..6c86eab4d1 100644 --- a/src/pkg/dashboard/claims_api.go +++ b/src/pkg/dashboard/claims_api.go @@ -10,6 +10,7 @@ import ( "time" "github.com/hivecommons/hive/pkg/claims" + ghpkg "github.com/hivecommons/hive/pkg/github" "github.com/hivecommons/hive/pkg/hooks" "github.com/hivecommons/hive/pkg/worksource" ) @@ -178,7 +179,10 @@ func (h *ContributeWSHub) renewClaimForLease(identity, repo string, number int) } // releaseClaimForLease drops the contributor claim that travelled with a lease -// when the lease is revoked (task done, abandoned, yanked, or expired). +// when the lease is revoked (task done, abandoned, yanked, or expired). When +// the holder's own open PR already covers the issue the claim is converted to +// a PR-held claim instead (hivecommons/hive#17300): the work is not abandoned, +// and dropping the claim made every ledger-only reader see the issue as free. func (h *ContributeWSHub) releaseClaimForLease(identity, key, reason string) { l := h.claimsLedger() if l == nil || identity == "" { @@ -187,11 +191,109 @@ func (h *ContributeWSHub) releaseClaimForLease(identity, key, reason string) { } return } + if c, ok := l.LookupKey(key); ok && c.HolderID == identity && c.Kind == claims.KindContributor { + if pr, covered := h.coveringPRByHolder(c); covered { + if held, ok := l.HoldForPR(identity, key, coveringPRRepo(pr), pr.PRNumber); ok { + h.logger.Info("[claims] contributor claim kept for covering PR", "issue", held.Key(), "holder", held.Holder, + "pr", pr.PRNumber, "pr_url", pr.PRURL, "lease_reason", reason) + return + } + } + } for _, c := range l.ReleaseByHolderID(identity, reason, key) { h.logger.Info("[claims] contributor claim released with lease", "issue", c.Key(), "holder", c.Holder, "reason", reason) } } +// coveringPRByHolder reports the open pull request, authored by the claim's +// holder, that the duplicate-PR claim ledger (Dependencies.IssueClaimed) +// records as covering the claimed issue. Only a claim FilterClaimedIssues +// would suppress the issue for counts (IssueClaim.CoversOpenIssue): a merged +// or closed PR no longer holds anything. Both repo spellings are tried, as in +// issueClaimedByOpenPR. +func (h *ContributeWSHub) coveringPRByHolder(c claims.Claim) (ghpkg.IssueClaim, bool) { + if c.Holder == "" { + return ghpkg.IssueClaim{}, false + } + name := c.Repo + if i := strings.LastIndex(name, "/"); i >= 0 { + name = name[i+1:] + } + pr, ok := h.issueClaimedByOpenPR(c.Repo, name, c.Issue) + if !ok || !pr.CoversOpenIssue() || !strings.EqualFold(strings.TrimSpace(pr.PRAuthor), c.Holder) { + return ghpkg.IssueClaim{}, false + } + return pr, true +} + +// coveringPRRepo is the repository the covering PR lives in. +func coveringPRRepo(pr ghpkg.IssueClaim) string { + if pr.PRRepo != "" { + return pr.PRRepo + } + return pr.Repo +} + +// recordCompletionPRClaim writes the PR a task_complete reported into the +// duplicate-PR ledger IssueClaimed reads, once verifyReportedPRDetail has +// confirmed it exists on the assigned repo and is this contributor's +// (hivecommons/hive#17300). The ledger is otherwise only refreshed by the +// eval-cycle scan and by PRs the hive's own client opens, so a PR the relay +// opened with its own token minutes ago is usually missing from it — and the +// lease revoke that follows the completion would then release the claim the +// PR covers. Merged PRs are skipped: they hold nothing. +func (h *ContributeWSHub) recordCompletionPRClaim(task *WSTaskAssign, prURL, username string, pr ghpkg.PRVerification) { + if task == nil || !pr.Verified || pr.Merged || task.Kind != "issue" || task.Number <= 0 || username == "" { + return + } + if task.SourceType != "" && task.SourceType != "github" { + return + } + if h.server == nil || h.server.deps == nil || h.server.deps.RecordIssueClaim == nil { + return + } + ref, err := ghpkg.ParsePRURL(prURL) + if err != nil || !strings.EqualFold(ref.FullName(), task.Repo) { + return + } + claim := ghpkg.IssueClaim{Repo: task.Repo, Issue: task.Number, PRRepo: ref.FullName(), PRNumber: ref.Number, + PRURL: prURL, PRAuthor: username, PRState: ghpkg.PRStateOpen, ExternalAuthor: true} + if err := h.server.deps.RecordIssueClaim(claim); err != nil { + h.logger.Warn("[claims] recording completion PR claim failed", + "repo", task.Repo, "issue", task.Number, "pr_url", prURL, "error", err.Error()) + } +} + +// sweepPRHeldClaims re-checks every contributor claim kept for a covering PR +// (releaseClaimForLease, hivecommons/hive#17300): while the same PR still +// covers the issue the hold is renewed; once it merged, closed, or stopped +// covering the issue the claim is released. Without the duplicate-PR ledger +// wired there is nothing to re-check against, so the holds are left to their +// own TTL. Returns how many claims were released. +func (h *ContributeWSHub) sweepPRHeldClaims() int { + l := h.claimsLedger() + if l == nil || h.server == nil || h.server.deps == nil || h.server.deps.IssueClaimed == nil { + return 0 + } + released := 0 + for _, c := range l.List() { + if c.Kind != claims.KindContributor || c.PRNumber <= 0 || c.HolderID == "" { + continue + } + // Any open PR by the holder that covers the issue keeps the hold, so + // closing PR A for a replacement PR B re-holds the claim for B. + if pr, ok := h.coveringPRByHolder(c); ok { + l.HoldForPR(c.HolderID, c.Key(), coveringPRRepo(pr), pr.PRNumber) + continue + } + for _, r := range l.ReleaseByHolderID(c.HolderID, claims.ReasonCoveringPRDone, c.Key()) { + released++ + h.logger.Info("[claims] PR-held contributor claim released", "issue", r.Key(), "holder", r.Holder, "pr", r.PRNumber) + } + } + return released +} + // removeLegacyClaimLabelForLease tells the stage engine the contributor // claim that travelled with a lease is gone (a ClaimReleased fact, ADR-0025) // so the issue's stage/020-claimed comes off; the engine re-reads the issue diff --git a/src/pkg/dashboard/claims_api_test.go b/src/pkg/dashboard/claims_api_test.go index 3039ade867..175bf15595 100644 --- a/src/pkg/dashboard/claims_api_test.go +++ b/src/pkg/dashboard/claims_api_test.go @@ -6,6 +6,7 @@ import ( "net/http" "net/http/httptest" "path/filepath" + "strconv" "strings" "testing" "time" @@ -277,3 +278,128 @@ func TestClaims_RenewLeaseRenewsClaim(t *testing.T) { t.Fatalf("claim not renewed with lease: before=%v after=%+v", first.ExpiresAt, after) } } + +// A lease that ends while the holder's own open PR covers the issue keeps the +// claim as a PR-held claim for the same principal; once that PR stops +// covering the issue the sweep releases it (hivecommons/hive#17300). +func TestClaims_LeaseRevokeKeepsClaimCoveredByHoldersPR(t *testing.T) { + hub, s, l := claimsHub(t) + const identity = "c-karibhou#a" + covering := ghpkg.IssueClaim{Repo: "myorg/repo1", Issue: 1, PRRepo: "myorg/repo1", PRNumber: 5, + PRURL: "https://github.com/myorg/repo1/pull/5", PRAuthor: "Karibhou", ExternalAuthor: true, Closing: true} + open := true + s.deps.IssueClaimed = func(repo string, number int) (ghpkg.IssueClaim, bool) { + if repo == "myorg/repo1" && number == 1 && open { + return covering, true + } + return ghpkg.IssueClaim{}, false + } + if err := hub.recordLease(identity, "t-1", "myorg/repo1", 1, "contributor", 3, time.Now()); err != nil { + t.Fatal(err) + } + if _, err := l.Claim(claims.Request{Repo: "myorg/repo1", Issue: 1, Holder: "karibhou", HolderID: identity, Kind: claims.KindContributor, Session: "a"}); err != nil { + t.Fatal(err) + } + + hub.revokeLease(identity, "t-1") + c, ok := l.Lookup("myorg/repo1", 1) + if !ok || c.HolderID != identity || c.Holder != "karibhou" || !c.PRStarted || c.PRRepo != "myorg/repo1" || c.PRNumber != 5 { + t.Fatalf("claim after revoke = %+v ok=%v, want PR-held claim by the same contributor", c, ok) + } + if hub.sweepPRHeldClaims() != 0 { + t.Fatal("sweep released a claim whose PR still covers the issue") + } + if _, ok := l.Lookup("myorg/repo1", 1); !ok { + t.Fatal("PR-held claim lost while the PR is open") + } + + open = false + if n := hub.sweepPRHeldClaims(); n != 1 { + t.Fatalf("sweep released %d claims once the PR closed, want 1", n) + } + if _, ok := l.Lookup("myorg/repo1", 1); ok { + t.Fatal("PR-held claim survived its PR closing") + } +} + +// Without a covering PR by the holder — none at all, or one by somebody +// else — a revoked lease still releases the claim. +func TestClaims_LeaseRevokeWithoutHoldersPRReleasesClaim(t *testing.T) { + hub, s, l := claimsHub(t) + const identity = "c-worker#a" + s.deps.IssueClaimed = func(repo string, number int) (ghpkg.IssueClaim, bool) { + if repo == "myorg/repo1" && number == 2 { + return ghpkg.IssueClaim{Repo: repo, Issue: number, PRNumber: 8, PRAuthor: "someone-else", ExternalAuthor: true}, true + } + return ghpkg.IssueClaim{}, false + } + for n, task := range map[int]string{1: "t-1", 2: "t-2"} { + if err := hub.recordLease(identity, task, "myorg/repo1", n, "contributor", 3, time.Now()); err != nil { + t.Fatal(err) + } + if _, err := l.Claim(claims.Request{Repo: "myorg/repo1", Issue: n, Holder: "worker", HolderID: identity, Kind: claims.KindContributor, Session: "a"}); err != nil { + t.Fatal(err) + } + hub.revokeLease(identity, task) + if c, ok := l.Lookup("myorg/repo1", n); ok { + t.Fatalf("issue %d: claim survived an abandon with no covering PR by its holder: %+v", n, c) + } + } +} + +// The primary #17300 path: the relay opened its PR with its own token and +// reports task_complete before any scan saw it, so the duplicate-PR ledger is +// empty at revoke time. The verified completion PR is recorded first and the +// claim is held for it, not released with the lease. +func TestClaims_CompletionPRHoldsClaimBeforeScanSeesIt(t *testing.T) { + hub, s, l := claimsHub(t) + const identity = "c-karibhou#a" + ledger := map[string]ghpkg.IssueClaim{} + s.deps.IssueClaimed = func(repo string, number int) (ghpkg.IssueClaim, bool) { + c, ok := ledger[repo+"#"+strconv.Itoa(number)] + return c, ok + } + s.deps.RecordIssueClaim = func(c ghpkg.IssueClaim) error { + ledger[c.Repo+"#"+strconv.Itoa(c.Issue)] = c + return nil + } + if err := hub.recordLease(identity, "t-1", "myorg/repo1", 1, "contributor", 3, time.Now()); err != nil { + t.Fatal(err) + } + if _, err := l.Claim(claims.Request{Repo: "myorg/repo1", Issue: 1, Holder: "karibhou", HolderID: identity, Kind: claims.KindContributor, Session: "a"}); err != nil { + t.Fatal(err) + } + if _, ok := s.deps.IssueClaimed("myorg/repo1", 1); ok { + t.Fatal("precondition: scan ledger must not know the PR yet") + } + + task := &WSTaskAssign{TaskID: "t-1", Kind: "issue", Repo: "myorg/repo1", Number: 1} + hub.recordCompletionPRClaim(task, "https://github.com/myorg/repo1/pull/9", "Karibhou", ghpkg.PRVerification{Verified: true}) + hub.revokeLease(identity, "t-1") + + c, ok := l.Lookup("myorg/repo1", 1) + if !ok || c.HolderID != identity || !c.PRStarted || c.PRRepo != "myorg/repo1" || c.PRNumber != 9 { + t.Fatalf("claim after completion = %+v ok=%v, want held for the verified PR #9", c, ok) + } + if hub.sweepPRHeldClaims() != 0 { + t.Fatal("sweep released a claim held for the verified completion PR") + } + + // An unverified or merged completion PR records nothing, so the claim + // goes with the lease as before. + for i, pr := range []ghpkg.PRVerification{{}, {Verified: true, Merged: true}} { + n := 2 + i + task := &WSTaskAssign{TaskID: "t-x", Kind: "issue", Repo: "myorg/repo1", Number: n} + if err := hub.recordLease(identity, "t-x", "myorg/repo1", n, "contributor", 3, time.Now()); err != nil { + t.Fatal(err) + } + if _, err := l.Claim(claims.Request{Repo: "myorg/repo1", Issue: n, Holder: "karibhou", HolderID: identity, Kind: claims.KindContributor, Session: "a"}); err != nil { + t.Fatal(err) + } + hub.recordCompletionPRClaim(task, "https://github.com/myorg/repo1/pull/10", "Karibhou", pr) + hub.revokeLease(identity, "t-x") + if c, ok := l.Lookup("myorg/repo1", n); ok { + t.Fatalf("issue %d: claim kept for an unverified/merged completion PR: %+v", n, c) + } + } +} diff --git a/src/pkg/dashboard/contribute_ws.go b/src/pkg/dashboard/contribute_ws.go index 1dc59273de..87219cdb1f 100644 --- a/src/pkg/dashboard/contribute_ws.go +++ b/src/pkg/dashboard/contribute_ws.go @@ -3954,6 +3954,15 @@ func (s *wsSession) handleTaskComplete(msg WSMessage) { // bar was "a PR was reported", still trusting an unverified field). // verifiedPR is the ONLY value allowed to unlock the PR-gated // rewards below; the raw msg.PRURL is never trusted directly again. + verifiedPR := "" + var prDetail ghpkg.PRVerification + if completedTask != nil { + prDetail = h.verifyReportedPRDetail(completedTask.Repo, msg.PRURL, s.contributor.profile.GitHubUsername) + // #17300: the scan ledger has usually not seen a PR the relay + // just opened with its own token, so record the verified PR + // before the revoke below decides whether the claim is kept. + h.recordCompletionPRClaim(completedTask, msg.PRURL, s.contributor.profile.GitHubUsername, prDetail) + } // C4: a completion is terminal — revoke the server-issued lease so a // later task_progress for this task cannot resurrect ownership and be // re-minted a credential. @@ -3963,11 +3972,6 @@ func (s *wsSession) handleTaskComplete(msg WSMessage) { h.revokeLease(identityOf(s.contributor), completedTask.TaskID) } } - verifiedPR := "" - var prDetail ghpkg.PRVerification - if completedTask != nil { - prDetail = h.verifyReportedPRDetail(completedTask.Repo, msg.PRURL, s.contributor.profile.GitHubUsername) - } if prDetail.Verified { verifiedPR = msg.PRURL if completedTask != nil { @@ -4732,6 +4736,9 @@ func (h *ContributeWSHub) cleanupLoop() { if n := h.claimsLedger().Expire(); n > 0 { h.logger.Info("[claims] expired claims released", "count", n) } + // #17300: a claim kept for its holder's covering PR lasts until + // that PR merges or closes. + h.sweepPRHeldClaims() // Deregister under the lock; CLOSE outside it. // diff --git a/src/pkg/github/stage_facts_sink.go b/src/pkg/github/stage_facts_sink.go index df6546780b..bd2e4c4e0b 100644 --- a/src/pkg/github/stage_facts_sink.go +++ b/src/pkg/github/stage_facts_sink.go @@ -254,7 +254,9 @@ func (c *Client) rememberedCoveringPR(store *stagelabels.Store, issue stageengin // cycles planned around them. Only a claim FilterClaimedIssues would // suppress the issue for counts (IssueClaim.CoversOpenIssue); the ledger is // keyed by the configured repo spelling, so both the bare and the -// owner-qualified name are tried. +// owner-qualified name are tried. A contributor lease revoked while the +// holder's own PR covers the issue now keeps the claim as a PR-held claim +// (hivecommons/hive#17300); this fallback still covers every other release. func (c *Client) ledgerCoveringPR(issue stageengine.Ref) (pr stageengine.Ref, partial bool, ok bool) { claim, found := c.ledgerClaim(issue) if !found || !claim.CoversOpenIssue() { From ba9beabf809de5e4f46fa1be72462a5c45c2101f Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Sun, 8 Nov 2026 23:26:02 +0000 Subject: [PATCH 010/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.206.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.206.3 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-lease-revoke-keeps-covered-claim.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-lease-revoke-keeps-covered-claim.md diff --git a/CHANGELOG.md b/CHANGELOG.md index eba882ac29..e499db4441 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-08 (v5.206.3) + +### Fixed + +- contribute: when a relay contributor's lease ends while their own open PR covers the issue, the claim is now kept as a PR-held claim by the same contributor until that PR merges or closes, instead of being released with `lease revoked` and leaving the issue looking unclaimed to dispatch, the PR-request gate and the claim listing ([#17300](https://github.com/hivecommons/hive/issues/17300)). + ## 2026-11-08 (v5.206.2) ### Fixed diff --git a/changelog.d/fixed-lease-revoke-keeps-covered-claim.md b/changelog.d/fixed-lease-revoke-keeps-covered-claim.md deleted file mode 100644 index e21b04bfa7..0000000000 --- a/changelog.d/fixed-lease-revoke-keeps-covered-claim.md +++ /dev/null @@ -1 +0,0 @@ -- contribute: when a relay contributor's lease ends while their own open PR covers the issue, the claim is now kept as a PR-held claim by the same contributor until that PR merges or closes, instead of being released with `lease revoked` and leaving the issue looking unclaimed to dispatch, the PR-request gate and the claim listing ([#17300](https://github.com/hivecommons/hive/issues/17300)). From aa348d2b478762db63ee9ab27c02e976a30b9632 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 00:13:40 +0000 Subject: [PATCH 011/123] =?UTF-8?q?=E2=9C=A8=20hive-open-issue:=20claim=20?= =?UTF-8?q?a=20self-filed=20next-step=20issue=20in=20the=20same=20request?= =?UTF-8?q?=20(#17306)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ hive-open-issue: --claim files and claims a self-filed issue in one request Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 test: decode the bare label array go-github posts in the create-claim fake Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * fix: route the --claim help-wanted strip through the shared blocked-sweep helper TestDirectWriteRatchet failed on CI: the --claim path added an eighth wrapper write (RemoveLabel) to issue_request_watcher.go, whose baseline is 7 and may never be raised. Generalize the blocked sweep's stripBlockedHelpWanted into stripHelpWanted in issue_blocked.go (where that removal is already baselined) and call it from claimCreatedIssue, so the watcher file gains no new direct write and the single help-wanted removal the claim test asserts still happens. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 hive-open-issue: refuse the filer on hub dispatch, bind the marker to the filer, ledger the --claim Review findings on #17306 (hivecommons/hive#17299): - The hub's own scanner dispatch (installClaimAdmissionCheck) still called the agent-less IssueDispatchBlockReason, so an issue a lane filed without --claim was handed back to that lane — the #17243→#17250 shape. A KindAgent request now goes through IssueStartBlockReason with req.Holder (the agent name), and a test asserts the filer's dispatch is refused with ClaimBlockReasonFiledForHelpPrefix while another agent is admitted. - withFiledForHelpMarker left a body alone when it already carried any marker, so a filer could seed `` and never be bound. Any pre-existing marker is now dropped before the filer's own is appended; tested with a seeded foreign marker, and the agent name is validated against a named pattern instead of round-tripping through the marker regex. - claimCreatedIssue applied the labels and facts but never raised the agent start signal, so the hub's claim ledger was not written for a --claim create. It now fires AgentStartSignalClaim like a `claim` request; the create-claim test records the hook and asserts one call for #99. - Docs: the filed-for-help refusal sentence sits beside the other `claim` refusals; the filing section notes the dispatch refusal, marker replacement and ledger signal. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 hive-open-issue: ledger the --claim via a filed-claim start signal the hub lists A self-filed issue was never in a kick, so the plain `claim` start signal the create+claim path raised went through ClaimOnStart with started=false and the hub's ledger never recorded the claim: dispatch admission Lookup, the PR-request gate and the claim listing all saw it unclaimed. The create path now raises AgentStartSignalFiledClaim; recordAgentStart treats that signal as the issue's own listing (MarkListed, then ClaimOnStart through the normal admission check). Ledger-backed test in cmd/hive. Hive-Fix-Attempt: 2/6 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 hive-open-issue: document the --claim allowlist exception, share the help-wanted strip, keep the marker off fold comments The write-surface catalogue said same-path side effects ride the parent operation's allowlist entry, but the claim performed on --claim is gated on its own claim allowlist and audited as agent_issue_claimed; the create_issue row and the side-effects paragraph now say so, and the hive-open-issue doc names the allowlist requirement. The --blocked-on-pr comment path removed help wanted directly, so stripHelpWanted's single-call-site claim was false; it now goes through the helper. The filed-for-help marker was appended before consolidation and so landed in file-set, component and subject fold comments on someone else's issue, where nothing reads it. The fold renderers strip it. Hive-Fix-Attempt: 3/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 hive-open-issue: exempt --parent children from the filed-for-help marker, collapse blank lines only on strip Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- bin/hive-open-issue.sh | 31 +- bin/test_hive_open_issue.sh | 34 ++ changelog.d/added-hive-open-issue-claim.md | 1 + src/cmd/hive/claims_admission_test.go | 92 +++++ src/cmd/hive/claimswire.go | 21 +- src/docs/github-write-surface.md | 8 +- src/docs/hive-open-issue.md | 40 ++- src/pkg/github/agent_start_hook.go | 6 + src/pkg/github/agent_start_hook_test.go | 13 +- src/pkg/github/issue_blocked.go | 11 +- src/pkg/github/issue_claim_gate.go | 88 ++++- .../github/issue_request_create_claim_test.go | 331 ++++++++++++++++++ src/pkg/github/issue_request_watcher.go | 117 ++++++- 13 files changed, 756 insertions(+), 37 deletions(-) create mode 100644 changelog.d/added-hive-open-issue-claim.md create mode 100644 src/pkg/github/issue_request_create_claim_test.go diff --git a/bin/hive-open-issue.sh b/bin/hive-open-issue.sh index ec582ef250..7f6490681a 100755 --- a/bin/hive-open-issue.sh +++ b/bin/hive-open-issue.sh @@ -16,7 +16,7 @@ # forge-resistance as the gh wrapper; this shim adds no privilege. # # Usage (drop-in for the common gh shapes): -# hive-open-issue --repo --title "" [--body ""|--body-file f] [--label a,b] [--parent ] [--blocked-by ] [--close-on-merge] [--needs-decision] [--no-consolidate ] +# hive-open-issue --repo --title "" [--body ""|--body-file f] [--label a,b] [--parent ] [--blocked-by ] [--close-on-merge] [--needs-decision] [--no-consolidate ] [--claim] # hive-open-issue comment --repo --body "" [--blocked-on-pr ] # hive-open-issue claim --repo # hive-open-issue close --repo [--override-reason "..."] @@ -56,6 +56,15 @@ # request is unrelated work that merely shares a file or component with one. # The reason is required, and the watcher records it in the result. # +# --claim (issue only) files AND claims the new issue in one request +# (hivecommons/hive#17299): the watcher applies hive/claimed-by- and +# records the claim right after the create, and takes `help wanted` off, so +# no one else can take the issue in between. Use it whenever you file an +# issue you are about to work on yourself (your own next step). Without it, +# a hive-filed issue is marked as filed for outside help and a later claim of +# it by the agent that filed it is refused. A failed claim is reported in the +# result (claim_error); the issue is still created. +# # --blocked-on-pr (comment only) parks the issue on open PR in the # same repo (hivecommons/hive#13093): use it when the code a finding names # exists only in an unmerged PR, so there is nothing to ship until it lands. @@ -132,6 +141,7 @@ PARENT="" BLOCKED_BY=() CLOSE_ON_MERGE=0 NEEDS_DECISION=0 +CLAIM_ON_CREATE=0 BLOCKED_ON_PR="" NO_CONSOLIDATE="" NO_CONSOLIDATE_SET=0 @@ -140,7 +150,7 @@ LABELS=() REMOVE_LABELS=() REVIEWERS=() TEAM_REVIEWERS=() -SUPPORTED_FLAGS="--repo/-R, --title/-t, --body/-b, --body-file/-F, --label/-l, --remove-label, --reviewer, --team-reviewer, --number, --parent, --blocked-by, --close-on-merge, --needs-decision, --no-consolidate, --blocked-on-pr, --override-reason, --dry-run/-n (plus the ignored gh flags --assignee/-a, --milestone/-m, --project/-p, --template/-T, --web/-w, --editor/-e)" +SUPPORTED_FLAGS="--repo/-R, --title/-t, --body/-b, --body-file/-F, --label/-l, --remove-label, --reviewer, --team-reviewer, --number, --parent, --blocked-by, --close-on-merge, --needs-decision, --claim, --no-consolidate, --blocked-on-pr, --override-reason, --dry-run/-n (plus the ignored gh flags --assignee/-a, --milestone/-m, --project/-p, --template/-T, --web/-w, --editor/-e)" while [ $# -gt 0 ]; do case "$1" in --repo|-R) REPO="$2"; shift 2;; @@ -169,6 +179,7 @@ while [ $# -gt 0 ]; do --override-reason=*) OVERRIDE_REASON="${1#*=}"; shift;; --close-on-merge) CLOSE_ON_MERGE=1; shift;; --needs-decision) NEEDS_DECISION=1; shift;; + --claim) CLAIM_ON_CREATE=1; shift;; --no-consolidate) NO_CONSOLIDATE_SET=1; NO_CONSOLIDATE="${2:-}"; shift $(( $# > 1 ? 2 : 1 ));; --no-consolidate=*) NO_CONSOLIDATE_SET=1; NO_CONSOLIDATE="${1#*=}"; shift;; --blocked-on-pr) BLOCKED_ON_PR="$2"; shift 2;; @@ -223,6 +234,11 @@ if [ "$NEEDS_DECISION" -eq 1 ] && [ "$KIND" != "issue" ]; then exit 2 fi +if [ "$CLAIM_ON_CREATE" -eq 1 ] && [ "$KIND" != "issue" ]; then + echo "hive-open-issue: --claim only applies when creating an issue (use 'hive-open-issue claim' for an existing one); nothing was written." >&2 + exit 2 +fi + if [ "$NO_CONSOLIDATE_SET" -eq 1 ] && [ "$KIND" != "issue" ]; then echo "hive-open-issue: --no-consolidate only applies when creating an issue; nothing was written." >&2 exit 2 @@ -355,9 +371,9 @@ REMOVE_LABELS_JSON="$(printf '%s\n' "${REMOVE_LABELS[@]:-}" | python3 -c 'import REVIEWERS_JSON="$(printf '%s\n' "${REVIEWERS[@]:-}" | python3 -c 'import json,sys; print(json.dumps([x.rstrip("\n") for x in sys.stdin if x.rstrip("\n")]))')" TEAM_REVIEWERS_JSON="$(printf '%s\n' "${TEAM_REVIEWERS[@]:-}" | python3 -c 'import json,sys; print(json.dumps([x.rstrip("\n") for x in sys.stdin if x.rstrip("\n")]))')" BLOCKED_BY_JSON="$(printf '%s\n' "${BLOCKED_BY[@]:-}" | python3 -c 'import json,sys; print(json.dumps([x.rstrip("\n") for x in sys.stdin if x.rstrip("\n")]))')" -python3 - "$TEMP_FILE" "$REQ_FILE" "$KIND" "$REPO" "$TITLE" "${OVERRIDE_REASON:-$BODY}" "$AGENT" "$LABELS_JSON" "${NUMBER:-0}" "$DRY_RUN" "${PARENT:-0}" "$REMOVE_LABELS_JSON" "$REVIEWERS_JSON" "$TEAM_REVIEWERS_JSON" "$BLOCKED_BY_JSON" "$NEEDS_DECISION" "${BLOCKED_ON_PR:-0}" "$NO_CONSOLIDATE" <<'PY' +python3 - "$TEMP_FILE" "$REQ_FILE" "$KIND" "$REPO" "$TITLE" "${OVERRIDE_REASON:-$BODY}" "$AGENT" "$LABELS_JSON" "${NUMBER:-0}" "$DRY_RUN" "${PARENT:-0}" "$REMOVE_LABELS_JSON" "$REVIEWERS_JSON" "$TEAM_REVIEWERS_JSON" "$BLOCKED_BY_JSON" "$NEEDS_DECISION" "${BLOCKED_ON_PR:-0}" "$NO_CONSOLIDATE" "$CLAIM_ON_CREATE" <<'PY' import json, os, sys -temporary, path, kind, repo, title, body, agent, labels, number, dry_run, parent, remove_labels, reviewers, team_reviewers, blocked_by, needs_decision, blocked_on_pr, no_consolidate = sys.argv[1:19] +temporary, path, kind, repo, title, body, agent, labels, number, dry_run, parent, remove_labels, reviewers, team_reviewers, blocked_by, needs_decision, blocked_on_pr, no_consolidate, claim_on_create = sys.argv[1:20] labels = [part.strip() for value in json.loads(labels) for part in value.split(",") if part.strip()] remove_labels = [part.strip() for value in json.loads(remove_labels) @@ -427,6 +443,10 @@ else: # the reason (hivecommons/hive#14360). if no_consolidate.strip(): req["no_consolidate_reason"] = no_consolidate.strip() + # --claim: the watcher claims the new issue for this agent in the same + # request (hivecommons/hive#17299). + if claim_on_create == "1": + req["claim"] = True if kind == "comment" and int(blocked_on_pr) > 0: # --blocked-on-pr: the watcher adds the marker and the `blocked` label # itself (hivecommons/hive#13093). @@ -466,6 +486,9 @@ else if [ "$NEEDS_DECISION" -eq 1 ]; then echo "hive-open-issue: will park the issue on a maintainer decision (needs-decision label)" fi + if [ "$CLAIM_ON_CREATE" -eq 1 ]; then + echo "hive-open-issue: will claim the new issue for $AGENT (hive/claimed-by-$AGENT label; help wanted removed)" + fi if [ "$NO_CONSOLIDATE_SET" -eq 1 ]; then echo "hive-open-issue: will not consolidate into an existing issue: $NO_CONSOLIDATE" fi diff --git a/bin/test_hive_open_issue.sh b/bin/test_hive_open_issue.sh index 541553e278..b0fdb46765 100755 --- a/bin/test_hive_open_issue.sh +++ b/bin/test_hive_open_issue.sh @@ -316,6 +316,40 @@ check "--needs-decision refusal writes no request" "" "$(find_req needsdecisionc rm -rf "$REQ_DIR" mkdir -p "$REQ_DIR" +# --- Section 3f: --claim files and claims in one request (#17299) --- +run_script "claimcreatebot" --repo "hiveorg/widgets" --title "My next step" --body "stage 2 of my epic" --claim +REQ_FILE="$(find_req claimcreatebot)" +if [ -n "$REQ_FILE" ]; then + GOT="$(python3 -c "import json,sys; r=json.load(open(sys.argv[1])); print(r.get('kind'), r.get('claim'))" "$REQ_FILE")" + check "--claim on a create sets claim in the issue request" "issue True" "$GOT" +else + echo " FAIL: request file not created for --claim test" + FAIL=$((FAIL + 1)) +fi +rm -rf "$REQ_DIR" +mkdir -p "$REQ_DIR" + +run_script "noclaimcreatebot" --repo "hiveorg/widgets" --title "Outside help wanted" --body "b" +REQ_FILE="$(find_req noclaimcreatebot)" +if [ -n "$REQ_FILE" ]; then + GOT="$(python3 -c "import json,sys; print('claim' in json.load(open(sys.argv[1])))" "$REQ_FILE")" + check "no --claim omits the field" "False" "$GOT" +else + echo " FAIL: request file not created for no --claim test" + FAIL=$((FAIL + 1)) +fi +rm -rf "$REQ_DIR" +mkdir -p "$REQ_DIR" + +set +e +run_script "claimcommentbot" comment --repo "hiveorg/widgets" 5 --body "x" --claim >/dev/null 2>&1 +BAD_RC=$? +set -e +check "--claim on a non-create is refused (exit 2)" "2" "$BAD_RC" +check "--claim refusal writes no request" "" "$(find_req claimcommentbot)" +rm -rf "$REQ_DIR" +mkdir -p "$REQ_DIR" + # --no-consolidate carries the reason; an empty reason or a non-create is refused. run_script "noconsolbot" --repo "hiveorg/widgets" --title "Unrelated" --body "b" --no-consolidate "different work" REQ_FILE="$(find_req noconsolbot)" diff --git a/changelog.d/added-hive-open-issue-claim.md b/changelog.d/added-hive-open-issue-claim.md new file mode 100644 index 0000000000..cb47f0d935 --- /dev/null +++ b/changelog.d/added-hive-open-issue-claim.md @@ -0,0 +1 @@ +- `hive-open-issue --claim` files and claims a self-filed issue in one request (claimed-by label, `help wanted` removed, failures reported as `claim_error`); an issue a hive agent files without `--claim` is marked filed-for-outside-help and that agent's later claim of it is refused ([#17299](https://github.com/hivecommons/hive/issues/17299)). diff --git a/src/cmd/hive/claims_admission_test.go b/src/cmd/hive/claims_admission_test.go index 649cff06c8..7822cbdb38 100644 --- a/src/cmd/hive/claims_admission_test.go +++ b/src/cmd/hive/claims_admission_test.go @@ -2,12 +2,14 @@ package main import ( "context" + "encoding/json" "fmt" "io" "log/slog" "net/http" "net/http/httptest" "path/filepath" + "strings" "sync/atomic" "testing" @@ -202,3 +204,93 @@ func TestKickClaimsRefuseIssueWithOpenLinkedPR(t *testing.T) { t.Fatalf("open-PR listings = %d, want still 1 (renewal/tick never list)", pullsCalls.Load()) } } + +// hivecommons/hive#17299: an issue an agent filed without --claim is filed +// for outside help, and the hub's own scanner dispatch of it back to that +// agent (#17243→#17250) is refused — not only the agent's relay `claim` +// request. Another agent still takes it. +func TestKickClaimsRefuseFilerOfFiledForHelpIssue(t *testing.T) { + api := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch { + case r.URL.Path == "/repos/o/r/issues/17243": + body, _ := json.Marshal(map[string]any{ + "number": 17243, "state": "open", "labels": []map[string]string{{"name": "help wanted"}}, + "body": "someone take this\n\n" + github.FiledForHelpMarker("scanner"), + }) + _, _ = w.Write(body) + case r.URL.Path == "/repos/o/r/pulls", r.URL.Path == "/repos/o/r/issues/17243/labels", r.URL.Path == "/repos/o/r/labels": + fmt.Fprint(w, `[]`) + default: + w.WriteHeader(http.StatusNotFound) + } + })) + defer api.Close() + logger := slog.New(slog.NewTextHandler(io.Discard, nil)) + client := github.NewClientForTest(api.URL, "o", []string{"r"}, logger) + ledger := testClaimsLedger(t) + installClaimAdmissionCheck(context.Background(), ledger, func() *github.Client { return client }) + + res, err := ledger.Claim(claims.Request{Repo: "o/r", Issue: 17243, Holder: "scanner", HolderID: "scanner", Kind: claims.KindAgent}) + if err != nil || res.Outcome != claims.OutcomeRefused || !strings.HasPrefix(res.Reason, github.ClaimBlockReasonFiledForHelpPrefix+"scanner") { + t.Fatalf("filer's dispatch = %+v, %v; want refused with %q", res, err, github.ClaimBlockReasonFiledForHelpPrefix+"scanner") + } + ledger.MarkListed("o/r", 17243, "scanner") + recordAgentStart(ledger, "o", "scanner", "r", 17243, github.AgentStartSignalClaim, logger) + if c, ok := ledger.Lookup("o/r", 17243); ok { + t.Fatalf("filer's start signal claimed its own filed-for-help issue: %+v", c) + } + + res, err = ledger.Claim(claims.Request{Repo: "o/r", Issue: 17243, Holder: "reviewer", HolderID: "reviewer", Kind: claims.KindAgent}) + if err != nil || res.Outcome != claims.OutcomeClaimed { + t.Fatalf("another agent's claim = %+v, %v; want claimed", res, err) + } +} + +// hivecommons/hive#17299: an issue an agent files with --claim was never in +// a kick, so a plain `claim` start signal on it ledgers nothing and every +// ledger-only reader (dispatch admission Lookup, the PR-request gate, the +// claim listing) still sees it unclaimed. The filed-claim signal the create +// path raises is the issue's own listing: the ledger claim is recorded, the +// admission check still runs, and another agent's dispatch is refused. +func TestRecordAgentStartFiledClaimLedgersSelfFiledIssue(t *testing.T) { + api := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch { + case r.URL.Path == "/repos/o/r/issues/17243": + body, _ := json.Marshal(map[string]any{ + "number": 17243, "state": "open", "body": "stage 2 of my epic", + "labels": []map[string]string{{"name": "hive/claimed-by-scanner"}}, + }) + _, _ = w.Write(body) + case r.URL.Path == "/repos/o/r/pulls", r.URL.Path == "/repos/o/r/issues/17243/labels", r.URL.Path == "/repos/o/r/labels": + fmt.Fprint(w, `[]`) + default: + w.WriteHeader(http.StatusNotFound) + } + })) + defer api.Close() + logger := slog.New(slog.NewTextHandler(io.Discard, nil)) + client := github.NewClientForTest(api.URL, "o", []string{"r"}, logger) + ledger := testClaimsLedger(t) + installClaimAdmissionCheck(context.Background(), ledger, func() *github.Client { return client }) + + // The plain claim signal a `claim` request raises: no kick listed the + // issue, so the ledger stays empty — the gap the filed-claim signal closes. + recordAgentStart(ledger, "o", "scanner", "r", 17243, github.AgentStartSignalClaim, logger) + if c, ok := ledger.Lookup("o/r", 17243); ok { + t.Fatalf("plain claim signal on an unlisted issue recorded a claim: %+v", c) + } + + recordAgentStart(ledger, "o", "scanner", "r", 17243, github.AgentStartSignalFiledClaim, logger) + c, ok := ledger.Lookup("o/r", 17243) + if !ok || c.Holder != "scanner" || c.Kind != claims.KindAgent || c.PRStarted { + t.Fatalf("filed-claim signal did not ledger the self-filed issue to its filer: %+v, %v", c, ok) + } + if li, listed := ledger.Listed("o/r", 17243); listed { + t.Fatalf("listing outlived the claim it became: %+v", li) + } + + res, err := ledger.Claim(claims.Request{Repo: "o/r", Issue: 17243, Holder: "reviewer", HolderID: "reviewer", Kind: claims.KindAgent}) + if err != nil || res.Outcome != claims.OutcomeHeld || res.Claim.Holder != "scanner" { + t.Fatalf("another agent's dispatch of the self-filed issue = %+v, %v; want held by scanner", res, err) + } +} diff --git a/src/cmd/hive/claimswire.go b/src/cmd/hive/claimswire.go index eb5470f22f..58b15080e5 100644 --- a/src/cmd/hive/claimswire.go +++ b/src/cmd/hive/claimswire.go @@ -217,8 +217,13 @@ func installClaimAdmissionCheck(ctx context.Context, ledger *claims.Ledger, clie // A fresh claim with no PR behind it is a dispatch: it also asks // whether an open PR already fixes the issue (#14799). A renewal, // a PR-backed start signal and the release tick's recheck of live - // claims do not — the holder's own PR is the open PR. + // claims do not — the holder's own PR is the open PR. A hive + // agent's own dispatch (Holder is the agent name) also refuses an + // issue that agent filed for outside help (hivecommons/hive#17299). if _, held := ledger.Lookup(req.Repo, req.Issue); !held && !req.PRStarted { + if req.Kind == claims.KindAgent { + return gh.IssueStartBlockReason(ctx, req.Repo, req.Issue, req.Holder) + } return gh.IssueDispatchBlockReason(ctx, req.Repo, req.Issue) } return gh.IssueClaimBlockReason(ctx, req.Repo, req.Issue) @@ -509,12 +514,22 @@ func recordAgentKickListings(dashSrv *dashboard.Server, org, agentName string, i // comment or a label request; see pkg/github/agent_start_hook.go). The first such signal on an issue a kick // listed to the agent records the agent claim (comment and label included) // that the escalation gate counts; a later one renews it. A signal on an -// issue no kick listed to the agent records nothing. +// issue no kick listed to the agent records nothing — except the filed-claim +// signal (hivecommons/hive#17299): the agent filed that issue itself as its +// own next step and claimed it in the same request, so no kick could have +// listed it; the filing is its listing, and the claim is recorded like a +// kicked issue's first start (admission check included). func recordAgentStart(ledger *claims.Ledger, org, agentName, repo string, issue int, signal string, logger *slog.Logger) { if ledger == nil || agentName == "" || issue <= 0 { return } - res, started, err := ledger.ClaimOnStart(qualifyClaimRepo(org, repo), issue, agentName, github.StartSignalIsPREvidence(signal)) + qualified := qualifyClaimRepo(org, repo) + if signal == github.AgentStartSignalFiledClaim { + if _, listed := ledger.MarkListed(qualified, issue, agentName); !listed && logger != nil { + logger.Debug("issue-claims: self-filed issue someone else holds; not listed", "agent", agentName, "repo", repo, "issue", issue) + } + } + res, started, err := ledger.ClaimOnStart(qualified, issue, agentName, github.StartSignalIsPREvidence(signal)) if logger == nil || !started { return } diff --git a/src/docs/github-write-surface.md b/src/docs/github-write-surface.md index bfdbc38292..175f935fe3 100644 --- a/src/docs/github-write-surface.md +++ b/src/docs/github-write-surface.md @@ -38,7 +38,7 @@ Each relay authorizes a request in this order. It stops at the first refusal. | Operation (`op`) | Entry point | Agent script | Audit action on success | Audited? | Typed `repo` / `target`? | | --- | --- | --- | --- | :---: | :---: | | `open_pr` | `pr_request_watcher.go` (`/var/run/hive-metrics/pr-requests`) | `hive-open-pr` | `agent_pr_created` | yes | yes / PR number | -| `create_issue` | `issue_request_watcher.go` kind `issue` (`.../issue-requests`) | `hive-open-issue` | `agent_issue_created` (or `agent_issue_rejected_duplicate` / `agent_issue_prior_art_refused`) | yes | yes / issue number | +| `create_issue` | `issue_request_watcher.go` kind `issue` (`.../issue-requests`) | `hive-open-issue` | `agent_issue_created` (or `agent_issue_rejected_duplicate` / `agent_issue_prior_art_refused`). With `--claim` the create is followed by a `claim` of the new issue, gated separately on `claim` (lane allowlist, `refuseWrite`), audited as `agent_issue_claimed`, and removing `help wanted`; the create stands when the claim is refused and the result reports `claim_error` | yes | yes / issue number | | `comment` | `issue_request_watcher.go` kind `comment` | `hive-open-issue comment` | `agent_comment_created` | yes | yes / issue or PR number | | `claim` | `issue_request_watcher.go` kind `claim` | `hive-open-issue claim` | `agent_issue_claimed` (adds `hive/claimed-by-` + `hive/in-progress` and one timestamped `hive:claim` marker comment; the pr-request watcher and enumeration sweep remove `hive/in-progress`) | yes | yes / issue number | | `close_issue` | `issue_request_watcher.go` kind `close` | `hive-open-issue close` | `agent_issue_closed` (`pr_closed` when the number is a PR) | yes | yes / issue or PR number | @@ -51,7 +51,11 @@ Each relay authorizes a request in this order. It stops at the first refusal. Side effects performed on the same path are covered by the parent operation's allowlist entry. For example, `open_pr` can also apply the `hold` label, post -the level-hold notice, and re-author the branch as a signed commit. +the level-hold notice, and re-author the branch as a signed commit. The one +exception is `hive-open-issue --claim`: the claim it performs after the create +is a distinct `claim` write, not a side effect of `create_issue`, so a lane +allowlisted for `create_issue` alone gets the issue created and `claim_error` +set (hivecommons/hive#17299). ### `review` is COMMENT-only on contributor pull requests diff --git a/src/docs/hive-open-issue.md b/src/docs/hive-open-issue.md index cfaec03162..354ccd0a10 100644 --- a/src/docs/hive-open-issue.md +++ b/src/docs/hive-open-issue.md @@ -42,7 +42,7 @@ Shapes are selected by an optional leading positional keyword (`comment`, `issue`): ```sh -hive-open-issue --repo --title "" [--body ""|--body-file f] [--label a,b] [--parent ] [--blocked-by ] [--needs-decision] [--no-consolidate ] +hive-open-issue --repo --title "" [--body ""|--body-file f] [--label a,b] [--parent ] [--blocked-by ] [--needs-decision] [--no-consolidate ] [--claim] hive-open-issue comment --repo --body "" [--blocked-on-pr ] hive-open-issue claim --repo hive-open-issue label --repo [--label a,b] [--remove-label c] @@ -62,6 +62,7 @@ hive-open-issue request-review --repo [--reviewer a,b] | `--parent` | — | issue | issue number in the same repo to link the new issue to as a GitHub sub-issue. Declaring it also exempts the request from the file-set, component and canonical-subject folds (see [DAG children never take a fold](#dag-children-never-take-a-fold)), so `--no-consolidate` is not needed for a decomposition child | | `--blocked-by` | — | issue | repeatable; issue numbers in the same repo the new issue is blocked by, recorded as GitHub "blocked by" dependencies (`#` prefix tolerated). Like `--parent`, declaring it exempts the request from the shared-path folds (see [DAG children never take a fold](#dag-children-never-take-a-fold)) | | `--needs-decision` | — | issue | park the new issue on a maintainer decision: the watcher applies the hive's configured needs-decision label itself (see [Parking an issue that needs a decision](#parking-an-issue-that-needs-a-decision)) | +| `--claim` | — | issue | file the new issue **and** claim it for this agent in the same request (see [Filing your own next step](#filing-your-own-next-step)). The request carries `"claim": true`; the result reports `claimed`, or `claim_error` when the claim did not land | | `--no-consolidate` | — | issue | requires a non-empty reason; the watcher skips open-issue consolidation (same-subject, file-set and component folds) and files a new issue, echoing the reason as `consolidation_skipped_reason` in the result and logging it. Use it for unrelated work that only shares a file or component with an open issue ([#14360](https://github.com/hivecommons/hive/issues/14360)). The request carries `"no_consolidate_reason"`. A request that declares `--parent` or `--blocked-by` needs no reason: it is a distinct DAG node and never takes the file-set, component or canonical-subject folds, and a genuine create reports `consolidation_skipped_reason` as `parent` or `blocked_by` ([#16065](https://github.com/hivecommons/hive/issues/16065)) | | `--blocked-on-pr` | — | comment | park the issue on open PR `` in the same repo: the watcher prefixes the note with ``, strips `@`-mentions from it, adds the `blocked` label and removes `help wanted` (see [Blocked on an unmerged PR](#blocked-on-an-unmerged-pr)) | | `--number` | — | comment, claim, close, label, request-review | the issue/PR number; a bare positional number or a `.../issues/N` or `.../pull/N` URL is also accepted | @@ -263,13 +264,46 @@ issue labelled `needs-human` or held, on an issue parked on a person's decision (`stage/045-needs-decision`, `needs-spec`, the retired decision labels), and on an umbrella issue wearing a never-claim label (`governor.claims.never_claim_labels`, default `epic`, case-insensitive): -an epic is the list of work, not the work. The same gate admits every -automated claim producer, so a start signal on such an issue records nothing. The +an epic is the list of work, not the work. The claim is also refused when the +claiming agent itself filed the issue without `--claim` (`filed for outside +help by `; see below). The same gate admits every automated claim +producer — the hub's own dispatch of an issue to an agent included — so a +start signal on such an issue records nothing. The `stage/030-pr-in-progress` label is swapped for `stage/040-covered-by-pr` when the agent's `hive-open-pr --issues` request opens the PR, and cleared when the claim is released or at enumeration once PR evidence exists or the marker lapsed (default 2h). +### Filing your own next step + +An issue filed without `--claim` is open to anyone: the org's help-wanted +automation advertises it, and a contributor can claim it before the filing +agent's separate `claim` request lands +([#17299](https://github.com/hivecommons/hive/issues/17299)). When you file +an issue you are about to work on yourself, pass `--claim`: right after the +create the watcher runs the same gate and claim a `claim` request does +(`hive/claimed-by-` label, in-progress fact, start marker) and +removes `help wanted`, so there is no window. The claim is a separate +`claim` write: the lane's write allowlist must list `claim` as well as +`create_issue`, or the issue is created and `claim_error` says why. The start signal it raises +(`filed_claim`) also counts as the issue's kick listing on the hub, so the +hub's claim ledger records the claim even though no kick ever named the +new issue. A claim that fails or is refused does +not undo the create; the result is still `ok` and says why in `claim_error`. +A request folded into an existing issue is not claimed. When the create +reuses an existing open issue (same-title `already_existed`), `--claim` claims +that reused issue, the same outcome as an explicit `hive-open-issue claim` on it. + +An issue filed **without** `--claim` carries a hidden +`` marker: the hive asked for outside +help, so a later `claim` of it by the same agent — or the hub dispatching it +back to that agent — is refused. A marker already in the request body is +replaced by the filer's own, so the body cannot name someone else. Other +agents and contributors may still claim it; a maintainer who wants the filer to take it +after all removes the marker from the issue body. Children filed with +`--parent` are not marked: they are the hive's own decomposition output, and +the next kick dispatches them normally. + ### `label` `--repo`, a number or URL, and at least one `--label` or `--remove-label` are diff --git a/src/pkg/github/agent_start_hook.go b/src/pkg/github/agent_start_hook.go index 5d0014af1a..4935e689eb 100644 --- a/src/pkg/github/agent_start_hook.go +++ b/src/pkg/github/agent_start_hook.go @@ -43,6 +43,12 @@ const ( // branch or pull request the work lives on (`` / `pr=`): PR evidence, like a PR request. AgentStartSignalBranch = "branch" + // AgentStartSignalFiledClaim is an "issue" request with Claim set + // (hivecommons/hive#17299): the agent filed the issue as its own next + // step and claimed it in the same request. No kick ever listed the new + // issue to the agent, so a consumer that only claims on a listed issue + // treats this signal as the listing too; otherwise it is a claim. + AgentStartSignalFiledClaim = "filed_claim" ) // StartSignalIsPREvidence reports whether signal says a pull request is diff --git a/src/pkg/github/agent_start_hook_test.go b/src/pkg/github/agent_start_hook_test.go index d4f974b216..763718f9c9 100644 --- a/src/pkg/github/agent_start_hook_test.go +++ b/src/pkg/github/agent_start_hook_test.go @@ -256,12 +256,13 @@ func TestAgentStartHook_DeferralCommentRecordsNoStart(t *testing.T) { // branch / PR is PR evidence; a bare claim or start comment is not. func TestStartSignalIsPREvidence(t *testing.T) { cases := map[string]bool{ - AgentStartSignalPRRequest: true, - AgentStartSignalBranch: true, - AgentStartSignalClaim: false, - AgentStartSignalComment: false, - AgentStartSignalLabel: false, - "": false, + AgentStartSignalPRRequest: true, + AgentStartSignalBranch: true, + AgentStartSignalClaim: false, + AgentStartSignalFiledClaim: false, + AgentStartSignalComment: false, + AgentStartSignalLabel: false, + "": false, } for signal, want := range cases { if got := StartSignalIsPREvidence(signal); got != want { diff --git a/src/pkg/github/issue_blocked.go b/src/pkg/github/issue_blocked.go index bc71eaa630..68e2237b39 100644 --- a/src/pkg/github/issue_blocked.go +++ b/src/pkg/github/issue_blocked.go @@ -583,7 +583,7 @@ func stripBlockedHelpWanted(ctx context.Context, client *Client, t blockedIssueT if !issueHasLabel(t.labels, helpWantedLabel) { return } - if err := client.RemoveLabel(ctx, t.repo, t.number, helpWantedLabel); err != nil { + if err := stripHelpWanted(ctx, client, t.repo, t.number); err != nil { res.Errors++ logger.Warn("blocked sweep: help wanted not stripped", "repo", t.repo, "issue", t.number, "error", err) return @@ -591,6 +591,15 @@ func stripBlockedHelpWanted(ctx context.Context, client *Client, t blockedIssueT res.Stripped++ } +// stripHelpWanted takes `help wanted` off an issue the hive is not asking +// outside help for: one parked `blocked` (by the sweep or a --blocked-on-pr +// comment), or one its filer claimed as its own next step +// (hivecommons/hive#17299). Callers gate the write; this is the one shared +// removal so the writeback ratchet sees a single call site. +func stripHelpWanted(ctx context.Context, client *Client, repo string, number int) error { + return client.RemoveLabel(ctx, repo, number, helpWantedLabel) +} + // liftBlockedMarkerless lifts `blocked` from an issue with no blocked-on // marker, no recheck-after deadline and no ops-tracking marker when the // label's most recent application was by this hive (hivecommons/hive#13364): diff --git a/src/pkg/github/issue_claim_gate.go b/src/pkg/github/issue_claim_gate.go index 21f083f8b6..46f36efc32 100644 --- a/src/pkg/github/issue_claim_gate.go +++ b/src/pkg/github/issue_claim_gate.go @@ -3,6 +3,7 @@ package github import ( "context" "fmt" + "regexp" "strings" "sync/atomic" @@ -31,6 +32,68 @@ const ( ClaimBlockReasonParkedPrefix = "parked: " ) +// ClaimBlockReasonFiledForHelpPrefix is the IssueStartBlockReason for an +// issue the requesting agent itself filed WITHOUT --claim +// (hivecommons/hive#17299): filing it unclaimed asked for outside help, so +// the filer does not start it later and race a contributor who took it up. +// The reason ends with the filing agent's name. +const ClaimBlockReasonFiledForHelpPrefix = "filed for outside help by " + +const filedForHelpMarkerPrefix = "" +} + +// filedForHelpAgentPattern is the agent-name alphabet the marker can carry. +const filedForHelpAgentPattern = `[A-Za-z0-9_.-]+` + +var ( + filedForHelpMarkerRe = regexp.MustCompile(``) + filedForHelpAgentRe = regexp.MustCompile(`^` + filedForHelpAgentPattern + `$`) + filedForHelpBlankRe = regexp.MustCompile(`\n{3,}`) +) + +// ParseFiledForHelpMarker returns the agent named by body's filed-for-help +// marker, or "" when it has none. +func ParseFiledForHelpMarker(body string) string { + m := filedForHelpMarkerRe.FindStringSubmatch(body) + if m == nil { + return "" + } + return m[1] +} + +// stripFiledForHelpMarker drops any filed-for-help marker from body. The +// marker is read only from an issue's own body (ParseFiledForHelpMarker), so +// a finding folded into another issue as a comment carries none: there it +// would be noise that binds nobody. +func stripFiledForHelpMarker(body string) string { + if filedForHelpMarkerRe.MatchString(body) { + body = filedForHelpMarkerRe.ReplaceAllString(body, "") + body = filedForHelpBlankRe.ReplaceAllString(body, "\n\n") + } + return strings.TrimRight(body, "\n") +} + +// withFiledForHelpMarker appends the filed-for-help marker for agent to +// body. Any marker already in body is dropped first: the body is the +// filer's own text, so a pre-seeded marker naming someone else would +// otherwise let the filer dodge the binding its unclaimed create makes. +func withFiledForHelpMarker(body, agent string) string { + agent = strings.TrimSpace(agent) + if agent == "" || !filedForHelpAgentRe.MatchString(agent) { + return body + } + body = stripFiledForHelpMarker(body) + if body == "" { + return FiledForHelpMarker(agent) + } + return body + "\n\n" + FiledForHelpMarker(agent) +} + // umbrellaLabels is the never-claim set the pure derivation (IssueStageFor) // reads, kept in step with the client by SetNeverClaimLabels. nil → the // package default. @@ -140,6 +203,9 @@ type issueClaimGateResult struct { reason string labels []string closed bool + // filedForHelpBy is the agent named by the issue body's filed-for-help + // marker, "" when there is none. + filedForHelpBy string } // issueClaimGate reads the issue once and applies every label-based refusal. @@ -156,8 +222,9 @@ func (c *Client) issueClaimGate(ctx context.Context, repo string, number int) (i return issueClaimGateResult{reason: ClaimBlockReasonPullRequest}, nil } res := issueClaimGateResult{ - labels: extractLabels(issue.Labels), - closed: strings.EqualFold(issue.GetState(), "closed"), + labels: extractLabels(issue.Labels), + closed: strings.EqualFold(issue.GetState(), "closed"), + filedForHelpBy: ParseFiledForHelpMarker(issue.GetBody()), } labels := res.labels switch { @@ -190,10 +257,27 @@ func (c *Client) issueClaimGate(ctx context.Context, repo string, number int) (i // very PR it exists to protect. Off with scanner.skip_issues_with_open_pr: // false; a failed listing fails open with a warning. func (c *Client) IssueDispatchBlockReason(ctx context.Context, repo string, number int) (string, error) { + return c.issueDispatchBlockReason(ctx, repo, number, "") +} + +// IssueStartBlockReason is IssueDispatchBlockReason for a named agent's own +// start (the `claim` relay request, the hub's dispatch of a KindAgent claim): +// it also refuses an issue that same agent +// filed for outside help (ClaimBlockReasonFiledForHelpPrefix, +// hivecommons/hive#17299). A maintainer lets the filer take it after all by +// removing the marker from the issue body. +func (c *Client) IssueStartBlockReason(ctx context.Context, repo string, number int, agent string) (string, error) { + return c.issueDispatchBlockReason(ctx, repo, number, agent) +} + +func (c *Client) issueDispatchBlockReason(ctx context.Context, repo string, number int, agent string) (string, error) { gate, err := c.issueClaimGate(ctx, repo, number) if err != nil || gate.reason != "" { return gate.reason, err } + if agent = strings.TrimSpace(agent); agent != "" && strings.EqualFold(gate.filedForHelpBy, agent) { + return ClaimBlockReasonFiledForHelpPrefix + gate.filedForHelpBy + "; it was filed without --claim, so it is open for others — leave it to them unless a maintainer removes the filed-for-help marker", nil + } // The same read says whether the issue is still open: a closing keyword // on a PR that merged since the snapshot was listed closes it, and a // closed issue is not work to start (hivecommons/hive#14814). diff --git a/src/pkg/github/issue_request_create_claim_test.go b/src/pkg/github/issue_request_create_claim_test.go new file mode 100644 index 0000000000..7c023b4a61 --- /dev/null +++ b/src/pkg/github/issue_request_create_claim_test.go @@ -0,0 +1,331 @@ +package github + +import ( + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/http/httptest" + "os" + "strings" + "sync" + "testing" +) + +// createClaimFake mocks the create, claim-gate read, ownership label add and +// help-wanted removal an "issue" request with Claim set performs +// (hivecommons/hive#17299). +type createClaimFake struct { + mu sync.Mutex + created int + createdBody string + issueBody string // body GET /issues/99 returns + labelAdds []string + helpRemoved int + failLabelAdds bool +} + +func (f *createClaimFake) server(t *testing.T) *httptest.Server { + t.Helper() + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + f.mu.Lock() + defer f.mu.Unlock() + w.Header().Set("Content-Type", "application/json") + switch { + case r.Method == http.MethodGet && r.URL.Path == "/repos/o/r/issues": + _, _ = io.WriteString(w, `[]`) + case r.Method == http.MethodPost && r.URL.Path == "/repos/o/r/issues": + f.created++ + var in struct { + Body string `json:"body"` + } + _ = json.NewDecoder(r.Body).Decode(&in) + f.createdBody = in.Body + _, _ = io.WriteString(w, `{"id":990099,"number":99,"html_url":"https://github.example/o/r/issues/99"}`) + case r.Method == http.MethodGet && r.URL.Path == "/repos/o/r/issues/99": + b, _ := json.Marshal(map[string]any{ + "number": 99, "state": "open", "body": f.issueBody, + "labels": []map[string]string{{"name": "help wanted"}}, + }) + _, _ = w.Write(b) + case r.Method == http.MethodPost && r.URL.Path == "/repos/o/r/issues/99/labels": + if f.failLabelAdds { + w.WriteHeader(http.StatusUnprocessableEntity) + _, _ = io.WriteString(w, `{"message":"label add refused"}`) + return + } + var added []string + _ = json.NewDecoder(r.Body).Decode(&added) + f.labelAdds = append(f.labelAdds, added...) + _, _ = io.WriteString(w, `[]`) + case r.Method == http.MethodDelete && strings.HasPrefix(r.URL.Path, "/repos/o/r/issues/99/labels/help"): + f.helpRemoved++ + _, _ = io.WriteString(w, `[]`) + case strings.Contains(r.URL.Path, "/labels"): + _, _ = io.WriteString(w, `{"name":"x"}`) + case r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, "/comments"): + _, _ = io.WriteString(w, `{"id":1}`) + default: + w.WriteHeader(http.StatusNotFound) + } + })) +} + +func readIssueResult(t *testing.T, reqPath string) IssueResponse { + t.Helper() + data, err := os.ReadFile(strings.TrimSuffix(reqPath, ".json") + ".result.json") + if err != nil { + t.Fatalf("reading result file: %v", err) + } + var resp IssueResponse + if err := json.Unmarshal(data, &resp); err != nil { + t.Fatalf("unmarshaling result: %v", err) + } + return resp +} + +// An "issue" request with Claim set files and claims the issue in one +// request: ownership label applied, help wanted removed, no filed-for-help +// marker, and the result says so. +func TestIssueRequestWatcher_CreateWithClaimClaimsInSameRequest(t *testing.T) { + f := &createClaimFake{} + srv := f.server(t) + defer srv.Close() + c := issueTestClient(t, srv.URL) + dir := withIssueDir(t) + var starts []string + c.SetAgentStartHook(func(agent, repo string, number int, signal string) { + starts = append(starts, fmt.Sprintf("%s %s#%d %s", agent, repo, number, signal)) + }) + + reqPath, err := WriteIssueRequest(dir, IssueRequest{ + Repo: "o/r", Title: "[scanner] stage 2 of my epic", Body: "next step", Agent: "scanner", Claim: true, + }) + if err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if f.created != 1 { + t.Fatalf("expected 1 issue created, got %d", f.created) + } + // The hub's ledger claim is written from this signal; it is the + // filed-claim signal, not a plain `claim`, because no kick listed the + // new issue and the hub only ledgers a plain claim on a listed issue. + if want := []string{"scanner o/r#99 " + AgentStartSignalFiledClaim}; strings.Join(starts, ";") != strings.Join(want, ";") { + t.Fatalf("agent start signals = %v, want %v", starts, want) + } + if strings.Join(f.labelAdds, ",") != claimOwnershipLabel("scanner") { + t.Fatalf("label adds on #99 = %v, want only %q", f.labelAdds, claimOwnershipLabel("scanner")) + } + if f.helpRemoved != 1 { + t.Fatalf("help wanted removals = %d, want 1", f.helpRemoved) + } + if strings.Contains(f.createdBody, "hive:filed-for-help") { + t.Fatalf("a claimed create must not carry the filed-for-help marker: %q", f.createdBody) + } + resp := readIssueResult(t, reqPath) + if !resp.OK || resp.Number != 99 || !resp.Claimed || resp.ClaimError != "" { + t.Fatalf("expected OK claimed result for #99, got %+v", resp) + } + if _, err := os.Stat(reqPath); !os.IsNotExist(err) { + t.Errorf("request file should be removed after success") + } +} + +// A claim that fails after the create is reported in claim_error; the create +// stands and is not retried (a retry would not re-run the claim anyway). +func TestIssueRequestWatcher_CreateWithClaimReportsClaimFailure(t *testing.T) { + f := &createClaimFake{failLabelAdds: true} + srv := f.server(t) + defer srv.Close() + c := issueTestClient(t, srv.URL) + dir := withIssueDir(t) + + reqPath, err := WriteIssueRequest(dir, IssueRequest{ + Repo: "o/r", Title: "[scanner] claim fails", Body: "next step", Agent: "scanner", Claim: true, + }) + if err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if f.created != 1 { + t.Fatalf("expected 1 issue created, got %d", f.created) + } + resp := readIssueResult(t, reqPath) + if !resp.OK || resp.Number != 99 || resp.Claimed { + t.Fatalf("expected OK, unclaimed result for #99, got %+v", resp) + } + if !strings.Contains(resp.ClaimError, "not claimed") { + t.Fatalf("claim failure must be reported in claim_error, got %q", resp.ClaimError) + } + if f.helpRemoved != 0 { + t.Fatalf("help wanted must stay when the claim failed, removals = %d", f.helpRemoved) + } + if _, err := os.Stat(reqPath); !os.IsNotExist(err) { + t.Errorf("request file should be consumed, not retried, once the issue exists") + } +} + +// Without Claim, the created issue is marked as filed for outside help by +// the filing agent, and nothing is claimed. +func TestIssueRequestWatcher_CreateWithoutClaimMarksFiledForHelp(t *testing.T) { + f := &createClaimFake{} + srv := f.server(t) + defer srv.Close() + c := issueTestClient(t, srv.URL) + dir := withIssueDir(t) + + reqPath, err := WriteIssueRequest(dir, IssueRequest{ + Repo: "o/r", Title: "[scanner] outside help", Body: "someone take this", Agent: "scanner", + }) + if err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if got := ParseFiledForHelpMarker(f.createdBody); got != "scanner" { + t.Fatalf("filed-for-help marker agent = %q, want scanner (body %q)", got, f.createdBody) + } + if len(f.labelAdds) != 0 || f.helpRemoved != 0 { + t.Fatalf("an unclaimed create must not claim: adds=%v removals=%d", f.labelAdds, f.helpRemoved) + } + resp := readIssueResult(t, reqPath) + if !resp.OK || resp.Claimed || resp.ClaimError != "" { + t.Fatalf("expected OK result with no claim fields, got %+v", resp) + } +} + +// A decomposition child (--parent) is the hive's own backlog: no marker. +func TestIssueRequestWatcher_CreateWithParentIsNotMarkedFiledForHelp(t *testing.T) { + f := &createClaimFake{} + srv := f.server(t) + defer srv.Close() + c := issueTestClient(t, srv.URL) + dir := withIssueDir(t) + + if _, err := WriteIssueRequest(dir, IssueRequest{ + Repo: "o/r", Title: "[scanner] child step", Body: "Part of #5", Agent: "scanner", Parent: 5, + }); err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if f.createdBody == "" { + t.Fatal("expected the child issue to be created") + } + if got := ParseFiledForHelpMarker(f.createdBody); got != "" { + t.Fatalf("a --parent child must not carry the filed-for-help marker, got %q (body %q)", got, f.createdBody) + } +} + +// A later claim by the agent that filed the issue for outside help is +// refused; another agent may still claim it. +func TestIssueRequestWatcher_ClaimRefusedForOwnFiledForHelpIssue(t *testing.T) { + f := &createClaimFake{issueBody: "someone take this\n\n" + FiledForHelpMarker("scanner")} + srv := f.server(t) + defer srv.Close() + c := issueTestClient(t, srv.URL) + dir := withIssueDir(t) + + reqPath, err := WriteIssueRequest(dir, IssueRequest{Kind: "claim", Repo: "o/r", Number: 99, Agent: "scanner"}) + if err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if len(f.labelAdds) != 0 { + t.Fatalf("filer's claim of its own filed-for-help issue wrote labels: %v", f.labelAdds) + } + if _, err := os.Stat(reqPath + ".denied"); err != nil { + t.Fatalf("filer's claim should be denied: %v", err) + } + resp := readIssueResult(t, reqPath) + if !strings.Contains(resp.Error, ClaimBlockReasonFiledForHelpPrefix+"scanner") { + t.Fatalf("denial should name the filed-for-help reason, got %q", resp.Error) + } + + otherPath, err := WriteIssueRequest(dir, IssueRequest{Kind: "claim", Repo: "o/r", Number: 99, Agent: "quality"}) + if err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + if strings.Join(f.labelAdds, ",") != claimOwnershipLabel("quality") { + t.Fatalf("another agent's claim label adds = %v, want %q", f.labelAdds, claimOwnershipLabel("quality")) + } + if _, err := os.Stat(otherPath); !os.IsNotExist(err) { + t.Errorf("another agent's claim should be consumed on success") + } +} + +func TestFiledForHelpMarkerRoundTrip(t *testing.T) { + body := withFiledForHelpMarker("text\n", "scanner") + if body != "text\n\n"+FiledForHelpMarker("scanner") { + t.Fatalf("withFiledForHelpMarker = %q", body) + } + if got := ParseFiledForHelpMarker(body); got != "scanner" { + t.Fatalf("ParseFiledForHelpMarker = %q, want scanner", got) + } + if again := withFiledForHelpMarker(body, "scanner"); again != body { + t.Fatalf("marker added twice: %q", again) + } + if got := withFiledForHelpMarker("text", "bad agent!"); got != "text" { + t.Fatalf("an agent name the marker cannot carry must leave the body alone, got %q", got) + } + // A marker the filer seeded in its own body names someone else: it is + // dropped, so the filer is still the one bound by the create. + seeded := "text\n\n" + FiledForHelpMarker("other") + "\nmore" + if got := withFiledForHelpMarker(seeded, "scanner"); ParseFiledForHelpMarker(got) != "scanner" || strings.Contains(got, "other") { + t.Fatalf("a foreign marker must be replaced by the filer's own, got %q", got) + } +} + +// An unclaimed create whose body already carries a filed-for-help marker +// naming another agent is still recorded as filed by the requesting agent: +// the body is filer-controlled and must not pick who the binding names. +func TestIssueRequestWatcher_CreateWithoutClaimReplacesForeignMarker(t *testing.T) { + f := &createClaimFake{} + srv := f.server(t) + defer srv.Close() + c := issueTestClient(t, srv.URL) + dir := withIssueDir(t) + + if _, err := WriteIssueRequest(dir, IssueRequest{ + Repo: "o/r", Title: "[scanner] someone take this", Agent: "scanner", + Body: "please\n\n" + FiledForHelpMarker("other"), + }); err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if f.created != 1 { + t.Fatalf("expected 1 issue created, got %d", f.created) + } + if got := ParseFiledForHelpMarker(f.createdBody); got != "scanner" { + t.Fatalf("filed-for-help marker names %q, want scanner: %q", got, f.createdBody) + } + if strings.Count(f.createdBody, filedForHelpMarkerPrefix) != 1 || strings.Contains(f.createdBody, "filed-for-help other") { + t.Fatalf("the seeded marker must be gone and exactly one marker remain: %q", f.createdBody) + } +} + +// A finding folded into another issue is posted as a comment there; the +// filed-for-help marker is read only from an issue's own body, so the fold +// comments carry none of it and leave no stray blank lines where it was. +func TestFoldedFindingCommentsDropFiledForHelpMarker(t *testing.T) { + body := "finding text\n\n" + FiledForHelpMarker("scanner") + "\n\n— hive: agent=scanner" + for name, comment := range map[string]string{ + "subject": subjectMatchFindingComment("t", body), + "file_set": consolidatedFindingComment("t", body, map[string]bool{"a.go": true}), + "component": foldedComponentFindingComment("t", body, "pkg", 2, 0), + } { + if ParseFiledForHelpMarker(comment) != "" { + t.Fatalf("%s fold comment carries the filed-for-help marker: %q", name, comment) + } + if !strings.HasSuffix(comment, "finding text\n\n— hive: agent=scanner") { + t.Fatalf("%s fold comment body not preserved around the dropped marker: %q", name, comment) + } + } +} diff --git a/src/pkg/github/issue_request_watcher.go b/src/pkg/github/issue_request_watcher.go index 71364ebb8e..87966bcbff 100644 --- a/src/pkg/github/issue_request_watcher.go +++ b/src/pkg/github/issue_request_watcher.go @@ -148,6 +148,13 @@ type IssueRequest struct { // label and removes `help wanted`. The blocked sweep lifts the label when // the PR merges or closes. BlockedOnPR int `json:"blocked_on_pr,omitempty"` // comment only + // Claim makes an "issue" request file AND claim the new issue for Agent + // in one request (hivecommons/hive#17299): right after the create the + // watcher performs the same claim a "claim" request does and takes + // `help wanted` off, so an agent's own next step is never open to + // others in between. Without it, the created issue carries a + // filed-for-help marker and a later claim of it by Agent is refused. + Claim bool `json:"claim,omitempty"` // issue only } // IssueResponse is written next to a consumed request as .result.json. @@ -204,6 +211,12 @@ type IssueResponse struct { // names each one that could not be, with the reason (#9839). BlockedByLinked []int `json:"blocked_by_linked,omitempty"` BlockedByErrors []string `json:"blocked_by_errors,omitempty"` + // Claimed reports that an "issue" request with Claim set also claimed + // the issue it created (#17299). ClaimError names why it did not; the + // issue is still created and the request is still OK, so the agent + // reads it here instead of assuming the claim landed. + Claimed bool `json:"claimed,omitempty"` + ClaimError string `json:"claim_error,omitempty"` } // IssueRequestAuthorizer mirrors PRRequestAuthorizer: it receives the claimed @@ -595,6 +608,12 @@ func (c *Client) handleOneIssueRequest(ctx context.Context, path string, nowFn f return } } + if kind == "issue" && !req.Claim && req.Parent == 0 { + // Filed unclaimed = filed for outside help (#17299): the filer's + // later claim is refused by IssueStartBlockReason. --parent children + // are the hive's own decomposition backlog, so they stay unmarked. + body = withFiledForHelpMarker(body, req.Agent) + } if c.attributionTrailerOn() { body = AppendTrailer(body, meta) } @@ -604,7 +623,7 @@ func (c *Client) handleOneIssueRequest(ctx context.Context, path string, nowFn f switch kind { case "claim": var reason string - reason, err = c.IssueDispatchBlockReason(ctx, req.Repo, req.Number) + reason, err = c.IssueStartBlockReason(ctx, req.Repo, req.Number, req.Agent) if err != nil { break // Retry a failed lookup; never claim on unknown labels. } @@ -623,20 +642,10 @@ func (c *Client) handleOneIssueRequest(ctx context.Context, path string, nowFn f verificationClaimCooldown.String()+" ago and nothing has changed since; do not re-verify it, and open a PR without a claim if you intend to fix it", nowFn) return } - // Apply a namespaced ownership label (App bots can't be assignees), - // journaled against a fresh read so a second claim on an issue whose - // earlier label lapsed is written, not replayed (hivecommons/hive#12512). - // The stage — stage/020-claimed when the in-progress mark is on; - // 030 needs PR evidence — is a fact for the stage engine (see - // issue_inprogress.go). - err = c.AddLabelsFresh(ctx, req.Repo, req.Number, claimOwnershipLabel(req.Agent)) - if err == nil { - err = c.submitInProgressFact(ctx, req.Repo, req.Number, req.Agent, nowFn()) - } + err = c.claimIssueForAgent(ctx, req.Repo, req.Number, req.Agent, nowFn) if err == nil { resp.OK = true resp.Number = req.Number - c.markInProgressStarted(ctx, req.Repo, req.Number, req.Agent, nowFn()) } case "comment": // A verification marker already on the issue means this comment was @@ -698,7 +707,7 @@ func (c *Client) handleOneIssueRequest(ctx context.Context, path string, nowFn f if err == nil && parkBlocked { err = c.AddLabels(ctx, req.Repo, req.Number, []string{BlockedLabel}) if err == nil { - err = c.RemoveLabel(ctx, req.Repo, req.Number, helpWantedLabel) + err = stripHelpWanted(ctx, c, req.Repo, req.Number) } } if err == nil { @@ -881,6 +890,9 @@ func (c *Client) handleOneIssueRequest(ctx context.Context, path string, nowFn f slog.String("repo", req.Repo), slog.Int("number", res.Number), slog.String("blocker", e)) } } + if req.Claim { + resp.Claimed, resp.ClaimError = c.claimCreatedIssue(ctx, req, fileUID, res, meta, nowFn) + } } } @@ -959,6 +971,79 @@ func (c *Client) handleOneIssueRequest(ctx context.Context, path string, nowFn f slog.String("agent", req.Agent)) } +// claimIssueForAgent is the write half of a claim, shared by the "claim" +// request and an "issue" request with Claim set. It applies a namespaced +// ownership label (App bots can't be assignees), journaled against a fresh +// read so a second claim on an issue whose earlier label lapsed is written, +// not replayed (hivecommons/hive#12512). The stage — stage/020-claimed when +// the in-progress mark is on; 030 needs PR evidence — is a fact for the +// stage engine (see issue_inprogress.go). +func (c *Client) claimIssueForAgent(ctx context.Context, repo string, number int, agent string, nowFn func() time.Time) error { + if err := c.AddLabelsFresh(ctx, repo, number, claimOwnershipLabel(agent)); err != nil { + return err + } + if err := c.submitInProgressFact(ctx, repo, number, agent, nowFn()); err != nil { + return err + } + c.markInProgressStarted(ctx, repo, number, agent, nowFn()) + return nil +} + +// claimCreatedIssue claims the issue an "issue" request with Claim set just +// created (hivecommons/hive#17299), under the same authorization, allowlist +// and start gate as a "claim" request, then takes `help wanted` off: an +// issue its filer is working is not open for outside help. The create has +// already happened, so a failure never fails or retries the request; it is +// returned as the result's claim_error. +func (c *Client) claimCreatedIssue(ctx context.Context, req IssueRequest, fileUID int, res CreateIssueResult, meta InvocationMeta, nowFn func() time.Time) (bool, string) { + fail := func(why string) (bool, string) { + c.logger.Warn("issue-request watcher: issue created but not claimed", + slog.String("repo", req.Repo), slog.Int("number", res.Number), + slog.String("agent", req.Agent), slog.String("reason", why)) + return false, "issue created but not claimed: " + why + } + if res.Consolidated { + return fail(fmt.Sprintf("the request was folded into existing issue #%d as a comment; claim that issue with `hive-open-issue claim` if it is yours to work", res.Number)) + } + if res.Number <= 0 { + return fail("the create returned no issue number") + } + if strings.TrimSpace(req.Agent) == "" { + return fail("the request names no agent") + } + if c.issueAuthz == nil { + return fail("no authorizer configured (fail closed)") + } + if err := c.issueAuthz(req.Agent, fileUID, "claim"); err != nil { + return fail(err.Error()) + } + if reason, refused := c.refuseWrite(req.Agent, WriteOpClaim, req.Repo, res.Number); refused { + return fail(reason) + } + reason, err := c.IssueStartBlockReason(ctx, req.Repo, res.Number, req.Agent) + if err != nil { + return fail(err.Error()) + } + if reason != "" { + return fail("issue claim refused: " + reason) + } + if err := c.claimIssueForAgent(ctx, req.Repo, res.Number, req.Agent, nowFn); err != nil { + return fail(err.Error()) + } + // The hub's ledger records the claim from this signal (SetAgentStartHook), + // not only the labels. It is not the plain `claim` signal: the hub only + // ledgers a start on an issue a kick listed to the agent, and nothing + // listed an issue the agent itself just filed, so this signal says + // "treat the filing as the listing". + c.notifyAgentStart(req.Agent, req.Repo, res.Number, AgentStartSignalFiledClaim) + if err := stripHelpWanted(ctx, c, req.Repo, res.Number); err != nil { + c.logger.Warn("issue-request watcher: claimed new issue but removing help wanted failed", + slog.String("repo", req.Repo), slog.Int("number", res.Number), slog.String("error", err.Error())) + } + c.recordWriteAudit(AuditActionIssueClaimed, meta, WriteTarget{Repo: req.Repo, Number: res.Number}, "url", res.URL) + return true, "" +} + type issueDecisionDowngrade struct { Active bool Question string @@ -2118,7 +2203,7 @@ func subjectMatchFindingComment(title, body string) string { b.WriteString("**Consolidated finding.** This was filed as a separate issue; it has the same subject as this one, so it was folded in here instead. Address it together with this issue.\n\n### ") b.WriteString(title) b.WriteString("\n\n") - b.WriteString(body) + b.WriteString(stripFiledForHelpMarker(body)) return b.String() } @@ -2138,7 +2223,7 @@ func consolidatedFindingComment(title, body string, files map[string]bool) strin b.WriteString("), so it was folded in here instead. Address it in the same PR as this issue — two PRs editing the same files would conflict.\n\n### ") b.WriteString(title) b.WriteString("\n\n") - b.WriteString(body) + b.WriteString(stripFiledForHelpMarker(body)) return b.String() } @@ -2167,7 +2252,7 @@ func foldedComponentFindingComment(title, body, path string, openSiblings, close b.WriteString("`, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.\n\n### ") b.WriteString(title) b.WriteString("\n\n") - b.WriteString(body) + b.WriteString(stripFiledForHelpMarker(body)) return b.String() } From 31f5c3801a1fbdbefdff3635f75a3b149e4d7c45 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 00:28:20 +0000 Subject: [PATCH 012/123] =?UTF-8?q?=F0=9F=90=9B=20pr-request:=20refuse=20F?= =?UTF-8?q?ixes/Closes=20targets=20claimed=20or=20covered=20by=20another?= =?UTF-8?q?=20author=20(#17303)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 pr-request: refuse Fixes/Closes targets claimed or covered by another author A PR request could close an issue a contributor had claimed and covered with their own open PR (#17243: #17250 superseded #17248). The watcher now checks each closing reference before booking a start: a live claim by another principal, or an open covering PR by an author outside the hive, rejects the request (gate claim) and posts one marker-deduplicated notice on the issue. A failed lookup fails closed. Closes #17298 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 pr-request: own-claim exemption checks claim kind and hive; scope claim notice to served repos Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 test: cover the closed-covering-PR release and the forge-assignee claim read Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 issue-request: run the claim-target gate on the start path before notifyAgentStart Review of #17303 (intent-alignment): #17298's acceptance criteria require the kick/start path to run the claim/coverage check before a start is booked, but only the PR-open leg was gated. A claim or a start-announcing relay comment on an issue another principal has claimed, or covered with an open PR, now goes through the same prRequestTargetBlock before any write and before notifyAgentStart: refused with a policy reason and the deduplicated notice, retried on a lookup error (fail closed). The retry path is extracted into failIssueRequest so both callers share it. Hive-Fix-Attempt: 1/6 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 pr-request: name the refused action in the claim-target notice The notice posted on a refused target issue hard-coded "asked to open a pull request ... No PR was opened", so a refused `hive-open-issue claim` or start comment described an event that never happened. Thread the action (open-pr / claim / start) into the notice body, assert the start-path wording in TestIssueRequestStart_RefusesContributorClaimedTarget, and document the new refusal reason in the hive-open-issue `claim` section. Hive-Fix-Attempt: 2/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 test: serve the comments list in the in-progress relay fixture With issue claims on, the start-path claim-target gate reads the forge marker from the issue's comments before applying the claim; the fixture 404'd that read, so the gate failed closed and TestIssueRequestWatcher_ClaimLeavesCommentToLedgerWhenClaimsOn lost its ownership label. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 pr-request: claim-target gate rejects a missing target and skips pull requests With issue claims on, a closing reference to a nonexistent issue 404ed in prRequestTargetClaim and came back as a plain error, so the request was failed and retried until the horizon quarantined it; before #17298 the same request was permanently rejected with the cross-repo hint. The 404 is now mapped to that policy error in validatePRRequestTargets. The start-comment gate also fetched PRs via Issues.Get and inferred a claim from assignees, refusing a hive start comment on a contributor- assigned PR. A target that is a pull request now passes the gate. Docs: name the dispatch-block gate explicitly where the inserted claim-target paragraph left 'the same gate' ambiguous. Hive-Fix-Attempt: 3/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../fixed-pr-request-claim-target-gate.md | 1 + src/docs/hive-open-issue.md | 18 +- src/docs/hive-open-pr.md | 20 + src/pkg/github/issue_inprogress_test.go | 4 + src/pkg/github/issue_request_watcher.go | 59 ++- src/pkg/github/pr_request_claims.go | 263 +++++++++++++ src/pkg/github/pr_request_claims_test.go | 351 ++++++++++++++++++ src/pkg/github/pr_request_watcher.go | 19 + 8 files changed, 716 insertions(+), 19 deletions(-) create mode 100644 changelog.d/fixed-pr-request-claim-target-gate.md diff --git a/changelog.d/fixed-pr-request-claim-target-gate.md b/changelog.d/fixed-pr-request-claim-target-gate.md new file mode 100644 index 0000000000..beba1e8cf2 --- /dev/null +++ b/changelog.d/fixed-pr-request-claim-target-gate.md @@ -0,0 +1 @@ +- hive-open-pr and the PR-request watcher now refuse a Fixes/Closes target that another principal has claimed or covered with an open PR, and post one deduplicated notice on the issue; the same gate denies a claim or start comment on such an issue before the start is booked (#17298). diff --git a/src/docs/hive-open-issue.md b/src/docs/hive-open-issue.md index 354ccd0a10..ab85172c17 100644 --- a/src/docs/hive-open-issue.md +++ b/src/docs/hive-open-issue.md @@ -264,11 +264,19 @@ issue labelled `needs-human` or held, on an issue parked on a person's decision (`stage/045-needs-decision`, `needs-spec`, the retired decision labels), and on an umbrella issue wearing a never-claim label (`governor.claims.never_claim_labels`, default `epic`, case-insensitive): -an epic is the list of work, not the work. The claim is also refused when the -claiming agent itself filed the issue without `--claim` (`filed for outside -help by `; see below). The same gate admits every automated claim -producer — the hub's own dispatch of an issue to an agent included — so a -start signal on such an issue records nothing. The +an epic is the list of work, not the work. The claim is also refused when +another principal already holds the issue — a live claim by a contributor or +another hive's agent — or when another author's open PR covers it: the same +claim-target gate that refuses a `hive-open-pr` closing reference +([hive-open-pr.md](hive-open-pr.md#closes-n-on-an-issue-someone-else-is-working-is-rejected)), +also applied to a relay comment that announces a start. The hive posts one +notice on the issue (marker ``) saying +what was asked, who holds it, and that the owner decides. The claim is also +refused when the claiming agent itself filed the issue without `--claim` +(`filed for outside help by `; see below). The dispatch-block gate +(`needs-human`, decision labels, never-claim labels) admits every automated +claim producer — the hub's own dispatch of an issue to an agent included — so +a start signal on such an issue records nothing. The `stage/030-pr-in-progress` label is swapped for `stage/040-covered-by-pr` when the agent's `hive-open-pr --issues` request opens the PR, and cleared when the claim is released or at enumeration once PR evidence exists or the marker diff --git a/src/docs/hive-open-pr.md b/src/docs/hive-open-pr.md index 86dd5a37c6..06c77fe7be 100644 --- a/src/docs/hive-open-pr.md +++ b/src/docs/hive-open-pr.md @@ -252,6 +252,26 @@ rewritten without the note. The hive log carries the same reason under `pr-request watcher: downgraded closing reference to Refs`, but that log has a retention window and the PR body does not. +### `Closes #N` on an issue someone else is working is rejected + +Before the request books a start on any issue, the watcher checks every issue +your title or body closes ([#17298](https://github.com/hivecommons/hive/issues/17298)). +The request is rejected (gate `claim`) when the issue has a live claim held by +anyone other than you — a contributor, a person, or another agent — or is +covered by an open PR from an author outside the hive. Your own claim and the +hive's own PR pass. This applies whether the work was dispatched from the issue +or arrived through an epic. The hive posts one notice on the issue (marker +``, edited in place on repeat refusals) +saying who holds it; the owner decides whether to proceed. If the claim or the +covering PR cannot be read, the request is not opened and is retried later. + +The same check runs on the start path: a `hive-open-issue claim`, or a relay +comment that announces a start on an issue, is denied with the same reason +before anything is written and before the start is booked; the notice on the +issue then says a claim or a start was asked for, not a PR, so +epic-driven work that never claimed its target is caught when it starts, not +only when it opens the PR. + ### Base drift: a branch cut from the wrong line is rejected A head more than **100 commits behind its base** is rejected permanently diff --git a/src/pkg/github/issue_inprogress_test.go b/src/pkg/github/issue_inprogress_test.go index 66531dde92..7758db1338 100644 --- a/src/pkg/github/issue_inprogress_test.go +++ b/src/pkg/github/issue_inprogress_test.go @@ -54,6 +54,10 @@ func newInProgressRelayServer(t *testing.T) *inProgressRelayServer { _, _ = io.WriteString(w, `{"number":43,"labels":[{"name":"stage/030-pr-in-progress"},{"name":"hive/in-progress"},{"name":"bug"}],"updated_at":"2026-10-14T14:00:00Z"}`) case r.Method == http.MethodGet && strings.HasPrefix(r.URL.Path, "/repos/o/r/labels/"): _, _ = io.WriteString(w, `{"name":"x"}`) + case r.Method == http.MethodGet && strings.HasSuffix(r.URL.Path, "/comments"): + // The claim-target gate (#17298) reads the forge marker when + // issue claims are on; an unclaimed issue has no comments. + _, _ = io.WriteString(w, `[]`) case r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, "/labels"): var body []string _ = json.NewDecoder(r.Body).Decode(&body) diff --git a/src/pkg/github/issue_request_watcher.go b/src/pkg/github/issue_request_watcher.go index 87966bcbff..0d736649d3 100644 --- a/src/pkg/github/issue_request_watcher.go +++ b/src/pkg/github/issue_request_watcher.go @@ -619,6 +619,29 @@ func (c *Client) handleOneIssueRequest(ctx context.Context, path string, nowFn f } resp := IssueResponse{At: nowFn().UTC().Format(time.RFC3339)} + // #17298: a request that starts work on an issue (a claim, or a comment + // announcing a start — the kick path for epic-driven work) is checked + // against the same claim-target gate as hive-open-pr before any write, + // and before notifyAgentStart books the start. An issue another principal + // has claimed, or covered with an open PR, is refused with a policy + // reason; a target that is a pull request is never refused (a start + // comment on a PR starts no issue); a failed lookup fails closed and is + // retried. + startSignal := issueRequestStartSignal(kind, req.Body) + if startSignal != "" { + refusal, blocked, gateErr := c.issueRequestStartTargetBlock(ctx, req, nowFn()) + if gateErr != nil { + resp.OK = false + resp.Error = gateErr.Error() + c.failIssueRequest(path, req, kind, resp, gateErr, nowFn) + return + } + if blocked { + c.noticePRRequestTargetRefusal(ctx, issueRequestStartTargetAction(kind), refusal) + c.denyIssueRequest(path, req, issueRequestStartRefusedReason(kind, refusal), nowFn) + return + } + } closedPR := false switch kind { case "claim": @@ -899,23 +922,12 @@ func (c *Client) handleOneIssueRequest(ctx context.Context, path string, nowFn f if err != nil { resp.OK = false resp.Error = err.Error() - if issueRequestFailureIsPermanent(err) { - c.quarantineFailedIssueRequest(path, req, kind, "permanent failure", resp, nowFn) - return - } - c.writeIssueResult(path, resp) - if why := c.issueNoteFailure(path, kind, nowFn, err); why != "" { - c.quarantineFailedIssueRequest(path, req, kind, why, resp, nowFn) - return - } - c.logger.Warn("issue-request watcher: request failed, will retry with backoff", - slog.String("repo", req.Repo), slog.String("kind", kind), slog.String("error", err.Error())) - c.observeIssueRequestStuck(path, req.Repo, kind, err, nowFn()) + c.failIssueRequest(path, req, kind, resp, err, nowFn) return } - if signal := issueRequestStartSignal(kind, req.Body); signal != "" { - c.notifyAgentStart(req.Agent, req.Repo, req.Number, signal) + if startSignal != "" { + c.notifyAgentStart(req.Agent, req.Repo, req.Number, startSignal) } action := AuditActionAgentIssueCreated @@ -1257,6 +1269,25 @@ func issueBodyHasMisEscapedNewlines(body string) bool { return issueshape.BodyHasMisEscapedNewlines(body) } +// failIssueRequest is the retry path for a request whose GitHub call or +// lookup failed: a permanent failure is quarantined, anything else writes +// the result and leaves the file for the next tick with backoff until the +// stuck budget runs out. +func (c *Client) failIssueRequest(path string, req IssueRequest, kind string, resp IssueResponse, err error, nowFn func() time.Time) { + if issueRequestFailureIsPermanent(err) { + c.quarantineFailedIssueRequest(path, req, kind, "permanent failure", resp, nowFn) + return + } + c.writeIssueResult(path, resp) + if why := c.issueNoteFailure(path, kind, nowFn, err); why != "" { + c.quarantineFailedIssueRequest(path, req, kind, why, resp, nowFn) + return + } + c.logger.Warn("issue-request watcher: request failed, will retry with backoff", + slog.String("repo", req.Repo), slog.String("kind", kind), slog.String("error", err.Error())) + c.observeIssueRequestStuck(path, req.Repo, kind, err, nowFn()) +} + func (c *Client) denyIssueRequest(path string, req IssueRequest, reason string, nowFn func() time.Time) { c.writeIssueResult(path, IssueResponse{OK: false, Error: "authorization denied: " + reason, At: nowFn().UTC().Format(time.RFC3339)}) _ = os.Rename(path, path+".denied") diff --git a/src/pkg/github/pr_request_claims.go b/src/pkg/github/pr_request_claims.go index 8604c327ef..2cc0d7a111 100644 --- a/src/pkg/github/pr_request_claims.go +++ b/src/pkg/github/pr_request_claims.go @@ -10,8 +10,11 @@ import ( "regexp" "strconv" "strings" + "time" gh "github.com/google/go-github/v72/github" + + "github.com/hivecommons/hive/pkg/issueclaim" ) // prRequestPolicyError is a permanent mismatch between a PR's claim and its @@ -542,3 +545,263 @@ func isMigrationFile(filename string) bool { } return false } + +// prRequestClaimTargetMarker tags the notice the claim-target gate posts on +// an issue it refused a PR request for, so a retried or repeated request +// edits the one notice instead of stacking another. +const prRequestClaimTargetMarker = "" + +// prRequestTargetRefusal is one closing reference the claim-target gate +// refused: the issue, and who holds it — a live claim (Holder) or an open +// pull request by another author that covers it (CoveringPR). +type prRequestTargetRefusal struct { + Repo string + Issue int + Holder string + CoveringPR string +} + +func (r prRequestTargetRefusal) why() string { + if r.Holder != "" { + return "already claimed by " + r.Holder + } + return "covered by " + r.CoveringPR +} + +// validatePRRequestTargets is the claim-target gate (hivecommons/hive#17298): +// a PR request may not close an issue another principal is working. For each +// closing reference it refuses the issue when a live claim is held by anyone +// other than the requesting agent (contributor, person or another agent), or +// when an open pull request by an author outside this hive covers it. The +// requesting agent's own claim and the hive's own covering PR pass. It runs +// before the request books a start on any issue (notifyAgentStart), so +// epic-driven work that never claimed the target is checked too — the case +// that let #17250 supersede a contributor's #17248 on #17243. +// +// A refusal is returned as a prRequestPolicyError alongside the refused +// targets, as is a closing reference whose issue does not exist (permanent, +// so never retried); any other claim or coverage lookup failure returns a +// plain error, so the request is not opened (fail closed) and is retried +// later. +func (c *Client) validatePRRequestTargets(ctx context.Context, req PRRequest, now time.Time) ([]prRequestTargetRefusal, error) { + if c == nil || c.client == nil { + return nil, ErrNoGitHubClient + } + owner, repo := c.prRequestRepo(req.Repo) + defaultRepo := owner + "/" + repo + var refused []prRequestTargetRefusal + seen := make(map[string]bool) + for _, ref := range ParseClaimedIssues(req.Title+"\n"+req.Body, defaultRepo) { + refOwner, refRepo := c.prRequestRepo(ref.Repo) + key := claimKey(strings.ToLower(refOwner+"/"+refRepo), ref.Issue) + if seen[key] { + continue + } + seen[key] = true + refusal, blocked, err := c.prRequestTargetBlock(ctx, req.Agent, refOwner, refRepo, ref.Issue, now) + if err != nil { + // A missing target is permanent (typically a cross-repo number + // written bare): reject it the way validatePRRequestClaims does + // rather than retrying until the horizon quarantines the request. + if errors.Is(err, errPRRequestTargetMissing) { + return nil, &prRequestPolicyError{reason: fmt.Sprintf( + "closing reference %s#%d does not exist; a cross-repo issue must be written as owner/repo#N", + refOwner+"/"+refRepo, ref.Issue)} + } + return nil, fmt.Errorf("checking claims on closing reference %s/%s#%d: %w", refOwner, refRepo, ref.Issue, err) + } + if blocked { + refused = append(refused, refusal) + } + } + if len(refused) == 0 { + return nil, nil + } + parts := make([]string, 0, len(refused)) + for _, r := range refused { + parts = append(parts, fmt.Sprintf("%s#%d is %s", r.Repo, r.Issue, r.why())) + } + return refused, &prRequestPolicyError{reason: strings.Join(parts, "; ") + + " — another principal is working it, so this PR may not close it; the owner decides whether to proceed. " + + "Pick other work, or reference the issue without a closing keyword"} +} + +// issueRequestStartTargetBlock is the claim-target gate on the kick/start +// path (hivecommons/hive#17298): an issue request that starts work on +// req.Number — a claim, or a comment announcing a start — is checked the +// way a closing reference in hive-open-pr is, so epic-driven work that +// never claims its target is refused before the start is booked. +func (c *Client) issueRequestStartTargetBlock(ctx context.Context, req IssueRequest, now time.Time) (prRequestTargetRefusal, bool, error) { + if c == nil || c.client == nil { + return prRequestTargetRefusal{}, false, ErrNoGitHubClient + } + owner, repo := c.prRequestRepo(req.Repo) + refusal, blocked, err := c.prRequestTargetBlock(ctx, req.Agent, owner, repo, req.Number, now) + if err != nil { + return refusal, false, fmt.Errorf("checking claims on start target %s/%s#%d: %w", owner, repo, req.Number, err) + } + return refusal, blocked, nil +} + +// issueRequestStartRefusedReason is the policy reason written to a start +// request the claim-target gate refused. +func issueRequestStartRefusedReason(kind string, r prRequestTargetRefusal) string { + verb := "start refused" + if kind == "claim" { + verb = "issue claim refused" + } + return fmt.Sprintf("%s: %s#%d is %s — another principal is working it; the owner decides whether to proceed. Pick other work", + verb, r.Repo, r.Issue, r.why()) +} + +// prRequestTargetBlock resolves one target issue: its live claim (the +// forge marker or assignee when issue claims are on, else the hub's claim +// ledger) and the duplicate-PR ledger's covering PR, re-read so a PR that +// has since closed or merged no longer blocks. A target that is really a +// pull request is never blocked: a start comment on a PR (a hive relay +// note on a contributor's PR, say) does not start work on an issue. +func (c *Client) prRequestTargetBlock(ctx context.Context, agent, owner, repo string, number int, now time.Time) (prRequestTargetRefusal, bool, error) { + refusal := prRequestTargetRefusal{Repo: owner + "/" + repo, Issue: number} + claim, found, err := c.prRequestTargetClaim(ctx, owner, repo, number, now) + if errors.Is(err, errPRRequestTargetIsPullRequest) { + return refusal, false, nil + } + if err != nil { + return refusal, false, err + } + if found && !c.isOwnTargetClaim(claim, agent) { + refusal.Holder = claim.Identity + return refusal, true, nil + } + issueRef := c.IssueStageRef(owner+"/"+repo, number) + cover, ok := c.ledgerClaim(issueRef) + if !ok || !cover.CoversOpenIssue() || !cover.ExternalAuthor { + return refusal, false, nil + } + pr, ok := c.claimPRRef(cover, issueRef) + if !ok { + return refusal, false, nil + } + live, _, err := c.client.PullRequests.Get(ctx, pr.Owner, pr.Repo, pr.Number) + if err != nil { + return refusal, false, fmt.Errorf("covering PR %s: %w", pr, err) + } + if strings.EqualFold(live.GetState(), "closed") || live.GetMerged() || !live.GetMergedAt().IsZero() { + return refusal, false, nil + } + refusal.CoveringPR = fmt.Sprintf("#%d", pr.Number) + if !strings.EqualFold(pr.Owner+"/"+pr.Repo, owner+"/"+repo) { + refusal.CoveringPR = fmt.Sprintf("%s/%s#%d", pr.Owner, pr.Repo, pr.Number) + } + if author := live.GetUser().GetLogin(); author != "" { + refusal.CoveringPR += " (@" + author + ")" + } + return refusal, true, nil +} + +// isOwnTargetClaim reports whether claim is the requesting agent's own. A +// bare agent name is only meaningful for kind=agent (or a legacy marker +// without kind): a contributor's login can equal an agent name, and a +// same-named agent in another hive is not this hive's agent. +func (c *Client) isOwnTargetClaim(claim issueclaim.Claim, agent string) bool { + if claim.Kind != "" && !strings.EqualFold(claim.Kind, "agent") { + return false + } + if !strings.EqualFold(strings.TrimSpace(claim.Identity), strings.TrimSpace(agent)) { + return false + } + if c.issueClaimLedgerHive != nil { + if hive := c.issueClaimLedgerHive(); hive != "" && claim.Hive != "" && claim.Hive != hive { + return false + } + } + return true +} + +// errPRRequestTargetMissing wraps the 404 from reading a claim target: the +// issue does not exist in that repository, which no retry can change. +var errPRRequestTargetMissing = errors.New("target issue does not exist") + +// errPRRequestTargetIsPullRequest reports that the claim target resolved to +// a pull request, which carries no issue claim. +var errPRRequestTargetIsPullRequest = errors.New("target is a pull request") + +// prRequestTargetClaim is the live claim on one issue, read the way the +// enumeration reads it (issueClaimFor) when issue claims are on, and from +// the hub's ledger alone otherwise. +func (c *Client) prRequestTargetClaim(ctx context.Context, owner, repo string, number int, now time.Time) (issueclaim.Claim, bool, error) { + enabled, ttl := c.issueClaimsSetting() + if !enabled { + claim, ok := c.ledgerClaimFor(owner, repo, number, now) + return claim, ok, nil + } + issue, _, err := c.client.Issues.Get(ctx, owner, repo, number) + if err != nil { + if githubStatusError(err, http.StatusNotFound) { + return issueclaim.Claim{}, false, fmt.Errorf("%w: %w", errPRRequestTargetMissing, err) + } + return issueclaim.Claim{}, false, err + } + if issue.IsPullRequest() { + return issueclaim.Claim{}, false, errPRRequestTargetIsPullRequest + } + snapshot := Issue{ + Repo: owner + "/" + repo, + Number: number, + UpdatedAt: issue.GetUpdatedAt().Time, + } + for _, a := range issue.Assignees { + if login := a.GetLogin(); login != "" { + snapshot.Assignees = append(snapshot.Assignees, login) + } + } + return c.issueClaimFor(ctx, owner, repo, &snapshot, ttl, now) +} + +// prRequestTargetAction names what the refused request was trying to do, +// so the notice on the target issue describes the event that happened. +type prRequestTargetAction string + +const ( + // prRequestTargetActionOpenPR: hive-open-pr with a closing reference. + prRequestTargetActionOpenPR prRequestTargetAction = "open-pr" + // prRequestTargetActionClaim: hive-open-issue claim on the issue. + prRequestTargetActionClaim prRequestTargetAction = "claim" + // prRequestTargetActionStart: a relay comment announcing a start. + prRequestTargetActionStart prRequestTargetAction = "start" +) + +// issueRequestStartTargetAction maps a start-path request kind to the +// action named in the claim-target notice. +func issueRequestStartTargetAction(kind string) prRequestTargetAction { + if kind == "claim" { + return prRequestTargetActionClaim + } + return prRequestTargetActionStart +} + +// noticePRRequestTargetRefusalBody is the notice posted on a refused target +// issue: what was asked, why it was refused, that nothing happened, and +// that the owner decides. +func noticePRRequestTargetRefusalBody(action prRequestTargetAction, r prRequestTargetRefusal) string { + asked, outcome := "asked to open a pull request that would close this issue", "No PR was opened" + switch action { + case prRequestTargetActionClaim: + asked, outcome = "asked to claim this issue", "The claim was not recorded" + case prRequestTargetActionStart: + asked, outcome = "asked to start work on this issue", "No work was started" + } + return fmt.Sprintf("%s\nA hive agent %s, but it is %s. %s; the owner decides whether to proceed.", + prRequestClaimTargetMarker, asked, r.why(), outcome) +} + +// noticePRRequestTargetRefusal posts (or refreshes) the one notice on a +// refused target issue. Best-effort: the rejected request is the +// enforcement, the notice tells the issue's watchers why. +func (c *Client) noticePRRequestTargetRefusal(ctx context.Context, action prRequestTargetAction, r prRequestTargetRefusal) { + body := noticePRRequestTargetRefusalBody(action, r) + if _, err := c.EditIssueMarkerComment(ctx, r.Repo, r.Issue, prRequestClaimTargetMarker, func(string) string { return body }); err != nil { + c.logger.Warn("pr-request watcher: could not post the claim-target notice", + slog.String("repo", r.Repo), slog.Int("issue", r.Issue), slog.String("error", err.Error())) + } +} diff --git a/src/pkg/github/pr_request_claims_test.go b/src/pkg/github/pr_request_claims_test.go index e1dc8c08ec..d3039ca619 100644 --- a/src/pkg/github/pr_request_claims_test.go +++ b/src/pkg/github/pr_request_claims_test.go @@ -10,6 +10,9 @@ import ( "os" "strings" "testing" + "time" + + "github.com/hivecommons/hive/pkg/issueclaim" ) func claimValidationServer(t *testing.T, files []string, issue map[string]any) *httptest.Server { @@ -370,3 +373,351 @@ func TestValidatePRRequestClaims_HumanFiledBugCloseOnMergeMarkerDoesNotAffectPRC }) } } + +// claimTargetServer answers GET /pulls/8 with prState ("" answers 404, the +// lookup error); every other path 404s. +func claimTargetServer(t *testing.T, prState string) *httptest.Server { + t.Helper() + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + if r.Method == http.MethodGet && strings.HasSuffix(r.URL.Path, "/pulls/8") && prState != "" { + _ = json.NewEncoder(w).Encode(map[string]any{"number": 8, "state": prState, "user": map[string]any{"login": "Karibhou"}}) + return + } + w.WriteHeader(http.StatusNotFound) + })) +} + +func liveLedgerClaim(identity string, now time.Time) func(string, int) (issueclaim.Claim, bool) { + return func(repo string, number int) (issueclaim.Claim, bool) { + if number != 7 { + return issueclaim.Claim{}, false + } + return issueclaim.Claim{Identity: identity, StartedAt: now.Add(-time.Hour), ExpiresAt: now.Add(time.Hour), Source: issueclaim.SourceLease}, true + } +} + +var claimTargetRequest = PRRequest{Repo: "o/r", Head: "scanner/fix-7", Title: "fix: thing", Body: "Fixes #7", Agent: "scanner"} + +// hivecommons/hive#17298: #17243 was claimed by a contributor and the +// agent's PR closing it was opened anyway. +func TestValidatePRRequestTargets_RefusesContributorClaimedTarget(t *testing.T) { + srv := claimTargetServer(t, "") + defer srv.Close() + c := claimValidationClient(t, srv) + now := time.Now() + c.SetIssueClaimLedger(liveLedgerClaim("Karibhou", now)) + + refused, err := c.validatePRRequestTargets(context.Background(), claimTargetRequest, now) + reason, ok := prRequestPolicyReason(err) + if !ok || !strings.Contains(reason, "already claimed by Karibhou") { + t.Fatalf("error = %v (%q, policy=%v), want a claim refusal", err, reason, ok) + } + if len(refused) != 1 || refused[0].Issue != 7 || refused[0].Holder != "Karibhou" { + t.Fatalf("refused = %+v, want #7 held by Karibhou", refused) + } +} + +func TestValidatePRRequestTargets_RefusesTargetCoveredByAnotherAuthorsPR(t *testing.T) { + srv := claimTargetServer(t, "open") + defer srv.Close() + c := claimValidationClient(t, srv) + c.SetPRClaimLookup(ledgerLookupFor(IssueClaim{Repo: "r", Issue: 7, PRNumber: 8, PRRepo: "r", PRAuthor: "Karibhou", PRState: "open", ExternalAuthor: true, Closing: true}, true)) + + refused, err := c.validatePRRequestTargets(context.Background(), claimTargetRequest, time.Now()) + reason, ok := prRequestPolicyReason(err) + if !ok || !strings.Contains(reason, "covered by #8") { + t.Fatalf("error = %v (%q, policy=%v), want a coverage refusal", err, reason, ok) + } + if len(refused) != 1 || !strings.HasPrefix(refused[0].CoveringPR, "#8") { + t.Fatalf("refused = %+v, want #7 covered by #8", refused) + } +} + +func TestValidatePRRequestTargets_AllowsOwnClaimAndOwnPR(t *testing.T) { + srv := claimTargetServer(t, "open") + defer srv.Close() + c := claimValidationClient(t, srv) + now := time.Now() + c.SetIssueClaimLedger(liveLedgerClaim("scanner", now)) + c.SetPRClaimLookup(ledgerLookupFor(IssueClaim{Repo: "r", Issue: 7, PRNumber: 8, PRRepo: "r", PRAuthor: "hive[bot]", PRState: "open", Closing: true}, true)) + + refused, err := c.validatePRRequestTargets(context.Background(), claimTargetRequest, now) + if err != nil || len(refused) != 0 { + t.Fatalf("validatePRRequestTargets = %+v, %v; want the agent's own claim and the hive's own PR allowed", refused, err) + } +} + +func TestValidatePRRequestTargets_RefusesSameNamedContributorAndOtherHiveClaims(t *testing.T) { + tests := []struct { + name string + claim issueclaim.Claim + }{ + {"contributor login equal to the agent name", issueclaim.Claim{Identity: "scanner", Kind: "contributor"}}, + {"same-named agent in another hive", issueclaim.Claim{Identity: "scanner", Kind: "agent", Hive: "other-hive"}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + srv := claimTargetServer(t, "") + defer srv.Close() + c := claimValidationClient(t, srv) + c.SetIssueClaimLedgerHive(func() string { return "this-hive" }) + now := time.Now() + claim := tt.claim + claim.StartedAt, claim.ExpiresAt, claim.Source = now.Add(-time.Hour), now.Add(time.Hour), issueclaim.SourceLease + c.SetIssueClaimLedger(func(repo string, number int) (issueclaim.Claim, bool) { return claim, number == 7 }) + + refused, err := c.validatePRRequestTargets(context.Background(), claimTargetRequest, now) + if _, ok := prRequestPolicyReason(err); !ok || len(refused) != 1 { + t.Fatalf("validatePRRequestTargets = %+v, %v; want a claim refusal", refused, err) + } + }) + } +} + +func TestValidatePRRequestTargets_LookupErrorRefuses(t *testing.T) { + srv := claimTargetServer(t, "") + defer srv.Close() + c := claimValidationClient(t, srv) + c.SetPRClaimLookup(ledgerLookupFor(IssueClaim{Repo: "r", Issue: 7, PRNumber: 8, PRRepo: "r", PRAuthor: "Karibhou", PRState: "open", ExternalAuthor: true, Closing: true}, true)) + + _, err := c.validatePRRequestTargets(context.Background(), claimTargetRequest, time.Now()) + if err == nil { + t.Fatal("validatePRRequestTargets succeeded although the covering PR could not be read; want fail closed") + } + if _, policy := prRequestPolicyReason(err); policy { + t.Fatalf("error = %v is a policy refusal; want a lookup error the watcher retries", err) + } +} + +// A ledger row whose covering PR has since closed no longer blocks: the +// live re-read, not the stale row, decides. +func TestValidatePRRequestTargets_ClosedCoveringPRNoLongerBlocks(t *testing.T) { + srv := claimTargetServer(t, "closed") + defer srv.Close() + c := claimValidationClient(t, srv) + c.SetPRClaimLookup(ledgerLookupFor(IssueClaim{Repo: "r", Issue: 7, PRNumber: 8, PRRepo: "r", PRAuthor: "Karibhou", PRState: "open", ExternalAuthor: true, Closing: true}, true)) + + refused, err := c.validatePRRequestTargets(context.Background(), claimTargetRequest, time.Now()) + if err != nil || len(refused) != 0 { + t.Fatalf("validatePRRequestTargets = %+v, %v; want a closed covering PR to release the target", refused, err) + } +} + +// With issue claims on, the target's claim is read from the forge (marker +// comment, then assignee), the path #17243 actually took. +func TestValidatePRRequestTargets_IssueClaimsEnabledReadsForgeAssignee(t *testing.T) { + now := time.Now() + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + switch { + case r.Method == http.MethodGet && strings.HasSuffix(r.URL.Path, "/issues/7/comments"): + _, _ = io.WriteString(w, `[]`) + case r.Method == http.MethodGet && strings.HasSuffix(r.URL.Path, "/issues/7"): + _ = json.NewEncoder(w).Encode(map[string]any{ + "number": 7, "state": "open", + "updated_at": now.Add(-time.Minute).UTC().Format(time.RFC3339), + "assignees": []map[string]any{{"login": "Karibhou"}}, + }) + default: + w.WriteHeader(http.StatusNotFound) + } + })) + defer srv.Close() + c := claimValidationClient(t, srv) + c.SetIssueClaims(func() (bool, time.Duration) { return true, time.Hour }) + + refused, err := c.validatePRRequestTargets(context.Background(), claimTargetRequest, now) + reason, ok := prRequestPolicyReason(err) + if !ok || !strings.Contains(reason, "already claimed by Karibhou") { + t.Fatalf("error = %v (%q, policy=%v), want a claim refusal from the forge assignee", err, reason, ok) + } + if len(refused) != 1 || refused[0].Issue != 7 || refused[0].Holder != "Karibhou" { + t.Fatalf("refused = %+v, want #7 held by Karibhou", refused) + } +} + +// With issue claims on, a closing reference to an issue that does not exist +// is permanent: it is rejected (the cross-repo hint validatePRRequestClaims +// gives) rather than failed and retried until the horizon quarantines it. +func TestValidatePRRequestTargets_IssueClaimsEnabledMissingTargetIsPolicyError(t *testing.T) { + srv := claimTargetServer(t, "") + defer srv.Close() + c := claimValidationClient(t, srv) + c.SetIssueClaims(func() (bool, time.Duration) { return true, time.Hour }) + + refused, err := c.validatePRRequestTargets(context.Background(), claimTargetRequest, time.Now()) + reason, ok := prRequestPolicyReason(err) + if !ok || !strings.Contains(reason, "closing reference o/r#7 does not exist") || !strings.Contains(reason, "owner/repo#N") { + t.Fatalf("error = %v (%q, policy=%v), want a permanent missing-target rejection", err, reason, ok) + } + if len(refused) != 0 { + t.Fatalf("refused = %+v, want none for a missing target", refused) + } +} + +// With issue claims on, a target that resolves to a pull request carries no +// issue claim: a hive start comment on a contributor-assigned PR is not a +// start on an issue and must not be refused. +func TestIssueRequestStart_IssueClaimsEnabledAllowsCommentOnAssignedPR(t *testing.T) { + now := time.Now() + var posted []string + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + switch { + case r.Method == http.MethodGet && strings.HasSuffix(r.URL.Path, "/issues/7"): + _ = json.NewEncoder(w).Encode(map[string]any{ + "number": 7, "state": "open", + "updated_at": now.Add(-time.Minute).UTC().Format(time.RFC3339), + "assignees": []map[string]any{{"login": "Karibhou"}}, + "pull_request": map[string]any{"url": "https://api.github.com/repos/o/r/pulls/7"}, + }) + case r.Method == http.MethodGet && strings.HasSuffix(r.URL.Path, "/comments"): + _, _ = io.WriteString(w, `[]`) + case r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, "/comments"): + var in struct{ Body string } + _ = json.NewDecoder(r.Body).Decode(&in) + posted = append(posted, in.Body) + _, _ = io.WriteString(w, `{"id":1}`) + default: + w.WriteHeader(http.StatusNotFound) + } + })) + defer srv.Close() + c := issueTestClient(t, srv.URL) + c.SetIssueClaims(func() (bool, time.Duration) { return true, time.Hour }) + dir := withIssueDir(t) + + p, err := WriteIssueRequest(dir, IssueRequest{Kind: "comment", Repo: "o/r", Number: 7, Body: "Starting on this now; repro confirmed.", Agent: "scanner"}) + if err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if _, err := os.Stat(p + ".denied"); err == nil { + t.Fatal("a start comment on a pull request must not be refused by the claim-target gate") + } + if len(posted) != 1 || !strings.Contains(posted[0], "Starting on this") { + t.Fatalf("comments posted = %q, want the start comment alone", posted) + } +} + +// hivecommons/hive#17298: the kick/start path. A relay comment that announces +// a start on an issue another principal has claimed is refused before the +// comment posts and before notifyAgentStart books the start. +func TestIssueRequestStart_RefusesContributorClaimedTarget(t *testing.T) { + var posted []string + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + switch { + case r.Method == http.MethodGet && strings.HasSuffix(r.URL.Path, "/comments"): + _, _ = io.WriteString(w, `[]`) + case r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, "/comments"): + var in struct{ Body string } + _ = json.NewDecoder(r.Body).Decode(&in) + posted = append(posted, in.Body) + _, _ = io.WriteString(w, `{"id":1}`) + default: + w.WriteHeader(http.StatusNotFound) + } + })) + defer srv.Close() + c := issueTestClient(t, srv.URL) + now := time.Now() + c.SetIssueClaimLedger(liveLedgerClaim("Karibhou", now)) + calls := recordStarts(c) + dir := withIssueDir(t) + + p, err := WriteIssueRequest(dir, IssueRequest{Kind: "comment", Repo: "o/r", Number: 7, Body: "Starting on this now; repro confirmed.", Agent: "scanner"}) + if err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if _, err := os.Stat(p + ".denied"); err != nil { + t.Fatalf("start on a contributor-claimed issue must be denied: %v", err) + } + b, err := os.ReadFile(strings.TrimSuffix(p, ".json") + ".result.json") + if err != nil { + t.Fatal(err) + } + var resp IssueResponse + if err := json.Unmarshal(b, &resp); err != nil { + t.Fatal(err) + } + if resp.OK || !strings.Contains(resp.Error, "o/r#7 is already claimed by Karibhou") { + t.Fatalf("result = %+v, want a claim refusal naming Karibhou", resp) + } + if len(posted) != 1 || !strings.Contains(posted[0], prRequestClaimTargetMarker) || strings.Contains(posted[0], "Starting on this") { + t.Fatalf("comments posted = %q, want only the claim-target notice, not the start comment", posted) + } + // The notice describes the start that was refused, not a PR open that + // never happened, and still names the holder and the owner's call. + for _, want := range []string{"asked to start work on this issue", "already claimed by Karibhou", "No work was started", "the owner decides"} { + if !strings.Contains(posted[0], want) { + t.Fatalf("notice = %q, want it to contain %q", posted[0], want) + } + } + for _, reject := range []string{"pull request", "No PR was opened"} { + if strings.Contains(posted[0], reject) { + t.Fatalf("notice = %q, must not describe a PR open on the start path", posted[0]) + } + } + if len(*calls) != 0 { + t.Fatalf("refused start reported start signals: %+v", *calls) + } +} + +// The claim-target notice names the action that was refused on each path. +func TestNoticePRRequestTargetRefusalBody_NamesAction(t *testing.T) { + r := prRequestTargetRefusal{Repo: "o/r", Issue: 7, Holder: "Karibhou"} + cases := []struct { + action prRequestTargetAction + asked string + result string + }{ + {prRequestTargetActionOpenPR, "asked to open a pull request that would close this issue", "No PR was opened"}, + {prRequestTargetActionClaim, "asked to claim this issue", "The claim was not recorded"}, + {prRequestTargetActionStart, "asked to start work on this issue", "No work was started"}, + } + for _, tc := range cases { + body := noticePRRequestTargetRefusalBody(tc.action, r) + for _, want := range []string{prRequestClaimTargetMarker, tc.asked, "already claimed by Karibhou", tc.result, "the owner decides"} { + if !strings.Contains(body, want) { + t.Errorf("%s: notice = %q, want it to contain %q", tc.action, body, want) + } + } + } + if got := issueRequestStartTargetAction("claim"); got != prRequestTargetActionClaim { + t.Errorf("issueRequestStartTargetAction(claim) = %q", got) + } + if got := issueRequestStartTargetAction("comment"); got != prRequestTargetActionStart { + t.Errorf("issueRequestStartTargetAction(comment) = %q", got) + } +} + +// The agent's own live claim lets its start comment through and books the +// start, as before. +func TestIssueRequestStart_AllowsOwnClaimedTarget(t *testing.T) { + commented := 0 + srv := newIssueMockServer(t, "", nil, nil, &commented) + defer srv.Close() + c := issueTestClient(t, srv.URL) + now := time.Now() + c.SetIssueClaimLedger(liveLedgerClaim("scanner", now)) + calls := recordStarts(c) + dir := withIssueDir(t) + + if _, err := WriteIssueRequest(dir, IssueRequest{Kind: "comment", Repo: "o/r", Number: 7, Body: "Starting on this now; repro confirmed.", Agent: "scanner"}); err != nil { + t.Fatal(err) + } + c.ProcessIssueRequestsOnce(context.Background()) + + if commented != 1 { + t.Fatalf("expected the start comment to post, got %d", commented) + } + want := startCall{agent: "scanner", repo: "o/r", number: 7, signal: AgentStartSignalComment} + if len(*calls) != 1 || (*calls)[0] != want { + t.Fatalf("start signals = %+v, want %+v", *calls, want) + } +} diff --git a/src/pkg/github/pr_request_watcher.go b/src/pkg/github/pr_request_watcher.go index 5b061701f4..fac95062af 100644 --- a/src/pkg/github/pr_request_watcher.go +++ b/src/pkg/github/pr_request_watcher.go @@ -428,6 +428,25 @@ func (c *Client) handleOnePRRequest(ctx context.Context, path string, nowFn func c.rejectPRRequest(path, req, "body", reason, nowFn) return } + // #17298: a closing reference to an issue another principal has claimed, + // or covered with an open PR, is refused before the request books a start + // on anything — epic-driven work never claims its target, so this is the + // first point it is checked. A failed lookup fails closed (retried). + refused, err := c.validatePRRequestTargets(ctx, req, nowFn()) + if err != nil { + if reason, policy := prRequestPolicyReason(err); policy { + for _, r := range refused { + if !strings.EqualFold(r.Repo, req.Repo) && !c.AgentServesRepo(req.Agent, r.Repo) { + continue + } + c.noticePRRequestTargetRefusal(ctx, prRequestTargetActionOpenPR, r) + } + c.rejectPRRequest(path, req, "claim", reason, nowFn) + return + } + c.failPRRequest(path, req, err, nowFn) + return + } // #10527: an authorized PR request naming an issue is the agent's start // signal on it, whether or not the claim gates below let the PR open. for _, n := range req.IssueN { From d4d6a8b635798c17e68ab7bbcbec730c0ec864dc Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 00:41:31 +0000 Subject: [PATCH 013/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.207.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.207.0 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/added-hive-open-issue-claim.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/added-hive-open-issue-claim.md diff --git a/CHANGELOG.md b/CHANGELOG.md index e499db4441..fd976563d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.207.0) + +### Added + +- `hive-open-issue --claim` files and claims a self-filed issue in one request (claimed-by label, `help wanted` removed, failures reported as `claim_error`); an issue a hive agent files without `--claim` is marked filed-for-outside-help and that agent's later claim of it is refused ([#17299](https://github.com/hivecommons/hive/issues/17299)). + ## 2026-11-08 (v5.206.3) ### Fixed diff --git a/changelog.d/added-hive-open-issue-claim.md b/changelog.d/added-hive-open-issue-claim.md deleted file mode 100644 index cb47f0d935..0000000000 --- a/changelog.d/added-hive-open-issue-claim.md +++ /dev/null @@ -1 +0,0 @@ -- `hive-open-issue --claim` files and claims a self-filed issue in one request (claimed-by label, `help wanted` removed, failures reported as `claim_error`); an issue a hive agent files without `--claim` is marked filed-for-outside-help and that agent's later claim of it is refused ([#17299](https://github.com/hivecommons/hive/issues/17299)). From ff0eba9ce4ad921ca963bfbff24108c7dbb1c7ba Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 01:09:26 +0000 Subject: [PATCH 014/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.207.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.207.1 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-pr-request-claim-target-gate.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-pr-request-claim-target-gate.md diff --git a/CHANGELOG.md b/CHANGELOG.md index fd976563d6..59b5e70a8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.207.1) + +### Fixed + +- hive-open-pr and the PR-request watcher now refuse a Fixes/Closes target that another principal has claimed or covered with an open PR, and post one deduplicated notice on the issue; the same gate denies a claim or start comment on such an issue before the start is booked (#17298). + ## 2026-11-09 (v5.207.0) ### Added diff --git a/changelog.d/fixed-pr-request-claim-target-gate.md b/changelog.d/fixed-pr-request-claim-target-gate.md deleted file mode 100644 index beba1e8cf2..0000000000 --- a/changelog.d/fixed-pr-request-claim-target-gate.md +++ /dev/null @@ -1 +0,0 @@ -- hive-open-pr and the PR-request watcher now refuse a Fixes/Closes target that another principal has claimed or covered with an open PR, and post one deduplicated notice on the issue; the same gate denies a claim or start comment on such an issue before the start is booked (#17298). From cbcd8be2767e86be9e71794a9404f3107f8298bb Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 01:21:44 +0000 Subject: [PATCH 015/123] =?UTF-8?q?=F0=9F=90=9B=20fix:=20keep=20AGENTS.md?= =?UTF-8?q?=20injection-cap=20warning=20out=20of=20fleet=20selfreports=20(?= =?UTF-8?q?#17321)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The scheduler's injection-cap WARN is the operator-side notice that a repository's AGENTS.md outgrew the cap (#12129): repo content, the cap working as designed, not a hive defect. Every kick re-logs it, so one oversized repo crossed the repeat threshold and was filed as an unclassified error (#17318). Exempt the exact message from the feed; 'agentsmd: parse failed, skipping injection' stays reportable. The warning also printed cap_bytes=0, the config 'use default' sentinel. Log the effective cap instead. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/fixed-agentsmd-cap-selfreport.md | 1 + src/pkg/fleetreport/fleetreport.go | 7 +++++ src/pkg/fleetreport/slogfeed/slogfeed_test.go | 31 +++++++++++++++++++ src/pkg/scheduler/kick_priming.go | 8 ++++- .../kick_priming_agentsmd_cap_test.go | 23 ++++++++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 changelog.d/fixed-agentsmd-cap-selfreport.md diff --git a/changelog.d/fixed-agentsmd-cap-selfreport.md b/changelog.d/fixed-agentsmd-cap-selfreport.md new file mode 100644 index 0000000000..03b866ddd3 --- /dev/null +++ b/changelog.d/fixed-agentsmd-cap-selfreport.md @@ -0,0 +1 @@ +- The fleet selfreport feed no longer files a repository's oversized AGENTS.md as an unclassified runtime error, and the scheduler's injection-cap warning now reports the effective cap instead of the config default sentinel (#17318). diff --git a/src/pkg/fleetreport/fleetreport.go b/src/pkg/fleetreport/fleetreport.go index e85f5dbf98..a3b5f98523 100644 --- a/src/pkg/fleetreport/fleetreport.go +++ b/src/pkg/fleetreport/fleetreport.go @@ -889,6 +889,13 @@ func IsGitHubUpstreamUnavailable(s string) bool { // exact-message exclusions matched in the function body below. func IsBenignMessage(msg string) bool { m := strings.ToLower(msg) + // A repository's AGENTS.md outgrowing the injection cap is operator + // content enforcement working as designed (#12129), re-logged on every + // kick for that repo (#17318). The WARN stays in local logs; "agentsmd: + // parse failed, skipping injection" remains reportable. + if strings.TrimSpace(m) == "agentsmd: agents.md exceeded the injection cap; sections dropped whole" { + return true + } // The bounded rebase loop hands an unresolved conflict to a person after // its attempt cap. Repeated polls of that same handoff are expected, not // a runtime defect (#16510). Keep other rebase failures reportable. diff --git a/src/pkg/fleetreport/slogfeed/slogfeed_test.go b/src/pkg/fleetreport/slogfeed/slogfeed_test.go index 2bea931702..a1941326d2 100644 --- a/src/pkg/fleetreport/slogfeed/slogfeed_test.go +++ b/src/pkg/fleetreport/slogfeed/slogfeed_test.go @@ -527,6 +527,37 @@ func TestMergeCIRefusalLogsWithoutFleetReport(t *testing.T) { } } +func TestAgentsMdInjectionCapLogsWithoutFleetReport(t *testing.T) { + now := time.Date(2026, 11, 8, 20, 0, 0, 0, time.UTC) + tr := fleetreport.NewRuntimeTracker(func() time.Time { return now }) + var out bytes.Buffer + logger := slog.New(NewWithObserver(slog.NewJSONHandler(&out, nil), tr.Observe)) + for i := 0; i < 6; i++ { + logger.Warn("agentsmd: AGENTS.md exceeded the injection cap; sections dropped whole", + "root", "/data/agentsmd-cache/projectbluefin/utah-packages", "cap_bytes", 16384, + "whole_file", false, + "omitted_sections", []string{"Conventions worth not rediscovering", "Sibling repository", "Canonical sources"}, + "omitted_bytes", 5031) + now = now.Add(time.Minute) + } + if ev := tr.Evidence(); len(ev) != 0 { + t.Fatalf("AGENTS.md injection cap produced fleet evidence: %+v", ev) + } + if n := strings.Count(out.String(), "\n"); n != 6 { + t.Fatalf("wrapped handler saw %d records, want 6: %s", n, out.String()) + } + if !strings.Contains(out.String(), `"omitted_bytes":5031`) { + t.Fatalf("cap warning lost its diagnostics: %s", out.String()) + } + const failure = "agentsmd: parse failed, skipping injection" + for i := 0; i < 5; i++ { + logger.Warn(failure) + } + if ev := tr.Evidence(); len(ev) != 1 || ev[0].Class != fleetreport.ClassUnclassifiedRepeated || ev[0].Message != failure || ev[0].Count != 5 { + t.Fatalf("parse failure should still produce fleet evidence: %+v", ev) + } +} + func TestHandlerSkipsContributorTierLimits(t *testing.T) { for _, msg := range []string{ "[contribute-ws] refusing task: concurrency limit reached", diff --git a/src/pkg/scheduler/kick_priming.go b/src/pkg/scheduler/kick_priming.go index f8a906ca5f..51e4ad320d 100644 --- a/src/pkg/scheduler/kick_priming.go +++ b/src/pkg/scheduler/kick_priming.go @@ -114,8 +114,14 @@ func (s *Scheduler) primeAgentsMd(repoRoot string) string { // The kick carries its own warning line; this is the operator-side // half, so the repo owner learns the file outgrew the cap from the log // rather than from an agent that missed a rule (#12129). + // capBytes 0 is the config "use default" sentinel; log the cap that + // applied so the operator can act on it (#17318). + effectiveCap := capBytes + if effectiveCap <= 0 { + effectiveCap = agentsmd.DefaultMaxInjectionBytes + } s.logger.Warn("agentsmd: AGENTS.md exceeded the injection cap; sections dropped whole", - "root", repoRoot, "cap_bytes", capBytes, "whole_file", omitted.WholeFile, + "root", repoRoot, "cap_bytes", effectiveCap, "whole_file", omitted.WholeFile, "omitted_sections", omitted.Sections, "omitted_bytes", omitted.Bytes) } return section diff --git a/src/pkg/scheduler/kick_priming_agentsmd_cap_test.go b/src/pkg/scheduler/kick_priming_agentsmd_cap_test.go index 74e4b96a88..6423864da1 100644 --- a/src/pkg/scheduler/kick_priming_agentsmd_cap_test.go +++ b/src/pkg/scheduler/kick_priming_agentsmd_cap_test.go @@ -5,6 +5,7 @@ import ( "log/slog" "os" "path/filepath" + "strconv" "strings" "testing" @@ -81,3 +82,25 @@ func TestPrimeAgentsMd_UnderCapHasNoWarning(t *testing.T) { t.Errorf("no warning log expected under the cap:\n%s", logBuf.String()) } } + +// TestPrimeAgentsMd_LogsEffectiveCapForDefault: with agents_md_max_bytes unset +// (0, the "use default" sentinel) the drop log names the cap that applied, +// not 0 (#17318). +func TestPrimeAgentsMd_LogsEffectiveCapForDefault(t *testing.T) { + var logBuf bytes.Buffer + logger := slog.New(slog.NewTextHandler(&logBuf, &slog.HandlerOptions{Level: slog.LevelDebug})) + s := New(&config.Config{}, logger) + root := t.TempDir() + file := "## Giant style guide\n\n" + strings.Repeat("Indent with tabs. ", agentsmd.DefaultMaxInjectionBytes/10) + "\n" + if err := os.WriteFile(filepath.Join(root, "AGENTS.md"), []byte(file), 0o644); err != nil { + t.Fatal(err) + } + s.primeAgentsMd(root) + log := logBuf.String() + if !strings.Contains(log, "exceeded the injection cap") { + t.Fatalf("expected the cap warning, got:\n%s", log) + } + if !strings.Contains(log, "cap_bytes="+strconv.Itoa(agentsmd.DefaultMaxInjectionBytes)) || strings.Contains(log, "cap_bytes=0") { + t.Errorf("log should carry the effective default cap, got:\n%s", log) + } +} From eb6c66a76ec7c4ee1005f567ae45e3b37691e047 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Sun, 8 Nov 2026 20:30:14 -0500 Subject: [PATCH 016/123] =?UTF-8?q?=F0=9F=90=9B=20watchdog:=20stop=20pagin?= =?UTF-8?q?g=20PaneShowsLogin=20on=20a=20relaunched=20CLI's=20login=20flas?= =?UTF-8?q?h=20(#17323)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 watchdog: stop paging PaneShowsLogin on a relaunched CLI's login flash A Copilot CLI relaunched mid-life (kick restart, memory-drain recycle, watchdog restart) paints login chrome for ~0.5s while it re-validates its token. Classify dated boot grace from the agent's original StartedAt, so a 22h-old agent got no grace and a single sighting flipped Authenticated=False/PaneShowsLogin and paged the operator. - Observation.LastLaunchAt records the most recent CLI spawn (markCLILaunchedLocked); boot grace uses the later of StartedAt and it. - ApplyLoginStreak holds auth-required back until login chrome has been seen on Settings.LoginStreak consecutive polls (liveness.login_streak, default 3), mirroring the pane poller's loginStreak guard. Below the threshold the pane is unknown with reason 'login chrome seen 1/3 polls'. Fixes #17320 Signed-off-by: Andrew Anderson * test: add Liveness.LoginStreak to the agent-runtime config golden Signed-off-by: Andrew Anderson * dashboard: reference governor.watchdog.liveness.login_streak in the Watchdog settings help Signed-off-by: Andrew Anderson --------- Signed-off-by: Andrew Anderson --- .../fixed-watchdog-login-flash-relaunch.md | 1 + src/crux/agent/manager.go | 7 +- src/crux/agent/manager_launch.go | 3 +- src/crux/agent/watchdog_fleet.go | 16 +++- src/crux/config/watchdog.go | 6 ++ src/crux/watchdog/classify.go | 47 +++++++++- .../watchdog/classify_login_grace_test.go | 86 ++++++++++++++++++ src/crux/watchdog/login_streak.go | 20 +++++ src/crux/watchdog/login_streak_test.go | 87 +++++++++++++++++++ src/crux/watchdog/reconciler.go | 8 +- src/crux/watchdog/reconciler_test.go | 3 + src/crux/watchdog/settings.go | 13 +++ src/crux/watchdog/settings_test.go | 11 ++- src/docs/agent-watchdog.md | 14 ++- .../config/testdata/agent_runtime_golden.json | 3 +- .../static-src/js/config-governor.js | 2 +- .../dashboard/static-src/js/config-state.js | 2 +- src/pkg/dashboard/static/index.html | 4 +- 18 files changed, 308 insertions(+), 25 deletions(-) create mode 100644 changelog.d/fixed-watchdog-login-flash-relaunch.md create mode 100644 src/crux/watchdog/login_streak.go create mode 100644 src/crux/watchdog/login_streak_test.go diff --git a/changelog.d/fixed-watchdog-login-flash-relaunch.md b/changelog.d/fixed-watchdog-login-flash-relaunch.md new file mode 100644 index 0000000000..f0b5abdb99 --- /dev/null +++ b/changelog.d/fixed-watchdog-login-flash-relaunch.md @@ -0,0 +1 @@ +- Watchdog no longer pages `PaneShowsLogin` for the sub-second login flash a relaunched Copilot CLI paints while re-validating its token: boot grace is now dated from the most recent CLI (re)launch, and login chrome must persist for `governor.watchdog.liveness.login_streak` consecutive polls (default 3) before `auth-required` is raised. diff --git a/src/crux/agent/manager.go b/src/crux/agent/manager.go index a3a081ee6a..02f424ba34 100644 --- a/src/crux/agent/manager.go +++ b/src/crux/agent/manager.go @@ -427,9 +427,10 @@ type AgentProcess struct { // this as "Waiting on CI" instead of "Working" so a stalled-on-CI agent // no longer looks indistinguishable from one making progress. AwaitingCI bool - TransientNudges int // total transient-API-error nudges sent (surfaced to the dashboard) - launchGen int // increments per launch; stale deliverStartupKick goroutines check it and drop - lastInferKickMarks int // no-action watchdog: tool-marker count in pane+scrollback just after kick delivery + TransientNudges int // total transient-API-error nudges sent (surfaced to the dashboard) + launchGen int // increments per launch; stale deliverStartupKick goroutines check it and drop + lastCLILaunchAt time.Time // when the CLI was last typed into the pane; dates watchdog boot grace on relaunch (#17320) + lastInferKickMarks int // no-action watchdog: tool-marker count in pane+scrollback just after kick delivery ProviderErrorClass string ProviderErrorLine string ProviderErrorBackoffUntil time.Time diff --git a/src/crux/agent/manager_launch.go b/src/crux/agent/manager_launch.go index 31713b6d74..9e878fc5db 100644 --- a/src/crux/agent/manager_launch.go +++ b/src/crux/agent/manager_launch.go @@ -313,8 +313,7 @@ func (m *Manager) launchInTmux(ctx context.Context, agent *AgentProcess) error { agent.LastError = "" agent.copilotModelFallbackRequested = "" agent.lastLaunchFailureBanner = "" - agent.StartedAt = &now - agent.launchGen++ + m.markCLILaunchedLocked(agent, now) m.logger.Info("audit: agent started", "name", agent.Name, "backend", backend, diff --git a/src/crux/agent/watchdog_fleet.go b/src/crux/agent/watchdog_fleet.go index 7445ad2bf9..f0d840acc0 100644 --- a/src/crux/agent/watchdog_fleet.go +++ b/src/crux/agent/watchdog_fleet.go @@ -144,7 +144,9 @@ func (f WatchdogFleet) Observe(name string) (watchdog.Observation, error) { // StartedAt dates the current launch so the reconciler can suppress dead // verdicts during boot. Copied by value: the field is a pointer the - // manager mutates on relaunch. + // manager mutates on relaunch. LastLaunchAt is the most recent CLI spawn + // (markCLILaunchedLocked), which a restored or resumed session can leave + // StartedAt lagging behind. var startedAt time.Time providerClass := "" providerLine := "" @@ -152,6 +154,7 @@ func (f WatchdogFleet) Observe(name string) (watchdog.Observation, error) { if agent.StartedAt != nil { startedAt = *agent.StartedAt } + lastLaunchAt := agent.lastCLILaunchAt if f.M.providerErrorBackoffRemainingLocked(agent, time.Now()) > 0 { providerClass = agent.ProviderErrorClass providerLine = agent.ProviderErrorLine @@ -166,6 +169,7 @@ func (f WatchdogFleet) Observe(name string) (watchdog.Observation, error) { ShowsLoginPrompt: needsLogin || paneShowsLoginPrompt(strings.Split(pane, "\n")), LastChange: lastChange, StartedAt: startedAt, + LastLaunchAt: lastLaunchAt, AuthAvailable: authAvailable, AuthKnown: authKnown, CredentialProven: credentialProven, @@ -439,3 +443,13 @@ func newestMtimeBounded(root string, maxDepth int) (time.Time, bool) { func (m *Manager) WatchdogSource() watchdog.Source { return WatchdogFleet{M: m} } + +// markCLILaunchedLocked records a completed CLI launch into the pane: the +// agent's StartedAt, the launch generation stale startup-kick goroutines +// check, and the relaunch timestamp the watchdog dates its boot grace from +// (#17320). Caller holds m.mu. +func (m *Manager) markCLILaunchedLocked(agent *AgentProcess, now time.Time) { + agent.StartedAt = &now + agent.launchGen++ + agent.lastCLILaunchAt = now +} diff --git a/src/crux/config/watchdog.go b/src/crux/config/watchdog.go index 5307e622a1..4ec92f45a3 100644 --- a/src/crux/config/watchdog.go +++ b/src/crux/config/watchdog.go @@ -42,6 +42,12 @@ type WatchdogLivenessConfig struct { // window exists because a launching CLI legitimately passes through both // states. "" = 5m. ShellPromptAfter string `yaml:"shell_prompt_after,omitempty"` + // LoginStreak is how many consecutive watchdog polls must see login + // chrome before the pane is classified auth-required and an operator is + // paged; fewer sightings report Unknown. A relaunched CLI flashes login + // chrome while re-validating its token, so one sighting is not a logout. + // 0 = 3; 1 disables the guard. + LoginStreak int `yaml:"login_streak,omitempty"` } // WatchdogRestartConfig holds the CrashLoopBackOff-analog knobs. diff --git a/src/crux/watchdog/classify.go b/src/crux/watchdog/classify.go index 565a104aff..bb8c8fb81e 100644 --- a/src/crux/watchdog/classify.go +++ b/src/crux/watchdog/classify.go @@ -1,6 +1,7 @@ package watchdog import ( + "fmt" "strings" "time" ) @@ -67,6 +68,13 @@ type Observation struct { // agent spawns a second concurrent CLI, the race cliBootGraceSeconds was // added for on the manager side. StartedAt time.Time + // LastLaunchAt is when the CLI process was most recently (re)launched + // into the pane; zero when the manager has not recorded one. StartedAt + // dates the agent, not the process: a kick restart, memory-drain recycle + // or watchdog restart hours into an agent's life spawns a fresh CLI that + // repeats the whole startup handshake (login chrome included), so boot + // grace is measured from the later of the two. + LastLaunchAt time.Time // AuthAvailable/AuthKnown carry the manager's owner-aware per-agent // credential-file verdict (AgentAuthState, #4619/#4641): AuthKnown=false // means the probe could not determine an answer and the reconciler must @@ -208,9 +216,12 @@ func Classify(obs Observation, now time.Time, s Settings) Classification { // Boot grace outranks every dead verdict. A launching agent legitimately // has no tmux session, no pane, and no CLI marker for the first seconds of // its life; without this, the watchdog would restart it underneath itself - // and spawn a second concurrent CLI. An agent with no StartedAt cannot be - // dated, so it gets no grace rather than an unbounded one. - booting := !obs.StartedAt.IsZero() && now.Sub(obs.StartedAt) < s.BootGrace + // and spawn a second concurrent CLI. An agent with no launch timestamp + // cannot be dated, so it gets no grace rather than an unbounded one. The + // grace is dated from the most recent CLI launch, not the agent's first: + // a relaunched CLI boots exactly like a new one (#17320). + launchedAt := obs.lastLaunch() + booting := !launchedAt.IsZero() && now.Sub(launchedAt) < s.BootGrace if !obs.SessionExists { if booting { @@ -234,11 +245,16 @@ func Classify(obs Observation, now time.Time, s Settings) Classification { // branch. Observed on a hosted spoke: rolling the pod paged quality, // scanner and ci-maintainer 3 minutes in, one event each, never // repeated -- all three were authenticated and working the whole time. + // Observed again 22h into the same agents' lives when their CLIs were + // relaunched mid-life (#17320): the grace was dated from the agent's + // first start, so the relaunch flash got none. Hence lastLaunch above, + // and the reconciler's ApplyLoginStreak on top for the relaunches the + // manager cannot date (the CLI re-executing itself, for one). // // Unknown rather than Ready: a login screen is not health, and this // says only that it is too early to conclude anything. An agent that // genuinely needs a human still shows the same chrome once grace - // elapses and pages on the very next tick. + // elapses and pages once the streak is met. if booting { return Classification{ClassUnknown, "pane shows login chrome inside boot grace"} } @@ -290,3 +306,26 @@ func Classify(obs Observation, now time.Time, s Settings) Classification { } return Classification{ClassUnknown, "pane matched no known signature"} } + +// lastLaunch is the later of the agent's start and its most recent CLI +// relaunch — the instant boot grace is measured from. +func (o Observation) lastLaunch() time.Time { + if o.LastLaunchAt.After(o.StartedAt) { + return o.LastLaunchAt + } + return o.StartedAt +} + +// ApplyLoginStreak is the watchdog's counterpart to the pane poller's +// loginStreak guard: an auth-required verdict only stands once login chrome +// has been seen on `required` consecutive polls, `streak` being the count +// including this one. Below that it is downgraded to unknown — the honest +// verdict for a CLI that may simply be mid-handshake after a relaunch the +// manager could not date (#17320). Any other class passes through untouched; +// a required streak below one disables the guard. +func ApplyLoginStreak(cls Classification, streak, required int) Classification { + if cls.Class != ClassAuthRequired || required <= 1 || streak >= required { + return cls + } + return Classification{ClassUnknown, fmt.Sprintf("login chrome seen %d/%d polls", streak, required)} +} diff --git a/src/crux/watchdog/classify_login_grace_test.go b/src/crux/watchdog/classify_login_grace_test.go index 5174f2f1e8..dcd5dc2360 100644 --- a/src/crux/watchdog/classify_login_grace_test.go +++ b/src/crux/watchdog/classify_login_grace_test.go @@ -114,3 +114,89 @@ func TestClassifyLoginPromptObservationInsideBootGrace(t *testing.T) { t.Errorf("past grace: Classify() = %v (%q), want %v", got.Class, got.Reason, ClassAuthRequired) } } + +// TestClassifyLoginChromeAfterMidLifeRelaunch pins #17320: 22h into their +// lives, three copilot agents had their CLIs relaunched and each flashed login +// chrome for ~0.5s while re-validating the token. StartedAt dated the agent, +// not the process, so the relaunch got no grace and one sighting paged. +func TestClassifyLoginChromeAfterMidLifeRelaunch(t *testing.T) { + s := classifySettings() + base := Observation{ + Backend: "copilot", + SessionExists: true, + Pane: "Please run /login to authenticate", + ShowsLoginPrompt: true, + StartedAt: fresh(22 * time.Hour), + LastChange: fresh(time.Second), + } + + cases := []struct { + name string + lastLaunchAt time.Time + want PaneClass + }{ + {"relaunch seconds ago is inside grace", fresh(3 * time.Second), ClassUnknown}, + {"relaunch past grace pages", fresh(s.BootGrace + time.Second), ClassAuthRequired}, + {"no relaunch recorded falls back to StartedAt", time.Time{}, ClassAuthRequired}, + // A stale LastLaunchAt (older than StartedAt) must never shrink the + // grace a fresh StartedAt already grants. + {"older relaunch than StartedAt does not win", fresh(48 * time.Hour), ClassAuthRequired}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + obs := base + obs.LastLaunchAt = tc.lastLaunchAt + if got := Classify(obs, testClock, s); got.Class != tc.want { + t.Errorf("Classify() = %v (%q), want %v", got.Class, got.Reason, tc.want) + } + }) + } + + t.Run("relaunch grace also covers a missing session", func(t *testing.T) { + obs := base + obs.SessionExists = false + obs.LastLaunchAt = fresh(3 * time.Second) + if got := Classify(obs, testClock, s); got.Class != ClassUnknown { + t.Errorf("Classify() = %v (%q), want %v", got.Class, got.Reason, ClassUnknown) + } + }) + t.Run("fresh StartedAt still grants grace when LastLaunchAt is older", func(t *testing.T) { + obs := base + obs.StartedAt = fresh(3 * time.Second) + obs.LastLaunchAt = fresh(time.Hour) + if got := Classify(obs, testClock, s); got.Class != ClassUnknown { + t.Errorf("Classify() = %v (%q), want %v", got.Class, got.Reason, ClassUnknown) + } + }) +} + +// TestApplyLoginStreak is the classifier-side half of the relaunch guard: a +// relaunch the manager cannot date still flashes login chrome, so the verdict +// must survive several consecutive polls before it pages. +func TestApplyLoginStreak(t *testing.T) { + auth := Classification{ClassAuthRequired, "pane shows a login/credential screen"} + cases := []struct { + name string + in Classification + streak int + required int + want PaneClass + wantReason string + }{ + {"first sighting is unknown", auth, 1, 3, ClassUnknown, "login chrome seen 1/3 polls"}, + {"second sighting is unknown", auth, 2, 3, ClassUnknown, "login chrome seen 2/3 polls"}, + {"streak at threshold pages", auth, 3, 3, ClassAuthRequired, auth.Reason}, + {"streak past threshold keeps paging", auth, 7, 3, ClassAuthRequired, auth.Reason}, + {"required of one disables the guard", auth, 1, 1, ClassAuthRequired, auth.Reason}, + {"required of zero disables the guard", auth, 1, 0, ClassAuthRequired, auth.Reason}, + {"non-auth verdicts pass through", Classification{ClassReady, "CLI ready signature present"}, 0, 3, ClassReady, "CLI ready signature present"}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + got := ApplyLoginStreak(tc.in, tc.streak, tc.required) + if got.Class != tc.want || got.Reason != tc.wantReason { + t.Errorf("ApplyLoginStreak(%v, %d, %d) = %v (%q), want %v (%q)", tc.in.Class, tc.streak, tc.required, got.Class, got.Reason, tc.want, tc.wantReason) + } + }) + } +} diff --git a/src/crux/watchdog/login_streak.go b/src/crux/watchdog/login_streak.go new file mode 100644 index 0000000000..20e68509bb --- /dev/null +++ b/src/crux/watchdog/login_streak.go @@ -0,0 +1,20 @@ +package watchdog + +import "time" + +// classifyLocked runs the pane state machine for one agent and layers the +// reconciler's per-agent login streak on top: auth-required only stands once +// the pane has shown login chrome on Settings.LoginStreak consecutive polls. +// A relaunched CLI flashes login chrome for a fraction of a second while it +// re-validates its token, and the manager cannot date every relaunch (the CLI +// re-executing itself, for one), so one sighting must not page an operator +// (#17320). Caller holds r.mu. +func (r *Reconciler) classifyLocked(rec *agentRecord, obs Observation, now time.Time) Classification { + cls := Classify(obs, now, r.settings) + if cls.Class == ClassAuthRequired { + rec.loginStreak++ + } else { + rec.loginStreak = 0 + } + return ApplyLoginStreak(cls, rec.loginStreak, r.settings.LoginStreak) +} diff --git a/src/crux/watchdog/login_streak_test.go b/src/crux/watchdog/login_streak_test.go new file mode 100644 index 0000000000..219dbcac22 --- /dev/null +++ b/src/crux/watchdog/login_streak_test.go @@ -0,0 +1,87 @@ +package watchdog + +import ( + "context" + "strings" + "testing" +) + +// TestAuthLoginStreak pins the reconciler half of #17320: with the default +// LoginStreak, login chrome must persist across consecutive polls before +// Authenticated flips False and an operator is paged. A relaunched CLI that +// flashes login chrome on one poll and is back at its prompt on the next never +// pages; a pane genuinely stuck at login still does once the streak is met. +func TestAuthLoginStreak(t *testing.T) { + loginObs := Observation{ + Backend: "copilot", SessionExists: true, + Pane: loginPane, ShowsLoginPrompt: true, + StartedAt: launchedLongAgo, + } + readyObs := Observation{ + Backend: "copilot", SessionExists: true, + Pane: "● reviewing PR #12", HasCLIMarker: true, + StartedAt: launchedLongAgo, + } + settings := fastSettings() + settings.LoginStreak = DefaultLoginStreak + + t.Run("one-poll relaunch flash never pages", func(t *testing.T) { + fleet := newFakeFleet("a1") + alerter := newFakeAlerter() + r := newTestReconciler(t, settings, fleet, alerter, newFakeClock()) + + fleet.setObs("a1", loginObs) + r.Tick(context.Background()) + auth, _ := FindCondition(r.Conditions("a1"), ConditionAuthenticated) + if auth.Reason == "PaneShowsLogin" { + t.Fatalf("Authenticated = %+v after one sighting, want not PaneShowsLogin", auth) + } + if alerter.has(authAlertID("a1")) { + t.Fatal("one login sighting paged the operator") + } + if got := r.Conditions("a1"); !hasReadyReasonContaining(got, "login chrome seen 1/3 polls") { + t.Fatalf("Ready condition should carry the streak reason, got %+v", got) + } + + fleet.setObs("a1", readyObs) + r.Tick(context.Background()) + fleet.setObs("a1", loginObs) + r.Tick(context.Background()) + fleet.setObs("a1", loginObs) + r.Tick(context.Background()) + // Two sightings after a reset are still below the threshold. + if alerter.has(authAlertID("a1")) { + t.Fatal("streak must reset when the pane leaves login chrome") + } + }) + + t.Run("login chrome on every poll pages at the threshold", func(t *testing.T) { + fleet := newFakeFleet("a1") + alerter := newFakeAlerter() + r := newTestReconciler(t, settings, fleet, alerter, newFakeClock()) + fleet.setObs("a1", loginObs) + + for i := 1; i < DefaultLoginStreak; i++ { + r.Tick(context.Background()) + if alerter.has(authAlertID("a1")) { + t.Fatalf("paged after %d/%d sightings", i, DefaultLoginStreak) + } + } + r.Tick(context.Background()) + auth, _ := FindCondition(r.Conditions("a1"), ConditionAuthenticated) + if auth.Status != ConditionFalse || auth.Reason != "PaneShowsLogin" { + t.Fatalf("Authenticated = %+v at the streak threshold, want False/PaneShowsLogin", auth) + } + if !alerter.has(authAlertID("a1")) { + t.Fatal("a pane stuck at login must still page once the streak is met") + } + if fleet.restartCount() != 0 { + t.Fatal("auth-required must never restart") + } + }) +} + +func hasReadyReasonContaining(conds []Condition, want string) bool { + ready, ok := FindCondition(conds, ConditionReady) + return ok && strings.Contains(ready.Message, want) +} diff --git a/src/crux/watchdog/reconciler.go b/src/crux/watchdog/reconciler.go index d8650fd142..94946f54ef 100644 --- a/src/crux/watchdog/reconciler.go +++ b/src/crux/watchdog/reconciler.go @@ -225,9 +225,9 @@ type agentRecord struct { // alert fire once, not every tick. CrashLooping bool // LastClass is the previous liveness verdict, for transition logging. - LastClass PaneClass - // restartInFlight is true while a restart goroutine is running; the - // reconciler never stacks a second restart on a wedged one. + LastClass PaneClass + loginStreak int // consecutive polls showing login chrome; see classifyLocked + // restartInFlight: a restart goroutine is running; never stack another on a wedged one. restartInFlight bool // restartStartedAt dates the in-flight restart so a wedge past the hard // timeout is alerted on (the control-plane guard for failure mode 4). @@ -503,11 +503,11 @@ func (r *Reconciler) reconcileAgent(ctx context.Context, name string, now time.T r.logger.Warn("watchdog: agent unobservable", "agent", name, "error", err) return } - cls := Classify(obs, now, r.snapshotSettings()) paused := r.fleet.IsPaused(name) r.mu.Lock() rec := r.recordLocked(name) + cls := r.classifyLocked(rec, obs, now) if cls.Class != rec.LastClass { r.logger.Info("watchdog: liveness transition", "agent", name, "from", string(rec.LastClass), "to", string(cls.Class), "reason", cls.Reason) diff --git a/src/crux/watchdog/reconciler_test.go b/src/crux/watchdog/reconciler_test.go index 42a0620105..6ce04bb243 100644 --- a/src/crux/watchdog/reconciler_test.go +++ b/src/crux/watchdog/reconciler_test.go @@ -308,6 +308,9 @@ func fastSettings() Settings { s.Mode = ModeHeal s.ProbeInterval = 0 // every Tick sweeps; interval gating has its own test s.RestartTimeout = 50 * time.Millisecond + // One sighting pages: the auth tests here assert the paging branch itself; + // the multi-poll streak guard has its own test (TestAuthLoginStreak). + s.LoginStreak = 1 return s } diff --git a/src/crux/watchdog/settings.go b/src/crux/watchdog/settings.go index df9f6a3cca..1202e3a61c 100644 --- a/src/crux/watchdog/settings.go +++ b/src/crux/watchdog/settings.go @@ -39,6 +39,12 @@ const ( // Kept numerically equal to that constant rather than importing it, // because pkg/agent imports pkg/watchdog and the reverse would cycle. DefaultBootGrace = 60 * time.Second + // DefaultLoginStreak is how many consecutive watchdog polls must see + // login chrome before the pane is classified auth-required and an + // operator is paged. Mirrors the pane poller's loginStreakRestartMin: a + // relaunched CLI flashes login chrome for well under a second while it + // re-validates its token, and a single sighting is not a logout (#17320). + DefaultLoginStreak = 3 ) // defaultBackoff is the RFC restart ladder; the last entry is the cap. @@ -130,6 +136,7 @@ type Settings struct { StuckOverlayAfter time.Duration ShellPromptAfter time.Duration BootGrace time.Duration + LoginStreak int Backoff []time.Duration CrashLoopAfter int HealthyReset time.Duration @@ -154,6 +161,7 @@ func DefaultSettings() Settings { StuckOverlayAfter: DefaultStuckOverlayAfter, ShellPromptAfter: DefaultShellPromptAfter, BootGrace: DefaultBootGrace, + LoginStreak: DefaultLoginStreak, Backoff: defaultBackoff(), CrashLoopAfter: DefaultCrashLoopAfter, HealthyReset: DefaultHealthyReset, @@ -207,6 +215,11 @@ func SettingsFrom(cfg config.WatchdogConfig) (Settings, []error) { s.StuckOverlayAfter = resolveDuration("watchdog.liveness.stuck_overlay_after", cfg.Liveness.StuckOverlayAfter, DefaultStuckOverlayAfter, &errs) s.ShellPromptAfter = resolveDuration("watchdog.liveness.shell_prompt_after", cfg.Liveness.ShellPromptAfter, DefaultShellPromptAfter, &errs) + if cfg.Liveness.LoginStreak < 0 { + errs = append(errs, fmt.Errorf("watchdog.liveness.login_streak: negative value %d, using default %d", cfg.Liveness.LoginStreak, DefaultLoginStreak)) + } else if cfg.Liveness.LoginStreak > 0 { + s.LoginStreak = cfg.Liveness.LoginStreak + } s.HealthyReset = resolveDuration("watchdog.restart.healthy_reset", cfg.Restart.HealthyReset, DefaultHealthyReset, &errs) s.NoProductionFor = resolveDuration("watchdog.readiness.no_production_for", cfg.Readiness.NoProductionFor, DefaultNoProductionFor, &errs) diff --git a/src/crux/watchdog/settings_test.go b/src/crux/watchdog/settings_test.go index 44fa32f327..3447e1cce8 100644 --- a/src/crux/watchdog/settings_test.go +++ b/src/crux/watchdog/settings_test.go @@ -23,6 +23,7 @@ func TestSettingsFromZeroValueIsRFCDefaults(t *testing.T) { s.StuckOverlayAfter != want.StuckOverlayAfter || s.ShellPromptAfter != want.ShellPromptAfter || s.CrashLoopAfter != want.CrashLoopAfter || + s.LoginStreak != want.LoginStreak || s.HealthyReset != want.HealthyReset || s.NoProductionFor != want.NoProductionFor || s.RestartTimeout != want.RestartTimeout { @@ -41,6 +42,7 @@ func TestSettingsFromExplicitValues(t *testing.T) { Liveness: config.WatchdogLivenessConfig{ StuckOverlayAfter: "3m", ShellPromptAfter: "90s", + LoginStreak: 5, }, Restart: config.WatchdogRestartConfig{ Backoff: []string{"30s", "1m"}, @@ -58,7 +60,7 @@ func TestSettingsFromExplicitValues(t *testing.T) { t.Fatal("explicit enabled:false must map to mode off, and auth_probe:false must win") } if s.ProbeInterval != time.Minute || s.StuckOverlayAfter != 3*time.Minute || - s.ShellPromptAfter != 90*time.Second || s.CrashLoopAfter != 2 || + s.ShellPromptAfter != 90*time.Second || s.CrashLoopAfter != 2 || s.LoginStreak != 5 || s.HealthyReset != 10*time.Minute || s.NoProductionFor != 2*time.Hour { t.Fatalf("explicit values not honored: %+v", s) } @@ -73,6 +75,7 @@ func TestSettingsFromInvalidValuesFallBackLoudly(t *testing.T) { Liveness: config.WatchdogLivenessConfig{ StuckOverlayAfter: "not-a-duration", ShellPromptAfter: "-5m", + LoginStreak: -1, }, Restart: config.WatchdogRestartConfig{ Backoff: []string{"1m", "banana"}, @@ -83,14 +86,16 @@ func TestSettingsFromInvalidValuesFallBackLoudly(t *testing.T) { } s, errs := SettingsFrom(cfg) // One error per invalid field: probe interval, two liveness durations, - // backoff entry, crash-loop count, healthy reset, no-production-for. - const wantErrs = 7 + // login streak, backoff entry, crash-loop count, healthy reset, + // no-production-for. + const wantErrs = 8 if len(errs) != wantErrs { t.Fatalf("want %d config errors, got %d: %v", wantErrs, len(errs), errs) } want := DefaultSettings() if s.ProbeInterval != want.ProbeInterval || s.StuckOverlayAfter != want.StuckOverlayAfter || s.ShellPromptAfter != want.ShellPromptAfter || s.CrashLoopAfter != want.CrashLoopAfter || + s.LoginStreak != want.LoginStreak || s.HealthyReset != want.HealthyReset || s.NoProductionFor != want.NoProductionFor { t.Fatalf("invalid fields must fall back to defaults: %+v", s) } diff --git a/src/docs/agent-watchdog.md b/src/docs/agent-watchdog.md index 5cccabdcd7..bd6493d35f 100644 --- a/src/docs/agent-watchdog.md +++ b/src/docs/agent-watchdog.md @@ -28,9 +28,16 @@ launched, running, unpaused agent: restarts until a human (or the resume API) intervenes. A continuous-ready window of `healthy_reset` (default 30m) clears the failure counter. 4. **Auth probing** — a pane sitting at a login screen sets - `Authenticated=False` and raises an alert but deliberately does **not** - restart: restarting into a dead credential is the 1042-restart loop the - RFC documents. Provider-level credential probes reuse the rotation + `Authenticated=False` (reason `PaneShowsLogin`) and raises an alert but + deliberately does **not** restart: restarting into a dead credential is + the 1042-restart loop the RFC documents. Two guards keep a CLI's own + startup handshake from paging anyone: login chrome is ignored inside the + boot grace of the agent's most recent CLI (re)launch — a kick restart or + memory-drain recycle hours into an agent's life boots exactly like a fresh + start — and it must persist for `liveness.login_streak` consecutive polls + (default 3; one sighting reports `Ready=Unknown` with reason + `login chrome seen 1/3 polls`) before it counts, mirroring the pane + poller's own `loginStreak` guard. Provider-level credential probes reuse the rotation package's probers (Claude OAuth usage, Codex app-server handshake, Agy headless usage, DeepSeek balance) and the owner-aware per-agent credential check (per-agent `$HOME` layouts, 0600 session files). @@ -125,6 +132,7 @@ governor: liveness: stuck_overlay_after: 10m shell_prompt_after: 5m + login_streak: 3 # consecutive polls of login chrome before auth-required restart: backoff: [1m, 2m, 4m, 8m, 16m] crash_loop_after: 5 diff --git a/src/pkg/config/testdata/agent_runtime_golden.json b/src/pkg/config/testdata/agent_runtime_golden.json index d089227a15..b5201ad0d5 100644 --- a/src/pkg/config/testdata/agent_runtime_golden.json +++ b/src/pkg/config/testdata/agent_runtime_golden.json @@ -265,7 +265,8 @@ "ProbeIntervalS": 45, "Liveness": { "StuckOverlayAfter": "10m", - "ShellPromptAfter": "3m" + "ShellPromptAfter": "3m", + "LoginStreak": 0 }, "Restart": { "Backoff": [ diff --git a/src/pkg/dashboard/static-src/js/config-governor.js b/src/pkg/dashboard/static-src/js/config-governor.js index 5fc0bed3c5..454d97282e 100644 --- a/src/pkg/dashboard/static-src/js/config-governor.js +++ b/src/pkg/dashboard/static-src/js/config-governor.js @@ -1780,7 +1780,7 @@

Observes each agent's actual terminal rather than its configured state, and can restart agents that are running but dead.

-

YAML keys: governor.watchdog.enabled, governor.watchdog.mode, governor.watchdog.auth_probe, governor.watchdog.probe_interval_s, governor.watchdog.liveness.shell_prompt_after, governor.watchdog.liveness.stuck_overlay_after, governor.watchdog.readiness.no_production_for, governor.watchdog.restart.backoff[], governor.watchdog.restart.crash_loop_after, governor.watchdog.restart.healthy_reset.

+

YAML keys: governor.watchdog.enabled, governor.watchdog.mode, governor.watchdog.auth_probe, governor.watchdog.probe_interval_s, governor.watchdog.liveness.login_streak, governor.watchdog.liveness.shell_prompt_after, governor.watchdog.liveness.stuck_overlay_after, governor.watchdog.readiness.no_production_for, governor.watchdog.restart.backoff[], governor.watchdog.restart.crash_loop_after, governor.watchdog.restart.healthy_reset.

${pausedBanner}${healBanner}${observeBanner} ${renderWatchdogActivityShell()}
diff --git a/src/pkg/dashboard/static-src/js/config-state.js b/src/pkg/dashboard/static-src/js/config-state.js index 56c91e8531..bdecee1865 100644 --- a/src/pkg/dashboard/static-src/js/config-state.js +++ b/src/pkg/dashboard/static-src/js/config-state.js @@ -96,7 +96,7 @@ { tab: 'Features', section: 'Agents & tooling', label: 'Provider rotation thresholds', key: 'governor.rotation.threshold_pct', text: 'provider rotation threshold percent high volume cadence subscription exhausted governor.rotation.threshold_pct governor.rotation.high_volume_cadence_s headroom source ccleft builtin governor.rotation.headroom_source' }, { tab: 'Features', section: 'Agents & tooling', label: 'Trajectory review', key: 'governor.trajectory.enabled', text: 'trajectory review reviewer model interval endpoint transcript lines divergence pause alert governor.trajectory.enabled governor.trajectory.model governor.trajectory.interval_s governor.trajectory.endpoint governor.trajectory.transcript_lines governor.trajectory.on_divergence' }, { tab: 'Health', section: 'Watchdog', label: 'Watchdog', key: 'governor.watchdog', text: 'watchdog activity stale agent detection health restart alerts' }, - { tab: 'Health', section: 'Watchdog', label: 'Watchdog details', key: 'governor.watchdog.probe_interval_s', text: 'governor watchdog auth probe enabled liveness readiness restart backoff crash loop healthy reset stuck overlay production shell prompt governor.watchdog.auth_probe governor.watchdog.enabled governor.watchdog.liveness.shell_prompt_after governor.watchdog.liveness.stuck_overlay_after governor.watchdog.mode governor.watchdog.probe_interval_s governor.watchdog.readiness.no_production_for governor.watchdog.restart.backoff[] governor.watchdog.restart.crash_loop_after governor.watchdog.restart.healthy_reset' }, + { tab: 'Health', section: 'Watchdog', label: 'Watchdog details', key: 'governor.watchdog.probe_interval_s', text: 'governor watchdog auth probe enabled liveness readiness restart backoff crash loop healthy reset stuck overlay production shell prompt login streak governor.watchdog.auth_probe governor.watchdog.enabled governor.watchdog.liveness.login_streak governor.watchdog.liveness.shell_prompt_after governor.watchdog.liveness.stuck_overlay_after governor.watchdog.mode governor.watchdog.probe_interval_s governor.watchdog.readiness.no_production_for governor.watchdog.restart.backoff[] governor.watchdog.restart.crash_loop_after governor.watchdog.restart.healthy_reset' }, { tab: 'Security', section: 'Input Defense', label: 'ioscan', key: 'ioscan.enabled', text: 'ioscan input output scanning canaries fail mode classifier model warn block threshold ioscan.canaries ioscan.classifier.block_threshold ioscan.classifier.enabled ioscan.classifier.model ioscan.classifier.warn_threshold ioscan.enabled ioscan.fail_mode' }, { tab: 'Features', section: 'Quality loops & release health', label: 'Retro loop', key: 'retro.enabled', text: 'retro loop quality post-completion analysis model scan interval fix attempts kicks long stall recent closed window retro.enabled retro.analysis_model retro.scan_interval_s retro.max_fix_attempts retro.max_kicks retro.long_stall_days retro.recent_closed_window_s' }, { tab: 'Features', section: 'Work intake & issue lifecycle', label: 'Close issues on merge', key: 'issues.close_on_merge', text: 'issues close on merge reporter confirmation sweep backfill recheck interval issues.close_on_merge issues.close_on_merge_interval issues.close_on_merge_backfill_interval issues.close_on_merge_recheck issues.reporter_confirmation' }, diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index c39d4f938c..2e08ed3edb 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -53505,7 +53505,7 @@

Configure LiteLLM

{ tab: 'Features', section: 'Agents & tooling', label: 'Provider rotation thresholds', key: 'governor.rotation.threshold_pct', text: 'provider rotation threshold percent high volume cadence subscription exhausted governor.rotation.threshold_pct governor.rotation.high_volume_cadence_s headroom source ccleft builtin governor.rotation.headroom_source' }, { tab: 'Features', section: 'Agents & tooling', label: 'Trajectory review', key: 'governor.trajectory.enabled', text: 'trajectory review reviewer model interval endpoint transcript lines divergence pause alert governor.trajectory.enabled governor.trajectory.model governor.trajectory.interval_s governor.trajectory.endpoint governor.trajectory.transcript_lines governor.trajectory.on_divergence' }, { tab: 'Health', section: 'Watchdog', label: 'Watchdog', key: 'governor.watchdog', text: 'watchdog activity stale agent detection health restart alerts' }, - { tab: 'Health', section: 'Watchdog', label: 'Watchdog details', key: 'governor.watchdog.probe_interval_s', text: 'governor watchdog auth probe enabled liveness readiness restart backoff crash loop healthy reset stuck overlay production shell prompt governor.watchdog.auth_probe governor.watchdog.enabled governor.watchdog.liveness.shell_prompt_after governor.watchdog.liveness.stuck_overlay_after governor.watchdog.mode governor.watchdog.probe_interval_s governor.watchdog.readiness.no_production_for governor.watchdog.restart.backoff[] governor.watchdog.restart.crash_loop_after governor.watchdog.restart.healthy_reset' }, + { tab: 'Health', section: 'Watchdog', label: 'Watchdog details', key: 'governor.watchdog.probe_interval_s', text: 'governor watchdog auth probe enabled liveness readiness restart backoff crash loop healthy reset stuck overlay production shell prompt login streak governor.watchdog.auth_probe governor.watchdog.enabled governor.watchdog.liveness.login_streak governor.watchdog.liveness.shell_prompt_after governor.watchdog.liveness.stuck_overlay_after governor.watchdog.mode governor.watchdog.probe_interval_s governor.watchdog.readiness.no_production_for governor.watchdog.restart.backoff[] governor.watchdog.restart.crash_loop_after governor.watchdog.restart.healthy_reset' }, { tab: 'Security', section: 'Input Defense', label: 'ioscan', key: 'ioscan.enabled', text: 'ioscan input output scanning canaries fail mode classifier model warn block threshold ioscan.canaries ioscan.classifier.block_threshold ioscan.classifier.enabled ioscan.classifier.model ioscan.classifier.warn_threshold ioscan.enabled ioscan.fail_mode' }, { tab: 'Features', section: 'Quality loops & release health', label: 'Retro loop', key: 'retro.enabled', text: 'retro loop quality post-completion analysis model scan interval fix attempts kicks long stall recent closed window retro.enabled retro.analysis_model retro.scan_interval_s retro.max_fix_attempts retro.max_kicks retro.long_stall_days retro.recent_closed_window_s' }, { tab: 'Features', section: 'Work intake & issue lifecycle', label: 'Close issues on merge', key: 'issues.close_on_merge', text: 'issues close on merge reporter confirmation sweep backfill recheck interval issues.close_on_merge issues.close_on_merge_interval issues.close_on_merge_backfill_interval issues.close_on_merge_recheck issues.reporter_confirmation' }, @@ -61367,7 +61367,7 @@

Agent Watchdog

Observes each agent's actual terminal rather than its configured state, and can restart agents that are running but dead.

-

YAML keys: governor.watchdog.enabled, governor.watchdog.mode, governor.watchdog.auth_probe, governor.watchdog.probe_interval_s, governor.watchdog.liveness.shell_prompt_after, governor.watchdog.liveness.stuck_overlay_after, governor.watchdog.readiness.no_production_for, governor.watchdog.restart.backoff[], governor.watchdog.restart.crash_loop_after, governor.watchdog.restart.healthy_reset.

+

YAML keys: governor.watchdog.enabled, governor.watchdog.mode, governor.watchdog.auth_probe, governor.watchdog.probe_interval_s, governor.watchdog.liveness.login_streak, governor.watchdog.liveness.shell_prompt_after, governor.watchdog.liveness.stuck_overlay_after, governor.watchdog.readiness.no_production_for, governor.watchdog.restart.backoff[], governor.watchdog.restart.crash_loop_after, governor.watchdog.restart.healthy_reset.

${pausedBanner}${healBanner}${observeBanner} ${renderWatchdogActivityShell()}
From cfdff40c03bfa4bfe492f3ffa4aa05be3cbb5c54 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Sun, 8 Nov 2026 20:33:20 -0500 Subject: [PATCH 017/123] dashboard: widen the Recent merges popover so titles are readable (#17326) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The popover opened from the Merged pill was capped at 34rem, so every PR title ellipsised at ~40 characters. Set it to 52rem, capped to the viewport and to the sticky bar that clips it (it is right-anchored under the pill and grows leftward). The title column is the grid's only flexible track, so the width goes to titles; the by/lane/time meta column keeps its natural nowrap width. The merge-queue popover keeps its old 22–34rem sizing and the ≤720px phone sheet is a separate dialog and is unchanged. Signed-off-by: Andrew Anderson --- changelog.d/fixed-recent-merges-popover-width.md | 1 + src/pkg/dashboard/static-src/css/tracker.css | 9 ++++++++- src/pkg/dashboard/static/index.html | 9 ++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 changelog.d/fixed-recent-merges-popover-width.md diff --git a/changelog.d/fixed-recent-merges-popover-width.md b/changelog.d/fixed-recent-merges-popover-width.md new file mode 100644 index 0000000000..668e034156 --- /dev/null +++ b/changelog.d/fixed-recent-merges-popover-width.md @@ -0,0 +1 @@ +- dashboard: the Recent merges popover is 52rem wide (was capped at 34rem) so PR titles read instead of ellipsising; it stays right-anchored under the Merged pill, capped to the viewport and its bar, and the phone full-width sheet is unchanged. diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index 1d4e30996c..94ee1bd4ee 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -733,7 +733,13 @@ .ham-merged-count .ham-merged-n .ham-odo-col .ham-odo-d { height: 1.5em; line-height: 1.5; } body.light-mode .ham-merged-count .ham-merged-n .ham-odo-col { color: var(--text); } body.light-mode .ham-merged-count .ham-merged-n .ham-odo { --ham-odo-track: color-mix(in srgb, var(--panel) 96%, black); } - .ham-merged-pop { position: absolute; right: var(--sp-2); top: calc(var(--full-size) - var(--sp-1)); min-width: 22rem; max-width: 34rem; max-height: 60vh; overflow: auto; padding: var(--sp-4) var(--sp-5); border: var(--line-width) solid var(--line); border-radius: var(--r-lg); background: var(--panel-strong); box-shadow: var(--shadow-raised); font-size: var(--fs-sm); color: var(--text); z-index: var(--z-cue-flight); } + /* Recent merges: a 52rem card (was capped at 34rem) so PR titles read + instead of ellipsising at ~40 chars; the title column is the only + flexible one, so the width goes to it. Right-anchored under the pill + it grows leftward, capped to the viewport and to the sticky bar it + sits in (which clips its overflow). The phone tier is a separate + .ham-pop-sheet dialog and is not affected. */ + .ham-merged-pop { position: absolute; right: var(--sp-2); top: calc(var(--full-size) - var(--sp-1)); width: 52rem; max-width: min(calc(100vw - 2rem), calc(100% - 2 * var(--sp-2))); max-height: 60vh; overflow: auto; padding: var(--sp-4) var(--sp-5); border: var(--line-width) solid var(--line); border-radius: var(--r-lg); background: var(--panel-strong); box-shadow: var(--shadow-raised); font-size: var(--fs-sm); color: var(--text); z-index: var(--z-cue-flight); } .ham-merged-pop-head { display: flex; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-3); font-weight: var(--fw-semibold); } .ham-merged-pop-head .ham-merged-pop-sum { color: var(--text-faint); font-weight: var(--fw-medium); } .ham-merged-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); } @@ -742,6 +748,7 @@ .ham-merged-list .ham-merged-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ham-merged-list .ham-merged-meta { color: var(--text-faint); white-space: nowrap; font-size: var(--fs-xs); } .ham-merged-pop .ham-empty { padding: var(--sp-2) 0; } + .ham-queue-pop { width: auto; min-width: 22rem; max-width: 34rem; } .ham-merged-pop-foot { margin-top: var(--sp-3); color: var(--text-faint); font-size: var(--fs-xs); } .ham-merged-list .ham-merged-repo { display: none; } @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) { diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 2e08ed3edb..eadab9f7bc 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -2076,7 +2076,13 @@ .ham-merged-count .ham-merged-n .ham-odo-col .ham-odo-d { height: 1.5em; line-height: 1.5; } body.light-mode .ham-merged-count .ham-merged-n .ham-odo-col { color: var(--text); } body.light-mode .ham-merged-count .ham-merged-n .ham-odo { --ham-odo-track: color-mix(in srgb, var(--panel) 96%, black); } - .ham-merged-pop { position: absolute; right: var(--sp-2); top: calc(var(--full-size) - var(--sp-1)); min-width: 22rem; max-width: 34rem; max-height: 60vh; overflow: auto; padding: var(--sp-4) var(--sp-5); border: var(--line-width) solid var(--line); border-radius: var(--r-lg); background: var(--panel-strong); box-shadow: var(--shadow-raised); font-size: var(--fs-sm); color: var(--text); z-index: var(--z-cue-flight); } + /* Recent merges: a 52rem card (was capped at 34rem) so PR titles read + instead of ellipsising at ~40 chars; the title column is the only + flexible one, so the width goes to it. Right-anchored under the pill + it grows leftward, capped to the viewport and to the sticky bar it + sits in (which clips its overflow). The phone tier is a separate + .ham-pop-sheet dialog and is not affected. */ + .ham-merged-pop { position: absolute; right: var(--sp-2); top: calc(var(--full-size) - var(--sp-1)); width: 52rem; max-width: min(calc(100vw - 2rem), calc(100% - 2 * var(--sp-2))); max-height: 60vh; overflow: auto; padding: var(--sp-4) var(--sp-5); border: var(--line-width) solid var(--line); border-radius: var(--r-lg); background: var(--panel-strong); box-shadow: var(--shadow-raised); font-size: var(--fs-sm); color: var(--text); z-index: var(--z-cue-flight); } .ham-merged-pop-head { display: flex; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-3); font-weight: var(--fw-semibold); } .ham-merged-pop-head .ham-merged-pop-sum { color: var(--text-faint); font-weight: var(--fw-medium); } .ham-merged-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); } @@ -2085,6 +2091,7 @@ .ham-merged-list .ham-merged-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ham-merged-list .ham-merged-meta { color: var(--text-faint); white-space: nowrap; font-size: var(--fs-xs); } .ham-merged-pop .ham-empty { padding: var(--sp-2) 0; } + .ham-queue-pop { width: auto; min-width: 22rem; max-width: 34rem; } .ham-merged-pop-foot { margin-top: var(--sp-3); color: var(--text-faint); font-size: var(--fs-xs); } .ham-merged-list .ham-merged-repo { display: none; } @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) { From 2fd05e683cea9105a4600afd39e5c63af0a8811b Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Sun, 8 Nov 2026 20:39:23 -0500 Subject: [PATCH 018/123] =?UTF-8?q?=F0=9F=90=9B=20Activity=20Monitor:=20se?= =?UTF-8?q?condary=20issue=20of=20a=20shared=20PR=20rides=20the=20PR's=20l?= =?UTF-8?q?ane=20(#17325)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A PR closing two issues is drawn once, under the lower issue; the other issue chips to it. Its row fell back to the issue's own 030/040 stage for the lane while the merge-gate word still came from the PR, so #17302 read "Soaking · 47s left" in the PR in progress lane while #17292 soaked in the Merge queue. stageTrackerLinkedRiding picks the furthest covering PR drawn elsewhere and the row, column map and sort order ride its stage; the PR column stays empty and the "under #M" chip still names the PR. Fixes #17324 Signed-off-by: Andrew Anderson --- .../fixed-shared-pr-secondary-row-lane.md | 1 + .../stage_tracker_actor_icon_test.go | 29 ++++++++++-- .../dashboard/stage_tracker_motion_test.go | 6 +++ .../stage_tracker_ui_prelude_test.go | 1 + .../dashboard/static-src/js/tracker-motion.js | 3 +- .../static-src/js/tracker-row-layout.js | 19 +++++++- .../static-src/js/tracker-row-render.js | 24 ++++++---- src/pkg/dashboard/static/index.html | 46 ++++++++++++++----- 8 files changed, 104 insertions(+), 25 deletions(-) create mode 100644 changelog.d/fixed-shared-pr-secondary-row-lane.md diff --git a/changelog.d/fixed-shared-pr-secondary-row-lane.md b/changelog.d/fixed-shared-pr-secondary-row-lane.md new file mode 100644 index 0000000000..746c05682c --- /dev/null +++ b/changelog.d/fixed-shared-pr-secondary-row-lane.md @@ -0,0 +1 @@ +- Activity Monitor: a secondary issue that shares a PR with another issue (its row shows the compact "↳ #PR · under #primary" chip) now lights the PR's lane — CI / Review, Merge queue (soaking), Merged — like the primary row, instead of wearing the PR's stage word in the "PR in progress" lane (hivecommons/hive#17324). diff --git a/src/pkg/dashboard/stage_tracker_actor_icon_test.go b/src/pkg/dashboard/stage_tracker_actor_icon_test.go index cbafb2f13e..2c91964f1b 100644 --- a/src/pkg/dashboard/stage_tracker_actor_icon_test.go +++ b/src/pkg/dashboard/stage_tracker_actor_icon_test.go @@ -150,15 +150,38 @@ assert.strictEqual(strips(row).length, 1); assert.ok(row.includes('Remediating · fixer') && row.includes('aria-label="Next move: hive"'), row); assert.deepStrictEqual(elsewhere(row), [], 'owner carries no elsewhere chip'); -// The other issue does not redraw the PR: its own strip (040 Covered by PR) and a chip pointing at the owner row. +// The other issue does not redraw the PR (no PR column entry, no sub-row) and +// chips to the owner row — but its strip rides the PR's stage all the same: +// the lane is the PR's, not the issue's role (hivecommons/hive#17324). row = stageTrackerRowHtml(issue(14911, [lp(14921, 14910)]), stages, ctx); assert.strictEqual(prCol(row).length, 0, 'the PR column is empty, no second ↳ #14921 row: ' + row); assert.strictEqual(subs(row).length, 0); assert.strictEqual(strips(row).length, 1); -assert.ok(strip(row).includes('PR in progress') && strip(row).includes('title="Covered by PR'), 'the issue draws its own 040 stage (lit at the PR column): ' + strip(row)); +assert.ok(strip(row).includes('Remediating · fixer'), 'the secondary rides the PR\'s 070 lane like the owner: ' + strip(row)); +assert.ok(!strip(row).includes('title="Covered by PR'), 'not the issue\'s own 040: ' + strip(row)); assert.deepStrictEqual(elsewhere(row), [{ title: 'PR #14921 covers this issue too; its row is drawn under #14910', text: '↳ #14921 · under #14910' }]); -assert.ok(!/(?:Fixing|Remediating)<\/span>/.test(strip(row)), 'no second lit remediation pill'); assert.ok(tooltip(row).includes('Covering PR: #14921'), 'the row tooltip still names the covering PR'); +assert.strictEqual(stageTrackerLinkedRiding(issue(14911, [lp(14921, 14910)]), stages).number, 14921); +assert.strictEqual(stageTrackerLinkedRiding(issue(14910, [lp(14921, 14910)]), stages), null, 'drawn here → not riding'); +assert.strictEqual(stageTrackerLinkedRiding(issue(14911, [lp(14921, 14910, { state: 'closed' })]), stages), null, 'a closed PR drawn elsewhere drives nothing'); +assert.strictEqual(stageTrackerLinkedRiding(issue(14911, [lp(14921, 14910, { stage: 50 }), lp(14922, 14910, { stage: 80 })]), stages).number, 14922, 'furthest along first'); + +// hivecommons/hive#17324: PR #17308 closes #17292 (primary) and #17302; it +// is soaking in the merge queue. Both rows light the Merge queue lane with +// the soak word — #17302 used to show "Soaking" in the PR in progress lane. +const soakUntil = new Date(now + 47000).toISOString(); +const soaking = (under) => ({ number: 17308, title: 'fix', url: 'https://x/17308', author: 'hive-bot', author_kind: 'hive', stage: 95, stage_since: since, drawn_under: under, head: 'head', + caption: 'Soaking', merge_gate: { state: 'soaking', soak_until: soakUntil, soak_remaining_seconds: 47 }, soak_remaining_seconds: 47, stage_actor: { kind: 'hive', login: '', why: 'the lane holds it for the soak' } }); +const primary = stageTrackerRowHtml(Object.assign(issue(17292, [soaking(17292)]), { stage: 40 }), stages, ctx); +const secondary = stageTrackerRowHtml(Object.assign(issue(17302, [soaking(17292)]), { stage: 30 }), stages, ctx); +const lit = (html) => (/
  • ]*data-ham-stage="(\d+)"/.exec(strip(html)) || [])[1] || (/
  • ]*title="([^"]*)"/.exec(strip(html)) || [])[1] || ''; +assert.strictEqual(prCol(primary).length, 1, primary); +assert.strictEqual(prCol(secondary).length, 0, 'the secondary keeps its chip, not the PR title: ' + secondary); +assert.deepStrictEqual(elsewhere(secondary).map(e => e.text), ['↳ #17308 · under #17292']); +assert.ok(strip(primary).includes('Soaking'), 'primary soaks: ' + strip(primary)); +assert.ok(strip(secondary).includes('Soaking'), 'secondary soaks: ' + strip(secondary)); +assert.strictEqual(lit(secondary), lit(primary), 'the same chevron is lit on both rows: ' + lit(primary) + ' vs ' + lit(secondary)); +assert.ok(!strip(secondary).includes('PR in progress'), 'the secondary no longer lights PR in progress: ' + strip(secondary)); // Several PRs: the ones drawn here are sorted and drawn, the rest become chips. row = stageTrackerRowHtml(issue(14912, [lp(14921, 14910), lp(14930, 14912), lp(14931, 14912, { stage: 50 })]), stages, ctx); diff --git a/src/pkg/dashboard/stage_tracker_motion_test.go b/src/pkg/dashboard/stage_tracker_motion_test.go index 0332a9d630..133a5499ce 100644 --- a/src/pkg/dashboard/stage_tracker_motion_test.go +++ b/src/pkg/dashboard/stage_tracker_motion_test.go @@ -278,6 +278,7 @@ func TestStageTrackerMotionDetector(t *testing.T) { jsFunc(t, html, "stageTrackerLinkedSupersededGone"), jsFunc(t, html, "stageTrackerLinkedSupersededTip"), jsFunc(t, html, "stageTrackerLinkedSorted"), + jsFunc(t, html, "stageTrackerLinkedRiding"), jsConstLine(t, html, "STAGE_TRACKER_ATTENTION_STAGES"), jsConstLine(t, html, "STAGE_TRACKER_HUMAN_MODS"), jsFunc(t, html, "stageTrackerRegressionHandled"), @@ -312,6 +313,11 @@ const I = (n, stage, linked) => ({ kind: 'issue', repo: 'a/b', number: n, stage, // Column map: plain items, an issue riding its single covering PR, nested PRs keyed on their own. assert.deepStrictEqual(stageTrackerColMap([P(1, 50), I(2, 20), I(3, 20, [{ number: 9, stage: 30 }]), I(4, 20, [{ number: 7, stage: 50 }, { number: 8, stage: 80 }])], stages), { 'a/b/pr#1': 4, 'a/b/issue#2': 2, 'a/b/issue#3': 3, 'a/b/pr#9': 3, 'a/b/issue#4': 2, 'a/b/pr#7': 4, 'a/b/pr#8': 6 }); +// A PR closing two issues is drawn under the lower one (drawn_under); the +// other issue still rides the PR's column — the lane is the PR's, not the +// issue's own 030/040 (hivecommons/hive#17324). +assert.deepStrictEqual(stageTrackerColMap([I(10, 40, [{ number: 12, stage: 95, drawn_under: 10 }]), I(11, 30, [{ number: 12, stage: 95, drawn_under: 10 }])], stages), + { 'a/b/issue#10': 6, 'a/b/pr#12': 6, 'a/b/issue#11': 6 }, 'the secondary issue lights the Merge queue column with the primary'); assert.deepStrictEqual(stageTrackerColMap(null, stages), {}); assert.deepStrictEqual(stageTrackerColMap([{ kind: 'pr', repo: 'a/b', number: 0 }, null], stages), {}, 'items without a number are skipped'); diff --git a/src/pkg/dashboard/stage_tracker_ui_prelude_test.go b/src/pkg/dashboard/stage_tracker_ui_prelude_test.go index de9a7331b1..9e38f56b48 100644 --- a/src/pkg/dashboard/stage_tracker_ui_prelude_test.go +++ b/src/pkg/dashboard/stage_tracker_ui_prelude_test.go @@ -160,6 +160,7 @@ func stageTrackerRowsPreludeJS(t *testing.T, html string) string { jsFunc(t, html, "stageTrackerLinkedSupersededGone"), jsFunc(t, html, "stageTrackerLinkedSupersededTip"), jsFunc(t, html, "stageTrackerLinkedSorted"), + jsFunc(t, html, "stageTrackerLinkedRiding"), stageTrackerTierJS(t, html), jsConstLine(t, html, "STAGE_TRACKER_COVERED_BY_PR"), jsFunc(t, html, "stageTrackerLeadStage"), diff --git a/src/pkg/dashboard/static-src/js/tracker-motion.js b/src/pkg/dashboard/static-src/js/tracker-motion.js index 10147310b2..062e07c7b1 100644 --- a/src/pkg/dashboard/static-src/js/tracker-motion.js +++ b/src/pkg/dashboard/static-src/js/tracker-motion.js @@ -487,7 +487,8 @@ for (const it of items) { if (!it || !it.kind || !(Number(it.number) > 0)) continue; const linked = it.kind === 'issue' ? stageTrackerLinkedSorted(it, stages).filter(lp => lp && Number(lp.number) > 0) : []; - const shown = linked.length === 1 ? Object.assign({}, it, { via_pr: true, stage: linked[0].stage || 40, display_column: linked[0].display_column || 0, head: linked[0].head, code_activity: linked[0].code_activity }) : it; + const ride = linked.length === 1 ? linked[0] : (!linked.length && typeof stageTrackerLinkedRiding === 'function' ? stageTrackerLinkedRiding(it, stages) : null); + const shown = ride ? Object.assign({}, it, { via_pr: true, stage: ride.stage || 40, display_column: ride.display_column || 0, head: ride.head, code_activity: ride.code_activity }) : it; out[stageTrackerItemKey(it)] = stageTrackerColIndex(shown, stages); for (const lp of linked) out[stageTrackerItemKey({ repo: it.repo, kind: 'pr', number: lp.number })] = stageTrackerColIndex({ kind: 'pr', stage: lp.stage || 0, display_column: lp.display_column || 0, head: lp.head, code_activity: lp.code_activity }, stages); } diff --git a/src/pkg/dashboard/static-src/js/tracker-row-layout.js b/src/pkg/dashboard/static-src/js/tracker-row-layout.js index b5bcb2388a..094fc8bdd7 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-layout.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-layout.js @@ -296,6 +296,20 @@ const sinceOf = lp => Date.parse(lp.stage_since || '') || Infinity; return linked.sort((x, y) => (stageTrackerAnchor(y.stage, stages, 'pr', y, false) - stageTrackerAnchor(x.stage, stages, 'pr', x, false)) || (stageTrackerAttentionTier(x) - stageTrackerAttentionTier(y)) || (sinceOf(x) - sinceOf(y)) || ((x.number || 0) - (y.number || 0))); } + // Pure: the covering PR an issue row rides when every PR covering it is + // drawn under another row (its "↳ #N · under #M" chips): the furthest + // along of them (stageTrackerLinkedSorted's order), or null when one is + // drawn here or none covers it. The stage position is the PR's, not + // the issue's role — a secondary issue of a shared PR lights the same + // lane as the primary (soaking in the Merge queue, not "PR in progress" + // wearing the soak word; hivecommons/hive#17324) while its chip, not + // the PR title, names the PR. + function stageTrackerLinkedRiding(item, stages) { + if (!item || item.kind !== 'issue' || !Array.isArray(item.linked_prs) || stageTrackerLinkedSorted(item, stages).length) return null; + const elsewhere = item.linked_prs.filter(lp => lp && Number(lp.number) > 0 && !stageTrackerLinkedDrawnHere(lp, item) && !stageTrackerLinkedSupersededGone(lp, item)); + const first = stageTrackerLinkedSorted(Object.assign({}, item, { linked_prs: elsewhere.map(lp => Object.assign({}, lp, { drawn_under: 0 })) }), stages)[0]; + return first ? elsewhere.find(lp => Number(lp.number) === Number(first.number)) || null : null; + } // Pure: a PR whose drawn_under issue is not a row of this page (filtered // out or on another page) would otherwise be drawn nowhere. The first @@ -336,8 +350,9 @@ // — its furthest covering PR, else the issue itself. function stageTrackerLead(item, stages) { const linked = item.kind === 'issue' ? stageTrackerLinkedSorted(item, stages) : []; - if (!linked.length) return { lead: item, kind: item.kind, stage: Number(item.stage) || 0, since: item.stage_since || '' }; - const lp = linked[0]; + // Guarded: test harnesses lift this function by name without stageTrackerLinkedRiding. + const lp = linked[0] || (typeof stageTrackerLinkedRiding === 'function' ? stageTrackerLinkedRiding(item, stages) : null); + if (!lp) return { lead: item, kind: item.kind, stage: Number(item.stage) || 0, since: item.stage_since || '' }; return { lead: lp, kind: 'pr', stage: stageTrackerLeadStage(lp), since: lp.stage_since || item.stage_since || '' }; } // List order: furthest along the strip first — a covered issue counts as diff --git a/src/pkg/dashboard/static-src/js/tracker-row-render.js b/src/pkg/dashboard/static-src/js/tracker-row-render.js index 8dcd76467d..848be5a9e4 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-render.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-render.js @@ -98,14 +98,22 @@ const linked = stageTrackerLinkedSorted(item, stages); // The primary (first-sorted) PR's base; an issue with no PR shows none. if (linked.length) basePill = stageTrackerBasePillHtml(linked[0].base_ref, linked[0].number); - if (linked.length === 1) { - // One covering PR: a single entry whose strip the PR's stage drives. - const lp = linked[0]; - const pr = stageTrackerLinkedPRItem(item, lp); - prTargetKey = stageTrackerItemKey(pr); - const who = (lp.author_kind || 'hive') + (lp.author ? ' · @' + lp.author : ''); - const lineage = (lp.lineage && typeof stageTrackerLineageChipHtml === 'function' ? stageTrackerLineageChipHtml(lp, nowMs) : '') || (typeof stageTrackerAdoptedFromChipHtml === 'function' ? stageTrackerAdoptedFromChipHtml(lp, nowMs) : ''); - prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage) : (lineage || null))]; + // One covering PR drawn here, or every covering PR drawn under + // another row (hivecommons/hive#17324): a single entry whose strip + // the PR's stage drives. Only the PR drawn here takes the PR column; + // a PR drawn elsewhere is named by the "under #M" chip in the lead + // cell and the PR column stays empty. + // Guarded: test harnesses lift this function by name without stageTrackerLinkedRiding. + const riding = linked.length === 1 ? linked[0] : (!linked.length && typeof stageTrackerLinkedRiding === 'function' ? stageTrackerLinkedRiding(item, stages) : null); + if (riding) { + const lp = riding; + if (linked.length === 1) { + const pr = stageTrackerLinkedPRItem(item, lp); + prTargetKey = stageTrackerItemKey(pr); + const who = (lp.author_kind || 'hive') + (lp.author ? ' · @' + lp.author : ''); + const lineage = (lp.lineage && typeof stageTrackerLineageChipHtml === 'function' ? stageTrackerLineageChipHtml(lp, nowMs) : '') || (typeof stageTrackerAdoptedFromChipHtml === 'function' ? stageTrackerAdoptedFromChipHtml(lp, nowMs) : ''); + prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage) : (lineage || null))]; + } shown = Object.assign({}, item, { via_pr: true, stage: stageTrackerLeadStage(lp), stage_since: lp.stage_since || item.stage_since, modifiers: lp.modifiers || item.modifiers, deferred_modifiers: lp.deferred_modifiers || item.deferred_modifiers || [], caption: lp.caption || item.caption, reason: lp.reason || item.reason, preparation: lp.preparation || null, ci_activity: lp.ci_activity || null, review_activity: lp.review_activity || null, code_activity: lp.code_activity || null, display_column: lp.display_column || 0, terminal_merge: !!lp.terminal_merge, merged_by: lp.merged_by || '', diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index eadab9f7bc..196740460b 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -20000,6 +20000,20 @@

    Where to get help

    const sinceOf = lp => Date.parse(lp.stage_since || '') || Infinity; return linked.sort((x, y) => (stageTrackerAnchor(y.stage, stages, 'pr', y, false) - stageTrackerAnchor(x.stage, stages, 'pr', x, false)) || (stageTrackerAttentionTier(x) - stageTrackerAttentionTier(y)) || (sinceOf(x) - sinceOf(y)) || ((x.number || 0) - (y.number || 0))); } + // Pure: the covering PR an issue row rides when every PR covering it is + // drawn under another row (its "↳ #N · under #M" chips): the furthest + // along of them (stageTrackerLinkedSorted's order), or null when one is + // drawn here or none covers it. The stage position is the PR's, not + // the issue's role — a secondary issue of a shared PR lights the same + // lane as the primary (soaking in the Merge queue, not "PR in progress" + // wearing the soak word; hivecommons/hive#17324) while its chip, not + // the PR title, names the PR. + function stageTrackerLinkedRiding(item, stages) { + if (!item || item.kind !== 'issue' || !Array.isArray(item.linked_prs) || stageTrackerLinkedSorted(item, stages).length) return null; + const elsewhere = item.linked_prs.filter(lp => lp && Number(lp.number) > 0 && !stageTrackerLinkedDrawnHere(lp, item) && !stageTrackerLinkedSupersededGone(lp, item)); + const first = stageTrackerLinkedSorted(Object.assign({}, item, { linked_prs: elsewhere.map(lp => Object.assign({}, lp, { drawn_under: 0 })) }), stages)[0]; + return first ? elsewhere.find(lp => Number(lp.number) === Number(first.number)) || null : null; + } // Pure: a PR whose drawn_under issue is not a row of this page (filtered // out or on another page) would otherwise be drawn nowhere. The first @@ -20040,8 +20054,9 @@

    Where to get help

    // — its furthest covering PR, else the issue itself. function stageTrackerLead(item, stages) { const linked = item.kind === 'issue' ? stageTrackerLinkedSorted(item, stages) : []; - if (!linked.length) return { lead: item, kind: item.kind, stage: Number(item.stage) || 0, since: item.stage_since || '' }; - const lp = linked[0]; + // Guarded: test harnesses lift this function by name without stageTrackerLinkedRiding. + const lp = linked[0] || (typeof stageTrackerLinkedRiding === 'function' ? stageTrackerLinkedRiding(item, stages) : null); + if (!lp) return { lead: item, kind: item.kind, stage: Number(item.stage) || 0, since: item.stage_since || '' }; return { lead: lp, kind: 'pr', stage: stageTrackerLeadStage(lp), since: lp.stage_since || item.stage_since || '' }; } // List order: furthest along the strip first — a covered issue counts as @@ -20210,14 +20225,22 @@

    Where to get help

    const linked = stageTrackerLinkedSorted(item, stages); // The primary (first-sorted) PR's base; an issue with no PR shows none. if (linked.length) basePill = stageTrackerBasePillHtml(linked[0].base_ref, linked[0].number); - if (linked.length === 1) { - // One covering PR: a single entry whose strip the PR's stage drives. - const lp = linked[0]; - const pr = stageTrackerLinkedPRItem(item, lp); - prTargetKey = stageTrackerItemKey(pr); - const who = (lp.author_kind || 'hive') + (lp.author ? ' · @' + lp.author : ''); - const lineage = (lp.lineage && typeof stageTrackerLineageChipHtml === 'function' ? stageTrackerLineageChipHtml(lp, nowMs) : '') || (typeof stageTrackerAdoptedFromChipHtml === 'function' ? stageTrackerAdoptedFromChipHtml(lp, nowMs) : ''); - prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage) : (lineage || null))]; + // One covering PR drawn here, or every covering PR drawn under + // another row (hivecommons/hive#17324): a single entry whose strip + // the PR's stage drives. Only the PR drawn here takes the PR column; + // a PR drawn elsewhere is named by the "under #M" chip in the lead + // cell and the PR column stays empty. + // Guarded: test harnesses lift this function by name without stageTrackerLinkedRiding. + const riding = linked.length === 1 ? linked[0] : (!linked.length && typeof stageTrackerLinkedRiding === 'function' ? stageTrackerLinkedRiding(item, stages) : null); + if (riding) { + const lp = riding; + if (linked.length === 1) { + const pr = stageTrackerLinkedPRItem(item, lp); + prTargetKey = stageTrackerItemKey(pr); + const who = (lp.author_kind || 'hive') + (lp.author ? ' · @' + lp.author : ''); + const lineage = (lp.lineage && typeof stageTrackerLineageChipHtml === 'function' ? stageTrackerLineageChipHtml(lp, nowMs) : '') || (typeof stageTrackerAdoptedFromChipHtml === 'function' ? stageTrackerAdoptedFromChipHtml(lp, nowMs) : ''); + prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage) : (lineage || null))]; + } shown = Object.assign({}, item, { via_pr: true, stage: stageTrackerLeadStage(lp), stage_since: lp.stage_since || item.stage_since, modifiers: lp.modifiers || item.modifiers, deferred_modifiers: lp.deferred_modifiers || item.deferred_modifiers || [], caption: lp.caption || item.caption, reason: lp.reason || item.reason, preparation: lp.preparation || null, ci_activity: lp.ci_activity || null, review_activity: lp.review_activity || null, code_activity: lp.code_activity || null, display_column: lp.display_column || 0, terminal_merge: !!lp.terminal_merge, merged_by: lp.merged_by || '', @@ -20793,7 +20816,8 @@

    Where to get help

    for (const it of items) { if (!it || !it.kind || !(Number(it.number) > 0)) continue; const linked = it.kind === 'issue' ? stageTrackerLinkedSorted(it, stages).filter(lp => lp && Number(lp.number) > 0) : []; - const shown = linked.length === 1 ? Object.assign({}, it, { via_pr: true, stage: linked[0].stage || 40, display_column: linked[0].display_column || 0, head: linked[0].head, code_activity: linked[0].code_activity }) : it; + const ride = linked.length === 1 ? linked[0] : (!linked.length && typeof stageTrackerLinkedRiding === 'function' ? stageTrackerLinkedRiding(it, stages) : null); + const shown = ride ? Object.assign({}, it, { via_pr: true, stage: ride.stage || 40, display_column: ride.display_column || 0, head: ride.head, code_activity: ride.code_activity }) : it; out[stageTrackerItemKey(it)] = stageTrackerColIndex(shown, stages); for (const lp of linked) out[stageTrackerItemKey({ repo: it.repo, kind: 'pr', number: lp.number })] = stageTrackerColIndex({ kind: 'pr', stage: lp.stage || 0, display_column: lp.display_column || 0, head: lp.head, code_activity: lp.code_activity }, stages); } From 44fe65f957318252f57c7af2999794bb19d9c242 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 01:52:09 +0000 Subject: [PATCH 019/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.207.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.207.2 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-agentsmd-cap-selfreport.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-agentsmd-cap-selfreport.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 59b5e70a8d..e5b77debbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.207.2) + +### Fixed + +- The fleet selfreport feed no longer files a repository's oversized AGENTS.md as an unclassified runtime error, and the scheduler's injection-cap warning now reports the effective cap instead of the config default sentinel (#17318). + ## 2026-11-09 (v5.207.1) ### Fixed diff --git a/changelog.d/fixed-agentsmd-cap-selfreport.md b/changelog.d/fixed-agentsmd-cap-selfreport.md deleted file mode 100644 index 03b866ddd3..0000000000 --- a/changelog.d/fixed-agentsmd-cap-selfreport.md +++ /dev/null @@ -1 +0,0 @@ -- The fleet selfreport feed no longer files a repository's oversized AGENTS.md as an unclassified runtime error, and the scheduler's injection-cap warning now reports the effective cap instead of the config default sentinel (#17318). From e6422ad082dbd2791cf5d58812670b58d306bb4e Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Sun, 8 Nov 2026 21:12:35 -0500 Subject: [PATCH 020/123] =?UTF-8?q?=F0=9F=90=9B=20contributor=20nudge:=20p?= =?UTF-8?q?er-PR=20CI-failure=20cooldown=20and=20failing-set=20dedupe=20(#?= =?UTF-8?q?17331)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 contributor nudge: per-PR CI-failure cooldown and failing-set dedupe CI-failure nudges are keyed on the failing-check set rather than the lane's reason prefix. The same set on a new head, or a check joining the set on the same head, edits the PR's one nudge comment (marker gains checks= attempt=; no relay re-dispatch for the same head). A changed set on a new head within governor.labels.stage.contributor_nudge.ci_failure_cooldown (default 6h) is folded into the comment instead of counting as a fresh nudge. The ledger persists in the stage-label store across restarts. Fixes #17328 Signed-off-by: Andrew Anderson * test(config): golden gains contributor_nudge.ci_failure_cooldown Signed-off-by: Andrew Anderson --------- Signed-off-by: Andrew Anderson --- .../changed-ci-failure-nudge-cooldown.md | 1 + src/cmd/hive/merge_eligibility.go | 1 + .../stage-labels.md | 10 + src/docs/operator-reference/README.md | 1 + src/hive.yaml.example | 1 + src/pkg/config/config.go | 14 ++ .../config/testdata/agent_runtime_golden.json | 3 +- src/pkg/dashboard/api_governor.go | 26 ++- .../nudge_repeat_after_settings_test.go | 35 +++ .../static-src/js/config-governor.js | 8 + .../dashboard/static-src/js/config-state.js | 2 +- src/pkg/dashboard/static/index.html | 10 +- .../automerge/automerge_contributor_nudge.go | 156 ++++++++++++- ...erge_contributor_nudge_ci_cooldown_test.go | 218 ++++++++++++++++++ .../automerge/automerge_stage_labels.go | 6 + src/pkg/stagelabels/stagelabels_test.go | 24 ++ src/pkg/stagelabels/store.go | 51 +++- 17 files changed, 548 insertions(+), 19 deletions(-) create mode 100644 changelog.d/changed-ci-failure-nudge-cooldown.md create mode 100644 src/pkg/github/automerge/automerge_contributor_nudge_ci_cooldown_test.go diff --git a/changelog.d/changed-ci-failure-nudge-cooldown.md b/changelog.d/changed-ci-failure-nudge-cooldown.md new file mode 100644 index 0000000000..66085f2466 --- /dev/null +++ b/changelog.d/changed-ci-failure-nudge-cooldown.md @@ -0,0 +1 @@ +- Contributor nudge: CI-failure nudges are keyed on the failing-check set, not the lane's reason prefix — the same set on a new head or a check joining the set on the same head edits the PR's one `hive:contributor-nudge` comment (no relay re-dispatch for the same head), and a changed set within `governor.labels.stage.contributor_nudge.ci_failure_cooldown` (default 6h) folds into it instead of counting as a fresh nudge. The ledger persists in the stage-label store across restarts. diff --git a/src/cmd/hive/merge_eligibility.go b/src/cmd/hive/merge_eligibility.go index c8bfc424eb..1f06e579c6 100644 --- a/src/cmd/hive/merge_eligibility.go +++ b/src/cmd/hive/merge_eligibility.go @@ -115,6 +115,7 @@ func stageLabelPolicyFunc(cfg *config.Config) func() automerge.StageLabelPolicy StalledRequireQuiet: stage.Stalled.IsRequireQuiet(), ContributorNudge: stage.ContributorNudge.IsEnabled(), RenudgeInterval: nudgeRepeatAfter(cfg), + CIFailureCooldown: stage.ContributorNudge.EffectiveCIFailureCooldown(), Adoption: stage.Adoption.IsEnabled(), GraceOnline: stage.EffectiveContributorGraceOnline(), GraceOffline: stage.EffectiveContributorGraceOffline(), diff --git a/src/docs/labels-and-control-signals/stage-labels.md b/src/docs/labels-and-control-signals/stage-labels.md index 7a98414f7b..c5bc086c13 100644 --- a/src/docs/labels-and-control-signals/stage-labels.md +++ b/src/docs/labels-and-control-signals/stage-labels.md @@ -778,6 +778,16 @@ When a contributor-agent PR goes red the hive does not just relabel it (a human- agent get interrupted?". `governor.labels.stage.contributor_nudge.enabled: false` turns the comment and the relay task off; the stage label still moves. + Failing checks are one class whatever the lane's prefix + (`check-failing`, `required-check-failing`, `optional-check-failing`), + keyed on the failing-check set (hivecommons/hive#17328): the marker adds + `checks= attempt=`, the same set red on another head or a + check joining the set on the same head edits the comment (the relay is + not re-dispatched for the same head), and a *changed* set on a new head + within `governor.labels.stage.contributor_nudge.ci_failure_cooldown` + (default 6h) is folded into the comment too; after the cooldown it + counts as a fresh nudge. The ledger lives in the stage-label store, so + a restart does not re-nudge. 2. Relay contributors (the author has a contributor profile and a live relay connection) also receive the diagnosis in their relay session as a `fix-pr` task with `priority: interrupt`. Presence = a relay heartbeat diff --git a/src/docs/operator-reference/README.md b/src/docs/operator-reference/README.md index a31416e76c..eb2bc663f5 100644 --- a/src/docs/operator-reference/README.md +++ b/src/docs/operator-reference/README.md @@ -476,6 +476,7 @@ advanced into the merge path. | `auto_merge.max_merges` | `3` (`DefaultAutoMergeSweepMaxMerges`) when 0/unset | Caps merges per sweep pass. | | `auto_merge.min_head_age` | `3m` | Minimum PR head age before automerge trusts an unknown required-check set. A fresh head pushed more recently than this waits with `pending: head pushed ... ago (< min_head_age)` unless `auto_merge.required_checks` is declared and every required check is complete and successful. Head age is measured from the head commit's committer date (never earlier than the PR's creation), not the PR's `updated_at`, so label and comment activity — including the hive's own — does not restart it. When GitHub's head time is ahead of the host clock (clock skew), age is measured from when the hive first observed the head instead, so the hold lasts one window and then clears (`pending: head time ahead of host clock; head first seen ... ago (< min_head_age)`). | | `auto_merge.nudge_repeat_after` | `72h` | How long a contributor nudge's condition must persist before the hive nudges once more. Nudges are one comment per PR and reason class, edited in place for a new head or changed reason; after this interval with the same condition the comment is re-posted once (cap 2 per reason), then never again. `governor.labels.stage.contributor_nudge.renudge_interval`, when set, overrides it. | +| `governor.labels.stage.contributor_nudge.ci_failure_cooldown` | `6h` | CI-failure nudges are keyed on the failing-check set: the same set red on a new head, or a check joining the set on the same head, edits the PR's one nudge comment. A *different* set on a new head inside this window is folded into that comment too (count unchanged); after it the hive counts a fresh nudge. | | `auto_merge.required_checks` | unset | Default operator-declared status-check contexts / check-run names (e.g. `["build-gate"]`) that the sweep's green gate requires on repos without a per-repo override. See below. | | `auto_merge.repos..required_checks` | inherits default | Per-repo override for heterogeneous hives. `` may be the bare name from `project.repos` or `owner/repo`; an explicit empty list declares that GitHub has no required contexts, while Hive still requires positive CI evidence from at least one real successful check-run before merge. | | `auto_merge.allow_unprotected_base` | deprecated no-op | Accepted for compatibility only. [`hive-merge`](../hive-merge.md) no longer refuses solely because a base branch has no GitHub branch protection; it may merge into any branch the App can write after positive CI evidence. | diff --git a/src/hive.yaml.example b/src/hive.yaml.example index 6c7b5649aa..3277db7eba 100644 --- a/src/hive.yaml.example +++ b/src/hive.yaml.example @@ -524,6 +524,7 @@ governor: # contributor_nudge: # stage/072: one @-mention comment per head + relay fix-pr interrupt (#12436) # enabled: true # renudge_interval: 24h # second (and last) nudge; default = the stage dwell + # ci_failure_cooldown: 6h # a new head red on a different check set inside this window folds into the one nudge comment (#17328) # presence_window: 15m # relay heartbeat this fresh = contributor online → relay interrupt, else comment only # contributor_grace_online: 2h # nudge unanswered this long (online author) → stage/074 adoption # contributor_grace_offline: 15m # same for offline / external authors (comment-only nudge) diff --git a/src/pkg/config/config.go b/src/pkg/config/config.go index e9cf8a847f..428821f64a 100644 --- a/src/pkg/config/config.go +++ b/src/pkg/config/config.go @@ -3179,6 +3179,20 @@ type ContributorNudgeConfig struct { // more (the documented cap is 2 nudges per PR and reason class). Unset // defers to auto_merge.nudge_repeat_after (default 72h). RenudgeInterval string `yaml:"renudge_interval,omitempty"` + // CIFailureCooldown is how long after a CI-failure nudge a changed + // failing-check set on a new head is folded into the PR's one nudge + // comment instead of counting as a fresh nudge + // (hivecommons/hive#17328). Default DefaultContributorNudgeCIFailureCooldown (6h). + CIFailureCooldown string `yaml:"ci_failure_cooldown,omitempty"` +} + +// DefaultContributorNudgeCIFailureCooldown is +// governor.labels.stage.contributor_nudge.ci_failure_cooldown's default. +const DefaultContributorNudgeCIFailureCooldown = 6 * time.Hour + +// EffectiveCIFailureCooldown parses CIFailureCooldown with the 6h default. +func (c ContributorNudgeConfig) EffectiveCIFailureCooldown() time.Duration { + return parseDurationOr(c.CIFailureCooldown, DefaultContributorNudgeCIFailureCooldown) } // IsEnabled reports whether the contributor nudge runs (default on). diff --git a/src/pkg/config/testdata/agent_runtime_golden.json b/src/pkg/config/testdata/agent_runtime_golden.json index b5201ad0d5..7c9d594606 100644 --- a/src/pkg/config/testdata/agent_runtime_golden.json +++ b/src/pkg/config/testdata/agent_runtime_golden.json @@ -194,7 +194,8 @@ "Dwell": null, "ContributorNudge": { "Enabled": null, - "RenudgeInterval": "" + "RenudgeInterval": "", + "CIFailureCooldown": "" }, "PresenceWindow": "", "ContributorGraceOnline": "", diff --git a/src/pkg/dashboard/api_governor.go b/src/pkg/dashboard/api_governor.go index 0e55191dc0..096cb82a7e 100644 --- a/src/pkg/dashboard/api_governor.go +++ b/src/pkg/dashboard/api_governor.go @@ -168,8 +168,12 @@ func (s *Server) handleGovernorConfigGet(w http.ResponseWriter, r *http.Request) "stageNudgeRenudge": cfg.Governor.Labels.Stage.ContributorNudge.RenudgeInterval, // auto_merge.nudge_repeat_after (hivecommons/hive#17067): the // same-reason re-nudge window the legacy renudge_interval defers to. - "nudgeRepeatAfter": cfg.AutoMerge.NudgeRepeatAfter, - "stagePresenceWindow": cfg.Governor.Labels.Stage.PresenceWindow, + "nudgeRepeatAfter": cfg.AutoMerge.NudgeRepeatAfter, + // governor.labels.stage.contributor_nudge.ci_failure_cooldown + // (hivecommons/hive#17328): the fold window for a changed + // failing-check set. + "stageNudgeCICooldown": cfg.Governor.Labels.Stage.ContributorNudge.CIFailureCooldown, + "stagePresenceWindow": cfg.Governor.Labels.Stage.PresenceWindow, // governor.labels.stage.adoption.enabled / contributor_grace_*: the // stage-074 adoption of red contributor PRs. "stageAdoptionEnabled": cfg.Governor.Labels.Stage.Adoption.IsEnabled(), @@ -815,6 +819,10 @@ func (s *Server) handleGovernorLabels(w http.ResponseWriter, r *http.Request) { // NudgeRepeatAfter is auto_merge.nudge_repeat_after // (hivecommons/hive#17067); a Go duration, empty restores 72h. NudgeRepeatAfter *string `json:"nudge_repeat_after"` + // StageNudgeCICooldown is + // governor.labels.stage.contributor_nudge.ci_failure_cooldown + // (hivecommons/hive#17328); a Go duration, empty restores 6h. + StageNudgeCICooldown *string `json:"stage_nudge_ci_failure_cooldown"` // Stage-074 adoption: governor.labels.stage.adoption.enabled and // governor.labels.stage.contributor_grace_online / _offline. StageAdoptionEnabled *bool `json:"stage_adoption_enabled"` @@ -922,11 +930,12 @@ func (s *Server) handleGovernorLabels(w http.ResponseWriter, r *http.Request) { } } for name, v := range map[string]*string{ - "stage_nudge_renudge_interval": body.StageNudgeRenudge, - "nudge_repeat_after": body.NudgeRepeatAfter, - "stage_presence_window": body.StagePresenceWindow, - "stage_grace_online": body.StageGraceOnline, - "stage_grace_offline": body.StageGraceOffline, + "stage_nudge_renudge_interval": body.StageNudgeRenudge, + "nudge_repeat_after": body.NudgeRepeatAfter, + "stage_nudge_ci_failure_cooldown": body.StageNudgeCICooldown, + "stage_presence_window": body.StagePresenceWindow, + "stage_grace_online": body.StageGraceOnline, + "stage_grace_offline": body.StageGraceOffline, } { if v == nil || strings.TrimSpace(*v) == "" { continue @@ -1037,6 +1046,9 @@ func (s *Server) handleGovernorLabels(w http.ResponseWriter, r *http.Request) { if body.NudgeRepeatAfter != nil { s.deps.Config.AutoMerge.NudgeRepeatAfter = strings.TrimSpace(*body.NudgeRepeatAfter) } + if body.StageNudgeCICooldown != nil { + s.deps.Config.Governor.Labels.Stage.ContributorNudge.CIFailureCooldown = strings.TrimSpace(*body.StageNudgeCICooldown) + } if body.StagePresenceWindow != nil { s.deps.Config.Governor.Labels.Stage.PresenceWindow = strings.TrimSpace(*body.StagePresenceWindow) } diff --git a/src/pkg/dashboard/nudge_repeat_after_settings_test.go b/src/pkg/dashboard/nudge_repeat_after_settings_test.go index 6479cce7ac..d5c1e78dc5 100644 --- a/src/pkg/dashboard/nudge_repeat_after_settings_test.go +++ b/src/pkg/dashboard/nudge_repeat_after_settings_test.go @@ -40,3 +40,38 @@ func TestHandleGovernorLabels_NudgeRepeatAfterRoundTrip(t *testing.T) { t.Fatalf("empty must clear the override, got %q", got) } } + +// governor.labels.stage.contributor_nudge.ci_failure_cooldown +// (hivecommons/hive#17328) sits beside the nudge intervals on the Labels tab. +func TestHandleGovernorLabels_CIFailureCooldownRoundTrip(t *testing.T) { + srv := newFullServer(t) + w := httptest.NewRecorder() + srv.handleGovernorLabels(w, ownerPUT(t, "/api/config/governor/labels", `{"stage_nudge_ci_failure_cooldown":" 2h "}`)) + if w.Code != http.StatusOK { + t.Fatalf("code = %d, body = %s", w.Code, w.Body.String()) + } + if got := srv.deps.Config.Governor.Labels.Stage.ContributorNudge.CIFailureCooldown; got != "2h" { + t.Fatalf("ci_failure_cooldown = %q, want trimmed 2h", got) + } + if got := decodeGovernorConfigGet(t, srv)["stageNudgeCICooldown"]; got != "2h" { + t.Fatalf("GET stageNudgeCICooldown = %v, want 2h", got) + } + + w = httptest.NewRecorder() + srv.handleGovernorLabels(w, ownerPUT(t, "/api/config/governor/labels", `{"stage_nudge_ci_failure_cooldown":"-1h"}`)) + if w.Code != http.StatusBadRequest { + t.Fatalf("negative duration: code = %d, want 400; body = %s", w.Code, w.Body.String()) + } + if got := srv.deps.Config.Governor.Labels.Stage.ContributorNudge.CIFailureCooldown; got != "2h" { + t.Fatalf("rejected save mutated ci_failure_cooldown to %q", got) + } + + w = httptest.NewRecorder() + srv.handleGovernorLabels(w, ownerPUT(t, "/api/config/governor/labels", `{"stage_nudge_ci_failure_cooldown":""}`)) + if w.Code != http.StatusOK { + t.Fatalf("clear: code = %d, body = %s", w.Code, w.Body.String()) + } + if got := srv.deps.Config.Governor.Labels.Stage.ContributorNudge.CIFailureCooldown; got != "" { + t.Fatalf("empty must restore the default, got %q", got) + } +} diff --git a/src/pkg/dashboard/static-src/js/config-governor.js b/src/pkg/dashboard/static-src/js/config-governor.js index 454d97282e..0cc16442a8 100644 --- a/src/pkg/dashboard/static-src/js/config-governor.js +++ b/src/pkg/dashboard/static-src/js/config-governor.js @@ -707,6 +707,9 @@ const nudgeRepeatAfter = (_configState.dirty.labels && _configState.dirty.labels.nudge_repeat_after !== undefined) ? _configState.dirty.labels.nudge_repeat_after : (_configState.data.nudgeRepeatAfter || ''); + const stageNudgeCICooldown = (_configState.dirty.labels && _configState.dirty.labels.stage_nudge_ci_failure_cooldown !== undefined) + ? _configState.dirty.labels.stage_nudge_ci_failure_cooldown + : (_configState.data.stageNudgeCICooldown || ''); const stagePresenceWindow = (_configState.dirty.labels && _configState.dirty.labels.stage_presence_window !== undefined) ? _configState.dirty.labels.stage_presence_window : (_configState.data.stagePresenceWindow || ''); @@ -788,6 +791,11 @@
    How long a contributor PR must stay red for the same reason before its one hive:contributor-nudge comment is rewritten a second (and last) time; empty = 72h.
  • +
    + + +
    After a CI-failure nudge, a new head failing a different set of checks within this window is folded into the PR's existing hive:contributor-nudge comment instead of counting as a fresh nudge; empty = 6h.
    +
    diff --git a/src/pkg/dashboard/static-src/js/config-state.js b/src/pkg/dashboard/static-src/js/config-state.js index bdecee1865..81f7869d99 100644 --- a/src/pkg/dashboard/static-src/js/config-state.js +++ b/src/pkg/dashboard/static-src/js/config-state.js @@ -80,7 +80,7 @@ { tab: 'Labels', section: 'Labels', label: 'Central stage engine', key: 'governor.labels.stage.engine.mode', text: 'stage engine mode shadow enforce dry run pause anomaly reconciler ADR-0025 governor.labels.stage.engine.mode' }, { tab: 'Labels', section: 'Labels', label: 'Stage dwell overrides', key: 'governor.labels.stage.dwell', text: 'stage dwell stalled threshold governor.labels.stage.dwell' }, { tab: 'Labels', section: 'Labels', label: 'Adoption of a maintainer\'s PR', key: 'governor.labels.stage.adoption.maintainer_policy', text: 'adoption maintainer policy adopt ask never maintainer own pr clanker disconnected offline adopt action governor.labels.stage.adoption.maintainer_policy' }, - { tab: 'Labels', section: 'Labels', label: 'Contributor nudge', key: 'governor.labels.stage.contributor_nudge.enabled', text: 'contributor nudge returned-to-contributor red ci fix-pr relay interrupt renudge presence window governor.labels.stage.contributor_nudge.enabled governor.labels.stage.contributor_nudge.renudge_interval auto_merge.nudge_repeat_after governor.labels.stage.presence_window' }, + { tab: 'Labels', section: 'Labels', label: 'Contributor nudge', key: 'governor.labels.stage.contributor_nudge.enabled', text: 'contributor nudge returned-to-contributor red ci fix-pr relay interrupt renudge presence window governor.labels.stage.contributor_nudge.enabled governor.labels.stage.contributor_nudge.renudge_interval auto_merge.nudge_repeat_after governor.labels.stage.contributor_nudge.ci_failure_cooldown governor.labels.stage.presence_window' }, { tab: 'Labels', section: 'Labels', label: 'Adopt red contributor PRs', key: 'governor.labels.stage.adoption.enabled', text: 'adoption adopted-by-hive stage 074 red contributor pr grace online offline supersede takeover in place after offline unregistered heartbeat governor.labels.stage.adoption.enabled governor.labels.stage.contributor_grace_online governor.labels.stage.contributor_grace_offline governor.labels.stage.adoption.after_offline governor.labels.stage.adoption.after_unregistered governor.labels.stage.adoption.in_place governor.labels.stage.adoption.strict_attribution strict attribution governor.labels.stage.adoption.auto_merge auto merge adopted head hive authority governor.labels.stage.adoption.supersede.close_first close first superseded reopen copy failed governor.labels.stage.adoption.close_superseded close superseded on adopt on merge clanker authored opt-in label governor.labels.stage.adoption.offline_grace offline grace rebase failed twice fixer resolving conflicts governor.labels.stage.adoption.rebase_attempt_timeout rebase attempt timeout' }, { tab: 'Hub', section: 'Contributor Relay', label: 'Fix budget', key: 'contribute.max_parallel_fixes', text: 'fix budget parallel fixes focus window red pr fix-pr preempt spawn contribute.max_parallel_fixes contribute.min_focus_window' }, { tab: 'Logging', section: 'Logging', label: 'Governor logging', key: 'governor.logging.max_size_mb', text: 'governor logging directory level compression max size age backups governor.logging.compress governor.logging.dir governor.logging.level governor.logging.max_age_days governor.logging.max_backups governor.logging.max_size_mb' }, diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 196740460b..3b318cb2be 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -53520,7 +53520,7 @@

    Configure LiteLLM

    { tab: 'Labels', section: 'Labels', label: 'Central stage engine', key: 'governor.labels.stage.engine.mode', text: 'stage engine mode shadow enforce dry run pause anomaly reconciler ADR-0025 governor.labels.stage.engine.mode' }, { tab: 'Labels', section: 'Labels', label: 'Stage dwell overrides', key: 'governor.labels.stage.dwell', text: 'stage dwell stalled threshold governor.labels.stage.dwell' }, { tab: 'Labels', section: 'Labels', label: 'Adoption of a maintainer\'s PR', key: 'governor.labels.stage.adoption.maintainer_policy', text: 'adoption maintainer policy adopt ask never maintainer own pr clanker disconnected offline adopt action governor.labels.stage.adoption.maintainer_policy' }, - { tab: 'Labels', section: 'Labels', label: 'Contributor nudge', key: 'governor.labels.stage.contributor_nudge.enabled', text: 'contributor nudge returned-to-contributor red ci fix-pr relay interrupt renudge presence window governor.labels.stage.contributor_nudge.enabled governor.labels.stage.contributor_nudge.renudge_interval auto_merge.nudge_repeat_after governor.labels.stage.presence_window' }, + { tab: 'Labels', section: 'Labels', label: 'Contributor nudge', key: 'governor.labels.stage.contributor_nudge.enabled', text: 'contributor nudge returned-to-contributor red ci fix-pr relay interrupt renudge presence window governor.labels.stage.contributor_nudge.enabled governor.labels.stage.contributor_nudge.renudge_interval auto_merge.nudge_repeat_after governor.labels.stage.contributor_nudge.ci_failure_cooldown governor.labels.stage.presence_window' }, { tab: 'Labels', section: 'Labels', label: 'Adopt red contributor PRs', key: 'governor.labels.stage.adoption.enabled', text: 'adoption adopted-by-hive stage 074 red contributor pr grace online offline supersede takeover in place after offline unregistered heartbeat governor.labels.stage.adoption.enabled governor.labels.stage.contributor_grace_online governor.labels.stage.contributor_grace_offline governor.labels.stage.adoption.after_offline governor.labels.stage.adoption.after_unregistered governor.labels.stage.adoption.in_place governor.labels.stage.adoption.strict_attribution strict attribution governor.labels.stage.adoption.auto_merge auto merge adopted head hive authority governor.labels.stage.adoption.supersede.close_first close first superseded reopen copy failed governor.labels.stage.adoption.close_superseded close superseded on adopt on merge clanker authored opt-in label governor.labels.stage.adoption.offline_grace offline grace rebase failed twice fixer resolving conflicts governor.labels.stage.adoption.rebase_attempt_timeout rebase attempt timeout' }, { tab: 'Hub', section: 'Contributor Relay', label: 'Fix budget', key: 'contribute.max_parallel_fixes', text: 'fix budget parallel fixes focus window red pr fix-pr preempt spawn contribute.max_parallel_fixes contribute.min_focus_window' }, { tab: 'Logging', section: 'Logging', label: 'Governor logging', key: 'governor.logging.max_size_mb', text: 'governor logging directory level compression max size age backups governor.logging.compress governor.logging.dir governor.logging.level governor.logging.max_age_days governor.logging.max_backups governor.logging.max_size_mb' }, @@ -60325,6 +60325,9 @@

    Backend placement policy

    const nudgeRepeatAfter = (_configState.dirty.labels && _configState.dirty.labels.nudge_repeat_after !== undefined) ? _configState.dirty.labels.nudge_repeat_after : (_configState.data.nudgeRepeatAfter || ''); + const stageNudgeCICooldown = (_configState.dirty.labels && _configState.dirty.labels.stage_nudge_ci_failure_cooldown !== undefined) + ? _configState.dirty.labels.stage_nudge_ci_failure_cooldown + : (_configState.data.stageNudgeCICooldown || ''); const stagePresenceWindow = (_configState.dirty.labels && _configState.dirty.labels.stage_presence_window !== undefined) ? _configState.dirty.labels.stage_presence_window : (_configState.data.stagePresenceWindow || ''); @@ -60406,6 +60409,11 @@

    Stage labels

    How long a contributor PR must stay red for the same reason before its one hive:contributor-nudge comment is rewritten a second (and last) time; empty = 72h.
    +
    + + +
    After a CI-failure nudge, a new head failing a different set of checks within this window is folded into the PR's existing hive:contributor-nudge comment instead of counting as a fresh nudge; empty = 6h.
    +
    diff --git a/src/pkg/github/automerge/automerge_contributor_nudge.go b/src/pkg/github/automerge/automerge_contributor_nudge.go index d52ce25b09..36935fec1c 100644 --- a/src/pkg/github/automerge/automerge_contributor_nudge.go +++ b/src/pkg/github/automerge/automerge_contributor_nudge.go @@ -2,6 +2,8 @@ package automerge import ( "context" + "crypto/sha256" + "encoding/hex" "fmt" "slices" "strings" @@ -43,7 +45,36 @@ const contributorNudgeCap = 2 // and delivery mode. The upsert searches for ContributorNudgeMarkerPrefix // alone, so a changed reason slug still finds the comment. func ContributorNudgeMarker(reason, head string, nudge int, mode string) string { - return fmt.Sprintf("%s reason=%s head=%s n=%d mode=%s -->", ContributorNudgeMarkerPrefix, stagelabels.NudgeReasonSlug(reason), head, nudge, nonEmpty(mode, "comment")) + return contributorNudgeMarker(reason, head, nudge, mode, nil, 0) +} + +// contributorNudgeMarker is ContributorNudgeMarker plus, for a CI-failure +// nudge, `checks= attempt=` +// (hivecommons/hive#17328). +func contributorNudgeMarker(reason, head string, nudge int, mode string, checks []string, attempt int) string { + var b strings.Builder + fmt.Fprintf(&b, "%s reason=%s head=%s n=%d mode=%s", ContributorNudgeMarkerPrefix, stagelabels.NudgeReasonSlug(reason), head, nudge, nonEmpty(mode, "comment")) + if len(checks) > 0 && attempt > 0 { + fmt.Fprintf(&b, " checks=%s attempt=%d", ciFailureSetDigest(checks), attempt) + } + b.WriteString(" -->") + return b.String() +} + +// ciFailureSetDigest keys a failing-check set independent of order: the +// first 12 hex chars of the SHA-256 of the sorted names. +func ciFailureSetDigest(checks []string) string { + sorted := append([]string(nil), checks...) + slices.Sort(sorted) + sum := sha256.Sum256([]byte(strings.Join(sorted, "\n"))) + return hex.EncodeToString(sum[:])[:12] +} + +// isCIFailureNudgeReason reports whether reason is a failing-check reason +// (any check-failing prefix): the nudges that share the per-PR +// failing-set ledger and the ci_failure_cooldown. +func isCIFailureNudgeReason(reason string) bool { + return stagelabels.NudgeReasonSlug(reason) == stagelabels.NudgeReasonCIFailure } // ContributorNudge is the diagnosis handed to the sink for one PR in stage 072. @@ -75,6 +106,9 @@ type ContributorNudge struct { Nudge int // Stalled is true when this nudge is the repeat re-nudge. Stalled bool + // Attempt is, for a CI-failure nudge, how many red heads the same + // failing set has been seen on (1 for the first); 0 otherwise. + Attempt int } // ContributorNudgeOutcome is what the sink did with a nudge. @@ -219,7 +253,7 @@ func nudgeDiagnosisRouted(reason string, d stageDetail, route *stagelabels.Route // the prose. func ContributorNudgeComment(n ContributorNudge, out ContributorNudgeOutcome) string { var b strings.Builder - b.WriteString(ContributorNudgeMarker(n.Reason, n.HeadSHA, n.Nudge, out.Mode)) + b.WriteString(contributorNudgeMarker(n.Reason, n.HeadSHA, n.Nudge, out.Mode, n.FailingChecks, n.Attempt)) b.WriteString("\n") if n.Stalled { fmt.Fprintf(&b, "@%s this PR has been waiting on you for a while (`%s`). ", n.Author, stagelabels.ReturnedToContributor.Label()) @@ -232,6 +266,9 @@ func ContributorNudgeComment(n ContributorNudge, out ContributorNudgeOutcome) st for _, c := range n.FailingChecks { fmt.Fprintf(&b, "- `%s`\n", c) } + if n.Attempt > 1 { + fmt.Fprintf(&b, "\nThe same checks have failed on %d heads so far (latest `%s`).\n", n.Attempt, shortSHA(n.HeadSHA)) + } } if len(n.ReviewAsks) > 0 { b.WriteString("**Review asks:**\n") @@ -286,6 +323,12 @@ func nudgeDue(rec stagelabels.Record, head, reason string, repeatAfter time.Dura if rec.NudgeHead != head { return 0, true } + return nudgeRepeatDue(rec, repeatAfter, now) +} + +// nudgeRepeatDue is the same-head, same-class tail of nudgeDue: the one +// repeat reminder once repeatAfter elapsed since the class was counted. +func nudgeRepeatDue(rec stagelabels.Record, repeatAfter time.Duration, now time.Time) (ordinal int, ok bool) { if rec.NudgeReasonCount >= contributorNudgeCap { return 0, false } @@ -295,6 +338,45 @@ func nudgeDue(rec stagelabels.Record, head, reason string, repeatAfter time.Dura return rec.NudgeReasonCount + 1, true } +// ciNudgeDue is nudgeDue for a failing-check reason, keyed on the failing +// set rather than the reason prefix (hivecommons/hive#17328). checks is the +// set the comment would list now (already unioned with the recorded set +// when the head is unchanged). Ordinal 1: the class is new to the PR, or +// the set changed on a new head after cooldown elapsed since the set was +// last counted. Ordinal 0 (a fold into the existing comment, uncounted): +// the same set on a new head, a set that grew on the same head, or a +// changed set on a new head inside the cooldown. Same head and same set +// falls through to the repeat reminder. +func ciNudgeDue(rec stagelabels.Record, head string, checks []string, repeatAfter, cooldown time.Duration, now time.Time) (ordinal int, ok bool) { + if head == "" { + return 0, false + } + if rec.NudgeReason != stagelabels.NudgeReasonCIFailure { + return 1, true + } + sorted := append([]string(nil), checks...) + slices.Sort(sorted) + sameSet := slices.Equal(sorted, rec.NudgeCIChecks) + if rec.NudgeHead == head { + if !sameSet { + return 0, true + } + return nudgeRepeatDue(rec, repeatAfter, now) + } + if sameSet { + return 0, true + } + // Records written before the ledger existed count from the class. + countedAt := rec.NudgeCIAt + if countedAt.IsZero() { + countedAt = rec.NudgeReasonAt + } + if cooldown > 0 && !countedAt.IsZero() && now.Sub(countedAt) < cooldown { + return 0, true + } + return 1, true +} + // nudgeContributor runs the stage-072 nudge for one observation. It returns // the number of GitHub comments posted. func (c *Engine) nudgeContributor(ctx context.Context, store *stagelabels.Store, key string, obs stageObservation, policy StageLabelPolicy, now time.Time) (int, error) { @@ -302,10 +384,6 @@ func (c *Engine) nudgeContributor(ctx context.Context, store *stagelabels.Store, if !ok || obs.Author == "" { return 0, nil } - ordinal, due := nudgeDue(rec, obs.HeadSHA, obs.Reason, policy.RenudgeInterval, now) - if !due { - return 0, nil - } checks, asks, human := nudgeDiagnosisRouted(obs.Reason, obs.Detail, obs.Route) // A fork guard is a maintainer's to clear (hivecommons/hive#14273): the // author is never asked to fix it, and a head red on nothing else is not @@ -318,20 +396,48 @@ func (c *Engine) nudgeContributor(ctx context.Context, store *stagelabels.Store, return 0, nil } } + ciFailure := isCIFailureNudgeReason(obs.Reason) + var ordinal int + var due bool + if ciFailure { + // On one head the failing set only accumulates: the lane's reason + // names whichever red check it saw first, and a set that shrank is + // a flap, not news. + if rec.NudgeReason == stagelabels.NudgeReasonCIFailure && rec.NudgeHead == obs.HeadSHA { + checks = unionChecks(rec.NudgeCIChecks, checks) + } + ordinal, due = ciNudgeDue(rec, obs.HeadSHA, checks, policy.RenudgeInterval, policy.CIFailureCooldown, now) + } else { + ordinal, due = nudgeDue(rec, obs.HeadSHA, obs.Reason, policy.RenudgeInterval, now) + } + if !due { + return 0, nil + } // A head-only rewrite (ordinal 0) keeps the class's recorded count in // the marker; the author pushed, so it is not the stall reminder. shown := ordinal if shown == 0 { shown = max(rec.NudgeReasonCount, 1) } + attempt := 0 + if ciFailure { + attempt = ciNudgeAttempt(rec, obs.HeadSHA, checks, ordinal) + } n := ContributorNudge{ Owner: obs.Owner, Repo: obs.Repo, Display: obs.Display, Number: obs.Number, HeadSHA: obs.HeadSHA, Title: obs.Title, URL: obs.URL, Author: obs.Author, OpenedAt: obs.OpenedAt, Reason: obs.Reason, FailingChecks: checks, ReviewAsks: asks, HumanChangesRequested: human, - Nudge: shown, Stalled: ordinal > 1, + Nudge: shown, Stalled: ordinal > 1, Attempt: attempt, } + // Another check going red on the head the relay already has as a + // fix-pr task is folded into the comment, not dispatched again + // (hivecommons/hive#17328); the recorded delivery mode keeps the + // marker and prose honest. + sameHeadFold := ordinal == 0 && rec.NudgeHead == obs.HeadSHA var out ContributorNudgeOutcome - if c.contributorNudge != nil { + if sameHeadFold { + out = ContributorNudgeOutcome{Mode: rec.NudgeMode, Online: rec.NudgeOnline} + } else if c.contributorNudge != nil { out = c.contributorNudge.Nudge(ctx, n) } body := ContributorNudgeComment(n, out) @@ -359,10 +465,44 @@ func (c *Engine) nudgeContributor(ctx context.Context, store *stagelabels.Store, // as online gave an offline clanker the 2h online grace (#15566). store.MarkNudged(key, obs.HeadSHA, max(ordinal, 1), out.Online || out.Mode == "spawn" || out.Mode == "preempt", now) store.MarkNudgedReason(key, obs.Reason, ordinal, now) + if ciFailure { + store.MarkNudgedCIFailure(key, checks, obs.HeadSHA, nonEmpty(out.Mode, "comment"), attempt, ordinal == 1, now) + } c.info("stage labels: contributor nudged", "repo", obs.Display, "pr", obs.Number, "author", obs.Author, "head", obs.HeadSHA, "nudge", ordinal, "posted", posted == 1, "mode", nonEmpty(out.Mode, "comment"), "online", out.Online, "queue_depth", out.QueueDepth, "relay_failed", out.RelayFailed, "reason", obs.Reason) return posted, nil } +// ciNudgeAttempt is the attempt count the CI-failure nudge comment shows: +// 1 for a fresh nudge or a changed failing set, one more than recorded +// for the same set on a new head, unchanged otherwise. +func ciNudgeAttempt(rec stagelabels.Record, head string, checks []string, ordinal int) int { + switch { + case ordinal == 1, !slices.Equal(sortedChecks(checks), rec.NudgeCIChecks): + return 1 + case rec.NudgeCIHead != head: + return max(rec.NudgeCIAttempts, 1) + 1 + } + return max(rec.NudgeCIAttempts, 1) +} + +func sortedChecks(checks []string) []string { + out := append([]string(nil), checks...) + slices.Sort(out) + return out +} + +// unionChecks is prev plus the names in cur not already present, in +// prev's order then cur's. +func unionChecks(prev, cur []string) []string { + out := append([]string(nil), prev...) + for _, c := range cur { + if !slices.Contains(out, c) { + out = append(out, c) + } + } + return out +} + // withoutForkGuard drops the fork-guard checks from a nudge's failing // checks; checks is returned unchanged when there is no guard. func withoutForkGuard(checks, guard []string) []string { diff --git a/src/pkg/github/automerge/automerge_contributor_nudge_ci_cooldown_test.go b/src/pkg/github/automerge/automerge_contributor_nudge_ci_cooldown_test.go new file mode 100644 index 0000000000..d3de8719c0 --- /dev/null +++ b/src/pkg/github/automerge/automerge_contributor_nudge_ci_cooldown_test.go @@ -0,0 +1,218 @@ +package automerge + +import ( + "context" + "path/filepath" + "reflect" + "strings" + "testing" + "time" + + gh "github.com/google/go-github/v72/github" + hgithub "github.com/hivecommons/hive/pkg/github" + "github.com/hivecommons/hive/pkg/stagelabels" +) + +// newNudgeEngineAt is newNudgeEngine with the stage store at storePath so a +// second engine can be booted on the same file (a restart). +func newNudgeEngineAt(t *testing.T, apiURL, storePath string, clock *contributorLaneClock, sink ContributorNudgeSink, policy StageLabelPolicy) *Engine { + t.Helper() + client := hgithub.NewClient("token", "acme", []string{"widget"}, nil, apiURL) + client.SetAppBotLogin(testHiveAppBotLogin) + store := stagelabels.NewStore(storePath, clock.now) + if err := store.Load(); err != nil { + t.Fatal(err) + } + return New(client, Options{ + Now: clock.now, + StageLabelPolicy: func() StageLabelPolicy { return policy }, + StageTracker: NewStageTracker(), + StageStore: store, + ContributorNudge: sink, + }) +} + +// CI-failure nudges are keyed on the failing-check set (hivecommons/hive#17328): +// the reason prefix flapping between check-failing / optional- / required- +// on one head is one class; a check joining the set on the same head folds +// into the comment without a relay re-dispatch; the same set on a new head +// bumps the attempt count; a changed set on a new head inside the cooldown +// folds, after it counts a fresh nudge. All of it survives a restart. +func TestContributorNudgeCIFailureSetCooldown(t *testing.T) { + api, closeAPI := seededStageAPI(t) + defer closeAPI() + api.statefulComments = true + clock := &contributorLaneClock{at: time.Date(2026, 11, 8, 12, 0, 0, 0, time.UTC)} + sink := &fakeNudgeSink{outcome: ContributorNudgeOutcome{Mode: "preempt", Online: true}} + policy := StageLabelPolicy{Enabled: true, ContributorNudge: true, RenudgeInterval: 72 * time.Hour, CIFailureCooldown: 6 * time.Hour} + storePath := filepath.Join(t.TempDir(), "stage.json") + e := newNudgeEngineAt(t, apiURLOf(t, api), storePath, clock, sink, policy) + ctx := context.Background() + observe := func(e *Engine, pr *gh.PullRequest, reason string, red ...string) StageLabelResult { + if len(red) > 0 { + e.noteStageRedChecks("acme", "widget", 7, pr.GetHead().GetSHA(), red) + } + e.recordStage(stageLaneContributor, "acme/widget", "acme", "widget", pr, reason, false, nil) + e.noteStageRole("acme", "widget", 7, stagelabels.RoleContributor) + res, err := e.ApplyStageLabels(ctx) + if err != nil { + t.Fatal(err) + } + return res + } + lastEdit := func() string { + if len(api.commentEdits) == 0 { + return "" + } + return api.commentEdits[len(api.commentEdits)-1] + } + in072 := []string{"stage/072-returned-to-contributor", "role/contributor", "author/clanker"} + key := stageKey("acme", "widget", 7) + + // First red head: one comment, attempt 1, relay dispatched. + res := observe(e, nudgePR(7, "aaa"), "check-failing:changelog-fragment-guard") + if got := nudgeComments(api); len(got) != 1 || res.Comments != 1 { + t.Fatalf("first nudge: res=%+v comments=%v", res, api.comments) + } else if !strings.Contains(got[0], "reason=check-failing head=aaa n=1 mode=preempt checks=") || !strings.Contains(got[0], "attempt=1") { + t.Fatalf("marker: %s", got[0]) + } + if len(sink.nudges) != 1 { + t.Fatalf("sink=%d", len(sink.nudges)) + } + + // Same head, the lane's prefix flips to optional-check-failing and a + // second check is red: same class, the set grows → the comment is + // edited (both checks listed), the relay is NOT dispatched again, the + // class count stays at 1 and the cooldown clock does not move. + api.reset() + clock.advance(4 * time.Minute) + res = observe(e, nudgePR(7, "aaa", in072...), "optional-check-failing:native-queue-policy", "changelog-fragment-guard", "native-queue-policy") + if res.Comments != 0 || len(nudgeComments(api)) != 0 || len(api.commentEdits) != 1 { + t.Fatalf("set grew on same head: res=%+v comments=%v edits=%d", res, api.comments, len(api.commentEdits)) + } + for _, want := range []string{"reason=check-failing head=aaa n=1 mode=preempt", "attempt=1", "`changelog-fragment-guard`", "`native-queue-policy`"} { + if !strings.Contains(lastEdit(), want) { + t.Fatalf("fold missing %q:\n%s", want, lastEdit()) + } + } + if len(sink.nudges) != 1 { + t.Fatalf("relay re-dispatched on the same head: %d", len(sink.nudges)) + } + rec, _ := e.stageStore.Get(key) + if rec.NudgeReasonCount != 1 || !reflect.DeepEqual(rec.NudgeCIChecks, []string{"changelog-fragment-guard", "native-queue-policy"}) || !rec.NudgeCIAt.Equal(clock.at.Add(-4*time.Minute)) { + t.Fatalf("ledger after fold: %+v", rec) + } + + // Same head again, prefix flips back to required- naming one check: + // the set is a subset of what the comment lists → nothing at all. + api.reset() + clock.advance(time.Minute) + observe(e, nudgePR(7, "aaa", in072...), "required-check-failing:changelog-fragment-guard") + if api.writes() != 0 || len(api.commentEdits) != 1 || len(sink.nudges) != 1 { + t.Fatalf("subset flap wrote: comments=%v edits=%d sink=%d", api.comments, len(api.commentEdits), len(sink.nudges)) + } + + // New head, same failing set: edited in place with attempt 2, the + // relay is told (the author pushed), still no new comment. + api.reset() + clock.advance(10 * time.Minute) + res = observe(e, nudgePR(7, "bbb", in072...), "optional-check-failing:changelog-fragment-guard", "changelog-fragment-guard", "native-queue-policy") + if res.Comments != 0 || len(nudgeComments(api)) != 0 || len(api.commentEdits) != 2 || len(sink.nudges) != 2 { + t.Fatalf("same set new head: res=%+v comments=%v edits=%d sink=%d", res, api.comments, len(api.commentEdits), len(sink.nudges)) + } + for _, want := range []string{"head=bbb n=1", "attempt=2", "failed on 2 heads so far (latest `bbb`)"} { + if !strings.Contains(lastEdit(), want) { + t.Fatalf("attempt rewrite missing %q:\n%s", want, lastEdit()) + } + } + + // Restart: a fresh engine on the same store file sees the ledger and + // the same head + set is still nothing. + if err := e.stageStore.Save(); err != nil { + t.Fatal(err) + } + api.reset() + e = newNudgeEngineAt(t, apiURLOf(t, api), storePath, clock, sink, policy) + clock.advance(time.Minute) + observe(e, nudgePR(7, "bbb", in072...), "check-failing:native-queue-policy") + if api.writes() != 0 || len(api.commentEdits) != 2 || len(sink.nudges) != 2 { + t.Fatalf("restart re-nudged: comments=%v edits=%d sink=%d", api.comments, len(api.commentEdits), len(sink.nudges)) + } + rec, _ = e.stageStore.Get(key) + if rec.NudgeCIAttempts != 2 || rec.NudgeCIHead != "bbb" || rec.NudgeMode != "preempt" { + t.Fatalf("ledger not persisted: %+v", rec) + } + + // New head, a different failing set, 15 minutes into the 6h cooldown: + // folded into the comment (attempt restarts at 1 for the new set) and + // the class count does not restart. + api.reset() + res = observe(e, nudgePR(7, "ccc", in072...), "check-failing:lint") + if res.Comments != 0 || len(nudgeComments(api)) != 0 || len(api.commentEdits) != 3 || len(sink.nudges) != 3 { + t.Fatalf("changed set inside cooldown: res=%+v comments=%v edits=%d sink=%d", res, api.comments, len(api.commentEdits), len(sink.nudges)) + } + if !strings.Contains(lastEdit(), "head=ccc n=1") || !strings.Contains(lastEdit(), "attempt=1") || !strings.Contains(lastEdit(), "`lint`") || strings.Contains(lastEdit(), "native-queue-policy") { + t.Fatalf("fold rewrite:\n%s", lastEdit()) + } + rec, _ = e.stageStore.Get(key) + if rec.NudgeReasonCount != 1 || !rec.NudgeCIAt.Equal(time.Date(2026, 11, 8, 12, 0, 0, 0, time.UTC)) || !reflect.DeepEqual(rec.NudgeCIChecks, []string{"lint"}) { + t.Fatalf("ledger after cooldown fold: %+v", rec) + } + + // Past the cooldown, yet another set on a new head: a fresh nudge + // (count restarts, cooldown clock moves) — still the one comment. + api.reset() + clock.advance(7 * time.Hour) + res = observe(e, nudgePR(7, "ddd", in072...), "check-failing:vet") + if res.Comments != 0 || len(nudgeComments(api)) != 0 || len(api.commentEdits) != 4 || len(sink.nudges) != 4 || sink.nudges[3].Nudge != 1 { + t.Fatalf("changed set after cooldown: res=%+v comments=%v edits=%d sink=%+v", res, api.comments, len(api.commentEdits), sink.nudges) + } + rec, _ = e.stageStore.Get(key) + if rec.NudgeReasonCount != 1 || !rec.NudgeCIAt.Equal(clock.at) || rec.NudgeCIAttempts != 1 { + t.Fatalf("ledger after fresh nudge: %+v", rec) + } + if len(api.comments) != 0 { + t.Fatalf("a second nudge comment was posted: %v", api.comments) + } +} + +func TestCINudgeDue(t *testing.T) { + now := time.Date(2026, 11, 8, 12, 0, 0, 0, time.UTC) + rec := stagelabels.Record{NudgeHead: "a", NudgeReason: stagelabels.NudgeReasonCIFailure, NudgeReasonCount: 1, NudgeReasonAt: now.Add(-time.Hour), NudgeCIChecks: []string{"lint", "unit"}, NudgeCIAt: now.Add(-time.Hour)} + legacy := stagelabels.Record{NudgeHead: "a", NudgeReason: stagelabels.NudgeReasonCIFailure, NudgeReasonCount: 1, NudgeReasonAt: now.Add(-time.Hour)} + cases := []struct { + name string + rec stagelabels.Record + head string + checks []string + cooldown time.Duration + ordinal int + ok bool + }{ + {name: "empty head", rec: rec, head: "", checks: []string{"unit"}, cooldown: 6 * time.Hour}, + {name: "new class", rec: stagelabels.Record{NudgeReason: "conflicting"}, head: "a", checks: []string{"unit"}, cooldown: 6 * time.Hour, ordinal: 1, ok: true}, + {name: "same head same set inside repeat window", rec: rec, head: "a", checks: []string{"unit", "lint"}, cooldown: 6 * time.Hour}, + {name: "same head set changed folds", rec: rec, head: "a", checks: []string{"unit", "lint", "vet"}, cooldown: 6 * time.Hour, ordinal: 0, ok: true}, + {name: "new head same set folds", rec: rec, head: "b", checks: []string{"lint", "unit"}, cooldown: 6 * time.Hour, ordinal: 0, ok: true}, + {name: "new head changed set inside cooldown folds", rec: rec, head: "b", checks: []string{"vet"}, cooldown: 6 * time.Hour, ordinal: 0, ok: true}, + {name: "new head changed set after cooldown counts", rec: rec, head: "b", checks: []string{"vet"}, cooldown: 30 * time.Minute, ordinal: 1, ok: true}, + {name: "zero cooldown counts", rec: rec, head: "b", checks: []string{"vet"}, cooldown: 0, ordinal: 1, ok: true}, + {name: "legacy record counts from the class", rec: legacy, head: "b", checks: []string{"vet"}, cooldown: 6 * time.Hour, ordinal: 0, ok: true}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + n, ok := ciNudgeDue(tc.rec, tc.head, tc.checks, 72*time.Hour, tc.cooldown, now) + if n != tc.ordinal || ok != tc.ok { + t.Fatalf("ciNudgeDue = (%d, %v), want (%d, %v)", n, ok, tc.ordinal, tc.ok) + } + }) + } + if ciFailureSetDigest([]string{"unit", "lint"}) != ciFailureSetDigest([]string{"lint", "unit"}) || len(ciFailureSetDigest([]string{"unit"})) != 12 { + t.Fatal("digest must be order-independent and 12 hex chars") + } + for in, want := range map[string]bool{"check-failing:unit": true, "optional-check-failing:links": true, "required-check-failing:lint": true, "conflicting": false, "status-failure": false} { + if got := isCIFailureNudgeReason(in); got != want { + t.Errorf("isCIFailureNudgeReason(%q) = %v", in, got) + } + } +} diff --git a/src/pkg/github/automerge/automerge_stage_labels.go b/src/pkg/github/automerge/automerge_stage_labels.go index be53f3d364..999500dcc4 100644 --- a/src/pkg/github/automerge/automerge_stage_labels.go +++ b/src/pkg/github/automerge/automerge_stage_labels.go @@ -56,6 +56,12 @@ type StageLabelPolicy struct { // class that persists (auto_merge.nudge_repeat_after, default 72h); // 0 never re-nudges. RenudgeInterval time.Duration + // CIFailureCooldown is how long after a counted CI-failure nudge a + // changed failing set on a new head folds into the existing comment + // instead of counting as a fresh nudge + // (governor.labels.stage.contributor_nudge.ci_failure_cooldown, + // default 6h; hivecommons/hive#17328). 0 disables the fold. + CIFailureCooldown time.Duration // Adoption turns the stage-074 adoption on // (governor.labels.stage.adoption.enabled, default true): a contributor // PR still red after the grace is superseded by an App PR that preserves diff --git a/src/pkg/stagelabels/stagelabels_test.go b/src/pkg/stagelabels/stagelabels_test.go index 860a714f2a..a193ef95ba 100644 --- a/src/pkg/stagelabels/stagelabels_test.go +++ b/src/pkg/stagelabels/stagelabels_test.go @@ -651,6 +651,7 @@ func TestNudgeReasonSlug(t *testing.T) { " ": "unknown", "check-failing:unit (lint)": "check-failing", "required-check-failing:unit": "check-failing", + "optional-check-failing:links": "check-failing", "Changes Requested by @Reviewer": "changes-requested-by--reviewer", "--merge_conflict.v2--": "merge_conflict.v2", "(only parenthetical)": "unknown", @@ -1828,3 +1829,26 @@ func TestTransitionDampenerExpiresAfterWindow(t *testing.T) { t.Fatalf("move after window expiry must be allowed: %+v", tr) } } + +func TestStoreMarkNudgedCIFailure(t *testing.T) { + now := time.Date(2026, 11, 8, 12, 0, 0, 0, time.UTC) + s := NewStore("", func() time.Time { return now }) + s.MarkNudgedCIFailure("missing", []string{"unit"}, "a", "spawn", 1, true, now) // unknown key: no-op + if _, ok := s.Get("missing"); ok { + t.Fatal("MarkNudgedCIFailure created a record") + } + key := Key("acme/widget", 7) + s.Observe(key, ReturnedToContributor, "check-failing:unit") + s.MarkNudgedCIFailure(key, []string{"unit", "lint"}, "a", "spawn", 1, true, now) + r, _ := s.Get(key) + if !reflect.DeepEqual(r.NudgeCIChecks, []string{"lint", "unit"}) || r.NudgeCIHead != "a" || r.NudgeCIAttempts != 1 || r.NudgeMode != "spawn" || !r.NudgeCIAt.Equal(now) { + t.Fatalf("after first: %+v", r) + } + // A fold (not counted) moves the set, head and attempt but keeps the + // cooldown clock and, with no mode given, the recorded mode. + s.MarkNudgedCIFailure(key, []string{"lint", "unit", "vet"}, "b", "", 2, false, now.Add(time.Hour)) + r, _ = s.Get(key) + if !reflect.DeepEqual(r.NudgeCIChecks, []string{"lint", "unit", "vet"}) || r.NudgeCIHead != "b" || r.NudgeCIAttempts != 2 || r.NudgeMode != "spawn" || !r.NudgeCIAt.Equal(now) { + t.Fatalf("after fold: %+v", r) + } +} diff --git a/src/pkg/stagelabels/store.go b/src/pkg/stagelabels/store.go index eb977c542d..ed411b478d 100644 --- a/src/pkg/stagelabels/store.go +++ b/src/pkg/stagelabels/store.go @@ -92,6 +92,18 @@ type Record struct { NudgeReason string `json:"nudge_reason,omitempty"` NudgeReasonCount int `json:"nudge_reason_count,omitempty"` NudgeReasonAt time.Time `json:"nudge_reason_at,omitempty"` + // NudgeCIChecks, NudgeCIHead, NudgeCIAt, NudgeCIAttempts and NudgeMode + // are the CI-failure nudge ledger (hivecommons/hive#17328): the sorted + // failing check names the one nudge comment currently lists, the head + // they were last seen on, when that set was last counted as a nudge + // (the ci_failure_cooldown clock), how many red heads the set has been + // seen on since, and the relay delivery mode of the last dispatch + // (reused by a same-head rewrite that does not re-dispatch). + NudgeCIChecks []string `json:"nudge_ci_checks,omitempty"` + NudgeCIHead string `json:"nudge_ci_head,omitempty"` + NudgeCIAt time.Time `json:"nudge_ci_at,omitempty"` + NudgeCIAttempts int `json:"nudge_ci_attempts,omitempty"` + NudgeMode string `json:"nudge_mode,omitempty"` // AdoptedHead / AdoptedBy / AdoptedAt record the stage-074 adoption: the // contributor head the hive adopted, the superseding App PR's number // (0 while the attempt is recorded but no PR exists) and when. One @@ -1463,9 +1475,15 @@ func (s *Store) MarkNudgedReason(key, reason string, n int, now time.Time) { // NudgeReasonSlug is the marker-safe reason class a contributor nudge is // keyed by: MentionCauseClass (so every red check is one "check-failing" // ask), lower-cased, with anything outside [a-z0-9._-] folded to '-'; -// an empty reason is "unknown". +// an empty reason is "unknown". Every CI-failure prefix (required-, +// optional-, plain check-failing) is the one NudgeReasonCIFailure class +// (hivecommons/hive#17328): the lane's prefix flaps between them as checks +// finish, and each flip used to count as a new class. func NudgeReasonSlug(reason string) string { class := strings.ToLower(MentionCauseClass(reason)) + if class == "optional-check-failing" { + class = NudgeReasonCIFailure + } var b strings.Builder for _, r := range class { switch { @@ -1482,6 +1500,37 @@ func NudgeReasonSlug(reason string) string { return slug } +// NudgeReasonCIFailure is the NudgeReasonSlug of every CI-failure reason. +const NudgeReasonCIFailure = "check-failing" + +// MarkNudgedCIFailure records the CI-failure nudge ledger after a nudge for +// the check-failing class: checks is the failing set the comment now lists +// (stored sorted), head the red head it was seen on, mode the relay +// delivery mode, attempt the count the comment shows, and counted whether +// this nudge started a new cooldown window (a fresh nudge, not a fold into +// the existing comment). +func (s *Store) MarkNudgedCIFailure(key string, checks []string, head, mode string, attempt int, counted bool, now time.Time) { + s.mu.Lock() + defer s.mu.Unlock() + r, ok := s.items[key] + if !ok { + return + } + sorted := append([]string(nil), checks...) + slices.Sort(sorted) + if counted { + r.NudgeCIAt = now + } + r.NudgeCIChecks = sorted + r.NudgeCIHead = head + r.NudgeCIAttempts = attempt + if strings.TrimSpace(mode) != "" { + r.NudgeMode = mode + } + s.items[key] = r + s.dirty = true +} + // Adoption modes (Record.AdoptMode). const ( AdoptModeSupersede = "supersede" From 79bbc6b4cdc291d421cf86729ea84bc668521ba6 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Sun, 8 Nov 2026 21:21:57 -0500 Subject: [PATCH 021/123] =?UTF-8?q?=E2=9C=A8=20activity=20monitor:=20show?= =?UTF-8?q?=20sentinel=20and=20hold=20as=20pills=20on=20the=20PR's=20real?= =?UTF-8?q?=20stage=20instead=20of=20forcing=20needs-decision=20(#17334)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sentinel alerts and hold-class labels are gates, not stages (owner decision 2026-11-08). The stage engine now routes a gated PR by its head's evidence like any other human hand-off — CI / 070 while checks run or fail, 071 on a reviewer question, 090-ready-for-human-merge when the head is otherwise clean — and keeps the gate reason on the route so the entry comment reads "Held: a sentinel alert is open on this PR. The hive never merges this head while the gate stands." and the dashboard popover still explains the stop. The gate remains a hard merge stop: the automerge lanes and the dashboard's delegated human-merge shortcuts refuse on the label itself, never on the stage number (tests pin a 090 PR with a sentinel alert or hold refused by the contributor, self-authored and trusted-author prefilters and by the dashboard's human-merge decision/outcome paths). Dashboard: a held 090 row's Merge queue cell reads "Held · sentinel · confirm intent" / "Held · hold" (amber ham-held, tooltip with the gate's reason, the route reason and the rule), never "Queued for merge"; the sentinel question's Approve / Let hive decide / direction / close actions stay available from that cell. needs-human keeps parking at 085. Fixes #17327 Signed-off-by: Andrew Anderson Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .../changed-sentinel-hold-pill-not-stage.md | 1 + .../dashboard-sections/activity-monitor.md | 6 +- src/docs/hive-merge.md | 2 +- .../labels-and-control-signals/reference.md | 2 +- .../stage-labels.md | 10 +- .../delegated_decision_human_merge.go | 19 +- .../delegated_decision_human_merge_test.go | 39 ++ src/pkg/dashboard/stage_tracker_decision.go | 6 + .../dashboard/stage_tracker_decision_test.go | 29 + .../stage_tracker_pills_gate_test.go | 1 + .../stage_tracker_sentinel_lane_test.go | 32 + src/pkg/dashboard/static-src/css/tracker.css | 4 + .../static-src/js/tracker-row-strip.js | 6 +- .../dashboard/static-src/js/tracker-row.js | 7 + .../dashboard/static-src/js/tracker-words.js | 33 +- src/pkg/dashboard/static/index.html | 50 +- .../github/automerge/automerge_stage_human.go | 18 +- .../automerge/automerge_stage_human_test.go | 98 ++- .../automerge/automerge_stage_labels_test.go | 20 +- .../automerge_sweep_prefilter_test.go | 53 ++ src/pkg/stageengine/derive_pr.go | 10 +- .../derive_pr_adoption_yield_test.go | 8 +- src/pkg/stageengine/derive_pr_classify.go | 40 +- .../derive_pr_returned_author_kind_test.go | 15 +- .../testdata/stage_goldens/human-route.json | 634 +++++++++--------- .../stage_goldens/lane-reason-authorkind.json | 96 +-- .../stage_goldens/lane-reason-modifier.json | 240 +++---- .../stage_goldens/lane-reason-verdict.json | 144 ++-- .../testdata/stage_goldens/precedence.json | 220 +++--- src/pkg/stagelabels/hold_test.go | 8 +- src/pkg/stagelabels/human.go | 116 +++- src/pkg/stagelabels/human_test.go | 83 ++- 32 files changed, 1288 insertions(+), 762 deletions(-) create mode 100644 changelog.d/changed-sentinel-hold-pill-not-stage.md diff --git a/changelog.d/changed-sentinel-hold-pill-not-stage.md b/changelog.d/changed-sentinel-hold-pill-not-stage.md new file mode 100644 index 0000000000..6d9a76909c --- /dev/null +++ b/changelog.d/changed-sentinel-hold-pill-not-stage.md @@ -0,0 +1 @@ +- activity monitor: sentinel alerts and `hold`-class labels are gates, not stages — a PR's column now follows its real progress (CI, Review, Merge queue) and the gate rides along as an amber **Held · sentinel · confirm intent** / **Held · hold** pill with the route reason in its tooltip and the decision popover, instead of pinning every such PR at `stage/085-needs-decision`; the gate stays a hard merge stop (lanes and the dashboard's human-merge shortcuts refuse on the label itself, never on the stage) and the 090 entry comment says "Held: …" (hivecommons/hive#17327). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 7edf808343..97da5e0bc8 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -72,7 +72,7 @@ Side stages share a column rather than adding columns: | 045 Needs human decision | Actionable on an issue. A pre-045 issue still wearing 085 is drawn here until reconciliation. | | 070 Fixing / 071 Needs author / 072 Returned to contributor | CI / Review: Hive repairs its own PR at 070; a human author acts at 071; a contributor agent gets its PR back at 072. `needs-rebase` explains a repair here, not at 050. | | 074 Adopted by hive | CI / Review while the Hive repairs adopted work; pending, green or red pushes remain 074 until the merge gate takes it. | -| 085 Needs human decision / 090 Ready for human merge | Merge queue on a PR. Read the decision or merge reason rather than assuming Hive will merge it. | +| 085 Needs human decision / 090 Ready for human merge | Merge queue on a PR. Read the decision or merge reason rather than assuming Hive will merge it. A 090 cell reading **Held · sentinel · confirm intent** or **Held · hold** is a gate on an otherwise ready PR: Hive never merges it while the gate stands. | | 060 / 080 / 095 / 100 | Separate gate states; use the [merge-gate reference](#merge-queue-pills--legend) below for exact words and countdowns. | The author legend is a blue Hive hexagon, purple contributor-agent robot or teal human silhouette. The kind is `author/*`, inferred from the snapshot if its label is absent; the link tooltip names the login. On Claimed, the actor is the claim holder; on PR in progress and Returned to contributor it is the author. Hive owns review, adoption and auto-merge work; a human owns a human decision or manual merge. The payload's `stage_actor` is the authoritative actor (see [Who is on it](#who-is-on-it-actor-icons)). @@ -236,7 +236,7 @@ Durations, the flash timing (`--ham-move-flash-ms`, `--ham-move-flash-gap-ms`, ` #### Sentinel alert -A pull request the suspicious-activity sentinel flagged — it wears the `sentinel-alert` label (`sentinel.label`), or the review evidence bundle for its current head records sentinel findings — carries `sentinel_alert: true` in the tracker payload (with `sentinel_findings` and a short `sentinel_reason` when the bundle has them); a webhook label change flips it live. In the **Needs human decision** lane the lit chevron's own words read **Sentinel alert · needs human** (danger-tinted, the same wording in the cell's `title` and `aria-label`, and in the compact caption), so a maintainer reads the security implication before the stage mechanics; in every other lane at or past the merge gate (080, 090, 095, 100) the row shows a compact danger-tinted `sentinel` chip ahead of `needs rebase` / `regressed` / `stalled`; before the gate the chip is held back with the other merge-gate pills (see *Pills before the merge gate*) while `sentinel_alert` stays truthful in the payload. +A pull request the suspicious-activity sentinel flagged — it wears the `sentinel-alert` label (`sentinel.label`), or the review evidence bundle for its current head records sentinel findings — carries `sentinel_alert: true` in the tracker payload (with `sentinel_findings` and a short `sentinel_reason` when the bundle has them); a webhook label change flips it live. **A sentinel alert is a gate, not a stage** (owner decision 2026-11-08, [#17327](https://github.com/hivecommons/hive/issues/17327)): the column is the PR's real progress (CI, Review, or Merge queue once checks are green and the verdict approves) and the alert rides along as a pill. A green, reviewed, flagged PR stands at `090` in the **Merge queue** column and its lit chevron reads **Held · sentinel · confirm intent** (amber, `ham-held`; the same words lead the cell's `title` / `aria-label`, followed by the sentinel reason, the route reason and "Hive never merges this head while the gate stands."), never *Queued for merge*; a PR a `hold` / `do-not-merge*` label stops reads **Held · hold** the same way, with the holder and reason from the hold pill. The cell keeps the sentinel question's actions — *Approve* (the human review the alert asked for), *Let hive decide*, direction, close. In the **Needs human decision** lane (a reviewer's question on a flagged head) the lit chevron's own words read **Sentinel alert · needs human** (danger-tinted, the same wording in the cell's `title` and `aria-label`, and in the compact caption), so a maintainer reads the security implication before the stage mechanics; in every other lane at or past the merge gate (080, 095, 100) the row shows a compact danger-tinted `sentinel` chip ahead of `needs rebase` / `regressed` / `stalled`; before the gate the chip is held back with the other merge-gate pills (see *Pills before the merge gate*) while `sentinel_alert` stays truthful in the payload. The tooltip reads "Sentinel flagged security-relevant changes at ``: ``" (a generic description stands in when the bundle has no reason). An issue carried by one flagged PR shows the lane text too, and a nested PR sub-row shows its own. The *Decide…* dialogs for a flagged PR open with a ⚠ line per flagged PR naming the sentinel reason, and *Approve* is styled as a dangerous action. @@ -244,7 +244,7 @@ The payload also carries `sentinel_details`: one entry per finding with its `rul A person's *Approve* through that dialog **is** the human review the alert asked for: it removes the `sentinel-alert` label when present and records a `sentinel_acknowledged` human action keyed to the head in the review evidence bundle, so a bundle-only alert (findings but no label — hivecommons/crux#30) clears too; the payload then reads `sentinel_alert: false` with `sentinel_reason` suffixed `— acknowledged by @login`, the findings stay on record, and a new head starts over. -The delegated *Let hive decide* path never clears it. Hovering the lit chevron of a parked row names the parking stage itself (`Needs human decision`), not the 080 column it rides on; `Next move` follows the real stage (human at 085, hive at 080). Lane text and chip update in place on refresh (keyed reconcile, no flash). +The delegated *Let hive decide* path never clears it. Hovering the lit chevron of a parked row names the parking stage itself (`Needs human decision`), not the 080 column it rides on; `Next move` follows the real stage (human at 085 and at a held 090, hive at 080). A held row's stage never advances the merge: the lanes and the dashboard's one-click shortcuts check the gate itself, so a parked PR never merges unattended. Lane text and chip update in place on refresh (keyed reconcile, no flash). #### Unauthorized pill diff --git a/src/docs/hive-merge.md b/src/docs/hive-merge.md index b23018fcb3..61f733ea56 100644 --- a/src/docs/hive-merge.md +++ b/src/docs/hive-merge.md @@ -1125,7 +1125,7 @@ human-authored PR → `stage/071-needs-author`, on a clanker PR → review or `/hive decision ` on a hive-authored PR's current head → `stage/070-fixing` with reason `human-changes-requested` and one fix kick carrying the text ([#13041](https://github.com/hivecommons/hive/issues/13041)), -hold / sentinel alert → `stage/085-needs-decision`, hive-authored PR whose fix +hold / sentinel alert → a **gate on the PR's real stage**, not a stage of its own (the column follows CI / review / merge-queue progress, the Merge queue cell reads *Held · sentinel · confirm intent* / *Held · hold*, and the lanes refuse the merge on the label itself — a parked PR never merges unattended, [#17327](https://github.com/hivecommons/hive/issues/17327)), hive-authored PR whose fix dispatch is refused with `fix-attempts-exhausted` → `stage/085-needs-decision` with reason `fixer-exhausted:` and a once-per-head decision comment (re-author / hand to a person / close as not planned; a stale `decision-answered` cannot pull it diff --git a/src/docs/labels-and-control-signals/reference.md b/src/docs/labels-and-control-signals/reference.md index fb920febef..c602e1381c 100644 --- a/src/docs/labels-and-control-signals/reference.md +++ b/src/docs/labels-and-control-signals/reference.md @@ -150,7 +150,7 @@ A hive-filed issue (`[selfreport]`, app or AI author) counts as trusted. The gat **Release or override.** A human removes `hold` on a contributor PR; Hive never auto-releases it there. On a **hive-authored** PR still wearing a hive-set reporter-trust hold (newest `hold` event labeled by the App bot with the notice at or after it — a person's hold is left alone), the stage-label pass releases `hold` (and `needs-human` when the notice says the gate added it), posts one `` comment and logs `stage labels: releasing self-imposed reporter-trust hold`. -The pass also records the hold's provenance (`by`, `source`, `reason`, `since`) on the stage store, so the tracker pill reads *Held by hive · reporter trust (issue #N by @X, contributor)* and the 085 comment names who set the hold and why. Holdguard re-holds on a new head SHA. +The pass also records the hold's provenance (`by`, `source`, `reason`, `since`) on the stage store, so the tracker pill reads *Held by hive · reporter trust (issue #N by @X, contributor)* and the stage entry comment names who set the hold and why (a hold is a gate on the PR's real stage, not a stage of its own — [#17327](https://github.com/hivecommons/hive/issues/17327)). Holdguard re-holds on a new head SHA. **Configuration and implementation.** `github.reporter_trust_hold` (nil follows `reporter_trust.enabled`), per-repo `project.repo_policies[].reporter_trust_hold`, `HIVE_REPORTER_TRUST_HOLD` (`src/pkg/github/pr_reporter_trust.go`, `src/pkg/github/pr_level_hold.go`, `src/pkg/github/automerge/reporter_trust_release.go`) diff --git a/src/docs/labels-and-control-signals/stage-labels.md b/src/docs/labels-and-control-signals/stage-labels.md index c5bc086c13..3f140be71f 100644 --- a/src/docs/labels-and-control-signals/stage-labels.md +++ b/src/docs/labels-and-control-signals/stage-labels.md @@ -107,8 +107,8 @@ referenced it) a lone `stage/050-review-pending` | `stage/072-returned-to-contributor` | PR | clanker PR (`author/clanker`, relay or external hive): CI red / changes requested / conflicting; the hive posted its diagnosis, the ball is in the contributor hive's court. (Briefly spelled `stage/072-needs-author` by [#12713](https://github.com/hivecommons/hive/pull/12713); the engine renames that label back in place) | 24h | | `stage/074-adopted-by-hive` | PR | the author (a clanker) was unavailable — relay offline, never registered, or silent past the grace (see below); the hive took the PR over: in place on the PR's own branch when it may push there (the scanner's red-PR fix kick rebases and fixes it), otherwise via `hive/adopt-` and a superseding App PR that keeps the author's commits (the original closes automatically when the superseder merges). Adoption is an **ownership** state, not a CI state: the PR reads 074 for as long as the hive owns it — through its fixes going pending, green, reviewed or red again (074 outranks 050/060/070/071/072, and a 085 whose only cause is the review swarm's `requires_human` / decision request — the hive answers that on the superseding PR, so the original leaves the merge gate for the CI/Review column with an "Adopted → #N" pill in the adopting pass, never "Needs human decision" (hivecommons/hive#14975 → #14980, #14947 → #14977); a hold, sentinel alert, `needs-human` a person applied, fork-guard or manual-merge lane rule keeps 085) — and leaves 074 only at the merge gate (080/090/100), when the adoption is released, or to 085 `adoption-stalled:` when the head sat unchanged past the dwell with CI idle and a real blocker the hive cannot push past — a red optional check alone never counts, and the escalation releases back to 074 as soon as the reason clears (an in-place adoption with a blocking review finding re-homes to `hive/adopt-` first instead; one with a squash-unsafe hive commit elects a merge commit on a `role/trusted` PR — `merge-method/merge` label, lane continues — and otherwise immediately re-homes to an App-authored superseder (`signoff-rehome`), preserving commits and sign-offs while changing squash attribution; loss of push access re-homes immediately, and idle rebase work re-homes after the dwell). For in-place adoption, a changed head must be linked to the App bot by GitHub commit metadata (the stage store only remembers heads that already passed that check); otherwise the hive treats it as a contributor push and hands the PR back (072 if red, else the normal path). Forgeable git author/committer names and emails never keep 074. A PR whose author holds **admin** or **maintain** on the repository is never adopted or re-homed (one cached permission read per repo and author per 10 minutes; a failed read is not cached and defers: no adoption, and an existing adoption is neither released nor re-homed until the read succeeds), and an adoption of such an author is released on the next pass, closing a still-open hive superseder with a note first. | 3h | | `stage/080-awaiting-merge-admission` | PR | nothing left for the author: CI green (no red check on the head, required or not), verdict approve, no modifiers — and the automerge lane has not admitted it yet (prefilter not evaluated for this head, labels not synced, lane tripped). A stall here means a lane problem, so the hive also posts one `` comment with the lane's last skip reason | 30m | -| `stage/085-needs-decision` | PR | **PR-only** since the owner decision of 2026-10-17 (issues park at `stage/045-needs-decision`; before that this stage carried both, [#12683](https://github.com/hivecommons/hive/issues/12683)). A person owes a **decision**, not a merge: a `requires_human` swarm verdict (reason `reviewer-verdict:requires_human`), `sentinel-alert`, `hold` / `do-not-merge*` / `needs-decision` modifier, no reviewer configured, GitHub workflow approval is required for a trusted same-repo bot/App/clanker PR (`workflow-approval-required:`); Hive has posted `/ok-to-test` and is waiting for the repo-local `hive-ok-to-test` workflow or a maintainer, or a human-only lane rule unrelated to trust (workflow-path edits, tests removed, human-merge path, reporter-trust hold). A trusted human's normal GitHub **Approve** review on the exact current head clears a `requires_human` verdict for any author kind/lane and records `reviewer-verdict:requires_human:human-approved@`; a new head invalidates it. The same approval also clears the merge-lane review gate over any non-approved swarm outcome, a perspective's `changes_requested` included (the `review_evaluated` audit line records `human_approver` and `overrode`); without it, `changes_requested` / `reject` still require fixes or manual merge. Under `review.self_authored_decision_policy: resolve`, a Hive-authored PR's reviewer decision question parks here only when it matches a named risk class (`review.DecisionRiskClasses`: permissions/credentials, security, sensitive paths, data loss/irreversible, merge/trust policy, external side effects, licensing/legal, unverifiable) or carries ``; any other question is resolved by policy and recorded as an advisory reason on the approving aggregate. Hive-authored non-risk incomplete-fix reviews with concrete remediation are normalized to `changes_requested` at verdict load/aggregation time and by the stage-label detail selector, even when the finding was marked high severity; duplicate summary/changelog intent-alignment cleanup with a concrete trim/reword fix is included. Those PRs go to `stage/070-fixing`, not here. On a hive-authored PR the trusted human can also answer with a **changes requested** review on the head, or `/hive decision `, which moves the PR to `stage/070-fixing` and kicks the author agent with the text verbatim ([#13041](https://github.com/hivecommons/hive/issues/13041)); `/hive decision` on a PR the hive did not open gets one reply naming the review-side equivalents. One `` comment on entry names what is owed, and for a hive-authored `requires_human` park names the two actions: approve the head to merge as-is, or request changes and the hive pushes the fix. When the park is a `hold`, the comment says who set it — *the `hold` label was set by the hive itself: reporter trust (issue #N by @X, contributor)* or *by @login* — and for a hive-set hold offers *release the hold* / *keep it* (hivecommons/hive#15020) | none | -| `stage/090-ready-for-human-merge` | PR | the hive would merge this itself but trust/role blocks it: reviewer verdict approve at the **current** head, required checks green (tide excluded), DCO yes, no sentinel alert, no conflicts, soak elapsed, no hold — and the only remaining lane reason is the author's tier/role. A maintainer's `/lgtm` `/approve` is the only missing step. One `` comment on entry carries the evidence. Always read with the `role/*` and `author/*` labels. (Was `stage/090-needs-human` before [#12528](https://github.com/hivecommons/hive/issues/12528); the engine renames the GitHub label in place) | none | +| `stage/085-needs-decision` | PR | **PR-only** since the owner decision of 2026-10-17 (issues park at `stage/045-needs-decision`; before that this stage carried both, [#12683](https://github.com/hivecommons/hive/issues/12683)). A person owes a **decision**, not a merge: a `requires_human` swarm verdict (reason `reviewer-verdict:requires_human`), no reviewer configured, GitHub workflow approval is required for a trusted same-repo bot/App/clanker PR (`workflow-approval-required:`); Hive has posted `/ok-to-test` and is waiting for the repo-local `hive-ok-to-test` workflow or a maintainer, or a human-only lane rule unrelated to trust (workflow-path edits, tests removed, human-merge path, reporter-trust hold). A trusted human's normal GitHub **Approve** review on the exact current head clears a `requires_human` verdict for any author kind/lane and records `reviewer-verdict:requires_human:human-approved@`; a new head invalidates it. The same approval also clears the merge-lane review gate over any non-approved swarm outcome, a perspective's `changes_requested` included (the `review_evaluated` audit line records `human_approver` and `overrode`); without it, `changes_requested` / `reject` still require fixes or manual merge. Under `review.self_authored_decision_policy: resolve`, a Hive-authored PR's reviewer decision question parks here only when it matches a named risk class (`review.DecisionRiskClasses`: permissions/credentials, security, sensitive paths, data loss/irreversible, merge/trust policy, external side effects, licensing/legal, unverifiable) or carries ``; any other question is resolved by policy and recorded as an advisory reason on the approving aggregate. Hive-authored non-risk incomplete-fix reviews with concrete remediation are normalized to `changes_requested` at verdict load/aggregation time and by the stage-label detail selector, even when the finding was marked high severity; duplicate summary/changelog intent-alignment cleanup with a concrete trim/reword fix is included. Those PRs go to `stage/070-fixing`, not here. On a hive-authored PR the trusted human can also answer with a **changes requested** review on the head, or `/hive decision `, which moves the PR to `stage/070-fixing` and kicks the author agent with the text verbatim ([#13041](https://github.com/hivecommons/hive/issues/13041)); `/hive decision` on a PR the hive did not open gets one reply naming the review-side equivalents. One `` comment on entry names what is owed, and for a hive-authored `requires_human` park names the two actions: approve the head to merge as-is, or request changes and the hive pushes the fix. When the park is a `hold`, the comment says who set it — *the `hold` label was set by the hive itself: reporter trust (issue #N by @X, contributor)* or *by @login* — and for a hive-set hold offers *release the hold* / *keep it* (hivecommons/hive#15020). **Sentinel alerts and hold-class labels are gates, not stages** (owner decision 2026-11-08, [#17327](https://github.com/hivecommons/hive/issues/17327)): they no longer pin a PR here. The column is the PR's real progress — CI running or red → CI / 070, a reviewer question or changes requested → Review / 071, checks green and verdict approve (or no verdict required) → `090-ready-for-human-merge` — and the gate rides along as a pill (**Held · sentinel · confirm intent** / **Held · hold**) with the route reason ("a sentinel alert is open on this PR", "held by label `hold`") kept for the decision popover. The gate is still a hard merge stop: every lane and the dashboard's human-merge shortcuts refuse the merge on the label itself, never on the stage number, so a parked PR never merges unattended. `needs-human` keeps parking here (an explicit human ask, not a gate) | none | +| `stage/090-ready-for-human-merge` | PR | the hive would merge this itself but trust/role blocks it: reviewer verdict approve at the **current** head, required checks green (tide excluded), DCO yes, no conflicts, soak elapsed — and the only remaining lane reason is the author's tier/role. A maintainer's `/lgtm` `/approve` is the only missing step. A PR this clean that also carries a sentinel alert or a hold-class label stands here too ([#17327](https://github.com/hivecommons/hive/issues/17327)): the gate is a pill on the real stage, the Merge queue cell reads **Held · sentinel · confirm intent** / **Held · hold** instead of queued, and the entry comment adds "Held: a sentinel alert is open on this PR. The hive never merges this head while the gate stands." — resolve the alert or lift the hold, then `/lgtm` `/approve`. One `` comment on entry carries the evidence. Always read with the `role/*` and `author/*` labels. (Was `stage/090-needs-human` before [#12528](https://github.com/hivecommons/hive/issues/12528); the engine renames the GitHub label in place) | none | | `stage/095-pre-merge-soak` | PR | lane admitted; the pre-merge soak window (`automerge.contributor_lane.soak_minutes`, default 30) is running before the merge is attempted. The dashboard shows it as **Soaking** on the merge-gate column with the time left; a quiet 095 past its dwell is a lane bug (the soak elapsed but the lane never promoted), so the stall note says so. 100 → 095 on a re-evaluation is a reclassification, not a regression | 45m (30m soak + 15m grace) | | `stage/100-merge-queue` | PR | lane admitted and soak complete: merge-eligible, waiting for tide / the merge window — and every check on the head is green (tide excluded). A red optional check is 070/071/072 like any red CI | 3h | @@ -385,7 +385,8 @@ used to admit the PR: | CI red (required or optional) while **every** failing check on the head is also red on the base branch's tip — the governor's `base_red_checks` / `base_red`, set during CI enrichment when a same-named latest check run on the base ref (meta checks excluded) concluded failure / timed_out / cancelled / action_required / startup_failure / stale **and** the PR's changed files include none of `.github/workflows/*`, `Dockerfile` / `Dockerfile.*` / `*.Dockerfile`, `go.mod` / `go.sum` (a PR touching those plausibly owns the check and stays author-facing; a lookup error or a diff beyond the file-list page budget also stays author-facing) | `050-review-pending` / `060-reviewed`, reason `base-branch-red:,` ("waiting for the base branch's CI to recover (…) — not this PR's fault"): never 070/071/072, never nudged, never stalled, still not merged (the lane's skip reason is the same token). The fix loop counts no attempt, kicks no fixer, and posts one `` hold comment per head; an escalation the hive itself raised (ledger `label_applied`) over such a head has its `needs-human` removed with the hold wording. The next evaluation after the base goes green re-evaluates the head: a still-red PR is handed back as usual. Conflicts and requested changes stay author-facing (seen on [#13270](https://github.com/hivecommons/hive/pull/13270) and [#13258](https://github.com/hivecommons/hive/pull/13258), 2026-10-20) | | CI red (required or optional) on a **fork** PR while **every** failing check's annotation says the check refuses forks (case-insensitive `fork pull request(s) cannot`, `maintainer must push this branch`, or `cannot publish` together with `fork` — a fork-publication / fork-secrets guard) | `085-needs-decision`, reason `fork-guard:,`: never 070/071/072, never nudged, never adopted (074) — neither the author nor the hive can turn the check green by pushing to the fork. The entry comment names the check and says a maintainer must push the branch to the repository (or approve the run as the repository requires). The guard's checks are remembered on the PR's stage record: a head the CI-enriched enumeration has not classified yet (a new push, or a snapshot that dropped the PR) parks the same way when every red check in its check digest is one the guard refused before, so a fork PR is not nudged and adopted on each new head first ([projectbluefin/utah-packages#869](https://github.com/projectbluefin/utah-packages/pull/869)). A same-repo PR with the same message, or a fork PR with any other red check, is handed back as usual ([#14273](https://github.com/hivecommons/hive/issues/14273)) | | any **non-required** check on the current head is red, whatever the lane's reason (the lane gates on required checks only, so it still soaks and merges; a reader of the rollup sees ✗). Parking modifiers (`hold`, `needs-human`, admission reasons) still win | `070-fixing` / `071-needs-author` / `072-returned-to-contributor` (by author kind), reason `optional-check-failing:` (the nudge lists every red check); never 080 or 100. A red *required* check is the lane's own `required-check-failing:*` → 070/071/072 ([#12538](https://github.com/hivecommons/hive/issues/12538), seen on [#12457](https://github.com/hivecommons/hive/pull/12457)) | -| `label:hold`, `held`, `label:needs-human`, `exempt-label`, `excluded-label:*`, `sentinel`, `human-merge-path*`, `intent-*`, `contributor-lane:workflow-path` / `tests-removed` / `no-reviewer` / `reporter-trust-hold` | human hand-off, **decision** cause → routed by the head's evidence (below); lands at `085-needs-decision` when the head is otherwise clean. `contributor-lane:workflow-path` reads "awaiting owner approval": a trusted merger's `APPROVED` review on the current head (or a dashboard `/hive decision approve`) releases the fence and the lane merges the PR itself (`owner_approval_releases_workflow_fence`, [#14664](https://github.com/hivecommons/hive/issues/14664)); only with the toggle off, or when the App lacks `workflows: write` for the merge (`hive:unauthorized`, `merge-workflow-path`), does an approved head park at `090-ready-for-human-merge` for a person's click | +| `label:hold`, `held`, `sentinel`, `contributor-lane:sentinel-blocked` | **gate**, not a stage ([#17327](https://github.com/hivecommons/hive/issues/17327)): routed by the head's evidence (below) exactly as a trust cause — CI / 070 while checks run or fail, 071 on a reviewer question, `090-ready-for-human-merge` when the head is otherwise clean — with the gate reason kept on the route so the popover and the entry comment say "Held: …". The lanes refuse the merge on the label, never on the stage | +| `label:needs-human`, `exempt-label`, `excluded-label:*`, `human-merge-path*`, `intent-*`, `contributor-lane:workflow-path` / `tests-removed` / `no-reviewer` / `reporter-trust-hold` | human hand-off, **decision** cause → routed by the head's evidence (below); lands at `085-needs-decision` when the head is otherwise clean. `contributor-lane:workflow-path` reads "awaiting owner approval": a trusted merger's `APPROVED` review on the current head (or a dashboard `/hive decision approve`) releases the fence and the lane merges the PR itself (`owner_approval_releases_workflow_fence`, [#14664](https://github.com/hivecommons/hive/issues/14664)); only with the toggle off, or when the App lacks `workflows: write` for the merge (`hive:unauthorized`, `merge-workflow-path`), does an approved head park at `090-ready-for-human-merge` for a person's click | | `merge-refused:review-required` (GitHub answered the merge with 405 "At least N approving review(s) is/are required by reviewers with write access"), `merge-refused:method-not-allowed` (405 "Merge commits / Squash merges / Rebase merges are not allowed on this repository") | human hand-off, **decision** cause, as above: lands at `085-needs-decision` when the head is otherwise clean, and the entry comment names the rule GitHub refused the merge on. Every sweep (self-authored, trusted-author, queued, contributor lane) logs these as skips, not `merge-failed` errors, and stops calling merge: a review refusal is remembered per PR head and re-armed when the head moves, when GitHub's `mergeable_state` for the PR changes (an approving review turns `blocked` into `clean`), or after 30 minutes; a method refusal is remembered per repository and method for 30 minutes. The hive never switches the merge method on its own (a forward merge or a `merge-method/merge` PR must not be squashed), so `method-not-allowed` is a manual-merge park. Any other 405, 409 or 422 is still `merge-failed` | | `contributor-lane:no-claim` / `claim-*` / `author-association` / `no-linked-issue`, `untrusted-author-role`, `author-permission-missing` | human hand-off, **trust** cause → routed by the head's evidence (below); lands at `090-ready-for-human-merge` when the head is otherwise clean | | hand-offs (`not-app-authored`, `trusted-bot-lane`, `trusted-author:app-authored`, `contributor-lane:app-authored`), transient fetch errors | no opinion — the owning lane decides; nothing is written. An App-authored PR is handed off by the trusted-author and contributor-lane tiers under their own reason; the self-authored lane owns it, and its `review-gate:no-review-bundle` is the stage's reason while the swarm has not reviewed the head ([#14482](https://github.com/hivecommons/hive/issues/14482)) | @@ -428,7 +429,8 @@ conflict reason and the contributor lane's soak — and |---|---| | verdict changes_requested at the head, any red gating check, DCO sign-off missing, merge conflict (`conflicting` / `needs-rebase`) | `071-needs-author` (`author/human`) / `072-returned-to-contributor` (`author/clanker`); `070-fixing` when self-authored or `author/hive`. The 072 nudge lists every reason. Moving 085/090 → 071/072 is not a regression | | no verdict for this head yet, or nothing has reported on the head (just pushed) and the verdict is not already `requires_human` | `050-review-pending` — never 090 without a current-head approve | -| verdict `requires_human` at the head (even on a fresh head nothing has reported on yet, [#13115](https://github.com/hivecommons/hive/issues/13115)), sentinel alert, hold-class label, no reviewer configured, or a non-trust human-only lane rule | `085-needs-decision` + one entry comment naming the decision ("Needs a decision, not a merge: a sentinel alert is open on this PR.") | +| verdict `requires_human` at the head (even on a fresh head nothing has reported on yet, [#13115](https://github.com/hivecommons/hive/issues/13115)), no reviewer configured, or a non-trust human-only lane rule | `085-needs-decision` + one entry comment naming the decision ("Needs a decision, not a merge: the reviewer asked for a human decision.") | +| everything above clean but a sentinel alert or hold-class label on the PR | `090-ready-for-human-merge`, held ([#17327](https://github.com/hivecommons/hive/issues/17327)): the entry comment carries the evidence and adds "Held: a sentinel alert is open on this PR. The hive never merges this head while the gate stands." The gate never changes the stage; it only stops the merge | | checks still running / unreadable, or the lane's soak not yet elapsed | `060-reviewed` (not 095: that stage means the lane has *admitted* the head, which a trust-blocked PR never is) | | everything above clean and only trust in the way | `090-ready-for-human-merge` + one entry comment: "Ready for a human merge: verdict approved @abc1234, 55/55 checks green, DCO yes, soak 1h0m0s elapsed. Blocked only by `role/newcomer` (below require_tiers)." | diff --git a/src/pkg/dashboard/delegated_decision_human_merge.go b/src/pkg/dashboard/delegated_decision_human_merge.go index 5d1947a826..e6ef7c3cf8 100644 --- a/src/pkg/dashboard/delegated_decision_human_merge.go +++ b/src/pkg/dashboard/delegated_decision_human_merge.go @@ -57,10 +57,19 @@ func delegatedHumanMergeOptions(in delegatedecision.Input, number int, mergerRol // decisionWhyMergerRole is the plain reason a merge button is greyed. const decisionWhyMergerRole = "merger role required" +// delegatedHumanMergeGated reports whether a 090 PR is held by a gate — an +// open sentinel alert or a hold-class label (hivecommons/hive#17327). The +// stage is the head's real progress, not a merge licence: neither +// human-merge shortcut below may approve, admit or adopt it; the policy +// (sentinel question, rail-hold) answers as it did when the gate pinned 085. +func delegatedHumanMergeGated(in delegatedecision.Input) bool { + return in.SentinelAlert || len(stagelabels.Holds(in.Labels)) > 0 +} + // delegatedHumanMergeOutcome answers "Let hive decide" on a PR wearing the // 090 label without running the policy. ok=false for anything else. func (s *Server) delegatedHumanMergeOutcome(repoFull string, number int, itemType, user string, mergerRole bool, in delegatedecision.Input, req delegatedDecisionRequest) (delegatedOutcome, bool) { - if in.Kind != delegatedecision.KindPR || !slices.Contains(in.Labels, stagelabels.ReadyForHumanMerge.Label()) { + if in.Kind != delegatedecision.KindPR || !slices.Contains(in.Labels, stagelabels.ReadyForHumanMerge.Label()) || delegatedHumanMergeGated(in) { return delegatedOutcome{}, false } reason := delegatedHumanMergeReason(in, req) @@ -167,17 +176,17 @@ func (s *Server) delegatedHumanMergeReviewPassed(in delegatedecision.Input) bool // delegatedHumanMergeDecision decides a 090 PR held only for its author's // trust. ok=false leaves the answer to delegatedHumanMergeOutcome: another -// 090 reason, a hive-authored PR, a sentinel alert (a person's call), the -// delegating user's own PR, an approval the user's role cannot give, or an +// 090 reason, a hive-authored PR, a sentinel alert or hold label (a +// person's call, hivecommons/hive#17327), the delegating user's own PR, an approval the user's role cannot give, or an // adoption this hive has turned off. func (s *Server) delegatedHumanMergeDecision(in delegatedecision.Input, req delegatedDecisionRequest, user string, mergerRole bool) (delegatedecision.Decision, []string, bool) { - if in.Kind != delegatedecision.KindPR || !slices.Contains(in.Labels, stagelabels.ReadyForHumanMerge.Label()) { + if in.Kind != delegatedecision.KindPR || !slices.Contains(in.Labels, stagelabels.ReadyForHumanMerge.Label()) || delegatedHumanMergeGated(in) { return delegatedecision.Decision{}, nil, false } if stageengineprstage.HumanMergeReason(delegatedHumanMergeReason(in, req)) != stageengineprstage.HumanMergeReasonUntrustedAuthor { return delegatedecision.Decision{}, nil, false } - if in.HiveAuthored || in.SentinelAlert || strings.EqualFold(strings.TrimSpace(in.Author), strings.TrimSpace(user)) { + if in.HiveAuthored || strings.EqualFold(strings.TrimSpace(in.Author), strings.TrimSpace(user)) { return delegatedecision.Decision{}, nil, false } ref := "#" + strconv.Itoa(in.Number) diff --git a/src/pkg/dashboard/delegated_decision_human_merge_test.go b/src/pkg/dashboard/delegated_decision_human_merge_test.go index c6064cda65..17f6a6f2ac 100644 --- a/src/pkg/dashboard/delegated_decision_human_merge_test.go +++ b/src/pkg/dashboard/delegated_decision_human_merge_test.go @@ -183,3 +183,42 @@ func TestDelegatedHumanMergeDecisionPersonAuthoredNeverAdopts(t *testing.T) { }) } } + +// TestDelegatedHumanMergeGatedPRIsNotDecided: a sentinel alert or a hold +// label is a gate riding the PR's real stage (hivecommons/hive#17327), so a +// green, reviewed PR wears the 090 label while held. Neither human-merge +// shortcut may approve, admit or adopt it on "Let hive decide": both step +// aside and the policy (sentinel question, rail-hold) answers as it did +// when the gate pinned 085. +func TestDelegatedHumanMergeGatedPRIsNotDecided(t *testing.T) { + srv := newDelegatedServer(t, &repoItemDecisionMock{}) + srv.deps.Config.Governor.Labels.Stage.Adoption.Enabled = boolPtr(true) + base := delegatedecision.Input{ + Repo: "testorg/testrepo", Number: 17327, Kind: delegatedecision.KindPR, Author: "clubanderson", OwnerAuthor: true, + Labels: []string{stagelabels.ReadyForHumanMerge.Label(), "role/newcomer"}, CIGreen: true, + } + req := delegatedDecisionRequest{Type: "pr", Reason: "contributor-lane:author-association"} + if d, _, ok := srv.delegatedHumanMergeDecision(base, req, "writer", true); !ok || d.Rule != delegatedHumanMergeApproveRule { + t.Fatalf("clean owner 090 PR should approve: ok=%v %+v", ok, d) + } + for _, tc := range []struct { + name string + mutate func(in *delegatedecision.Input) + }{ + {"sentinel alert", func(in *delegatedecision.Input) { in.SentinelAlert = true }}, + {"hold label", func(in *delegatedecision.Input) { in.Labels = append(in.Labels, "hold") }}, + {"do-not-merge label", func(in *delegatedecision.Input) { in.Labels = append(in.Labels, "do-not-merge/wip") }}, + } { + t.Run(tc.name, func(t *testing.T) { + in := base + in.Labels = append([]string(nil), base.Labels...) + tc.mutate(&in) + if d, notes, ok := srv.delegatedHumanMergeDecision(in, req, "writer", true); ok { + t.Fatalf("gated 090 PR decided by the human-merge path: %+v notes=%q", d, notes) + } + if out, ok := srv.delegatedHumanMergeOutcome("testorg/testrepo", in.Number, "pr", "writer", true, in, req); ok { + t.Fatalf("gated 090 PR answered by the human-merge outcome: %+v", out) + } + }) + } +} diff --git a/src/pkg/dashboard/stage_tracker_decision.go b/src/pkg/dashboard/stage_tracker_decision.go index 9d3d30513f..cf773809d6 100644 --- a/src/pkg/dashboard/stage_tracker_decision.go +++ b/src/pkg/dashboard/stage_tracker_decision.go @@ -211,6 +211,12 @@ func stageTrackerDecisionNeededWith(it StageTrackerItem, verdict *review.Aggrega return decisionForBlocker(it, held, bctx) case it.Kind == "pr" && (it.Stage == stagelabels.NeedsDecision.Number() || slices.Contains(it.Modifiers, modNeedsDecision)): return decisionForPR(it, verdict, sentinelLabel, held) + case it.Kind == "pr" && it.Stage == stagelabels.ReadyForHumanMerge.Number() && it.SentinelAlert && !it.SentinelNotice: + // The sentinel is a gate on the PR's real stage, not a stage of its + // own (hivecommons/hive#17327): a green, reviewed head sits in the + // merge queue as "held" and asks the sentinel question — Approve, + // give direction, or close — never "ready to merge". + return decisionForPR(it, verdict, sentinelLabel, held) case it.Kind == "pr" && it.Stage == stagelabels.ReadyForHumanMerge.Number(): return decisionForHumanMerge(it, held) case it.Kind == "issue" && it.Mirrored: diff --git a/src/pkg/dashboard/stage_tracker_decision_test.go b/src/pkg/dashboard/stage_tracker_decision_test.go index 4f0dc42650..5f40ea48a4 100644 --- a/src/pkg/dashboard/stage_tracker_decision_test.go +++ b/src/pkg/dashboard/stage_tracker_decision_test.go @@ -559,3 +559,32 @@ func TestStageTrackerHumanMergeSaysItOnce(t *testing.T) { } var configKeyRE = regexp.MustCompile(`\b[a-z_]+\.[a-z_]+\.[a-z_]+\b`) + +// TestStageTrackerDecisionSentinelGateOnReadyStage: the sentinel is a gate +// on the PR's real stage, not a stage of its own (hivecommons/hive#17327). +// A green, reviewed PR wearing the alert sits at 090 and still asks the +// sentinel question with Approve / Let hive decide, never "Ready to merge". +func TestStageTrackerDecisionSentinelGateOnReadyStage(t *testing.T) { + since := time.Date(2026, 11, 8, 9, 0, 0, 0, time.UTC) + it := StageTrackerItem{Repo: "hivecommons/hive", Number: 17327, Kind: "pr", Head: "b0f5f80abcdef0123", + Stage: stagelabels.ReadyForHumanMerge.Number(), StageSince: &since, Reason: "a sentinel alert is open on this PR", + SentinelAlert: true, SentinelReason: "a new workflow file"} + d := stageTrackerDecisionNeeded(it, nil, "hive:sentinel-alert") + if d == nil || d.AskedBy != decisionAskedBySentinel { + t.Fatalf("decision = %+v, want the sentinel question", d) + } + if strings.Contains(d.Question, "Ready to merge") || !strings.Contains(d.Question, "a new workflow file") { + t.Fatalf("question = %q", d.Question) + } + if !strings.Contains(d.Blocker, "hive:sentinel-alert") { + t.Fatalf("blocker = %q, want the sentinel label named", d.Blocker) + } + if !decisionOptionByAction(t, d, decisionActionApprove).Enabled || !decisionOptionByAction(t, d, decisionActionDelegate).Enabled { + t.Fatal("Approve and Let hive decide must stay available from the merge-queue cell") + } + // The trusted-author notice is not a gate: the row reads ready. + it.SentinelNotice = true + if d := stageTrackerDecisionNeeded(it, nil, "hive:sentinel-alert"); d == nil || !strings.HasPrefix(d.Question, "Ready to merge") { + t.Fatalf("notice-only decision = %+v, want ready to merge", d) + } +} diff --git a/src/pkg/dashboard/stage_tracker_pills_gate_test.go b/src/pkg/dashboard/stage_tracker_pills_gate_test.go index 9024aaa40a..2d2ffa47fc 100644 --- a/src/pkg/dashboard/stage_tracker_pills_gate_test.go +++ b/src/pkg/dashboard/stage_tracker_pills_gate_test.go @@ -181,6 +181,7 @@ func TestStageTrackerDeferredPillsJS(t *testing.T) { jsConstLine(t, html, "STAGE_TRACKER_MOD_PRIORITY"), jsConstLine(t, html, "STAGE_TRACKER_MOD_TEXT"), jsConstLine(t, html, "STAGE_TRACKER_NEEDS_DECISION"), + jsConstLine(t, html, "STAGE_TRACKER_READY_FOR_HUMAN_MERGE"), jsConstLine(t, html, "STAGE_TRACKER_TERMINAL"), jsConstLine(t, html, "STAGE_TRACKER_TRAIL_HOPS"), jsFunc(t, html, "stageTrackerStageWord"), diff --git a/src/pkg/dashboard/stage_tracker_sentinel_lane_test.go b/src/pkg/dashboard/stage_tracker_sentinel_lane_test.go index ceaed9594d..ec32925626 100644 --- a/src/pkg/dashboard/stage_tracker_sentinel_lane_test.go +++ b/src/pkg/dashboard/stage_tracker_sentinel_lane_test.go @@ -30,6 +30,11 @@ func stageTrackerSentinelJS(t *testing.T, html string) string { jsFunc(t, html, "stageTrackerSentinelTip"), jsFunc(t, html, "stageTrackerSentinelInLane"), jsFunc(t, html, "stageTrackerSentinelAsSuffix"), + jsConstLine(t, html, "STAGE_TRACKER_HELD_SENTINEL_WORD"), + jsConstLine(t, html, "STAGE_TRACKER_HELD_HOLD_WORD"), + jsConstLine(t, html, "STAGE_TRACKER_HELD_NEVER_MERGES"), + jsFunc(t, html, "stageTrackerHeldWord"), + jsFunc(t, html, "stageTrackerHeldTip"), jsFunc(t, html, "stageTrackerReturnedAuthor"), jsFunc(t, html, "stageTrackerToolingSuffix"), jsFunc(t, html, "stageTrackerReturnedWord"), @@ -291,6 +296,12 @@ func TestStageTrackerSentinelLaneWiring(t *testing.T) { `function stageTrackerSentinelChipHtml(item)`, `function stageTrackerSentinelPreface(items)`, `sentinel || sentinelSuffix ? 'ham-sentinel' : ''`, + `heldGate ? 'ham-held' : ''`, + `const STAGE_TRACKER_HELD_SENTINEL_WORD = 'Held · sentinel · confirm intent';`, + `const STAGE_TRACKER_HELD_HOLD_WORD = 'Held · hold';`, + `function stageTrackerHeldWord(item)`, + `function stageTrackerHeldTip(item, nowMs)`, + `.ham-seg.active.ham-held { background: var(--amber); color: var(--surface-0); }`, `.ham-badge-sentinel { color: var(--status-error);`, `.ham-seg.active.ham-sentinel { background: var(--status-error); color: var(--surface-0); }`, `const sentinel = id.indexOf('decide:') === 0 ? stageTrackerSentinelPreface(items) : '';`, @@ -492,6 +503,27 @@ assert.strictEqual(stageTrackerManualMergeWord({ manual_merge: true, human_merge const breaking = stageTrackerRowHtml(P('o/r', 403, 90, { manual_merge: true, human_merge_reason: 'breaking-change', human_merge_reason_text: 'Breaking change — owner merges' }), stages, ctx); assert.ok(breaking.includes('Ready for human merge · human merge') && !breaking.includes('Awaiting human merge'), 'breaking-change 090 word: ' + breaking); +// hivecommons/hive#17327: a sentinel alert or hold label is a gate on the +// PR's real stage. A green, reviewed, flagged PR stands at 090 and its Merge +// queue cell reads "Held · sentinel · confirm intent" (amber ham-held, never +// red ham-sentinel, never "Queued for merge"), the tooltip carries the +// sentinel reason and the never-merges rule, and no sentinel chip repeats it. +assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 90, flagged)), 'Held · sentinel · confirm intent'); +assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 90, { modifiers: ['hold'], hold: { by: 'clubanderson', reason: 'wait for the release' } })), 'Held · hold'); +assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 90, { sentinel_alert: true, sentinel_notice: true })), '', 'the trusted-author notice is not a gate'); +assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 85, flagged)), '', 'only the 090 row wears the held word'); +assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 90)), ''); +assert.ok(stageTrackerSentinelInLane(P('o/r', 1, 90, flagged)), 'the held 090 word carries the alert: no chip'); +const heldSentinel = stageTrackerRowHtml(P('o/r', 17327, 90, Object.assign({ reason: 'a sentinel alert is open on this PR' }, flagged)), stages, ctx); +assert.ok(heldSentinel.includes('Held · sentinel · confirm intent'), 'held 090 word: ' + heldSentinel); +assert.ok(heldSentinel.includes('ham-held') && !heldSentinel.includes('ham-sentinel"') && !heldSentinel.includes('ham-sentinel ') , 'amber held class, not the red sentinel one: ' + heldSentinel); +assert.ok(!heldSentinel.includes('Queued for merge') && !heldSentinel.includes('Ready for human merge'), 'never queued / ready: ' + heldSentinel); +assert.ok(heldSentinel.includes(TIP) && heldSentinel.includes('Hive never merges this head while the gate stands.'), 'tooltip carries the reason and the rule: ' + heldSentinel); +assert.ok(!heldSentinel.includes('ham-badge-sentinel'), 'no sentinel chip beside the held word: ' + heldSentinel); +const heldHold = stageTrackerRowHtml(P('o/r', 17328, 90, { modifiers: ['hold'], hold: { by: 'clubanderson', reason: 'wait for the release', since: '2026-11-08T09:00:00Z' }, reason: 'held by label hold' }), stages, ctx); +assert.ok(heldHold.includes('Held · hold') && heldHold.includes('ham-held') && !heldHold.includes('Queued for merge'), 'held-by-label 090 word: ' + heldHold); +assert.ok(heldHold.includes('Held by @clubanderson · wait for the release'), 'hold tooltip names the holder: ' + heldHold); + // Decide… preface: one line per flagged PR, nothing for clean ones. assert.strictEqual(stageTrackerSentinelPreface([P('o/r', 109, 85, flagged), P('o/r', 104, 85)]), '⚠ o/r#109 — ' + TIP); assert.strictEqual(stageTrackerSentinelPreface([P('o/r', 104, 85)]), ''); diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index 94ee1bd4ee..144ba91f3f 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -457,6 +457,10 @@ .ham-seg.active[data-motion="active"]::before { background: white; animation: ham-pulse 1.6s ease-in-out infinite; } .ham-seg.active[data-motion="needs-human"]::before { background: var(--red); animation: ham-breathe-human 2.8s ease-in-out infinite; } .ham-seg.active.ham-open-hold { background: var(--yellow); color: var(--surface-0); } + /* A 090 row a sentinel alert or hold label gates (hivecommons/hive#17327): + the Merge queue cell wears the pill amber — held, not queued, not red. */ + .ham-seg.active.ham-held { background: var(--amber); color: var(--surface-0); } + .ham-seg.active.ham-held .ham-detour::before { content: '⏸'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-hold .ham-seg-t::before { content: '⏸'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-blocked { background: var(--yellow); color: var(--surface-0); } .ham-seg.active.ham-open-blocked .ham-seg-t::before { content: '⛔'; margin-right: var(--sp-1); } diff --git a/src/pkg/dashboard/static-src/js/tracker-row-strip.js b/src/pkg/dashboard/static-src/js/tracker-row-strip.js index 7307fb79a6..3e4683ef20 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-strip.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-strip.js @@ -468,9 +468,10 @@ if (sg.number < from || sg.number > to) return ``; const sentinel = !!(sg.detour && sg.detour.sentinel); const sentinelSuffix = !!(sg.detour && sg.detour.sentinelSuffix); + const heldGate = !!(sg.detour && sg.detour.held); const fixPushed = sg.number === 30 && sg.state === 'done' && remediation === 'fix_pushed'; const blockerNote = sg.state === 'done' && sg.blockerNote ? String(sg.blockerNote) : ''; - const cls = ['ham-seg', sg.state, sg.cap ? 'cap' : '', sg.state === 'active' && !sg.cap && waitingOnTracks ? 'ham-settled-current' : '', fixPushed ? 'ham-fix-pushed' : '', blockerNote ? 'ham-blocker-note' : '', sg.state === 'active' && sg.number === 30 && remediation ? 'ham-remediation-' + remediation : '', sg.cap && sg.terminal ? 'merged' : '', sg.detour ? 'detoured' : '', sg.hold ? 'ham-open-hold' : '', sg.blocked ? 'ham-open-blocked' : '', sg.draft ? 'ham-open-draft' : '', sg.isNew ? 'ham-open-new' : '', sg.advisory ? 'ham-open-advisory' : '', sg.openSince && sg.openSince.stale ? 'ham-open-stale' : '', sentinel || sentinelSuffix ? 'ham-sentinel' : ''].filter(Boolean).join(' '); + const cls = ['ham-seg', sg.state, sg.cap ? 'cap' : '', sg.state === 'active' && !sg.cap && waitingOnTracks ? 'ham-settled-current' : '', fixPushed ? 'ham-fix-pushed' : '', blockerNote ? 'ham-blocker-note' : '', sg.state === 'active' && sg.number === 30 && remediation ? 'ham-remediation-' + remediation : '', sg.cap && sg.terminal ? 'merged' : '', sg.detour ? 'detoured' : '', sg.hold ? 'ham-open-hold' : '', sg.blocked ? 'ham-open-blocked' : '', sg.draft ? 'ham-open-draft' : '', sg.isNew ? 'ham-open-new' : '', sg.advisory ? 'ham-open-advisory' : '', sg.openSince && sg.openSince.stale ? 'ham-open-stale' : '', sentinel || sentinelSuffix ? 'ham-sentinel' : '', heldGate ? 'ham-held' : ''].filter(Boolean).join(' '); const active = sg.state === 'active'; let tip = ''; let gateCaption = ''; @@ -494,6 +495,7 @@ else if (curStage === 100) tip = sg.label + ' — admitted, merging'; // Why a person merges a 090 PR leads its tooltip (hivecommons/hive#14658). // The reason is the whole story; the stage description would only repeat it (hivecommons/hive#15394). + else if (heldGate && typeof stageTrackerHeldTip === 'function') tip = stageTrackerHeldTip(item, nowMs); else if (curStage === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.human_merge_reason_text) tip = ((sg.detour && sg.detour.text) || sg.label) + ' — ' + String(item.human_merge_reason_text).trim(); // A refusal on an earlier head is history, not the word: the // chevron reads the live stage and the hover keeps "merge attempt @@ -577,7 +579,7 @@ const tipID = 'ham-chevron-tip-' + [item.repo || '', item.kind || '', item.number || 0, sg.number].map(x => encodeURIComponent(String(x))).join('-'); inner = `${stageTrackerIcon(sg.number, 'ham-ico')}${esc(blockerNote)}${stageTrackerIcon('human', 'ham-ico ham-actor-ico', 'Next move: human')}${esc(noteTip)}`; } else inner = stageTrackerIcon(sg.number, 'ham-ico'); - return `
  • ${inner}
  • `; + return `
  • ${inner}
  • `; }).join(''); } diff --git a/src/pkg/dashboard/static-src/js/tracker-row.js b/src/pkg/dashboard/static-src/js/tracker-row.js index afbf29dadf..22cd0dd9b3 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row.js +++ b/src/pkg/dashboard/static-src/js/tracker-row.js @@ -19,6 +19,13 @@ const detour = (!terminal && !pushedBack && STAGE_TRACKER_PATH.indexOf(cur) < 0 && cur !== STAGE_TRACKER_TRIAGE_NEEDED && cur !== STAGE_TRACKER_POSSIBLY_EXISTS && cur !== STAGE_TRACKER_OPEN_FOR_DISCUSSION && cur !== 40 && cur !== 60 && cur !== STAGE_TRACKER_PRE_MERGE_SOAK && cur !== 100) ? { text: sentinelLane ? STAGE_TRACKER_SENTINEL_WORD : (cur === STAGE_TRACKER_HUMAN_GATED && typeof stageTrackerTrainWord === 'function' && stageTrackerTrainWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.manual_merge ? stageTrackerManualMergeWord(item) : (cur === STAGE_TRACKER_HUMAN_GATED && stageTrackerUnauthorizedWord(item)) || (typeof stageTrackerBlockerWord === 'function' && cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION && stageTrackerBlockerWord(item)) || ((cur === STAGE_TRACKER_ADOPTED_BY_HIVE || (cur === STAGE_TRACKER_HUMAN_GATED && item.adopted_by_state)) && stageTrackerAdoptedWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && stageTrackerReadyForHumanWord(item, STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))) || (STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))), sentinel: sentinelLane } : null; if (detour && cur === 70 && !detour.sentinel && typeof stageTrackerFixingWord === 'function') detour.text = stageTrackerFixingWord(item, detour.text); + // A 090 row a sentinel alert or hold label gates: the Merge queue + // cell reads "Held · …" (amber), never "Queued" — the gate is a pill + // on the real stage, not a stage (hivecommons/hive#17327). + if (detour && cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && typeof stageTrackerHeldWord === 'function') { + const held = stageTrackerHeldWord(item); + if (held) { detour.text = held; detour.held = true; detour.sentinel = false; } + } // A bare "Needs human decision" (045 / 085) says why in the chevron // itself — "Needs human · edits CI workflows" — when a short reason // is known (rationguard#480: "what does 'needs human' mean?"). A diff --git a/src/pkg/dashboard/static-src/js/tracker-words.js b/src/pkg/dashboard/static-src/js/tracker-words.js index ec9db5498c..8105f4de56 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words.js +++ b/src/pkg/dashboard/static-src/js/tracker-words.js @@ -513,9 +513,38 @@ return lines.length ? tip + lines.map(l => '\n · ' + l).join('') : tip; } // Whether the item's lit chevron word carries the alert itself (a PR - // parked at 085, or an issue riding one): the chip then adds nothing. + // parked at 085, an issue riding one, or a 090 row the gate holds — + // see stageTrackerHeldWord): the chip then adds nothing. function stageTrackerSentinelInLane(item) { - return !!(item && item.sentinel_alert && !item.sentinel_notice) && (Number(item.stage) || 0) === STAGE_TRACKER_NEEDS_DECISION && (item.kind === 'pr' || !!item.via_pr); + const st = Number(item && item.stage) || 0; + return !!(item && item.sentinel_alert && !item.sentinel_notice) && (st === STAGE_TRACKER_NEEDS_DECISION || st === STAGE_TRACKER_READY_FOR_HUMAN_MERGE) && (item.kind === 'pr' || !!item.via_pr); + } + // A sentinel alert or a hold label is a gate on the PR's real stage, + // not a stage of its own (hivecommons/hive#17327): a green, reviewed + // PR stands in the Merge queue column at 090 and the column word says + // the gate — "Held · sentinel · confirm intent" / "Held · hold" — + // never "Queued for merge". '' when the row is not a held 090 PR. + const STAGE_TRACKER_HELD_SENTINEL_WORD = 'Held · sentinel · confirm intent'; + const STAGE_TRACKER_HELD_HOLD_WORD = 'Held · hold'; + const STAGE_TRACKER_HELD_NEVER_MERGES = 'Hive never merges this head while the gate stands.'; + function stageTrackerHeldWord(item) { + if (!item || (Number(item.stage) || 0) !== STAGE_TRACKER_READY_FOR_HUMAN_MERGE || !(item.kind === 'pr' || item.via_pr)) return ''; + if (item.sentinel_alert && !item.sentinel_notice) return STAGE_TRACKER_HELD_SENTINEL_WORD; + if ((Array.isArray(item.modifiers) && item.modifiers.indexOf('hold') >= 0) || (item.hold && item.hold.by)) return STAGE_TRACKER_HELD_HOLD_WORD; + return ''; + } + // Pure: the held cell's hover — the gate's own reason (the sentinel + // tip, or who holds it and why), then the route reason and the rule. + function stageTrackerHeldTip(item, nowMs) { + const word = stageTrackerHeldWord(item); + if (!word) return ''; + const lines = [word]; + if (word === STAGE_TRACKER_HELD_SENTINEL_WORD) lines.push(stageTrackerSentinelTip(item)); + else if (typeof stageTrackerHoldTip === 'function') { const ht = stageTrackerHoldTip(item, nowMs); if (ht) lines.push(ht); } + const reason = String(item.human_merge_reason_text || item.reason || '').trim(); + if (reason && lines.indexOf(reason) < 0) lines.push(reason); + lines.push(STAGE_TRACKER_HELD_NEVER_MERGES); + return lines.filter(Boolean).join('\n'); } // A returned PR (071/072) keeps its routing word — the human already // acted, nothing is owed by the maintainer — and carries the alert as diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 3b318cb2be..c9784af7c8 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1800,6 +1800,10 @@ .ham-seg.active[data-motion="active"]::before { background: white; animation: ham-pulse 1.6s ease-in-out infinite; } .ham-seg.active[data-motion="needs-human"]::before { background: var(--red); animation: ham-breathe-human 2.8s ease-in-out infinite; } .ham-seg.active.ham-open-hold { background: var(--yellow); color: var(--surface-0); } + /* A 090 row a sentinel alert or hold label gates (hivecommons/hive#17327): + the Merge queue cell wears the pill amber — held, not queued, not red. */ + .ham-seg.active.ham-held { background: var(--amber); color: var(--surface-0); } + .ham-seg.active.ham-held .ham-detour::before { content: '⏸'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-hold .ham-seg-t::before { content: '⏸'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-blocked { background: var(--yellow); color: var(--surface-0); } .ham-seg.active.ham-open-blocked .ham-seg-t::before { content: '⛔'; margin-right: var(--sp-1); } @@ -17759,9 +17763,38 @@

    Where to get help

    return lines.length ? tip + lines.map(l => '\n · ' + l).join('') : tip; } // Whether the item's lit chevron word carries the alert itself (a PR - // parked at 085, or an issue riding one): the chip then adds nothing. + // parked at 085, an issue riding one, or a 090 row the gate holds — + // see stageTrackerHeldWord): the chip then adds nothing. function stageTrackerSentinelInLane(item) { - return !!(item && item.sentinel_alert && !item.sentinel_notice) && (Number(item.stage) || 0) === STAGE_TRACKER_NEEDS_DECISION && (item.kind === 'pr' || !!item.via_pr); + const st = Number(item && item.stage) || 0; + return !!(item && item.sentinel_alert && !item.sentinel_notice) && (st === STAGE_TRACKER_NEEDS_DECISION || st === STAGE_TRACKER_READY_FOR_HUMAN_MERGE) && (item.kind === 'pr' || !!item.via_pr); + } + // A sentinel alert or a hold label is a gate on the PR's real stage, + // not a stage of its own (hivecommons/hive#17327): a green, reviewed + // PR stands in the Merge queue column at 090 and the column word says + // the gate — "Held · sentinel · confirm intent" / "Held · hold" — + // never "Queued for merge". '' when the row is not a held 090 PR. + const STAGE_TRACKER_HELD_SENTINEL_WORD = 'Held · sentinel · confirm intent'; + const STAGE_TRACKER_HELD_HOLD_WORD = 'Held · hold'; + const STAGE_TRACKER_HELD_NEVER_MERGES = 'Hive never merges this head while the gate stands.'; + function stageTrackerHeldWord(item) { + if (!item || (Number(item.stage) || 0) !== STAGE_TRACKER_READY_FOR_HUMAN_MERGE || !(item.kind === 'pr' || item.via_pr)) return ''; + if (item.sentinel_alert && !item.sentinel_notice) return STAGE_TRACKER_HELD_SENTINEL_WORD; + if ((Array.isArray(item.modifiers) && item.modifiers.indexOf('hold') >= 0) || (item.hold && item.hold.by)) return STAGE_TRACKER_HELD_HOLD_WORD; + return ''; + } + // Pure: the held cell's hover — the gate's own reason (the sentinel + // tip, or who holds it and why), then the route reason and the rule. + function stageTrackerHeldTip(item, nowMs) { + const word = stageTrackerHeldWord(item); + if (!word) return ''; + const lines = [word]; + if (word === STAGE_TRACKER_HELD_SENTINEL_WORD) lines.push(stageTrackerSentinelTip(item)); + else if (typeof stageTrackerHoldTip === 'function') { const ht = stageTrackerHoldTip(item, nowMs); if (ht) lines.push(ht); } + const reason = String(item.human_merge_reason_text || item.reason || '').trim(); + if (reason && lines.indexOf(reason) < 0) lines.push(reason); + lines.push(STAGE_TRACKER_HELD_NEVER_MERGES); + return lines.filter(Boolean).join('\n'); } // A returned PR (071/072) keeps its routing word — the human already // acted, nothing is owed by the maintainer — and carries the alert as @@ -17891,6 +17924,13 @@

    Where to get help

    const detour = (!terminal && !pushedBack && STAGE_TRACKER_PATH.indexOf(cur) < 0 && cur !== STAGE_TRACKER_TRIAGE_NEEDED && cur !== STAGE_TRACKER_POSSIBLY_EXISTS && cur !== STAGE_TRACKER_OPEN_FOR_DISCUSSION && cur !== 40 && cur !== 60 && cur !== STAGE_TRACKER_PRE_MERGE_SOAK && cur !== 100) ? { text: sentinelLane ? STAGE_TRACKER_SENTINEL_WORD : (cur === STAGE_TRACKER_HUMAN_GATED && typeof stageTrackerTrainWord === 'function' && stageTrackerTrainWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.manual_merge ? stageTrackerManualMergeWord(item) : (cur === STAGE_TRACKER_HUMAN_GATED && stageTrackerUnauthorizedWord(item)) || (typeof stageTrackerBlockerWord === 'function' && cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION && stageTrackerBlockerWord(item)) || ((cur === STAGE_TRACKER_ADOPTED_BY_HIVE || (cur === STAGE_TRACKER_HUMAN_GATED && item.adopted_by_state)) && stageTrackerAdoptedWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && stageTrackerReadyForHumanWord(item, STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))) || (STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))), sentinel: sentinelLane } : null; if (detour && cur === 70 && !detour.sentinel && typeof stageTrackerFixingWord === 'function') detour.text = stageTrackerFixingWord(item, detour.text); + // A 090 row a sentinel alert or hold label gates: the Merge queue + // cell reads "Held · …" (amber), never "Queued" — the gate is a pill + // on the real stage, not a stage (hivecommons/hive#17327). + if (detour && cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && typeof stageTrackerHeldWord === 'function') { + const held = stageTrackerHeldWord(item); + if (held) { detour.text = held; detour.held = true; detour.sentinel = false; } + } // A bare "Needs human decision" (045 / 085) says why in the chevron // itself — "Needs human · edits CI workflows" — when a short reason // is known (rationguard#480: "what does 'needs human' mean?"). A @@ -18741,9 +18781,10 @@

    Where to get help

    if (sg.number < from || sg.number > to) return ``; const sentinel = !!(sg.detour && sg.detour.sentinel); const sentinelSuffix = !!(sg.detour && sg.detour.sentinelSuffix); + const heldGate = !!(sg.detour && sg.detour.held); const fixPushed = sg.number === 30 && sg.state === 'done' && remediation === 'fix_pushed'; const blockerNote = sg.state === 'done' && sg.blockerNote ? String(sg.blockerNote) : ''; - const cls = ['ham-seg', sg.state, sg.cap ? 'cap' : '', sg.state === 'active' && !sg.cap && waitingOnTracks ? 'ham-settled-current' : '', fixPushed ? 'ham-fix-pushed' : '', blockerNote ? 'ham-blocker-note' : '', sg.state === 'active' && sg.number === 30 && remediation ? 'ham-remediation-' + remediation : '', sg.cap && sg.terminal ? 'merged' : '', sg.detour ? 'detoured' : '', sg.hold ? 'ham-open-hold' : '', sg.blocked ? 'ham-open-blocked' : '', sg.draft ? 'ham-open-draft' : '', sg.isNew ? 'ham-open-new' : '', sg.advisory ? 'ham-open-advisory' : '', sg.openSince && sg.openSince.stale ? 'ham-open-stale' : '', sentinel || sentinelSuffix ? 'ham-sentinel' : ''].filter(Boolean).join(' '); + const cls = ['ham-seg', sg.state, sg.cap ? 'cap' : '', sg.state === 'active' && !sg.cap && waitingOnTracks ? 'ham-settled-current' : '', fixPushed ? 'ham-fix-pushed' : '', blockerNote ? 'ham-blocker-note' : '', sg.state === 'active' && sg.number === 30 && remediation ? 'ham-remediation-' + remediation : '', sg.cap && sg.terminal ? 'merged' : '', sg.detour ? 'detoured' : '', sg.hold ? 'ham-open-hold' : '', sg.blocked ? 'ham-open-blocked' : '', sg.draft ? 'ham-open-draft' : '', sg.isNew ? 'ham-open-new' : '', sg.advisory ? 'ham-open-advisory' : '', sg.openSince && sg.openSince.stale ? 'ham-open-stale' : '', sentinel || sentinelSuffix ? 'ham-sentinel' : '', heldGate ? 'ham-held' : ''].filter(Boolean).join(' '); const active = sg.state === 'active'; let tip = ''; let gateCaption = ''; @@ -18767,6 +18808,7 @@

    Where to get help

    else if (curStage === 100) tip = sg.label + ' — admitted, merging'; // Why a person merges a 090 PR leads its tooltip (hivecommons/hive#14658). // The reason is the whole story; the stage description would only repeat it (hivecommons/hive#15394). + else if (heldGate && typeof stageTrackerHeldTip === 'function') tip = stageTrackerHeldTip(item, nowMs); else if (curStage === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.human_merge_reason_text) tip = ((sg.detour && sg.detour.text) || sg.label) + ' — ' + String(item.human_merge_reason_text).trim(); // A refusal on an earlier head is history, not the word: the // chevron reads the live stage and the hover keeps "merge attempt @@ -18850,7 +18892,7 @@

    Where to get help

    const tipID = 'ham-chevron-tip-' + [item.repo || '', item.kind || '', item.number || 0, sg.number].map(x => encodeURIComponent(String(x))).join('-'); inner = `${stageTrackerIcon(sg.number, 'ham-ico')}${esc(blockerNote)}${stageTrackerIcon('human', 'ham-ico ham-actor-ico', 'Next move: human')}${esc(noteTip)}`; } else inner = stageTrackerIcon(sg.number, 'ham-ico'); - return `
  • ${inner}
  • `; + return `
  • ${inner}
  • `; }).join(''); } diff --git a/src/pkg/github/automerge/automerge_stage_human.go b/src/pkg/github/automerge/automerge_stage_human.go index 7b07ace361..b35c48774e 100644 --- a/src/pkg/github/automerge/automerge_stage_human.go +++ b/src/pkg/github/automerge/automerge_stage_human.go @@ -627,12 +627,24 @@ func decisionCauseFor(reason string, workflowManual bool) string { // sentinel alert the comment named must be told the workflow-path fence is // what now holds the PR, not left reading a stale cause. Each distinct // cause is posted once per head. Returns the comments posted. +// readyEntryCause is the entry-comment cause of a 090 route with no +// reasons of its own (trust is the only objection). +var readyEntryCause = stagelabels.EntryCause([]string{"ready for a human merge"}) + func (c *Engine) postHumanEntry(ctx context.Context, store *stagelabels.Store, key string, obs stageObservation, role stagelabels.Role, route stagelabels.Route) (int, error) { rec, ok := store.Get(key) if !ok || rec.Stage != route.Stage { return 0, nil } cause := stagelabels.EntryCause(route.Reasons) + if route.Stage == stagelabels.ReadyForHumanMerge && cause == "" { + // A plain ready route has no reasons; give it a cause of its own + // so that a gate lifted on the same head (held → ready, + // hivecommons/hive#17327) reads as a cause change and the "Held:" + // line is rewritten, while a return to 090 on the same head stays + // quiet as before. + cause = readyEntryCause + } decisionKey := "" if route.Stage == stagelabels.NeedsDecision && obs.Detail.VerdictKnown && obs.Detail.Verdict.DecisionRequested { decisionKey = writeback.DecisionKey(obs.Detail.Verdict.RedundantOf, obs.Detail.Verdict.DecisionQuestion) @@ -644,7 +656,11 @@ func (c *Engine) postHumanEntry(ctx context.Context, store *stagelabels.Store, k return 0, nil } if rec.EntryCommented { - if route.Stage != stagelabels.NeedsDecision || obs.HeadSHA == "" || cause == "" || rec.EntryCommentedHead != obs.HeadSHA { + // A 085 or 090 comment is re-explained when its cause changes on + // the same head: at 090 a gate — sentinel alert, hold label — is + // lifted or set (hivecommons/hive#17327), and the "Held:" line must + // follow; the edit-in-place below keeps it to one comment. + if (route.Stage != stagelabels.NeedsDecision && route.Stage != stagelabels.ReadyForHumanMerge) || obs.HeadSHA == "" || cause == "" || rec.EntryCommentedHead != obs.HeadSHA { return 0, nil } if rec.EntryCommentExplains(obs.HeadSHA, cause) { diff --git a/src/pkg/github/automerge/automerge_stage_human_test.go b/src/pkg/github/automerge/automerge_stage_human_test.go index 98985ee975..ae4b098e67 100644 --- a/src/pkg/github/automerge/automerge_stage_human_test.go +++ b/src/pkg/github/automerge/automerge_stage_human_test.go @@ -150,19 +150,22 @@ func TestHumanHandoffRoutesByEvidence(t *testing.T) { t.Fatalf("conflict: %+v", rec) } - // Sentinel alone (head otherwise mergeable) → 085, decision comment. + // Sentinel alone (head otherwise mergeable) → 090 held: the gate is a + // pill on the PR's real stage, not a stage of its own + // (hivecommons/hive#17327), and the 090 comment says what holds it. clock.at = clock.at.Add(time.Hour) sweep("role/contributor", "author/human", "stage/071-needs-author", "sentinel-alert") - if got := stageOf(t, store, 9); got != stagelabels.NeedsDecision { + if got := stageOf(t, store, 9); got != stagelabels.ReadyForHumanMerge { t.Fatalf("sentinel: stage=%v", got) } - if len(api.comments) != 1 || !strings.HasPrefix(api.comments[0], stagelabels.DecisionCommentMarker) || !strings.Contains(api.comments[0], "a sentinel alert is open on this PR") { - t.Fatalf("085 comment = %q", api.comments) + if len(api.comments) != 1 || !strings.HasPrefix(api.comments[0], stagelabels.ReadyCommentMarker) || !strings.Contains(api.comments[0], "Held: a sentinel alert is open on this PR.") || strings.Contains(api.comments[0], "Blocked only by") { + t.Fatalf("held 090 comment = %q", api.comments) } - // 085 → 090 when the alert clears is a flip, not a regression, and the - // 090 comment is posted for this new visit. - sweep("role/contributor", "author/human", "stage/085-needs-decision") - if got := stageOf(t, store, 9); got != stagelabels.ReadyForHumanMerge || len(api.comments) != 1 || !strings.HasPrefix(api.comments[0], stagelabels.ReadyCommentMarker) { + // The alert clearing keeps 090; the plain ready cause was already + // explained on this head (the first 090 visit above), so no repost — + // TestReadyEntryRewritesWhenGateLifts covers the rewrite. + sweep("role/contributor", "author/human", "stage/090-ready-for-human-merge") + if got := stageOf(t, store, 9); got != stagelabels.ReadyForHumanMerge || len(api.comments) != 0 { t.Fatalf("alert cleared: stage=%v comments=%q", got, api.comments) } @@ -569,10 +572,65 @@ func TestWorkflowApprovalSnippetRendersSelfContainedWorkflowForOwnAppLogin(t *te } } -// TestDecisionEntryRepostsWhenCauseChanges: a PR parked at 085 for a -// sentinel alert whose maintainer clears the alert, only for the lane's -// workflow-path fence to hold it, gets the new cause explained on the same -// head — once — instead of sitting under a stale "sentinel alert" comment. +// TestReadyEntryRewritesWhenGateLifts: a green, reviewed PR whose only +// stop is a sentinel alert sits at 090 held (hivecommons/hive#17327); the +// 090 comment names the gate, and when a person clears the alert on the +// same head the comment is re-explained — once — without the "Held:" line, +// so nobody reads a stale hold on a PR that is now theirs to merge. +func TestReadyEntryRewritesWhenGateLifts(t *testing.T) { + api, closeAPI := seededStageAPI(t) + defer closeAPI() + clock := &contributorLaneClock{at: time.Date(2026, 10, 20, 12, 0, 0, 0, time.UTC)} + verdict := &ContributorLaneVerdict{Configured: true, Approved: true, Verdict: "approve"} + e, store := humanStageEngine(t, api.url, clock, verdict, 0) + ctx := context.Background() + sweep := func(reason string, labels ...string) { + t.Helper() + api.reset() + e.recordStage(stageLaneTrusted, "acme/widget", "acme", "widget", stagePR(9, labels...), "untrusted-author-role", false, nil) + e.recordStage(stageLaneContributor, "acme/widget", "acme", "widget", stagePR(9, labels...), reason, false, nil) + e.noteStageRole("acme", "widget", 9, stagelabels.RoleContributor) + if _, err := e.ApplyStageLabels(ctx); err != nil { + t.Fatal(err) + } + } + + sweep(contributorLaneReasonSentinelBlocked, "role/contributor", "author/human", "stage/050-review-pending", "sentinel-alert") + if got := stageOf(t, store, 9); got != stagelabels.ReadyForHumanMerge { + t.Fatalf("sentinel: stage=%v", got) + } + if len(api.comments) != 1 || !strings.HasPrefix(api.comments[0], stagelabels.ReadyCommentMarker) || !strings.Contains(api.comments[0], "Held: a sentinel alert is open on this PR.") { + t.Fatalf("held comment = %q", api.comments) + } + if !reflect.DeepEqual(api.added, [][]string{{"stage/090-ready-for-human-merge"}}) { + t.Fatalf("held 090 wears the 090 label: added=%v", api.added) + } + // Same gate again: quiet. + sweep(contributorLaneReasonSentinelBlocked, "role/contributor", "author/human", "stage/090-ready-for-human-merge", "sentinel-alert") + if len(api.comments) != 0 { + t.Fatalf("same gate reposted: %q", api.comments) + } + // Alert cleared on the same head: still 090, the comment re-explained + // with the trust cause and without the hold line. + sweep(contributorLaneReasonClaimTier, "role/contributor", "author/human", "stage/090-ready-for-human-merge") + if got := stageOf(t, store, 9); got != stagelabels.ReadyForHumanMerge { + t.Fatalf("alert cleared: stage=%v", got) + } + if len(api.comments) != 1 || !strings.HasPrefix(api.comments[0], stagelabels.ReadyCommentMarker) || strings.Contains(api.comments[0], "Held:") || !strings.Contains(api.comments[0], "Blocked only by") { + t.Fatalf("cleared comment = %q", api.comments) + } + sweep(contributorLaneReasonClaimTier, "role/contributor", "author/human", "stage/090-ready-for-human-merge") + if len(api.comments) != 0 { + t.Fatalf("explained cause reposted: %q", api.comments) + } +} + +// TestDecisionEntryRepostsWhenCauseChanges: a PR parked at 085 for the +// lane's tests-removed rule whose cause changes — the tests come back, the +// workflow-path fence now holds it — gets the new cause explained on the +// same head — once — instead of sitting under a stale comment. (A sentinel +// alert no longer parks 085 — hivecommons/hive#17327 — so the tests-removed +// rule stands in for it here.) func TestDecisionEntryRepostsWhenCauseChanges(t *testing.T) { api, closeAPI := seededStageAPI(t) defer closeAPI() @@ -591,25 +649,25 @@ func TestDecisionEntryRepostsWhenCauseChanges(t *testing.T) { } } - sweep(contributorLaneReasonSentinelBlocked, "role/trusted", "author/human", "stage/050-review-pending", "sentinel-alert") + sweep(contributorLaneReasonTestsRemoved, "role/trusted", "author/human", "stage/050-review-pending") if got := stageOf(t, store, 9); got != stagelabels.NeedsDecision { - t.Fatalf("sentinel: stage=%v", got) + t.Fatalf("tests removed: stage=%v", got) } - if len(api.comments) != 1 || !strings.Contains(api.comments[0], "a sentinel alert is open on this PR") { - t.Fatalf("sentinel comment = %q", api.comments) + if len(api.comments) != 1 || !strings.Contains(api.comments[0], "removes tests") { + t.Fatalf("tests-removed comment = %q", api.comments) } // Same cause again: no repost. - sweep(contributorLaneReasonSentinelBlocked, "role/trusted", "author/human", "stage/085-needs-decision", "sentinel-alert") + sweep(contributorLaneReasonTestsRemoved, "role/trusted", "author/human", "stage/085-needs-decision") if len(api.comments) != 0 { t.Fatalf("same cause reposted: %q", api.comments) } - // Alert cleared, workflow-path fence now the blocker: still 085, new cause explained. + // Tests back, workflow-path fence now the blocker: still 085, new cause explained. sweep(contributorLaneReasonWorkflowPath, "role/trusted", "author/human", "stage/085-needs-decision") if got := stageOf(t, store, 9); got != stagelabels.NeedsDecision { t.Fatalf("workflow path: stage=%v", got) } if len(api.comments) != 1 || !strings.HasPrefix(api.comments[0], stagelabels.DecisionCommentMarker) || - !strings.Contains(api.comments[0], "edits CI workflow / action files") || strings.Contains(api.comments[0], "sentinel alert") { + !strings.Contains(api.comments[0], "edits CI workflow / action files") || strings.Contains(api.comments[0], "removes tests") { t.Fatalf("workflow-path comment = %q", api.comments) } rec, _ := store.Get(stageKey("acme", "widget", 9)) @@ -617,7 +675,7 @@ func TestDecisionEntryRepostsWhenCauseChanges(t *testing.T) { t.Fatalf("causes not recorded: %+v", rec) } // Flapping back to an already-explained cause stays quiet. - sweep(contributorLaneReasonSentinelBlocked, "role/trusted", "author/human", "stage/085-needs-decision", "sentinel-alert") + sweep(contributorLaneReasonTestsRemoved, "role/trusted", "author/human", "stage/085-needs-decision") sweep(contributorLaneReasonWorkflowPath, "role/trusted", "author/human", "stage/085-needs-decision") if len(api.comments) != 0 { t.Fatalf("explained cause reposted: %q", api.comments) diff --git a/src/pkg/github/automerge/automerge_stage_labels_test.go b/src/pkg/github/automerge/automerge_stage_labels_test.go index fd2736be1c..01a73647ff 100644 --- a/src/pkg/github/automerge/automerge_stage_labels_test.go +++ b/src/pkg/github/automerge/automerge_stage_labels_test.go @@ -415,9 +415,12 @@ func TestClassifyStageMapping(t *testing.T) { {name: "soaking is pre-merge soak", obs: stageObservation{Lane: stageLaneContributor, Reason: contributorLaneReasonSoaking + "(remaining=30m)"}, want: stagelabels.PreMergeSoak, rank: stageRankOwned}, {name: "soak complete waiting on github is merge queue", obs: stageObservation{Lane: stageLaneContributor, Reason: "required-checks-expected"}, want: stagelabels.MergeQueue, rank: stageRankOwned}, {name: "merge pool", obs: stageObservation{Lane: stageLaneSelf, Reason: "head-changed-since-eval"}, want: stagelabels.MergeQueue, rank: stageRankOwned}, - {name: "hold", obs: stageObservation{Lane: stageLaneSelf, Reason: "label:hold"}, want: stagelabels.NeedsDecision, rank: stageRankOwned}, + // A hold label or sentinel alert is a gate, not a stage + // (hivecommons/hive#17327): the opinion is a 090 candidate the + // route refines against the head's evidence. + {name: "hold", obs: stageObservation{Lane: stageLaneSelf, Reason: "label:hold"}, want: stagelabels.ReadyForHumanMerge, rank: stageRankOwned}, {name: "workflow approval held", obs: stageObservation{Lane: stageLaneSelf, Reason: workflowApprovalRequiredPrefix + "build"}, want: stagelabels.NeedsDecision, rank: stageRankOwned}, - {name: "sentinel blocked", obs: stageObservation{Lane: stageLaneContributor, Reason: contributorLaneReasonSentinelBlocked}, want: stagelabels.NeedsDecision, rank: stageRankOwned}, + {name: "sentinel blocked", obs: stageObservation{Lane: stageLaneContributor, Reason: contributorLaneReasonSentinelBlocked}, want: stagelabels.ReadyForHumanMerge, rank: stageRankOwned}, {name: "needs-rebase hold", obs: stageObservation{Lane: stageLaneSelf, Reason: "excluded-label:needs-rebase", Labels: []string{"needs-rebase"}}, want: stagelabels.Fixing, rank: stageRankOwned}, {name: "no claim is a weak admission opinion", obs: stageObservation{Lane: stageLaneContributor, Reason: contributorLaneReasonNoClaim}, want: stagelabels.ReadyForHumanMerge, rank: stageRankAdmission}, {name: "claim tier below require_tiers", obs: stageObservation{Lane: stageLaneContributor, Reason: contributorLaneReasonClaimTier}, want: stagelabels.ReadyForHumanMerge, rank: stageRankAdmission}, @@ -672,12 +675,14 @@ func TestResolveStageAdmissionOpinions(t *testing.T) { }, { // A hold-class reason applies whoever the author is. - name: "trusted author sentinel-blocked is needs-decision", + // The sentinel gate is a 090 candidate owned by the contributor + // lane (hivecommons/hive#17327); the route rides the alert on it. + name: "trusted author sentinel-blocked is a held 090 candidate", list: []stageObservation{ {Lane: stageLaneTrusted, Reason: "untrusted-author-role"}, {Lane: stageLaneContributor, Reason: contributorLaneReasonSentinelBlocked, Detail: trusted}, }, - stage: stagelabels.NeedsDecision, rank: stageRankOwned, author: stagelabels.RoleTrusted, lane: stageLaneContributor, + stage: stagelabels.ReadyForHumanMerge, rank: stageRankOwned, author: stagelabels.RoleTrusted, lane: stageLaneContributor, }, { // #13115: a requires_human verdict on an admission reason is 085, @@ -1746,10 +1751,11 @@ func TestClassifyStageRedCheckIsRepairStageNever080Or100(t *testing.T) { } }) } - // Modifiers that park the PR still outrank a red optional check. + // A hold is a gate, not a stage (hivecommons/hive#17327): the red + // optional check is the head's real progress, so the author fixes it. held := classifyStage(stageObservation{Lane: stageLaneContributor, HeadSHA: "sha", Reason: "label:hold", Detail: red}) - if held.Stage != stagelabels.NeedsDecision || !held.Human { - t.Fatalf("held=%+v want needs-decision (human)", held) + if held.Stage != stagelabels.NeedsAuthor || held.Human || !strings.HasPrefix(held.Reason, stageReasonOptionalCheckFailing) { + t.Fatalf("held=%+v want needs-author on the red check", held) } } diff --git a/src/pkg/github/automerge/automerge_sweep_prefilter_test.go b/src/pkg/github/automerge/automerge_sweep_prefilter_test.go index 21006a8a74..8d5cf50db4 100644 --- a/src/pkg/github/automerge/automerge_sweep_prefilter_test.go +++ b/src/pkg/github/automerge/automerge_sweep_prefilter_test.go @@ -232,3 +232,56 @@ func TestSweepSelfAuthoredAutoMergesCountsCandidateFetchErrorsAsSkips(t *testing t.Fatalf("result = %+v, want the failing candidate counted and skipped", result) } } + +// TestPrefilterGatedPRAt090IsRefused: a sentinel alert or a hold label is a +// gate, not a stage (hivecommons/hive#17327) — a green, reviewed PR now +// wears stage/090-ready-for-human-merge with the gate as a pill. The lanes +// refuse the merge on the label itself, never on the stage number, so the +// 090 label buys the PR nothing while the gate stands. +func TestPrefilterGatedPRAt090IsRefused(t *testing.T) { + c := newPrefilterEngine(t) + ready := "stage/090-ready-for-human-merge" + contributor := func(labels ...string) *gh.PullRequest { + return selfAuthoredListPR(func(pr *gh.PullRequest) { + pr.User = &gh.User{Login: gh.Ptr("mallory")} + pr.AuthorAssociation = gh.Ptr("CONTRIBUTOR") + for _, l := range labels { + pr.Labels = append(pr.Labels, &gh.Label{Name: gh.Ptr(l)}) + } + }) + } + policy := defaultContributorLanePolicy() + if got := c.prefilterContributorLanePR(contributor(ready), policy); got != "" { + t.Fatalf("plain 090 contributor PR: prefilter = %q, want it to pass", got) + } + for _, tc := range []struct { + name string + labels []string + want string + }{ + {"sentinel alert", []string{ready, "sentinel-alert"}, contributorLaneReasonSentinelBlocked}, + {"hold", []string{ready, "hold"}, "label:hold"}, + {"do-not-merge", []string{ready, "do-not-merge/hold"}, "label:do-not-merge/hold"}, + } { + if got := c.prefilterContributorLanePR(contributor(tc.labels...), policy); got != tc.want { + t.Fatalf("%s at 090: prefilter = %q, want %q", tc.name, got, tc.want) + } + } + // The self-authored (hive) lane: its own PR at 090 with a hold. + hive := selfAuthoredListPR(func(pr *gh.PullRequest) { + pr.Labels = []*gh.Label{{Name: gh.Ptr(ready)}, {Name: gh.Ptr("hold")}} + }) + if got := c.prefilterSelfAuthoredPR(hive); got != "label:hold" { + t.Fatalf("held hive PR at 090: prefilter = %q, want label:hold", got) + } + // The trusted-author lane: a hold stops it too (the sentinel label is a + // notice, not a gate, for trusted authors — see + // TestPrefilterTrustedAuthorPRSentinelAlertAllowed). + trusted := selfAuthoredListPR(func(pr *gh.PullRequest) { + pr.User = &gh.User{Login: gh.Ptr("alice")} + pr.Labels = []*gh.Label{{Name: gh.Ptr(ready)}, {Name: gh.Ptr("hold")}} + }) + if got := c.prefilterTrustedAuthorPR("acme", "widget", trusted, TrustedAuthorPolicy{Enabled: true, RequireRole: "merger"}); got != "label:hold" { + t.Fatalf("held trusted PR at 090: prefilter = %q, want label:hold", got) + } +} diff --git a/src/pkg/stageengine/derive_pr.go b/src/pkg/stageengine/derive_pr.go index 441f762bdc..a1a6f94da2 100644 --- a/src/pkg/stageengine/derive_pr.go +++ b/src/pkg/stageengine/derive_pr.go @@ -385,7 +385,9 @@ func decisionFrom(v stageVerdict, role stagelabels.Role, obs stageObservation, f // the hive (Facts.Adoption live at the PR's head) when no lane observed // it: 074 adopted-by-hive, ahead of the 085 park the labels may still // carry — adoption is who owns the PR, and the owner answers the question -// on the superseding PR. A hold label or sentinel alert keeps the park. +// on the superseding PR. A `needs-human` label keeps the park; a hold +// label or sentinel alert is a gate, not a stage (hivecommons/hive#17327), +// so it rides the adoption as a pill and the lane still refuses the merge. func adoptedPRDecision(f Facts) (Decision, bool) { a := f.Adoption if !f.Open || !a.Adopted || !a.Live || a.Yielded { @@ -394,9 +396,9 @@ func adoptedPRDecision(f Facts) (Decision, bool) { if f.PR != nil && a.Head != "" && f.PR.HeadSHA != "" && a.Head != f.PR.HeadSHA { return Decision{}, false } - if len(f.Park.Holds) > 0 || f.Park.Sentinel || f.Park.NeedsHuman { - // A hold, sentinel or `needs-human` label is an explicit park - // (hivecommons/hive#14471); only the lane's own 085 yields. + if f.Park.NeedsHuman { + // A `needs-human` label is an explicit park (hivecommons/hive#14471); + // only the lane's own 085 yields. return Decision{}, false } reason := "adopted by the hive" diff --git a/src/pkg/stageengine/derive_pr_adoption_yield_test.go b/src/pkg/stageengine/derive_pr_adoption_yield_test.go index 0f4220468c..8a86ca8445 100644 --- a/src/pkg/stageengine/derive_pr_adoption_yield_test.go +++ b/src/pkg/stageengine/derive_pr_adoption_yield_test.go @@ -105,10 +105,14 @@ func TestDerivePR_AdoptionFactsAloneYield074(t *testing.T) { if d := DerivePR(yielded); d.Stage == stagelabels.AdoptedByHive { t.Fatalf("yielded adoption must not claim 074: %+v", d) } + // A hold label or sentinel alert is a gate, not a stage + // (hivecommons/hive#17327): adoption still says who owns the PR, and + // the lane refuses the merge on the label itself. held := f held.Park.Holds = []string{"hive/hold"} - if d := DerivePR(held); d.Stage == stagelabels.AdoptedByHive { - t.Fatalf("held PR must keep its park: %+v", d) + held.Park.Sentinel = true + if d := DerivePR(held); d.Stage != stagelabels.AdoptedByHive { + t.Fatalf("held PR adopts like any other: %+v", d) } labelled := f labelled.Labels = append(labelled.Labels, NeedsHumanLabel) diff --git a/src/pkg/stageengine/derive_pr_classify.go b/src/pkg/stageengine/derive_pr_classify.go index e1c37830ee..3981925e48 100644 --- a/src/pkg/stageengine/derive_pr_classify.go +++ b/src/pkg/stageengine/derive_pr_classify.go @@ -278,12 +278,12 @@ var stageAdmissionReasons = map[string]int{ // 085), not merely a merge click. var stageNeedsHumanReasons = map[string]bool{ contributorLaneReasonWorkflowPath: true, contributorLaneReasonTestsRemoved: true, - contributorLaneReasonNoReviewer: true, contributorLaneReasonReporterTrustHold: true, contributorLaneReasonSentinelBlocked: true, + contributorLaneReasonNoReviewer: true, contributorLaneReasonReporterTrustHold: true, contributorLaneReasonNoAppBotLogin: true, contributorLaneReasonFilesEvidence: true, autoMergeReasonHumanMergePath: true, autoMergeReasonHumanMergePathEvidence: true, autoMergeReasonIntentUnauthorized: true, autoMergeReasonIntentEvidence: true, "approval-desk-withheld": true, "author-permission-missing": true, "fork-non-member": true, - "held": true, "label:hold": true, "label:needs-human": true, "exempt-label": true, "sentinel": true, + "label:needs-human": true, "exempt-label": true, autoMergeReasonNoAppBotLogin: true, "self-authorization-hold-released": true, // GitHub refused the merge for a reason no retry cures: branch // protection wants a person's approving review, or the repository has @@ -297,6 +297,19 @@ var stageNeedsHumanReasons = map[string]bool{ prstage.AutoMergeReasonNativeQueueMethod: true, } +// stageHeldGateReasons are the lane reasons that are gates, not stages +// (owner rule, hivecommons/hive#17327): an open sentinel alert or a +// hold-class label stops the merge for as long as it stands, but says +// nothing about how far the head has come. The stage is the head's real +// progress — CI running or red, a reviewer's question, or 090 once the +// head is green and reviewed — and the gate rides it as a pill; the +// Merge queue column reads "held", never "queued", because the lane +// refuses the merge on the label itself (automerge_sweep_trusted, +// automerge_contributor_lane), not on the stage number. +var stageHeldGateReasons = map[string]bool{ + "held": true, "label:hold": true, "sentinel": true, contributorLaneReasonSentinelBlocked: true, +} + // stageMergeQueueReasons are reasons reached only after every gate passed, // soak included: the merge is imminent or waiting on GitHub. The soaking // reason itself is 095 pre-merge-soak (ClassifyStage). @@ -455,6 +468,29 @@ func ClassifyStage(o stageObservation) stageVerdict { } return WithHumanApprovalReason(stageVerdict{Stage: stagelabels.ReadyForHumanMerge, Rank: stageRankOwned, Human: true}, humanApprovalReason) } + if stageHeldGateReasons[reason] { + if HasLabelFold(o.Labels, "needs-rebase") { + return stageVerdict{Stage: fixing, Rank: stageRankOwned} + } + if v, ok := HumanChangeRequestStage(o); ok { + // A trusted maintainer answered the gate on this head and asked + // for changes: the author acts next (hivecommons/hive#15159). + return v + } + if v, ok := RequiresHumanStage(o, stageRankOwned); ok { + return v + } + if VerdictBlocks(o.Detail) { + return stageVerdict{Stage: fixing, Rank: stageRankOwned, Reason: StageVerdictReason(o.Detail)} + } + if name := o.Detail.RedCheck(o.HeadSHA); name != "" { + return stageVerdict{Stage: fixing, Rank: stageRankOwned, Reason: stageReasonOptionalCheckFailing + name} + } + // A 090 candidate: passDecision refines it through RouteHuman + // against the head's evidence (pending CI → 060, no verdict → 050) + // and rides the gate on the result as a pill, never as the stage. + return WithHumanApprovalReason(stageVerdict{Stage: stagelabels.ReadyForHumanMerge, Rank: stageRankOwned, Human: true}, humanApprovalReason) + } if strings.HasPrefix(reason, "excluded-label:") || stageNeedsHumanReasons[reason] { if HasLabelFold(o.Labels, "needs-rebase") { return stageVerdict{Stage: fixing, Rank: stageRankOwned} diff --git a/src/pkg/stageengine/derive_pr_returned_author_kind_test.go b/src/pkg/stageengine/derive_pr_returned_author_kind_test.go index 79b44f43ee..cc30ef2395 100644 --- a/src/pkg/stageengine/derive_pr_returned_author_kind_test.go +++ b/src/pkg/stageengine/derive_pr_returned_author_kind_test.go @@ -113,8 +113,15 @@ func TestClassifyStageHumanChangeRequestWinsOverSentinelPark(t *testing.T) { for _, reason := range []string{contributorLaneReasonSentinelBlocked, "sentinel", contributorLaneReasonWorkflowPath} { t.Run(reason, func(t *testing.T) { parked := ClassifyStage(stageObservation{Lane: stageLaneContributor, Reason: reason, HeadSHA: goldenHead, Labels: []string{"sentinel-alert"}, AuthorKind: authorkind.Clanker}) - if parked.Stage != stagelabels.NeedsDecision || !parked.Human { - t.Fatalf("no review: %+v, want 085", parked) + wantParked := stagelabels.NeedsDecision + if reason != contributorLaneReasonWorkflowPath { + // A sentinel alert is a gate, not a stage + // (hivecommons/hive#17327): the unreviewed head is a 090 + // candidate RouteHuman refines against its evidence. + wantParked = stagelabels.ReadyForHumanMerge + } + if parked.Stage != wantParked || !parked.Human { + t.Fatalf("no review: %+v, want %s", parked, wantParked) } v := ClassifyStage(stageObservation{Lane: stageLaneContributor, Reason: reason, HeadSHA: goldenHead, Labels: []string{"sentinel-alert"}, Detail: reviewed, AuthorKind: authorkind.Clanker}) if v.Stage != stagelabels.ReturnedToContributor || v.Reason != autoMergeReasonHumanChangesRequested || v.Human { @@ -125,8 +132,8 @@ func TestClassifyStageHumanChangeRequestWinsOverSentinelPark(t *testing.T) { t.Fatalf("a person's PR goes to 071: %+v", human) } stale := ClassifyStage(stageObservation{Lane: stageLaneContributor, Reason: reason, HeadSHA: "newhead0000", Labels: []string{"sentinel-alert"}, Detail: reviewed, AuthorKind: authorkind.Clanker}) - if stale.Stage != stagelabels.NeedsDecision { - t.Fatalf("a new head re-arms the park: %+v", stale) + if stale.Stage != wantParked || !stale.Human { + t.Fatalf("a new head re-arms the park: %+v, want %s", stale, wantParked) } }) } diff --git a/src/pkg/stageengine/testdata/stage_goldens/human-route.json b/src/pkg/stageengine/testdata/stage_goldens/human-route.json index d1f8c4760b..00524b4c8c 100644 --- a/src/pkg/stageengine/testdata/stage_goldens/human-route.json +++ b/src/pkg/stageengine/testdata/stage_goldens/human-route.json @@ -2,9 +2,9 @@ {"name":"approval-desk-withheld/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"approval-desk-withheld","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"approval-desk-withheld/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"approval-desk-withheld","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"approval-desk-withheld/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the approval desk withheld this merge"]}}, -{"name":"approval-desk-withheld/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["a sentinel alert is open on this PR","the approval desk withheld this merge"]}}, -{"name":"approval-desk-withheld/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the approval desk withheld this merge"]}}, -{"name":"approval-desk-withheld/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the approval desk withheld this merge"]}}, +{"name":"approval-desk-withheld/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the approval desk withheld this merge","a sentinel alert is open on this PR"]}}, +{"name":"approval-desk-withheld/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the approval desk withheld this merge","a sentinel alert is open on this PR"]}}, +{"name":"approval-desk-withheld/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the approval desk withheld this merge","a sentinel alert is open on this PR"]}}, {"name":"approval-desk-withheld/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"approval-desk-withheld/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"approval-desk-withheld/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -14,18 +14,18 @@ {"name":"approval-desk-withheld/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the approval desk withheld this merge"]}}, {"name":"approval-desk-withheld/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the approval desk withheld this merge"]}}, {"name":"approval-desk-withheld/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the approval desk withheld this merge"]}}, -{"name":"approval-desk-withheld/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the `do-not-merge/wip` label is set","the approval desk withheld this merge"]}}, -{"name":"approval-desk-withheld/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the approval desk withheld this merge"]}}, -{"name":"approval-desk-withheld/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the approval desk withheld this merge"]}}, +{"name":"approval-desk-withheld/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the approval desk withheld this merge","the `do-not-merge/wip` label is set"]}}, +{"name":"approval-desk-withheld/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the approval desk withheld this merge","the `do-not-merge/wip` label is set"]}}, +{"name":"approval-desk-withheld/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the approval desk withheld this merge","the `do-not-merge/wip` label is set"]}}, {"name":"approval-desk-withheld/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"approval-desk-withheld"}}, {"name":"approval-desk-withheld/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"approval-desk-withheld"}}, {"name":"approval-desk-withheld/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"approval-desk-withheld"}}, {"name":"approval-desk-withheld/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"approval-desk-withheld"}}, {"name":"approval-desk-withheld/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"approval-desk-withheld"}}, {"name":"approval-desk-withheld/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"approval-desk-withheld"}}, -{"name":"approval-desk-withheld/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["a sentinel alert is open on this PR","the approval desk withheld this merge"]}}, -{"name":"approval-desk-withheld/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the approval desk withheld this merge"]}}, -{"name":"approval-desk-withheld/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the approval desk withheld this merge"]}}, +{"name":"approval-desk-withheld/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the approval desk withheld this merge","a sentinel alert is open on this PR"]}}, +{"name":"approval-desk-withheld/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the approval desk withheld this merge","a sentinel alert is open on this PR"]}}, +{"name":"approval-desk-withheld/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the approval desk withheld this merge","a sentinel alert is open on this PR"]}}, {"name":"approval-desk-withheld/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the approval desk withheld this merge"]}}, {"name":"approval-desk-withheld/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the approval desk withheld this merge"]}}, {"name":"approval-desk-withheld/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"approval-desk-withheld","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"approval-desk-withheld","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the approval desk withheld this merge"]}}, @@ -55,9 +55,9 @@ {"name":"contributor-lane=author-association/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:author-association","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=author-association/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:author-association","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=author-association/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=author-association/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=author-association/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:author-association","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=author-association/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"contributor-lane=author-association/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=author-association/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=author-association/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=author-association/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=author-association/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -67,18 +67,18 @@ {"name":"contributor-lane=author-association/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:author-association"}}, {"name":"contributor-lane=author-association/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane=author-association/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=author-association/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=author-association/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:author-association","route_reasons":["the `do-not-merge/wip` label is set"]}}, {"name":"contributor-lane=author-association/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, -{"name":"contributor-lane=author-association/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=author-association/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=author-association/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:author-association"}}, {"name":"contributor-lane=author-association/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:author-association"}}, {"name":"contributor-lane=author-association/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:author-association"}}, {"name":"contributor-lane=author-association/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:author-association"}}, {"name":"contributor-lane=author-association/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:author-association"}}, {"name":"contributor-lane=author-association/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:author-association"}}, -{"name":"contributor-lane=author-association/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=author-association/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:author-association","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=author-association/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"contributor-lane=author-association/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=author-association/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=author-association/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:author-association"}}, {"name":"contributor-lane=author-association/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:author-association","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane=author-association/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:author-association","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, @@ -108,9 +108,9 @@ {"name":"contributor-lane=claim-tier-untrusted/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=claim-tier-untrusted/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=claim-tier-untrusted/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"contributor-lane=claim-tier-untrusted/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=claim-tier-untrusted/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -120,18 +120,18 @@ {"name":"contributor-lane=claim-tier-untrusted/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-tier-untrusted"}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=claim-tier-untrusted/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=claim-tier-untrusted/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["the `do-not-merge/wip` label is set"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, -{"name":"contributor-lane=claim-tier-untrusted/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=claim-tier-untrusted/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:claim-tier-untrusted"}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:claim-tier-untrusted"}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:claim-tier-untrusted"}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:claim-tier-untrusted"}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:claim-tier-untrusted"}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:claim-tier-untrusted"}}, -{"name":"contributor-lane=claim-tier-untrusted/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=claim-tier-untrusted/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"contributor-lane=claim-tier-untrusted/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=claim-tier-untrusted/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-tier-untrusted"}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-tier-untrusted","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane=claim-tier-untrusted/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, @@ -161,9 +161,9 @@ {"name":"contributor-lane=claim-unverified/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:claim-unverified","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=claim-unverified/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:claim-unverified","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=claim-unverified/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=claim-unverified/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=claim-unverified/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-unverified","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=claim-unverified/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"contributor-lane=claim-unverified/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=claim-unverified/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=claim-unverified/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=claim-unverified/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=claim-unverified/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -173,18 +173,18 @@ {"name":"contributor-lane=claim-unverified/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-unverified"}}, {"name":"contributor-lane=claim-unverified/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane=claim-unverified/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=claim-unverified/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=claim-unverified/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-unverified","route_reasons":["the `do-not-merge/wip` label is set"]}}, {"name":"contributor-lane=claim-unverified/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, -{"name":"contributor-lane=claim-unverified/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=claim-unverified/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=claim-unverified/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:claim-unverified"}}, {"name":"contributor-lane=claim-unverified/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:claim-unverified"}}, {"name":"contributor-lane=claim-unverified/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:claim-unverified"}}, {"name":"contributor-lane=claim-unverified/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:claim-unverified"}}, {"name":"contributor-lane=claim-unverified/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:claim-unverified"}}, {"name":"contributor-lane=claim-unverified/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:claim-unverified"}}, -{"name":"contributor-lane=claim-unverified/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=claim-unverified/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-unverified","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=claim-unverified/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"contributor-lane=claim-unverified/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=claim-unverified/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=claim-unverified/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:claim-unverified"}}, {"name":"contributor-lane=claim-unverified/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:claim-unverified","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane=claim-unverified/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, @@ -214,9 +214,9 @@ {"name":"contributor-lane=no-claim/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:no-claim","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=no-claim/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:no-claim","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=no-claim/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=no-claim/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=no-claim/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:no-claim","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=no-claim/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"contributor-lane=no-claim/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=no-claim/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=no-claim/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=no-claim/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=no-claim/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -226,18 +226,18 @@ {"name":"contributor-lane=no-claim/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:no-claim"}}, {"name":"contributor-lane=no-claim/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane=no-claim/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=no-claim/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=no-claim/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:no-claim","route_reasons":["the `do-not-merge/wip` label is set"]}}, {"name":"contributor-lane=no-claim/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, -{"name":"contributor-lane=no-claim/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=no-claim/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=no-claim/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:no-claim"}}, {"name":"contributor-lane=no-claim/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:no-claim"}}, {"name":"contributor-lane=no-claim/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:no-claim"}}, {"name":"contributor-lane=no-claim/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:no-claim"}}, {"name":"contributor-lane=no-claim/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:no-claim"}}, {"name":"contributor-lane=no-claim/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:no-claim"}}, -{"name":"contributor-lane=no-claim/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=no-claim/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:no-claim","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=no-claim/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"contributor-lane=no-claim/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=no-claim/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=no-claim/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:no-claim"}}, {"name":"contributor-lane=no-claim/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-claim","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane=no-claim/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":2,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, @@ -267,9 +267,9 @@ {"name":"contributor-lane=no-reviewer/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=no-reviewer/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=no-reviewer/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=no-reviewer/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=no-reviewer/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=no-reviewer/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane=no-reviewer/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=no-reviewer/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=no-reviewer/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=no-reviewer/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=no-reviewer/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=no-reviewer/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -279,18 +279,18 @@ {"name":"contributor-lane=no-reviewer/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane=no-reviewer/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane=no-reviewer/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=no-reviewer/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=no-reviewer/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=no-reviewer/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane=no-reviewer/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the automerge lane will not merge this unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=no-reviewer/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=no-reviewer/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=no-reviewer/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:no-reviewer"}}, {"name":"contributor-lane=no-reviewer/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:no-reviewer"}}, {"name":"contributor-lane=no-reviewer/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:no-reviewer"}}, {"name":"contributor-lane=no-reviewer/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:no-reviewer"}}, {"name":"contributor-lane=no-reviewer/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:no-reviewer"}}, {"name":"contributor-lane=no-reviewer/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:no-reviewer"}}, -{"name":"contributor-lane=no-reviewer/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=no-reviewer/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=no-reviewer/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane=no-reviewer/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=no-reviewer/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=no-reviewer/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=no-reviewer/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane=no-reviewer/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:no-reviewer","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane=no-reviewer/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:no-reviewer","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, @@ -320,9 +320,9 @@ {"name":"contributor-lane=reporter-trust-hold/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=reporter-trust-hold/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=reporter-trust-hold/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["a sentinel alert is open on this PR","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the reporter-trust hold is in place"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reporter-trust hold is in place","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the reporter-trust hold is in place","a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -332,18 +332,18 @@ {"name":"contributor-lane=reporter-trust-hold/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reporter-trust hold is in place"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the `do-not-merge/wip` label is set","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the reporter-trust hold is in place"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reporter-trust hold is in place","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the reporter-trust hold is in place","the `do-not-merge/wip` label is set"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:reporter-trust-hold"}}, {"name":"contributor-lane=reporter-trust-hold/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:reporter-trust-hold"}}, {"name":"contributor-lane=reporter-trust-hold/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:reporter-trust-hold"}}, {"name":"contributor-lane=reporter-trust-hold/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:reporter-trust-hold"}}, {"name":"contributor-lane=reporter-trust-hold/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:reporter-trust-hold"}}, {"name":"contributor-lane=reporter-trust-hold/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:reporter-trust-hold"}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["a sentinel alert is open on this PR","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=reporter-trust-hold/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the reporter-trust hold is in place"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reporter-trust hold is in place","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=reporter-trust-hold/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the reporter-trust hold is in place","a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reporter-trust hold is in place"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"contributor-lane=reporter-trust-hold/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the reporter-trust hold is in place"]}}, @@ -370,65 +370,65 @@ {"name":"contributor-lane=reporter-trust-hold/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reporter-trust hold is in place"]}}, {"name":"contributor-lane=reporter-trust-hold/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"contributor-lane=reporter-trust-hold/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane=sentinel-blocked/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"contributor-lane=sentinel-blocked/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"contributor-lane=sentinel-blocked/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane=sentinel-blocked/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"contributor-lane=sentinel-blocked/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"contributor-lane=sentinel-blocked/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-no/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:sentinel-blocked"}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=sentinel-blocked/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:sentinel-blocked"}}, {"name":"contributor-lane=sentinel-blocked/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:sentinel-blocked"}}, {"name":"contributor-lane=sentinel-blocked/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:sentinel-blocked"}}, {"name":"contributor-lane=sentinel-blocked/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:sentinel-blocked"}}, {"name":"contributor-lane=sentinel-blocked/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:sentinel-blocked"}}, {"name":"contributor-lane=sentinel-blocked/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:sentinel-blocked"}}, -{"name":"contributor-lane=sentinel-blocked/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-soaking/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-soaking/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green-soaking/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green/verdict=changes_requested/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"changes_requested"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green/verdict=pending/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green/verdict=requires_human-concrete/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green/verdict=requires_human-summary/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["needs a product call"]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer summary: needs a product call"]}}, -{"name":"contributor-lane=sentinel-blocked/route=green/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=sentinel-blocked/route=noroute/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=pending/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=pending/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=pending/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"contributor-lane=sentinel-blocked/route=red/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"contributor-lane=sentinel-blocked/route=red/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"contributor-lane=sentinel-blocked/route=red/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"contributor-lane=sentinel-blocked/route=red/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"contributor-lane=sentinel-blocked/route=red/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"contributor-lane=sentinel-blocked/route=red/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"contributor-lane=sentinel-blocked/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane=sentinel-blocked/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:sentinel-blocked"}}, +{"name":"contributor-lane=sentinel-blocked/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-soaking/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["soak 20m0s remaining"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-soaking/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green-soaking/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"contributor-lane:sentinel-blocked"}}, +{"name":"contributor-lane=sentinel-blocked/route=green/verdict=changes_requested/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"changes_requested"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green/verdict=pending/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green/verdict=requires_human-concrete/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green/verdict=requires_human-summary/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["needs a product call"]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer summary: needs a product call"]}}, +{"name":"contributor-lane=sentinel-blocked/route=green/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=noroute/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane=sentinel-blocked/route=pending/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["2 check(s) still running"]}}, +{"name":"contributor-lane=sentinel-blocked/route=pending/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane=sentinel-blocked/route=pending/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"contributor-lane=sentinel-blocked/route=red/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"contributor-lane=sentinel-blocked/route=red/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"contributor-lane=sentinel-blocked/route=red/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"contributor-lane=sentinel-blocked/route=red/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"contributor-lane=sentinel-blocked/route=red/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"contributor-lane=sentinel-blocked/route=red/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"contributor-lane=sentinel-blocked/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["checks could not be read"]}}, +{"name":"contributor-lane=sentinel-blocked/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane=sentinel-blocked/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"contributor-lane=tests-removed/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=tests-removed/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=tests-removed/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR removes tests, which the lane never merges unattended"]}}, -{"name":"contributor-lane=tests-removed/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["a sentinel alert is open on this PR","the PR removes tests, which the lane never merges unattended"]}}, -{"name":"contributor-lane=tests-removed/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the PR removes tests, which the lane never merges unattended"]}}, -{"name":"contributor-lane=tests-removed/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the PR removes tests, which the lane never merges unattended"]}}, +{"name":"contributor-lane=tests-removed/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the PR removes tests, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=tests-removed/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR removes tests, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=tests-removed/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR removes tests, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=tests-removed/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=tests-removed/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=tests-removed/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -438,18 +438,18 @@ {"name":"contributor-lane=tests-removed/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the PR removes tests, which the lane never merges unattended"]}}, {"name":"contributor-lane=tests-removed/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR removes tests, which the lane never merges unattended"]}}, {"name":"contributor-lane=tests-removed/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR removes tests, which the lane never merges unattended"]}}, -{"name":"contributor-lane=tests-removed/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the `do-not-merge/wip` label is set","the PR removes tests, which the lane never merges unattended"]}}, -{"name":"contributor-lane=tests-removed/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the PR removes tests, which the lane never merges unattended"]}}, -{"name":"contributor-lane=tests-removed/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the PR removes tests, which the lane never merges unattended"]}}, +{"name":"contributor-lane=tests-removed/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the PR removes tests, which the lane never merges unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=tests-removed/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR removes tests, which the lane never merges unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=tests-removed/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR removes tests, which the lane never merges unattended","the `do-not-merge/wip` label is set"]}}, {"name":"contributor-lane=tests-removed/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:tests-removed"}}, {"name":"contributor-lane=tests-removed/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:tests-removed"}}, {"name":"contributor-lane=tests-removed/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:tests-removed"}}, {"name":"contributor-lane=tests-removed/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:tests-removed"}}, {"name":"contributor-lane=tests-removed/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:tests-removed"}}, {"name":"contributor-lane=tests-removed/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:tests-removed"}}, -{"name":"contributor-lane=tests-removed/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["a sentinel alert is open on this PR","the PR removes tests, which the lane never merges unattended"]}}, -{"name":"contributor-lane=tests-removed/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the PR removes tests, which the lane never merges unattended"]}}, -{"name":"contributor-lane=tests-removed/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the PR removes tests, which the lane never merges unattended"]}}, +{"name":"contributor-lane=tests-removed/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the PR removes tests, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=tests-removed/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR removes tests, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=tests-removed/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR removes tests, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=tests-removed/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the PR removes tests, which the lane never merges unattended"]}}, {"name":"contributor-lane=tests-removed/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR removes tests, which the lane never merges unattended"]}}, {"name":"contributor-lane=tests-removed/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:tests-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:tests-removed","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR removes tests, which the lane never merges unattended"]}}, @@ -479,9 +479,9 @@ {"name":"contributor-lane=workflow-path/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=workflow-path/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"contributor-lane=workflow-path/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, -{"name":"contributor-lane=workflow-path/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["a sentinel alert is open on this PR","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, -{"name":"contributor-lane=workflow-path/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, -{"name":"contributor-lane=workflow-path/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, +{"name":"contributor-lane=workflow-path/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the PR edits CI workflow / action files, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=workflow-path/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR edits CI workflow / action files, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=workflow-path/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR edits CI workflow / action files, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=workflow-path/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=workflow-path/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"contributor-lane=workflow-path/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -491,18 +491,18 @@ {"name":"contributor-lane=workflow-path/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the PR edits CI workflow / action files, which the lane never merges unattended"]}}, {"name":"contributor-lane=workflow-path/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, {"name":"contributor-lane=workflow-path/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, -{"name":"contributor-lane=workflow-path/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the `do-not-merge/wip` label is set","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, -{"name":"contributor-lane=workflow-path/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, -{"name":"contributor-lane=workflow-path/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, +{"name":"contributor-lane=workflow-path/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the PR edits CI workflow / action files, which the lane never merges unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=workflow-path/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR edits CI workflow / action files, which the lane never merges unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"contributor-lane=workflow-path/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR edits CI workflow / action files, which the lane never merges unattended","the `do-not-merge/wip` label is set"]}}, {"name":"contributor-lane=workflow-path/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:workflow-path"}}, {"name":"contributor-lane=workflow-path/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:workflow-path"}}, {"name":"contributor-lane=workflow-path/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:workflow-path"}}, {"name":"contributor-lane=workflow-path/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:workflow-path"}}, {"name":"contributor-lane=workflow-path/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:workflow-path"}}, {"name":"contributor-lane=workflow-path/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"contributor-lane:workflow-path"}}, -{"name":"contributor-lane=workflow-path/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["a sentinel alert is open on this PR","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, -{"name":"contributor-lane=workflow-path/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, -{"name":"contributor-lane=workflow-path/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, +{"name":"contributor-lane=workflow-path/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the PR edits CI workflow / action files, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=workflow-path/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR edits CI workflow / action files, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, +{"name":"contributor-lane=workflow-path/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR edits CI workflow / action files, which the lane never merges unattended","a sentinel alert is open on this PR"]}}, {"name":"contributor-lane=workflow-path/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the PR edits CI workflow / action files, which the lane never merges unattended"]}}, {"name":"contributor-lane=workflow-path/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, {"name":"contributor-lane=workflow-path/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:workflow-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR edits CI workflow / action files, which the lane never merges unattended"]}}, @@ -532,9 +532,9 @@ {"name":"excluded-label=do-not-merge/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"excluded-label=do-not-merge/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"excluded-label=do-not-merge/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"excluded-label=do-not-merge/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"excluded-label=do-not-merge/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"excluded-label=do-not-merge/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, +{"name":"excluded-label=do-not-merge/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"excluded-label=do-not-merge/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"excluded-label=do-not-merge/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"excluded-label=do-not-merge/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"excluded-label=do-not-merge/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"excluded-label=do-not-merge/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -544,18 +544,18 @@ {"name":"excluded-label=do-not-merge/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the automerge lane will not merge this unattended"]}}, {"name":"excluded-label=do-not-merge/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"excluded-label=do-not-merge/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"excluded-label=do-not-merge/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"excluded-label=do-not-merge/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"excluded-label=do-not-merge/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, +{"name":"excluded-label=do-not-merge/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the automerge lane will not merge this unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"excluded-label=do-not-merge/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"excluded-label=do-not-merge/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"excluded-label=do-not-merge/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"excluded-label:do-not-merge"}}, {"name":"excluded-label=do-not-merge/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"excluded-label:do-not-merge"}}, {"name":"excluded-label=do-not-merge/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"excluded-label:do-not-merge"}}, {"name":"excluded-label=do-not-merge/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"excluded-label:do-not-merge"}}, {"name":"excluded-label=do-not-merge/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"excluded-label:do-not-merge"}}, {"name":"excluded-label=do-not-merge/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"excluded-label:do-not-merge"}}, -{"name":"excluded-label=do-not-merge/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"excluded-label=do-not-merge/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"excluded-label=do-not-merge/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, +{"name":"excluded-label=do-not-merge/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"excluded-label=do-not-merge/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"excluded-label=do-not-merge/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"excluded-label=do-not-merge/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["the automerge lane will not merge this unattended"]}}, {"name":"excluded-label=do-not-merge/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"excluded-label:do-not-merge","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"excluded-label=do-not-merge/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"excluded-label:do-not-merge","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, @@ -585,9 +585,9 @@ {"name":"exempt-label/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"exempt-label","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"exempt-label/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"exempt-label","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"exempt-label/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"exempt-label/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"exempt-label/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"exempt-label/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, +{"name":"exempt-label/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"exempt-label/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"exempt-label/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"exempt-label/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"exempt-label/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"exempt-label/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -597,18 +597,18 @@ {"name":"exempt-label/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the automerge lane will not merge this unattended"]}}, {"name":"exempt-label/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"exempt-label/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"exempt-label/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"exempt-label/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"exempt-label/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, +{"name":"exempt-label/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the automerge lane will not merge this unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"exempt-label/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","the `do-not-merge/wip` label is set"]}}, +{"name":"exempt-label/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"exempt-label/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"exempt-label"}}, {"name":"exempt-label/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"exempt-label"}}, {"name":"exempt-label/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"exempt-label"}}, {"name":"exempt-label/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"exempt-label"}}, {"name":"exempt-label/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"exempt-label"}}, {"name":"exempt-label/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"exempt-label"}}, -{"name":"exempt-label/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"exempt-label/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"exempt-label/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, +{"name":"exempt-label/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"exempt-label/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended","a sentinel alert is open on this PR"]}}, +{"name":"exempt-label/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"exempt-label/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["the automerge lane will not merge this unattended"]}}, {"name":"exempt-label/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"exempt-label","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"exempt-label/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"exempt-label","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, @@ -638,9 +638,9 @@ {"name":"fork-non-member/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"fork-non-member","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"fork-non-member/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"fork-non-member","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"fork-non-member/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the lane reported `fork-non-member`"]}}, -{"name":"fork-non-member/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["a sentinel alert is open on this PR","the lane reported `fork-non-member`"]}}, -{"name":"fork-non-member/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the lane reported `fork-non-member`"]}}, -{"name":"fork-non-member/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the lane reported `fork-non-member`"]}}, +{"name":"fork-non-member/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the lane reported `fork-non-member`","a sentinel alert is open on this PR"]}}, +{"name":"fork-non-member/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `fork-non-member`","a sentinel alert is open on this PR"]}}, +{"name":"fork-non-member/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the lane reported `fork-non-member`","a sentinel alert is open on this PR"]}}, {"name":"fork-non-member/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"fork-non-member/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"fork-non-member/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -650,18 +650,18 @@ {"name":"fork-non-member/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the lane reported `fork-non-member`"]}}, {"name":"fork-non-member/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `fork-non-member`"]}}, {"name":"fork-non-member/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the lane reported `fork-non-member`"]}}, -{"name":"fork-non-member/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the `do-not-merge/wip` label is set","the lane reported `fork-non-member`"]}}, -{"name":"fork-non-member/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the lane reported `fork-non-member`"]}}, -{"name":"fork-non-member/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the lane reported `fork-non-member`"]}}, +{"name":"fork-non-member/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the lane reported `fork-non-member`","the `do-not-merge/wip` label is set"]}}, +{"name":"fork-non-member/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `fork-non-member`","the `do-not-merge/wip` label is set"]}}, +{"name":"fork-non-member/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the lane reported `fork-non-member`","the `do-not-merge/wip` label is set"]}}, {"name":"fork-non-member/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"fork-non-member"}}, {"name":"fork-non-member/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"fork-non-member"}}, {"name":"fork-non-member/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"fork-non-member"}}, {"name":"fork-non-member/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"fork-non-member"}}, {"name":"fork-non-member/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"fork-non-member"}}, {"name":"fork-non-member/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"fork-non-member"}}, -{"name":"fork-non-member/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["a sentinel alert is open on this PR","the lane reported `fork-non-member`"]}}, -{"name":"fork-non-member/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the lane reported `fork-non-member`"]}}, -{"name":"fork-non-member/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the lane reported `fork-non-member`"]}}, +{"name":"fork-non-member/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the lane reported `fork-non-member`","a sentinel alert is open on this PR"]}}, +{"name":"fork-non-member/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `fork-non-member`","a sentinel alert is open on this PR"]}}, +{"name":"fork-non-member/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the lane reported `fork-non-member`","a sentinel alert is open on this PR"]}}, {"name":"fork-non-member/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the lane reported `fork-non-member`"]}}, {"name":"fork-non-member/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `fork-non-member`"]}}, {"name":"fork-non-member/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the lane reported `fork-non-member`"]}}, @@ -688,65 +688,65 @@ {"name":"fork-non-member/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the lane reported `fork-non-member`"]}}, {"name":"fork-non-member/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `fork-non-member`"]}}, {"name":"fork-non-member/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"fork-non-member","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"fork-non-member","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the lane reported `fork-non-member`"]}}, -{"name":"held/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"held","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"held/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"held","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"held/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"held/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"held/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"held/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"held/route=green-dco-no/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"held/route=green-dco-no/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"held/route=green-dco-no/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"held/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"held/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, +{"name":"held/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"held","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"held/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"held","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"held/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"held","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"held/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, +{"name":"held/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"held/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"held/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"held/route=green-dco-no/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"held/route=green-dco-no/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"held/route=green-dco-no/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"held/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"held"}}, +{"name":"held/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"held/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"held","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"held/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, +{"name":"held/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"held/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"held"}}, {"name":"held/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"held"}}, {"name":"held/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"held"}}, {"name":"held/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"held"}}, {"name":"held/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"held"}}, {"name":"held/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"held"}}, -{"name":"held/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"held/route=green-soaking/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-soaking/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green-soaking/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"held/route=green/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green/verdict=changes_requested/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"changes_requested"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, -{"name":"held/route=green/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=green/verdict=pending/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"held","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"held/route=green/verdict=requires_human-concrete/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, -{"name":"held/route=green/verdict=requires_human-summary/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["needs a product call"]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer summary: needs a product call"]}}, -{"name":"held/route=green/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"held/route=noroute/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=pending/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"held/route=pending/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=pending/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"held/route=red/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"held/route=red/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"held/route=red/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"held/route=red/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"held/route=red/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"held/route=red/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"held/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"held/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"held/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"held","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"held/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, +{"name":"held/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"held"}}, +{"name":"held/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"held/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=green-soaking/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"held","route_reasons":["soak 20m0s remaining"]}}, +{"name":"held/route=green-soaking/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"held/route=green-soaking/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=green/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"held"}}, +{"name":"held/route=green/verdict=changes_requested/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"changes_requested"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, +{"name":"held/route=green/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"held/route=green/verdict=pending/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"held","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"held/route=green/verdict=requires_human-concrete/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, +{"name":"held/route=green/verdict=requires_human-summary/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["needs a product call"]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer summary: needs a product call"]}}, +{"name":"held/route=green/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=noroute/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"held/route=pending/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"held","route_reasons":["2 check(s) still running"]}}, +{"name":"held/route=pending/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"held/route=pending/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"held/route=red/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"held/route=red/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"held/route=red/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"held/route=red/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"held/route=red/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"held/route=red/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"held/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"held","route_reasons":["checks could not be read"]}}, +{"name":"held/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"held/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"human-merge-path/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"human-merge-path","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"human-merge-path/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"human-merge-path","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"human-merge-path/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, -{"name":"human-merge-path/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["a sentinel alert is open on this PR","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, -{"name":"human-merge-path/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, -{"name":"human-merge-path/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, +{"name":"human-merge-path/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the PR touches a human-merge path (auto_merge.human_merge_paths)","a sentinel alert is open on this PR"]}}, +{"name":"human-merge-path/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)","a sentinel alert is open on this PR"]}}, +{"name":"human-merge-path/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR touches a human-merge path (auto_merge.human_merge_paths)","a sentinel alert is open on this PR"]}}, {"name":"human-merge-path/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"human-merge-path/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"human-merge-path/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -756,18 +756,18 @@ {"name":"human-merge-path/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"human-merge-path/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"human-merge-path/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, -{"name":"human-merge-path/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the `do-not-merge/wip` label is set","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, -{"name":"human-merge-path/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, -{"name":"human-merge-path/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, +{"name":"human-merge-path/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the PR touches a human-merge path (auto_merge.human_merge_paths)","the `do-not-merge/wip` label is set"]}}, +{"name":"human-merge-path/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)","the `do-not-merge/wip` label is set"]}}, +{"name":"human-merge-path/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR touches a human-merge path (auto_merge.human_merge_paths)","the `do-not-merge/wip` label is set"]}}, {"name":"human-merge-path/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"human-merge-path"}}, {"name":"human-merge-path/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"human-merge-path"}}, {"name":"human-merge-path/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"human-merge-path"}}, {"name":"human-merge-path/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"human-merge-path"}}, {"name":"human-merge-path/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"human-merge-path"}}, {"name":"human-merge-path/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"human-merge-path"}}, -{"name":"human-merge-path/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["a sentinel alert is open on this PR","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, -{"name":"human-merge-path/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, -{"name":"human-merge-path/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, +{"name":"human-merge-path/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the PR touches a human-merge path (auto_merge.human_merge_paths)","a sentinel alert is open on this PR"]}}, +{"name":"human-merge-path/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)","a sentinel alert is open on this PR"]}}, +{"name":"human-merge-path/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR touches a human-merge path (auto_merge.human_merge_paths)","a sentinel alert is open on this PR"]}}, {"name":"human-merge-path/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"human-merge-path/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"human-merge-path/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -797,9 +797,9 @@ {"name":"intent-unauthorized/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"intent-unauthorized","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"intent-unauthorized/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"intent-unauthorized","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"intent-unauthorized/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the merge intent could not be authorized"]}}, -{"name":"intent-unauthorized/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["a sentinel alert is open on this PR","the merge intent could not be authorized"]}}, -{"name":"intent-unauthorized/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the merge intent could not be authorized"]}}, -{"name":"intent-unauthorized/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the merge intent could not be authorized"]}}, +{"name":"intent-unauthorized/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the merge intent could not be authorized","a sentinel alert is open on this PR"]}}, +{"name":"intent-unauthorized/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the merge intent could not be authorized","a sentinel alert is open on this PR"]}}, +{"name":"intent-unauthorized/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the merge intent could not be authorized","a sentinel alert is open on this PR"]}}, {"name":"intent-unauthorized/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"intent-unauthorized/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"intent-unauthorized/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -809,18 +809,18 @@ {"name":"intent-unauthorized/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the merge intent could not be authorized"]}}, {"name":"intent-unauthorized/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the merge intent could not be authorized"]}}, {"name":"intent-unauthorized/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the merge intent could not be authorized"]}}, -{"name":"intent-unauthorized/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the `do-not-merge/wip` label is set","the merge intent could not be authorized"]}}, -{"name":"intent-unauthorized/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the merge intent could not be authorized"]}}, -{"name":"intent-unauthorized/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the merge intent could not be authorized"]}}, +{"name":"intent-unauthorized/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the merge intent could not be authorized","the `do-not-merge/wip` label is set"]}}, +{"name":"intent-unauthorized/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the merge intent could not be authorized","the `do-not-merge/wip` label is set"]}}, +{"name":"intent-unauthorized/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the merge intent could not be authorized","the `do-not-merge/wip` label is set"]}}, {"name":"intent-unauthorized/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"intent-unauthorized"}}, {"name":"intent-unauthorized/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"intent-unauthorized"}}, {"name":"intent-unauthorized/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"intent-unauthorized"}}, {"name":"intent-unauthorized/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"intent-unauthorized"}}, {"name":"intent-unauthorized/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"intent-unauthorized"}}, {"name":"intent-unauthorized/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"intent-unauthorized"}}, -{"name":"intent-unauthorized/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["a sentinel alert is open on this PR","the merge intent could not be authorized"]}}, -{"name":"intent-unauthorized/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the merge intent could not be authorized"]}}, -{"name":"intent-unauthorized/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the merge intent could not be authorized"]}}, +{"name":"intent-unauthorized/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the merge intent could not be authorized","a sentinel alert is open on this PR"]}}, +{"name":"intent-unauthorized/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the merge intent could not be authorized","a sentinel alert is open on this PR"]}}, +{"name":"intent-unauthorized/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the merge intent could not be authorized","a sentinel alert is open on this PR"]}}, {"name":"intent-unauthorized/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the merge intent could not be authorized"]}}, {"name":"intent-unauthorized/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the merge intent could not be authorized"]}}, {"name":"intent-unauthorized/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the merge intent could not be authorized"]}}, @@ -847,118 +847,118 @@ {"name":"intent-unauthorized/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the merge intent could not be authorized"]}}, {"name":"intent-unauthorized/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the merge intent could not be authorized"]}}, {"name":"intent-unauthorized/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"intent-unauthorized","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"intent-unauthorized","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the merge intent could not be authorized"]}}, -{"name":"label=hold/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"label:hold","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"label=hold/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"label:hold","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"label=hold/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"label=hold/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"label=hold/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"label=hold/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"label=hold/route=green-dco-no/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"label=hold/route=green-dco-no/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"label=hold/route=green-dco-no/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"label=hold/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"label=hold/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, +{"name":"label=hold/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"label:hold","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"label=hold/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"label:hold","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"label=hold/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"label=hold/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"label:hold","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"label=hold/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, +{"name":"label=hold/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"label=hold/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"label=hold/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"label=hold/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"label=hold/route=green-dco-no/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"label=hold/route=green-dco-no/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"label=hold/route=green-dco-no/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"label=hold/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"label:hold"}}, +{"name":"label=hold/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"label=hold/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"label=hold/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"label:hold","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"label=hold/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, +{"name":"label=hold/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"label=hold/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"label:hold"}}, {"name":"label=hold/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"label:hold"}}, {"name":"label=hold/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"label:hold"}}, {"name":"label=hold/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"label:hold"}}, {"name":"label=hold/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"label:hold"}}, {"name":"label=hold/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"label:hold"}}, -{"name":"label=hold/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"label=hold/route=green-soaking/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-soaking/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green-soaking/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"label=hold/route=green/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green/verdict=changes_requested/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"changes_requested"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, -{"name":"label=hold/route=green/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=green/verdict=pending/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"label:hold","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"label=hold/route=green/verdict=requires_human-concrete/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, -{"name":"label=hold/route=green/verdict=requires_human-summary/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["needs a product call"]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer summary: needs a product call"]}}, -{"name":"label=hold/route=green/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"label=hold/route=noroute/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=pending/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=pending/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=pending/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"label=hold/route=red/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"label=hold/route=red/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"label=hold/route=red/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"label=hold/route=red/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"label=hold/route=red/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"label=hold/route=red/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"label=hold/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"label=hold/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"sentinel/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"sentinel","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"sentinel/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"sentinel","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"sentinel/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"sentinel/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"sentinel/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"sentinel/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"sentinel/route=green-dco-no/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"sentinel/route=green-dco-no/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"sentinel/route=green-dco-no/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, -{"name":"sentinel/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"sentinel/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","the automerge lane will not merge this unattended"]}}, +{"name":"label=hold/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"label:hold","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"label=hold/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, +{"name":"label=hold/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"label=hold/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"label:hold"}}, +{"name":"label=hold/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"label=hold/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"label=hold/route=green-soaking/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"label:hold","route_reasons":["soak 20m0s remaining"]}}, +{"name":"label=hold/route=green-soaking/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"label=hold/route=green-soaking/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"label=hold/route=green/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"label:hold"}}, +{"name":"label=hold/route=green/verdict=changes_requested/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"changes_requested"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, +{"name":"label=hold/route=green/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"label=hold/route=green/verdict=pending/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"label:hold","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"label=hold/route=green/verdict=requires_human-concrete/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, +{"name":"label=hold/route=green/verdict=requires_human-summary/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["needs a product call"]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer summary: needs a product call"]}}, +{"name":"label=hold/route=green/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"label=hold/route=noroute/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"label=hold/route=pending/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"label:hold","route_reasons":["2 check(s) still running"]}}, +{"name":"label=hold/route=pending/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"label=hold/route=pending/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"label=hold/route=red/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"label=hold/route=red/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"label=hold/route=red/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"label=hold/route=red/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"label=hold/route=red/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"label=hold/route=red/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"label=hold/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"label:hold","route_reasons":["checks could not be read"]}}, +{"name":"label=hold/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"label=hold/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"sentinel","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"sentinel/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"sentinel","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"sentinel/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"sentinel","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"sentinel/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, +{"name":"sentinel/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"sentinel/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"sentinel/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"sentinel/route=green-dco-no/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"sentinel/route=green-dco-no/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"sentinel/route=green-dco-no/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, +{"name":"sentinel/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"sentinel"}}, +{"name":"sentinel/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"sentinel/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"sentinel","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"sentinel/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, +{"name":"sentinel/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"sentinel/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"sentinel"}}, {"name":"sentinel/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"sentinel"}}, {"name":"sentinel/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"sentinel"}}, {"name":"sentinel/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"sentinel"}}, {"name":"sentinel/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"sentinel"}}, {"name":"sentinel/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"sentinel"}}, -{"name":"sentinel/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"sentinel/route=green-soaking/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-soaking/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green-soaking/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"sentinel/route=green/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green/verdict=changes_requested/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"changes_requested"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, -{"name":"sentinel/route=green/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=green/verdict=pending/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"sentinel","route_reasons":["no reviewer verdict for this head yet"]}}, -{"name":"sentinel/route=green/verdict=requires_human-concrete/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, -{"name":"sentinel/route=green/verdict=requires_human-summary/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["needs a product call"]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer summary: needs a product call"]}}, -{"name":"sentinel/route=green/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"sentinel/route=noroute/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=pending/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=pending/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=pending/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"sentinel/route=red/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"sentinel/route=red/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"sentinel/route=red/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"sentinel/route=red/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"sentinel/route=red/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"sentinel/route=red/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, -{"name":"sentinel/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"sentinel/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"sentinel","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"sentinel/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, +{"name":"sentinel/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"sentinel"}}, +{"name":"sentinel/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"sentinel/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=green-soaking/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"sentinel","route_reasons":["soak 20m0s remaining"]}}, +{"name":"sentinel/route=green-soaking/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"sentinel/route=green-soaking/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":10}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=green/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"sentinel"}}, +{"name":"sentinel/route=green/verdict=changes_requested/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"changes_requested"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, +{"name":"sentinel/route=green/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"sentinel/route=green/verdict=pending/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"sentinel","route_reasons":["no reviewer verdict for this head yet"]}}, +{"name":"sentinel/route=green/verdict=requires_human-concrete/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested","route_reasons":["verdict changes_requested @abc1234"]}}, +{"name":"sentinel/route=green/verdict=requires_human-summary/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["needs a product call"]},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer summary: needs a product call"]}}, +{"name":"sentinel/route=green/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=noroute/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"sentinel/route=pending/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"sentinel","route_reasons":["2 check(s) still running"]}}, +{"name":"sentinel/route=pending/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"sentinel/route=pending/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":1,"pending":2,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, +{"name":"sentinel/route=red/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"sentinel/route=red/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"sentinel/route=red/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"sentinel/route=red/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"sentinel/route=red/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"sentinel/route=red/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":2,"red":["unit"],"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"check-failing:unit","route_reasons":["red checks: unit"]}}, +{"name":"sentinel/route=unknown/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"060-reviewed","final_reason":"sentinel","route_reasons":["checks could not be read"]}}, +{"name":"sentinel/route=unknown/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"sentinel/route=unknown/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{}}},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"untrusted-author-role/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"untrusted-author-role","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"untrusted-author-role/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"untrusted-author-role","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"untrusted-author-role/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"untrusted-author-role/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"untrusted-author-role/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"untrusted-author-role","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"untrusted-author-role/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"untrusted-author-role/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"untrusted-author-role/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"untrusted-author-role/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"untrusted-author-role/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"untrusted-author-role/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -968,18 +968,18 @@ {"name":"untrusted-author-role/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"untrusted-author-role"}}, {"name":"untrusted-author-role/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"untrusted-author-role/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, -{"name":"untrusted-author-role/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["the `do-not-merge/wip` label is set"]}}, +{"name":"untrusted-author-role/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"untrusted-author-role","route_reasons":["the `do-not-merge/wip` label is set"]}}, {"name":"untrusted-author-role/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set"]}}, -{"name":"untrusted-author-role/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set"]}}, +{"name":"untrusted-author-role/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"untrusted-author-role/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"untrusted-author-role"}}, {"name":"untrusted-author-role/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"untrusted-author-role"}}, {"name":"untrusted-author-role/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"untrusted-author-role"}}, {"name":"untrusted-author-role/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"untrusted-author-role"}}, {"name":"untrusted-author-role/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"untrusted-author-role"}}, {"name":"untrusted-author-role/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"untrusted-author-role"}}, -{"name":"untrusted-author-role/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["a sentinel alert is open on this PR"]}}, +{"name":"untrusted-author-role/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"untrusted-author-role","route_reasons":["a sentinel alert is open on this PR"]}}, {"name":"untrusted-author-role/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR"]}}, -{"name":"untrusted-author-role/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR"]}}, +{"name":"untrusted-author-role/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, {"name":"untrusted-author-role/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"090-ready-for-human-merge","final_reason":"untrusted-author-role"}}, {"name":"untrusted-author-role/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"untrusted-author-role","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"untrusted-author-role/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"untrusted-author-role","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"090-ready-for-human-merge","rank":1,"reason":"","role":"untrusted","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"reviewer-verdict:requires_human","route_reasons":["the reviewer asked the author a question @abc1234","reviewer question: Ship behind a flag?"]}}, @@ -1009,9 +1009,9 @@ {"name":"workflow-approval-required=ci.yml/route=fresh/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"workflow-approval-required=ci.yml/route=fresh/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer verdict for this head yet"]}}, {"name":"workflow-approval-required=ci.yml/route=fresh/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, -{"name":"workflow-approval-required=ci.yml/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["a sentinel alert is open on this PR","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, -{"name":"workflow-approval-required=ci.yml/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, -{"name":"workflow-approval-required=ci.yml/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, +{"name":"workflow-approval-required=ci.yml/route=green-custom-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","a sentinel alert is open on this PR"]}}, +{"name":"workflow-approval-required=ci.yml/route=green-custom-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","a sentinel alert is open on this PR"]}}, +{"name":"workflow-approval-required=ci.yml/route=green-custom-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["ops/alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"sentinel_label":"ops/alert"}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","a sentinel alert is open on this PR"]}}, {"name":"workflow-approval-required=ci.yml/route=green-dco-no/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"workflow-approval-required=ci.yml/route=green-dco-no/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, {"name":"workflow-approval-required=ci.yml/route=green-dco-no/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"dco":-1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"dco-missing","route_reasons":["DCO sign-off missing"]}}, @@ -1021,18 +1021,18 @@ {"name":"workflow-approval-required=ci.yml/route=green-dco-yes/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, {"name":"workflow-approval-required=ci.yml/route=green-dco-yes/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, {"name":"workflow-approval-required=ci.yml/route=green-dco-yes/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"dco":1,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, -{"name":"workflow-approval-required=ci.yml/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the `do-not-merge/wip` label is set","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, -{"name":"workflow-approval-required=ci.yml/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the `do-not-merge/wip` label is set","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, -{"name":"workflow-approval-required=ci.yml/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","the `do-not-merge/wip` label is set","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, +{"name":"workflow-approval-required=ci.yml/route=green-hold-label/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","the `do-not-merge/wip` label is set"]}}, +{"name":"workflow-approval-required=ci.yml/route=green-hold-label/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","the `do-not-merge/wip` label is set"]}}, +{"name":"workflow-approval-required=ci.yml/route=green-hold-label/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["do-not-merge/wip"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","the `do-not-merge/wip` label is set"]}}, {"name":"workflow-approval-required=ci.yml/route=green-needs-rebase/verdict=approve/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"conflicting","route_reasons":["merge conflict with the base branch"]}}, {"name":"workflow-approval-required=ci.yml/route=green-needs-rebase/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"conflicting","route_reasons":["merge conflict with the base branch"]}}, {"name":"workflow-approval-required=ci.yml/route=green-needs-rebase/verdict=none/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"conflicting","route_reasons":["merge conflict with the base branch"]}}, {"name":"workflow-approval-required=ci.yml/route=green-needs-rebase/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"conflicting","route_reasons":["merge conflict with the base branch"]}}, {"name":"workflow-approval-required=ci.yml/route=green-needs-rebase/verdict=requires_human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"clanker","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"conflicting","route_reasons":["merge conflict with the base branch"]}}, {"name":"workflow-approval-required=ci.yml/route=green-needs-rebase/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["needs-rebase"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"conflicting","route_reasons":["merge conflict with the base branch"]}}, -{"name":"workflow-approval-required=ci.yml/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["a sentinel alert is open on this PR","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, -{"name":"workflow-approval-required=ci.yml/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","a sentinel alert is open on this PR","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, -{"name":"workflow-approval-required=ci.yml/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","a sentinel alert is open on this PR","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, +{"name":"workflow-approval-required=ci.yml/route=green-sentinel/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","a sentinel alert is open on this PR"]}}, +{"name":"workflow-approval-required=ci.yml/route=green-sentinel/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","a sentinel alert is open on this PR"]}}, +{"name":"workflow-approval-required=ci.yml/route=green-sentinel/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","labels":["sentinel-alert"],"detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true}}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner.","a sentinel alert is open on this PR"]}}, {"name":"workflow-approval-required=ci.yml/route=green-soaked/verdict=approve/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, {"name":"workflow-approval-required=ci.yml/route=green-soaked/verdict=none/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, {"name":"workflow-approval-required=ci.yml/route=green-soaked/verdict=requires_human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"workflow-approval-required:ci.yml","head_sha":"abc1234def","detail":{}}],"author_kind":"human","route":{"verdict":{"configured":true,"verdict":"requires_human","decision_question":"Ship behind a flag?"},"checks":{"total":3,"green":3,"known":true},"soak_minutes":30,"soak_elapsed_minutes":45}},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"workflow-approval-required:ci.yml","route_reasons":["the reviewer swarm returned `requires_human` @abc1234","reviewer question: Ship behind a flag?","GitHub Actions is waiting for workflow approval. Hive posted `/ok-to-test`; install `.github/workflows/hive-ok-to-test.yml` (`hivectl ok-to-test-template`) if the runs do not start, or manually approve them from the PR checks banner."]}}, diff --git a/src/pkg/stageengine/testdata/stage_goldens/lane-reason-authorkind.json b/src/pkg/stageengine/testdata/stage_goldens/lane-reason-authorkind.json index 3638de1761..b6f3b7976a 100644 --- a/src/pkg/stageengine/testdata/stage_goldens/lane-reason-authorkind.json +++ b/src/pkg/stageengine/testdata/stage_goldens/lane-reason-authorkind.json @@ -119,10 +119,10 @@ {"name":"contributor-lane/contributor-lane=reporter-trust-hold/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"contributor-lane/contributor-lane=reporter-trust-hold/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"contributor-lane/contributor-lane=reporter-trust-hold/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -171,10 +171,10 @@ {"name":"contributor-lane/head-changed-since-eval/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, {"name":"contributor-lane/head-changed-since-eval/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, {"name":"contributor-lane/head-changed-since-eval/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, -{"name":"contributor-lane/held/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/held/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/human-merge-path-evidence/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"contributor-lane/human-merge-path-evidence/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"contributor-lane/human-merge-path-evidence/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -195,10 +195,10 @@ {"name":"contributor-lane/label-removed/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"label-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"contributor-lane","final_stage":"terminal"}}, {"name":"contributor-lane/label-removed/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"contributor-lane","final_stage":"terminal"}}, {"name":"contributor-lane/label-removed/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"label-removed","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"contributor-lane","final_stage":"terminal"}}, -{"name":"contributor-lane/label=hold/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/label=hold/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/label=needs-human/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane/label=needs-human/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane/label=needs-human/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -267,10 +267,10 @@ {"name":"contributor-lane/self-authorization-hold-released/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"contributor-lane/self-authorization-hold-released/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"contributor-lane/self-authorization-hold-released/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, -{"name":"contributor-lane/sentinel/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/sentinel/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/kind=unknown","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/something-unmapped/kind=clanker","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/something-unmapped/kind=hive","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/something-unmapped/kind=human","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, @@ -423,10 +423,10 @@ {"name":"self-authored/contributor-lane=reporter-trust-hold/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"self-authored/contributor-lane=reporter-trust-hold/kind=human","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"self-authored/contributor-lane=reporter-trust-hold/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/kind=human","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/kind=human","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/kind=human","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -475,10 +475,10 @@ {"name":"self-authored/head-changed-since-eval/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, {"name":"self-authored/head-changed-since-eval/kind=human","input":{"observations":[{"lane":"self-authored","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, {"name":"self-authored/head-changed-since-eval/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, -{"name":"self-authored/held/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/kind=human","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/held/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/kind=human","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/human-merge-path-evidence/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"self-authored/human-merge-path-evidence/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"self-authored/human-merge-path-evidence/kind=human","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -499,10 +499,10 @@ {"name":"self-authored/label-removed/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"label-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"self-authored","final_stage":"terminal"}}, {"name":"self-authored/label-removed/kind=human","input":{"observations":[{"lane":"self-authored","reason":"label-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"self-authored","final_stage":"terminal"}}, {"name":"self-authored/label-removed/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"label-removed","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"self-authored","final_stage":"terminal"}}, -{"name":"self-authored/label=hold/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/kind=human","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/label=hold/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/kind=human","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/label=needs-human/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"self-authored/label=needs-human/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"self-authored/label=needs-human/kind=human","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -571,10 +571,10 @@ {"name":"self-authored/self-authorization-hold-released/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"self-authored/self-authorization-hold-released/kind=human","input":{"observations":[{"lane":"self-authored","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"self-authored/self-authorization-hold-released/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, -{"name":"self-authored/sentinel/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/kind=human","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/sentinel/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/kind=human","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/kind=unknown","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/something-unmapped/kind=clanker","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/something-unmapped/kind=hive","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/something-unmapped/kind=human","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, @@ -727,10 +727,10 @@ {"name":"trusted-author/contributor-lane=reporter-trust-hold/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"trusted-author/contributor-lane=reporter-trust-hold/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"trusted-author/contributor-lane=reporter-trust-hold/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -779,10 +779,10 @@ {"name":"trusted-author/head-changed-since-eval/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, {"name":"trusted-author/head-changed-since-eval/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, {"name":"trusted-author/head-changed-since-eval/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, -{"name":"trusted-author/held/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/held/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/human-merge-path-evidence/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"trusted-author/human-merge-path-evidence/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"trusted-author/human-merge-path-evidence/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -803,10 +803,10 @@ {"name":"trusted-author/label-removed/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"label-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"trusted-author","final_stage":"terminal"}}, {"name":"trusted-author/label-removed/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"label-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"trusted-author","final_stage":"terminal"}}, {"name":"trusted-author/label-removed/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"label-removed","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"trusted-author","final_stage":"terminal"}}, -{"name":"trusted-author/label=hold/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/label=hold/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/label=needs-human/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"trusted-author/label=needs-human/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"trusted-author/label=needs-human/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -875,10 +875,10 @@ {"name":"trusted-author/self-authorization-hold-released/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"trusted-author/self-authorization-hold-released/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"trusted-author/self-authorization-hold-released/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, -{"name":"trusted-author/sentinel/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/sentinel/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/kind=unknown","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}]},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/something-unmapped/kind=clanker","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/something-unmapped/kind=hive","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/something-unmapped/kind=human","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, diff --git a/src/pkg/stageengine/testdata/stage_goldens/lane-reason-modifier.json b/src/pkg/stageengine/testdata/stage_goldens/lane-reason-modifier.json index ed254a542e..c632894b89 100644 --- a/src/pkg/stageengine/testdata/stage_goldens/lane-reason-modifier.json +++ b/src/pkg/stageengine/testdata/stage_goldens/lane-reason-modifier.json @@ -391,17 +391,17 @@ {"name":"contributor-lane/contributor-lane=reporter-trust-hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=err","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=err+approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"contributor-lane:sentinel-blocked"}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=label=needs-rebase","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"contributor-lane:sentinel-blocked"}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=merged","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=no-head","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=redcheck+approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=redcheck=same-head","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=redcheck=stale-head","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=role=trusted","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=sharedci","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=sharedci+approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=merged","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=no-head","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=redcheck+approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:lint"}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=redcheck=same-head","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=redcheck=stale-head","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=role=trusted","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=sharedci","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=sharedci+approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:lint"}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/mod=err","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/mod=err+approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"trusted","lane":"contributor-lane","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -560,17 +560,17 @@ {"name":"contributor-lane/head-changed-since-eval/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"head-changed-since-eval","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"050-review-pending","rank":3,"reason":"shared-ci-incident:9100","role":"none","lane":"contributor-lane","final_stage":"050-review-pending","final_reason":"shared-ci-incident:9100"}}, {"name":"contributor-lane/held/mod=err","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/held/mod=err+approve","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"held"}}, -{"name":"contributor-lane/held/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/held/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/held/mod=label=needs-rebase","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"held"}}, -{"name":"contributor-lane/held/mod=merged","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/mod=no-head","input":{"observations":[{"lane":"contributor-lane","reason":"held","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/mod=redcheck+approve","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/mod=redcheck=same-head","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/mod=redcheck=stale-head","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/mod=role=trusted","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/mod=sharedci","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/mod=sharedci+approve","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/held/mod=merged","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/mod=no-head","input":{"observations":[{"lane":"contributor-lane","reason":"held","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/mod=redcheck+approve","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:lint"}}, +{"name":"contributor-lane/held/mod=redcheck=same-head","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"contributor-lane/held/mod=redcheck=stale-head","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/mod=role=trusted","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/mod=sharedci","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/mod=sharedci+approve","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:lint"}}, {"name":"contributor-lane/human-merge-path-evidence/mod=err","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/human-merge-path-evidence/mod=err+approve","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"human-merge-path-evidence"}}, {"name":"contributor-lane/human-merge-path-evidence/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -638,17 +638,17 @@ {"name":"contributor-lane/label-removed/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"label-removed","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"contributor-lane","final_stage":"terminal"}}, {"name":"contributor-lane/label=hold/mod=err","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/label=hold/mod=err+approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"label:hold"}}, -{"name":"contributor-lane/label=hold/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/label=hold/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/label=hold/mod=label=needs-rebase","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"label:hold"}}, -{"name":"contributor-lane/label=hold/mod=merged","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/mod=no-head","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/mod=redcheck+approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/mod=redcheck=same-head","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/mod=redcheck=stale-head","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/mod=role=trusted","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/mod=sharedci","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/mod=sharedci+approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/label=hold/mod=merged","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/mod=no-head","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/mod=redcheck+approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:lint"}}, +{"name":"contributor-lane/label=hold/mod=redcheck=same-head","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"contributor-lane/label=hold/mod=redcheck=stale-head","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/mod=role=trusted","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/mod=sharedci","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/mod=sharedci+approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:lint"}}, {"name":"contributor-lane/label=needs-human/mod=err","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/label=needs-human/mod=err+approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"label:needs-human"}}, {"name":"contributor-lane/label=needs-human/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -872,17 +872,17 @@ {"name":"contributor-lane/self-authorization-hold-released/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"self-authorization-hold-released","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"contributor-lane/sentinel/mod=err","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/sentinel/mod=err+approve","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"sentinel"}}, -{"name":"contributor-lane/sentinel/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/sentinel/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/sentinel/mod=label=needs-rebase","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"sentinel"}}, -{"name":"contributor-lane/sentinel/mod=merged","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/mod=no-head","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/mod=redcheck+approve","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/mod=redcheck=same-head","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/mod=redcheck=stale-head","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/mod=role=trusted","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/mod=sharedci","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/mod=sharedci+approve","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/sentinel/mod=merged","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/mod=no-head","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/mod=redcheck+approve","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:lint"}}, +{"name":"contributor-lane/sentinel/mod=redcheck=same-head","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"contributor-lane/sentinel/mod=redcheck=stale-head","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/mod=role=trusted","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/mod=sharedci","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/mod=sharedci+approve","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/mod=sharedci+redcheck","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"optional-check-failing:lint"}}, {"name":"contributor-lane/something-unmapped/mod=err","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"contributor-lane","skipped":true}}, {"name":"contributor-lane/something-unmapped/mod=err+approve","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"something-unmapped"}}, {"name":"contributor-lane/something-unmapped/mod=label=author_hive","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"clanker"},"want":{"stage":"none","rank":0,"reason":"","role":"trusted","lane":"contributor-lane","skipped":true}}, @@ -1379,17 +1379,17 @@ {"name":"self-authored/contributor-lane=reporter-trust-hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"self-authored/contributor-lane=sentinel-blocked/mod=err","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/contributor-lane=sentinel-blocked/mod=err+approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"contributor-lane:sentinel-blocked"}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/contributor-lane=sentinel-blocked/mod=label=needs-rebase","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"contributor-lane:sentinel-blocked"}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=merged","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=no-head","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=redcheck+approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=redcheck=same-head","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=redcheck=stale-head","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=role=trusted","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=sharedci","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=sharedci+approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=merged","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=no-head","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=redcheck+approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:lint"}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=redcheck=same-head","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=redcheck=stale-head","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=role=trusted","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=sharedci","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=sharedci+approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:lint"}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/mod=err","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/mod=err+approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"trusted","lane":"self-authored","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -1548,17 +1548,17 @@ {"name":"self-authored/head-changed-since-eval/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"head-changed-since-eval","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"050-review-pending","rank":3,"reason":"shared-ci-incident:9100","role":"none","lane":"self-authored","final_stage":"050-review-pending","final_reason":"shared-ci-incident:9100"}}, {"name":"self-authored/held/mod=err","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/held/mod=err+approve","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"held"}}, -{"name":"self-authored/held/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/held/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/held/mod=label=needs-rebase","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"held"}}, -{"name":"self-authored/held/mod=merged","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/mod=no-head","input":{"observations":[{"lane":"self-authored","reason":"held","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/mod=redcheck+approve","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/mod=redcheck=same-head","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/mod=redcheck=stale-head","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/mod=role=trusted","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/mod=sharedci","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/mod=sharedci+approve","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/held/mod=merged","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/mod=no-head","input":{"observations":[{"lane":"self-authored","reason":"held","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/mod=redcheck+approve","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:lint"}}, +{"name":"self-authored/held/mod=redcheck=same-head","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"self-authored/held/mod=redcheck=stale-head","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/mod=role=trusted","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/mod=sharedci","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/mod=sharedci+approve","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:lint"}}, {"name":"self-authored/human-merge-path-evidence/mod=err","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/human-merge-path-evidence/mod=err+approve","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"human-merge-path-evidence"}}, {"name":"self-authored/human-merge-path-evidence/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -1626,17 +1626,17 @@ {"name":"self-authored/label-removed/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"label-removed","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"self-authored","final_stage":"terminal"}}, {"name":"self-authored/label=hold/mod=err","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/label=hold/mod=err+approve","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"label:hold"}}, -{"name":"self-authored/label=hold/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/label=hold/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/label=hold/mod=label=needs-rebase","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"label:hold"}}, -{"name":"self-authored/label=hold/mod=merged","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/mod=no-head","input":{"observations":[{"lane":"self-authored","reason":"label:hold","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/mod=redcheck+approve","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/mod=redcheck=same-head","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/mod=redcheck=stale-head","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/mod=role=trusted","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/mod=sharedci","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/mod=sharedci+approve","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/label=hold/mod=merged","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/mod=no-head","input":{"observations":[{"lane":"self-authored","reason":"label:hold","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/mod=redcheck+approve","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:lint"}}, +{"name":"self-authored/label=hold/mod=redcheck=same-head","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"self-authored/label=hold/mod=redcheck=stale-head","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/mod=role=trusted","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/mod=sharedci","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/mod=sharedci+approve","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:lint"}}, {"name":"self-authored/label=needs-human/mod=err","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/label=needs-human/mod=err+approve","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"label:needs-human"}}, {"name":"self-authored/label=needs-human/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -1860,17 +1860,17 @@ {"name":"self-authored/self-authorization-hold-released/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"self-authorization-hold-released","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"self-authored/sentinel/mod=err","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/sentinel/mod=err+approve","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"sentinel"}}, -{"name":"self-authored/sentinel/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/sentinel/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/sentinel/mod=label=needs-rebase","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"sentinel"}}, -{"name":"self-authored/sentinel/mod=merged","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/mod=no-head","input":{"observations":[{"lane":"self-authored","reason":"sentinel","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/mod=redcheck+approve","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/mod=redcheck=same-head","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/mod=redcheck=stale-head","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/mod=role=trusted","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/mod=sharedci","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/mod=sharedci+approve","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/sentinel/mod=merged","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/mod=no-head","input":{"observations":[{"lane":"self-authored","reason":"sentinel","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/mod=redcheck+approve","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:lint"}}, +{"name":"self-authored/sentinel/mod=redcheck=same-head","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"self-authored/sentinel/mod=redcheck=stale-head","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/mod=role=trusted","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/mod=sharedci","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/mod=sharedci+approve","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/mod=sharedci+redcheck","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"optional-check-failing:lint"}}, {"name":"self-authored/something-unmapped/mod=err","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, {"name":"self-authored/something-unmapped/mod=err+approve","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"something-unmapped"}}, {"name":"self-authored/something-unmapped/mod=label=author_hive","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"trusted","lane":"self-authored","skipped":true}}, @@ -2367,17 +2367,17 @@ {"name":"trusted-author/contributor-lane=reporter-trust-hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"trusted-author/contributor-lane=sentinel-blocked/mod=err","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/contributor-lane=sentinel-blocked/mod=err+approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"contributor-lane:sentinel-blocked"}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/contributor-lane=sentinel-blocked/mod=label=needs-rebase","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"contributor-lane:sentinel-blocked"}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=merged","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=no-head","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=redcheck+approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=redcheck=same-head","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=redcheck=stale-head","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=sharedci","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=sharedci+approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=merged","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=no-head","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=redcheck+approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:lint"}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=redcheck=same-head","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=redcheck=stale-head","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=sharedci","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=sharedci+approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:lint"}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/mod=err","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/mod=err+approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"trusted","lane":"trusted-author","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -2536,17 +2536,17 @@ {"name":"trusted-author/head-changed-since-eval/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"head-changed-since-eval","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"050-review-pending","rank":3,"reason":"shared-ci-incident:9100","role":"none","lane":"trusted-author","final_stage":"050-review-pending","final_reason":"shared-ci-incident:9100"}}, {"name":"trusted-author/held/mod=err","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/held/mod=err+approve","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"held"}}, -{"name":"trusted-author/held/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/held/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/held/mod=label=needs-rebase","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"held"}}, -{"name":"trusted-author/held/mod=merged","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/mod=no-head","input":{"observations":[{"lane":"trusted-author","reason":"held","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/mod=redcheck+approve","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/mod=redcheck=same-head","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/mod=redcheck=stale-head","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/mod=role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/mod=sharedci","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/mod=sharedci+approve","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/held/mod=merged","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/mod=no-head","input":{"observations":[{"lane":"trusted-author","reason":"held","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/mod=redcheck+approve","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:lint"}}, +{"name":"trusted-author/held/mod=redcheck=same-head","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"trusted-author/held/mod=redcheck=stale-head","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/mod=role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/mod=sharedci","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/mod=sharedci+approve","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:lint"}}, {"name":"trusted-author/human-merge-path-evidence/mod=err","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/human-merge-path-evidence/mod=err+approve","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"human-merge-path-evidence"}}, {"name":"trusted-author/human-merge-path-evidence/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -2614,17 +2614,17 @@ {"name":"trusted-author/label-removed/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"label-removed","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"trusted-author","final_stage":"terminal"}}, {"name":"trusted-author/label=hold/mod=err","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/label=hold/mod=err+approve","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"label:hold"}}, -{"name":"trusted-author/label=hold/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/label=hold/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/label=hold/mod=label=needs-rebase","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"label:hold"}}, -{"name":"trusted-author/label=hold/mod=merged","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/mod=no-head","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/mod=redcheck+approve","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/mod=redcheck=same-head","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/mod=redcheck=stale-head","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/mod=role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/mod=sharedci","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/mod=sharedci+approve","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/label=hold/mod=merged","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/mod=no-head","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/mod=redcheck+approve","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:lint"}}, +{"name":"trusted-author/label=hold/mod=redcheck=same-head","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"trusted-author/label=hold/mod=redcheck=stale-head","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/mod=role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/mod=sharedci","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/mod=sharedci+approve","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:lint"}}, {"name":"trusted-author/label=needs-human/mod=err","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/label=needs-human/mod=err+approve","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"label:needs-human"}}, {"name":"trusted-author/label=needs-human/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -2848,17 +2848,17 @@ {"name":"trusted-author/self-authorization-hold-released/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"self-authorization-hold-released","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"trusted-author/sentinel/mod=err","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/sentinel/mod=err+approve","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"sentinel"}}, -{"name":"trusted-author/sentinel/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/sentinel/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/sentinel/mod=label=needs-rebase","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","labels":["Needs-Rebase"],"detail":{}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"sentinel"}}, -{"name":"trusted-author/sentinel/mod=merged","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/mod=no-head","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/mod=redcheck+approve","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/mod=redcheck=same-head","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/mod=redcheck=stale-head","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/mod=role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/mod=sharedci","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/mod=sharedci+approve","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/sentinel/mod=merged","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","merged":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/mod=no-head","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/mod=redcheck+approve","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"},"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:lint"}}, +{"name":"trusted-author/sentinel/mod=redcheck=same-head","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["docs-link-check","lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:docs-link-check","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:docs-link-check"}}, +{"name":"trusted-author/sentinel/mod=redcheck=stale-head","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"red_checks":["lint"],"red_checks_head":"0ld0000000"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/mod=role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/mod=sharedci","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/mod=sharedci+approve","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/mod=sharedci+redcheck","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","shared_ci_incident":9100,"detail":{"red_checks":["lint"],"red_checks_head":"abc1234def"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"optional-check-failing:lint","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"optional-check-failing:lint"}}, {"name":"trusted-author/something-unmapped/mod=err","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","err":true,"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted-author/something-unmapped/mod=err+approve","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","err":true,"detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"something-unmapped"}}, {"name":"trusted-author/something-unmapped/mod=label=author_hive","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","labels":["author/hive"],"detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"trusted","lane":"trusted-author","skipped":true}}, diff --git a/src/pkg/stageengine/testdata/stage_goldens/lane-reason-verdict.json b/src/pkg/stageengine/testdata/stage_goldens/lane-reason-verdict.json index 4987c10723..88f3b8a647 100644 --- a/src/pkg/stageengine/testdata/stage_goldens/lane-reason-verdict.json +++ b/src/pkg/stageengine/testdata/stage_goldens/lane-reason-verdict.json @@ -359,18 +359,18 @@ {"name":"contributor-lane/contributor-lane=reporter-trust-hold/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"contributor-lane/contributor-lane=reporter-trust-hold/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"contributor-lane/contributor-lane=reporter-trust-hold/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=incomplete","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"incomplete"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=none","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=reject","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"reject"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human-concrete","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human-human-approved","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=incomplete","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"incomplete"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=none","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=reject","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"reject"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:reject","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:reject"}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human-concrete","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human-human-approved","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"reviewer-verdict:requires_human:human-approved@clubanderson","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human:human-approved@clubanderson","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/contributor-lane=sentinel-blocked/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, {"name":"contributor-lane/contributor-lane=soakingremaining=30m/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -515,18 +515,18 @@ {"name":"contributor-lane/head-changed-since-eval/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane/head-changed-since-eval/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane/head-changed-since-eval/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"contributor-lane","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, -{"name":"contributor-lane/held/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=incomplete","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"incomplete"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=none","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=reject","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"reject"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=requires_human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=requires_human-concrete","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=requires_human-human-approved","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/held/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/held/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"contributor-lane/held/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/verdict=incomplete","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"incomplete"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/verdict=none","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/verdict=reject","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"reject"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:reject","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:reject"}}, +{"name":"contributor-lane/held/verdict=requires_human","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/held/verdict=requires_human-concrete","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"contributor-lane/held/verdict=requires_human-human-approved","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"reviewer-verdict:requires_human:human-approved@clubanderson","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human:human-approved@clubanderson","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/held/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/held/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/held/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"held","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/human-merge-path-evidence/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"contributor-lane/human-merge-path-evidence/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"contributor-lane/human-merge-path-evidence/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -587,18 +587,18 @@ {"name":"contributor-lane/label-removed/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"label-removed","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"contributor-lane","final_stage":"terminal"}}, {"name":"contributor-lane/label-removed/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"label-removed","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"contributor-lane","final_stage":"terminal"}}, {"name":"contributor-lane/label-removed/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"label-removed","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"contributor-lane","final_stage":"terminal"}}, -{"name":"contributor-lane/label=hold/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=incomplete","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"incomplete"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=none","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=reject","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"reject"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=requires_human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=requires_human-concrete","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=requires_human-human-approved","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/label=hold/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/label=hold/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"contributor-lane/label=hold/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/verdict=incomplete","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"incomplete"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/verdict=none","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/verdict=reject","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"reject"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:reject","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:reject"}}, +{"name":"contributor-lane/label=hold/verdict=requires_human","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/label=hold/verdict=requires_human-concrete","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"contributor-lane/label=hold/verdict=requires_human-human-approved","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"reviewer-verdict:requires_human:human-approved@clubanderson","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human:human-approved@clubanderson","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/label=hold/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/label=hold/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/label=hold/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/label=needs-human/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane/label=needs-human/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"contributor-lane/label=needs-human/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"label:needs-human","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -803,18 +803,18 @@ {"name":"contributor-lane/self-authorization-hold-released/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"contributor-lane/self-authorization-hold-released/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"contributor-lane/self-authorization-hold-released/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, -{"name":"contributor-lane/sentinel/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=incomplete","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"incomplete"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=none","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=reject","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"reject"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=requires_human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=requires_human-concrete","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=requires_human-human-approved","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"contributor-lane/sentinel/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/sentinel/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"contributor-lane/sentinel/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/verdict=incomplete","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"incomplete"}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/verdict=none","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/verdict=reject","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"reject"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:reject","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:reject"}}, +{"name":"contributor-lane/sentinel/verdict=requires_human","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/sentinel/verdict=requires_human-concrete","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."]}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"contributor-lane/sentinel/verdict=requires_human-human-approved","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"abc1234def"}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"reviewer-verdict:requires_human:human-approved@clubanderson","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human:human-approved@clubanderson","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"contributor-lane/sentinel/verdict=requires_human-human-approved-stale","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human"},"human_approver":"clubanderson","human_approval_head":"0ld0000000"}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/sentinel/verdict=requires_human-policy-owned","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"requires_human","human_summaries":["correctness requires human: LaneQueuedWork is plumbed but never populated; add the producer in AgentActivityFor."],"hive_authored_known":true}}}],"author_kind":"clanker"},"want":{"stage":"085-needs-decision","rank":3,"reason":"reviewer-verdict:requires_human","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"reviewer-verdict:requires_human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"contributor-lane/sentinel/verdict=unconfigured","input":{"observations":[{"lane":"contributor-lane","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{}}}],"author_kind":"clanker"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"contributor-lane","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"contributor-lane/something-unmapped/verdict=approve","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"something-unmapped"}}, {"name":"contributor-lane/something-unmapped/verdict=changes_requested","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"clanker"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"contributor-lane","final_stage":"072-returned-to-contributor","final_reason":"reviewer-verdict:changes_requested"}}, {"name":"contributor-lane/something-unmapped/verdict=decision_requested","input":{"observations":[{"lane":"contributor-lane","reason":"something-unmapped","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve","decision_requested":true,"decision_question":"@clubanderson should decide."}}}],"author_kind":"clanker"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"contributor-lane","final_stage":"080-awaiting-merge-admission","final_reason":"something-unmapped"}}, @@ -1001,9 +1001,9 @@ {"name":"self-authored/contributor-lane=reporter-trust-hold/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"self-authored/contributor-lane=reporter-trust-hold/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"self-authored/contributor-lane=reporter-trust-hold/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/contributor-lane=sentinel-blocked/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"self-authored/contributor-lane=sentinel-blocked/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"reviewer-verdict:changes_requested"}}, {"name":"self-authored/contributor-lane=soakingremaining=30m/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -1040,9 +1040,9 @@ {"name":"self-authored/head-changed-since-eval/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, {"name":"self-authored/head-changed-since-eval/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"reviewer-verdict:changes_requested"}}, {"name":"self-authored/head-changed-since-eval/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"self-authored","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, -{"name":"self-authored/held/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/held/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/held/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/held/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"self-authored/held/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/human-merge-path-evidence/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"self-authored/human-merge-path-evidence/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"self-authored/human-merge-path-evidence/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -1058,9 +1058,9 @@ {"name":"self-authored/label-removed/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"label-removed","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"self-authored","final_stage":"terminal"}}, {"name":"self-authored/label-removed/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"label-removed","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"self-authored","final_stage":"terminal"}}, {"name":"self-authored/label-removed/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"label-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"self-authored","final_stage":"terminal"}}, -{"name":"self-authored/label=hold/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/label=hold/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/label=hold/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/label=hold/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"self-authored/label=hold/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/label=needs-human/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"self-authored/label=needs-human/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"self-authored/label=needs-human/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -1112,9 +1112,9 @@ {"name":"self-authored/self-authorization-hold-released/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"self-authored/self-authorization-hold-released/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"self-authored/self-authorization-hold-released/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, -{"name":"self-authored/sentinel/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"self-authored/sentinel/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"self-authored/sentinel/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"self-authored/sentinel/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"self-authored/sentinel/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"self-authored","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"self-authored/something-unmapped/verdict=approve","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"hive"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"self-authored","final_stage":"080-awaiting-merge-admission","final_reason":"something-unmapped"}}, {"name":"self-authored/something-unmapped/verdict=changes_requested","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"hive"},"want":{"stage":"070-fixing","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"self-authored","final_stage":"070-fixing","final_reason":"reviewer-verdict:changes_requested"}}, {"name":"self-authored/something-unmapped/verdict=none","input":{"observations":[{"lane":"self-authored","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"hive"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"self-authored","skipped":true}}, @@ -1229,9 +1229,9 @@ {"name":"trusted-author/contributor-lane=reporter-trust-hold/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"trusted-author/contributor-lane=reporter-trust-hold/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, {"name":"trusted-author/contributor-lane=reporter-trust-hold/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:reporter-trust-hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:reporter-trust-hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the reporter-trust hold is in place"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/contributor-lane=sentinel-blocked/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"trusted-author/contributor-lane=sentinel-blocked/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:sentinel-blocked","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"contributor-lane:sentinel-blocked","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested"}}, {"name":"trusted-author/contributor-lane=soakingremaining=30m/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"contributor-lane:soaking(remaining=30m)","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"095-pre-merge-soak","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"095-pre-merge-soak","final_reason":"contributor-lane:soaking(remaining=30m)"}}, @@ -1268,9 +1268,9 @@ {"name":"trusted-author/head-changed-since-eval/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, {"name":"trusted-author/head-changed-since-eval/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested"}}, {"name":"trusted-author/head-changed-since-eval/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"head-changed-since-eval","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"100-merge-queue","rank":3,"reason":"","role":"none","lane":"trusted-author","final_stage":"100-merge-queue","final_reason":"head-changed-since-eval"}}, -{"name":"trusted-author/held/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/held/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/held/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/held/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"trusted-author/held/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/human-merge-path-evidence/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"trusted-author/human-merge-path-evidence/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, {"name":"trusted-author/human-merge-path-evidence/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"human-merge-path-evidence","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"human-merge-path-evidence","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the PR touches a human-merge path (auto_merge.human_merge_paths)"]}}, @@ -1286,9 +1286,9 @@ {"name":"trusted-author/label-removed/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"label-removed","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"trusted-author","final_stage":"terminal"}}, {"name":"trusted-author/label-removed/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"label-removed","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"trusted-author","final_stage":"terminal"}}, {"name":"trusted-author/label-removed/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"label-removed","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":3,"reason":"","role":"none","terminal":true,"lane":"trusted-author","final_stage":"terminal"}}, -{"name":"trusted-author/label=hold/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/label=hold/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/label=hold/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/label=hold/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"trusted-author/label=hold/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"label:hold","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:hold","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/label=needs-human/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"trusted-author/label=needs-human/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, {"name":"trusted-author/label=needs-human/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"label:needs-human","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"label:needs-human","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, @@ -1340,9 +1340,9 @@ {"name":"trusted-author/self-authorization-hold-released/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"trusted-author/self-authorization-hold-released/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, {"name":"trusted-author/self-authorization-hold-released/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"self-authorization-hold-released","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"self-authorization-hold-released","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the lane reported `self-authorization-hold-released`"]}}, -{"name":"trusted-author/sentinel/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted-author/sentinel/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted-author/sentinel/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted-author/sentinel/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested"}}, +{"name":"trusted-author/sentinel/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"sentinel","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"sentinel","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted-author/something-unmapped/verdict=approve","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"approved":true,"verdict":"approve"}}}],"author_kind":"human"},"want":{"stage":"080-awaiting-merge-admission","rank":1,"reason":"","role":"untrusted","lane":"trusted-author","final_stage":"080-awaiting-merge-admission","final_reason":"something-unmapped"}}, {"name":"trusted-author/something-unmapped/verdict=changes_requested","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","detail":{"verdict":{"configured":true,"verdict":"changes_requested"}}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"reviewer-verdict:changes_requested","role":"none","lane":"trusted-author","final_stage":"071-needs-author","final_reason":"reviewer-verdict:changes_requested"}}, {"name":"trusted-author/something-unmapped/verdict=none","input":{"observations":[{"lane":"trusted-author","reason":"something-unmapped","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, diff --git a/src/pkg/stageengine/testdata/stage_goldens/precedence.json b/src/pkg/stageengine/testdata/stage_goldens/precedence.json index 55ce6cb160..4e4a5ad81a 100644 --- a/src/pkg/stageengine/testdata/stage_goldens/precedence.json +++ b/src/pkg/stageengine/testdata/stage_goldens/precedence.json @@ -457,116 +457,116 @@ {"name":"trusted=empty,role=unknown/contributor=empty,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"trusted","lane":"trusted-author","skipped":true}}, {"name":"trusted=empty,role=unknown/contributor=empty,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, {"name":"trusted=empty,role=unknown/contributor=empty,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"none","rank":0,"reason":"","role":"untrusted","lane":"trusted-author","skipped":true}}, -{"name":"trusted=held,role=trusted/contributor=conflicting,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=conflicting,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=conflicting,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=conflicting,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=conflicting,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=empty,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=empty,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=empty,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=empty,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=trusted/contributor=empty,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=conflicting,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=conflicting,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=conflicting,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=conflicting,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=conflicting,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=empty,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=empty,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=empty,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=empty,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, -{"name":"trusted=held,role=unknown/contributor=empty,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"085-needs-decision","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict","the automerge lane will not merge this unattended"]}}, +{"name":"trusted=held,role=trusted/contributor=conflicting,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=conflicting,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=conflicting,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=conflicting,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=conflicting,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=app-authored,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=changes-requested,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-tier-untrusted,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=claim-unverified,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-claim,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=no-verdict,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=registry-trusted,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=soakingremaining=5m,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=contributor-lane=workflow-path,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=empty,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=empty,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=empty,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=empty,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=trusted/contributor=empty,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=conflicting,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=conflicting,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=conflicting,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=conflicting,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=conflicting,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=app-authored,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:app-authored","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=changes-requested,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:changes-requested","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-tier-untrusted,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-tier-untrusted","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=claim-unverified,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:claim-unverified","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-claim,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-claim","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=no-verdict,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:no-verdict","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=registry-trusted,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:registry-trusted","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=soakingremaining=5m,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:soaking(remaining=5m)","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=contributor-lane=workflow-path,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"contributor-lane:workflow-path","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=empty,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"contributor","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=empty,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"newcomer","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=empty,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"trusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=empty,role=unknown","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"none","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, +{"name":"trusted=held,role=unknown/contributor=empty,role=untrusted","input":{"observations":[{"lane":"trusted-author","reason":"held","head_sha":"abc1234def","detail":{}},{"lane":"contributor-lane","reason":"","head_sha":"abc1234def","detail":{"role":"untrusted"}}],"author_kind":"human"},"want":{"stage":"090-ready-for-human-merge","rank":3,"reason":"","role":"untrusted","human":true,"lane":"trusted-author","final_stage":"085-needs-decision","final_reason":"held","route_reasons":["no reviewer agent is configured, so this head will never get a swarm verdict"]}}, {"name":"trusted=not-app-authored,role=trusted/contributor=conflicting,role=contributor","input":{"observations":[{"lane":"trusted-author","reason":"not-app-authored","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"contributor"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"trusted","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"conflicting"}}, {"name":"trusted=not-app-authored,role=trusted/contributor=conflicting,role=newcomer","input":{"observations":[{"lane":"trusted-author","reason":"not-app-authored","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"newcomer"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"trusted","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"conflicting"}}, {"name":"trusted=not-app-authored,role=trusted/contributor=conflicting,role=trusted","input":{"observations":[{"lane":"trusted-author","reason":"not-app-authored","head_sha":"abc1234def","detail":{"role":"trusted"}},{"lane":"contributor-lane","reason":"conflicting","head_sha":"abc1234def","detail":{"role":"trusted"}}],"author_kind":"human"},"want":{"stage":"071-needs-author","rank":3,"reason":"","role":"trusted","lane":"contributor-lane","final_stage":"071-needs-author","final_reason":"conflicting"}}, diff --git a/src/pkg/stagelabels/hold_test.go b/src/pkg/stagelabels/hold_test.go index ad425980d8..0e7bdfe637 100644 --- a/src/pkg/stagelabels/hold_test.go +++ b/src/pkg/stagelabels/hold_test.go @@ -114,13 +114,15 @@ func TestStoreNoteHold(t *testing.T) { func TestRouteHumanNamesWhoHeld(t *testing.T) { base := Evidence{Head: "abc1234", Verdict: VerdictApproved, Checks: CheckSummary{Total: 3, Green: 3, Known: true}, DCO: DCOYes, Holds: []string{"hold"}, Cause: CauseDecision, SelfAuthored: true} plain := RouteHuman(base) - if plain.Stage != NeedsDecision || strings.Join(plain.Reasons, "|") != "the `hold` label is set|"+decisionConsequenceReason || plain.Hold != nil { + // The lane rule (CauseDecision) owns 085; the hold rides it as a gate + // after the rule's own reason (hivecommons/hive#17327). + if plain.Stage != NeedsDecision || strings.Join(plain.Reasons, "|") != decisionConsequenceReason+"|the `hold` label is set" || plain.Hold != nil { t.Fatalf("plain route = %+v", plain) } hive := base hive.Hold = &HoldProvenance{By: HoldByHive, Source: HoldSourceReporterTrust, Reason: ReporterTrustReason(15017, "Karibhou", "CONTRIBUTOR")} route := RouteHuman(hive) - if route.Reasons[0] != "the `hold` label was set by the hive itself: reporter trust (issue #15017 by @Karibhou, contributor)" || route.Hold != hive.Hold { + if route.Reasons[1] != "the `hold` label was set by the hive itself: reporter trust (issue #15017 by @Karibhou, contributor)" || route.Hold != hive.Hold { t.Fatalf("hive-held route = %+v", route) } comment := DecisionComment(route) @@ -131,7 +133,7 @@ func TestRouteHumanNamesWhoHeld(t *testing.T) { person.Holds = []string{"do-not-merge", "hold"} person.Hold = &HoldProvenance{By: "clubanderson", Source: HoldSourceLabel} route = RouteHuman(person) - if strings.Join(route.Reasons, "|") != "the `do-not-merge` label is set|the `hold` label was set by @clubanderson|"+decisionConsequenceReason { + if strings.Join(route.Reasons, "|") != decisionConsequenceReason+"|the `do-not-merge` label is set|the `hold` label was set by @clubanderson" { t.Fatalf("person-held route reasons = %q", route.Reasons) } } diff --git a/src/pkg/stagelabels/human.go b/src/pkg/stagelabels/human.go index 1f44ebeb59..e9f3e423e7 100644 --- a/src/pkg/stagelabels/human.go +++ b/src/pkg/stagelabels/human.go @@ -13,14 +13,20 @@ package stagelabels // - 050 review-pending: no verdict for this head yet (or the head was just // pushed and nothing has reported). Nobody acts; wait. // - 085 needs-decision: a person must decide something other than the -// merge — sentinel alert, hold / do-not-merge / needs-decision label, or -// a lane rule that is human-only for a non-trust reason. +// merge — a needs-decision / needs-human label, a reviewer's +// requires_human verdict, or a lane rule that is human-only for a +// non-trust reason. // - 060 reviewed: approve verdict, but checks or the soak are still // running. Wait. // - 090 ready-for-human-merge: everything the hive would need is in place // and only trust/tier/role stops it. The maintainer's /lgtm /approve is // the whole remaining job. // +// A sentinel alert and a hold-class label are gates, not stages +// (hivecommons/hive#17327): the stage stays the head's real progress and +// the gate rides it as a pill (Route.Gates). The lanes refuse the merge on +// the label itself, so a gated head at 090 is "held", never "queued". +// // RouteHuman is a pure function of Evidence so every rule is testable. import ( @@ -237,8 +243,10 @@ func HumanApprovedReason(reason string) (base, approver string) { return reason[:i], strings.TrimSpace(reason[i+len(HumanApprovedReasonSuffix):]) } -// HoldLabels are the modifier labels that turn a human hand-off into a -// decision (085). `do-not-merge/*` (prow's family) matches by prefix. +// HoldLabels are the modifier labels that gate a human hand-off: the hive +// never merges while one is set, and the route carries it as a pill on the +// head's real stage (hivecommons/hive#17327). `do-not-merge/*` (prow's +// family) matches by prefix. // `needs-decision` is retired (hivecommons/hive#12683; nothing writes it) // and stays here only so a PR still carrying it keeps its decision routing // until the label is gone. @@ -295,6 +303,12 @@ type Route struct { // Hold carries the `hold` provenance into the 085 comment so it can // name who set the hold and offer release / keep (hivecommons/hive#15020). Hold *HoldProvenance + // Gates names the hard merge stops that ride the route as pills + // without choosing its stage: an open sentinel alert, a hold-class + // label (owner rule, hivecommons/hive#17327). The stage is the head's + // real progress; the hive never merges the head while a gate stands, + // and the dashboard's Merge queue cell reads "Held · …" for it. + Gates []string } // Lane-vocabulary reasons RouteHuman emits for the fixing stages. @@ -400,6 +414,61 @@ const decisionConsequenceReason = "the automerge lane will not merge this unatte // RouteHuman decides which stage a lane's "a human must act" resolves to. func RouteHuman(e Evidence) Route { + return withGates(e, routeProgress(e)) +} + +// GateReasons names the hard merge stops on the head that are gates, not +// stages (hivecommons/hive#17327): an open sentinel alert and each +// hold-class label. A hive superseding PR whose sentinel finding a person +// acknowledged (no hard stop) carries no sentinel gate. +func GateReasons(e Evidence) []string { + var gates []string + if e.Sentinel && !(e.HiveSuperseder && strings.TrimSpace(e.HiveSupersederHardStop) == "") { + gates = append(gates, "a sentinel alert is open on this PR") + } + for _, h := range e.Holds { + if h == "hold" && e.Hold.Clause() != "" { + gates = append(gates, e.Hold.Clause()) + continue + } + gates = append(gates, "the `"+h+"` label is set") + } + return gates +} + +// withGates rides the sentinel / hold gates on the progress route: they +// are appended to Reasons so the entry comment and the decision popover +// still say why the hive will not merge, recorded in Gates so the +// dashboard can draw the held pill, and never change the Stage. A hive +// superseding PR's own hard stop already names them in its 085 route. +func withGates(e Evidence, r Route) Route { + if e.HiveSuperseder && strings.TrimSpace(e.HiveSupersederHardStop) != "" { + return r + } + gates := GateReasons(e) + if len(gates) == 0 { + return r + } + r.Gates = gates + if r.Hold == nil { + r.Hold = e.Hold + } + if r.Stage == NeedsAuthor || r.Stage == ReturnedToContributor || r.Stage == Fixing { + // The author's instruction is the whole 07x reason; the gate is a + // person's to lift and rides the route as Gates alone. + return r + } + for _, g := range gates { + if !slices.Contains(r.Reasons, g) { + r.Reasons = append(r.Reasons, g) + } + } + return r +} + +// routeProgress is RouteHuman without the gates: the stage the head's own +// evidence supports (verdict, checks, DCO, conflict, lane rule, trust). +func routeProgress(e Evidence) Route { fixing := FixingStageFor(e.SelfAuthored, e.AuthorKind) summary := summarize(e) var fix []string @@ -524,18 +593,9 @@ func RouteHuman(e Evidence) Route { } } } - if e.Sentinel && !(e.HiveSuperseder && strings.TrimSpace(e.HiveSupersederHardStop) == "") { - // A hive superseding PR with no hard-stop has an acknowledged - // sentinel finding: the person already ruled on it. - decide = append(decide, "a sentinel alert is open on this PR") - } - for _, h := range e.Holds { - if h == "hold" && e.Hold.Clause() != "" { - decide = append(decide, e.Hold.Clause()) - continue - } - decide = append(decide, "the `"+h+"` label is set") - } + // A sentinel alert or a hold-class label is a gate, not a stage + // (hivecommons/hive#17327): withGates rides it on whatever stage the + // head's progress earns, and the lanes refuse the merge on the label. manualMergeApproved := e.Cause == CauseDecision && e.ManualMergeRule && approver != "" && strings.TrimSpace(e.CauseReason) != "" && len(decide) == 0 if e.Cause == CauseDecision && strings.TrimSpace(e.CauseReason) != "" && !manualMergeApproved { decide = append(decide, e.CauseReason) @@ -729,17 +789,32 @@ func ReadyComment(r Route, blockedBy string) string { b.WriteString("\nReady for a human merge: ") b.WriteString(r.Summary) b.WriteString(".") + held := func() { + // A gated head (hivecommons/hive#17327): the stage is its real + // progress, but the hive never merges it while the gate stands. + b.WriteString(" Held: ") + b.WriteString(strings.Join(r.Gates, "; ")) + b.WriteString(". The hive never merges this head while the gate stands.") + } if r.ManualMerge { for _, reason := range r.Reasons { - if reason = strings.TrimSpace(reason); reason != "" { + if reason = strings.TrimSpace(reason); reason != "" && !slices.Contains(r.Gates, reason) { b.WriteString(" ") b.WriteString(strings.ToUpper(reason[:1]) + reason[1:]) b.WriteString(".") } } + if len(r.Gates) > 0 { + held() + } b.WriteString("\n\nThe hive never merges this lane's changes itself: click **Merge** (or `/lgtm` + `/approve` for tide) to land it.") return b.String() } + if len(r.Gates) > 0 { + held() + b.WriteString("\n\nConfirm the intent (resolve the sentinel alert or lift the hold), then `/lgtm` `/approve` (or merge) if you accept it.") + return b.String() + } if blockedBy = strings.TrimSpace(blockedBy); blockedBy != "" { b.WriteString(" Blocked only by ") b.WriteString(blockedBy) @@ -840,13 +915,14 @@ func DecisionActions(r Route) string { // HumanAuthorOwesAnswer reports whether a requires_human verdict on a PR a // person pushed themselves routes to the author (071) rather than to a // decision (085): the author is human and not this hive, no trusted merger -// has approved the head, and nothing else — sentinel, hold label, fork -// guard, a human-only lane rule — asks a maintainer for a decision. +// has approved the head, and nothing else — a fork guard, a human-only +// lane rule — asks a maintainer for a decision. A sentinel alert or a hold +// label is a gate riding the route, not a decision (hivecommons/hive#17327). func HumanAuthorOwesAnswer(e Evidence) bool { if e.SelfAuthored || e.AuthorKind != authorkind.Human || e.Verdict != VerdictRequiresHuman { return false } - if strings.TrimSpace(e.HumanApprover) != "" || e.Sentinel || len(e.Holds) > 0 || len(e.ForkGuard) > 0 { + if strings.TrimSpace(e.HumanApprover) != "" || len(e.ForkGuard) > 0 { return false } return e.Cause != CauseDecision || strings.TrimSpace(e.CauseReason) == "" || IsDecisionRequestedReason(e.CauseReason) diff --git a/src/pkg/stagelabels/human_test.go b/src/pkg/stagelabels/human_test.go index 0f3666bcdc..3feed84803 100644 --- a/src/pkg/stagelabels/human_test.go +++ b/src/pkg/stagelabels/human_test.go @@ -141,9 +141,12 @@ func TestRouteHumanPendingStaysAtReview(t *testing.T) { } } -// TestRouteHumanDecision: sentinel, hold-class labels, no reviewer, or a -// non-trust human-only lane rule → 085 naming the decision owed. -func TestRouteHumanDecision(t *testing.T) { +// TestRouteHumanGates: a sentinel alert or a hold-class label is a gate, +// not a stage (hivecommons/hive#17327). A green, reviewed head keeps 090 +// with the gate in Reasons and Gates so the entry comment and the +// decision popover still explain the stop; the lanes refuse the merge on +// the label itself. +func TestRouteHumanGates(t *testing.T) { cases := []struct { name string mutate func(*Evidence) @@ -153,6 +156,62 @@ func TestRouteHumanDecision(t *testing.T) { {"hold", func(e *Evidence) { e.Holds = Holds([]string{"Hold", "kind/bug"}) }, "the `hold` label is set"}, {"do-not-merge family", func(e *Evidence) { e.Holds = Holds([]string{"do-not-merge/work-in-progress"}) }, "the `do-not-merge/work-in-progress` label is set"}, {"needs-decision", func(e *Evidence) { e.Holds = Holds([]string{"needs-decision"}) }, "the `needs-decision` label is set"}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + e := readyEvidence() + tc.mutate(&e) + r := RouteHuman(e) + if r.Stage != ReadyForHumanMerge || !containsString(r.Reasons, tc.want) || !containsString(r.Gates, tc.want) { + t.Fatalf("route = %+v", r) + } + got := ReadyComment(r, "`role/newcomer`") + if !strings.Contains(got, "Held: "+tc.want+". The hive never merges this head while the gate stands.") || strings.Contains(got, "Blocked only by") { + t.Fatalf("ReadyComment = %q", got) + } + // The gate rides every stage: CI pending keeps 060, no verdict + // keeps 050, a changes_requested verdict goes back to the author + // without the gate in the author's instruction. + pending := e + pending.Checks = CheckSummary{Total: 55, Green: 54, Pending: 1, Known: true} + if r := RouteHuman(pending); r.Stage != Reviewed || !containsString(r.Reasons, tc.want) { + t.Fatalf("pending route = %+v", r) + } + fresh := e + fresh.Verdict = VerdictPending + if r := RouteHuman(fresh); r.Stage != ReviewPending || !containsString(r.Reasons, tc.want) { + t.Fatalf("fresh route = %+v", r) + } + red := e + red.Verdict = VerdictChangesRequested + if r := RouteHuman(red); r.Stage != NeedsAuthor || containsString(r.Reasons, tc.want) || !containsString(r.Gates, tc.want) { + t.Fatalf("changes_requested route = %+v", r) + } + }) + } + e := readyEvidence() + e.Sentinel = true + e.Holds = []string{"hold"} + r := RouteHuman(e) + if len(r.Gates) != 2 || !strings.Contains(ReadyComment(r, ""), "Held: a sentinel alert is open on this PR; the `hold` label is set.") { + t.Fatalf("multi-gate route = %+v / %q", r, ReadyComment(r, "")) + } + // A hive superseding PR's own hard stop already names the gate at 085. + hs := readyEvidence() + hs.Sentinel, hs.HiveSuperseder, hs.HiveSupersederHardStop = true, true, HiveSupersederHardStopSentinel + if r := RouteHuman(hs); r.Stage != NeedsDecision || len(r.Gates) != 0 { + t.Fatalf("hard-stop route = %+v", r) + } +} + +// TestRouteHumanDecision: no reviewer, a requires_human verdict, or a +// non-trust human-only lane rule → 085 naming the decision owed. +func TestRouteHumanDecision(t *testing.T) { + cases := []struct { + name string + mutate func(*Evidence) + want string + }{ {"no reviewer", func(e *Evidence) { e.Verdict = VerdictUnavailable }, "no reviewer agent is configured, so this head will never get a swarm verdict"}, {"requires_human", func(e *Evidence) { e.Verdict = VerdictRequiresHuman }, "the reviewer swarm returned `requires_human` @abc1234"}, {"requires_human question", func(e *Evidence) { @@ -186,7 +245,7 @@ func TestRouteHumanDecision(t *testing.T) { }) } e := readyEvidence() - e.Sentinel = true + e.Verdict = VerdictUnavailable e.Holds = []string{"hold"} r := RouteHuman(e) if len(r.Reasons) != 2 || !strings.Contains(DecisionComment(r), "\n- the `hold` label is set\n") { @@ -254,13 +313,16 @@ func TestRouteHumanApproved(t *testing.T) { wantReason: "the reviewer swarm returned `requires_human` @abc1234", }, { + // The gate rides the approved manual-merge route as a pill + // (hivecommons/hive#17327); the merge click still waits on it. name: "approved but the sentinel label is still on", mutate: func(e *Evidence) { e.Verdict, e.HumanApprover, e.Sentinel = VerdictRequiresHuman, "octocat", true manual(e) }, - wantStage: NeedsDecision, - wantReason: "a sentinel alert is open on this PR", + wantStage: ReadyForHumanMerge, wantManual: true, + wantLaneReason: "contributor-lane:workflow-path" + HumanApprovedReasonSuffix + "octocat", + wantReason: "a sentinel alert is open on this PR", }, { name: "approved but a hold label is set", @@ -268,8 +330,9 @@ func TestRouteHumanApproved(t *testing.T) { e.HumanApprover, e.Holds = "octocat", Holds([]string{"hold"}) manual(e) }, - wantStage: NeedsDecision, - wantReason: "the `hold` label is set", + wantStage: ReadyForHumanMerge, wantManual: true, + wantLaneReason: "contributor-lane:workflow-path" + HumanApprovedReasonSuffix + "octocat", + wantReason: "the `hold` label is set", }, { name: "approved but no reviewer configured", @@ -618,8 +681,8 @@ func TestRouteHumanAuthorOwesAnswer(t *testing.T) { {"clanker author keeps 085", func(e *Evidence) { e.AuthorKind = authorkind.Clanker }, NeedsDecision, "", "the reviewer swarm returned `requires_human` @abc1234"}, {"hive author keeps 085", func(e *Evidence) { e.AuthorKind = authorkind.Hive }, NeedsDecision, "", "the reviewer swarm returned `requires_human` @abc1234"}, {"self-authored keeps 085", func(e *Evidence) { e.SelfAuthored = true }, NeedsDecision, "", "the reviewer swarm returned `requires_human` @abc1234"}, - {"hold keeps 085", func(e *Evidence) { e.Holds = Holds([]string{"hold"}) }, NeedsDecision, "", "the `hold` label is set"}, - {"sentinel keeps 085", func(e *Evidence) { e.Sentinel = true }, NeedsDecision, "", "a sentinel alert is open on this PR"}, + {"hold rides the author route as a gate", func(e *Evidence) { e.Holds = Holds([]string{"hold"}) }, NeedsAuthor, LaneReasonReviewerQuestion, "reviewer question: @clubanderson should this land before the freeze?"}, + {"sentinel rides the author route as a gate", func(e *Evidence) { e.Sentinel = true }, NeedsAuthor, LaneReasonReviewerQuestion, "reviewer question: @clubanderson should this land before the freeze?"}, {"lane rule keeps 085", func(e *Evidence) { e.CauseReason = "the lane excludes `workflow-paths` edits" }, NeedsDecision, "", "the lane excludes `workflow-paths` edits"}, } for _, tc := range cases { From 3093c39ce710b439b913ae22e0d71944807b58eb Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 02:26:45 +0000 Subject: [PATCH 022/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.207.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.207.3 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 8 ++++++++ changelog.d/fixed-recent-merges-popover-width.md | 1 - changelog.d/fixed-shared-pr-secondary-row-lane.md | 1 - changelog.d/fixed-watchdog-login-flash-relaunch.md | 1 - 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/fixed-recent-merges-popover-width.md delete mode 100644 changelog.d/fixed-shared-pr-secondary-row-lane.md delete mode 100644 changelog.d/fixed-watchdog-login-flash-relaunch.md diff --git a/CHANGELOG.md b/CHANGELOG.md index e5b77debbb..5fda5ae766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,14 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.207.3) + +### Fixed + +- dashboard: the Recent merges popover is 52rem wide (was capped at 34rem) so PR titles read instead of ellipsising; it stays right-anchored under the Merged pill, capped to the viewport and its bar, and the phone full-width sheet is unchanged. +- Activity Monitor: a secondary issue that shares a PR with another issue (its row shows the compact "↳ #PR · under #primary" chip) now lights the PR's lane — CI / Review, Merge queue (soaking), Merged — like the primary row, instead of wearing the PR's stage word in the "PR in progress" lane (hivecommons/hive#17324). +- Watchdog no longer pages `PaneShowsLogin` for the sub-second login flash a relaunched Copilot CLI paints while re-validating its token: boot grace is now dated from the most recent CLI (re)launch, and login chrome must persist for `governor.watchdog.liveness.login_streak` consecutive polls (default 3) before `auth-required` is raised. + ## 2026-11-09 (v5.207.2) ### Fixed diff --git a/changelog.d/fixed-recent-merges-popover-width.md b/changelog.d/fixed-recent-merges-popover-width.md deleted file mode 100644 index 668e034156..0000000000 --- a/changelog.d/fixed-recent-merges-popover-width.md +++ /dev/null @@ -1 +0,0 @@ -- dashboard: the Recent merges popover is 52rem wide (was capped at 34rem) so PR titles read instead of ellipsising; it stays right-anchored under the Merged pill, capped to the viewport and its bar, and the phone full-width sheet is unchanged. diff --git a/changelog.d/fixed-shared-pr-secondary-row-lane.md b/changelog.d/fixed-shared-pr-secondary-row-lane.md deleted file mode 100644 index 746c05682c..0000000000 --- a/changelog.d/fixed-shared-pr-secondary-row-lane.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: a secondary issue that shares a PR with another issue (its row shows the compact "↳ #PR · under #primary" chip) now lights the PR's lane — CI / Review, Merge queue (soaking), Merged — like the primary row, instead of wearing the PR's stage word in the "PR in progress" lane (hivecommons/hive#17324). diff --git a/changelog.d/fixed-watchdog-login-flash-relaunch.md b/changelog.d/fixed-watchdog-login-flash-relaunch.md deleted file mode 100644 index f0b5abdb99..0000000000 --- a/changelog.d/fixed-watchdog-login-flash-relaunch.md +++ /dev/null @@ -1 +0,0 @@ -- Watchdog no longer pages `PaneShowsLogin` for the sub-second login flash a relaunched Copilot CLI paints while re-validating its token: boot grace is now dated from the most recent CLI (re)launch, and login chrome must persist for `governor.watchdog.liveness.login_streak` consecutive polls (default 3) before `auth-required` is raised. From a94ef95f8d339bf361fa9b552c5f0b1e513b568e Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Sun, 8 Nov 2026 21:30:53 -0500 Subject: [PATCH 023/123] =?UTF-8?q?=E2=9C=A8=20Activity=20Monitor:=20share?= =?UTF-8?q?d-PR=20issues=20group=20under=20their=20primary=20row=20(#17333?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ Activity Monitor: shared-PR issues group under their primary row The issues one PR closes together are one group of the list: a secondary issue's row always follows its primary (whatever the lead sort or a train put between them; the group takes the primary's place), draws as an indented child on a rail, and is rebound to the primary's own listing of the PR so both chevron strips light from the same snapshot. The primary's "also closes" pill carries a caret that folds the secondaries, remembered in localStorage under hive.tracker.shared.collapsed. A secondary whose primary is not a row of the list stays standalone as before. Fixes #17332 Signed-off-by: Andrew Anderson * ✨ Guard the shared-PR grouping for harnesses that lift renderStageTracker alone Signed-off-by: Andrew Anderson * ✨ Guard the shared-PR fold loader; keep the cues CSS scan clean Signed-off-by: Andrew Anderson --------- Signed-off-by: Andrew Anderson --- changelog.d/changed-shared-pr-group.md | 1 + .../dashboard-sections/activity-monitor.md | 2 + .../stage_tracker_shared_pr_group_test.go | 170 ++++++++++++++++ src/pkg/dashboard/static-src/css/tracker.css | 16 ++ .../static-src/js/tracker-filter-render.js | 12 +- .../static-src/js/tracker-filter-state.js | 24 +++ .../static-src/js/tracker-row-layout.js | 21 +- .../static-src/js/tracker-row-render.js | 24 ++- .../static-src/js/tracker-words-core.js | 83 ++++++++ .../static-src/js/tracker-words-stage.js | 4 + src/pkg/dashboard/static/index.html | 184 +++++++++++++++++- 11 files changed, 525 insertions(+), 16 deletions(-) create mode 100644 changelog.d/changed-shared-pr-group.md create mode 100644 src/pkg/dashboard/stage_tracker_shared_pr_group_test.go diff --git a/changelog.d/changed-shared-pr-group.md b/changelog.d/changed-shared-pr-group.md new file mode 100644 index 0000000000..8bd42049fb --- /dev/null +++ b/changelog.d/changed-shared-pr-group.md @@ -0,0 +1 @@ +- Activity Monitor: the issues one PR closes together are now one group of the list — the secondary rows sit right after their primary (indented on a rail), render from the primary's own PR snapshot, and fold under a caret on the primary's "also closes" pill (remembered in localStorage). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 97da5e0bc8..a2f36fe588 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -536,6 +536,8 @@ Payloads without `drawn_under` draw as before. The link reads both ways (hivecommons/hive#15806): the entry drawn under #A carries `also_closes` — the other listed open issues the PR closes (number, title, url) — and the PR's line wears a gray **also closes #B** pill beside the PR link, in the lineage-pill style (comma-separated for several, three numbers then **+N**, every number linking to its issue; tooltip: *this PR also resolves #B (title)*). The "↳ … under …" listing never carries it. +The issues one PR closes are one group of the list. A secondary issue's row always sits right after its primary (#A, then #B — whatever the lead sort or a merge train would have put between them; the group takes the primary's place in the order, several secondaries keep their lead order among themselves), indented as a child on a thin rail from the primary's pill to the last child's elbow. Both rows are built from the primary's own listing of the PR — the secondary's copy is replaced by that object before the rows render — so the two chevron strips can never light different stages. The **also closes** pill on the primary carries a caret (▾/▸) that folds and unfolds the secondaries' rows (the folded pill reads **+N**; folded rows still count in the total), remembered per primary in `localStorage` under `hive.tracker.shared.collapsed`. A secondary whose primary is not a row of the current list (filtered out, or on another page) stands alone exactly as before, with its **↳ #N · under #M** chip. + #### Merged (the chip, the ledger, the flight) A thin bar at the top of the tracker — it stays pinned under the card header while the list scrolls, with the stage column header strip pinned just below it — carries the dashboard's bee glyph (the version card's bee, in a 28 px hit area; the pill is no taller than the chips beside it) with **Merged** and the all-time count drawn as a **quiet odometer at rest, always** — one shallow inset track with a hairline border and faint dividers, a wheel per digit, tabular semibold digits at the chip's own type size, no thousands separator (#15543: the first drum's 18 px bevelled cells were "too big of font … the animation is perfect though" — the roll is unchanged) — every pull request the hive tracked that reached merged, *all time*, with *N today · N this week* beside it at the bar's usual size. The number is the server's, not the tab's: the hive keeps a **merged ledger** at `/data/merged-ledger.json` (entries for 90 days, an all-time total that only grows, atomic writes, seeded on first boot from the audit log's `pr_merged` history with the PR throughput counter as the floor, then backfilled by the first closed sweep, which on such a boot asks GitHub for every PR closed in the last 30 days — merges by people and other bots the audit log never saw — instead of its usual one day; so the ledger counts every merged PR in a configured repository, and its all-time number is expected to run above the hive-observed PR throughput counter it was seeded from) fed by the audit log's `pr_merged` lines — the hive's own merges on every path and the poller's observations of merges by people or other bots — and by webhook / closed-sweep snapshots of a PR GitHub reports merged, which carry the title and the merger's login within seconds. diff --git a/src/pkg/dashboard/stage_tracker_shared_pr_group_test.go b/src/pkg/dashboard/stage_tracker_shared_pr_group_test.go new file mode 100644 index 0000000000..13bf513d8f --- /dev/null +++ b/src/pkg/dashboard/stage_tracker_shared_pr_group_test.go @@ -0,0 +1,170 @@ +package dashboard + +import ( + "strings" + "testing" +) + +// TestStageTrackerSharedPRGroupJS: the rows of issues one PR closes together +// are one unit of the list — the secondary sits right after its primary +// whatever the lead sort put between them, draws as its child, is built from +// the primary's own PR snapshot, and folds under the primary's "also closes" +// pill (remembered in localStorage). A secondary whose primary is not a row +// of this list stays standalone, as before. +func TestStageTrackerSharedPRGroupJS(t *testing.T) { + html := indexHTML(t) + runStageTrackerRowActionsScript(t, stageTrackerRowsPreludeJS(t, html)+"\n"+strings.Join([]string{ + jsFunc(t, html, "stageTrackerLinkedSupersededText"), + jsFunc(t, html, "stageTrackerSharedPRParent"), + jsFunc(t, html, "stageTrackerSharedPRGroups"), + jsFunc(t, html, "stageTrackerSharedPRRebind"), + jsFunc(t, html, "stageTrackerSharedPRContiguous"), + jsConstLine(t, html, "STAGE_TRACKER_SHARED_COLLAPSED_KEY"), + jsFunc(t, html, "stageTrackerLoadSharedCollapsed"), + jsFunc(t, html, "stageTrackerSaveSharedCollapsed"), + jsFunc(t, html, "stageTrackerToggleCollapsed"), + }, "\n")+"\n"+stageTrackerActorIconJS(t, html)+stageTrackerRowsFixtureJS+` +const since = new Date(now - 3600000).toISOString(); +const lit = (html) => (/
  • ]*data-ham-stage="(\d+)"/.exec(strip(html)) || [])[1] || (/
  • ]*title="([^"]*)"/.exec(strip(html)) || [])[1] || ''; +const li = (n) => ({ number: n, title: 'Issue ' + n, url: 'https://x/issues/' + n }); +const pr = (n, under, extra) => Object.assign({ number: n, title: 'fix', url: 'https://x/' + n, author: 'hive-bot', author_kind: 'hive', stage: 95, stage_since: since, drawn_under: under, merge_gate: { state: 'soaking' } }, extra || {}); +const issue = (n, prs, extra) => Object.assign({ repo: 'hivecommons/hive', number: n, kind: 'issue', title: 'Issue ' + n, url: 'https://x/issues/' + n, stage: 40, stage_since: since, linked_prs: prs || [] }, extra || {}); +const nums = (rows) => rows.map(r => r.number); + +// The live board: #17292 (primary, PR #17308 also closes #17302) at the top, +// an unrelated #17329 between, #17302 (secondary) third. +const primary = issue(17292, [pr(17308, 17292, { also_closes: [li(17302)] })]); +const between = issue(17329, [], { stage: 30 }); +// The secondary's copy of the PR is a different object from an older tick. +const secondary = issue(17302, [pr(17308, 17292, { stage: 50, merge_gate: null, stage_since: new Date(now - 7200000).toISOString() })]); + +// Groups: the secondary belongs to the primary, by row key. +let g = stageTrackerSharedPRGroups([primary, between, secondary], stages); +assert.deepStrictEqual(g.parentOf, { 'hivecommons/hive/issue#17302': 'hivecommons/hive/issue#17292' }); +assert.deepStrictEqual(g.children, { 'hivecommons/hive/issue#17292': ['hivecommons/hive/issue#17302'] }); +assert.deepStrictEqual(g.prs, { 'hivecommons/hive/issue#17292': { 17308: true } }); + +// Adjacency: the secondary follows its primary; the unrelated row moves down. +let rows = stageTrackerSharedPRContiguous([primary, between, secondary], stages, {}); +assert.deepStrictEqual(nums(rows), [17292, 17302, 17329], 'secondary right after its primary'); +// The group sorts by the primary: a secondary ahead of its primary comes down to it. +rows = stageTrackerSharedPRContiguous([secondary, between, primary], stages, {}); +assert.deepStrictEqual(nums(rows), [17329, 17292, 17302], 'group takes the primary\'s place'); +// Several secondaries keep their lead order among themselves. +const third = issue(17310, [pr(17308, 17292, { stage: 50 })]); +const wide = issue(17292, [pr(17308, 17292, { also_closes: [li(17302), li(17310)] })]); +rows = stageTrackerSharedPRContiguous([third, between, wide, secondary], stages, {}); +assert.deepStrictEqual(nums(rows), [17329, 17292, 17310, 17302]); +// Nothing to group → the very same array. +const plain = [between, issue(1, [pr(2, 1)])]; +assert.strictEqual(stageTrackerSharedPRContiguous(plain, stages, {}), plain); + +// Same snapshot: the secondary's listing of the PR becomes the primary's own +// entry (drawn_under kept, also_closes dropped) — stage 95 soaking, not the +// stale 50 — so both chevron strips light the same segment. +let sec = rows[3]; +assert.strictEqual(sec.number, 17302); +assert.strictEqual(sec.linked_prs[0].stage, 95, 'rebound to the primary\'s PR snapshot'); +assert.deepStrictEqual(sec.linked_prs[0].merge_gate, { state: 'soaking' }); +assert.strictEqual(sec.linked_prs[0].drawn_under, 17292); +assert.strictEqual(sec.linked_prs[0].also_closes, null, 'the pill stays on the primary alone'); +assert.strictEqual(secondary.linked_prs[0].stage, 50, 'the server payload is not mutated'); +assert.notStrictEqual(sec, secondary, 'the row is a copy'); +g = stageTrackerSharedPRGroups(rows, stages); +const ctxG = Object.assign({}, ctx, { shared: Object.assign(g, { collapsed: {} }) }); +const headRow = stageTrackerRowHtml(rows[1], stages, ctxG); +const childRow = stageTrackerRowHtml(sec, stages, ctxG); +assert.strictEqual(lit(childRow), lit(headRow), 'both strips light from the same PR state: ' + lit(headRow) + ' vs ' + lit(childRow)); +assert.notStrictEqual(lit(childRow), lit(stageTrackerRowHtml(secondary, stages, ctx)), 'the stale copy would have lit elsewhere'); + +// Visual: the primary heads the group, each secondary is a child; the last wears ham-shared-last. +assert.ok(/
    = 0, 'the primary wears the group pill: ' + headRow); +const pill = headRow.slice(pi, headRow.indexOf('', pi) + ''.length); +const pillTitle = (/ title="([^"]*)"/.exec(pill) || [])[1] || ''; +assert.ok(pill.includes('data-action="hamSharedToggle" data-arg0="hivecommons/hive/issue#17292" data-stop="1" aria-expanded="true"'), pill); +assert.ok(pill.includes('aria-label="Fold 2 issue rows this PR also closes"'), pill); +assert.ok(pill.includes('▾') && text(pill).includes('also closes #17302, #17310'), text(pill)); +assert.ok(pillTitle.includes('2 issue rows drawn under this row'), pillTitle); +assert.ok(!pill.slice(0, pill.indexOf('')).includes('+2'), foldedRow); +assert.ok(!/
    also closes #17302'); +assert.strictEqual(stageTrackerAlsoClosesChipHtml(pr(17308, 17292, { also_closes: [li(17302)] }), { key: 'k', count: 0 }), stageTrackerAlsoClosesChipHtml(pr(17308, 17292, { also_closes: [li(17302)] })), 'an empty group is no group'); +const one = stageTrackerAlsoClosesChipHtml(pr(17308, 17292, { also_closes: [li(17302)] }), { key: 'k', count: 1, collapsed: true }); +assert.ok(one.includes('aria-label="Show 1 issue row this PR also closes"'), one); + +// The fold persists under hive.tracker.shared.collapsed, like the repo groups. +const store = {}; +global.localStorage = { getItem: k => (k in store ? store[k] : null), setItem(k, v) { store[k] = String(v); } }; +assert.deepStrictEqual(stageTrackerLoadSharedCollapsed(), {}); +let c = stageTrackerToggleCollapsed({}, 'hivecommons/hive/issue#17292'); +stageTrackerSaveSharedCollapsed(c); +assert.strictEqual(store[STAGE_TRACKER_SHARED_COLLAPSED_KEY], '{"hivecommons/hive/issue#17292":true}'); +assert.strictEqual(STAGE_TRACKER_SHARED_COLLAPSED_KEY, 'hive.tracker.shared.collapsed'); +assert.deepStrictEqual(stageTrackerLoadSharedCollapsed(), { 'hivecommons/hive/issue#17292': true }, 'round-trips'); +store[STAGE_TRACKER_SHARED_COLLAPSED_KEY] = '[1]'; +assert.deepStrictEqual(stageTrackerLoadSharedCollapsed(), {}, 'a malformed value is empty'); +`) +} + +// TestStageTrackerSharedPRGroupWiring: the render applies the grouping after +// the lead sort, hands the groups to the rows, counts folded rows in the +// total, the caret's handler and CSS are in the page, and the CSS is tokens only. +func TestStageTrackerSharedPRGroupWiring(t *testing.T) { + html := indexHTML(t) + for _, want := range []string{ + `ctx.shared = sharing ? Object.assign(stageTrackerSharedPRGroups(prepared, stages), { collapsed: _stageTrackerSharedCollapsed }) : null;`, + `const ordered = sharing ? stageTrackerSharedPRContiguous(prepared, stages, _stageTrackerSharedCollapsed) : prepared;`, + `if (foldedShared > 0) page.total += foldedShared;`, + `if (typeof stageTrackerLoadSharedCollapsed === 'function') _stageTrackerSharedCollapsed = stageTrackerLoadSharedCollapsed();`, + `function hamSharedToggle(key) {`, + `.ham-row.ham-shared-child {`, `.ham-row.ham-shared-head::before {`, `.ham-shared-toggle {`, + } { + if !strings.Contains(html, want) { + t.Errorf("index.html lacks %q", want) + } + } + start := strings.Index(html, ".ham-row.ham-shared-child {") + end := strings.Index(html[start:], ".ham-shared-count {") + if start < 0 || end < 0 { + t.Fatal("shared-PR group CSS block not found") + } + block := html[start : start+end] + for _, bad := range []string{"#", "rgb(", "hsl("} { + if strings.Contains(block, bad) { + t.Errorf("shared-PR group CSS uses a literal colour (%q); tokens only", bad) + } + } +} diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index 144ba91f3f..a3090109ea 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -615,6 +615,22 @@ .ham-also-closes { color: var(--muted); } .ham-also-closes a { color: inherit; text-decoration: none; } .ham-also-closes a:hover { color: var(--text); text-decoration: underline; } + /* Shared-PR group (one PR closing several listed issues): the secondary + issues a PR also closes sit right under their primary, indented, on + a rail that runs from the primary's pill to the last child's elbow. + The primary's "also closes" pill carries the fold caret. Tokens only. */ + .ham-row.ham-shared-child { position: relative; padding-left: var(--sp-6); } + .ham-row.ham-shared-child::before { content: ''; position: absolute; left: var(--sp-3); top: 0; bottom: 0; border-left: var(--line-width) solid var(--line-strong); pointer-events: none; } + .ham-row.ham-shared-child.ham-shared-last::before { bottom: 50%; } + .ham-row.ham-shared-child::after { content: ''; position: absolute; left: var(--sp-3); top: 50%; width: var(--sp-3); border-top: var(--line-width) solid var(--line-strong); pointer-events: none; } + .ham-row.ham-shared-child + .ham-row.ham-shared-child { border-top-color: transparent; } + .ham-row.ham-shared-head + .ham-row.ham-shared-child { border-top-color: transparent; } + .ham-row.ham-shared-head { position: relative; } + .ham-row.ham-shared-head::before { content: ''; position: absolute; left: var(--sp-3); top: 50%; bottom: 0; border-left: var(--line-width) solid var(--line-strong); pointer-events: none; } + .ham-shared-toggle { appearance: none; background: none; border: 0; padding: 0 var(--sp-1) 0 0; margin: 0; font: inherit; color: inherit; cursor: pointer; line-height: 1; vertical-align: baseline; } + .ham-shared-toggle:hover .ham-group-caret, .ham-shared-toggle:focus-visible .ham-group-caret { color: var(--text); } + .ham-shared-toggle:focus-visible { outline: var(--line-width) solid var(--line-strong); outline-offset: 1px; border-radius: var(--r-sm); } + .ham-shared-count { color: var(--text); } .ham-plan-body, .ham-plan-note { white-space: pre-wrap; } .ham-plan-note { color: var(--muted); font-size: var(--fs-xs); } .ham-seg.active .cue-acting-cap { margin-left: var(--sp-2); } diff --git a/src/pkg/dashboard/static-src/js/tracker-filter-render.js b/src/pkg/dashboard/static-src/js/tracker-filter-render.js index e506479ba8..fee4a2adfc 100644 --- a/src/pkg/dashboard/static-src/js/tracker-filter-render.js +++ b/src/pkg/dashboard/static-src/js/tracker-filter-render.js @@ -96,7 +96,15 @@ if (stageTrackerRepoChipOn(stageTrackerRepoChipSetting(), repos.length)) ctx.repoChips = { primary: stageTrackerPrimaryRepo(), active: f.repo }; const visible = stageTrackerVisible(d.items, f, ctx); const sorted = stageTrackerTrainContiguous(stageTrackerSort(visible, stages, f, { phone: stageTrackerPhone() })); - const ordered = typeof stageTrackerPreparationOrderRows === 'function' ? stageTrackerPreparationOrderRows(d, sorted, stages) : sorted; + const prepared = typeof stageTrackerPreparationOrderRows === 'function' ? stageTrackerPreparationOrderRows(d, sorted, stages) : sorted; + // Shared-PR groups last, so a secondary issue always sits right after + // its primary whatever the lead sort or train put between them; the + // groups a viewer folded leave their secondaries out of the list. + // Guarded: test harnesses lift renderStageTracker without tracker-words-core. + const sharing = typeof stageTrackerSharedPRContiguous === 'function'; + ctx.shared = sharing ? Object.assign(stageTrackerSharedPRGroups(prepared, stages), { collapsed: _stageTrackerSharedCollapsed }) : null; + const ordered = sharing ? stageTrackerSharedPRContiguous(prepared, stages, _stageTrackerSharedCollapsed) : prepared; + const foldedShared = prepared.length - ordered.length; // A TV display (display=1&density=tv) shows the rows that fit the // screen, ungrouped, with "+N more" in place of the pager. const tv = typeof stageTrackerDisplayTv === 'function' && stageTrackerDisplayTv(); @@ -107,6 +115,8 @@ ? stageTrackerGroupPage(stageTrackerGroups(ordered, { primary: stageTrackerPrimaryRepo(), collapsed: _stageTrackerCollapsed, stages }), f) : stageTrackerPage(ordered, f); if (!tv && page.page !== f.page) f.page = page.page; + // A folded secondary is not filtered out: it counts toward the total. + if (foldedShared > 0) page.total += foldedShared; // The rows this render draws (this page, group headers aside), for // stageTrackerPRListedOwnRow: a covered issue defers to its PR's row // only when that row is actually on screen. Kept beside the payload, diff --git a/src/pkg/dashboard/static-src/js/tracker-filter-state.js b/src/pkg/dashboard/static-src/js/tracker-filter-state.js index 71f5622b39..778ebba2fe 100644 --- a/src/pkg/dashboard/static-src/js/tracker-filter-state.js +++ b/src/pkg/dashboard/static-src/js/tracker-filter-state.js @@ -171,9 +171,26 @@ if (out[repo]) delete out[repo]; else out[repo] = true; return out; } + // The shared-PR groups a viewer folded (hive.tracker.shared.collapsed): + // { 'owner/repo/issue#M': true } by the primary row's key, same shape + // and lifecycle as the per-repo collapsed set. + function stageTrackerLoadSharedCollapsed() { + try { + const o = JSON.parse(localStorage.getItem(STAGE_TRACKER_SHARED_COLLAPSED_KEY) || '{}'); + if (!o || typeof o !== 'object' || Array.isArray(o)) return {}; + const out = {}; + for (const k of Object.keys(o)) if (o[k]) out[k] = true; + return out; + } catch { return {}; } + } + function stageTrackerSaveSharedCollapsed(c) { + try { localStorage.setItem(STAGE_TRACKER_SHARED_COLLAPSED_KEY, JSON.stringify(c || {})); } catch {} + } function stageTrackerLoadGrouping() { _stageTrackerGroup = stageTrackerGroupSetting(); _stageTrackerCollapsed = stageTrackerLoadCollapsed(); + // Guarded: harnesses lift this function without the shared-PR fold. + if (typeof stageTrackerLoadSharedCollapsed === 'function') _stageTrackerSharedCollapsed = stageTrackerLoadSharedCollapsed(); } function stageTrackerPrimaryRepo() { return (typeof window !== 'undefined' && window._primaryRepo) || ''; } function hamGroup(value) { @@ -187,6 +204,13 @@ stageTrackerSaveCollapsed(_stageTrackerCollapsed); renderStageTracker(); } + // The caret on a primary row's "also closes #N" pill: fold or unfold + // the secondary issues' rows drawn under it (key = the primary's row key). + function hamSharedToggle(key) { + _stageTrackerSharedCollapsed = stageTrackerToggleCollapsed(_stageTrackerSharedCollapsed, key); + stageTrackerSaveSharedCollapsed(_stageTrackerSharedCollapsed); + renderStageTracker(); + } // A row's repo chip: filter to that repo, or back to all when it already is. function hamRepoChip(repo) { hamFilter('repo', _stageTrackerFilter.repo === repo ? '' : repo); } function stageTrackerRepoChipChange(value) { diff --git a/src/pkg/dashboard/static-src/js/tracker-row-layout.js b/src/pkg/dashboard/static-src/js/tracker-row-layout.js index 094fc8bdd7..b373f9add8 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-layout.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-layout.js @@ -188,19 +188,30 @@ // hive#15806) — on the PR drawn here, "also closes #A, #B" naming the // other listed open issues it resolves, every number a link; past // three it reads "#A, #B, #C +N" and the hover names every title. - function stageTrackerAlsoClosesChipHtml(lp) { + // With `group` ({ key, count, collapsed }: the primary row's key and how + // many secondary rows this list draws right under it), the pill is also + // the group's fold: a caret button ahead of the words (▾ expanded, ▸ + // folded; hamSharedToggle(key), remembered in localStorage) — the + // secondaries' rows follow this one (stageTrackerSharedPRContiguous). + function stageTrackerAlsoClosesChipHtml(lp, group) { const list = Array.isArray(lp && lp.also_closes) ? lp.also_closes.filter(li => li && Number(li.number) > 0) : []; if (!list.length) return ''; const shown = list.slice(0, 3); const links = shown.map(li => `#${Number(li.number)}`).join(', '); const more = list.length > shown.length ? ' +' + (list.length - shown.length) : ''; - const tip = 'this PR also resolves ' + list.map(li => '#' + Number(li.number) + (li.title ? ' (' + li.title + ')' : '')).join(', '); - return `also closes ${links}${more}`; + let tip = 'this PR also resolves ' + list.map(li => '#' + Number(li.number) + (li.title ? ' (' + li.title + ')' : '')).join(', '); + if (!group || !(Number(group.count) > 0)) return `also closes ${links}${more}`; + const n = Number(group.count); + const rows = n + (n === 1 ? ' issue row' : ' issue rows'); + tip += group.collapsed ? ' · ' + rows + ' folded under this row; click the caret to show' : ' · ' + rows + ' drawn under this row; click the caret to fold'; + const label = (group.collapsed ? 'Show ' : 'Fold ') + rows + ' this PR also closes'; + return `also closes ${links}${more}${group.collapsed ? ` +${n}` : ''}`; } // Pure: the lineage-style chips of a covering PR drawn under an issue — // its lineage / adopted-from chip, then the also-closes chip; null = none. - function stageTrackerLinkedChipsHtml(lp, lineage) { - const also = typeof stageTrackerAlsoClosesChipHtml === 'function' ? stageTrackerAlsoClosesChipHtml(lp) : ''; + // `group`: see stageTrackerAlsoClosesChipHtml. + function stageTrackerLinkedChipsHtml(lp, lineage, group) { + const also = typeof stageTrackerAlsoClosesChipHtml === 'function' ? stageTrackerAlsoClosesChipHtml(lp, group) : ''; const out = [lineage || '', also].filter(Boolean).join(' '); return out || null; } diff --git a/src/pkg/dashboard/static-src/js/tracker-row-render.js b/src/pkg/dashboard/static-src/js/tracker-row-render.js index 848be5a9e4..1148d03d86 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-render.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-render.js @@ -94,6 +94,26 @@ const isIssue = item.kind === 'issue'; const title = item.title || ''; let prRefs = [], shown = item, range = null, subs = '', subRows = null, prTargetKey = '', basePill = ''; + // Shared-PR group (stageTrackerSharedPRGroups in ctx.shared): the row + // heads a group when secondaries are drawn right under it; it is a + // child when it rides a PR drawn under a row of this list. + let sharedCls = '', sharedUnder = 0, sharedGroup = null; + if (isIssue && ctx.shared) { + const key = stageTrackerItemKey(item); + const kids = ctx.shared.children && ctx.shared.children[key]; + const folded = !!(ctx.shared.collapsed && ctx.shared.collapsed[key]); + if (kids && kids.length) { + sharedGroup = { key, count: kids.length, collapsed: folded }; + if (!folded) sharedCls += ' ham-shared-head'; + } + const parentKey = ctx.shared.parentOf && ctx.shared.parentOf[key]; + if (parentKey) { + sharedCls += ' ham-shared-child'; + const sib = ctx.shared.children[parentKey] || []; + if (sib[sib.length - 1] === key) sharedCls += ' ham-shared-last'; + sharedUnder = Number(String(parentKey).split('#').pop()) || 0; + } + } if (isIssue) { const linked = stageTrackerLinkedSorted(item, stages); // The primary (first-sorted) PR's base; an issue with no PR shows none. @@ -112,7 +132,7 @@ prTargetKey = stageTrackerItemKey(pr); const who = (lp.author_kind || 'hive') + (lp.author ? ' · @' + lp.author : ''); const lineage = (lp.lineage && typeof stageTrackerLineageChipHtml === 'function' ? stageTrackerLineageChipHtml(lp, nowMs) : '') || (typeof stageTrackerAdoptedFromChipHtml === 'function' ? stageTrackerAdoptedFromChipHtml(lp, nowMs) : ''); - prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage) : (lineage || null))]; + prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage, sharedGroup && ctx.shared.prs && ctx.shared.prs[sharedGroup.key] && ctx.shared.prs[sharedGroup.key][Number(lp.number)] ? sharedGroup : null) : (lineage || null))]; } shown = Object.assign({}, item, { via_pr: true, stage: stageTrackerLeadStage(lp), stage_since: lp.stage_since || item.stage_since, modifiers: lp.modifiers || item.modifiers, deferred_modifiers: lp.deferred_modifiers || item.deferred_modifiers || [], caption: lp.caption || item.caption, reason: lp.reason || item.reason, preparation: lp.preparation || null, ci_activity: lp.ci_activity || null, review_activity: lp.review_activity || null, code_activity: lp.code_activity || null, display_column: lp.display_column || 0, @@ -176,7 +196,7 @@ const rowKey = stageTrackerItemKey(item); const humanNote = typeof stageTrackerHumanContextHtml === 'function' ? stageTrackerHumanContextHtml(item, stages, nowMs, subRows, ctx, rowKey) : ''; const noteCtx = humanNote && typeof stageTrackerNoteTakenCtx === 'function' ? stageTrackerNoteTakenCtx(ctx, rowKey) : ctx; - return `
    + return `
    ${stageTrackerRowToolsHtml(item)}
    ${stageTrackerHeadColsHtml(prRefs, leadHtml, stageTrackerActedBadgeHtml(item, nowMs) + stageTrackerChipsHtml(shown) + (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(item, nowMs, subRows) : '') + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(item, hamNotesCtx(item)) : ''), prTargetKey)} diff --git a/src/pkg/dashboard/static-src/js/tracker-words-core.js b/src/pkg/dashboard/static-src/js/tracker-words-core.js index a0389c60ac..49f64ece3e 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words-core.js +++ b/src/pkg/dashboard/static-src/js/tracker-words-core.js @@ -698,6 +698,89 @@ }); return out; } + /* ---- Shared-PR groups (pure; run under node by + stage_tracker_shared_pr_group_test.go) ------------------------------ + A PR that closes several listed issues is drawn once, under its + primary (drawn_under); the other issues ride it from their own rows + (stageTrackerLinkedRiding, hivecommons/hive#17324). Those rows belong + together: #17292 (primary), #17302 (secondary) and PR #17308 are one + flow, yet the lead sort scattered them with an unrelated row between. + The group is one unit of the list — the secondaries sit right after + their primary, in the lead order among themselves, and the group sorts + by the primary — and shares ONE PR snapshot: a secondary's listing of + the PR is replaced by the primary's own entry, so both strips light + from the same object of the same payload tick. A secondary whose + primary is not a row of this list (filtered out, other page) stays a + standalone row exactly as before. */ + // Pure: the primary row a secondary follows — { key, pr } — or null. + // Guarded: harnesses lift this file without stageTrackerLinkedRiding. + function stageTrackerSharedPRParent(it, stages, keys) { + if (!it || it.kind !== 'issue' || typeof stageTrackerLinkedRiding !== 'function') return null; + const lp = stageTrackerLinkedRiding(it, stages); + const under = Number(lp && lp.drawn_under) || 0; + if (!under) return null; + const key = stageTrackerItemKey({ repo: it.repo, kind: 'issue', number: under }); + return keys[key] ? { key, pr: Number(lp.number) || 0 } : null; + } + // Pure: the groups of a row list — { parentOf: { childKey: parentKey }, + // children: { parentKey: [childKey…] }, prs: { parentKey: { prNumber: + // true } } } — children in list order. Only rows of the list count. + function stageTrackerSharedPRGroups(rows, stages) { + rows = Array.isArray(rows) ? rows.filter(Boolean) : []; + const keys = {}; + rows.forEach(it => { if (it.kind === 'issue' && Number(it.number) > 0) keys[stageTrackerItemKey(it)] = it; }); + const out = { parentOf: {}, children: {}, prs: {} }; + rows.forEach(it => { + const p = stageTrackerSharedPRParent(it, stages, keys); + if (!p) return; + const k = stageTrackerItemKey(it); + if (k === p.key) return; + out.parentOf[k] = p.key; + (out.children[p.key] = out.children[p.key] || []).push(k); + (out.prs[p.key] = out.prs[p.key] || {})[p.pr] = true; + }); + return out; + } + // Pure: a secondary row rebound to its primary's listing of the shared + // PR — the same object, drawn_under kept — so the two strips cannot + // disagree. The row itself is copied; the payload stays the server's. + function stageTrackerSharedPRRebind(child, parent, prNumber) { + const own = Array.isArray(parent && parent.linked_prs) ? parent.linked_prs.find(lp => lp && Number(lp.number) === prNumber) : null; + if (!own || !Array.isArray(child.linked_prs)) return child; + const shared = Object.assign({}, own, { drawn_under: Number(parent.number) || 0, also_closes: null }); + return Object.assign({}, child, { linked_prs: child.linked_prs.map(lp => lp && Number(lp.number) === prNumber ? shared : lp) }); + } + // Pure: the list with every shared-PR group contiguous — primary, then + // its secondaries (rebound) — in the primary's place; a group whose + // primary is folded (collapsed[parentKey]) is its primary alone. + function stageTrackerSharedPRContiguous(rows, stages, collapsed) { + rows = Array.isArray(rows) ? rows : []; + const groups = stageTrackerSharedPRGroups(rows, stages); + if (!Object.keys(groups.parentOf).length) return rows; + const byKey = {}; + rows.forEach(it => { if (it) byKey[stageTrackerItemKey(it)] = it; }); + const emitted = {}; + const out = []; + const emit = (it) => { + if (!it) { out.push(it); return; } + const k = stageTrackerItemKey(it); + if (emitted[k]) return; + emitted[k] = true; + out.push(it); + if (collapsed && collapsed[k]) { (groups.children[k] || []).forEach(ck => { emitted[ck] = true; }); return; } + (groups.children[k] || []).forEach(ck => { + const child = byKey[ck]; + if (!child || emitted[ck]) return; + const pr = Number(Object.keys(groups.prs[k] || {}).find(n => Array.isArray(child.linked_prs) && child.linked_prs.some(lp => lp && Number(lp.number) === Number(n) && Number(lp.drawn_under) === Number(it.number)))) || 0; + emit(pr ? stageTrackerSharedPRRebind(child, it, pr) : child); + }); + }; + rows.forEach(it => { if (it && groups.parentOf[stageTrackerItemKey(it)]) return; emit(it); }); + // A secondary whose primary never emitted (a cycle) keeps its own place. + rows.forEach(it => { if (it && !emitted[stageTrackerItemKey(it)]) emit(it); }); + return out; + } + // Pure: the member numbers of a train the page does not show, given the // train's record (ahead + size on the last member tells the whole // queue when the view carries it) and the numbers shown under the diff --git a/src/pkg/dashboard/static-src/js/tracker-words-stage.js b/src/pkg/dashboard/static-src/js/tracker-words-stage.js index 12e3f7f41c..b139ee477a 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words-stage.js +++ b/src/pkg/dashboard/static-src/js/tracker-words-stage.js @@ -99,6 +99,10 @@ const STAGE_TRACKER_GROUP_DIST_STEPS = 4; var _stageTrackerGroup = STAGE_TRACKER_GROUP_DEFAULT; var _stageTrackerCollapsed = {}; + // Shared-PR groups (a PR closing several listed issues): the secondary + // issues' rows collapsed under their primary, by the primary's row key. + const STAGE_TRACKER_SHARED_COLLAPSED_KEY = 'hive.tracker.shared.collapsed'; + var _stageTrackerSharedCollapsed = {}; function stageTrackerDefaultFilter() { return { kind: 'all', repo: '', q: '', labels: [], needsHuman: false, onHold: false, waitingOnYou: false, attentionFirst: true, age: 'any', author: 'any', attention: false, acted: 'any', sort: 'furthest', dir: 'desc', size: STAGE_TRACKER_DEFAULT_PAGE_SIZE, page: 1 }; } diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index c9784af7c8..c2e2f4bd2f 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1958,6 +1958,22 @@ .ham-also-closes { color: var(--muted); } .ham-also-closes a { color: inherit; text-decoration: none; } .ham-also-closes a:hover { color: var(--text); text-decoration: underline; } + /* Shared-PR group (one PR closing several listed issues): the secondary + issues a PR also closes sit right under their primary, indented, on + a rail that runs from the primary's pill to the last child's elbow. + The primary's "also closes" pill carries the fold caret. Tokens only. */ + .ham-row.ham-shared-child { position: relative; padding-left: var(--sp-6); } + .ham-row.ham-shared-child::before { content: ''; position: absolute; left: var(--sp-3); top: 0; bottom: 0; border-left: var(--line-width) solid var(--line-strong); pointer-events: none; } + .ham-row.ham-shared-child.ham-shared-last::before { bottom: 50%; } + .ham-row.ham-shared-child::after { content: ''; position: absolute; left: var(--sp-3); top: 50%; width: var(--sp-3); border-top: var(--line-width) solid var(--line-strong); pointer-events: none; } + .ham-row.ham-shared-child + .ham-row.ham-shared-child { border-top-color: transparent; } + .ham-row.ham-shared-head + .ham-row.ham-shared-child { border-top-color: transparent; } + .ham-row.ham-shared-head { position: relative; } + .ham-row.ham-shared-head::before { content: ''; position: absolute; left: var(--sp-3); top: 50%; bottom: 0; border-left: var(--line-width) solid var(--line-strong); pointer-events: none; } + .ham-shared-toggle { appearance: none; background: none; border: 0; padding: 0 var(--sp-1) 0 0; margin: 0; font: inherit; color: inherit; cursor: pointer; line-height: 1; vertical-align: baseline; } + .ham-shared-toggle:hover .ham-group-caret, .ham-shared-toggle:focus-visible .ham-group-caret { color: var(--text); } + .ham-shared-toggle:focus-visible { outline: var(--line-width) solid var(--line-strong); outline-offset: 1px; border-radius: var(--r-sm); } + .ham-shared-count { color: var(--text); } .ham-plan-body, .ham-plan-note { white-space: pre-wrap; } .ham-plan-note { color: var(--muted); font-size: var(--fs-xs); } .ham-seg.active .cue-acting-cap { margin-left: var(--sp-2); } @@ -16396,6 +16412,89 @@

    Where to get help

    }); return out; } + /* ---- Shared-PR groups (pure; run under node by + stage_tracker_shared_pr_group_test.go) ------------------------------ + A PR that closes several listed issues is drawn once, under its + primary (drawn_under); the other issues ride it from their own rows + (stageTrackerLinkedRiding, hivecommons/hive#17324). Those rows belong + together: #17292 (primary), #17302 (secondary) and PR #17308 are one + flow, yet the lead sort scattered them with an unrelated row between. + The group is one unit of the list — the secondaries sit right after + their primary, in the lead order among themselves, and the group sorts + by the primary — and shares ONE PR snapshot: a secondary's listing of + the PR is replaced by the primary's own entry, so both strips light + from the same object of the same payload tick. A secondary whose + primary is not a row of this list (filtered out, other page) stays a + standalone row exactly as before. */ + // Pure: the primary row a secondary follows — { key, pr } — or null. + // Guarded: harnesses lift this file without stageTrackerLinkedRiding. + function stageTrackerSharedPRParent(it, stages, keys) { + if (!it || it.kind !== 'issue' || typeof stageTrackerLinkedRiding !== 'function') return null; + const lp = stageTrackerLinkedRiding(it, stages); + const under = Number(lp && lp.drawn_under) || 0; + if (!under) return null; + const key = stageTrackerItemKey({ repo: it.repo, kind: 'issue', number: under }); + return keys[key] ? { key, pr: Number(lp.number) || 0 } : null; + } + // Pure: the groups of a row list — { parentOf: { childKey: parentKey }, + // children: { parentKey: [childKey…] }, prs: { parentKey: { prNumber: + // true } } } — children in list order. Only rows of the list count. + function stageTrackerSharedPRGroups(rows, stages) { + rows = Array.isArray(rows) ? rows.filter(Boolean) : []; + const keys = {}; + rows.forEach(it => { if (it.kind === 'issue' && Number(it.number) > 0) keys[stageTrackerItemKey(it)] = it; }); + const out = { parentOf: {}, children: {}, prs: {} }; + rows.forEach(it => { + const p = stageTrackerSharedPRParent(it, stages, keys); + if (!p) return; + const k = stageTrackerItemKey(it); + if (k === p.key) return; + out.parentOf[k] = p.key; + (out.children[p.key] = out.children[p.key] || []).push(k); + (out.prs[p.key] = out.prs[p.key] || {})[p.pr] = true; + }); + return out; + } + // Pure: a secondary row rebound to its primary's listing of the shared + // PR — the same object, drawn_under kept — so the two strips cannot + // disagree. The row itself is copied; the payload stays the server's. + function stageTrackerSharedPRRebind(child, parent, prNumber) { + const own = Array.isArray(parent && parent.linked_prs) ? parent.linked_prs.find(lp => lp && Number(lp.number) === prNumber) : null; + if (!own || !Array.isArray(child.linked_prs)) return child; + const shared = Object.assign({}, own, { drawn_under: Number(parent.number) || 0, also_closes: null }); + return Object.assign({}, child, { linked_prs: child.linked_prs.map(lp => lp && Number(lp.number) === prNumber ? shared : lp) }); + } + // Pure: the list with every shared-PR group contiguous — primary, then + // its secondaries (rebound) — in the primary's place; a group whose + // primary is folded (collapsed[parentKey]) is its primary alone. + function stageTrackerSharedPRContiguous(rows, stages, collapsed) { + rows = Array.isArray(rows) ? rows : []; + const groups = stageTrackerSharedPRGroups(rows, stages); + if (!Object.keys(groups.parentOf).length) return rows; + const byKey = {}; + rows.forEach(it => { if (it) byKey[stageTrackerItemKey(it)] = it; }); + const emitted = {}; + const out = []; + const emit = (it) => { + if (!it) { out.push(it); return; } + const k = stageTrackerItemKey(it); + if (emitted[k]) return; + emitted[k] = true; + out.push(it); + if (collapsed && collapsed[k]) { (groups.children[k] || []).forEach(ck => { emitted[ck] = true; }); return; } + (groups.children[k] || []).forEach(ck => { + const child = byKey[ck]; + if (!child || emitted[ck]) return; + const pr = Number(Object.keys(groups.prs[k] || {}).find(n => Array.isArray(child.linked_prs) && child.linked_prs.some(lp => lp && Number(lp.number) === Number(n) && Number(lp.drawn_under) === Number(it.number)))) || 0; + emit(pr ? stageTrackerSharedPRRebind(child, it, pr) : child); + }); + }; + rows.forEach(it => { if (it && groups.parentOf[stageTrackerItemKey(it)]) return; emit(it); }); + // A secondary whose primary never emitted (a cycle) keeps its own place. + rows.forEach(it => { if (it && !emitted[stageTrackerItemKey(it)]) emit(it); }); + return out; + } + // Pure: the member numbers of a train the page does not show, given the // train's record (ahead + size on the last member tells the whole // queue when the view carries it) and the numbers shown under the @@ -16619,6 +16718,10 @@

    Where to get help

    const STAGE_TRACKER_GROUP_DIST_STEPS = 4; var _stageTrackerGroup = STAGE_TRACKER_GROUP_DEFAULT; var _stageTrackerCollapsed = {}; + // Shared-PR groups (a PR closing several listed issues): the secondary + // issues' rows collapsed under their primary, by the primary's row key. + const STAGE_TRACKER_SHARED_COLLAPSED_KEY = 'hive.tracker.shared.collapsed'; + var _stageTrackerSharedCollapsed = {}; function stageTrackerDefaultFilter() { return { kind: 'all', repo: '', q: '', labels: [], needsHuman: false, onHold: false, waitingOnYou: false, attentionFirst: true, age: 'any', author: 'any', attention: false, acted: 'any', sort: 'furthest', dir: 'desc', size: STAGE_TRACKER_DEFAULT_PAGE_SIZE, page: 1 }; } @@ -19934,19 +20037,30 @@

    Where to get help

    // hive#15806) — on the PR drawn here, "also closes #A, #B" naming the // other listed open issues it resolves, every number a link; past // three it reads "#A, #B, #C +N" and the hover names every title. - function stageTrackerAlsoClosesChipHtml(lp) { + // With `group` ({ key, count, collapsed }: the primary row's key and how + // many secondary rows this list draws right under it), the pill is also + // the group's fold: a caret button ahead of the words (▾ expanded, ▸ + // folded; hamSharedToggle(key), remembered in localStorage) — the + // secondaries' rows follow this one (stageTrackerSharedPRContiguous). + function stageTrackerAlsoClosesChipHtml(lp, group) { const list = Array.isArray(lp && lp.also_closes) ? lp.also_closes.filter(li => li && Number(li.number) > 0) : []; if (!list.length) return ''; const shown = list.slice(0, 3); const links = shown.map(li => `#${Number(li.number)}`).join(', '); const more = list.length > shown.length ? ' +' + (list.length - shown.length) : ''; - const tip = 'this PR also resolves ' + list.map(li => '#' + Number(li.number) + (li.title ? ' (' + li.title + ')' : '')).join(', '); - return `also closes ${links}${more}`; + let tip = 'this PR also resolves ' + list.map(li => '#' + Number(li.number) + (li.title ? ' (' + li.title + ')' : '')).join(', '); + if (!group || !(Number(group.count) > 0)) return `also closes ${links}${more}`; + const n = Number(group.count); + const rows = n + (n === 1 ? ' issue row' : ' issue rows'); + tip += group.collapsed ? ' · ' + rows + ' folded under this row; click the caret to show' : ' · ' + rows + ' drawn under this row; click the caret to fold'; + const label = (group.collapsed ? 'Show ' : 'Fold ') + rows + ' this PR also closes'; + return `also closes ${links}${more}${group.collapsed ? ` +${n}` : ''}`; } // Pure: the lineage-style chips of a covering PR drawn under an issue — // its lineage / adopted-from chip, then the also-closes chip; null = none. - function stageTrackerLinkedChipsHtml(lp, lineage) { - const also = typeof stageTrackerAlsoClosesChipHtml === 'function' ? stageTrackerAlsoClosesChipHtml(lp) : ''; + // `group`: see stageTrackerAlsoClosesChipHtml. + function stageTrackerLinkedChipsHtml(lp, lineage, group) { + const also = typeof stageTrackerAlsoClosesChipHtml === 'function' ? stageTrackerAlsoClosesChipHtml(lp, group) : ''; const out = [lineage || '', also].filter(Boolean).join(' '); return out || null; } @@ -20263,6 +20377,26 @@

    Where to get help

    const isIssue = item.kind === 'issue'; const title = item.title || ''; let prRefs = [], shown = item, range = null, subs = '', subRows = null, prTargetKey = '', basePill = ''; + // Shared-PR group (stageTrackerSharedPRGroups in ctx.shared): the row + // heads a group when secondaries are drawn right under it; it is a + // child when it rides a PR drawn under a row of this list. + let sharedCls = '', sharedUnder = 0, sharedGroup = null; + if (isIssue && ctx.shared) { + const key = stageTrackerItemKey(item); + const kids = ctx.shared.children && ctx.shared.children[key]; + const folded = !!(ctx.shared.collapsed && ctx.shared.collapsed[key]); + if (kids && kids.length) { + sharedGroup = { key, count: kids.length, collapsed: folded }; + if (!folded) sharedCls += ' ham-shared-head'; + } + const parentKey = ctx.shared.parentOf && ctx.shared.parentOf[key]; + if (parentKey) { + sharedCls += ' ham-shared-child'; + const sib = ctx.shared.children[parentKey] || []; + if (sib[sib.length - 1] === key) sharedCls += ' ham-shared-last'; + sharedUnder = Number(String(parentKey).split('#').pop()) || 0; + } + } if (isIssue) { const linked = stageTrackerLinkedSorted(item, stages); // The primary (first-sorted) PR's base; an issue with no PR shows none. @@ -20281,7 +20415,7 @@

    Where to get help

    prTargetKey = stageTrackerItemKey(pr); const who = (lp.author_kind || 'hive') + (lp.author ? ' · @' + lp.author : ''); const lineage = (lp.lineage && typeof stageTrackerLineageChipHtml === 'function' ? stageTrackerLineageChipHtml(lp, nowMs) : '') || (typeof stageTrackerAdoptedFromChipHtml === 'function' ? stageTrackerAdoptedFromChipHtml(lp, nowMs) : ''); - prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage) : (lineage || null))]; + prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage, sharedGroup && ctx.shared.prs && ctx.shared.prs[sharedGroup.key] && ctx.shared.prs[sharedGroup.key][Number(lp.number)] ? sharedGroup : null) : (lineage || null))]; } shown = Object.assign({}, item, { via_pr: true, stage: stageTrackerLeadStage(lp), stage_since: lp.stage_since || item.stage_since, modifiers: lp.modifiers || item.modifiers, deferred_modifiers: lp.deferred_modifiers || item.deferred_modifiers || [], caption: lp.caption || item.caption, reason: lp.reason || item.reason, preparation: lp.preparation || null, ci_activity: lp.ci_activity || null, review_activity: lp.review_activity || null, code_activity: lp.code_activity || null, display_column: lp.display_column || 0, @@ -20345,7 +20479,7 @@

    Where to get help

    const rowKey = stageTrackerItemKey(item); const humanNote = typeof stageTrackerHumanContextHtml === 'function' ? stageTrackerHumanContextHtml(item, stages, nowMs, subRows, ctx, rowKey) : ''; const noteCtx = humanNote && typeof stageTrackerNoteTakenCtx === 'function' ? stageTrackerNoteTakenCtx(ctx, rowKey) : ctx; - return `
    + return `
    ${stageTrackerRowToolsHtml(item)}
    ${stageTrackerHeadColsHtml(prRefs, leadHtml, stageTrackerActedBadgeHtml(item, nowMs) + stageTrackerChipsHtml(shown) + (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(item, nowMs, subRows) : '') + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(item, hamNotesCtx(item)) : ''), prTargetKey)} @@ -21985,9 +22119,26 @@

    Where to get help

    if (out[repo]) delete out[repo]; else out[repo] = true; return out; } + // The shared-PR groups a viewer folded (hive.tracker.shared.collapsed): + // { 'owner/repo/issue#M': true } by the primary row's key, same shape + // and lifecycle as the per-repo collapsed set. + function stageTrackerLoadSharedCollapsed() { + try { + const o = JSON.parse(localStorage.getItem(STAGE_TRACKER_SHARED_COLLAPSED_KEY) || '{}'); + if (!o || typeof o !== 'object' || Array.isArray(o)) return {}; + const out = {}; + for (const k of Object.keys(o)) if (o[k]) out[k] = true; + return out; + } catch { return {}; } + } + function stageTrackerSaveSharedCollapsed(c) { + try { localStorage.setItem(STAGE_TRACKER_SHARED_COLLAPSED_KEY, JSON.stringify(c || {})); } catch {} + } function stageTrackerLoadGrouping() { _stageTrackerGroup = stageTrackerGroupSetting(); _stageTrackerCollapsed = stageTrackerLoadCollapsed(); + // Guarded: harnesses lift this function without the shared-PR fold. + if (typeof stageTrackerLoadSharedCollapsed === 'function') _stageTrackerSharedCollapsed = stageTrackerLoadSharedCollapsed(); } function stageTrackerPrimaryRepo() { return (typeof window !== 'undefined' && window._primaryRepo) || ''; } function hamGroup(value) { @@ -22001,6 +22152,13 @@

    Where to get help

    stageTrackerSaveCollapsed(_stageTrackerCollapsed); renderStageTracker(); } + // The caret on a primary row's "also closes #N" pill: fold or unfold + // the secondary issues' rows drawn under it (key = the primary's row key). + function hamSharedToggle(key) { + _stageTrackerSharedCollapsed = stageTrackerToggleCollapsed(_stageTrackerSharedCollapsed, key); + stageTrackerSaveSharedCollapsed(_stageTrackerSharedCollapsed); + renderStageTracker(); + } // A row's repo chip: filter to that repo, or back to all when it already is. function hamRepoChip(repo) { hamFilter('repo', _stageTrackerFilter.repo === repo ? '' : repo); } function stageTrackerRepoChipChange(value) { @@ -22766,7 +22924,15 @@

    All labels

    if (stageTrackerRepoChipOn(stageTrackerRepoChipSetting(), repos.length)) ctx.repoChips = { primary: stageTrackerPrimaryRepo(), active: f.repo }; const visible = stageTrackerVisible(d.items, f, ctx); const sorted = stageTrackerTrainContiguous(stageTrackerSort(visible, stages, f, { phone: stageTrackerPhone() })); - const ordered = typeof stageTrackerPreparationOrderRows === 'function' ? stageTrackerPreparationOrderRows(d, sorted, stages) : sorted; + const prepared = typeof stageTrackerPreparationOrderRows === 'function' ? stageTrackerPreparationOrderRows(d, sorted, stages) : sorted; + // Shared-PR groups last, so a secondary issue always sits right after + // its primary whatever the lead sort or train put between them; the + // groups a viewer folded leave their secondaries out of the list. + // Guarded: test harnesses lift renderStageTracker without tracker-words-core. + const sharing = typeof stageTrackerSharedPRContiguous === 'function'; + ctx.shared = sharing ? Object.assign(stageTrackerSharedPRGroups(prepared, stages), { collapsed: _stageTrackerSharedCollapsed }) : null; + const ordered = sharing ? stageTrackerSharedPRContiguous(prepared, stages, _stageTrackerSharedCollapsed) : prepared; + const foldedShared = prepared.length - ordered.length; // A TV display (display=1&density=tv) shows the rows that fit the // screen, ungrouped, with "+N more" in place of the pager. const tv = typeof stageTrackerDisplayTv === 'function' && stageTrackerDisplayTv(); @@ -22777,6 +22943,8 @@

    All labels

    ? stageTrackerGroupPage(stageTrackerGroups(ordered, { primary: stageTrackerPrimaryRepo(), collapsed: _stageTrackerCollapsed, stages }), f) : stageTrackerPage(ordered, f); if (!tv && page.page !== f.page) f.page = page.page; + // A folded secondary is not filtered out: it counts toward the total. + if (foldedShared > 0) page.total += foldedShared; // The rows this render draws (this page, group headers aside), for // stageTrackerPRListedOwnRow: a covered issue defers to its PR's row // only when that row is actually on screen. Kept beside the payload, From c4abd0fda691e734484d44cd1b3828f4c1b86dd7 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Sun, 8 Nov 2026 21:44:00 -0500 Subject: [PATCH 024/123] =?UTF-8?q?=F0=9F=90=9B=20Activity=20Monitor:=20ex?= =?UTF-8?q?actly=20one=20lit=20stage=20chevron=20per=20row=20(#17337)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 Activity Monitor: exactly one lit stage chevron per row After a push during review the row lit CI and Review amber together (client lit each track independently; the chevron rules allowed the CI+Review pair). Derive one lead track (CI before Review); the other is dim with a muted queued note, its words in the tooltip. Reword the base-refresh detail line in operator terms (no preparation/unverified jargon, each signal once) and rename the handled-regression pill to "stage reset" / "stage reset by push". Doc rule: exactly one lit stage per row; later stages shown dim with a queued note. Fixes #17335 Signed-off-by: Andrew Anderson * 🐛 tracker.css: token the queued-note font size for the style ratchet Signed-off-by: Andrew Anderson --------- Signed-off-by: Andrew Anderson Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/fixed-one-lit-stage.md | 1 + .../dashboard-sections/activity-monitor.md | 16 +- .../stage-labels.md | 3 +- .../dashboard/stage_tracker_activity.test.js | 24 ++- .../stage_tracker_preparation_visual.test.js | 32 +++- .../dashboard/stage_tracker_regressed_test.go | 8 +- .../stage_tracker_ui_prelude_test.go | 33 ++-- .../dashboard/stage_tracker_ui_rows_test.go | 29 +++- src/pkg/dashboard/static-src/css/tracker.css | 6 + .../static-src/js/tracker-preparation.js | 52 +++++- .../dashboard/static-src/js/tracker-queue.js | 4 +- .../static-src/js/tracker-row-strip.js | 95 ++++++++--- src/pkg/dashboard/static/index.html | 157 ++++++++++++++---- 13 files changed, 361 insertions(+), 99 deletions(-) create mode 100644 changelog.d/fixed-one-lit-stage.md diff --git a/changelog.d/fixed-one-lit-stage.md b/changelog.d/fixed-one-lit-stage.md new file mode 100644 index 0000000000..1ea83744c0 --- /dev/null +++ b/changelog.d/fixed-one-lit-stage.md @@ -0,0 +1 @@ +- Activity Monitor: a row lights exactly one stage chevron. When a push lands during review, CI is the lit chevron and Review is dim with a muted "re-review queued" note instead of a second amber chevron; the base-refresh detail line reads in plain words (no "preparation"/"unverified" jargon, each signal said once); the muted `stage ↓` pill now reads "stage reset" / "stage reset by push" (#17335). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index a2f36fe588..04eec71e8a 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -144,7 +144,7 @@ An Open issue waiting on a maintainer's triage reads **Triage needed · since 28 At most one health chip sits over the strip's cap, with `+N` for the rest: `stalled`, `regressed`, `hold`, `needs-human`, `needs-decision` (“needs human decision”), `needs-triage` (“triage needed”), `needs-rebase`, `blocked` or `draft`. At 015 the chevron already names triage; before claim, a lingering `needs-triage` can be a chip (010/017/045). At 020+ it is stale and omitted from chip/stage text: `stale_labels` supplies a muted *Stale label* tooltip until the sweep removes it ([#14586](https://github.com/hivecommons/hive/issues/14586)). -A genuine backward hop sets `regressed`; the first forward hop clears it. Lapsed claims 020→010, 030↔020 flicker and 040→010 after a partial merge are not regressions. A regression parked on a person is red. Otherwise it is a muted dashed **stage ↓**, yields to other modifiers and does not enter **Needs attention**: “the hive is handling it — no action needed; clears on the next forward step.” See [The regressed marker](../labels-and-control-signals.md#the-regressed-marker-when-it-is-set-when-it-clears). +A genuine backward hop sets `regressed`; the first forward hop clears it. Lapsed claims 020→010, 030↔020 flicker and 040→010 after a partial merge are not regressions. A regression parked on a person is red. Otherwise it is a muted dashed **stage reset** — **stage reset by push** when a new head caused the fall ([#17335](https://github.com/hivecommons/hive/issues/17335)) — yields to other modifiers and does not enter **Needs attention**: “the hive is handling it — no action needed; clears on the next forward step.” See [The regressed marker](../labels-and-control-signals.md#the-regressed-marker-when-it-is-set-when-it-clears). The reason, actor, nudges, repository, flags and recent stage hops live on the `#N` tooltip (the PR link for a nested row). Titles wrap before their column edges and show full text on hover. Hairlines and whole-row hover keep the chip and age attached to the right row ([#14640](https://github.com/hivecommons/hive/issues/14640)). Passed/upcoming chevrons, kind/author icons, chips and `since` have no separate hover text. @@ -270,8 +270,10 @@ A lone ticket draws no header: one owner (or one waiter) is the base-refresh loc holder, not a train, so its row comment carries the role and verification state and the header's count and front only appear once two recorded tickets share the base. A refreshed owner is the usual lone ticket — `update-branch` moves its head, so the -ticket reads *Recorded preparation owner · unverified · Head changed* until it merges -or is released; that is expected, not a dropped batch. +ticket reads *Recorded first for the base refresh · ticket issued for an earlier head · +re-checked on * until it merges or is released; that is expected, not a dropped +batch. The row never says *preparation* or *unverified* — those are the scheduler's +words, kept in the data ([#17335](https://github.com/hivecommons/hive/issues/17335)). When several approved PRs to the same base touch the same files, the automerge lanes merge them one at a time ([#15117](https://github.com/hivecommons/hive/issues/15117)). The tracker renders every train contiguously, in merge order, with a thin left rail linking the rows and a header chip `🚆 merge train · 4 PRs · 1st: #15074` — the glyph is an inline-SVG railcar (14px, currentColor, hover *Merge queue*), the same icon the **Merge queue** column header and its chevrons wear; overlapping files are listed beside it. Pill wording per state is the PR's place in the queue (the owner's words — `front` and `queued-behind` appear nowhere a person reads): the head reads "Queued for merge · 1st of 4 · ~13m" (its own soak left plus the next pass); the others "Queued for merge · 2nd of 4 · ~4m", "Queued for merge · 3rd of 4", … (`1st 2nd 3rd 4th … 11th 12th 13th 21st`, always with the queue length, countdown to its turn); when the page draws more than one train each queue word ends with its train's tag — "Queued for merge · 1st of 2 · train main.go" (the first overlapping file's basename, else the head `#N`) — and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*, so two "1st"s on one page tell apart (one train → no tag); the header and every member row of a train share one rail accent (`.ham-train-k0…k3`, cycling in page order); once the front merged and the hive is rebasing a conflicting sibling, "Rebasing · attempt 1/2"; when the loop guard (`auto_merge.merge_train.max_rebase_attempts`) is spent, "Needs human decision · rebase failed twice" at stage/085 with the decision option "Rebase, then merge as maintainer". @@ -309,7 +311,7 @@ Issues on their own stages (Open, 010, 020, 045) keep every pill: a `needs-human | `hold` | actionable now | always, whether set by a person or Hive; release rules still depend on provenance | | `draft` | actionable now | always (the author's move) | | `stalled` | actionable now | always | -| `regressed` | actionable now | always; muted `stage ↓` unless the row is parked on a person (see above) | +| `regressed` | actionable now | always; muted `stage reset` (`stage reset by push` after a new head) unless the row is parked on a person (see above) | | `needs-rebase`, `blocked`, `triage needed`, `possible dupe` | actionable now | always | | `unauthorized` — `unauthorized:approve-workflow-runs` | actionable now | always — the carve-out: held workflow runs mean CI cannot even start, and waiting for the gate would waste the whole CI / review cycle (rationguard#397 at 072) | | `unauthorized` — any other step (merge, branch update, no step named) | merge gate | PR at stage/080 or later | @@ -442,7 +444,7 @@ E.g. `At Merge queue — waiting on CI.` / `You chose Approve · 15:55 (5 min ag #### Legend — the three cues a row may carry -The *state pill* says where the item is and what it is waiting on (`hold`, `needs human`, `stage ↓` …). The *working* cue on the lit chevron says Hive is doing something in that stage now; its tooltip explains the work. The *decision badge* (history mark with count) says a person acted here and what followed. These are separate signals: a recorded decision does not mean the requested effect happened. +The *state pill* says where the item is and what it is waiting on (`hold`, `needs human`, `stage reset` …). The *working* cue on the lit chevron says Hive is doing something in that stage now; its tooltip explains the work. The *decision badge* (history mark with count) says a person acted here and what followed. These are separate signals: a recorded decision does not mean the requested effect happened. Plain words throughout — working / waiting on X / set back by Y / merged — nothing else blinks. @@ -450,9 +452,9 @@ Plain words throughout — working / waiting on X / set back by Y / merged — n An *active* chevron is filled amber and carries words; an inactive one is its icon alone (CI / Review: the ring, green when the last run on this head passed, red when it failed, neutral when not yet run), with the counts in its tooltip. On every strip: -1. **1 ≤ active ≤ 2.** At least one chevron is active — the column where the item is or where it is stuck. +1. **Exactly one lit stage per row.** One chevron is active — the column where the item is or where it is stuck; later stages are shown dim, with a muted queued note when they are next ([#17335](https://github.com/hivecommons/hive/issues/17335): a push during review lit *CI 7/11 · 4 running* and *Review 5/5 · adjudicating* amber together). 2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current — filled but still, icon only, its words in the tooltip — and nothing else is active. -3. **CI + Review is the only pair.** Two chevrons are active together only when both tracks run at once; every other combination is exactly one active chevron. The stage chevron is the ≥ 1 fallback: active only when no track is in motion. +3. **CI leads Review.** When both tracks would light at once — CI running while the review is queued, in progress or being re-adjudicated — CI is the lit chevron and Review is dim with a small note (*re-review queued* after a push, *review in progress*, *review queued*); its words stay in the tooltip, ending *… behind CI*. The stage chevron is the fallback: active only when no track is in motion. 4. **The PR in progress chevron speaks the PR's lifecycle** — draft, pushed, rebasing, *Unassigned · next: scanner*, *Waiting for @author · fix owed* — never a CI or review verdict. *CI failing*, *CI 4/11 · 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail. 5. **The CI and Review tooltips state what the track waits on — never "activity unknown".** With no verdict and no reviewer in flight the spoke derives the Review statement from what it already knows, in this order: the PR is merged or closed (*Review · n/a (closed)*), it is a draft (*Review · draft, not requested*), CI on the head has not finished (*Review · waiting for CI*), CI is done and nobody started (*Review · not started · hive reviewer next*, or *· needs reviewer* when the repo has no hive reviewer lane). A settled verdict explains itself — *Changes requested by the hive reviewer: 1 perspective posted findings … · 12m ago · quality ✓ · security ✗: token logged* — and stays known as its observation ages. The one no-data wording, *Review · no data for head f269349 yet · refreshing* (CI: *CI · no checks observed for head … yet · refreshing*), appears only when the spoke has fetched nothing for the head, and names the next step. diff --git a/src/docs/labels-and-control-signals/stage-labels.md b/src/docs/labels-and-control-signals/stage-labels.md index 3f140be71f..f96db06211 100644 --- a/src/docs/labels-and-control-signals/stage-labels.md +++ b/src/docs/labels-and-control-signals/stage-labels.md @@ -247,7 +247,8 @@ How the chip renders depends on whether a person is in the loop. On a hive-driven stage with no human-gate modifier (`hold`, `needs-human`, `needs-decision`, `needs-rebase`, `blocked`, `stalled`) and off the human-gated stages (045 / 071 / 072 / 085 / 090), it draws as a muted, -dashed `stage ↓` pill whose hover text names the fall and ends "the hive is +dashed `stage reset` pill (`stage reset by push` when a new head caused the +fall) whose hover text names the fall and ends "the hive is handling it — no action needed; clears on the next forward step", and the row stays out of **Needs attention** and keeps its ordinary headline. Only a regression on a human-gated row keeps the red `regressed` pill and the diff --git a/src/pkg/dashboard/stage_tracker_activity.test.js b/src/pkg/dashboard/stage_tracker_activity.test.js index c5885c0a85..9038051cff 100644 --- a/src/pkg/dashboard/stage_tracker_activity.test.js +++ b/src/pkg/dashboard/stage_tracker_activity.test.js @@ -28,7 +28,7 @@ function constLine(source, name) { return match[0]; } const trackConsts = ['STAGE_TRACKER_WORKFLOW_APPROVAL_BLOCKER', 'STAGE_TRACKER_PENDING_CHECKS_NAMED', 'STAGE_TRACKER_WORKFLOW_APPROVAL_TIP', 'STAGE_TRACKER_RING_SEGMENT_GAP_MAX', 'STAGE_TRACKER_RING_RADIUS', 'STAGE_TRACKER_RING_GAP_DEG'].map(name => constLine(strip, name)).join('\n'); -const trackFns = ['stageTrackerHiveOwesReReview', 'stageTrackerTrackLead', 'stageTrackerWaitingOnPerson', 'stageTrackerTrackRunning', 'stageTrackerWorkflowApprovalPending', 'stageTrackerRingSvg', 'stageTrackerStalledTrack', 'stageTrackerQueueAheadWord', 'stageTrackerStageTrack', 'stageTrackerHiveOwnsRepair', 'stageTrackerTrackWord', 'stageTrackerAgoWord', 'stageTrackerActivityTrackHtml'].map(name => fn(strip, name)).join('\n'); +const trackFns = ['stageTrackerHiveOwesReReview', 'stageTrackerTrackLead', 'stageTrackerWaitingOnPerson', 'stageTrackerTrackRunning', 'stageTrackerWorkflowApprovalPending', 'stageTrackerRingSvg', 'stageTrackerStalledTrack', 'stageTrackerQueueAheadWord', 'stageTrackerStageTrack', 'stageTrackerHiveOwnsRepair', 'stageTrackerTrackWord', 'stageTrackerAgoWord', 'stageTrackerQueuedTrackNote', 'stageTrackerActivityTrackHtml'].map(name => fn(strip, name)).join('\n'); const track = new Function('esc', 'stageTrackerIcon', trackConsts + '\n' + trackFns + ';return stageTrackerActivityTrackHtml;')(esc, (n, cls) => ``); const getAnchor = new Function(globals + anchor + ';return stageTrackerAnchor;')(); const header = new Function('esc', 'stageTrackerIcon', globals + fn(strip, 'stageTrackerHeaderHtml') + ';return stageTrackerHeaderHtml;')(esc, () => ''); @@ -123,7 +123,7 @@ function stageTrackerActorKind() { return ''; } function stageTrackerActorTip() { return ''; } function stageTrackerMotion() { return STAGE_TRACKER_MOTION_STATIC; } function stageTrackerIcon(n) { return ''; } -` + fn(strip, 'stageTrackerWaitingOnPerson') + fn(strip, 'stageTrackerTrackRunning') + fn(strip, 'stageTrackerStageTrack') + fn(strip, 'stageTrackerStalledTrack') + fn(strip, 'stageTrackerStripItems') + ';return stageTrackerStripItems;')(esc, segments, track, ...Object.values(helpers)); +` + fn(strip, 'stageTrackerWaitingOnPerson') + fn(strip, 'stageTrackerTrackRunning') + fn(strip, 'stageTrackerStageTrack') + fn(strip, 'stageTrackerStalledTrack') + fn(strip, 'stageTrackerTrackWouldLight') + fn(strip, 'stageTrackerLeadTrack') + fn(strip, 'stageTrackerQueuedTrackNote') + fn(strip, 'stageTrackerStripItems') + ';return stageTrackerStripItems;')(esc, segments, track, ...Object.values(helpers)); const renderStrip = makeStripRenderer(); function physicalTracks(item) { @@ -531,8 +531,11 @@ test('current phase, running activity, failure and successful completion are ind const cells = physicalTracks(livePR({ ci_activity: activity(state, caption, running) })); assert.ok(cells.ci.includes('ham-activity-track ' + cls + ' ham-current'), state + ' → ' + cls + ': ' + cells.ci); assert.equal(cells.ci.includes('data-motion="active"'), running); - // The stage's own track (review, 050) is active with words (#16599). - assert.match(cells.review, /active ham-current[^]*data-activity-state="unknown"/); + // The stage's own track (review, 050) is active with words (#16599) — + // unless CI runs, when CI leads and Review is dim with a queued note + // (exactly one lit chevron, hivecommons/hive#17335). + if (running) assert.match(cells.review, /todo ham-track-queued ham-current[^]*data-activity-state="unknown"[^]*review queued<\/span>/); + else assert.match(cells.review, /active ham-current[^]*data-activity-state="unknown"/); } const admitted = physicalTracks(livePR({ stage: 80, ci_activity: activity('passing', 'CI green · all 2 required checks passed'), review_activity: activity('approved', 'Review approved') })); assert.doesNotMatch(admitted.ci + admitted.review, /ham-current|aria-current/); @@ -905,7 +908,7 @@ test('#16484: count grammar — CI passed/total and Review done/total across eve assert.equal(word({ head: 'h' }, 'review', false), ''); }); -test('#16484: the three screenshot rows — both tracks lit with counts, swarm requested, red CI beside a done review', () => { +test('#16484: the three screenshot rows — CI leads with counts, swarm requested dim behind it, red CI beside a done review', () => { const head = 'd3c0824304d4c97b8ee76a267fb1e91f6d4c79a4'; const fresh = (state, extra = {}) => ({ head, state, caption: state, source: 'cache', observed_at: new Date(now).toISOString(), ...extra }); const text = cell => cell.match(/aria-describedby="[^"]+">([^]*?)]*>/g, ''); @@ -925,11 +928,14 @@ test('#16484: the three screenshot rows — both tracks lit with counts, swarm r // #16491: review swarm requested, no bundle yet; CI shows its count. cells = physicalTracks(livePR({ head, stage: 50, display_column: 50, ci_activity: fresh('running', { checks_passed: 2, checks_total: 14 }), review_activity: fresh('unassigned', { perspectives_done: 0, perspectives_total: 5, blocker: 'no reviewer free' }) })); - // #16599: at 050 the Review column is the stage's own track → active with - // words even while only queued; CI runs beside it (two lit). - assert.equal(cls(cells.review), 'active'); assert.equal(text(cells.review), 'Review 0/5 · queued'); - assert.doesNotMatch(cells.review, /data-motion/, 'queued is lit but still'); + // #16599: at 050 the Review column is the stage's own track, but CI runs + // beside it and leads — exactly one lit chevron (hivecommons/hive#17335): + // Review is dim with a muted "review queued" note, its words in the tooltip. assert.equal(cls(cells.ci), 'active'); assert.equal(text(cells.ci), 'CI 2/14 · 12 running'); + assert.equal(cls(cells.review), 'todo'); assert.match(cells.review, /ham-track-queued/); + assert.match(cells.review, /ham-track-verdict"><\/span>review queued<\/span>/, 'no words on the dim track, only the muted note'); + assert.match(cells.review, /aria-label="[^"]*Review: Review 0\/5 · queued · [^"]*· review queued behind CI"/); + assert.doesNotMatch(cells.review, /data-motion/, 'a demoted track is still'); // #16268: CI failed native-queue-policy, review approved, held. cells = physicalTracks(livePR({ head, stage: 70, display_column: 50, modifiers: ['hold'], hold: { by: 'hanthor', pill: 'Held by @hanthor' }, ci_activity: fresh('failing', { checks_passed: 13, checks_total: 14, checks_failed: 1, checks_failing: ['native-queue-policy'], blocker: 'native-queue-policy' }), diff --git a/src/pkg/dashboard/stage_tracker_preparation_visual.test.js b/src/pkg/dashboard/stage_tracker_preparation_visual.test.js index 0cbdcd91b5..8cfcdb8ad4 100644 --- a/src/pkg/dashboard/stage_tracker_preparation_visual.test.js +++ b/src/pkg/dashboard/stage_tracker_preparation_visual.test.js @@ -105,7 +105,7 @@ test('original compact pill and connector decorate actual rows with FIFO help an assert.match(rows[3].html, /ham-train-last/); assert.match(rows[1].html, /data-ham-stage="70"/); assert.match(rows[2].html, /data-ham-stage="50"/); - assert.match(rows[2].html, /CI · checks pending · queued for base refresh behind PR #45 · ticket age 30m/); + assert.match(rows[2].html, /CI · checks pending · queued for base refresh behind PR #45 · ticket issued 30m ago/); assert.match(rows[1].html, /Review swarm requested; waiting for a verdict on the current head · preparing base/); assert.match(rows[3].html, /Waiting 2nd for preparation/); assert.doesNotMatch(html, /
  • { + const { ctx } = load(), f = fixture(); + f.owner.head = 'c15a343f00d'; + f.owner.caption = 'push seen 3m ago → CI/re-review queued'; + f.owner.push = { state: 'pushed', login: 'Karibhou', sha: 'c15a343f00d', since: new Date(NOW - 3 * 60000).toISOString(), next: 're-review' }; + f.owner.ci_activity = { head: f.owner.head, state: 'running', active: true, checks_passed: 7, checks_total: 11 }; + f.q.owner.state = 'unverified'; f.q.owner.current_head = f.owner.head; + f.q.owner.detail = 'Head changed; current preparation unverified'; + f.q.owner.since = new Date(NOW - 4 * 60000).toISOString(); + const html = render(ctx, f, [f.owner, f.first, f.second])[1].html; + const comment = html.match(/
    (.*?)<\/span><\/div>/)[1]; + assert.equal(comment, 'New push c15a343 by @Karibhou 3m ago → CI running, review will rerun · previous review no longer applies · Recorded first for the base refresh · ticket issued for an earlier head · re-checked on c15a343 · ticket issued 4m ago'); + assert.doesNotMatch(comment, /preparation|unverified|ticket age|Head changed/i); + assert.equal((comment.match(/no longer applies|not yet confirmed|earlier head/g) || []).length, 2, 'each signal said once'); + // The popover / help keep the same words. + assert.doesNotMatch(ctx.stageTrackerPreparationHelp(model(ctx, f)[0]), /\bunverified\b|ticket age|current preparation/); +}); + test('unknown predecessor and exact repo/base/head mismatches never fabricate confirmed positions', () => { for (const change of [ f => { f.first.head = 'new-head'; }, f => { f.first.base_ref = 'other'; }, @@ -267,7 +289,7 @@ test('unknown predecessor and exact repo/base/head mismatches never fabricate co const group = model(ctx, f)[0]; assert.ok(group.unverified.some(e => e.ticket.number === 9)); assert.equal(group.waiting[0].position, 0); - assert.match(content(render(ctx, f)), /Waiting for preparation · position unverified/); + assert.match(content(render(ctx, f)), /Waiting for preparation · position not yet confirmed/); } }); @@ -360,7 +382,7 @@ test('comments dedupe current captions, retain current event detail, and use no const comment = html.match(/
    .*?<\/div>/)[0]; assert.doesNotMatch(comment, /CI · checks pending/); assert.equal((html.match(/CI · checks pending<\/p>/g) || []).length, 1); - assert.match(comment, /ticket age 30m/); + assert.match(comment, /ticket issued 30m ago/); assert.doesNotMatch(comment, /data-at=|data-cue-key=/); assert.deepEqual(events, before); f.first.caption = 'CI · failing current check'; @@ -381,7 +403,7 @@ test('a lone ticket draws no train header: the owner row keeps its comment and r assert.deepEqual(rootKeys(rows), [REPO + '/pr#45']); assert.doesNotMatch(html, /ham-preparation-head|Preparation train|0 confirmed PRs/); assert.match(html, /ham-preparation-member/); - assert.match(html, /Recorded preparation owner · unverified/); + assert.match(html, /Recorded first for the base refresh · ticket matches the current open PR snapshot/i); rows = render(ctx, f, [], []); assert.doesNotMatch(content(rows), /ham-preparation-head/); f.q.waiting = [f.first.preparation]; diff --git a/src/pkg/dashboard/stage_tracker_regressed_test.go b/src/pkg/dashboard/stage_tracker_regressed_test.go index 7d98469c08..2a400f99cc 100644 --- a/src/pkg/dashboard/stage_tracker_regressed_test.go +++ b/src/pkg/dashboard/stage_tracker_regressed_test.go @@ -101,9 +101,12 @@ const pill = stageTrackerChipsHtml(item); assert.ok(pill.includes('title="regressed: 040 Covered by PR → 020 Claimed at T'), pill); assert.ok(pill.includes('because live issue claim'), pill); assert.ok(!stageTrackerChipsHtml({ stage: 10, modifiers: ['stalled'] }).includes('title=')); -// Hive-handled: muted "stage ↓" pill, never the red regressed look, and it says so on hover. +// Hive-handled: muted "stage reset" pill, never the red regressed look, and it says so on hover. const handledCases = [ { name: 'actionable', item: item }, + // hivecommons/hive#17335: a fall caused by a new push names its cause. + { name: 'pushed', item: { kind: 'pr', stage: 50, modifiers: ['regressed'], regressed_from: 80, push: { state: 'pushed', sha: 'c15a343', login: 'Karibhou' } }, text: STAGE_TRACKER_HANDLED_PUSH_TEXT }, + { name: 'reason names the push', item: { kind: 'pr', stage: 50, modifiers: ['regressed'], regressed_from: 80, regressed_reason: 'new head pushed' }, text: STAGE_TRACKER_HANDLED_PUSH_TEXT }, { name: 'claimed', item: { stage: 20, modifiers: ['regressed'], regressed_from: 30 } }, { name: 'pr in progress', item: { stage: 30, modifiers: ['regressed'], regressed_from: 40 } }, { name: 'draft folds in', item: { kind: 'pr', stage: 50, modifiers: ['regressed', 'draft'], regressed_from: 100 } }, @@ -113,7 +116,8 @@ for (const c of handledCases) { const h = stageTrackerChipsHtml(c.item); assert.ok(h.includes(STAGE_TRACKER_HANDLED_NOTE), c.name + ': ' + h); if (c.item.modifiers.length === 1) { - assert.ok(h.includes('ham-mod-regressed ham-mod-handled') && h.includes('>' + STAGE_TRACKER_HANDLED_TEXT + '<'), c.name + ': ' + h); + assert.ok(h.includes('ham-mod-regressed ham-mod-handled') && h.includes('>' + (c.text || STAGE_TRACKER_HANDLED_TEXT) + '<'), c.name + ': ' + h); + assert.ok(!h.includes('stage ↓'), c.name + ': the pill is words, not a glyph: ' + h); } else { assert.ok(!h.includes('ham-mod-regressed') && h.includes('ham-mod-draft') && h.includes(' +1<'), c.name + ' yields the lead pill: ' + h); } diff --git a/src/pkg/dashboard/stage_tracker_ui_prelude_test.go b/src/pkg/dashboard/stage_tracker_ui_prelude_test.go index 9e38f56b48..cef38b281f 100644 --- a/src/pkg/dashboard/stage_tracker_ui_prelude_test.go +++ b/src/pkg/dashboard/stage_tracker_ui_prelude_test.go @@ -111,6 +111,9 @@ func stageTrackerRowsPreludeJS(t *testing.T, html string) string { jsFunc(t, html, "stageTrackerStalledTrack"), jsFunc(t, html, "stageTrackerQueueAheadWord"), jsFunc(t, html, "stageTrackerStageTrack"), + jsFunc(t, html, "stageTrackerTrackWouldLight"), + jsFunc(t, html, "stageTrackerLeadTrack"), + jsFunc(t, html, "stageTrackerQueuedTrackNote"), jsFunc(t, html, "stageTrackerTrackWord"), jsFunc(t, html, "stageTrackerAgoWord"), jsFunc(t, html, "stageTrackerActivityTrackHtml"), @@ -223,27 +226,32 @@ var _stageTracker = { stages }; // needs-rebase always lands a PR in 070/071/072 (automerge_stage_labels.go), so a // fixture pairing it with 050/060 would draw a contradictory row. const rebaseCoherent = (it) => { if ((it.modifiers || []).includes('needs-rebase')) assert.ok(![50, 60].includes(Number(it.stage)), 'fixture #' + it.number + ' pairs needs-rebase with stage ' + it.stage); (it.linked_prs || []).forEach(rebaseCoherent); }; -// hivecommons/hive#16540: no strip ever lights more than two chevrons. Lit = -// the stage chevron's active fill (a settled-current one is not amber) or a -// CI / Review track in the active class. Checked on every fixture rendered. +// hivecommons/hive#16540 / #17335: no strip ever lights more than ONE chevron. +// Lit = the stage chevron's active fill (a settled-current one is not amber) +// or a CI / Review track in the active class. Checked on every fixture rendered. const litChevrons = (html) => (html.match(/class="ham-seg active(?! [^"]*ham-settled-current)|class="ham-seg ham-activity-track active\b/g) || []).length; -// hivecommons/hive#16599 (canonical): 1 ≤ active ≤ 2 — the stage column is -// always active (a settled-current one counts as filled), a track only while -// it runs or is the stage's own / stalled track; and words ride ONLY active -// chevrons — an inactive CI / Review track is its icon alone. +// hivecommons/hive#16599 (canonical) as tightened by #17335: exactly one +// active chevron — the stage column is always filled (a settled-current one +// counts as filled), a track only while it is the row's lead track (running, +// or the stage's own / stalled track); and words ride ONLY active chevrons — +// an inactive CI / Review track is its icon alone, plus a muted queued note +// (ham-track-note) when it would have lit behind the lead. const filledChevrons = (html) => litChevrons(html) + (html.match(/class="ham-seg active [^"]*ham-settled-current/g) || []).length; -const trackCopyText = (li) => ((/([\s\S]*?)<\/span>(?:/g, '').replace(/<[^>]+>/g, '').trim(); +const trackCopyText = (li) => ((/([\s\S]*?)<\/span>(?:/g, '').replace(/<[^>]+>/g, '').trim(); const wordsOnlyWhenActive = (item, s) => Array.from(s.matchAll(/
  • /g)).forEach(m => { const words = trackCopyText(m[0]); if (/\bactive\b/.test(m[1])) assert.ok(words, 'fixture #' + item.number + ' active track without words: ' + m[0]); else assert.strictEqual(words, '', 'fixture #' + item.number + ' inactive track carries words: ' + m[0]); + // A demoted track is dim, still, and says it is queued; an active one never wears the note. + if (/ham-track-queued/.test(m[1])) assert.ok(!/\bactive\b/.test(m[1]) && !/data-motion=/.test(m[0]) && /[^<]+<\/span>/.test(m[0]), 'fixture #' + item.number + ' queued track is not dim-with-note: ' + m[0]); + else assert.ok(!/ham-track-note/.test(m[0]), 'fixture #' + item.number + ' non-queued track wears a queued note: ' + m[0]); // hivecommons/hive#16643: a text-bearing track is active and nothing // else — no muted / pending / settled class may dim its one amber fill. if (words) assert.ok(/\bactive\b/.test(m[1]) && !/\b(?:pending|todo|done|failing|ham-settled-current)\b/.test(m[1]), 'fixture #' + item.number + ' text-bearing track is not plainly active: ' + m[1]); }); -// hivecommons/hive#16643: CI + Review is the only pair that may be active -// together; a lit stage chevron (PR in progress, Merge queue …) is the row's -// one active chevron, and it carries no CI / review verdict in its words. +// hivecommons/hive#16643 / #17335: a lit stage chevron (PR in progress, +// Merge queue …) is the row's one active chevron, never beside a running +// track, and it carries no CI / review verdict in its words. const stageLitChevrons = (html) => (html.match(/class="ham-seg active(?! [^"]*ham-settled-current)/g) || []).length; const onlyTracksPair = (item, s, i) => { const lit = litChevrons(s); @@ -260,7 +268,8 @@ const neverActivityUnknown = (item, s, i) => Array.from(s.matchAll(/
  • { - assert.ok(litChevrons(s) <= 2, 'fixture ' + (item.repo || '') + '#' + item.number + ' strip ' + i + ' lights ' + litChevrons(s) + ' chevrons: ' + s); + // Exactly one lit stage per row (hivecommons/hive#17335). + assert.ok(litChevrons(s) <= 1, 'fixture ' + (item.repo || '') + '#' + item.number + ' strip ' + i + ' lights ' + litChevrons(s) + ' chevrons: ' + s); onlyTracksPair(item, s, i); if (s.includes('aria-current="step"')) assert.ok(filledChevrons(s) >= 1, 'fixture ' + (item.repo || '') + '#' + item.number + ' strip ' + i + ' has no filled chevron: ' + s); wordsOnlyWhenActive(item, s); diff --git a/src/pkg/dashboard/stage_tracker_ui_rows_test.go b/src/pkg/dashboard/stage_tracker_ui_rows_test.go index 18d5ebb399..451e71cd42 100644 --- a/src/pkg/dashboard/stage_tracker_ui_rows_test.go +++ b/src/pkg/dashboard/stage_tracker_ui_rows_test.go @@ -703,7 +703,8 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ // decided → one lit chevron. #16268: waiting for the contributor, CI 7/11 // unreported, review approved → exactly one. Three qualifying (fix running, // CI running, review running) → the tracks win and the stage chevron is -// settled-current. The ≤2 invariant itself runs on every fixture above. +// settled-current; CI leads and Review is dim with a queued note +// (hivecommons/hive#17335). The one-lit invariant itself runs on every fixture above. { const seen = new Date(now - 60000).toISOString(); const unreported = { head: 'f269349', state: 'missing', caption: "CI waiting · required check 'test' hasn't reported for this head yet", checks_passed: 7, checks_total: 11, blocker: 'test', source: 'checks', observed_at: seen }; @@ -723,7 +724,8 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ code_activity: { head: 'f269349', state: 'remediating', caption: 'Remediating · scanner · 4m', actor: 'scanner', active: true, source: 'fix-dispatch', observed_at: seen }, ci_activity: { head: 'f269349', state: 'running', active: true, caption: 'CI running', checks_passed: 4, checks_total: 11, source: 'checks', observed_at: seen }, review_activity: { head: 'f269349', state: 'reviewing', active: true, actor: 'reviewer-2', caption: 'Review working', perspectives_done: 2, perspectives_total: 5, source: 'dispatch', observed_at: seen } }, stages, ctx); - assert.strictEqual(lit(busy), 2, 'three qualify, two light: ' + strip(busy)); + assert.strictEqual(lit(busy), 1, 'three qualify, one lights: ' + strip(busy)); + assert.ok(/
  • ]*>[\s\S]*?CI 4\/11 · 7 running<\/span>/.test(busy) && /
  • ]*data-motion)[^>]*>[\s\S]*?review in progress<\/span>/.test(busy), 'CI leads, Review is dim with its note: ' + strip(busy)); // #16456: back in PR in progress with changes requested — one filled // chevron; CI 11/11 is green words (done), the review finding red words // (failing), neither a fill. @@ -779,7 +781,10 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ // waiting on workflow approval"; Review is the green ring alone. #427 (050, // swarm queued, CI passed): Review is the stage's own track, active even // while queued; CI is the green icon only. CI running + swarm adjudicating -// lights both tracks with words, never a third. +// lights CI alone — exactly one lit stage per row (hivecommons/hive#17335): +// Review is dim with a muted "review in progress" note, and after a push +// (issue #17292 / PR #17308: "CI 7/11 · 4 running" AND "Review 5/5 · adjudicating" +// both amber) the note reads "re-review queued". { const seen = new Date(now - 60000).toISOString(); const lit = (html) => litChevrons(strip(html)); @@ -811,8 +816,22 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ const both = stageTrackerRowHtml({ repo: 'acme/promptargs', number: 427, kind: 'pr', stage: 50, display_column: 50, head: '9bdf058', author: 'hive[bot]', author_kind: 'hive', ci_activity: { head: '9bdf058', state: 'running', active: true, caption: 'CI running', checks_passed: 4, checks_total: 11, source: 'checks', observed_at: seen }, review_activity: { head: '9bdf058', state: 'adjudicating', active: true, caption: 'Review 5/5 · verdicts in · aggregating', perspectives_done: 5, perspectives_total: 5, source: 'verified-review-bundle', observed_at: seen } }, stages, ctx); - assert.strictEqual(lit(both), 2, 'CI running + adjudicating: both tracks, no third: ' + strip(both)); - assert.ok(both.includes('CI 4/11 · 7 running') && both.includes('Review 5/5 · adjudicating'), both); + assert.strictEqual(lit(both), 1, 'CI running + adjudicating: CI alone is lit: ' + strip(both)); + assert.ok(both.includes('CI 4/11 · 7 running') && !both.includes('Review 5/5 · adjudicating'), both); + assert.ok(/
  • ]*data-motion)[^>]*>[\s\S]*?review in progress<\/span>/.test(both) && both.includes('Review 5/5 · adjudicating · ') && both.includes(' · review in progress behind CI'), 'Review is dim, its words in the tooltip with the queued note: ' + both); + // hivecommons/hive#17335: @Karibhou pushed c15a343 to PR #17308 while the + // previous review was being re-adjudicated — the row lit CI 7/11 AND + // Review 5/5 amber at once. Now CI is the one lit chevron; Review is dim + // and reads "re-review queued". + const pushedAt = new Date(now - 3 * 60000).toISOString(); + const pushed = stageTrackerRowHtml({ repo: 'hivecommons/hive', number: 17308, kind: 'pr', stage: 50, display_column: 50, head: 'c15a343', author: 'Karibhou', author_kind: 'human', + push: { state: 'pushed', login: 'Karibhou', sha: 'c15a343', since: pushedAt, next: 're-review' }, + ci_activity: { head: 'c15a343', state: 'running', active: true, caption: 'CI running', checks_passed: 7, checks_total: 11, source: 'checks', observed_at: seen }, + review_activity: { head: 'c15a343', state: 'adjudicating', active: true, caption: 'Review 5/5 · verdicts in · aggregating', perspectives_done: 5, perspectives_total: 5, source: 'verified-review-bundle', observed_at: seen } }, stages, ctx); + assert.strictEqual(lit(pushed), 1, 'a push during review lights exactly one chevron: ' + strip(pushed)); + assert.ok(/
  • ]*>[\s\S]*?CI 7\/11 · 4 running<\/span>/.test(pushed), 'CI is the lit chevron: ' + strip(pushed)); + assert.ok(/
  • ]*data-motion)[^>]*>[\s\S]*?re-review queued<\/span>/.test(pushed), 'Review is dim with the re-review note, no second amber: ' + strip(pushed)); + assert.ok(pushed.includes(' · re-review queued behind CI'), 'the Review tooltip explains the demotion: ' + pushed); } // Merged: the lit cap is the only chevron with hover text. row = stageTrackerRowHtml({ repo: 'acme/console', number: 106, kind: 'pr', stage: 110 }, stages, ctx); diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index a3090109ea..4109e4a99b 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -429,6 +429,12 @@ .ham-seg.ham-activity-track.active.ham-stalled { animation: none; } .ham-seg.ham-activity-track.active.ham-stalled::before { display: none; } .ham-seg.ham-activity-track.ham-stalled .ham-actor-ico { margin-left: var(--sp-1); flex: 0 0 auto; } + /* A track that would light but is not the row's lead (Review while CI + runs on a freshly pushed head, hivecommons/hive#17335) stays dim — + the muted field, the ring alone — with a small queued note; never a + second amber chevron. Exactly one lit stage per row. */ + .ham-seg.ham-activity-track.ham-track-queued { background: var(--panel-strong); color: var(--muted); box-shadow: none; opacity: 1; animation: none; } + .ham-seg.ham-activity-track .ham-track-note { margin-left: var(--sp-1); font-size: var(--fs-2xs); color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* The CI / Review glyph is a ring of steps (checks / perspectives, hivecommons/hive#16599): filled clockwise from twelve — done in the track's colour, failed red, the rest the muted track. While the diff --git a/src/pkg/dashboard/static-src/js/tracker-preparation.js b/src/pkg/dashboard/static-src/js/tracker-preparation.js index 167deb6022..5e2ca52a49 100644 --- a/src/pkg/dashboard/static-src/js/tracker-preparation.js +++ b/src/pkg/dashboard/static-src/js/tracker-preparation.js @@ -111,10 +111,45 @@ return out; }); } + // Operator-readable words for a ticket's place: the scheduler's + // "unverified"/"preparation" vocabulary stays in the data, not the row + // (hivecommons/hive#17335: "Recorded preparation owner · unverified · + // Head changed; current preparation unverified" read as jargon). function stageTrackerPreparationPlace(entry) { - if (entry.state === 'unverified') return 'Recorded preparation ' + (entry.role === 'owner' ? 'owner' : 'ticket') + ' · unverified'; + if (entry.state === 'unverified') return entry.role === 'owner' ? 'Recorded first for the base refresh' : 'Recorded base-refresh ticket'; if (entry.role === 'owner') return 'Preparing'; - return entry.position > 0 ? 'Waiting ' + stageTrackerOrdinal(entry.position) + ' for preparation' : 'Waiting for preparation · position unverified'; + return entry.position > 0 ? 'Waiting ' + stageTrackerOrdinal(entry.position) + ' for preparation' : 'Waiting for preparation · position not yet confirmed'; + } + // Why a recorded ticket is not (yet) confirmed, in plain language. The + // server's Detail strings are the signal; this is their wording. + function stageTrackerPreparationPlainDetail(entry) { + const d = String(entry.ticket && entry.ticket.detail || '').trim(); + const head7 = entry.head ? String(entry.head).slice(0, 7) : ''; + if (/^Head changed/i.test(d)) return 'ticket issued for an earlier head' + (head7 ? ' · re-checked on ' + head7 : ''); + if (/absent from current open snapshot/i.test(d)) return 'PR missing from the latest snapshot'; + if (/^Current head unknown/i.test(d)) return 'current head not known yet'; + if (/^Ticket age unknown/i.test(d)) return 'ticket time unknown'; + if (!d) return 'not yet confirmed for the current head'; + return d.replace(/\bunverified\b/gi, 'not yet confirmed').replace(/\bpreparation\b/gi, 'base refresh'); + } + function stageTrackerPreparationIssued(ticket) { + const age = stageTrackerPreparationAge(ticket, _stageTrackerPreparationNow); + return age === 'age unknown' ? 'ticket time unknown' : 'ticket issued ' + age + ' ago'; + } + // The pushed row's caption in operator words: who pushed what, and what + // runs next on it. Anything that is not the server's push caption passes through. + function stageTrackerPreparationCaption(item) { + const caption = item.caption || item.reason || ''; + const push = item && item.push; + if (!push || push.state !== 'pushed' || !/^(push seen|new head observed)\b/i.test(caption)) return caption; + const sha7 = push.sha ? String(push.sha).slice(0, 7) : ''; + const ago = /^push seen (.+?) ago → /.exec(caption); + const when = ago ? ago[1] + ' ago' : /just now/.test(caption) ? 'just now' : ''; + const ci = item.ci_activity && item.ci_activity.state === 'running' && (!item.head || !item.ci_activity.head || item.ci_activity.head === item.head); + const rereview = push.next === 're-review' || /re-review/.test(caption); + return ['New push' + (sha7 ? ' ' + sha7 : '') + (push.login ? ' by @' + push.login : '') + (when ? ' ' + when : '') + + ' → ' + (ci ? 'CI running' : 'CI queued') + (rereview ? ', review will rerun' : '')] + .concat(rereview ? ['previous review no longer applies'] : []).join(' · '); } function stageTrackerPreparationVisualSync(data, listedRows, pageRows, stages, nowMs) { _stageTrackerPreparationShown = new Map(); @@ -158,8 +193,8 @@ for (const e of group.members) { details.push('#' + e.ticket.number + ' · ' + stageTrackerPreparationPlace(e) + (e.location === 'page' ? '' : e.location === 'offpage' ? ' · another page or collapsed repo' : ' · hidden by filters or absent from snapshot') - + (e.state === 'unverified' ? ' · ' + (e.ticket.detail || 'current identity or eligibility unknown') : '') - + ' · ticket age ' + stageTrackerPreparationAge(e.ticket, _stageTrackerPreparationNow) + + (e.state === 'unverified' ? ' · ' + stageTrackerPreparationPlainDetail(e) : '') + + ' · ' + stageTrackerPreparationIssued(e.ticket) + ' · ticket head ' + (e.ticketHead || 'unknown') + ' · current head ' + (e.head || 'unknown')); } @@ -241,16 +276,17 @@ stageTrackerPreparationMark(item); const event = ctx && ctx.events && ctx.events[key]; const eventHtml = typeof stageTrackerEventHtml === 'function' ? stageTrackerEventHtml(key, ctx) : ''; - const caption = item.caption || item.reason || (e.state === 'current' ? e.ticket.pipeline : '') || ''; - const captionVisible = caption && event && event.text && event.text.includes(caption) + const rawCaption = item.caption || item.reason || (e.state === 'current' ? e.ticket.pipeline : '') || ''; + const caption = stageTrackerPreparationCaption(item) || rawCaption; + const captionVisible = rawCaption && event && event.text && event.text.includes(rawCaption) && eventHtml && !eventHtml.includes('cue-event-tucked'); const parts = caption && !captionVisible ? [caption] : []; if (!caption) parts.push('Current pipeline blocker unknown'); const preparation = e.state === 'unverified' - ? stageTrackerPreparationPlace(e) + ' · ' + (e.ticket.detail || 'current identity or eligibility unknown') + ? stageTrackerPreparationPlace(e) + ' · ' + stageTrackerPreparationPlainDetail(e) : e.role === 'owner' ? 'preparing base' : 'queued for base refresh' + (e.ticket.behind ? ' behind PR #' + e.ticket.behind : ' · owner unknown'); if (!caption.split(/\s+[·—]\s+/).includes(preparation)) parts.push(preparation); - parts.push('ticket age ' + stageTrackerPreparationAge(e.ticket, _stageTrackerPreparationNow)); + parts.push(stageTrackerPreparationIssued(e.ticket)); if (e.row.nested) parts.push('shown under issue #' + e.row.host.number); return eventHtml + `
    ${esc(parts.join(' · '))}
    `; } diff --git a/src/pkg/dashboard/static-src/js/tracker-queue.js b/src/pkg/dashboard/static-src/js/tracker-queue.js index 8f3544437c..2143f5680c 100644 --- a/src/pkg/dashboard/static-src/js/tracker-queue.js +++ b/src/pkg/dashboard/static-src/js/tracker-queue.js @@ -36,7 +36,7 @@ function stageTrackerPreparationWord(p) { if (!p) return ''; if (p.state === 'inactive') return 'Inactive preparation ticket · ' + (p.detail || 'not currently eligible'); - if (p.state !== 'current') return (p.role === 'owner' ? 'Recorded preparation owner' : 'Recorded waiting ticket') + ' · ' + (p.detail || 'current state unknown'); + if (p.state !== 'current') return (p.role === 'owner' ? 'Recorded first for the base refresh' : 'Recorded base-refresh ticket') + ' · ' + (p.detail || 'current state unknown').replace(/\bunverified\b/gi, 'not yet confirmed').replace(/\bpreparation\b/gi, 'base refresh'); return p.role === 'owner' ? 'Preparing base' : (Number(p.behind) > 0 ? 'Waiting for preparation behind #' + Number(p.behind) : 'Waiting for preparation; owner not confirmed'); } function stageTrackerPreparationAge(p, nowMs) { @@ -50,7 +50,7 @@ if (!p || p.state === 'inactive') return ''; if (typeof stageTrackerPreparationRepresented === 'function' && stageTrackerPreparationRepresented(item)) return ''; const word = stageTrackerPreparationWord(p); - const label = p.state === 'current' ? word : 'Preparation owner · unverified'; + const label = p.state === 'current' ? word : 'Base refresh · not yet confirmed'; return `${esc(label)}`; } function stageTrackerPreparationPopHtml(queues, nowMs) { diff --git a/src/pkg/dashboard/static-src/js/tracker-row-strip.js b/src/pkg/dashboard/static-src/js/tracker-row-strip.js index 3e4683ef20..3266e1d924 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-strip.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-strip.js @@ -273,6 +273,41 @@ return total > 0 && done < total && !settledWords.includes(a.state); } + // Whether a CI / Review track would light on its own: it runs on the + // current head, it is the stage's own track (column 50), or it is the + // stalled blocker of a row with nothing in motion. + function stageTrackerTrackWouldLight(item, kind, current, stalledTrack) { + if (stageTrackerTrackRunning(item, kind)) return true; + if (current && typeof stageTrackerStageTrack === 'function' && stageTrackerStageTrack(item) === kind) return true; + return stalledTrack === kind; + } + + // Pure: the ONE lit track of column 50 — exactly one chevron per row is + // the current stage. When both tracks would light (a push lands while + // the previous review is still being re-adjudicated: CI running AND + // Review adjudicating, hivecommons/hive#17335 under PR #17308), the + // earliest wins — CI — and Review is drawn dim with a "re-review + // queued" note instead of a second amber chevron. '' when neither + // track lights (the stage chevron is the row's one active chevron). + function stageTrackerLeadTrack(item, current, stalledTrack) { + return ['ci', 'review'].find(kind => stageTrackerTrackWouldLight(item, kind, current, stalledTrack)) || ''; + } + + // The muted note a demoted (would-light but not lead) track wears: + // "re-review queued" for a Review whose head was just pushed, "review + // in progress" while a reviewer genuinely runs beside CI, "review + // queued" / "CI queued" otherwise. + function stageTrackerQueuedTrackNote(item, kind) { + if (kind === 'ci') return 'CI queued'; + const push = item && item.push; + const code = item && item.code_activity; + const newHead = !!((code && code.head === item.head && code.state === 'pushed') || (push && push.state === 'pushed' && push.sha === item.head) || (typeof stageTrackerHiveOwesReReview === 'function' && stageTrackerHiveOwesReReview(item))); + if (newHead) return 're-review queued'; + const a = item && item.review_activity; + const st = a && a.head === item.head ? a.state : ''; + return st === 'reviewing' || st === 'adjudicating' ? 'review in progress' : 'review queued'; + } + // Pure: "12m ago" beside a timestamp; "just now" under a minute. function stageTrackerAgoWord(atMs, nowMs) { const mins = Math.floor((nowMs - atMs) / 60000); return !Number.isFinite(mins) || mins < 1 ? 'just now' : mins < 60 ? mins + 'm ago' : mins < 1440 ? Math.floor(mins / 60) + 'h ago' : Math.floor(mins / 1440) + 'd ago'; } // Evidence is supplied independently by the backend. A native 050 label @@ -307,7 +342,7 @@ const settledState = ['approved', 'changes_requested', 'human_decision', 'passing', 'failing', 'skipped', 'missing', 'waiting_ci', 'not_started', 'not_requested', 'closed', 'unverified'].includes(state); const fresh = Number.isFinite(observed) && !stale; const known = matches && state !== 'unknown' && (settledState || fresh); - const active = known && fresh && a.active; + let active = known && fresh && a.active; const perspectives = matches && kind === 'review' && Array.isArray(a.perspectives) ? a.perspectives : []; const perspectiveMark = v => v === 'approve' ? '✓' : ['changes_requested', 'reject'].includes(v) ? '✗' : v === 'requires_human' ? 'requires human' : String(v || '?'); const perspectiveLine = p => String(p.name || 'perspective') + ' ' + perspectiveMark(p.verdict) + (p.summary ? ': ' + p.summary : ''); @@ -317,18 +352,29 @@ const finding = matches && (state === 'failing' || state === 'changes_requested'); // A complete verdict parked on a person is settled (muted icon). const settled = matches && state === 'human_decision' && (!known || !a.active); - // ACTIVE = filled amber with its words; 1 ≤ active ≤ 2 on a row. A - // track is active while it genuinely runs on the current head, when - // it is the stage's own track (stageTrackerStageTrack), or when it is - // the stalled blocker of a row with nothing in motion (opts.stalled, - // still amber-muted). Everything else is the icon alone — green for - // a pass, red for a finding, neutral when not run or decided — with - // its count words in the tooltip (hivecommons/hive#16599). + // ACTIVE = filled amber with its words; exactly ONE active chevron on + // a row. A track would light while it genuinely runs on the current + // head, when it is the stage's own track (stageTrackerStageTrack), or + // when it is the stalled blocker of a row with nothing in motion + // (opts.stalled, still amber-muted) — but only the row's lead track + // (opts.lead, the earliest that would light; stageTrackerLeadTrack) + // is active. A demoted track is dim with a muted queued note + // (hivecommons/hive#17335: CI 7/11 and Review 5/5 both amber after a + // push). Everything else is the icon alone — green for a pass, red + // for a finding, neutral when not run or decided — with its count + // words in the tooltip (hivecommons/hive#16599). const running = stageTrackerTrackRunning(item, kind); const stageTrack = current && typeof stageTrackerStageTrack === 'function' && stageTrackerStageTrack(item) === kind; const stalled = !!(opts && opts.stalled) && current && !running; - const lit = running || stageTrack || stalled; - const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') : finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo'; + const wouldLight = running || stageTrack || stalled; + // No lead named (harnesses lifting this function alone): this track leads itself. + const lead = opts && opts.lead ? opts.lead : (wouldLight ? kind : ''); + const lit = wouldLight && lead === kind; + const queued = wouldLight && !lit; + const queuedNote = queued && typeof stageTrackerQueuedTrackNote === 'function' ? stageTrackerQueuedTrackNote(item, kind) : ''; + // A demoted track is still: no pulse beside the lead. + if (queued) active = false; + const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') : (finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo') + (queued ? ' ham-track-queued' : ''); const approvalPending = kind === 'ci' && matches ? stageTrackerWorkflowApprovalPending(a) : 0; const humanAction = approvalPending > 0 ? STAGE_TRACKER_WORKFLOW_APPROVAL_TIP : kind === 'review' && state === 'human_decision' ? 'Needs a person\'s decision' : ''; const personIco = stalled && humanAction ? stageTrackerIcon('human', 'ham-ico ham-actor-ico', humanAction) : ''; @@ -366,7 +412,7 @@ const codeFresh = code && code.head === item.head && code.source === 'fix-dispatch+successful-edit+verified-git-worktree' && code.active && code.state === 'fixing' && Number.isFinite(codeObserved) && codeObserved <= clock && clock - codeObserved <= activityFreshMS; if (!codeFresh) decided = decided.replace(/>(?:Fixing|Remediating)(?=\s|<)/g, '>Fix requested'); const sha7 = item.head ? String(item.head).slice(0, 7) : ''; - const lead = current && ownsPR && typeof stageTrackerTrackLead === 'function' ? stageTrackerTrackLead(item) : null; + const waitLead = current && ownsPR && typeof stageTrackerTrackLead === 'function' ? stageTrackerTrackLead(item) : null; // Only an active track carries words; an inactive one is its icon // (ring) in the pass / fail / neutral colour, words in the tooltip. const verdict = finished ? 'pass' : finding ? 'fail' : ''; @@ -386,10 +432,14 @@ (matches && a.actor ? ' · actor ' + a.actor : '') + (codeNote || contextWord ? ' · ' + (codeNote || contextWord) : '') + (hold ? ' · ' + (hold.pill || 'Held by @' + hold.by) + (hold.reason ? ' · ' + hold.reason : '') : '') + - (lead ? ' · hive is waiting on ' + lead.waitingOn + (lead.newHead && sha7 ? ' for new head ' + sha7 : '') : ''); + (waitLead ? ' · hive is waiting on ' + waitLead.waitingOn + (waitLead.newHead && sha7 ? ' for new head ' + sha7 : '') : '') + + (queuedNote ? ' · ' + queuedNote + ' behind ' + (lead === 'ci' ? 'CI' : 'Review') : ''); const tipID = 'ham-track-tip-' + [item.repo || '', item.kind || '', item.number || 0, kind].map(x => encodeURIComponent(String(x))).join('-'); - const copy = `${evidenceLink}${personIco}`; - return `
  • ${copy}${esc(fullTip)}${decided ? `${decided}` : ''}
  • `; + // The demoted track's note sits outside the copy span: inactive + // chevrons carry no words, only this muted queued note. + const queuedHtml = queuedNote ? `${esc(queuedNote)}` : ''; + const copy = `${evidenceLink}${queuedHtml}${personIco}`; + return `
  • ${copy}${esc(fullTip)}${decided ? `${decided}` : ''}
  • `; } // Chevrons for one item. range bounds the columns the item owns (an @@ -463,8 +513,12 @@ // Column 50 is the row's phase and no track moves: one track is // filled stalled so the row always shows where it is (#16599). const stalledTrack = tracksRunning === 0 && segs.some(sg => sg.number === 50 && sg.state === 'active') && typeof stageTrackerStalledTrack === 'function' ? stageTrackerStalledTrack(item) : ''; + // Exactly one lit track (hivecommons/hive#17335): the earliest that + // would light leads; the other is dim with a queued note. + const col50 = segs.find(sg => sg.number === 50); + const leadTrack = col50 && typeof stageTrackerLeadTrack === 'function' ? stageTrackerLeadTrack(item, col50.state === 'active', stalledTrack) : ''; return segs.map(sg => { - if (sg.number === 50) return ['ci', 'review'].map(kind => stageTrackerActivityTrackHtml(item, kind, sg, sg.number < from || sg.number > to, nowMs, { stalled: stalledTrack === kind })).join(''); + if (sg.number === 50) return ['ci', 'review'].map(kind => stageTrackerActivityTrackHtml(item, kind, sg, sg.number < from || sg.number > to, nowMs, { stalled: stalledTrack === kind, lead: leadTrack })).join(''); if (sg.number < from || sg.number > to) return ``; const sentinel = !!(sg.detour && sg.detour.sentinel); const sentinelSuffix = !!(sg.detour && sg.detour.sentinelSuffix); @@ -702,12 +756,14 @@ // carries none of these and sits on a hive-driven stage is the hive's // to work through, so the dashboard must not dress it as a human call. const STAGE_TRACKER_HUMAN_MODS = ['hold', 'unauthorized', 'needs-human', 'needs-decision', 'needs-rebase', 'blocked', 'stalled']; - const STAGE_TRACKER_HANDLED_TEXT = 'stage ↓'; + // The pill says what happened in words ("stage ↓" read as a sort glyph, + // hivecommons/hive#17335); after a push it says what caused the fall. + const STAGE_TRACKER_HANDLED_TEXT = 'stage reset', STAGE_TRACKER_HANDLED_PUSH_TEXT = 'stage reset by push'; const STAGE_TRACKER_HANDLED_NOTE = 'the hive is handling it — no action needed; clears on the next forward step'; // True when the item is regressed but nothing about it waits on a // person: no human-gate modifier and not on a human-gated stage. Such a - // row gets a muted "stage ↓" pill and stays out of "Needs attention". + // row gets a muted "stage reset" pill and stays out of "Needs attention". function stageTrackerRegressionHandled(item) { const mods = Array.isArray(item.modifiers) ? item.modifiers : []; if (mods.indexOf('regressed') < 0) return false; @@ -887,10 +943,11 @@ .sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); if (!mods.length) return sentinel; // A regression the hive is working through yields the lead pill to any - // other modifier and, alone, draws muted as "stage ↓" rather than red. + // other modifier and, alone, draws muted as "stage reset" rather than red. const handled = stageTrackerRegressionHandled(item); if (handled && mods.length > 1) mods.push(mods.shift()); - let text = handled && mods[0] === 'regressed' ? STAGE_TRACKER_HANDLED_TEXT : (STAGE_TRACKER_MOD_TEXT[mods[0]] || mods[0].replace(/-/g, ' ')); + const pushReset = !!(item.push && item.push.state === 'pushed') || /\b(push|new head|head changed)\b/i.test(String(item.regressed_reason || '')); + let text = handled && mods[0] === 'regressed' ? (pushReset ? STAGE_TRACKER_HANDLED_PUSH_TEXT : STAGE_TRACKER_HANDLED_TEXT) : (STAGE_TRACKER_MOD_TEXT[mods[0]] || mods[0].replace(/-/g, ' ')); // A hold the stage-label pass could attribute names who set it and why // ("Held by hive · reporter trust (issue #N by @X, contributor)"), so the // operator is not left reading "hold +1" (hivecommons/hive#15020). diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index c2e2f4bd2f..dcebded5c4 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1772,6 +1772,12 @@ .ham-seg.ham-activity-track.active.ham-stalled { animation: none; } .ham-seg.ham-activity-track.active.ham-stalled::before { display: none; } .ham-seg.ham-activity-track.ham-stalled .ham-actor-ico { margin-left: var(--sp-1); flex: 0 0 auto; } + /* A track that would light but is not the row's lead (Review while CI + runs on a freshly pushed head, hivecommons/hive#17335) stays dim — + the muted field, the ring alone — with a small queued note; never a + second amber chevron. Exactly one lit stage per row. */ + .ham-seg.ham-activity-track.ham-track-queued { background: var(--panel-strong); color: var(--muted); box-shadow: none; opacity: 1; animation: none; } + .ham-seg.ham-activity-track .ham-track-note { margin-left: var(--sp-1); font-size: var(--fs-2xs); color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* The CI / Review glyph is a ring of steps (checks / perspectives, hivecommons/hive#16599): filled clockwise from twelve — done in the track's colour, failed red, the rest the muted track. While the @@ -18689,6 +18695,41 @@

    Where to get help

    return total > 0 && done < total && !settledWords.includes(a.state); } + // Whether a CI / Review track would light on its own: it runs on the + // current head, it is the stage's own track (column 50), or it is the + // stalled blocker of a row with nothing in motion. + function stageTrackerTrackWouldLight(item, kind, current, stalledTrack) { + if (stageTrackerTrackRunning(item, kind)) return true; + if (current && typeof stageTrackerStageTrack === 'function' && stageTrackerStageTrack(item) === kind) return true; + return stalledTrack === kind; + } + + // Pure: the ONE lit track of column 50 — exactly one chevron per row is + // the current stage. When both tracks would light (a push lands while + // the previous review is still being re-adjudicated: CI running AND + // Review adjudicating, hivecommons/hive#17335 under PR #17308), the + // earliest wins — CI — and Review is drawn dim with a "re-review + // queued" note instead of a second amber chevron. '' when neither + // track lights (the stage chevron is the row's one active chevron). + function stageTrackerLeadTrack(item, current, stalledTrack) { + return ['ci', 'review'].find(kind => stageTrackerTrackWouldLight(item, kind, current, stalledTrack)) || ''; + } + + // The muted note a demoted (would-light but not lead) track wears: + // "re-review queued" for a Review whose head was just pushed, "review + // in progress" while a reviewer genuinely runs beside CI, "review + // queued" / "CI queued" otherwise. + function stageTrackerQueuedTrackNote(item, kind) { + if (kind === 'ci') return 'CI queued'; + const push = item && item.push; + const code = item && item.code_activity; + const newHead = !!((code && code.head === item.head && code.state === 'pushed') || (push && push.state === 'pushed' && push.sha === item.head) || (typeof stageTrackerHiveOwesReReview === 'function' && stageTrackerHiveOwesReReview(item))); + if (newHead) return 're-review queued'; + const a = item && item.review_activity; + const st = a && a.head === item.head ? a.state : ''; + return st === 'reviewing' || st === 'adjudicating' ? 'review in progress' : 'review queued'; + } + // Pure: "12m ago" beside a timestamp; "just now" under a minute. function stageTrackerAgoWord(atMs, nowMs) { const mins = Math.floor((nowMs - atMs) / 60000); return !Number.isFinite(mins) || mins < 1 ? 'just now' : mins < 60 ? mins + 'm ago' : mins < 1440 ? Math.floor(mins / 60) + 'h ago' : Math.floor(mins / 1440) + 'd ago'; } // Evidence is supplied independently by the backend. A native 050 label @@ -18723,7 +18764,7 @@

    Where to get help

    const settledState = ['approved', 'changes_requested', 'human_decision', 'passing', 'failing', 'skipped', 'missing', 'waiting_ci', 'not_started', 'not_requested', 'closed', 'unverified'].includes(state); const fresh = Number.isFinite(observed) && !stale; const known = matches && state !== 'unknown' && (settledState || fresh); - const active = known && fresh && a.active; + let active = known && fresh && a.active; const perspectives = matches && kind === 'review' && Array.isArray(a.perspectives) ? a.perspectives : []; const perspectiveMark = v => v === 'approve' ? '✓' : ['changes_requested', 'reject'].includes(v) ? '✗' : v === 'requires_human' ? 'requires human' : String(v || '?'); const perspectiveLine = p => String(p.name || 'perspective') + ' ' + perspectiveMark(p.verdict) + (p.summary ? ': ' + p.summary : ''); @@ -18733,18 +18774,29 @@

    Where to get help

    const finding = matches && (state === 'failing' || state === 'changes_requested'); // A complete verdict parked on a person is settled (muted icon). const settled = matches && state === 'human_decision' && (!known || !a.active); - // ACTIVE = filled amber with its words; 1 ≤ active ≤ 2 on a row. A - // track is active while it genuinely runs on the current head, when - // it is the stage's own track (stageTrackerStageTrack), or when it is - // the stalled blocker of a row with nothing in motion (opts.stalled, - // still amber-muted). Everything else is the icon alone — green for - // a pass, red for a finding, neutral when not run or decided — with - // its count words in the tooltip (hivecommons/hive#16599). + // ACTIVE = filled amber with its words; exactly ONE active chevron on + // a row. A track would light while it genuinely runs on the current + // head, when it is the stage's own track (stageTrackerStageTrack), or + // when it is the stalled blocker of a row with nothing in motion + // (opts.stalled, still amber-muted) — but only the row's lead track + // (opts.lead, the earliest that would light; stageTrackerLeadTrack) + // is active. A demoted track is dim with a muted queued note + // (hivecommons/hive#17335: CI 7/11 and Review 5/5 both amber after a + // push). Everything else is the icon alone — green for a pass, red + // for a finding, neutral when not run or decided — with its count + // words in the tooltip (hivecommons/hive#16599). const running = stageTrackerTrackRunning(item, kind); const stageTrack = current && typeof stageTrackerStageTrack === 'function' && stageTrackerStageTrack(item) === kind; const stalled = !!(opts && opts.stalled) && current && !running; - const lit = running || stageTrack || stalled; - const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') : finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo'; + const wouldLight = running || stageTrack || stalled; + // No lead named (harnesses lifting this function alone): this track leads itself. + const lead = opts && opts.lead ? opts.lead : (wouldLight ? kind : ''); + const lit = wouldLight && lead === kind; + const queued = wouldLight && !lit; + const queuedNote = queued && typeof stageTrackerQueuedTrackNote === 'function' ? stageTrackerQueuedTrackNote(item, kind) : ''; + // A demoted track is still: no pulse beside the lead. + if (queued) active = false; + const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') : (finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo') + (queued ? ' ham-track-queued' : ''); const approvalPending = kind === 'ci' && matches ? stageTrackerWorkflowApprovalPending(a) : 0; const humanAction = approvalPending > 0 ? STAGE_TRACKER_WORKFLOW_APPROVAL_TIP : kind === 'review' && state === 'human_decision' ? 'Needs a person\'s decision' : ''; const personIco = stalled && humanAction ? stageTrackerIcon('human', 'ham-ico ham-actor-ico', humanAction) : ''; @@ -18782,7 +18834,7 @@

    Where to get help

    const codeFresh = code && code.head === item.head && code.source === 'fix-dispatch+successful-edit+verified-git-worktree' && code.active && code.state === 'fixing' && Number.isFinite(codeObserved) && codeObserved <= clock && clock - codeObserved <= activityFreshMS; if (!codeFresh) decided = decided.replace(/>(?:Fixing|Remediating)(?=\s|<)/g, '>Fix requested'); const sha7 = item.head ? String(item.head).slice(0, 7) : ''; - const lead = current && ownsPR && typeof stageTrackerTrackLead === 'function' ? stageTrackerTrackLead(item) : null; + const waitLead = current && ownsPR && typeof stageTrackerTrackLead === 'function' ? stageTrackerTrackLead(item) : null; // Only an active track carries words; an inactive one is its icon // (ring) in the pass / fail / neutral colour, words in the tooltip. const verdict = finished ? 'pass' : finding ? 'fail' : ''; @@ -18802,10 +18854,14 @@

    Where to get help

    (matches && a.actor ? ' · actor ' + a.actor : '') + (codeNote || contextWord ? ' · ' + (codeNote || contextWord) : '') + (hold ? ' · ' + (hold.pill || 'Held by @' + hold.by) + (hold.reason ? ' · ' + hold.reason : '') : '') + - (lead ? ' · hive is waiting on ' + lead.waitingOn + (lead.newHead && sha7 ? ' for new head ' + sha7 : '') : ''); + (waitLead ? ' · hive is waiting on ' + waitLead.waitingOn + (waitLead.newHead && sha7 ? ' for new head ' + sha7 : '') : '') + + (queuedNote ? ' · ' + queuedNote + ' behind ' + (lead === 'ci' ? 'CI' : 'Review') : ''); const tipID = 'ham-track-tip-' + [item.repo || '', item.kind || '', item.number || 0, kind].map(x => encodeURIComponent(String(x))).join('-'); - const copy = `${evidenceLink}${personIco}`; - return `
  • ${copy}${esc(fullTip)}${decided ? `${decided}` : ''}
  • `; + // The demoted track's note sits outside the copy span: inactive + // chevrons carry no words, only this muted queued note. + const queuedHtml = queuedNote ? `${esc(queuedNote)}` : ''; + const copy = `${evidenceLink}${queuedHtml}${personIco}`; + return `
  • ${copy}${esc(fullTip)}${decided ? `${decided}` : ''}
  • `; } // Chevrons for one item. range bounds the columns the item owns (an @@ -18879,8 +18935,12 @@

    Where to get help

    // Column 50 is the row's phase and no track moves: one track is // filled stalled so the row always shows where it is (#16599). const stalledTrack = tracksRunning === 0 && segs.some(sg => sg.number === 50 && sg.state === 'active') && typeof stageTrackerStalledTrack === 'function' ? stageTrackerStalledTrack(item) : ''; + // Exactly one lit track (hivecommons/hive#17335): the earliest that + // would light leads; the other is dim with a queued note. + const col50 = segs.find(sg => sg.number === 50); + const leadTrack = col50 && typeof stageTrackerLeadTrack === 'function' ? stageTrackerLeadTrack(item, col50.state === 'active', stalledTrack) : ''; return segs.map(sg => { - if (sg.number === 50) return ['ci', 'review'].map(kind => stageTrackerActivityTrackHtml(item, kind, sg, sg.number < from || sg.number > to, nowMs, { stalled: stalledTrack === kind })).join(''); + if (sg.number === 50) return ['ci', 'review'].map(kind => stageTrackerActivityTrackHtml(item, kind, sg, sg.number < from || sg.number > to, nowMs, { stalled: stalledTrack === kind, lead: leadTrack })).join(''); if (sg.number < from || sg.number > to) return ``; const sentinel = !!(sg.detour && sg.detour.sentinel); const sentinelSuffix = !!(sg.detour && sg.detour.sentinelSuffix); @@ -19118,12 +19178,14 @@

    Where to get help

    // carries none of these and sits on a hive-driven stage is the hive's // to work through, so the dashboard must not dress it as a human call. const STAGE_TRACKER_HUMAN_MODS = ['hold', 'unauthorized', 'needs-human', 'needs-decision', 'needs-rebase', 'blocked', 'stalled']; - const STAGE_TRACKER_HANDLED_TEXT = 'stage ↓'; + // The pill says what happened in words ("stage ↓" read as a sort glyph, + // hivecommons/hive#17335); after a push it says what caused the fall. + const STAGE_TRACKER_HANDLED_TEXT = 'stage reset', STAGE_TRACKER_HANDLED_PUSH_TEXT = 'stage reset by push'; const STAGE_TRACKER_HANDLED_NOTE = 'the hive is handling it — no action needed; clears on the next forward step'; // True when the item is regressed but nothing about it waits on a // person: no human-gate modifier and not on a human-gated stage. Such a - // row gets a muted "stage ↓" pill and stays out of "Needs attention". + // row gets a muted "stage reset" pill and stays out of "Needs attention". function stageTrackerRegressionHandled(item) { const mods = Array.isArray(item.modifiers) ? item.modifiers : []; if (mods.indexOf('regressed') < 0) return false; @@ -19303,10 +19365,11 @@

    Where to get help

    .sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); if (!mods.length) return sentinel; // A regression the hive is working through yields the lead pill to any - // other modifier and, alone, draws muted as "stage ↓" rather than red. + // other modifier and, alone, draws muted as "stage reset" rather than red. const handled = stageTrackerRegressionHandled(item); if (handled && mods.length > 1) mods.push(mods.shift()); - let text = handled && mods[0] === 'regressed' ? STAGE_TRACKER_HANDLED_TEXT : (STAGE_TRACKER_MOD_TEXT[mods[0]] || mods[0].replace(/-/g, ' ')); + const pushReset = !!(item.push && item.push.state === 'pushed') || /\b(push|new head|head changed)\b/i.test(String(item.regressed_reason || '')); + let text = handled && mods[0] === 'regressed' ? (pushReset ? STAGE_TRACKER_HANDLED_PUSH_TEXT : STAGE_TRACKER_HANDLED_TEXT) : (STAGE_TRACKER_MOD_TEXT[mods[0]] || mods[0].replace(/-/g, ' ')); // A hold the stage-label pass could attribute names who set it and why // ("Held by hive · reporter trust (issue #N by @X, contributor)"), so the // operator is not left reading "hold +1" (hivecommons/hive#15020). @@ -22544,10 +22607,45 @@

    All labels

    return out; }); } + // Operator-readable words for a ticket's place: the scheduler's + // "unverified"/"preparation" vocabulary stays in the data, not the row + // (hivecommons/hive#17335: "Recorded preparation owner · unverified · + // Head changed; current preparation unverified" read as jargon). function stageTrackerPreparationPlace(entry) { - if (entry.state === 'unverified') return 'Recorded preparation ' + (entry.role === 'owner' ? 'owner' : 'ticket') + ' · unverified'; + if (entry.state === 'unverified') return entry.role === 'owner' ? 'Recorded first for the base refresh' : 'Recorded base-refresh ticket'; if (entry.role === 'owner') return 'Preparing'; - return entry.position > 0 ? 'Waiting ' + stageTrackerOrdinal(entry.position) + ' for preparation' : 'Waiting for preparation · position unverified'; + return entry.position > 0 ? 'Waiting ' + stageTrackerOrdinal(entry.position) + ' for preparation' : 'Waiting for preparation · position not yet confirmed'; + } + // Why a recorded ticket is not (yet) confirmed, in plain language. The + // server's Detail strings are the signal; this is their wording. + function stageTrackerPreparationPlainDetail(entry) { + const d = String(entry.ticket && entry.ticket.detail || '').trim(); + const head7 = entry.head ? String(entry.head).slice(0, 7) : ''; + if (/^Head changed/i.test(d)) return 'ticket issued for an earlier head' + (head7 ? ' · re-checked on ' + head7 : ''); + if (/absent from current open snapshot/i.test(d)) return 'PR missing from the latest snapshot'; + if (/^Current head unknown/i.test(d)) return 'current head not known yet'; + if (/^Ticket age unknown/i.test(d)) return 'ticket time unknown'; + if (!d) return 'not yet confirmed for the current head'; + return d.replace(/\bunverified\b/gi, 'not yet confirmed').replace(/\bpreparation\b/gi, 'base refresh'); + } + function stageTrackerPreparationIssued(ticket) { + const age = stageTrackerPreparationAge(ticket, _stageTrackerPreparationNow); + return age === 'age unknown' ? 'ticket time unknown' : 'ticket issued ' + age + ' ago'; + } + // The pushed row's caption in operator words: who pushed what, and what + // runs next on it. Anything that is not the server's push caption passes through. + function stageTrackerPreparationCaption(item) { + const caption = item.caption || item.reason || ''; + const push = item && item.push; + if (!push || push.state !== 'pushed' || !/^(push seen|new head observed)\b/i.test(caption)) return caption; + const sha7 = push.sha ? String(push.sha).slice(0, 7) : ''; + const ago = /^push seen (.+?) ago → /.exec(caption); + const when = ago ? ago[1] + ' ago' : /just now/.test(caption) ? 'just now' : ''; + const ci = item.ci_activity && item.ci_activity.state === 'running' && (!item.head || !item.ci_activity.head || item.ci_activity.head === item.head); + const rereview = push.next === 're-review' || /re-review/.test(caption); + return ['New push' + (sha7 ? ' ' + sha7 : '') + (push.login ? ' by @' + push.login : '') + (when ? ' ' + when : '') + + ' → ' + (ci ? 'CI running' : 'CI queued') + (rereview ? ', review will rerun' : '')] + .concat(rereview ? ['previous review no longer applies'] : []).join(' · '); } function stageTrackerPreparationVisualSync(data, listedRows, pageRows, stages, nowMs) { _stageTrackerPreparationShown = new Map(); @@ -22591,8 +22689,8 @@

    All labels

    for (const e of group.members) { details.push('#' + e.ticket.number + ' · ' + stageTrackerPreparationPlace(e) + (e.location === 'page' ? '' : e.location === 'offpage' ? ' · another page or collapsed repo' : ' · hidden by filters or absent from snapshot') - + (e.state === 'unverified' ? ' · ' + (e.ticket.detail || 'current identity or eligibility unknown') : '') - + ' · ticket age ' + stageTrackerPreparationAge(e.ticket, _stageTrackerPreparationNow) + + (e.state === 'unverified' ? ' · ' + stageTrackerPreparationPlainDetail(e) : '') + + ' · ' + stageTrackerPreparationIssued(e.ticket) + ' · ticket head ' + (e.ticketHead || 'unknown') + ' · current head ' + (e.head || 'unknown')); } @@ -22674,16 +22772,17 @@

    All labels

    stageTrackerPreparationMark(item); const event = ctx && ctx.events && ctx.events[key]; const eventHtml = typeof stageTrackerEventHtml === 'function' ? stageTrackerEventHtml(key, ctx) : ''; - const caption = item.caption || item.reason || (e.state === 'current' ? e.ticket.pipeline : '') || ''; - const captionVisible = caption && event && event.text && event.text.includes(caption) + const rawCaption = item.caption || item.reason || (e.state === 'current' ? e.ticket.pipeline : '') || ''; + const caption = stageTrackerPreparationCaption(item) || rawCaption; + const captionVisible = rawCaption && event && event.text && event.text.includes(rawCaption) && eventHtml && !eventHtml.includes('cue-event-tucked'); const parts = caption && !captionVisible ? [caption] : []; if (!caption) parts.push('Current pipeline blocker unknown'); const preparation = e.state === 'unverified' - ? stageTrackerPreparationPlace(e) + ' · ' + (e.ticket.detail || 'current identity or eligibility unknown') + ? stageTrackerPreparationPlace(e) + ' · ' + stageTrackerPreparationPlainDetail(e) : e.role === 'owner' ? 'preparing base' : 'queued for base refresh' + (e.ticket.behind ? ' behind PR #' + e.ticket.behind : ' · owner unknown'); if (!caption.split(/\s+[·—]\s+/).includes(preparation)) parts.push(preparation); - parts.push('ticket age ' + stageTrackerPreparationAge(e.ticket, _stageTrackerPreparationNow)); + parts.push(stageTrackerPreparationIssued(e.ticket)); if (e.row.nested) parts.push('shown under issue #' + e.row.host.number); return eventHtml + `
    ${esc(parts.join(' · '))}
    `; } @@ -27446,7 +27545,7 @@

    All labels

    function stageTrackerPreparationWord(p) { if (!p) return ''; if (p.state === 'inactive') return 'Inactive preparation ticket · ' + (p.detail || 'not currently eligible'); - if (p.state !== 'current') return (p.role === 'owner' ? 'Recorded preparation owner' : 'Recorded waiting ticket') + ' · ' + (p.detail || 'current state unknown'); + if (p.state !== 'current') return (p.role === 'owner' ? 'Recorded first for the base refresh' : 'Recorded base-refresh ticket') + ' · ' + (p.detail || 'current state unknown').replace(/\bunverified\b/gi, 'not yet confirmed').replace(/\bpreparation\b/gi, 'base refresh'); return p.role === 'owner' ? 'Preparing base' : (Number(p.behind) > 0 ? 'Waiting for preparation behind #' + Number(p.behind) : 'Waiting for preparation; owner not confirmed'); } function stageTrackerPreparationAge(p, nowMs) { @@ -27460,7 +27559,7 @@

    All labels

    if (!p || p.state === 'inactive') return ''; if (typeof stageTrackerPreparationRepresented === 'function' && stageTrackerPreparationRepresented(item)) return ''; const word = stageTrackerPreparationWord(p); - const label = p.state === 'current' ? word : 'Preparation owner · unverified'; + const label = p.state === 'current' ? word : 'Base refresh · not yet confirmed'; return `${esc(label)}`; } function stageTrackerPreparationPopHtml(queues, nowMs) { From 76fc87d8309d7df15c32a7e35bd5a3a4b265c2ec Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 02:59:31 +0000 Subject: [PATCH 025/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.207.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.207.4 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 7 +++++++ changelog.d/changed-ci-failure-nudge-cooldown.md | 1 - changelog.d/changed-sentinel-hold-pill-not-stage.md | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/changed-ci-failure-nudge-cooldown.md delete mode 100644 changelog.d/changed-sentinel-hold-pill-not-stage.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fda5ae766..a3818f3343 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.207.4) + +### Changed + +- Contributor nudge: CI-failure nudges are keyed on the failing-check set, not the lane's reason prefix — the same set on a new head or a check joining the set on the same head edits the PR's one `hive:contributor-nudge` comment (no relay re-dispatch for the same head), and a changed set within `governor.labels.stage.contributor_nudge.ci_failure_cooldown` (default 6h) folds into it instead of counting as a fresh nudge. The ledger persists in the stage-label store across restarts. +- activity monitor: sentinel alerts and `hold`-class labels are gates, not stages — a PR's column now follows its real progress (CI, Review, Merge queue) and the gate rides along as an amber **Held · sentinel · confirm intent** / **Held · hold** pill with the route reason in its tooltip and the decision popover, instead of pinning every such PR at `stage/085-needs-decision`; the gate stays a hard merge stop (lanes and the dashboard's human-merge shortcuts refuse on the label itself, never on the stage) and the 090 entry comment says "Held: …" (hivecommons/hive#17327). + ## 2026-11-09 (v5.207.3) ### Fixed diff --git a/changelog.d/changed-ci-failure-nudge-cooldown.md b/changelog.d/changed-ci-failure-nudge-cooldown.md deleted file mode 100644 index 66085f2466..0000000000 --- a/changelog.d/changed-ci-failure-nudge-cooldown.md +++ /dev/null @@ -1 +0,0 @@ -- Contributor nudge: CI-failure nudges are keyed on the failing-check set, not the lane's reason prefix — the same set on a new head or a check joining the set on the same head edits the PR's one `hive:contributor-nudge` comment (no relay re-dispatch for the same head), and a changed set within `governor.labels.stage.contributor_nudge.ci_failure_cooldown` (default 6h) folds into it instead of counting as a fresh nudge. The ledger persists in the stage-label store across restarts. diff --git a/changelog.d/changed-sentinel-hold-pill-not-stage.md b/changelog.d/changed-sentinel-hold-pill-not-stage.md deleted file mode 100644 index 6d9a76909c..0000000000 --- a/changelog.d/changed-sentinel-hold-pill-not-stage.md +++ /dev/null @@ -1 +0,0 @@ -- activity monitor: sentinel alerts and `hold`-class labels are gates, not stages — a PR's column now follows its real progress (CI, Review, Merge queue) and the gate rides along as an amber **Held · sentinel · confirm intent** / **Held · hold** pill with the route reason in its tooltip and the decision popover, instead of pinning every such PR at `stage/085-needs-decision`; the gate stays a hard merge stop (lanes and the dashboard's human-merge shortcuts refuse on the label itself, never on the stage) and the 090 entry comment says "Held: …" (hivecommons/hive#17327). From 6f3abbc4fd876f0c384b0b969071e910ed9ccf6a Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 03:28:30 +0000 Subject: [PATCH 026/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.207.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.207.5 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 10 ++++++++++ changelog.d/changed-shared-pr-group.md | 1 - changelog.d/fixed-one-lit-stage.md | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/changed-shared-pr-group.md delete mode 100644 changelog.d/fixed-one-lit-stage.md diff --git a/CHANGELOG.md b/CHANGELOG.md index a3818f3343..6ee31e7441 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,16 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.207.5) + +### Changed + +- Activity Monitor: the issues one PR closes together are now one group of the list — the secondary rows sit right after their primary (indented on a rail), render from the primary's own PR snapshot, and fold under a caret on the primary's "also closes" pill (remembered in localStorage). + +### Fixed + +- Activity Monitor: a row lights exactly one stage chevron. When a push lands during review, CI is the lit chevron and Review is dim with a muted "re-review queued" note instead of a second amber chevron; the base-refresh detail line reads in plain words (no "preparation"/"unverified" jargon, each signal said once); the muted `stage ↓` pill now reads "stage reset" / "stage reset by push" (#17335). + ## 2026-11-09 (v5.207.4) ### Changed diff --git a/changelog.d/changed-shared-pr-group.md b/changelog.d/changed-shared-pr-group.md deleted file mode 100644 index 8bd42049fb..0000000000 --- a/changelog.d/changed-shared-pr-group.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: the issues one PR closes together are now one group of the list — the secondary rows sit right after their primary (indented on a rail), render from the primary's own PR snapshot, and fold under a caret on the primary's "also closes" pill (remembered in localStorage). diff --git a/changelog.d/fixed-one-lit-stage.md b/changelog.d/fixed-one-lit-stage.md deleted file mode 100644 index 1ea83744c0..0000000000 --- a/changelog.d/fixed-one-lit-stage.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: a row lights exactly one stage chevron. When a push lands during review, CI is the lit chevron and Review is dim with a muted "re-review queued" note instead of a second amber chevron; the base-refresh detail line reads in plain words (no "preparation"/"unverified" jargon, each signal said once); the muted `stage ↓` pill now reads "stage reset" / "stage reset by push" (#17335). From 9ebb700bb45862b48b56e4c02aead6238d1fc85c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 03:34:36 +0000 Subject: [PATCH 027/123] =?UTF-8?q?=F0=9F=8C=B1=20build(deps):=20Bump=20do?= =?UTF-8?q?cker/login-action=20from=204.7.0=20to=204.8.0=20(#17339)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [docker/login-action](https://github.com/docker/login-action) from 4.7.0 to 4.8.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/81c6f93d4bc991e510b342a00b419b3bb4efc5c6...8aa5831fb8d48d8f76594c7ddde61ae58019f550) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-runner-image.yml | 2 +- .github/workflows/docker.yml | 18 +++++++++--------- .github/workflows/pr-verifier.yml | 2 +- .github/workflows/promote-stable.yml | 4 ++-- .github/workflows/stream-image.yml | 2 +- .github/workflows/tagged-release.yml | 4 ++-- .github/workflows/v2-ci.yml | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-runner-image.yml b/.github/workflows/ci-runner-image.yml index 457d98eceb..69705fe271 100644 --- a/.github/workflows/ci-runner-image.yml +++ b/.github/workflows/ci-runner-image.yml @@ -160,7 +160,7 @@ jobs: - name: Log in to GHCR if: github.event_name == 'workflow_dispatch' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9917fd68fe..56c3cc376b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -313,7 +313,7 @@ jobs: - name: Log in to GHCR if: needs.gate.outputs.push == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -550,7 +550,7 @@ jobs: driver-opts: network=host - name: Log in to GHCR - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -612,7 +612,7 @@ jobs: # credential for public reads regardless of org. - name: Log in to GHCR as the cross-org publisher if: steps.crosspat.outputs.available == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -711,7 +711,7 @@ jobs: - name: Log in to GHCR if: needs.gate.outputs.push == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -787,7 +787,7 @@ jobs: driver-opts: network=host - name: Log in to GHCR - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -829,7 +829,7 @@ jobs: - name: Log in to GHCR as the cross-org publisher if: steps.crosspat.outputs.available == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -925,7 +925,7 @@ jobs: - name: Log in to GHCR if: needs.gate.outputs.push == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -1010,7 +1010,7 @@ jobs: driver-opts: network=host - name: Log in to GHCR - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -1052,7 +1052,7 @@ jobs: - name: Log in to GHCR as the cross-org publisher if: steps.crosspat.outputs.available == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/pr-verifier.yml b/.github/workflows/pr-verifier.yml index 893dcb6979..c01821d511 100644 --- a/.github/workflows/pr-verifier.yml +++ b/.github/workflows/pr-verifier.yml @@ -94,7 +94,7 @@ jobs: # objected, so it must not be treated more harshly. - name: Login to GHCR continue-on-error: true - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/promote-stable.yml b/.github/workflows/promote-stable.yml index 4dfd3f8a57..52bea5e10a 100644 --- a/.github/workflows/promote-stable.yml +++ b/.github/workflows/promote-stable.yml @@ -138,7 +138,7 @@ jobs: uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 - name: Log in to native GHCR - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -192,7 +192,7 @@ jobs: - name: Log in to GHCR as the cross-org publisher if: steps.crosspat.outputs.available == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/stream-image.yml b/.github/workflows/stream-image.yml index 7963972b83..6bf45e2f18 100644 --- a/.github/workflows/stream-image.yml +++ b/.github/workflows/stream-image.yml @@ -111,7 +111,7 @@ jobs: - name: Log in to GHCR if: steps.ref.outputs.push == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 6a2e66ecc6..0faa1e30ba 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -576,7 +576,7 @@ jobs: uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 - name: Log in to GHCR - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -679,7 +679,7 @@ jobs: - name: Log in to GHCR as the cross-org publisher if: steps.crosspat.outputs.available == 'true' - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/v2-ci.yml b/.github/workflows/v2-ci.yml index 266d2fa12c..3e55b4ab0e 100644 --- a/.github/workflows/v2-ci.yml +++ b/.github/workflows/v2-ci.yml @@ -1622,7 +1622,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Log in to GHCR - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} From c022e72027c1d778d5be1be768f158ff3c4561b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 03:34:49 +0000 Subject: [PATCH 028/123] =?UTF-8?q?=F0=9F=8C=B1=20build(deps):=20Bump=20di?= =?UTF-8?q?scord.js=20from=2014.28.0=20to=2014.28.1=20in=20/discord=20(#17?= =?UTF-8?q?341)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [discord.js](https://github.com/discordjs/discord.js/tree/HEAD/packages/discord.js) from 14.28.0 to 14.28.1. - [Release notes](https://github.com/discordjs/discord.js/releases) - [Changelog](https://github.com/discordjs/discord.js/blob/14.28.1/packages/discord.js/CHANGELOG.md) - [Commits](https://github.com/discordjs/discord.js/commits/14.28.1/packages/discord.js) --- updated-dependencies: - dependency-name: discord.js dependency-version: 14.28.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- discord/package-lock.json | 8 ++++---- discord/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/discord/package-lock.json b/discord/package-lock.json index e8712790d5..0bb143ed1e 100644 --- a/discord/package-lock.json +++ b/discord/package-lock.json @@ -8,7 +8,7 @@ "name": "hive-discord", "version": "1.0.0", "dependencies": { - "discord.js": "^14.28.0", + "discord.js": "^14.28.1", "js-yaml": "^5.5.0" } }, @@ -229,9 +229,9 @@ ] }, "node_modules/discord.js": { - "version": "14.28.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.28.0.tgz", - "integrity": "sha512-l/mIllvqvWQDWqa8NPw7b2AU2tM9oPWiWR6Jk54DTNlUdyArXbi+Y0m0sLIUtQ9O0x+tyVpDMCG6K6Kf0yeAWQ==", + "version": "14.28.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.28.1.tgz", + "integrity": "sha512-Je5OcqgurnIUQK4vR+gQnmzOf/lNQsD6d/UkV8ZOj+bFa5zJXPyiGXlbywp2EagwshVT18y7YNQNSRd3FjYkDw==", "license": "Apache-2.0", "dependencies": { "@discordjs/builders": "^1.15.0", diff --git a/discord/package.json b/discord/package.json index b1b6eb3ac2..51ff845c13 100644 --- a/discord/package.json +++ b/discord/package.json @@ -7,7 +7,7 @@ "start": "node bot.js" }, "dependencies": { - "discord.js": "^14.28.0", + "discord.js": "^14.28.1", "js-yaml": "^5.5.0" } } From cfc56554e5cb1c8ab3f84522cbbe2e9583424462 Mon Sep 17 00:00:00 2001 From: Karibhou <157208370+Karibhou@users.noreply.github.com> Date: Mon, 9 Nov 2026 05:09:22 +0100 Subject: [PATCH 029/123] =?UTF-8?q?=F0=9F=8C=B1=20test:=20regression=20for?= =?UTF-8?q?=20an=20epic-driven=20PR=20on=20a=20contributor-claimed,=20PR-c?= =?UTF-8?q?overed=20issue=20(#17308)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🌱 test: regression for an epic-driven PR on a contributor-claimed, PR-covered issue Replays the #17292 incident end to end in pkg/dashboard against the hub's claim ledger, the contributor lease hub and the PR-request watcher, with a fake GitHub and one injected clock: the hive files N, a contributor claims it (lease + ledger), their PR M covers it (stage 040), the lease completes and the claim must stay PR-held, then an agent working from an epic asks to open "Fixes #N". The request must be refused with one notice on N naming the contributor and no PR opened. github.Client.ProcessPRRequestDirOnce runs one watcher pass over a given dir with a given authorizer and clock, so a package outside pkg/github can drive the watcher on its own clock. The test fails on v5 until #17298 (claim-target gate, #17303) and #17300 (claim kept on coverage, #17305) land. Hive-Run: hivecommons/hive#17302 Hive-Plan: hivecommons/hive#17292 Hive-Spec: hivecommons/hive#17302#acceptance-criteria Signed-off-by: Karibhou * 🌱 changelog: fragment for PR-request watcher single-pass hook Signed-off-by: Karibhou --------- Signed-off-by: Karibhou Co-authored-by: Karibhou --- changelog.d/added-17308.md | 1 + .../claims_pr_covered_epic_17302_test.go | 273 ++++++++++++++++++ src/pkg/github/pr_request_watcher.go | 16 + 3 files changed, 290 insertions(+) create mode 100644 changelog.d/added-17308.md create mode 100644 src/pkg/dashboard/claims_pr_covered_epic_17302_test.go diff --git a/changelog.d/added-17308.md b/changelog.d/added-17308.md new file mode 100644 index 0000000000..d2ca23a830 --- /dev/null +++ b/changelog.d/added-17308.md @@ -0,0 +1 @@ +- Added `github.Client.ProcessPRRequestDirOnce` to run one PR-request watcher pass on a given dir, authorizer and clock, with a regression test for epic-driven PRs on contributor-claimed, PR-covered issues (#17302). diff --git a/src/pkg/dashboard/claims_pr_covered_epic_17302_test.go b/src/pkg/dashboard/claims_pr_covered_epic_17302_test.go new file mode 100644 index 0000000000..20a04613f7 --- /dev/null +++ b/src/pkg/dashboard/claims_pr_covered_epic_17302_test.go @@ -0,0 +1,273 @@ +package dashboard + +import ( + "context" + "encoding/json" + "fmt" + "io" + "log/slog" + "net/http" + "net/http/httptest" + "os" + "path/filepath" + "strconv" + "strings" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/hivecommons/hive/pkg/claims" + ghpkg "github.com/hivecommons/hive/pkg/github" + "github.com/hivecommons/hive/pkg/issueclaim" + "github.com/hivecommons/hive/pkg/stagelabels" +) + +// The numbers and times of the 2026-11-08 incident (hivecommons/hive#17292): +// the hive filed #17243, a contributor claimed it, their #17248 covered it, +// the lease was revoked, and an agent working from epic #17292 opened and +// merged #17250 on the same issue. +const ( + coveredRepo = "myorg/repo1" + coveredIssue = 17243 + contributorPR = 17248 + epicIssue = 17292 + contributorLogin = "Karibhou" +) + +// claimTargetForge is the slice of GitHub the PR-request watcher reads and +// writes for coveredRepo. It records what the watcher would publish: every +// PR it opens and every comment it posts, keyed by issue/PR number. List +// endpoints answer empty, so CreatePR's head-branch and duplicate-PR checks +// stay out of the story — the claim-target gate must refuse before CreatePR. +type claimTargetForge struct { + mu sync.Mutex + opened []string + comments map[int][]string +} + +func (f *claimTargetForge) ServeHTTP(w http.ResponseWriter, r *http.Request) { + const repoPath = "/repos/" + coveredRepo + w.Header().Set("Content-Type", "application/json") + i := strings.Index(r.URL.Path, repoPath) + if i < 0 { + w.WriteHeader(http.StatusNotFound) + return + } + rest := r.URL.Path[i+len(repoPath):] + f.mu.Lock() + defer f.mu.Unlock() + switch { + case r.Method == http.MethodGet && rest == "": + _, _ = io.WriteString(w, `{"name":"repo1","full_name":"`+coveredRepo+`","default_branch":"main"}`) + case r.Method == http.MethodGet && strings.HasPrefix(rest, "/compare/"): + _, _ = io.WriteString(w, `{"files":[]}`) + case r.Method == http.MethodGet && rest == "/pulls": + _, _ = io.WriteString(w, `[]`) + case r.Method == http.MethodGet && rest == "/pulls/"+strconv.Itoa(contributorPR): + _, _ = fmt.Fprintf(w, `{"number":%d,"state":"open","merged":false,"user":{"login":%q},"html_url":"https://github.com/%s/pull/%d"}`, + contributorPR, contributorLogin, coveredRepo, contributorPR) + case r.Method == http.MethodPost && rest == "/pulls": + var pr struct { + Title string `json:"title"` + } + _ = json.NewDecoder(r.Body).Decode(&pr) + f.opened = append(f.opened, pr.Title) + _, _ = fmt.Fprintf(w, `{"number":17250,"html_url":"https://github.com/%s/pull/17250"}`, coveredRepo) + case strings.HasPrefix(rest, "/issues/") && strings.HasSuffix(rest, "/comments"): + n, err := strconv.Atoi(strings.TrimSuffix(strings.TrimPrefix(rest, "/issues/"), "/comments")) + if err != nil { + w.WriteHeader(http.StatusNotFound) + return + } + if r.Method == http.MethodGet { + _, _ = io.WriteString(w, `[]`) + return + } + var c struct { + Body string `json:"body"` + } + _ = json.NewDecoder(r.Body).Decode(&c) + f.comments[n] = append(f.comments[n], c.Body) + _, _ = fmt.Fprintf(w, `{"id":%d,"body":%q}`, len(f.comments[n]), c.Body) + case r.Method == http.MethodPost && strings.HasSuffix(rest, "/labels"): + _, _ = io.WriteString(w, `[]`) + case r.Method == http.MethodGet && strings.HasPrefix(rest, "/issues/"): + n, err := strconv.Atoi(strings.TrimPrefix(rest, "/issues/")) + if err != nil { + w.WriteHeader(http.StatusNotFound) + return + } + label := "help wanted" + if n == epicIssue { + label = "epic" + } + _, _ = fmt.Fprintf(w, `{"number":%d,"title":"crux: per-run command log","body":"Keep an append-only command log for each contained run.","state":"open","labels":[{"name":%q}],"user":{"login":"hivecommons-hive[bot]","type":"Bot"}}`, n, label) + default: + w.WriteHeader(http.StatusNotFound) + } +} + +func (f *claimTargetForge) snapshot() (opened []string, comments map[int][]string) { + f.mu.Lock() + defer f.mu.Unlock() + comments = make(map[int][]string, len(f.comments)) + for n, bodies := range f.comments { + comments[n] = append([]string(nil), bodies...) + } + return append([]string(nil), f.opened...), comments +} + +// hubLedgerClaimLookup hands the hub's claim ledger to the GitHub client the +// way cmd/hive wires it (claimswire.go, ledgerClaimLookup): the live claim on +// an issue, read per call. +func hubLedgerClaimLookup(l *claims.Ledger) func(repo string, number int) (issueclaim.Claim, bool) { + return func(repo string, number int) (issueclaim.Claim, bool) { + c, ok := l.Lookup(repo, number) + if !ok { + return issueclaim.Claim{}, false + } + return issueclaim.Claim{Identity: c.Holder, StartedAt: c.ClaimedAt, ExpiresAt: c.ExpiresAt, + Source: issueclaim.SourceLease, Kind: string(c.Kind), Hive: c.Hive, Tier: c.Tier, Verified: c.Verified}, true + } +} + +// hivecommons/hive#17302 (from #17292): replays the incident end to end +// against the hub's claim ledger, the contributor lease hub and the +// PR-request watcher. A contributor claims a help-wanted issue, their PR +// covers it, their lease completes — and a hive agent working from an epic +// then asks to open a PR that closes the same issue. The claim must outlive +// the lease while the contributor's PR covers the issue (#17300), and the +// watcher must refuse the epic-driven PR with one notice on the issue naming +// the contributor (#17298). Before both fixes the watcher opened the second +// implementation (#17250). +func TestClaims_ContributorPRCoveredIssueRefusesEpicDrivenPR(t *testing.T) { + // One injected clock drives the hub ledger, the duplicate-PR ledger and + // the watcher; hooks may read it off the test goroutine, hence atomic. + var nowNanos atomic.Int64 + setNow := func(hh, mm, ss int) time.Time { + at := time.Date(2026, 11, 8, hh, mm, ss, 0, time.UTC) + nowNanos.Store(at.UnixNano()) + return at + } + clock := func() time.Time { return time.Unix(0, nowNanos.Load()).UTC() } + now := setNow(15, 11, 2) + logger := slog.New(slog.NewTextHandler(io.Discard, nil)) + + hub, s, ledger := claimsHub(t) + ledger.SetNow(clock) + prLedger := ghpkg.NewClaimLedger(filepath.Join(t.TempDir(), "pr-claims.json"), logger) + prLedger.SetClock(clock) + s.deps.IssueClaimed = prLedger.Lookup + + forge := &claimTargetForge{comments: map[int][]string{}} + srv := httptest.NewServer(forge) + t.Cleanup(srv.Close) + client := ghpkg.NewClientForTest(srv.URL, "myorg", []string{coveredRepo}, logger) + client.SetIssueClaimLedger(hubLedgerClaimLookup(ledger)) + client.SetPRClaimLookup(prLedger.Lookup) + + // The stage the enumeration derives for the issue from the duplicate-PR + // ledger: the duplicate-PR guard, then the stage reconciler's input. + stageOfIssue := func() stagelabels.Stage { + t.Helper() + result := &ghpkg.ActionableResult{} + result.Issues = ghpkg.IssueResultFromItems([]ghpkg.Issue{{Repo: coveredRepo, Number: coveredIssue, Labels: []string{"help wanted"}}}) + ghpkg.FilterClaimedIssues(result, prLedger, nil, logger) + inputs := ghpkg.IssueStageInputs(result) + if len(inputs) != 1 { + t.Fatalf("stage inputs = %+v, want one row for #%d", inputs, coveredIssue) + } + stage, _, _ := ghpkg.IssueStageFor(inputs[0], func(string, int) stagelabels.Stage { return stagelabels.ReviewPending }) + return stage + } + + // 1. The hive filed the issue: unclaimed, help wanted. + if c, ok := ledger.Lookup(coveredRepo, coveredIssue); ok { + t.Fatalf("issue starts claimed: %+v", c) + } + + // 2. The contributor is assigned the issue: lease plus ledger claim. + conn := &ContributorConnection{ + profile: &ContributorProfile{GitHubUsername: contributorLogin, ContributorID: "c-742b084db8ab", TrustTier: "contributor"}, + session: "omp", + lastPong: now, + } + identity := identityOf(conn) + if err := hub.recordLease(identity, "t-17243", coveredRepo, coveredIssue, "contributor", 1, now); err != nil { + t.Fatal(err) + } + hub.claimIssueForContributor(conn, coveredRepo, coveredIssue) + if c, ok := ledger.Lookup(coveredRepo, coveredIssue); !ok || c.HolderID != identity { + t.Fatalf("contributor claim = %+v ok=%v, want held by %s", c, ok, identity) + } + + // 3. The contributor's PR opens with Closes #N; the issue is covered. + now = setNow(15, 26, 49) + delivery := ghpkg.PRClaimDelivery{ + Repo: coveredRepo, Number: contributorPR, Action: "opened", State: ghpkg.PRStateOpen, At: now, + Claims: ghpkg.ClaimsFromPROpened(ghpkg.PROpenedDetail{ + Repo: coveredRepo, Number: contributorPR, Author: contributorLogin, Head: "karibhou/crux-cmdlog", + URL: fmt.Sprintf("https://github.com/%s/pull/%d", coveredRepo, contributorPR), + Title: "✨ crux: per-run command log", Body: fmt.Sprintf("Closes #%d", coveredIssue), + }, []string{coveredRepo}, ghpkg.HiveIdentity{AppLogin: "hivecommons-hive[bot]"}, now), + } + if recorded, _ := prLedger.ApplyPRDelivery(delivery); recorded != 1 { + t.Fatalf("duplicate-PR ledger recorded %d claims from #%d, want 1", recorded, contributorPR) + } + if stage := stageOfIssue(); stage != stagelabels.CoveredByPR { + t.Fatalf("stage with the contributor's PR open = %s, want %s", stage, stagelabels.CoveredByPR) + } + + // 4. The contributor's lease completes. The work is not abandoned — their + // PR covers it — so the ledger still shows the issue held by them. + setNow(15, 27, 45) + hub.revokeLease(identity, "t-17243") + if c, ok := ledger.Lookup(coveredRepo, coveredIssue); !ok || c.HolderID != identity || c.Holder != contributorLogin || + c.Kind != claims.KindContributor || !c.PRStarted { + t.Errorf("claim after the lease completed = %+v ok=%v, want a PR-held claim by %s (#17300)", c, ok, contributorLogin) + } + if stage := stageOfIssue(); stage != stagelabels.CoveredByPR { + t.Errorf("stage after the lease completed = %s, want %s", stage, stagelabels.CoveredByPR) + } + + // 5. A hive agent working from the epic asks to open a PR that closes the + // issue. It never claimed the issue (no --issues), so nothing upstream of + // the watcher stopped it. + setNow(15, 34, 26) + dir := t.TempDir() + reqPath, err := ghpkg.WritePRRequest(dir, ghpkg.PRRequest{ + Repo: coveredRepo, Head: "scanner/crux-cmdlog-s4", Agent: "scanner", + Title: "✨ crux: per-run command log", + Body: fmt.Sprintf("Fixes #%d\n\nPart of #%d (S4 — command log).", coveredIssue, epicIssue), + }) + if err != nil { + t.Fatal(err) + } + client.ProcessPRRequestDirOnce(context.Background(), dir, func(string, int) error { return nil }, clock) + + opened, comments := forge.snapshot() + if len(opened) != 0 { + t.Errorf("watcher opened %q although %s's claim and PR #%d cover #%d (#17298)", opened, contributorLogin, contributorPR, coveredIssue) + } + raw, err := os.ReadFile(strings.TrimSuffix(reqPath, ".json") + ".result.json") + if err != nil { + t.Fatalf("request result: %v", err) + } + var res ghpkg.PRResponse + if err := json.Unmarshal(raw, &res); err != nil { + t.Fatal(err) + } + if res.OK || !strings.Contains(res.Error, "claim") { + t.Errorf("request result = %+v, want a claim refusal", res) + } + notices := comments[coveredIssue] + if len(notices) != 1 || !strings.Contains(strings.ToLower(notices[0]), strings.ToLower(contributorLogin)) { + t.Errorf("comments on #%d = %q, want one notice naming %s", coveredIssue, notices, contributorLogin) + } + for n, bodies := range comments { + if n != coveredIssue { + t.Errorf("unexpected comments on #%d: %q", n, bodies) + } + } +} diff --git a/src/pkg/github/pr_request_watcher.go b/src/pkg/github/pr_request_watcher.go index fac95062af..7a81b56ec9 100644 --- a/src/pkg/github/pr_request_watcher.go +++ b/src/pkg/github/pr_request_watcher.go @@ -339,6 +339,22 @@ func (c *Client) ProcessPRRequestsOnce(ctx context.Context) { c.processPRRequests(ctx, time.Now) } +// ProcessPRRequestDirOnce runs one watcher pass over dir with authz as the +// request authorizer and nowFn as the clock — a StartPRRequestWatcher tick +// without the ticker. Test entry point for packages that drive the watcher +// end to end against their own clocks (pkg/dashboard's claimed-target +// regression, hivecommons/hive#17302). A nil nowFn is time.Now. +func (c *Client) ProcessPRRequestDirOnce(ctx context.Context, dir string, authz PRRequestAuthorizer, nowFn func() time.Time) { + if c == nil { + return + } + if nowFn == nil { + nowFn = time.Now + } + c.prAuthz = authz + c.processPRRequestsInDir(ctx, nowFn, dir) +} + func (c *Client) handleOnePRRequest(ctx context.Context, path string, nowFn func() time.Time) { if !c.prRetries.allows(path, nowFn()) { return From fd3fb7b7330de050c116f83947be187ea3fa1052 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 04:35:26 +0000 Subject: [PATCH 030/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.208.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.208.0 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/added-17308.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/added-17308.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ee31e7441..c5f7ea5209 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.208.0) + +### Added + +- Added `github.Client.ProcessPRRequestDirOnce` to run one PR-request watcher pass on a given dir, authorizer and clock, with a regression test for epic-driven PRs on contributor-claimed, PR-covered issues (#17302). + ## 2026-11-09 (v5.207.5) ### Changed diff --git a/changelog.d/added-17308.md b/changelog.d/added-17308.md deleted file mode 100644 index d2ca23a830..0000000000 --- a/changelog.d/added-17308.md +++ /dev/null @@ -1 +0,0 @@ -- Added `github.Client.ProcessPRRequestDirOnce` to run one PR-request watcher pass on a given dir, authorizer and clock, with a regression test for epic-driven PRs on contributor-claimed, PR-covered issues (#17302). From 22cee5984135359c31ee8c6045aa8c9bfbfbe77f Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2026 23:36:28 -0500 Subject: [PATCH 031/123] =?UTF-8?q?=F0=9F=8C=B1=20chore(deps):=20stop=20De?= =?UTF-8?q?pendabot=20bumping=20the=20compiler-owned=20gh-aw-actions/setup?= =?UTF-8?q?=20pin=20(#17345)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit github/gh-aw-actions/setup is pinned by the gh-aw compiler version in .github/workflows/gh-aw-compile.yml and written into the generated weekly-competitor-report.lock.yml and .github/aw/actions-lock.json. The compile guard regenerates both files and fails on any diff, so a Dependabot bump of the lock file alone (#17340) can never pass CI. Ignore the dependency in the github-actions ecosystem; the upgrade path is bumping the compiler pin and recompiling. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .github/dependabot.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8aa6ec59c7..da8dc2e79e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -31,6 +31,13 @@ updates: open-pull-requests-limit: 10 commit-message: prefix: "🌱 build(deps)" + ignore: + # Pinned by the gh-aw compiler (gh-aw-compile.yml --pin) and written + # into the generated weekly-competitor-report.lock.yml and + # .github/aw/actions-lock.json; the compile guard regenerates both and + # reverts a hand bump, so Dependabot's PR for it can never go green. + # Bump the compiler pin and recompile instead. + - dependency-name: "github/gh-aw-actions/setup" - package-ecosystem: "docker" directory: "/src" From 7491bb08795da1dd4f5578d2eed82062bfdf9444 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 05:50:17 +0000 Subject: [PATCH 032/123] test(crux/agent): pin LastLaunchAt wiring from manager to watchdog observation (#17350) The #17320 relaunch boot grace depends on WatchdogFleet.Observe copying lastCLILaunchAt into Observation.LastLaunchAt and on markCLILaunchedLocked stamping it. Both executed under existing tests but neither value was asserted, so dropping either write left the suite green. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- src/crux/agent/watchdog_fleet_test.go | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/crux/agent/watchdog_fleet_test.go b/src/crux/agent/watchdog_fleet_test.go index 652c57eb20..329cf308f0 100644 --- a/src/crux/agent/watchdog_fleet_test.go +++ b/src/crux/agent/watchdog_fleet_test.go @@ -453,6 +453,59 @@ func TestWatchdogObserveCarriesStartedAt(t *testing.T) { if !obs.StartedAt.Equal(started) { t.Fatalf("StartedAt = %v, want %v — without it boot grace cannot apply", obs.StartedAt, started) } + if !obs.LastLaunchAt.IsZero() { + t.Fatalf("LastLaunchAt = %v, want zero before any CLI launch is recorded", obs.LastLaunchAt) + } +} + +// TestWatchdogObserveCarriesLastLaunchAt pins the manager half of #17320: a +// mid-life CLI relaunch must reach the classifier as LastLaunchAt, distinct +// from the agent's original StartedAt, or the relaunch gets no boot grace and +// its login-chrome flash pages an operator. +func TestWatchdogObserveCarriesLastLaunchAt(t *testing.T) { + m, _ := newWatchdogTestManager(t, map[string]string{"a1": "copilot"}) + started := time.Date(2026, 8, 23, 11, 30, 0, 0, time.UTC) + relaunched := started.Add(22 * time.Hour) + m.agents["a1"].StartedAt = &started + m.agents["a1"].lastCLILaunchAt = relaunched + + obs, err := WatchdogFleet{M: m}.Observe("a1") + if err != nil { + t.Fatal(err) + } + if !obs.StartedAt.Equal(started) { + t.Fatalf("StartedAt = %v, want %v — a relaunch must not rewrite the agent's start", obs.StartedAt, started) + } + if !obs.LastLaunchAt.Equal(relaunched) { + t.Fatalf("LastLaunchAt = %v, want %v — without it a relaunch gets no boot grace", obs.LastLaunchAt, relaunched) + } +} + +// TestMarkCLILaunchedLockedStampsEveryLaunchField guards the single write +// point launchInTmux uses: StartedAt, the launch generation stale startup-kick +// goroutines check, and the relaunch timestamp the watchdog dates boot grace +// from must all move together. +func TestMarkCLILaunchedLockedStampsEveryLaunchField(t *testing.T) { + m, _ := newWatchdogTestManager(t, map[string]string{"a1": "copilot"}) + agent := m.agents["a1"] + first := time.Date(2026, 8, 23, 11, 30, 0, 0, time.UTC) + second := first.Add(22 * time.Hour) + + m.mu.Lock() + gen := agent.launchGen + m.markCLILaunchedLocked(agent, first) + m.markCLILaunchedLocked(agent, second) + m.mu.Unlock() + + if agent.StartedAt == nil || !agent.StartedAt.Equal(second) { + t.Fatalf("StartedAt = %v, want %v", agent.StartedAt, second) + } + if agent.launchGen != gen+2 { + t.Fatalf("launchGen = %d, want %d — one increment per launch", agent.launchGen, gen+2) + } + if !agent.lastCLILaunchAt.Equal(second) { + t.Fatalf("lastCLILaunchAt = %v, want %v", agent.lastCLILaunchAt, second) + } } func TestWatchdogFleetPauseRestartDelegation(t *testing.T) { From 4b2cc08fec58ca8862856a76b7023e7e0f8c557c Mon Sep 17 00:00:00 2001 From: Karibhou <157208370+Karibhou@users.noreply.github.com> Date: Mon, 9 Nov 2026 08:10:14 +0100 Subject: [PATCH 033/123] =?UTF-8?q?=F0=9F=90=9B=20fleetreport:=20classify?= =?UTF-8?q?=20the=20copilot=20hang=20detector=20as=20copilot=5Fcli=5Fhung?= =?UTF-8?q?=20(#17355)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Copilot hang detector logs "copilot hung with no CLI prompt, running diagnostic" every time a Copilot agent shows no CLI prompt 180s after launch, then kills the session, runs bare copilot and relaunches. The line matched no class, so a hive whose Copilot agents kept failing to reach their prompt filed it as unclassified_error_repeated (#17353, bluefin: 5 in 10 min, first sample agent=adjudicator uptime_sec=180). Give it a log-fed class, copilot_cli_hung (agent-runtime, medium, the usual 5-in-10-min gate and 20-min idle clear), together with the diagnostic's own "timed out waiting for copilot error output" WARN, so both outcomes of the same hang path join one self-report that names the condition. Document the class in src/docs/fleet-report.md. Fixes #17353 Hive-Run: hivecommons/hive#17353 Hive-Plan: selfreport-classification Hive-Spec: fleet-report#runtime-error Signed-off-by: Karibhou Co-authored-by: Karibhou --- changelog.d/fixed-17353-copilot-cli-hung-classify.md | 1 + src/docs/fleet-report.md | 1 + src/pkg/fleetreport/runtime.go | 2 ++ src/pkg/fleetreport/runtime_test.go | 3 +++ 4 files changed, 7 insertions(+) create mode 100644 changelog.d/fixed-17353-copilot-cli-hung-classify.md diff --git a/changelog.d/fixed-17353-copilot-cli-hung-classify.md b/changelog.d/fixed-17353-copilot-cli-hung-classify.md new file mode 100644 index 0000000000..da264bfa3e --- /dev/null +++ b/changelog.d/fixed-17353-copilot-cli-hung-classify.md @@ -0,0 +1 @@ +- Fleet report: the Copilot hang detector's repeated `copilot hung with no CLI prompt, running diagnostic` WARNs — a Copilot agent showed no CLI prompt 180 s after launch, so the hive killed its session, ran a bare `copilot` diagnostic and relaunched it — and the diagnostic's own `timed out waiting for copilot error output` WARNs are now classified as `copilot_cli_hung` (medium, component `agent-runtime`), so a hive whose Copilot agents keep failing to reach their prompt files one self-report that names the condition instead of `unclassified_error_repeated` ([#17353](https://github.com/hivecommons/hive/issues/17353)). diff --git a/src/docs/fleet-report.md b/src/docs/fleet-report.md index 0448d43d56..780d668510 100644 --- a/src/docs/fleet-report.md +++ b/src/docs/fleet-report.md @@ -150,6 +150,7 @@ title is `[selfreport] : `. | `github_fetch_transient` | a non-critical GitHub fetch failed and the feature degrades gracefully (`channel commit date: fetch failed — the row will render without a timestamp`, `pkg/hub/channel_commit_date.go`) — typically a rate limit or transient API error, not a hive defect. Reported only when persistent: log-fed, same ≥5-in-10-min repeat threshold and idle clear as `agent_pane_timeout`. The sibling `SHA poll: commit message fetch non-200` has its own class, `sha_poll_commit_message_unavailable` | low | | `label_provisioning_failed` | provisioning the issue stage labels on a repo failed (`issue stage labels: provisioning failed`, `pkg/github/issue_stage_labels.go`) — typically the App lacking label permission on that repo or a transient API error; diagnostics carry the repo and scrubbed error. Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | low | | `agent_cli_restart_loop` | the agent CLI crashed (bare shell) or sat on a consent screen and the harness restarted it before the kick (`agent CLI crashed or stuck on consent screen, restarting before kick`, `crux/agent/manager_kick.go`, `kick_async.go`), repeated ≥5 times in 10 min — a restart loop, not transient noise. Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | medium | +| `copilot_cli_hung` | a Copilot agent showed none of the CLI's startup chrome (input prompt, help hint, login request) 180 s after launch, outside kick delivery, so the hang detector killed its session, ran bare `copilot` to capture the error and relaunched the agent (`copilot hung with no CLI prompt, running diagnostic`, `crux/agent/manager_poll.go`), or that diagnostic saw no output before its own deadline and relaunched anyway (`diagnostic: timed out waiting for copilot error output`, `crux/agent/manager_credentials.go`; the line carries the pane's `output_tail`). The key is the message, so ≥5 in 10 min counts every Copilot agent on the hive together: its Copilot agents keep failing to reach their prompt. Typical causes are a stale Copilot token the CLI hangs on (the diagnostic restores or clears it when it sees an auth error), a blocked network path to the Copilot API, or a CLI build whose startup screen the detector does not recognise (`cliReadyIndicators`, `crux/agent/pane_classify.go`). Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | medium | | `proxy_connect_dial_failed` | the hive proxy could not dial the upstream host of a CONNECT request (`proxy: CONNECT dial failed`, `crux/proxy/github_proxy_connect.go`) or of a Copilot usage-sniffed connection (`copilot sniff: upstream dial failed`, `crux/proxy/github_proxy_copilot.go`) — typically DNS or network unreachability of an agent-requested host (for example a dial timeout to `telemetry.enterprise.githubcopilot.com`), repeated ≥5 times in 10 min. Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | medium | | `proxy_tls_handshake_failed` | the hive proxy's TLS handshake with an upstream host failed (`proxy client tls handshake failed`, `transparent proxy tls handshake failed`, `copilot sniff: client tls handshake failed`, `crux/proxy/github_proxy_connect.go`, `crux/proxy/github_proxy_copilot.go`) — typically a certificate validation failure or encryption mismatch on an agent-requested host, repeated ≥5 times in 10 min. Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | medium | | `review_evidence_write_failed` | the github-client failed to write a review evidence bundle to persistent storage (`review evidence: could not write bundle`, `pkg/github`), repeated ≥5 times in 10 min. Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | medium | diff --git a/src/pkg/fleetreport/runtime.go b/src/pkg/fleetreport/runtime.go index 3b655e2384..0204cd041a 100644 --- a/src/pkg/fleetreport/runtime.go +++ b/src/pkg/fleetreport/runtime.go @@ -90,6 +90,7 @@ const ( ClassGitHubFetchTransient = "github_fetch_transient" ClassLabelProvisioningFailed = "label_provisioning_failed" ClassAgentCLIRestartLoop = "agent_cli_restart_loop" + ClassCopilotCLIHung = "copilot_cli_hung" ClassTranscriptScanSlow = "transcript_scan_slow" ClassSharedCIRerunForbidden = "shared_ci_rerun_forbidden" ClassIssueClaimEffectFailed = "issue_claim_effect_failed" @@ -208,6 +209,7 @@ var Classes = map[string]ClassSpec{ ClassGitHubFetchTransient: {Component: "github-client", Severity: "low", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"channel commit date: fetch failed"}}, ClassLabelProvisioningFailed: {Component: "github-client", Severity: "low", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"issue stage labels: provisioning failed"}}, ClassAgentCLIRestartLoop: {Component: "agent-runtime", Severity: "medium", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"agent cli crashed or stuck on consent screen"}}, + ClassCopilotCLIHung: {Component: "agent-runtime", Severity: "medium", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"copilot hung with no cli prompt", "diagnostic: timed out waiting for copilot error output"}}, ClassSharedCIRerunForbidden: {Component: "github-client", Severity: "low", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"shared-ci rerun forbidden"}}, ClassIssueClaimEffectFailed: {Component: "agent-runtime", Severity: "low", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"issue-claims: github side effect failed"}}, ClassTranscriptScanSlow: {Component: "agent-runtime", Severity: "low", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"transcript activity scan outlived its interval"}}, diff --git a/src/pkg/fleetreport/runtime_test.go b/src/pkg/fleetreport/runtime_test.go index f4853a5e49..5915000ea3 100644 --- a/src/pkg/fleetreport/runtime_test.go +++ b/src/pkg/fleetreport/runtime_test.go @@ -393,6 +393,7 @@ func TestEveryRuntimeClassTriggerAndNonTriggerThresholds(t *testing.T) { {class: ClassGitHubFetchTransient, message: "channel commit date: fetch failed — the row will render without a timestamp"}, {class: ClassLabelProvisioningFailed, message: "issue stage labels: provisioning failed"}, {class: ClassAgentCLIRestartLoop, message: "agent CLI crashed or stuck on consent screen, restarting before kick"}, + {class: ClassCopilotCLIHung, message: "copilot hung with no CLI prompt, running diagnostic"}, {class: ClassEffectLedgerOpStuck, message: "effect ledger op stuck: issue_create has been Unknown for 31m; retries refused pending reconciliation"}, {class: ClassCruxRuntimeUnavailable, message: "crux runtime unavailable: crux server unreachable at /run/hive/crux.sock"}, } @@ -1109,6 +1110,8 @@ func TestRecurringRuntimeMessagesAreClassified(t *testing.T) { "channel commit date: fetch failed — the row will render without a timestamp": ClassGitHubFetchTransient, "issue stage labels: provisioning failed": ClassLabelProvisioningFailed, "agent CLI crashed or stuck on consent screen, restarting before kick": ClassAgentCLIRestartLoop, + "copilot hung with no CLI prompt, running diagnostic": ClassCopilotCLIHung, + "diagnostic: timed out waiting for copilot error output, relaunching agent": ClassCopilotCLIHung, "shared-ci rerun forbidden: the App installation lacks Actions write permission": ClassSharedCIRerunForbidden, "issue-claims: GitHub side effect failed": ClassIssueClaimEffectFailed, "SHA poll: commit message fetch non-200": ClassSHAPollCommitMsgUnavail, From 9b126fd1d2368ed98bfc54d1732eff7dfd389b06 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 07:18:17 +0000 Subject: [PATCH 034/123] =?UTF-8?q?=F0=9F=90=9B=20fix:=20classify=20BuildK?= =?UTF-8?q?it-prefixed=20and=20golangci-lint-action=205xx=20release=20down?= =?UTF-8?q?loads=20as=20runner=20infra=20(#17352)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix: classify BuildKit-prefixed and golangci-lint-action 5xx downloads as infra Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 chore: drop stray .pyc from .github/scripts and gitignore __pycache__ Addresses the review on #17352: the compiled bytecode under .github/scripts/__pycache__/ is an unreviewable build artifact and must not be committed. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .github/scripts/ci-infra-signatures.tsv | 7 ++- .../ci-infra/code-upstream-download-404.log | 62 +++++++++++++++++++ .../scripts/testdata/ci-infra/expected.tsv | 3 + .../infra-upstream-download-5xx-buildkit.log | 62 +++++++++++++++++++ .../infra-upstream-download-5xx-golangci.log | 37 +++++++++++ .gitignore | 3 + 6 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 .github/scripts/testdata/ci-infra/code-upstream-download-404.log create mode 100644 .github/scripts/testdata/ci-infra/infra-upstream-download-5xx-buildkit.log create mode 100644 .github/scripts/testdata/ci-infra/infra-upstream-download-5xx-golangci.log diff --git a/.github/scripts/ci-infra-signatures.tsv b/.github/scripts/ci-infra-signatures.tsv index 06e437543a..b25c9319fd 100644 --- a/.github/scripts/ci-infra-signatures.tsv +++ b/.github/scripts/ci-infra-signatures.tsv @@ -21,6 +21,10 @@ # upstream-download-5xx (2026-10-07, run 37638156130): a tool download from # github.com releases (curl -f in "Install just") got an HTTP 5xx - a transient # upstream outage. 4xx is deliberately NOT matched: a 404 is a wrong version pin. +# 2026-11-09 (#17351, release-asset 504 outage) added two shapes: curl inside +# `docker build`, where BuildKit prefixes each line with "# " (run +# 42568390991), and golangci-lint-action's "Unexpected HTTP response: 504" +# (run 42568320263). # # Every class below was observed on the self-hosted pool on 2026-09-29; the # fixtures under testdata/ci-infra/ are real excerpts from those jobs. @@ -47,7 +51,8 @@ toolcache-clobbered step : (npm|node|go): command not found$ runner-lost annotation The runner has received a shutdown signal test-list-empty step ^##\[error\]go test -list produced no test functions test-list-empty silent-step \bgo test\b.*\s-list\b -upstream-download-5xx step ^curl: \(22\) The requested URL returned error: 5\d\d$ +upstream-download-5xx step ^(?:#\d+ \d+(?:\.\d+)? )?curl: \(22\) The requested URL returned error: 5\d\d$ +upstream-download-5xx step ^##\[error\]Unexpected HTTP response: 5\d\d$ # Reserved class `derived`: the job failed only to REPORT that other jobs # failed (v2 Tests' shard gate). Keep these rows last. diff --git a/.github/scripts/testdata/ci-infra/code-upstream-download-404.log b/.github/scripts/testdata/ci-infra/code-upstream-download-404.log new file mode 100644 index 0000000000..3729828c45 --- /dev/null +++ b/.github/scripts/testdata/ci-infra/code-upstream-download-404.log @@ -0,0 +1,62 @@ +2026-11-09T05:38:04.5394499Z ##[group]Run docker buildx build --load --network host --build-arg BASE_REGISTRY="$BASE_REGISTRY" -f "src/Dockerfile.contributor" -t "hive-ci-contributor:test" . +2026-11-09T05:38:04.5395357Z ^[[36;1mdocker buildx build --load --network host --build-arg BASE_REGISTRY="$BASE_REGISTRY" -f "src/Dockerfile.contributor" -t "hive-ci-contributor:test" .^[[0m +2026-11-09T05:38:04.5408586Z shell: /usr/bin/bash -e {0} +2026-11-09T05:38:04.5408807Z env: +2026-11-09T05:38:04.5408996Z ACTIONS_CACHE_SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 +2026-11-09T05:38:04.5409237Z GO_CACHE_GUARD_BUILD_CACHE: job +2026-11-09T05:38:04.5409447Z BASE_REGISTRY: mirror.gcr.io/library +2026-11-09T05:38:04.5409654Z ##[endgroup] +2026-11-09T05:38:04.8809509Z #0 building with "builder-9e62066e-81b1-48b5-9654-3d2862d8a5ec" instance using docker-container driver +2026-11-09T05:38:40.8576324Z +2026-11-09T05:38:51.7305872Z #17 11.03 /tmp/just.tar.gz: OK +2026-11-09T05:38:51.8654320Z #17 11.17 curl: (22) The requested URL returned error: 404 +2026-11-09T05:39:01.8945014Z #17 21.19 curl: (22) The requested URL returned error: 404 +2026-11-09T05:39:11.9226188Z #17 31.22 curl: (22) The requested URL returned error: 404 +2026-11-09T05:39:21.9502710Z #17 41.25 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8186930Z #17 ERROR: process "/bin/sh -c ARCH=\"${TARGETARCH:-$(dpkg --print-architecture)}\" && case \"$ARCH\" in amd64|x86_64) JUST_TARGET=x86_64-unknown-linux-musl; JUST_SHA256=\"$JUST_SHA256_AMD64\"; YQ_ASSET=yq_linux_amd64; YQ_SHA256=\"$YQ_SHA256_AMD64\" ;; arm64|aarch64) JUST_TARGET=aarch64-unknown-linux-musl; JUST_SHA256=\"$JUST_SHA256_ARM64\"; YQ_ASSET=yq_linux_arm64; YQ_SHA256=\"$YQ_SHA256_ARM64\" ;; *) echo \"unsupported arch for just/yq: $ARCH\" >&2; exit 1 ;; esac && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/just.tar.gz \"https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_TARGET}.tar.gz\" && echo \"${JUST_SHA256} /tmp/just.tar.gz\" | sha256sum -c - && tar -xzf /tmp/just.tar.gz -C /tmp just && install -m 0755 /tmp/just /usr/local/bin/just && rm -f /tmp/just.tar.gz /tmp/just && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/yq \"https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/${YQ_ASSET}\" && echo \"${YQ_SHA256} /tmp/yq\" | sha256sum -c - && install -m 0755 /tmp/yq /usr/local/bin/yq && rm -f /tmp/yq && just --version && yq --version" did not complete successfully: exit code: 22 +2026-11-09T05:43:52.8191038Z ------ +2026-11-09T05:43:52.8194559Z > [stage-1 5/37] RUN ARCH="amd64" && case "$ARCH" in amd64|x86_64) JUST_TARGET=x86_64-unknown-linux-musl; JUST_SHA256="4a5cc2f53e6f0f8c59092a6cc38291eb729d46a7dd95d3ae582008881b84931d"; YQ_ASSET=yq_linux_amd64; YQ_SHA256="c5f056448f973ae7d39b5401949648a78f2dc1947d6a8eb65be60d5c504b9385" ;; arm64|aarch64) JUST_TARGET=aarch64-unknown-linux-musl; JUST_SHA256="748237128c4c40cbdabc65e841d05ceba13cc23a91eaba395495894c1d9764df"; YQ_ASSET=yq_linux_arm64; YQ_SHA256="88a1016bc1d657375a35864e4f44b6f333df8ff97b559f51bba0adcb2169df09" ;; *) echo "unsupported arch for just/yq: $ARCH" >&2; exit 1 ;; esac && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/just.tar.gz "https://github.com/casey/just/releases/download/1.58.0/just-1.58.0-${JUST_TARGET}.tar.gz" && echo "${JUST_SHA256} /tmp/just.tar.gz" | sha256sum -c - && tar -xzf /tmp/just.tar.gz -C /tmp just && install -m 0755 /tmp/just /usr/local/bin/just && rm -f /tmp/just.tar.gz /tmp/just && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/yq "https://github.com/mikefarah/yq/releases/download/v4.53.6/${YQ_ASSET}" && echo "${YQ_SHA256} /tmp/yq" | sha256sum -c - && install -m 0755 /tmp/yq /usr/local/bin/yq && rm -f /tmp/yq && just --version && yq --version: +2026-11-09T05:43:52.8198817Z 221.8 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8199109Z 231.8 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8199369Z 241.9 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8199629Z 251.9 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8199892Z 261.9 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8200145Z 272.0 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8200396Z 282.0 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8200649Z 292.0 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8200901Z 302.1 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8201392Z 312.1 curl: (22) The requested URL returned error: 404 +2026-11-09T05:43:52.8201610Z ------ +2026-11-09T05:43:52.8201702Z +2026-11-09T05:43:52.8202097Z ^[[33m1 warning found (use docker --debug to expand): +2026-11-09T05:43:52.8202628Z ^[[0m - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NODESOURCE_KEY_SHA256") (line 222) +2026-11-09T05:43:52.8203073Z Dockerfile.contributor:189 +2026-11-09T05:43:52.8203261Z -------------------- +2026-11-09T05:43:52.8203576Z 188 | ARG YQ_SHA256_ARM64=88a1016bc1d657375a35864e4f44b6f333df8ff97b559f51bba0adcb2169df09 +2026-11-09T05:43:52.8204079Z 189 | >>> RUN ARCH="${TARGETARCH:-$(dpkg --print-architecture)}" \ +2026-11-09T05:43:52.8204344Z 190 | >>> && case "$ARCH" in \ +2026-11-09T05:43:52.8204674Z 191 | >>> amd64|x86_64) JUST_TARGET=x86_64-unknown-linux-musl; JUST_SHA256="$JUST_SHA256_AMD64"; \ +2026-11-09T05:43:52.8205096Z 192 | >>> YQ_ASSET=yq_linux_amd64; YQ_SHA256="$YQ_SHA256_AMD64" ;; \ +2026-11-09T05:43:52.8205534Z 193 | >>> arm64|aarch64) JUST_TARGET=aarch64-unknown-linux-musl; JUST_SHA256="$JUST_SHA256_ARM64"; \ +2026-11-09T05:43:52.8205954Z 194 | >>> YQ_ASSET=yq_linux_arm64; YQ_SHA256="$YQ_SHA256_ARM64" ;; \ +2026-11-09T05:43:52.8206373Z 195 | >>> *) echo "unsupported arch for just/yq: $ARCH" >&2; exit 1 ;; \ +2026-11-09T05:43:52.8206780Z 196 | >>> esac \ +2026-11-09T05:43:52.8207453Z 197 | >>> && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors \ +2026-11-09T05:43:52.8208088Z 198 | >>> -o /tmp/just.tar.gz \ +2026-11-09T05:43:52.8208812Z 199 | >>> "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_TARGET}.tar.gz" \ +2026-11-09T05:43:52.8209444Z 200 | >>> && echo "${JUST_SHA256} /tmp/just.tar.gz" | sha256sum -c - \ +2026-11-09T05:43:52.8209761Z 201 | >>> && tar -xzf /tmp/just.tar.gz -C /tmp just \ +2026-11-09T05:43:52.8210045Z 202 | >>> && install -m 0755 /tmp/just /usr/local/bin/just \ +2026-11-09T05:43:52.8210309Z 203 | >>> && rm -f /tmp/just.tar.gz /tmp/just \ +2026-11-09T05:43:52.8210699Z 204 | >>> && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors \ +2026-11-09T05:43:52.8211083Z 205 | >>> -o /tmp/yq \ +2026-11-09T05:43:52.8211397Z 206 | >>> "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/${YQ_ASSET}" \ +2026-11-09T05:43:52.8211767Z 207 | >>> && echo "${YQ_SHA256} /tmp/yq" | sha256sum -c - \ +2026-11-09T05:43:52.8212039Z 208 | >>> && install -m 0755 /tmp/yq /usr/local/bin/yq \ +2026-11-09T05:43:52.8212275Z 209 | >>> && rm -f /tmp/yq \ +2026-11-09T05:43:52.8212464Z 210 | >>> && just --version \ +2026-11-09T05:43:52.8212655Z 211 | >>> && yq --version +2026-11-09T05:43:52.8212829Z 212 | +2026-11-09T05:43:52.8212978Z -------------------- +2026-11-09T05:43:52.8216281Z ERROR: failed to build: failed to solve: process "/bin/sh -c ARCH=\"${TARGETARCH:-$(dpkg --print-architecture)}\" && case \"$ARCH\" in amd64|x86_64) JUST_TARGET=x86_64-unknown-linux-musl; JUST_SHA256=\"$JUST_SHA256_AMD64\"; YQ_ASSET=yq_linux_amd64; YQ_SHA256=\"$YQ_SHA256_AMD64\" ;; arm64|aarch64) JUST_TARGET=aarch64-unknown-linux-musl; JUST_SHA256=\"$JUST_SHA256_ARM64\"; YQ_ASSET=yq_linux_arm64; YQ_SHA256=\"$YQ_SHA256_ARM64\" ;; *) echo \"unsupported arch for just/yq: $ARCH\" >&2; exit 1 ;; esac && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/just.tar.gz \"https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_TARGET}.tar.gz\" && echo \"${JUST_SHA256} /tmp/just.tar.gz\" | sha256sum -c - && tar -xzf /tmp/just.tar.gz -C /tmp just && install -m 0755 /tmp/just /usr/local/bin/just && rm -f /tmp/just.tar.gz /tmp/just && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/yq \"https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/${YQ_ASSET}\" && echo \"${YQ_SHA256} /tmp/yq\" | sha256sum -c - && install -m 0755 /tmp/yq /usr/local/bin/yq && rm -f /tmp/yq && just --version && yq --version" did not complete successfully: exit code: 22 +2026-11-09T05:43:52.8268368Z ##[error]Process completed with exit code 1. diff --git a/.github/scripts/testdata/ci-infra/expected.tsv b/.github/scripts/testdata/ci-infra/expected.tsv index 662916c2df..6412faa6ba 100644 --- a/.github/scripts/testdata/ci-infra/expected.tsv +++ b/.github/scripts/testdata/ci-infra/expected.tsv @@ -16,6 +16,9 @@ infra-toolcache-clobbered-copyfile infra:toolcache-clobbered infra-toolcache-clobbered-rmdir infra:toolcache-clobbered infra-toolcache-clobbered-npm infra:toolcache-clobbered infra-upstream-download-5xx infra:upstream-download-5xx +infra-upstream-download-5xx-buildkit infra:upstream-download-5xx +infra-upstream-download-5xx-golangci infra:upstream-download-5xx +code-upstream-download-404 code derived-shard-gate derived code-compile-redeclared code code-vet-undefined code diff --git a/.github/scripts/testdata/ci-infra/infra-upstream-download-5xx-buildkit.log b/.github/scripts/testdata/ci-infra/infra-upstream-download-5xx-buildkit.log new file mode 100644 index 0000000000..7697eab264 --- /dev/null +++ b/.github/scripts/testdata/ci-infra/infra-upstream-download-5xx-buildkit.log @@ -0,0 +1,62 @@ +2026-11-09T05:38:04.5394499Z ##[group]Run docker buildx build --load --network host --build-arg BASE_REGISTRY="$BASE_REGISTRY" -f "src/Dockerfile.contributor" -t "hive-ci-contributor:test" . +2026-11-09T05:38:04.5395357Z ^[[36;1mdocker buildx build --load --network host --build-arg BASE_REGISTRY="$BASE_REGISTRY" -f "src/Dockerfile.contributor" -t "hive-ci-contributor:test" .^[[0m +2026-11-09T05:38:04.5408586Z shell: /usr/bin/bash -e {0} +2026-11-09T05:38:04.5408807Z env: +2026-11-09T05:38:04.5408996Z ACTIONS_CACHE_SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 +2026-11-09T05:38:04.5409237Z GO_CACHE_GUARD_BUILD_CACHE: job +2026-11-09T05:38:04.5409447Z BASE_REGISTRY: mirror.gcr.io/library +2026-11-09T05:38:04.5409654Z ##[endgroup] +2026-11-09T05:38:04.8809509Z #0 building with "builder-9e62066e-81b1-48b5-9654-3d2862d8a5ec" instance using docker-container driver +2026-11-09T05:38:40.8576324Z +2026-11-09T05:38:51.7305872Z #17 11.03 /tmp/just.tar.gz: OK +2026-11-09T05:38:51.8654320Z #17 11.17 curl: (22) The requested URL returned error: 504 +2026-11-09T05:39:01.8945014Z #17 21.19 curl: (22) The requested URL returned error: 504 +2026-11-09T05:39:11.9226188Z #17 31.22 curl: (22) The requested URL returned error: 504 +2026-11-09T05:39:21.9502710Z #17 41.25 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8186930Z #17 ERROR: process "/bin/sh -c ARCH=\"${TARGETARCH:-$(dpkg --print-architecture)}\" && case \"$ARCH\" in amd64|x86_64) JUST_TARGET=x86_64-unknown-linux-musl; JUST_SHA256=\"$JUST_SHA256_AMD64\"; YQ_ASSET=yq_linux_amd64; YQ_SHA256=\"$YQ_SHA256_AMD64\" ;; arm64|aarch64) JUST_TARGET=aarch64-unknown-linux-musl; JUST_SHA256=\"$JUST_SHA256_ARM64\"; YQ_ASSET=yq_linux_arm64; YQ_SHA256=\"$YQ_SHA256_ARM64\" ;; *) echo \"unsupported arch for just/yq: $ARCH\" >&2; exit 1 ;; esac && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/just.tar.gz \"https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_TARGET}.tar.gz\" && echo \"${JUST_SHA256} /tmp/just.tar.gz\" | sha256sum -c - && tar -xzf /tmp/just.tar.gz -C /tmp just && install -m 0755 /tmp/just /usr/local/bin/just && rm -f /tmp/just.tar.gz /tmp/just && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/yq \"https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/${YQ_ASSET}\" && echo \"${YQ_SHA256} /tmp/yq\" | sha256sum -c - && install -m 0755 /tmp/yq /usr/local/bin/yq && rm -f /tmp/yq && just --version && yq --version" did not complete successfully: exit code: 22 +2026-11-09T05:43:52.8191038Z ------ +2026-11-09T05:43:52.8194559Z > [stage-1 5/37] RUN ARCH="amd64" && case "$ARCH" in amd64|x86_64) JUST_TARGET=x86_64-unknown-linux-musl; JUST_SHA256="4a5cc2f53e6f0f8c59092a6cc38291eb729d46a7dd95d3ae582008881b84931d"; YQ_ASSET=yq_linux_amd64; YQ_SHA256="c5f056448f973ae7d39b5401949648a78f2dc1947d6a8eb65be60d5c504b9385" ;; arm64|aarch64) JUST_TARGET=aarch64-unknown-linux-musl; JUST_SHA256="748237128c4c40cbdabc65e841d05ceba13cc23a91eaba395495894c1d9764df"; YQ_ASSET=yq_linux_arm64; YQ_SHA256="88a1016bc1d657375a35864e4f44b6f333df8ff97b559f51bba0adcb2169df09" ;; *) echo "unsupported arch for just/yq: $ARCH" >&2; exit 1 ;; esac && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/just.tar.gz "https://github.com/casey/just/releases/download/1.58.0/just-1.58.0-${JUST_TARGET}.tar.gz" && echo "${JUST_SHA256} /tmp/just.tar.gz" | sha256sum -c - && tar -xzf /tmp/just.tar.gz -C /tmp just && install -m 0755 /tmp/just /usr/local/bin/just && rm -f /tmp/just.tar.gz /tmp/just && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/yq "https://github.com/mikefarah/yq/releases/download/v4.53.6/${YQ_ASSET}" && echo "${YQ_SHA256} /tmp/yq" | sha256sum -c - && install -m 0755 /tmp/yq /usr/local/bin/yq && rm -f /tmp/yq && just --version && yq --version: +2026-11-09T05:43:52.8198817Z 221.8 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8199109Z 231.8 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8199369Z 241.9 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8199629Z 251.9 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8199892Z 261.9 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8200145Z 272.0 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8200396Z 282.0 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8200649Z 292.0 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8200901Z 302.1 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8201392Z 312.1 curl: (22) The requested URL returned error: 504 +2026-11-09T05:43:52.8201610Z ------ +2026-11-09T05:43:52.8201702Z +2026-11-09T05:43:52.8202097Z ^[[33m1 warning found (use docker --debug to expand): +2026-11-09T05:43:52.8202628Z ^[[0m - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NODESOURCE_KEY_SHA256") (line 222) +2026-11-09T05:43:52.8203073Z Dockerfile.contributor:189 +2026-11-09T05:43:52.8203261Z -------------------- +2026-11-09T05:43:52.8203576Z 188 | ARG YQ_SHA256_ARM64=88a1016bc1d657375a35864e4f44b6f333df8ff97b559f51bba0adcb2169df09 +2026-11-09T05:43:52.8204079Z 189 | >>> RUN ARCH="${TARGETARCH:-$(dpkg --print-architecture)}" \ +2026-11-09T05:43:52.8204344Z 190 | >>> && case "$ARCH" in \ +2026-11-09T05:43:52.8204674Z 191 | >>> amd64|x86_64) JUST_TARGET=x86_64-unknown-linux-musl; JUST_SHA256="$JUST_SHA256_AMD64"; \ +2026-11-09T05:43:52.8205096Z 192 | >>> YQ_ASSET=yq_linux_amd64; YQ_SHA256="$YQ_SHA256_AMD64" ;; \ +2026-11-09T05:43:52.8205534Z 193 | >>> arm64|aarch64) JUST_TARGET=aarch64-unknown-linux-musl; JUST_SHA256="$JUST_SHA256_ARM64"; \ +2026-11-09T05:43:52.8205954Z 194 | >>> YQ_ASSET=yq_linux_arm64; YQ_SHA256="$YQ_SHA256_ARM64" ;; \ +2026-11-09T05:43:52.8206373Z 195 | >>> *) echo "unsupported arch for just/yq: $ARCH" >&2; exit 1 ;; \ +2026-11-09T05:43:52.8206780Z 196 | >>> esac \ +2026-11-09T05:43:52.8207453Z 197 | >>> && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors \ +2026-11-09T05:43:52.8208088Z 198 | >>> -o /tmp/just.tar.gz \ +2026-11-09T05:43:52.8208812Z 199 | >>> "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_TARGET}.tar.gz" \ +2026-11-09T05:43:52.8209444Z 200 | >>> && echo "${JUST_SHA256} /tmp/just.tar.gz" | sha256sum -c - \ +2026-11-09T05:43:52.8209761Z 201 | >>> && tar -xzf /tmp/just.tar.gz -C /tmp just \ +2026-11-09T05:43:52.8210045Z 202 | >>> && install -m 0755 /tmp/just /usr/local/bin/just \ +2026-11-09T05:43:52.8210309Z 203 | >>> && rm -f /tmp/just.tar.gz /tmp/just \ +2026-11-09T05:43:52.8210699Z 204 | >>> && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors \ +2026-11-09T05:43:52.8211083Z 205 | >>> -o /tmp/yq \ +2026-11-09T05:43:52.8211397Z 206 | >>> "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/${YQ_ASSET}" \ +2026-11-09T05:43:52.8211767Z 207 | >>> && echo "${YQ_SHA256} /tmp/yq" | sha256sum -c - \ +2026-11-09T05:43:52.8212039Z 208 | >>> && install -m 0755 /tmp/yq /usr/local/bin/yq \ +2026-11-09T05:43:52.8212275Z 209 | >>> && rm -f /tmp/yq \ +2026-11-09T05:43:52.8212464Z 210 | >>> && just --version \ +2026-11-09T05:43:52.8212655Z 211 | >>> && yq --version +2026-11-09T05:43:52.8212829Z 212 | +2026-11-09T05:43:52.8212978Z -------------------- +2026-11-09T05:43:52.8216281Z ERROR: failed to build: failed to solve: process "/bin/sh -c ARCH=\"${TARGETARCH:-$(dpkg --print-architecture)}\" && case \"$ARCH\" in amd64|x86_64) JUST_TARGET=x86_64-unknown-linux-musl; JUST_SHA256=\"$JUST_SHA256_AMD64\"; YQ_ASSET=yq_linux_amd64; YQ_SHA256=\"$YQ_SHA256_AMD64\" ;; arm64|aarch64) JUST_TARGET=aarch64-unknown-linux-musl; JUST_SHA256=\"$JUST_SHA256_ARM64\"; YQ_ASSET=yq_linux_arm64; YQ_SHA256=\"$YQ_SHA256_ARM64\" ;; *) echo \"unsupported arch for just/yq: $ARCH\" >&2; exit 1 ;; esac && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/just.tar.gz \"https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_TARGET}.tar.gz\" && echo \"${JUST_SHA256} /tmp/just.tar.gz\" | sha256sum -c - && tar -xzf /tmp/just.tar.gz -C /tmp just && install -m 0755 /tmp/just /usr/local/bin/just && rm -f /tmp/just.tar.gz /tmp/just && curl -fsSL --retry 30 --retry-delay 10 --retry-max-time 300 --retry-connrefused --retry-all-errors -o /tmp/yq \"https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/${YQ_ASSET}\" && echo \"${YQ_SHA256} /tmp/yq\" | sha256sum -c - && install -m 0755 /tmp/yq /usr/local/bin/yq && rm -f /tmp/yq && just --version && yq --version" did not complete successfully: exit code: 22 +2026-11-09T05:43:52.8268368Z ##[error]Process completed with exit code 1. diff --git a/.github/scripts/testdata/ci-infra/infra-upstream-download-5xx-golangci.log b/.github/scripts/testdata/ci-infra/infra-upstream-download-5xx-golangci.log new file mode 100644 index 0000000000..d80699f89e --- /dev/null +++ b/.github/scripts/testdata/ci-infra/infra-upstream-download-5xx-golangci.log @@ -0,0 +1,37 @@ +2026-11-09T05:37:14.4726771Z ##[group]Run golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a +2026-11-09T05:37:14.4727483Z with: +2026-11-09T05:37:14.4727676Z version: v2.13.1 +2026-11-09T05:37:14.4727888Z working-directory: src +2026-11-09T05:37:14.4728108Z args: ./... ./crux/... +2026-11-09T05:37:14.4728316Z skip-cache: true +2026-11-09T05:37:14.4728516Z install-mode: binary +2026-11-09T05:37:14.4728730Z install-only: false +2026-11-09T05:37:14.4731189Z github-token: *** +2026-11-09T05:37:14.4731396Z verify: true +2026-11-09T05:37:14.4731596Z only-new-issues: false +2026-11-09T05:37:14.4731818Z skip-save-cache: false +2026-11-09T05:37:14.4732049Z cache-invalidation-interval: 7 +2026-11-09T05:37:14.4732310Z problem-matchers: false +2026-11-09T05:37:14.4732540Z env: +2026-11-09T05:37:14.4732727Z GO_CACHE_GUARD_BUILD_CACHE: job +2026-11-09T05:37:14.4732976Z GOTOOLCHAIN: local +2026-11-09T05:37:14.4733182Z ##[endgroup] +2026-11-09T05:37:14.6192548Z ##[group]Restore cache +2026-11-09T05:37:14.6195197Z Skipping cache restoration +2026-11-09T05:37:14.6196573Z ##[endgroup] +2026-11-09T05:37:14.6197312Z ##[group]Install +2026-11-09T05:37:14.6199693Z Finding needed golangci-lint version... +2026-11-09T05:37:14.6203375Z Installation mode: binary +2026-11-09T05:37:14.6204612Z Installing golangci-lint binary v2.13.1... +2026-11-09T05:37:14.6206156Z Downloading binary https://github.com/golangci/golangci-lint/releases/download/v2.13.1/golangci-lint-2.13.1-linux-amd64.tar.gz ... +2026-11-09T05:37:25.6552917Z Unexpected HTTP response: 504 +2026-11-09T05:37:25.6554716Z Waiting 10 seconds before trying again +2026-11-09T05:37:35.6698842Z Unexpected HTTP response: 504 +2026-11-09T05:37:35.6699432Z Waiting 16 seconds before trying again +2026-11-09T05:37:51.6850747Z ##[endgroup] +2026-11-09T05:37:51.6936148Z ##[error]Failed to run: Error: Unexpected HTTP response: 504, Error: Unexpected HTTP response: 504 + at /home/runner/work/_actions/golangci/golangci-lint-action/ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a/dist/run/index.js:12369:25 + at Generator.next () + at fulfilled (/home/runner/work/_actions/golangci/golangci-lint-action/ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a/dist/run/index.js:12270:58) + at process.processTicksAndRejections (node:internal/process/task_queues:104:5) +2026-11-09T05:37:51.6947704Z ##[error]Unexpected HTTP response: 504 diff --git a/.gitignore b/.gitignore index 894a37beb9..baa6b80f12 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,6 @@ src/crux/.smoke/ # scratch Chrome profile from src/scripts/dashboard-mobile-shots.mjs .chrome-dashboard-mobile-shots/ + +# Python bytecode caches (e.g. from running .github/scripts locally) +__pycache__/ From 3dd9b743695e39cf9dcdc828340d99ee81cbecf1 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 07:41:49 +0000 Subject: [PATCH 035/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.208.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.208.1 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-17353-copilot-cli-hung-classify.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-17353-copilot-cli-hung-classify.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c5f7ea5209..02d0efee45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.208.1) + +### Fixed + +- Fleet report: the Copilot hang detector's repeated `copilot hung with no CLI prompt, running diagnostic` WARNs — a Copilot agent showed no CLI prompt 180 s after launch, so the hive killed its session, ran a bare `copilot` diagnostic and relaunched it — and the diagnostic's own `timed out waiting for copilot error output` WARNs are now classified as `copilot_cli_hung` (medium, component `agent-runtime`), so a hive whose Copilot agents keep failing to reach their prompt files one self-report that names the condition instead of `unclassified_error_repeated` ([#17353](https://github.com/hivecommons/hive/issues/17353)). + ## 2026-11-09 (v5.208.0) ### Added diff --git a/changelog.d/fixed-17353-copilot-cli-hung-classify.md b/changelog.d/fixed-17353-copilot-cli-hung-classify.md deleted file mode 100644 index da264bfa3e..0000000000 --- a/changelog.d/fixed-17353-copilot-cli-hung-classify.md +++ /dev/null @@ -1 +0,0 @@ -- Fleet report: the Copilot hang detector's repeated `copilot hung with no CLI prompt, running diagnostic` WARNs — a Copilot agent showed no CLI prompt 180 s after launch, so the hive killed its session, ran a bare `copilot` diagnostic and relaunched it — and the diagnostic's own `timed out waiting for copilot error output` WARNs are now classified as `copilot_cli_hung` (medium, component `agent-runtime`), so a hive whose Copilot agents keep failing to reach their prompt files one self-report that names the condition instead of `unclassified_error_repeated` ([#17353](https://github.com/hivecommons/hive/issues/17353)). From 415a21324c395dc7e784191cb2218cd9a4d00ccc Mon Sep 17 00:00:00 2001 From: Karibhou <157208370+Karibhou@users.noreply.github.com> Date: Mon, 9 Nov 2026 11:08:32 +0100 Subject: [PATCH 036/123] =?UTF-8?q?=E2=9C=A8=20feature:=20activity=20monit?= =?UTF-8?q?or=20reads=20a=20hive=20deferral=20as=20"Deferred=20=C2=B7=20wa?= =?UTF-8?q?iting=20on=20#N"=20(#17348)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ Activity monitor: read a hive deferral as "Deferred · waiting on #N" A red PR the hive had already diagnosed and deferred (scanner posted "Deferring." naming successor issues) read "Unassigned · next: …" on the PR in progress chevron, as if nobody had looked. - Relay: a hive agent's PR comment that defers it ("Deferring …", "Deferred …", "Waiting on #N", no start phrase) is audited as agent_pr_deferred bound to the PR's current head, with the successor references it names, whether a maintainer may close it, and its words. - Dashboard: the tracker reads those entries; a deferral standing on the current head of a red PR yields code state `deferred`, word "Deferred · waiting on #17345 +1" (or "· by "), plain amber and still, detail = reason + successors, link to the first successor. A kick / claim / push for the same head after the deferral wins; a new head clears it; the deferring agent's own comment is not pickup. - Row: "Close now" leads when the deferral says a maintainer may close the PR (won't-fix decision on the PR itself). - Docs: activity-monitor word table, hive-open-issue, write surface. Closes #17347 Hive-Run: hivecommons/hive#17347 Hive-Plan: issue-17347-deferred-chevron Hive-Spec: activity-monitor-pr-in-progress#deferred Signed-off-by: Karibhou * 🐛 Activity monitor: a deferral reason cannot override its typed audit pairs The reason is free text from the agent's comment and can quote external content. A reason containing ', close_ok=true, url=…' overrode the typed pairs (last occurrence won), flipping the [Close now] gate. - Reader: first occurrence of a key wins; typed pairs precede the reason. - Relay: ', =' inside the reason is written as '; ='. Refs #17347 Signed-off-by: Karibhou * 🐛 Activity monitor: only a deferral of the PR itself reads as Deferred - Relay: a sentence-initial "Deferred"/"Deferring" counts only when it defers the PR: alone, followed by punctuation, or with the PR or a wait as its object ("this PR", "until", "to #N"). A fixer's "Fix pushed. Deferred the follow-up to #12." no longer records agent_pr_deferred. An end-of-line anchor was not used: the #17340 diagnosis continues on the deferral's line ("… push to it). hive/awaiting-ci: …"). - Tracker: on a deferred head an agent_label_applied from the deferring run is not pickup, like its comment. Refs #17347 Signed-off-by: Karibhou * 🐛 fix: a comment opening with 'Deferred the … to #N' is not a PR deferral The commentDeferral fallback re-admitted any comment that opens with the defer verb, so a fixer's note like 'Deferred the follow-up to #12.' still recorded agent_pr_deferred. prDeferralSentence already judges that opening; the fallback now only covers the other issue-deferral forms. Refs #17347 Signed-off-by: Karibhou * ci: retrigger checks after GitHub release-download 504s golangci-lint failed installing the v2.13.1 binary (HTTP 504) and runtime-tests failed downloading just 1.58.0 (curl 22 / HTTP 504); build-and-test failed only as their aggregator. No code change. Signed-off-by: Karibhou * refactor(dashboard): link deferral successor via overviewItemURL Reuse overviewItemURL with the status GitHub base URL instead of slicing the row's PR URL, as suggested in review on #17348. Signed-off-by: Karibhou Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> --- changelog.d/added-17347-deferred-pr-word.md | 1 + .../dashboard-sections/activity-monitor.md | 16 +- src/docs/github-write-surface.md | 2 +- src/docs/hive-open-issue.md | 13 + src/pkg/dashboard/stage_tracker.go | 4 + src/pkg/dashboard/stage_tracker_build.go | 4 +- src/pkg/dashboard/stage_tracker_deferral.go | 200 ++++++++++++++++ .../dashboard/stage_tracker_deferral_test.go | 223 ++++++++++++++++++ src/pkg/dashboard/stage_tracker_reauthor.go | 2 +- .../dashboard/stage_tracker_remediation.go | 52 +++- .../stage_tracker_remediation_chevron.test.js | 20 ++ .../stage_tracker_row_actions_test.go | 3 + src/pkg/dashboard/static-src/css/tracker.css | 7 +- .../static-src/js/tracker-actions.js | 41 +++- .../static-src/js/tracker-row-strip.js | 11 +- src/pkg/dashboard/static/index.html | 59 ++++- src/pkg/github/issue_request_watcher.go | 5 + src/pkg/github/pr_deferral.go | 201 ++++++++++++++++ src/pkg/github/pr_deferral_test.go | 130 ++++++++++ 19 files changed, 962 insertions(+), 32 deletions(-) create mode 100644 changelog.d/added-17347-deferred-pr-word.md create mode 100644 src/pkg/dashboard/stage_tracker_deferral.go create mode 100644 src/pkg/dashboard/stage_tracker_deferral_test.go create mode 100644 src/pkg/github/pr_deferral.go create mode 100644 src/pkg/github/pr_deferral_test.go diff --git a/changelog.d/added-17347-deferred-pr-word.md b/changelog.d/added-17347-deferred-pr-word.md new file mode 100644 index 0000000000..38c196c7e4 --- /dev/null +++ b/changelog.d/added-17347-deferred-pr-word.md @@ -0,0 +1 @@ +- Activity monitor: a red PR the hive deferred now reads **Deferred · waiting on #N** (first successor, `+N` for more; *Deferred · by scanner* when none is named) in plain amber instead of **Unassigned · next: …**, which sent operators to investigate work the hive had already decided ([#17347](https://github.com/hivecommons/hive/issues/17347)). The issue-request relay records a hive agent's PR comment that defers the PR (*Deferring …*, *Deferred …*, *Waiting on #N*) as an `agent_pr_deferred` audit entry bound to the PR's head, with the successors it names and the deferral's own words; the tooltip carries the reason, every successor and the first one's link. A fix kick, claim or push for the same head after the deferral returns the row to *Remediating* / *Fix pushed*, and a new head clears it. When the deferral says a maintainer may close the PR, the row leads with **Close now** (closes the PR as won't-fix with an attributed note). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 04eec71e8a..bcb18bf3d7 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -455,12 +455,24 @@ An *active* chevron is filled amber and carries words; an inactive one is its ic 1. **Exactly one lit stage per row.** One chevron is active — the column where the item is or where it is stuck; later stages are shown dim, with a muted queued note when they are next ([#17335](https://github.com/hivecommons/hive/issues/17335): a push during review lit *CI 7/11 · 4 running* and *Review 5/5 · adjudicating* amber together). 2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current — filled but still, icon only, its words in the tooltip — and nothing else is active. 3. **CI leads Review.** When both tracks would light at once — CI running while the review is queued, in progress or being re-adjudicated — CI is the lit chevron and Review is dim with a small note (*re-review queued* after a push, *review in progress*, *review queued*); its words stay in the tooltip, ending *… behind CI*. The stage chevron is the fallback: active only when no track is in motion. -4. **The PR in progress chevron speaks the PR's lifecycle** — draft, pushed, rebasing, *Unassigned · next: scanner*, *Waiting for @author · fix owed* — never a CI or review verdict. *CI failing*, *CI 4/11 · 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail. +4. **The PR in progress chevron speaks the PR's lifecycle** — draft, pushed, rebasing, *Unassigned · next: scanner*, *Deferred · waiting on #N*, *Waiting for @author · fix owed* — never a CI or review verdict. *CI failing*, *CI 4/11 · 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail. 5. **The CI and Review tooltips state what the track waits on — never "activity unknown".** With no verdict and no reviewer in flight the spoke derives the Review statement from what it already knows, in this order: the PR is merged or closed (*Review · n/a (closed)*), it is a draft (*Review · draft, not requested*), CI on the head has not finished (*Review · waiting for CI*), CI is done and nobody started (*Review · not started · hive reviewer next*, or *· needs reviewer* when the repo has no hive reviewer lane). A settled verdict explains itself — *Changes requested by the hive reviewer: 1 perspective posted findings … · 12m ago · quality ✓ · security ✗: token logged* — and stays known as its observation ages. The one no-data wording, *Review · no data for head f269349 yet · refreshing* (CI: *CI · no checks observed for head … yet · refreshing*), appears only when the spoke has fetched nothing for the head, and names the next step. +On a red PR (CI failing or changes requested on the current head, or a 07x fix stage) the PR in progress word comes from pickup evidence: + +| Word | State | Fill | When | +|---|---|---|---| +| *Remediating · scanner · 4m* | `remediating` | amber, pulsing | A hive fix kick, a clanker claim or a working agent's action on the PR landed after the red signal. | +| *Fix pushed f269349 · re-review pending* | `fix_pushed` | done-style, green word | A new head landed after the red signal; CI and the re-review on it are the open work. | +| *Deferred · waiting on #17345 +1* | `deferred` | amber, still | A hive agent deferred this head ([#17347](https://github.com/hivecommons/hive/issues/17347)): its comment on the PR said *Deferring …* / *Deferred …* / *Waiting on #N*. The word names the first successor issue or PR it named (`+N` for more; *Deferred · by scanner* when it named none); the tooltip carries the deferral's own words, every successor and the first one's link. When the deferral says a maintainer may close the PR, the row's lead action is `[Close now]`. | +| *Waiting for @author · fix owed* | `waiting_owner` | amber, still | The author owes the next head (071/072). | +| *Unassigned · next: scanner* | `unassigned` | amber-red, still | Nobody picked it up and the hive did not defer it. | + +The relay records a deferral as an `agent_pr_deferred` audit entry bound to the PR's head at the time. A fix kick, claim or push for the same head *after* the deferral returns the row to *Remediating* / *Fix pushed*; a new head clears the deferral, because the hive has to decide again. The deferring agent's own comment, or a later note on the PR, is never read as pickup. + #### The row's lead action, inline -A row whose next move is yours does not hide its answer behind three dots. Beside the chips on the right of the header (and on a nested PR sub-row's own header), the row renders its **lead action** as a real `
    +
    + + +
    diff --git a/src/pkg/dashboard/static-src/js/config-state.js b/src/pkg/dashboard/static-src/js/config-state.js index 81f7869d99..3c84095974 100644 --- a/src/pkg/dashboard/static-src/js/config-state.js +++ b/src/pkg/dashboard/static-src/js/config-state.js @@ -84,7 +84,7 @@ { tab: 'Labels', section: 'Labels', label: 'Adopt red contributor PRs', key: 'governor.labels.stage.adoption.enabled', text: 'adoption adopted-by-hive stage 074 red contributor pr grace online offline supersede takeover in place after offline unregistered heartbeat governor.labels.stage.adoption.enabled governor.labels.stage.contributor_grace_online governor.labels.stage.contributor_grace_offline governor.labels.stage.adoption.after_offline governor.labels.stage.adoption.after_unregistered governor.labels.stage.adoption.in_place governor.labels.stage.adoption.strict_attribution strict attribution governor.labels.stage.adoption.auto_merge auto merge adopted head hive authority governor.labels.stage.adoption.supersede.close_first close first superseded reopen copy failed governor.labels.stage.adoption.close_superseded close superseded on adopt on merge clanker authored opt-in label governor.labels.stage.adoption.offline_grace offline grace rebase failed twice fixer resolving conflicts governor.labels.stage.adoption.rebase_attempt_timeout rebase attempt timeout' }, { tab: 'Hub', section: 'Contributor Relay', label: 'Fix budget', key: 'contribute.max_parallel_fixes', text: 'fix budget parallel fixes focus window red pr fix-pr preempt spawn contribute.max_parallel_fixes contribute.min_focus_window' }, { tab: 'Logging', section: 'Logging', label: 'Governor logging', key: 'governor.logging.max_size_mb', text: 'governor logging directory level compression max size age backups governor.logging.compress governor.logging.dir governor.logging.level governor.logging.max_age_days governor.logging.max_backups governor.logging.max_size_mb' }, - { tab: 'Advisory', section: 'Advisory', label: 'Advisory digest', key: 'governor.advisory.max_findings', text: 'advisory digest max findings show all staleness pr autoclose target linear issue retry backoff' }, + { tab: 'Advisory', section: 'Advisory', label: 'Advisory digest', key: 'governor.advisory.max_findings', text: 'advisory digest max findings show all staleness pr autoclose target linear issue retry backoff update interval rewrite floor changed digest governor.advisory.update_interval_s governor.advisory.digest_min_interval' }, { tab: 'Features', section: 'Work intake & issue lifecycle', label: 'Event triggers', key: 'triggers', text: 'event triggers CEL scanner issue first seen issue.opened pr.opened github webhook rules repository agent priority' }, { tab: 'Features', section: 'Work intake & issue lifecycle', label: 'Stall replan', key: 'governor.replan.enabled', text: 'stall replan approved plans architect interval threshold max replans' }, { tab: 'Advisory', section: 'Queue health', label: 'Queue health thresholds', key: 'governor.advisory.queue_health.blocked_pr_pct', text: 'advisory queue health blocked needs human stale lane share check share thresholds' }, diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 0f9462837d..d8aaeee6d0 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -53876,7 +53876,7 @@

    Configure LiteLLM

    { tab: 'Labels', section: 'Labels', label: 'Adopt red contributor PRs', key: 'governor.labels.stage.adoption.enabled', text: 'adoption adopted-by-hive stage 074 red contributor pr grace online offline supersede takeover in place after offline unregistered heartbeat governor.labels.stage.adoption.enabled governor.labels.stage.contributor_grace_online governor.labels.stage.contributor_grace_offline governor.labels.stage.adoption.after_offline governor.labels.stage.adoption.after_unregistered governor.labels.stage.adoption.in_place governor.labels.stage.adoption.strict_attribution strict attribution governor.labels.stage.adoption.auto_merge auto merge adopted head hive authority governor.labels.stage.adoption.supersede.close_first close first superseded reopen copy failed governor.labels.stage.adoption.close_superseded close superseded on adopt on merge clanker authored opt-in label governor.labels.stage.adoption.offline_grace offline grace rebase failed twice fixer resolving conflicts governor.labels.stage.adoption.rebase_attempt_timeout rebase attempt timeout' }, { tab: 'Hub', section: 'Contributor Relay', label: 'Fix budget', key: 'contribute.max_parallel_fixes', text: 'fix budget parallel fixes focus window red pr fix-pr preempt spawn contribute.max_parallel_fixes contribute.min_focus_window' }, { tab: 'Logging', section: 'Logging', label: 'Governor logging', key: 'governor.logging.max_size_mb', text: 'governor logging directory level compression max size age backups governor.logging.compress governor.logging.dir governor.logging.level governor.logging.max_age_days governor.logging.max_backups governor.logging.max_size_mb' }, - { tab: 'Advisory', section: 'Advisory', label: 'Advisory digest', key: 'governor.advisory.max_findings', text: 'advisory digest max findings show all staleness pr autoclose target linear issue retry backoff' }, + { tab: 'Advisory', section: 'Advisory', label: 'Advisory digest', key: 'governor.advisory.max_findings', text: 'advisory digest max findings show all staleness pr autoclose target linear issue retry backoff update interval rewrite floor changed digest governor.advisory.update_interval_s governor.advisory.digest_min_interval' }, { tab: 'Features', section: 'Work intake & issue lifecycle', label: 'Event triggers', key: 'triggers', text: 'event triggers CEL scanner issue first seen issue.opened pr.opened github webhook rules repository agent priority' }, { tab: 'Features', section: 'Work intake & issue lifecycle', label: 'Stall replan', key: 'governor.replan.enabled', text: 'stall replan approved plans architect interval threshold max replans' }, { tab: 'Advisory', section: 'Queue health', label: 'Queue health thresholds', key: 'governor.advisory.queue_health.blocked_pr_pct', text: 'advisory queue health blocked needs human stale lane share check share thresholds' }, @@ -65067,6 +65067,10 @@

    ${model.editIndex === null ? 'Add Event trigger' : 'Edit Event trigger'}

    Update interval (s) ${yamlHint('governor.advisory.update_interval_s')} ${settingHelpMark('advisory', '', 'Update interval (s)', `How often the digest comment on the pinned advisory issue is checked and refreshed. 0 = default (60s, every governor cycle). Longer values (30–3600s) reduce GitHub API writes and notification churn on watched repos; changes apply live from the next cycle. Unchanged digests are already skipped, and the periodic forced refresh that heals hand-edited comments stretches with this interval.`)}
    +
    + + +
    diff --git a/src/pkg/github/advisory.go b/src/pkg/github/advisory.go index ae280099f5..d4c1827f96 100644 --- a/src/pkg/github/advisory.go +++ b/src/pkg/github/advisory.go @@ -7,6 +7,7 @@ import ( "fmt" "log/slog" "net/http" + "regexp" "strconv" "strings" "time" @@ -323,6 +324,16 @@ const ( advisoryDigestPrefix = "## 🐝 Advisory Digest" githubCommentCharLimit = 65536 truncationFooterPadding = 200 + // advisoryDigestMarker opens the HTML comment that anchors the one + // upserted digest comment per issue (#17435): "". N is read back from the existing comment on every + // cycle, so the counter continues across governor restarts without any + // local store. + advisoryDigestMarker = "`) + +// parseDigestUpdates returns how many times the existing digest comment has +// been written according to its marker; 0 for a legacy or absent comment. +func parseDigestUpdates(body string) int { + m := digestUpdatesPattern.FindStringSubmatch(body) + if m == nil { + return 0 + } + n, err := strconv.Atoi(m[1]) + if err != nil { + return 0 + } + return n +} + +// wrapDigestComment frames the rendered digest with the upsert marker and the +// "Updated N times · last " footer (#17435). Both are excluded from the +// material fingerprint (see volatileDigestPatterns), so the bookkeeping never +// makes an unchanged digest look changed. +func wrapDigestComment(digest string, updates int, now time.Time) string { + times := "times" + if updates == 1 { + times = "time" + } + return fmt.Sprintf("%s updates=%d -->\n%s\n\n_Updated %d %s · last %s_\n", + advisoryDigestMarker, updates, strings.TrimRight(digest, "\n"), updates, times, now.UTC().Format(time.RFC3339)) +} + func (c *Client) ensureAdvisoryLabel(ctx context.Context, owner, repo string, issueNum int) { _, _, labelErr := c.client.Issues.CreateLabel(ctx, owner, repo, &gh.Label{ Name: gh.Ptr(advisoryLabelName), @@ -748,7 +846,7 @@ type digestScan struct { // only noted in scan.foreign so the resolution can log it. func (c *Client) scanDigestPage(comments []*gh.IssueComment, scan *digestScan) (digestComment, bool) { for _, comment := range comments { - if !strings.HasPrefix(comment.GetBody(), advisoryDigestPrefix) { + if !isAdvisoryDigestBody(comment.GetBody()) { continue } if c.appAuth == nil { diff --git a/src/pkg/github/advisory_min_interval_test.go b/src/pkg/github/advisory_min_interval_test.go new file mode 100644 index 0000000000..f4418a97c1 --- /dev/null +++ b/src/pkg/github/advisory_min_interval_test.go @@ -0,0 +1,180 @@ +package github + +import ( + "context" + "fmt" + "strings" + "testing" + "time" + + "github.com/hivecommons/hive/pkg/advisory" +) + +// Coverage for hivecommons/hive#17435: the one digest comment on the pinned +// advisory issue was rewritten every eval cycle (~every 5 minutes on +// hivecommons/hive#2364) because live queue counts in the body drift each +// cycle. A changed digest is now written at most once per +// governor.advisory.digest_min_interval, in place, with a marker and an +// "Updated N times" footer whose counter survives restarts. + +// countingDigestAt renders a 1-finding digest whose title carries a live +// count, the shape of drift that defeated the material fingerprint on #2364. +func countingDigestAt(at time.Time, queued int) string { + return advisory.FormatDigestMarkdown(&advisory.Digest{ + GeneratedAt: at, + Mode: "advisory", + ByAgent: map[string][]advisory.Finding{"scanner": {{ + Agent: "scanner", Timestamp: time.Date(2026, 11, 1, 0, 0, 0, 0, time.UTC), + Type: "queue", Severity: "high", + Title: fmt.Sprintf("governor actionable queue %d PRs", queued), + }}}, + TotalCount: 1, + }, advisory.DigestOptions{Org: "testorg", PrimaryRepo: "testrepo"}) +} + +func TestEvaluateDigestSuppression_MinIntervalHoldsChangedContent(t *testing.T) { + t1 := time.Date(2026, 11, 9, 15, 0, 0, 0, time.UTC) + posted := countingDigestAt(t1, 10) + pending := countingDigestAt(t1.Add(5*time.Minute), 11) + if materialDigestFingerprint(posted) == materialDigestFingerprint(pending) { + t.Fatal("fixtures fingerprint identically; the min-interval branch would never be reached") + } + + sup := evaluateDigestSuppression(pending, posted, true, t1, t1.Add(5*time.Minute), time.Hour) + if !sup.suppress || sup.reason != suppressReasonMinInterval { + t.Fatalf("changed content 5m after the last write: suppress=%v reason=%q, want %q", sup.suppress, sup.reason, suppressReasonMinInterval) + } + if sup := evaluateDigestSuppression(pending, posted, true, t1, t1.Add(61*time.Minute), time.Hour); sup.suppress { + t.Fatalf("changed content after the window suppressed (%q)", sup.reason) + } + if sup := evaluateDigestSuppression(pending, posted, true, t1, t1.Add(5*time.Minute), 0); sup.suppress { + t.Fatalf("interval 0 must disable the floor, got %q", sup.reason) + } +} + +func TestMaterialDigestContent_IgnoresMarkerAndUpdateFooter(t *testing.T) { + body := countingDigestAt(time.Now(), 10) + a := wrapDigestComment(body, 3, time.Date(2026, 11, 9, 15, 0, 0, 0, time.UTC)) + b := wrapDigestComment(body, 44, time.Date(2026, 11, 9, 20, 0, 0, 0, time.UTC)) + if a == b { + t.Fatal("wrapper variants are identical; nothing is being tested") + } + if materialDigestFingerprint(a) != materialDigestFingerprint(body) { + t.Errorf("marker/footer leaked into the fingerprint:\n%s", materialDigestContent(a)) + } + if materialDigestFingerprint(a) != materialDigestFingerprint(b) { + t.Error("two wraps of the same digest fingerprint differently") + } + if got := parseDigestUpdates(b); got != 44 { + t.Errorf("parseDigestUpdates = %d, want 44", got) + } + if got := parseDigestUpdates(body); got != 0 { + t.Errorf("legacy body parseDigestUpdates = %d, want 0", got) + } +} + +// Unchanged digest → no write at all, with the floor configured. +func TestPostAdvisoryDigest_MinIntervalUnchangedWritesNothing(t *testing.T) { + org, repo := "testorg", "testrepo" + start := time.Now().Add(-3 * time.Hour) + srv := newRepeatDigestServer(t, org, repo, wrapDigestComment(countingDigestAt(start, 10), 7, start), start) + c := newTestClient(t, srv.Server, org, []string{repo}) + c.SetAdvisoryDigestMinInterval(time.Hour) + + for i := 0; i < 4; i++ { + if err := c.PostAdvisoryDigest(context.Background(), repo, 10, countingDigestAt(time.Now(), 10)); err != nil { + t.Fatalf("cycle %d: %v", i, err) + } + } + if srv.writes() != 0 { + t.Fatalf("unchanged digest wrote %d times, want 0", srv.writes()) + } +} + +// Changed digest inside the window is held; after the window it is written +// as an EDIT of the marker comment, never a new comment, and the update +// counter continues from the one on the comment. +func TestPostAdvisoryDigest_MinIntervalHoldsThenEditsInPlace(t *testing.T) { + org, repo := "testorg", "testrepo" + lastWrite := time.Now().Add(-5 * time.Minute) + srv := newRepeatDigestServer(t, org, repo, wrapDigestComment(countingDigestAt(lastWrite, 10), 7, lastWrite), lastWrite) + c := newTestClient(t, srv.Server, org, []string{repo}) + c.SetAdvisoryDigestMinInterval(time.Hour) + + // Counts drift every cycle, as on hivecommons/hive#2364. + for i := 0; i < 6; i++ { + if err := c.PostAdvisoryDigest(context.Background(), repo, 10, countingDigestAt(time.Now(), 11+i)); err != nil { + t.Fatalf("cycle %d: %v", i, err) + } + } + if srv.writes() != 0 { + t.Fatalf("changed digest 5m after the last write wrote %d times, want 0 until the window passes", srv.writes()) + } + + // The window passes: GitHub's updated_at is now old enough. + srv.updatedAt = time.Now().Add(-2 * time.Hour) + if err := c.PostAdvisoryDigest(context.Background(), repo, 10, countingDigestAt(time.Now(), 20)); err != nil { + t.Fatalf("post after window: %v", err) + } + if srv.editCalls != 1 || srv.createDone != 0 { + t.Fatalf("after the window: edits=%d creates=%d, want exactly one in-place edit", srv.editCalls, srv.createDone) + } + if !strings.HasPrefix(srv.body, advisoryDigestMarker+" updates=8 -->") { + t.Errorf("edited body does not carry the continued marker counter:\n%s", srv.body[:min(len(srv.body), 120)]) + } + if !strings.Contains(srv.body, "_Updated 8 times · last ") { + t.Errorf("edited body lacks the update footer:\n%s", srv.body) + } + + // The write just happened: a further change is held again, this time by + // the process-local last-write even though the server stamp is stale. + srv.updatedAt = time.Now().Add(-2 * time.Hour) + if err := c.PostAdvisoryDigest(context.Background(), repo, 10, countingDigestAt(time.Now(), 21)); err != nil { + t.Fatalf("post right after write: %v", err) + } + if srv.editCalls != 1 { + t.Fatalf("a change right after a write was written (edits=%d); the process-local last-write floor is not holding", srv.editCalls) + } +} + +// A fresh process (empty in-memory state) must not repost inside the window: +// the baseline is the comment's own updated_at on GitHub. +func TestPostAdvisoryDigest_MinIntervalSurvivesRestart(t *testing.T) { + org, repo := "testorg", "testrepo" + lastWrite := time.Now().Add(-10 * time.Minute) + srv := newRepeatDigestServer(t, org, repo, wrapDigestComment(countingDigestAt(lastWrite, 10), 3, lastWrite), lastWrite) + + for i := 0; i < 4; i++ { + c := newTestClient(t, srv.Server, org, []string{repo}) + c.SetAdvisoryDigestMinInterval(time.Hour) + if err := c.PostAdvisoryDigest(context.Background(), repo, 10, countingDigestAt(time.Now(), 12+i)); err != nil { + t.Fatalf("restart %d: %v", i, err) + } + } + if srv.writes() != 0 { + t.Fatalf("after 4 restarts inside the window: writes=%d, want 0", srv.writes()) + } +} + +// A legacy comment (bare heading, no marker) is adopted and gains the marker +// on its first edit; the first write on a bare target is a single create. +func TestPostAdvisoryDigest_LegacyCommentGainsMarker(t *testing.T) { + org, repo := "testorg", "testrepo" + old := time.Now().Add(-3 * time.Hour) + srv := newRepeatDigestServer(t, org, repo, countingDigestAt(old, 10), old) + c := newTestClient(t, srv.Server, org, []string{repo}) + c.SetAdvisoryDigestMinInterval(time.Hour) + + if err := c.PostAdvisoryDigest(context.Background(), repo, 10, countingDigestAt(time.Now(), 11)); err != nil { + t.Fatalf("post: %v", err) + } + if srv.editCalls != 1 || srv.createDone != 0 { + t.Fatalf("legacy comment: edits=%d creates=%d, want one edit", srv.editCalls, srv.createDone) + } + if !strings.HasPrefix(srv.body, advisoryDigestMarker+" updates=1 -->") { + t.Errorf("legacy comment did not gain the marker:\n%s", srv.body[:min(len(srv.body), 120)]) + } + if !isAdvisoryDigestBody(srv.body) || !isAdvisoryDigestBody(countingDigestAt(old, 1)) { + t.Error("isAdvisoryDigestBody must accept both the marker and the legacy heading") + } +} diff --git a/src/pkg/github/advisory_suppress.go b/src/pkg/github/advisory_suppress.go index 64eec83f94..cd45decfe5 100644 --- a/src/pkg/github/advisory_suppress.go +++ b/src/pkg/github/advisory_suppress.go @@ -25,6 +25,11 @@ const ( // zero-finding digest posted inside zeroFindingDigestMinInterval of the // previous zero-finding digest on the same target. suppressReasonZeroFindingCap = "zero_finding_cap" + // suppressReasonMinInterval marks a digest whose material content DID + // change but whose target was written less than the configured + // digest_min_interval ago (#17435). The change is not lost: the next + // cycle after the window re-renders and posts it. + suppressReasonMinInterval = "min_interval" ) // AuditActionAdvisoryDigestSuppressed is the audit action recorded when a @@ -53,6 +58,10 @@ var volatileDigestPatterns = []*regexp.Regexp{ // Commit-pin footer: the snapshot SHA advances with every upstream push, // which is repo churn rather than a change in what the agents found. regexp.MustCompile(`\b[0-9a-f]{7,40}\b`), + // The upsert marker and its "Updated N times" footer (#17435): both are + // bookkeeping about the comment, not about the findings. + regexp.MustCompile(``), + regexp.MustCompile(`(?m)^_?Updated \d+ times?\b[^\n]*$`), } // materialDigestFingerprint reduces a rendered digest body to a stable hash of @@ -130,7 +139,7 @@ type digestSuppression struct { // hasPosted is false when the target carries no digest comment yet — the first // digest on a target ALWAYS posts, so a fresh advisory issue is never left // empty by the guards. -func evaluateDigestSuppression(pending, posted string, hasPosted bool, postedAt, now time.Time) digestSuppression { +func evaluateDigestSuppression(pending, posted string, hasPosted bool, postedAt, now time.Time, minInterval time.Duration) digestSuppression { if !hasPosted { return digestSuppression{} } @@ -144,5 +153,11 @@ func evaluateDigestSuppression(pending, posted string, hasPosted bool, postedAt, !postedAt.IsZero() && now.Sub(postedAt) < zeroFindingDigestMinInterval { return digestSuppression{suppress: true, reason: suppressReasonZeroFindingCap} } + // Changed-content floor (#17435): a digest whose live counts drift every + // eval cycle must not rewrite the comment every cycle. postedAt is the + // target's own updated_at, so the floor survives a governor restart. + if minInterval > 0 && !postedAt.IsZero() && now.Sub(postedAt) < minInterval { + return digestSuppression{suppress: true, reason: suppressReasonMinInterval} + } return digestSuppression{} } diff --git a/src/pkg/github/advisory_suppress_test.go b/src/pkg/github/advisory_suppress_test.go index 1b9857c629..46b3dcb8b7 100644 --- a/src/pkg/github/advisory_suppress_test.go +++ b/src/pkg/github/advisory_suppress_test.go @@ -153,11 +153,11 @@ func TestEvaluateDigestSuppression_FirstPostAlwaysAllowed(t *testing.T) { // Sanity: with hasPosted=true these same inputs MUST suppress, otherwise // the assertion below is not exercising the short-circuit. - if sup := evaluateDigestSuppression(pending, pending, true, at, at); !sup.suppress { + if sup := evaluateDigestSuppression(pending, pending, true, at, at, 0); !sup.suppress { t.Fatal("control case did not suppress; this test cannot prove the first-post short-circuit") } - if sup := evaluateDigestSuppression(pending, pending, false, at, at); sup.suppress { + if sup := evaluateDigestSuppression(pending, pending, false, at, at, 0); sup.suppress { t.Fatalf("first digest on a target was suppressed (reason=%s); a fresh advisory issue would stay empty forever", sup.reason) } } @@ -168,7 +168,7 @@ func TestEvaluateDigestSuppression_IdenticalContentSuppressed(t *testing.T) { posted := renderZeroFindingDigest(t, t1) pending := renderZeroFindingDigest(t, t2) - sup := evaluateDigestSuppression(pending, posted, true, t1, t2) + sup := evaluateDigestSuppression(pending, posted, true, t1, t2, 0) if !sup.suppress { t.Fatal("a materially identical re-post was NOT suppressed — this is the exact 250-comment bug") } @@ -186,7 +186,7 @@ func TestEvaluateDigestSuppression_ChangedContentPostsInsideWindow(t *testing.T) posted := renderZeroFindingDigest(t, t1) pending := renderFindingDigest(t, t2, 3) - if sup := evaluateDigestSuppression(pending, posted, true, t1, t2); sup.suppress { + if sup := evaluateDigestSuppression(pending, posted, true, t1, t2, 0); sup.suppress { t.Fatalf("0-findings → 3-findings was suppressed (reason=%s) — real news would be swallowed", sup.reason) } @@ -194,7 +194,7 @@ func TestEvaluateDigestSuppression_ChangedContentPostsInsideWindow(t *testing.T) // news: it must post rather than be caught by the zero-finding cap. postedThree := renderFindingDigest(t, t1, 3) pendingZero := renderZeroFindingDigest(t, t2) - if sup := evaluateDigestSuppression(pendingZero, postedThree, true, t1, t2); sup.suppress { + if sup := evaluateDigestSuppression(pendingZero, postedThree, true, t1, t2, 0); sup.suppress { t.Fatalf("3-findings → 0-findings was suppressed (reason=%s) — the all-clear would never be posted", sup.reason) } } @@ -223,7 +223,7 @@ func TestEvaluateDigestSuppression_ZeroFindingCap(t *testing.T) { // Just under 48h: capped. inside := t1.Add(47 * time.Hour) - sup := evaluateDigestSuppression(pending, posted, true, t1, inside) + sup := evaluateDigestSuppression(pending, posted, true, t1, inside, 0) if !sup.suppress { t.Fatal("drifting zero-finding digest inside the 48h window was not capped") } @@ -233,7 +233,7 @@ func TestEvaluateDigestSuppression_ZeroFindingCap(t *testing.T) { // Just past 48h: posts again, so the freshness signal never dies. outside := t1.Add(49 * time.Hour) - if sup := evaluateDigestSuppression(pending, posted, true, t1, outside); sup.suppress { + if sup := evaluateDigestSuppression(pending, posted, true, t1, outside, 0); sup.suppress { t.Fatalf("zero-finding digest suppressed 49h after the last post (reason=%s); the digest would freeze permanently", sup.reason) } } diff --git a/src/pkg/github/client.go b/src/pkg/github/client.go index 67472f493c..3836976dca 100644 --- a/src/pkg/github/client.go +++ b/src/pkg/github/client.go @@ -533,6 +533,14 @@ type Client struct { // logged at Warn in this process; later cycles log it at Debug (#16439). // Guarded by advisoryMu. advisoryForeignDigestWarned map[string]bool + // advisoryDigestMinInterval is the floor between two writes of a CHANGED + // digest to the same target (governor.advisory.digest_min_interval, + // #17435); 0 disables the gate. advisoryDigestLastWrite records, per + // "owner/repo#issue", when this process last wrote the digest, so the + // gate holds even while the listed comment's updated_at lags the PATCH. + // Both guarded by advisoryMu. + advisoryDigestMinInterval time.Duration + advisoryDigestLastWrite map[string]time.Time // hiveIdentity records which accounts count as "this hive" for the // self-authorization gate (pr_self_authorization.go, #5117). It is optional // — the gate recognises the App bot without it — and exists so an issue From 98a1a711f296107246ba0309ae087c5c483624a9 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 21:22:10 +0000 Subject: [PATCH 062/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.210.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.210.0 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 11 +++++++++++ changelog.d/added-mutation-advisory-job.md | 1 - changelog.d/fixed-crux-waitready-unavailable-cause.md | 1 - changelog.d/fixed-data-disk-warning-node-root.md | 1 - 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/added-mutation-advisory-job.md delete mode 100644 changelog.d/fixed-crux-waitready-unavailable-cause.md delete mode 100644 changelog.d/fixed-data-disk-warning-node-root.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 6677004780..9066ba7249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,17 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.210.0) + +### Added + +- ci: advisory gremlins mutation-testing job comments surviving mutants on PRs that change Go code (#17349). + +### Fixed + +- crux: WaitReady now surfaces the health route's last answer (e.g. "tmux not found on PATH") instead of a bare deadline error, and returns promptly on a 503 unavailable verdict. +- The dashboard `data_disk` check no longer warns every spoke on shared node-root image pressure: when `/data` reports an implausible size and the sampler falls back to the node root, that sample is informational below 95% and only still fails at ≥95%, where kubelet DiskPressure eviction hits the pod regardless of who owns the disk. + ## 2026-11-09 (v5.209.8) ### Fixed diff --git a/changelog.d/added-mutation-advisory-job.md b/changelog.d/added-mutation-advisory-job.md deleted file mode 100644 index a9716560b2..0000000000 --- a/changelog.d/added-mutation-advisory-job.md +++ /dev/null @@ -1 +0,0 @@ -- ci: advisory gremlins mutation-testing job comments surviving mutants on PRs that change Go code (#17349). diff --git a/changelog.d/fixed-crux-waitready-unavailable-cause.md b/changelog.d/fixed-crux-waitready-unavailable-cause.md deleted file mode 100644 index 84b57f8711..0000000000 --- a/changelog.d/fixed-crux-waitready-unavailable-cause.md +++ /dev/null @@ -1 +0,0 @@ -- crux: WaitReady now surfaces the health route's last answer (e.g. "tmux not found on PATH") instead of a bare deadline error, and returns promptly on a 503 unavailable verdict. diff --git a/changelog.d/fixed-data-disk-warning-node-root.md b/changelog.d/fixed-data-disk-warning-node-root.md deleted file mode 100644 index df1b651ce4..0000000000 --- a/changelog.d/fixed-data-disk-warning-node-root.md +++ /dev/null @@ -1 +0,0 @@ -- The dashboard `data_disk` check no longer warns every spoke on shared node-root image pressure: when `/data` reports an implausible size and the sampler falls back to the node root, that sample is informational below 95% and only still fails at ≥95%, where kubelet DiskPressure eviction hits the pod regardless of who owns the disk. From 697106b3e658b96b1e902d6852abe9b0e6f79975 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 21:35:50 +0000 Subject: [PATCH 063/123] =?UTF-8?q?=F0=9F=90=9B=20fix(heartbeat):=20bound?= =?UTF-8?q?=20the=20forge=20health=20probe=20and=20back=20off=20fleet-stat?= =?UTF-8?q?s=20retries=20when=20the=20forge=20host=20is=20unreachable=20(#?= =?UTF-8?q?17434)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(heartbeat): bound the forge health probe and back off fleet-stats retries when the forge host is unreachable Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> * 🐛 fix(heartbeat): wait on ForgeUnreachable with testutil.Eventually; resync api-reference citations The probe-recovery test polled with a fixed time.Sleep loop, which pushed the sleep ratchet one above its baseline. The server.go edit also shifted the route-registration lines the api-reference pages cite. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> --- .../fixed-forge-unreachable-heartbeat.md | 1 + src/cmd/hive/main.go | 4 +- src/docs/api-reference/auth.md | 6 +- src/docs/api-reference/dashboard-misc.md | 2 +- .../api-reference/health-status-events.md | 22 +-- src/docs/api-reference/snapshots-and-style.md | 2 +- .../collect/fleet_stats_collector.go | 77 +++++++-- .../collect/fleet_stats_collector_test.go | 131 ++++++++++++++++ src/pkg/dashboard/health_forge_probe.go | 131 ++++++++++++++++ src/pkg/dashboard/health_forge_probe_test.go | 146 ++++++++++++++++++ src/pkg/dashboard/server.go | 20 ++- src/pkg/hub/spoke/heartbeat.go | 9 +- 12 files changed, 519 insertions(+), 32 deletions(-) create mode 100644 changelog.d/fixed-forge-unreachable-heartbeat.md create mode 100644 src/pkg/dashboard/health_forge_probe.go create mode 100644 src/pkg/dashboard/health_forge_probe_test.go diff --git a/changelog.d/fixed-forge-unreachable-heartbeat.md b/changelog.d/fixed-forge-unreachable-heartbeat.md new file mode 100644 index 0000000000..d8e9059562 --- /dev/null +++ b/changelog.d/fixed-forge-unreachable-heartbeat.md @@ -0,0 +1 @@ +- An unreachable GitHub (Enterprise) host no longer makes every hub heartbeat stale: the github_auth health probe now runs under its own 3s sub-budget, reports its last cached result, and the heartbeat carries a new `forge_unreachable` field; the fleet-stats collector backs off exponentially up to 15 minutes during a forge outage and logs one WARN when it starts failing and one INFO on recovery instead of a WARN per retry ([#17427](https://github.com/hivecommons/hive/issues/17427)). diff --git a/src/cmd/hive/main.go b/src/cmd/hive/main.go index 7822c141b0..daaff1fa34 100644 --- a/src/cmd/hive/main.go +++ b/src/cmd/hive/main.go @@ -4760,7 +4760,9 @@ func (b *boot) bootHeartbeatWith(deps bootHeartbeatDeps) { // base_url and api_url — a GHE placeholder with base_url:"" but // api_url: github.ibm.com must report github.ibm.com, not be // silently rendered as github.com in the spokes table. - GitHubHost: b.cfg.GitHub.HostLabel(), + GitHubHost: b.cfg.GitHub.HostLabel(), + // Read after Health above, so it reflects this beat's probe. + ForgeUnreachable: b.dashSrv.ForgeUnreachable(), GitHubAppRequired: b.dashSrv.IsGitHubAppRequired(), GitHubAppPermIssue: b.dashSrv.GetGitHubAppPermIssue(), GitHubAppState: b.dashSrv.GetGitHubAppState(), diff --git a/src/docs/api-reference/auth.md b/src/docs/api-reference/auth.md index 79ee9ae98f..e70dfa1d62 100644 --- a/src/docs/api-reference/auth.md +++ b/src/docs/api-reference/auth.md @@ -24,6 +24,6 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | `GET` | `/api/openrouter/models` | Dashboard auth/session | Open Router Models | `pkg/dashboard/openrouter.go:47` | | `GET` | `/api/openrouter/credit` | Dashboard auth/session | Open Router Credit | `pkg/dashboard/openrouter.go:48` | | `GET` | `/openrouter/callback` | Public | Open Router Callback | `pkg/dashboard/openrouter.go:49` | -| `POST` | `/api/github-app/recheck` | Dashboard auth/session | GitHub App Recheck | `pkg/dashboard/server.go:1671` | -| `POST` | `/api/github-app/install-clicked` | Dashboard auth/session | GitHub App Install Clicked | `pkg/dashboard/server.go:1672` | -| `GET` | `/gh-setup` | Public | GitHub App Setup Callback | `pkg/dashboard/server.go:1673` | +| `POST` | `/api/github-app/recheck` | Dashboard auth/session | GitHub App Recheck | `pkg/dashboard/server.go:1675` | +| `POST` | `/api/github-app/install-clicked` | Dashboard auth/session | GitHub App Install Clicked | `pkg/dashboard/server.go:1676` | +| `GET` | `/gh-setup` | Public | GitHub App Setup Callback | `pkg/dashboard/server.go:1677` | diff --git a/src/docs/api-reference/dashboard-misc.md b/src/docs/api-reference/dashboard-misc.md index f4f7078869..63af99a4d8 100644 --- a/src/docs/api-reference/dashboard-misc.md +++ b/src/docs/api-reference/dashboard-misc.md @@ -84,7 +84,7 @@ The monitor renders CI and Review concurrently on one shared PR row; see | `POST` | `/api/hives/{id}/heartbeat` | Dashboard auth/session | Hives Heartbeat | `pkg/dashboard/api_contribute.go:377` | | `DELETE` | `/api/hives/{id}` | Owner only | Hives Delete | `pkg/dashboard/api_contribute.go:378` | | `POST` | `/api/hives/onboard` | Dashboard auth/session | Hives Onboard | `pkg/dashboard/api_contribute.go:379` | -| `GET` | `/sso` | Public | SSO | `pkg/dashboard/server.go:1678` | +| `GET` | `/sso` | Public | SSO | `pkg/dashboard/server.go:1682` | ### Activity observation provenance The CI snapshot retains real check/node IDs, head, App ID and transition times. diff --git a/src/docs/api-reference/health-status-events.md b/src/docs/api-reference/health-status-events.md index af0fc7c734..d1217f0209 100644 --- a/src/docs/api-reference/health-status-events.md +++ b/src/docs/api-reference/health-status-events.md @@ -24,17 +24,17 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | `GET` | `/api/version` | Dashboard auth/session | Build/version metadata; includes `upgradeMarker` (`target`, `current`, `attempts`, `maxAttempts`, `failed`, `requestedAt`, `lastError`) while a self-upgrade is in flight or has failed ([#6765](https://github.com/hivecommons/hive/issues/6765)), the hub-delivered `upgradePolicy` (`hub_managed`, `spoke_managed`, `schedule`, `schedule_hour`, `schedule_timezone`, `schedule_weekday`, `paused`, `branch`, `channel`, `target_sha`, `target_resolved`, `armed_target`, and `next_update_at` — the hub's RFC3339 ETA for the next promotion into the `stable` channel, omitted when unknown ([#10256](https://github.com/hivecommons/hive/issues/10256))) when available, and an `autoUpdate` object (`enabled`, `state` — one of `disabled`/`up_to_date`/`behind`/`retrying`/`failed`/`unknown` — `healthy`, `period`, `targetBranch`, `targetCommit`, `currentCommit`, `commitsBehind`, `lastAttemptAt`, `lastError`, `detail`, and `nextUpdateAt` — the hub's RFC3339 ETA for the next update, omitted when unknown, disabled or paused ([#10257](https://github.com/hivecommons/hive/issues/10257))) that never reports a failed or unknown update as healthy ([#6962](https://github.com/hivecommons/hive/issues/6962), [#6963](https://github.com/hivecommons/hive/issues/6963)). Also `startedAt` (RFC3339 process start — changes on every pod roll even when the build does not, so the dashboard can say "Restarted" vs "Upgraded") and, until the first status is published, `startupPhase`/`startupPhaseLabel` (the boot phase a fresh pod is in) ([#15788](https://github.com/hivecommons/hive/issues/15788)) | `pkg/dashboard/api.go:44` | | `GET` | `/api/version/release-notes` | Dashboard auth/session | Changelog gap between two revisions: `?from=&to=` returns `{from:{sha,version?}, to:{sha,ref,version?}, sections:[{version,date,categories:{added,changed,fixed,security,deprecated}}], unreleased?, truncated, source, error?}` — the `CHANGELOG.md` release sections present at `to` and absent at `from`, newest first, plus (when `to` is not a release tag) the `changelog.d/` fragments new at `to` under an `Unreleased (in this build)` section. Fetch failures return `source: "unavailable"` with `error` rather than an error status; results are cached per (from, to) for an hour ([#11065](https://github.com/hivecommons/hive/issues/11065)) | `pkg/dashboard/api.go:45` | | `POST` | `/api/release-channel` | Owner only | Hosted spoke self-service release-channel selector; relays `stable`/`candidate`/`edge` to the hub's existing switch-branch endpoint with the spoke dashboard-token proof, and reports the requested channel as pending until the Deployment image lands | `pkg/dashboard/api.go:69` | -| `GET` | `/api/health` | Public | Basic health probe | `pkg/dashboard/server.go:1651` | -| `GET` | `/api/health/deep` | Public | Deep health probe | `pkg/dashboard/server.go:1652` | -| `GET` | `/api/livez` | Public | Kubernetes liveness probe | `pkg/dashboard/server.go:1653` | -| `GET` | `/metrics` | Registered only when `HIVE_METRICS_ENABLED`; requires `Authorization: ****** (403 if the token is unset) | Prometheus metrics | `pkg/dashboard/server.go:1659` | -| `GET` | `/api/status` | Dashboard auth/session | Dashboard aggregate status; `labelPresets[]` (`{key,label,description,labels[],states[]}`) lists the built-in label-filter presets for the Projects cards, led by `needs-human` whose `labels[]` are the effective hard-suppress labels plus `needs-signal`, the hold labels, `stage/071-needs-author` and the reporter-trust awaiting label (#12172); accepts `?fields=a,b` for top-level selection and `?omit=repos` to drop heavy sections, and honors `Accept-Encoding: gzip`; `agents[]` includes busy-pane visibility fields (`kicksUndeliverable`, `busySince`, `lastTranscriptActivity`, `condition`, `conditionMessage`) when a Working pane cannot accept kicks; a working agent also carries `agents[].run` — the live per-run line (#14576): `{since, elapsedS, costUSD, tokens, priced, tests, filesChanged}`, the estimated spend/tokens since the kick was delivered (`lastKickAt`, falling back to `busySince`) (delta of the token collector's per-agent cumulative figure; `priced:false` when the agent has none yet), the last visible test-runner result (`pass`/`fail`/empty) and the last `N files changed` git summary (`-1` when none) parsed from the captured pane; top-level `fleetRun` `{running, hourUSD, hourPriced, dayUSD, weekUSD, monthUSD, windowsPriced}` is the governor strip's rotating `running N · $X this hour / today / this week / this month` figure (#15614) — the hour is the rise since the top of the clock hour, the wider windows are the daily cost ledger summed from 00:00 UTC today, Monday 00:00 UTC (ISO week) and the 1st 00:00 UTC plus the rise since the ledger's last snapshot, `windowsPriced:false` when there is no ledger yet; `sla` (fleet) and `repos[].sla` (per repo) carry the Delivery SLA block derived from the lifecycle timeline with no extra GitHub calls: `windows.{7d,30d}.{open_to_triage,triage_to_start,start_to_pr,pr_to_merge,open_to_merge}` as `{p50_h,p95_h,n}` (hours, nearest-rank), `history[]` of up to 30 daily buckets `{day,start_to_pr_p50,pr_to_merge_p50,open_to_merge_p50,n_started,n_pr,n_merged}` persisted under `/data/sla-history.json`, `stale_in_progress[]` (`{number,repo,started_at,age_h,agent}` — issues carrying `hive/in-progress` longer than the agent claim TTL with no linked PR), `stale_count`, `merged_7d`, `claim_ttl_s` and, on the fleet block, the effective `targets` (`start_to_pr_h`, `pr_to_merge_h`, `open_to_merge_h`); `staleSince` and `repos[].countsStale` / `countsStaleSince` mark totals served from last-good figures — the previous enumeration (#13382) or the ForgeState cache's last-good counts (#13376); `ci_failure_signals` `{count, last, kicks, unmatched}` is the webhook CI-failure signal store — distinct red (repo, head, check) signals retained, the most recent one `{repo, number, head_sha, check, conclusion, details_url, agent, at}`, webhook-triggered kicks/nudges since boot, and failure deliveries whose head matched no open PR; `workflow_approvals` `{approved, denied, permission_errors, last}` counts the hive's approvals of GitHub-gated workflow runs since boot (#16603) — runs approved, runs refused by the trust policy (once per head), `403`/`404` refusals for want of `actions: write`, and the most recent decision `{repo, number, head, run_id, outcome, at}`; `hotspots` `{count, actionable, filed}` is the merge-hotspot advisor's one-line summary (files at/above the thresholds, those with a split recommendation, those with a modularize issue filed), absent when the advisor is not wired — details on `GET /api/hotspots`; `writeback.dedupe` `{enabled, dedupe_same_item, dedupe_burst, rate_capped, hourly_cap, burst_items, burst_window_s, same_item_ttl_s}` is the write-back gate's content layer — the effective `writeback.dedupe.*` settings and the last-hour counts of writes held as `duplicate`, `burst` and `rate-capped` (each also listed under `GET /api/writeback/suppressed`); `config.gate_regressions[]` `{gate, previous, effective, source}` is the boot-time safety-gate regression list (#16438) — gates a previous runtime overlay on the PVC carried that the running config lacks or loosens (`review.require_labels`, `project.issue_filter.require_labels`, `project.paused_repos[]`, `writeback.per_repo[].mode`), empty on a healthy boot | `pkg/dashboard/server.go:1664` | -| `GET` | `/api/status/summary` | Dashboard auth/session | Compact agent/governor/budget status summary for pollers; honors `Accept-Encoding: gzip` | `pkg/dashboard/server.go:1665` | -| `GET` | `/api/overview/issues.csv` | Dashboard auth/session | Cached Overview issue-band export as browser-compatible CSV; filters `band`, `repo`/`repos`, `stale`, and `held` are ANDed. | `pkg/dashboard/server.go:1666` | -| `GET` | `/api/overview/issues.json` | Dashboard auth/session | Cached Overview issue-band export as typed JSON with `bands[]` metadata and row fields matching the CSV columns. | `pkg/dashboard/server.go:1667` | -| `GET` | `/api/overview/prs.csv` | Dashboard auth/session | Cached Overview PR-band export as browser-compatible CSV; filters `band`, `repo`/`repos`, `stale`, and `held` are ANDed. | `pkg/dashboard/server.go:1668` | -| `GET` | `/api/overview/prs.json` | Dashboard auth/session | Cached Overview PR-band export as typed JSON with `bands[]` metadata and row fields matching the CSV columns. | `pkg/dashboard/server.go:1669` | -| `GET` | `/api/events` | Dashboard auth/session | Server-sent event stream | `pkg/dashboard/server.go:1670` | +| `GET` | `/api/health` | Public | Basic health probe | `pkg/dashboard/server.go:1655` | +| `GET` | `/api/health/deep` | Public | Deep health probe | `pkg/dashboard/server.go:1656` | +| `GET` | `/api/livez` | Public | Kubernetes liveness probe | `pkg/dashboard/server.go:1657` | +| `GET` | `/metrics` | Registered only when `HIVE_METRICS_ENABLED`; requires `Authorization: ****** (403 if the token is unset) | Prometheus metrics | `pkg/dashboard/server.go:1663` | +| `GET` | `/api/status` | Dashboard auth/session | Dashboard aggregate status; `labelPresets[]` (`{key,label,description,labels[],states[]}`) lists the built-in label-filter presets for the Projects cards, led by `needs-human` whose `labels[]` are the effective hard-suppress labels plus `needs-signal`, the hold labels, `stage/071-needs-author` and the reporter-trust awaiting label (#12172); accepts `?fields=a,b` for top-level selection and `?omit=repos` to drop heavy sections, and honors `Accept-Encoding: gzip`; `agents[]` includes busy-pane visibility fields (`kicksUndeliverable`, `busySince`, `lastTranscriptActivity`, `condition`, `conditionMessage`) when a Working pane cannot accept kicks; a working agent also carries `agents[].run` — the live per-run line (#14576): `{since, elapsedS, costUSD, tokens, priced, tests, filesChanged}`, the estimated spend/tokens since the kick was delivered (`lastKickAt`, falling back to `busySince`) (delta of the token collector's per-agent cumulative figure; `priced:false` when the agent has none yet), the last visible test-runner result (`pass`/`fail`/empty) and the last `N files changed` git summary (`-1` when none) parsed from the captured pane; top-level `fleetRun` `{running, hourUSD, hourPriced, dayUSD, weekUSD, monthUSD, windowsPriced}` is the governor strip's rotating `running N · $X this hour / today / this week / this month` figure (#15614) — the hour is the rise since the top of the clock hour, the wider windows are the daily cost ledger summed from 00:00 UTC today, Monday 00:00 UTC (ISO week) and the 1st 00:00 UTC plus the rise since the ledger's last snapshot, `windowsPriced:false` when there is no ledger yet; `sla` (fleet) and `repos[].sla` (per repo) carry the Delivery SLA block derived from the lifecycle timeline with no extra GitHub calls: `windows.{7d,30d}.{open_to_triage,triage_to_start,start_to_pr,pr_to_merge,open_to_merge}` as `{p50_h,p95_h,n}` (hours, nearest-rank), `history[]` of up to 30 daily buckets `{day,start_to_pr_p50,pr_to_merge_p50,open_to_merge_p50,n_started,n_pr,n_merged}` persisted under `/data/sla-history.json`, `stale_in_progress[]` (`{number,repo,started_at,age_h,agent}` — issues carrying `hive/in-progress` longer than the agent claim TTL with no linked PR), `stale_count`, `merged_7d`, `claim_ttl_s` and, on the fleet block, the effective `targets` (`start_to_pr_h`, `pr_to_merge_h`, `open_to_merge_h`); `staleSince` and `repos[].countsStale` / `countsStaleSince` mark totals served from last-good figures — the previous enumeration (#13382) or the ForgeState cache's last-good counts (#13376); `ci_failure_signals` `{count, last, kicks, unmatched}` is the webhook CI-failure signal store — distinct red (repo, head, check) signals retained, the most recent one `{repo, number, head_sha, check, conclusion, details_url, agent, at}`, webhook-triggered kicks/nudges since boot, and failure deliveries whose head matched no open PR; `workflow_approvals` `{approved, denied, permission_errors, last}` counts the hive's approvals of GitHub-gated workflow runs since boot (#16603) — runs approved, runs refused by the trust policy (once per head), `403`/`404` refusals for want of `actions: write`, and the most recent decision `{repo, number, head, run_id, outcome, at}`; `hotspots` `{count, actionable, filed}` is the merge-hotspot advisor's one-line summary (files at/above the thresholds, those with a split recommendation, those with a modularize issue filed), absent when the advisor is not wired — details on `GET /api/hotspots`; `writeback.dedupe` `{enabled, dedupe_same_item, dedupe_burst, rate_capped, hourly_cap, burst_items, burst_window_s, same_item_ttl_s}` is the write-back gate's content layer — the effective `writeback.dedupe.*` settings and the last-hour counts of writes held as `duplicate`, `burst` and `rate-capped` (each also listed under `GET /api/writeback/suppressed`); `config.gate_regressions[]` `{gate, previous, effective, source}` is the boot-time safety-gate regression list (#16438) — gates a previous runtime overlay on the PVC carried that the running config lacks or loosens (`review.require_labels`, `project.issue_filter.require_labels`, `project.paused_repos[]`, `writeback.per_repo[].mode`), empty on a healthy boot | `pkg/dashboard/server.go:1668` | +| `GET` | `/api/status/summary` | Dashboard auth/session | Compact agent/governor/budget status summary for pollers; honors `Accept-Encoding: gzip` | `pkg/dashboard/server.go:1669` | +| `GET` | `/api/overview/issues.csv` | Dashboard auth/session | Cached Overview issue-band export as browser-compatible CSV; filters `band`, `repo`/`repos`, `stale`, and `held` are ANDed. | `pkg/dashboard/server.go:1670` | +| `GET` | `/api/overview/issues.json` | Dashboard auth/session | Cached Overview issue-band export as typed JSON with `bands[]` metadata and row fields matching the CSV columns. | `pkg/dashboard/server.go:1671` | +| `GET` | `/api/overview/prs.csv` | Dashboard auth/session | Cached Overview PR-band export as browser-compatible CSV; filters `band`, `repo`/`repos`, `stale`, and `held` are ANDed. | `pkg/dashboard/server.go:1672` | +| `GET` | `/api/overview/prs.json` | Dashboard auth/session | Cached Overview PR-band export as typed JSON with `bands[]` metadata and row fields matching the CSV columns. | `pkg/dashboard/server.go:1673` | +| `GET` | `/api/events` | Dashboard auth/session | Server-sent event stream | `pkg/dashboard/server.go:1674` | | `GET` | `/api/swarm` | Dashboard auth/session | Current swarm status: display name, duration, active repo, expiry, persisted prep metrics when available, and idle-unlock fields. | `pkg/dashboard/swarm.go:310` | | `POST` | `/api/swarm` | Owner only | Start a 24h repo swarm for a configured repo, returning 409 when another swarm is active and 423 when a previous swarm keeps the next swarm locked until enough agents are idle unless body `{"repo":"owner/name","force":true}` is used; saves the active record before repo prep, persists prep metrics, and announces the start to Discord when configured. | `pkg/dashboard/swarm.go:311` | | `DELETE` | `/api/swarm` | Owner only | End the active swarm, score issues closed and PRs merged in the window, append it to history, and announce the result to Discord when configured. | `pkg/dashboard/swarm.go:312` | diff --git a/src/docs/api-reference/snapshots-and-style.md b/src/docs/api-reference/snapshots-and-style.md index cd99e62f4a..0951aa89f6 100644 --- a/src/docs/api-reference/snapshots-and-style.md +++ b/src/docs/api-reference/snapshots-and-style.md @@ -6,7 +6,7 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | Method | Path | Auth | Purpose | Source | |---|---|---|---|---| | `GET` | `/api/style` | Public | Sanitized custom dashboard CSS | `pkg/dashboard/api.go:46` | -| `GET` | `/branding/custom.css` | Dashboard auth/session | Operator branding stylesheet override, read per request (see [branding](../branding.md)) | `pkg/dashboard/server.go:1741` | +| `GET` | `/branding/custom.css` | Dashboard auth/session | Operator branding stylesheet override, read per request (see [branding](../branding.md)) | `pkg/dashboard/server.go:1745` | | `GET` | `/api/snapshot/frame-ancestors` | Public | Snapshot framing allowlist | `pkg/dashboard/api.go:82` | | `GET` | `/api/snapshot` | Public | Snapshot data | `pkg/dashboard/api.go:83` | | `GET` | `/snapshot` | Public | Public read-only snapshot page | `pkg/dashboard/api.go:84` | diff --git a/src/pkg/dashboard/collect/fleet_stats_collector.go b/src/pkg/dashboard/collect/fleet_stats_collector.go index a88135945c..502308879e 100644 --- a/src/pkg/dashboard/collect/fleet_stats_collector.go +++ b/src/pkg/dashboard/collect/fleet_stats_collector.go @@ -44,6 +44,29 @@ const fleetStatsRetryAttempts = 4 // rate-limit rejection rather than burning an attempt on a still-empty budget. var fleetStatsRetryBaseDelay = time.Minute +// fleetStatsRetryMaxDelay caps the retry backoff. The consecutive-failure +// count carries across collects, so while the forge host stays unreachable the +// delay keeps doubling past the per-collect ladder (8m, then 15m, 15m, …) +// instead of restarting at 1m every tick (#17427). A var so tests can shrink it. +var fleetStatsRetryMaxDelay = 15 * time.Minute + +// fleetStatsRetryDelay returns the backoff after the given number of +// consecutive failed attempts (>= 1): fleetStatsRetryBaseDelay doubled per +// earlier failure, capped at fleetStatsRetryMaxDelay. +func fleetStatsRetryDelay(consecutiveFailures int) time.Duration { + d := fleetStatsRetryBaseDelay + for i := 1; i < consecutiveFailures; i++ { + if d >= fleetStatsRetryMaxDelay { + break + } + d *= 2 + } + if d > fleetStatsRetryMaxDelay { + d = fleetStatsRetryMaxDelay + } + return d +} + // FleetStatsCollector periodically computes this hive's AI-author contribution // counts (PRs merged, PRs rejected, CVE-referencing PRs) across its org and // caches them, so the heartbeat sender can attach a fresh-but-cheap snapshot to @@ -77,6 +100,13 @@ type FleetStatsCollector struct { // shedTickFn overrides the pacer's shed decision in tests. shedTickFn func() bool + + // consecutiveFailures counts failed collect attempts since the last + // success, across collects; it drives the backoff and the once-per-streak + // WARNs. exhaustedWarned records that this streak already logged the + // "failed after all retries" WARN. Only the collect loop touches these. + consecutiveFailures int + exhaustedWarned bool } // persistedFleetStats is the on-disk shape written to persistPath. It carries @@ -284,7 +314,10 @@ func (fc *FleetStatsCollector) startupDelay() time.Duration { // collect computes the counts, retrying with exponential backoff. A single // GitHub search rejection (rate limit, transient 5xx) must not cost this hive -// its place in the fleet total until the next 30-minute tick. +// its place in the fleet total until the next 30-minute tick. During a longer +// outage (an unreachable forge host) the backoff keeps growing up to +// fleetStatsRetryMaxDelay and the failure is logged once per streak at WARN, +// with one INFO on recovery, instead of a WARN per attempt. func (fc *FleetStatsCollector) collect(ctx context.Context) { gh := fc.client() if gh == nil { @@ -295,7 +328,6 @@ func (fc *FleetStatsCollector) collect(ctx context.Context) { } return } - delay := fleetStatsRetryBaseDelay var err error for attempt := 1; attempt <= fleetStatsRetryAttempts; attempt++ { var counts ghpkg.FleetContribCounts @@ -309,6 +341,12 @@ func (fc *FleetStatsCollector) collect(ctx context.Context) { // exact collect (with its real timestamp) instead of nil (#2329). fc.persistLocked() fc.mu.Unlock() + if fc.consecutiveFailures > 0 && fc.logger != nil { + fc.logger.Info("fleet stats collect recovered", + "failed_attempts", fc.consecutiveFailures) + } + fc.consecutiveFailures = 0 + fc.exhaustedWarned = false if fc.logger != nil { fc.logger.Info("fleet stats collected", "prs_merged", counts.PRsMerged, @@ -319,27 +357,44 @@ func (fc *FleetStatsCollector) collect(ctx context.Context) { } return } + fc.consecutiveFailures++ if attempt == fleetStatsRetryAttempts { break } + delay := fleetStatsRetryDelay(fc.consecutiveFailures) if fc.logger != nil { - fc.logger.Warn("fleet stats collect failed; retrying", - "error", err, "attempt", attempt, "retry_in", delay.String()) + // WARN only on the transition into failing; later attempts in the + // same streak are Debug so a dead forge host is one line, not one + // per attempt for the whole outage. + level := slog.LevelDebug + if fc.consecutiveFailures == 1 { + level = slog.LevelWarn + } + fc.logger.Log(ctx, level, "fleet stats collect failed; retrying", + "error", err, "attempt", attempt, "retry_in", delay.String(), + "consecutive_failures", fc.consecutiveFailures, + "max_backoff", fleetStatsRetryMaxDelay.String()) } select { case <-ctx.Done(): return case <-time.After(delay): } - delay *= 2 } if fc.logger != nil { - // Warn, not Debug: a failure here means this hive silently drops out - // of the public fleet-stats total, and the only symptom is a blank - // strip on the landing page. That is not something to hide at a log - // level nobody enables. - fc.logger.Warn("fleet stats collect failed after all retries; this hive will not contribute to the fleet total", - "error", err, "author", fc.author, "org", fc.org, "attempts", fleetStatsRetryAttempts) + // Warn, not Debug, the first time: a failure here means this hive + // silently drops out of the public fleet-stats total, and the only + // symptom is a blank strip on the landing page. That is not something + // to hide at a log level nobody enables. Repeats within the same + // failure streak are Debug. + level := slog.LevelDebug + if !fc.exhaustedWarned { + level = slog.LevelWarn + fc.exhaustedWarned = true + } + fc.logger.Log(ctx, level, "fleet stats collect failed after all retries; this hive will not contribute to the fleet total", + "error", err, "author", fc.author, "org", fc.org, "attempts", fleetStatsRetryAttempts, + "consecutive_failures", fc.consecutiveFailures) } } diff --git a/src/pkg/dashboard/collect/fleet_stats_collector_test.go b/src/pkg/dashboard/collect/fleet_stats_collector_test.go index 1cff1ca7fe..0b59919b87 100644 --- a/src/pkg/dashboard/collect/fleet_stats_collector_test.go +++ b/src/pkg/dashboard/collect/fleet_stats_collector_test.go @@ -10,6 +10,7 @@ import ( "os" "path/filepath" "strings" + "sync" "sync/atomic" "testing" "time" @@ -338,3 +339,133 @@ func TestFleetStatsCollector_StartupDelayWithinBound(t *testing.T) { } } } + +func TestFleetStatsRetryDelay_ExponentialWithCeiling(t *testing.T) { + restoreBase, restoreMax := fleetStatsRetryBaseDelay, fleetStatsRetryMaxDelay + fleetStatsRetryBaseDelay = time.Minute + fleetStatsRetryMaxDelay = 15 * time.Minute + t.Cleanup(func() { + fleetStatsRetryBaseDelay = restoreBase + fleetStatsRetryMaxDelay = restoreMax + }) + + tests := []struct { + failures int + want time.Duration + }{ + {failures: 1, want: time.Minute}, + {failures: 2, want: 2 * time.Minute}, + {failures: 3, want: 4 * time.Minute}, + {failures: 4, want: 8 * time.Minute}, + {failures: 5, want: 15 * time.Minute}, + {failures: 50, want: 15 * time.Minute}, + {failures: 10000, want: 15 * time.Minute}, + } + for _, tc := range tests { + if got := fleetStatsRetryDelay(tc.failures); got != tc.want { + t.Errorf("fleetStatsRetryDelay(%d) = %v, want %v", tc.failures, got, tc.want) + } + } +} + +// countingHandler counts log records per (level, message). +type countingHandler struct { + counts *sync.Map +} + +func (h countingHandler) Enabled(context.Context, slog.Level) bool { return true } +func (h countingHandler) Handle(_ context.Context, r slog.Record) error { + key := r.Level.String() + " " + r.Message + v, _ := h.counts.LoadOrStore(key, new(atomic.Int32)) + v.(*atomic.Int32).Add(1) + return nil +} +func (h countingHandler) WithAttrs([]slog.Attr) slog.Handler { return h } +func (h countingHandler) WithGroup(string) slog.Handler { return h } + +func (h countingHandler) count(level slog.Level, msg string) int { + v, ok := h.counts.Load(level.String() + " " + msg) + if !ok { + return 0 + } + return int(v.(*atomic.Int32).Load()) +} + +// TestFleetStatsCollector_OutageWarnsOncePerStreak is the #17427 guard: while +// the forge host stays unreachable, repeated collects must not emit a WARN per +// attempt — one WARN when the streak starts, one when the hive first drops out +// of the fleet total, and one INFO on recovery. The failure count must carry +// across collects so the backoff keeps growing instead of restarting. +func TestFleetStatsCollector_OutageWarnsOncePerStreak(t *testing.T) { + var down atomic.Bool + down.Store(true) + mux := http.NewServeMux() + mux.HandleFunc("/search/issues", func(w http.ResponseWriter, r *http.Request) { + if down.Load() { + http.Error(w, "unreachable", http.StatusInternalServerError) + return + } + _ = json.NewEncoder(w).Encode(map[string]any{"total_count": 2, "items": []any{}}) + }) + srv := httptest.NewServer(mux) + t.Cleanup(srv.Close) + c := ghpkg.NewClient("fake", "org", []string{"repo"}, slog.Default(), "") + base, _ := url.Parse(srv.URL + "/") + c.GoGitHub().BaseURL = base + + restoreBase, restoreMax := fleetStatsRetryBaseDelay, fleetStatsRetryMaxDelay + fleetStatsRetryBaseDelay = time.Millisecond + fleetStatsRetryMaxDelay = 4 * time.Millisecond + t.Cleanup(func() { + fleetStatsRetryBaseDelay = restoreBase + fleetStatsRetryMaxDelay = restoreMax + }) + + h := countingHandler{counts: &sync.Map{}} + fc := NewFleetStatsCollector(c, "bot", "org", slog.New(h)) + + const collects = 3 + for i := 0; i < collects; i++ { + fc.collect(context.Background()) + } + if got, want := fc.consecutiveFailures, collects*fleetStatsRetryAttempts; got != want { + t.Errorf("consecutiveFailures = %d, want %d (must carry across collects)", got, want) + } + + const retryMsg = "fleet stats collect failed; retrying" + const exhaustedMsg = "fleet stats collect failed after all retries; this hive will not contribute to the fleet total" + tests := []struct { + level slog.Level + msg string + want int + }{ + {slog.LevelWarn, retryMsg, 1}, + {slog.LevelDebug, retryMsg, collects*(fleetStatsRetryAttempts-1) - 1}, + {slog.LevelWarn, exhaustedMsg, 1}, + {slog.LevelDebug, exhaustedMsg, collects - 1}, + } + for _, tc := range tests { + if got := h.count(tc.level, tc.msg); got != tc.want { + t.Errorf("%s %q logged %d times, want %d", tc.level, tc.msg, got, tc.want) + } + } + + down.Store(false) + fc.collect(context.Background()) + if _, ready := fc.Snapshot(); !ready { + t.Fatal("collector must be ready after recovery") + } + if got := h.count(slog.LevelInfo, "fleet stats collect recovered"); got != 1 { + t.Errorf("recovery INFO logged %d times, want 1", got) + } + if fc.consecutiveFailures != 0 || fc.exhaustedWarned { + t.Errorf("streak state not reset after recovery: failures=%d exhaustedWarned=%v", fc.consecutiveFailures, fc.exhaustedWarned) + } + + // A new outage after recovery is a new streak and WARNs again. + down.Store(true) + fc.collect(context.Background()) + if got := h.count(slog.LevelWarn, retryMsg); got != 2 { + t.Errorf("WARN %q after a second outage = %d, want 2", retryMsg, got) + } +} diff --git a/src/pkg/dashboard/health_forge_probe.go b/src/pkg/dashboard/health_forge_probe.go new file mode 100644 index 0000000000..c51d979171 --- /dev/null +++ b/src/pkg/dashboard/health_forge_probe.go @@ -0,0 +1,131 @@ +package dashboard + +import ( + "context" + "errors" + "net" + "net/url" + "sync" + "time" +) + +// forgeProbeBudget is how long the github_auth check in healthSummaryFor waits +// for the App token probe. The probe can mint a token, which is a live call to +// the forge; when the forge host is unreachable from the pod that call blocks +// for the full mint timeout. HealthSummary runs inside the hub heartbeat +// collect, whose whole budget is 10s, so an unbounded probe made every beat on +// a hive bound to a dead GHE host ship stale stats (#17427). Past the budget +// the check reports the last cached probe result and the probe keeps running +// off the critical path. A var so tests can shrink it. +var forgeProbeBudget = 3 * time.Second + +// healthTokenProbeFn overrides the App token probe. A package-level seam +// (mirroring healthAgentStatuses) so tests can stage a slow or unreachable +// forge without a real App key. nil ⇒ s.deps.GHAppAuth.Token. +var healthTokenProbeFn func(ctx context.Context) error + +// forgeProbeState caches the last forge (App token) probe result. inFlight is +// non-nil while a probe goroutine runs and is closed when it finishes, so at +// most one probe is outstanding however many beats time out behind it. +type forgeProbeState struct { + mu sync.Mutex + inFlight chan struct{} + hasResult bool + lastErr error + unreachable bool +} + +// forgeProbeResult is what one github_auth check sees: the last completed +// probe's error (Known=false when no probe has completed yet) and whether this +// call gave up waiting after forgeProbeBudget. +type forgeProbeResult struct { + Err error + Known bool + TimedOut bool +} + +// probeGitHubToken runs the App token probe under forgeProbeBudget. When the +// probe does not finish in time it returns the cached result of the last +// completed probe and marks the forge unreachable; the probe goroutine is not +// cancelled, so a slow-but-alive forge still refreshes the cache for the next +// beat. +func (s *Server) probeGitHubToken() forgeProbeResult { + p := &s.forgeProbe + p.mu.Lock() + done := p.inFlight + if done == nil { + done = make(chan struct{}) + p.inFlight = done + go s.runForgeProbe(healthTokenProbeFn, done) + } + p.mu.Unlock() + + timer := time.NewTimer(forgeProbeBudget) + defer timer.Stop() + timedOut := false + select { + case <-done: + case <-timer.C: + timedOut = true + } + + p.mu.Lock() + defer p.mu.Unlock() + if timedOut { + p.unreachable = true + } + return forgeProbeResult{Err: p.lastErr, Known: p.hasResult, TimedOut: timedOut} +} + +func (s *Server) runForgeProbe(probeFn func(ctx context.Context) error, done chan struct{}) { + ctx := context.Background() + if s.deps != nil && s.deps.Ctx != nil { + ctx = s.deps.Ctx + } + var err error + if probeFn != nil { + err = probeFn(ctx) + } else { + _, err = s.deps.GHAppAuth.Token(ctx) + } + + p := &s.forgeProbe + p.mu.Lock() + p.lastErr = err + p.hasResult = true + p.unreachable = isForgeUnreachableErr(err) + p.inFlight = nil + close(done) + p.mu.Unlock() +} + +// isForgeUnreachableErr reports whether err means the forge could not be +// reached at all (dial/TLS/timeout), as opposed to the forge answering with an +// auth or permission error. +func isForgeUnreachableErr(err error) bool { + if err == nil { + return false + } + if errors.Is(err, context.DeadlineExceeded) { + return true + } + var urlErr *url.Error + if errors.As(err, &urlErr) { + return true + } + var netErr net.Error + return errors.As(err, &netErr) +} + +// ForgeUnreachable reports whether the last forge probe found the GitHub host +// unreachable from this hive (it timed out or failed at the transport layer). +// The hub heartbeat carries it as forge_unreachable so the hub can tell a dead +// forge route from a slow hive. +func (s *Server) ForgeUnreachable() bool { + if s == nil { + return false + } + s.forgeProbe.mu.Lock() + defer s.forgeProbe.mu.Unlock() + return s.forgeProbe.unreachable +} diff --git a/src/pkg/dashboard/health_forge_probe_test.go b/src/pkg/dashboard/health_forge_probe_test.go new file mode 100644 index 0000000000..ce5c308d64 --- /dev/null +++ b/src/pkg/dashboard/health_forge_probe_test.go @@ -0,0 +1,146 @@ +package dashboard + +import ( + "context" + "encoding/json" + "errors" + "net/url" + "sync/atomic" + "testing" + "time" + + "github.com/hivecommons/hive/internal/testutil" +) + +// stubForgeProbe installs healthTokenProbeFn and a short forgeProbeBudget for +// one test, restoring both on cleanup. +func stubForgeProbe(t *testing.T, budget time.Duration, fn func(ctx context.Context) error) { + t.Helper() + origFn, origBudget := healthTokenProbeFn, forgeProbeBudget + healthTokenProbeFn = fn + forgeProbeBudget = budget + t.Cleanup(func() { + healthTokenProbeFn = origFn + forgeProbeBudget = origBudget + }) +} + +func TestProbeGitHubToken_ClassifiesResult(t *testing.T) { + transportErr := &url.Error{Op: "Post", URL: "https://github.example.com/api/v3/app/installations/1/access_tokens", Err: errors.New("dial tcp: i/o timeout")} + tests := []struct { + name string + probeErr error + wantErr bool + wantUnreachable bool + }{ + {name: "success", probeErr: nil, wantErr: false, wantUnreachable: false}, + {name: "auth error is reachable", probeErr: errors.New("creating installation token: 401 Bad credentials"), wantErr: true, wantUnreachable: false}, + {name: "transport error", probeErr: transportErr, wantErr: true, wantUnreachable: true}, + {name: "deadline exceeded", probeErr: context.DeadlineExceeded, wantErr: true, wantUnreachable: true}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + stubForgeProbe(t, 2*time.Second, func(context.Context) error { return tc.probeErr }) + s := &Server{} + got := s.probeGitHubToken() + if !got.Known || got.TimedOut { + t.Fatalf("probe result = %+v, want Known and not TimedOut", got) + } + if (got.Err != nil) != tc.wantErr { + t.Errorf("Err = %v, wantErr %v", got.Err, tc.wantErr) + } + if s.ForgeUnreachable() != tc.wantUnreachable { + t.Errorf("ForgeUnreachable() = %v, want %v", s.ForgeUnreachable(), tc.wantUnreachable) + } + }) + } +} + +// TestProbeGitHubToken_DeadForgeBoundedAndCached is the #17427 guard: a forge +// probe that never answers must not hold the caller past forgeProbeBudget, +// must flag the forge unreachable, must not pile up probe goroutines across +// beats, and must clear once the probe completes. +func TestProbeGitHubToken_DeadForgeBoundedAndCached(t *testing.T) { + release := make(chan struct{}) + var calls atomic.Int32 + stubForgeProbe(t, 50*time.Millisecond, func(context.Context) error { + calls.Add(1) + <-release + return nil + }) + s := &Server{} + + for i := 0; i < 3; i++ { + start := time.Now() + got := s.probeGitHubToken() + if elapsed := time.Since(start); elapsed > 2*time.Second { + t.Fatalf("probe %d blocked %v, want bounded by forgeProbeBudget", i, elapsed) + } + if !got.TimedOut || got.Known { + t.Fatalf("probe %d = %+v, want TimedOut with no known result", i, got) + } + if !s.ForgeUnreachable() { + t.Fatalf("probe %d: ForgeUnreachable() = false, want true while the probe hangs", i) + } + } + if n := calls.Load(); n != 1 { + t.Fatalf("probe ran %d times, want 1 (single in-flight probe)", n) + } + + close(release) + testutil.Eventually(t, 5*time.Second, func() bool { return !s.ForgeUnreachable() }, + "ForgeUnreachable() never cleared after the probe completed") + got := s.probeGitHubToken() + if !got.Known || got.Err != nil || got.TimedOut { + t.Fatalf("after recovery probe = %+v, want known success", got) + } +} + +// TestHealthSummary_GitHubAuthBoundedWhenForgeHangs pins the heartbeat-facing +// surface: HealthSummary must return within the sub-budget with a github_auth +// warn naming the unreachable forge, instead of blocking on the token mint. +func TestHealthSummary_GitHubAuthBoundedWhenForgeHangs(t *testing.T) { + release := make(chan struct{}) + t.Cleanup(func() { close(release) }) + stubForgeProbe(t, 50*time.Millisecond, func(context.Context) error { + <-release + return nil + }) + srv := newFullServer(t) + srv.MarkReady() + srv.deps.GHAppAuth = newSucceedingAppAuth(t, "ghs_forge_probe_17427") + + start := time.Now() + sum := srv.HealthSummary() + if elapsed := time.Since(start); elapsed > 2*time.Second { + t.Fatalf("HealthSummary blocked %v behind a hung forge probe", elapsed) + } + raw, err := json.Marshal(sum) + if err != nil { + t.Fatalf("marshal summary: %v", err) + } + var parsed struct { + Checks []struct { + Name string `json:"name"` + Status string `json:"status"` + } `json:"checks"` + } + if err := json.Unmarshal(raw, &parsed); err != nil { + t.Fatalf("unmarshal summary: %v", err) + } + found := false + for _, c := range parsed.Checks { + if c.Name == "github_auth" { + found = true + if c.Status != "warn" { + t.Errorf("github_auth status = %q, want warn while the forge probe hangs", c.Status) + } + } + } + if !found { + t.Fatalf("github_auth check missing: %s", raw) + } + if !srv.ForgeUnreachable() { + t.Error("ForgeUnreachable() = false, want true after the probe exceeded its budget") + } +} diff --git a/src/pkg/dashboard/server.go b/src/pkg/dashboard/server.go index 8fac58ec36..0787453285 100644 --- a/src/pkg/dashboard/server.go +++ b/src/pkg/dashboard/server.go @@ -108,6 +108,10 @@ type Server struct { feedbackRefreshBackoff feedbackBackoff + // forgeProbe caches the github_auth token probe so a dead forge host + // cannot hold HealthSummary past forgeProbeBudget (health_forge_probe.go). + forgeProbe forgeProbeState + // mergeTrains remembers the trains between tracker builds: the hourly // "merge train stalled" activity-log line per train and each member's // first estimate (stage_tracker_merge_train.go). @@ -4786,17 +4790,27 @@ func (s *Server) healthSummaryFor(status *StatusPayload, ready bool) map[string] checks = append(checks, check{Name: "github_auth", Status: "fail", Detail: detail, Onboarding: true, GuideStep: GuideStepGitHubApp}) fails++ } else if s.deps != nil && s.deps.GHAppAuth != nil { - if _, err := s.deps.GHAppAuth.Token(s.deps.Ctx); err != nil { + // Bounded by forgeProbeBudget: past it the last cached result is + // reported so an unreachable forge cannot eat the heartbeat budget. + probe := s.probeGitHubToken() + staleNote := "" + if probe.TimedOut { + staleNote = fmt.Sprintf(" (cached — forge probe exceeded %s)", forgeProbeBudget) + } + if !probe.Known { + checks = append(checks, check{Name: "github_auth", Status: "warn", Detail: fmt.Sprintf("forge probe exceeded %s — GitHub host may be unreachable", forgeProbeBudget)}) + warns++ + } else if err := probe.Err; err != nil { // Surface the underlying error, not a bare "token error": this // detail travels to the hub and into the dashboard tooltip, and a // swallowed error string is exactly what left past github_auth flaps // undiagnosable. Token() now serves a still-valid cached token // through a transient mint blip, so reaching here means no usable // token remains — a genuine, sustained auth failure worth showing. - checks = append(checks, check{Name: "github_auth", Status: "fail", Detail: "token error: " + err.Error()}) + checks = append(checks, check{Name: "github_auth", Status: "fail", Detail: "token error: " + err.Error() + staleNote}) fails++ } else { - checks = append(checks, check{Name: "github_auth", Status: "pass"}) + checks = append(checks, check{Name: "github_auth", Status: "pass", Detail: strings.TrimSpace(staleNote)}) } } else if s.deps != nil && s.deps.GHClient != nil { // See the /health counterpart above: pass with a scope-specific detail. diff --git a/src/pkg/hub/spoke/heartbeat.go b/src/pkg/hub/spoke/heartbeat.go index f9c57a345d..705efdbaa7 100644 --- a/src/pkg/hub/spoke/heartbeat.go +++ b/src/pkg/hub/spoke/heartbeat.go @@ -849,7 +849,14 @@ type HeartbeatPayload struct { // a hive's GitHub can differ from its cluster's default, so the cluster // default is only ever a fallback for spokes too old to report this. // Empty on such spokes — the hub falls back rather than guessing. - GitHubHost string `json:"github_host,omitempty"` + GitHubHost string `json:"github_host,omitempty"` + // ForgeUnreachable is true when the spoke's last forge probe (the + // github_auth token check in Health) timed out or failed at the transport + // layer: GitHubHost cannot be reached from the pod. The probe runs under + // its own sub-budget so a dead forge no longer makes every beat stale; + // this field tells the hub why instead (#17427). Omitted when reachable + // and on older spokes. + ForgeUnreachable bool `json:"forge_unreachable,omitempty"` Timestamp string `json:"timestamp"` GitHubAppRequired bool `json:"github_app_required,omitempty"` GitHubAppPermIssue string `json:"github_app_perm_issue,omitempty"` From 947a8930c7f3ef11313686d8c3476e22ead5b51a Mon Sep 17 00:00:00 2001 From: Karibhou <157208370+Karibhou@users.noreply.github.com> Date: Mon, 9 Nov 2026 22:39:39 +0100 Subject: [PATCH 064/123] =?UTF-8?q?=F0=9F=90=9B=20fix(ci):=20retry=20'Inst?= =?UTF-8?q?all=20just'=20curl=20on=20transient=20release-CDN=20errors=20(#?= =?UTF-8?q?17359)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(ci): retry 'Install just' curl on transient release-CDN errors Hive-Run: hivecommons/hive#17357 Hive-Plan: issue-17357 Hive-Spec: issue-17357#recommendation Signed-off-by: Karibhou * docs(ci): explain the Install just curl retry flags Review follow-up on #17359. Signed-off-by: Karibhou --------- Signed-off-by: Karibhou Co-authored-by: Karibhou Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .github/workflows/integration-candidate.yml | 2 +- .github/workflows/integration-technical-v2-ci.yml | 2 +- .github/workflows/v2-ci.yml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-candidate.yml b/.github/workflows/integration-candidate.yml index e1a1f1d04e..1657ff12dd 100644 --- a/.github/workflows/integration-candidate.yml +++ b/.github/workflows/integration-candidate.yml @@ -552,7 +552,7 @@ jobs: set -euo pipefail JUST_VERSION=1.58.0 JUST_SHA256=4a5cc2f53e6f0f8c59092a6cc38291eb729d46a7dd95d3ae582008881b84931d - curl -fsSL -o /tmp/just.tgz "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" + curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o /tmp/just.tgz "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" echo "${JUST_SHA256} /tmp/just.tgz" | sha256sum -c - tar -xzf /tmp/just.tgz -C /tmp just sudo install -m 0755 /tmp/just /usr/local/bin/just diff --git a/.github/workflows/integration-technical-v2-ci.yml b/.github/workflows/integration-technical-v2-ci.yml index 219e3b0e18..93cac766c6 100644 --- a/.github/workflows/integration-technical-v2-ci.yml +++ b/.github/workflows/integration-technical-v2-ci.yml @@ -406,7 +406,7 @@ jobs: set -euo pipefail JUST_VERSION=1.58.0 JUST_SHA256=4a5cc2f53e6f0f8c59092a6cc38291eb729d46a7dd95d3ae582008881b84931d - curl -fsSL -o /tmp/just.tgz "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" + curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o /tmp/just.tgz "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" echo "${JUST_SHA256} /tmp/just.tgz" | sha256sum -c - tar -xzf /tmp/just.tgz -C /tmp just sudo install -m 0755 /tmp/just /usr/local/bin/just diff --git a/.github/workflows/v2-ci.yml b/.github/workflows/v2-ci.yml index 3e55b4ab0e..d805b6d6a8 100644 --- a/.github/workflows/v2-ci.yml +++ b/.github/workflows/v2-ci.yml @@ -1032,12 +1032,14 @@ jobs: # had passed. The releases CDN stayed up throughout; a pinned URL with a # checksum has no API dependency at all. Bump the version and hash # together, deliberately. + # The CDN itself still 504s transiently (#17357), hence the curl + # --retry flags; sha256sum still gates whatever is fetched. - name: Install just run: | set -euo pipefail JUST_VERSION=1.58.0 JUST_SHA256=4a5cc2f53e6f0f8c59092a6cc38291eb729d46a7dd95d3ae582008881b84931d - curl -fsSL -o /tmp/just.tgz "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" + curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o /tmp/just.tgz "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" echo "${JUST_SHA256} /tmp/just.tgz" | sha256sum -c - tar -xzf /tmp/just.tgz -C /tmp just sudo install -m 0755 /tmp/just /usr/local/bin/just From aeed957dd92664c8b7fb22a768c17532dbeb34be Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 16:44:40 -0500 Subject: [PATCH 065/123] =?UTF-8?q?=F0=9F=8C=B1=20tokens:=20refresh=20mode?= =?UTF-8?q?l=20price=20table=202026-11-09=20(#17354)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🌱 tokens: refresh model price table 2026-11-09 Automated refresh of src/pkg/tokens/pricing.go from OpenRouter's public model catalogue by src/internal/tools/pricetable; see the PR body for every rate that moved and every row that could not be verified. Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com> * 🌱 tokens: keep kimi-k3 row at prior list price; fix stale deepseek-chat comment The OpenRouter moonshotai/kimi-k3 quote (0.192 in / 16.00 out / 0.182 cache read) is a catalogue anomaly (83x output/input ratio, batch tier priced above standard); the reconciler's plausibility guard from #17365 now holds such rows for review instead of applying them. Keep the row at 3.00 / 15.00 / 0.30 / 3.00 as the guard would, land the other three rows, and update the hand-written deepseek-chat comment to match the new literal. Signed-off-by: Andrew Anderson --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com> Signed-off-by: Andrew Anderson Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- changelog.d/changed-price-table-2026-11-09.md | 1 + src/pkg/tokens/pricing.go | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 changelog.d/changed-price-table-2026-11-09.md diff --git a/changelog.d/changed-price-table-2026-11-09.md b/changelog.d/changed-price-table-2026-11-09.md new file mode 100644 index 0000000000..6ca50ecb22 --- /dev/null +++ b/changelog.d/changed-price-table-2026-11-09.md @@ -0,0 +1 @@ +- Refreshed the model list-price table from OpenRouter (3 rows moved; list prices as of 2026-11-09); the Cost panel estimate now uses the new rates. The `kimi-k3` row keeps its prior value: the OpenRouter quote (0.192 in / 16.00 out) is a catalogue anomaly the reconciler's plausibility guard now holds for review. diff --git a/src/pkg/tokens/pricing.go b/src/pkg/tokens/pricing.go index c30a051b08..78ae08158d 100644 --- a/src/pkg/tokens/pricing.go +++ b/src/pkg/tokens/pricing.go @@ -40,7 +40,7 @@ import ( // - DeepSeek: https://api-docs.deepseek.com/quick_start/pricing // - Kimi: https://platform.kimi.ai/docs/pricing/chat // - Meta Llama / Gemini: representative OpenRouter/provider list prices -const priceTableDate = "2026-11-02" +const priceTableDate = "2026-11-09" // PriceTableDate returns the date the price table was last reconciled with // published list prices, so the UI can show "list prices as of ". @@ -148,8 +148,8 @@ var modelPrices = map[string]ModelPrice{ "gpt-daybreak-red-latest": {InputPerMTok: 10.00, OutputPerMTok: 50.00, CacheReadPerMTok: 1.00, CacheWritePerMTok: 12.50}, // ---- DeepSeek (common LiteLLM/OpenRouter routing target) ---- - // deepseek-chat / V3: $0.27 in / $1.10 out; cache hit $0.07. - "deepseek-chat": {InputPerMTok: 0.2574, OutputPerMTok: 1.0287, CacheReadPerMTok: 0.07, CacheWritePerMTok: 0.2574}, + // deepseek-chat: $0.32 in / $0.89 out (OpenRouter 2026-11-09); V3: $0.27 in / $1.10 out; cache hit $0.07. + "deepseek-chat": {InputPerMTok: 0.32, OutputPerMTok: 0.89, CacheReadPerMTok: 0.07, CacheWritePerMTok: 0.32}, "deepseek-v3": {InputPerMTok: 0.27, OutputPerMTok: 1.10, CacheReadPerMTok: 0.07, CacheWritePerMTok: 0.27}, // deepseek-reasoner / R1: $0.55 in / $2.19 out; cache hit $0.14. "deepseek-reasoner": {InputPerMTok: 0.55, OutputPerMTok: 2.19, CacheReadPerMTok: 0.14, CacheWritePerMTok: 0.55}, @@ -157,7 +157,7 @@ var modelPrices = map[string]ModelPrice{ // ---- Meta Llama 3.3 70B (representative hosted list price) ---- "llama-3-3-70b": {InputPerMTok: 0.59, OutputPerMTok: 0.79, CacheReadPerMTok: 0.59, CacheWritePerMTok: 0.59}, - "llama-3-3-70b-instruct": {InputPerMTok: 0.10, OutputPerMTok: 0.32, CacheReadPerMTok: 0.10, CacheWritePerMTok: 0.10}, + "llama-3-3-70b-instruct": {InputPerMTok: 0.59, OutputPerMTok: 0.79, CacheReadPerMTok: 0.295, CacheWritePerMTok: 0.59}, "meta-llama-3-3-70b-instruct": {InputPerMTok: 0.59, OutputPerMTok: 0.79, CacheReadPerMTok: 0.59, CacheWritePerMTok: 0.59}, // ---- Google Gemini Flash / Pro (representative list prices) ---- @@ -191,7 +191,7 @@ var modelPrices = map[string]ModelPrice{ // a deterministic price entry instead of relying on the coarse fallback. "grok-4-5": {InputPerMTok: 2.00, OutputPerMTok: 6.00, CacheReadPerMTok: 0.30, CacheWritePerMTok: 2.00}, "kimi-k3": {InputPerMTok: 3.00, OutputPerMTok: 15.00, CacheReadPerMTok: 0.30, CacheWritePerMTok: 3.00}, - "kimi-k2-7-code": {InputPerMTok: 0.95, OutputPerMTok: 4.00, CacheReadPerMTok: 0.19, CacheWritePerMTok: 0.95}, + "kimi-k2-7-code": {InputPerMTok: 0.60, OutputPerMTok: 3.50, CacheReadPerMTok: 0.16, CacheWritePerMTok: 0.60}, "mai-code-1-flash-picker": {InputPerMTok: 0.25, OutputPerMTok: 2.00, CacheReadPerMTok: 0.025, CacheWritePerMTok: 0.25}, "claude-opus-4-6-thinking": {InputPerMTok: 5.00, OutputPerMTok: 25.00, CacheReadPerMTok: 0.50, CacheWritePerMTok: 6.25}, "gpt-oss-120b-medium": {InputPerMTok: 0.15, OutputPerMTok: 0.60, CacheReadPerMTok: 0.075, CacheWritePerMTok: 0.15}, From a97382d9c11556b7676766f869cd5c06b9609ec9 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 21:54:07 +0000 Subject: [PATCH 066/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.0 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 16 ++++++++++++++++ changelog.d/added-17420-redteam-lane.md | 1 - .../changed-advisory-digest-min-interval.md | 1 - changelog.d/fixed-17414.md | 1 - changelog.d/fixed-error-pages-reflect-404.md | 1 - .../fixed-scorecard-default-branch-guard.md | 1 - 6 files changed, 16 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/added-17420-redteam-lane.md delete mode 100644 changelog.d/changed-advisory-digest-min-interval.md delete mode 100644 changelog.d/fixed-17414.md delete mode 100644 changelog.d/fixed-error-pages-reflect-404.md delete mode 100644 changelog.d/fixed-scorecard-default-branch-guard.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 9066ba7249..7679846ab6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,22 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.211.0) + +### Added + +- **Red-team agent (`redteam`, opt-in at L5/L6).** A new lane plays a malicious contributor — a human, an AI, or one posing as the other — and writes the issues, PR bodies, review comments and RFC text such an actor would use to get agents to write malicious code or lower the hive's defenses. It measures them against the deterministic defenses by adding attack cases and benign controls to the `ioscan` red-team corpus in `hold`-labelled PRs, with each outcome recorded as observed, and never posts attack text anywhere else ([#17420](https://github.com/hivecommons/hive/issues/17420)). It ships paused in every governor mode, and an agent whose role or base name is `redteam` serves **no** repository until it has a `repos:` scope: the proxy and every write relay refuse it, its kick lists no repositories or work, and the boot log warns. Scope it to the repository holding the corpus and give it a cadence to turn it on; see `src/docs/redteam.md`. + +### Changed + +- Advisory digest: the one `hive:advisory-digest` comment on the pinned advisory issue is edited in place (marker + `Updated N times · last ` footer, counter read back from the comment) and a *changed* digest is rewritten at most once per `governor.advisory.digest_min_interval` (default `1h`, Settings → Advisory). Unchanged digests never write; the baseline is the comment's own `updated_at` on GitHub, so a restart does not repost inside the window. On hive's own spoke this collapses a rewrite every ~5 minutes into one per hour. New log line `advisory digest comment written` marks real writes. + +### Fixed + +- ci(scorecard): skip push runs on non-default branches (v5) (#17414) +- The ingress-nginx error backend (`src/deploy/k8s/error-pages.yaml`) now reflects an intercepted 403 or 404 as that status with a dedicated "Page not found" document (HTML or JSON by caller) instead of falling through to the 503 "Hive is restarting" page with an auto-refresh. With the controller's global `custom-http-errors` list including 404, every missing URL on the hub had been served as a 503, which Google Search Console reported as Soft 404 and which told visitors a healthy hub was down ([#17431](https://github.com/hivecommons/hive/issues/17431)). The global list is documented as `502,503,504`. +- ci: Scorecard `push` runs on non-default release branches are skipped instead of failing; `schedule` and `workflow_dispatch` runs are unchanged ([#17392](https://github.com/hivecommons/hive/issues/17392)). + ## 2026-11-09 (v5.210.0) ### Added diff --git a/changelog.d/added-17420-redteam-lane.md b/changelog.d/added-17420-redteam-lane.md deleted file mode 100644 index 2ae33de989..0000000000 --- a/changelog.d/added-17420-redteam-lane.md +++ /dev/null @@ -1 +0,0 @@ -- **Red-team agent (`redteam`, opt-in at L5/L6).** A new lane plays a malicious contributor — a human, an AI, or one posing as the other — and writes the issues, PR bodies, review comments and RFC text such an actor would use to get agents to write malicious code or lower the hive's defenses. It measures them against the deterministic defenses by adding attack cases and benign controls to the `ioscan` red-team corpus in `hold`-labelled PRs, with each outcome recorded as observed, and never posts attack text anywhere else ([#17420](https://github.com/hivecommons/hive/issues/17420)). It ships paused in every governor mode, and an agent whose role or base name is `redteam` serves **no** repository until it has a `repos:` scope: the proxy and every write relay refuse it, its kick lists no repositories or work, and the boot log warns. Scope it to the repository holding the corpus and give it a cadence to turn it on; see `src/docs/redteam.md`. diff --git a/changelog.d/changed-advisory-digest-min-interval.md b/changelog.d/changed-advisory-digest-min-interval.md deleted file mode 100644 index 19cfc50587..0000000000 --- a/changelog.d/changed-advisory-digest-min-interval.md +++ /dev/null @@ -1 +0,0 @@ -- Advisory digest: the one `hive:advisory-digest` comment on the pinned advisory issue is edited in place (marker + `Updated N times · last ` footer, counter read back from the comment) and a *changed* digest is rewritten at most once per `governor.advisory.digest_min_interval` (default `1h`, Settings → Advisory). Unchanged digests never write; the baseline is the comment's own `updated_at` on GitHub, so a restart does not repost inside the window. On hive's own spoke this collapses a rewrite every ~5 minutes into one per hour. New log line `advisory digest comment written` marks real writes. diff --git a/changelog.d/fixed-17414.md b/changelog.d/fixed-17414.md deleted file mode 100644 index 4060d440b5..0000000000 --- a/changelog.d/fixed-17414.md +++ /dev/null @@ -1 +0,0 @@ -- ci(scorecard): skip push runs on non-default branches (v5) (#17414) diff --git a/changelog.d/fixed-error-pages-reflect-404.md b/changelog.d/fixed-error-pages-reflect-404.md deleted file mode 100644 index cdff183046..0000000000 --- a/changelog.d/fixed-error-pages-reflect-404.md +++ /dev/null @@ -1 +0,0 @@ -- The ingress-nginx error backend (`src/deploy/k8s/error-pages.yaml`) now reflects an intercepted 403 or 404 as that status with a dedicated "Page not found" document (HTML or JSON by caller) instead of falling through to the 503 "Hive is restarting" page with an auto-refresh. With the controller's global `custom-http-errors` list including 404, every missing URL on the hub had been served as a 503, which Google Search Console reported as Soft 404 and which told visitors a healthy hub was down ([#17431](https://github.com/hivecommons/hive/issues/17431)). The global list is documented as `502,503,504`. diff --git a/changelog.d/fixed-scorecard-default-branch-guard.md b/changelog.d/fixed-scorecard-default-branch-guard.md deleted file mode 100644 index 06b2c3ff6b..0000000000 --- a/changelog.d/fixed-scorecard-default-branch-guard.md +++ /dev/null @@ -1 +0,0 @@ -- ci: Scorecard `push` runs on non-default release branches are skipped instead of failing; `schedule` and `workflow_dispatch` runs are unchanged ([#17392](https://github.com/hivecommons/hive/issues/17392)). From 64320ff26817869d6c4d1726b929013d9268968a Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 17:05:08 -0500 Subject: [PATCH 067/123] =?UTF-8?q?=F0=9F=90=9B=20fix(automerge):=20group?= =?UTF-8?q?=20the=20one-PR-per-issue=20rule=20by=20base=20branch=20(#17437?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release-line siblings (the same fix against v5 and v6, both Fixes #N) were read as duplicates: the later PR was parked with merge-train:duplicate-of# and the dashboard asked for a human decision while CI was still running. Group duplicate candidates by base branch and skip cross-line claimants in the claim-conflict pass. Fixes #17436 Signed-off-by: Andrew Anderson Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .../fixed-merge-train-duplicate-per-base.md | 1 + .../automerge_merge_train_duplicate.go | 31 +++++++++++-- .../automerge_merge_train_duplicate_test.go | 43 +++++++++++++++++++ 3 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 changelog.d/fixed-merge-train-duplicate-per-base.md diff --git a/changelog.d/fixed-merge-train-duplicate-per-base.md b/changelog.d/fixed-merge-train-duplicate-per-base.md new file mode 100644 index 0000000000..d6bb9e2916 --- /dev/null +++ b/changelog.d/fixed-merge-train-duplicate-per-base.md @@ -0,0 +1 @@ +- The merge train's one-PR-per-issue rule now groups candidates by base branch, so the same fix opened against two release lines (v5 and v6, both `Fixes #N`) is no longer held as a duplicate and shown as "needs human decision"; the same-issue claim-conflict pass likewise ignores claimants on another base branch. Two PRs for one issue on the same line still compete as before ([#17436](https://github.com/hivecommons/hive/issues/17436)). diff --git a/src/pkg/github/automerge/automerge_merge_train_duplicate.go b/src/pkg/github/automerge/automerge_merge_train_duplicate.go index fa69496bd4..9d24578e2b 100644 --- a/src/pkg/github/automerge/automerge_merge_train_duplicate.go +++ b/src/pkg/github/automerge/automerge_merge_train_duplicate.go @@ -116,12 +116,25 @@ func mergeTrainDuplicateReason(h mergeTrainDuplicateHold) string { return prstage.MergeTrain{State: prstage.MergeTrainStateDuplicateOf, Front: h.Winner, Position: h.Issue}.Reason() } +// mergeTrainSameLine reports whether two PRs target the same base branch. +// The one-PR-per-issue rule only compares PRs on the same line: the same +// fix opened against v5 and v6 both says "Fixes #N", and that is the +// release-line process, not a duplicate (hivecommons/hive#17436). A PR +// with no base recorded compares as the same line so partial fixtures +// keep their old behaviour. +func mergeTrainSameLine(a, b *gh.PullRequest) bool { + ab, bb := a.GetBase().GetRef(), b.GetBase().GetRef() + return ab == "" || bb == "" || ab == bb +} + // planDuplicateHolds runs the one-PR-per-issue rule over the lane's // candidates before the trains are grouped: the held PRs leave the -// candidate list and the plan remembers who each one yields to. +// candidate list and the plan remembers who each one yields to. PRs are +// grouped by base branch first, so siblings on different release lines +// never compete. func (c *Engine) planDuplicateHolds(ctx context.Context, plan *mergeTrainPlan, lane, owner, repo, displayRepo string, prs []*gh.PullRequest, prefilter func(*gh.PullRequest) string) []*gh.PullRequest { prs = c.planClaimConflicts(ctx, plan, owner, repo, displayRepo, prs, prefilter) - byIssue := map[int][]mergeTrainDuplicateCandidate{} + byLine := map[string]map[int][]mergeTrainDuplicateCandidate{} for _, pr := range prs { if pr == nil || pr.GetNumber() <= 0 || !mergeTrainCandidate(prefilter(pr)) { continue @@ -135,11 +148,21 @@ func (c *Engine) planDuplicateHolds(ctx context.Context, plan *mergeTrainPlan, l CreatedAt: pr.GetCreatedAt().Time, Green: !mergeTrainDirty(pr.GetMergeableState()) && !c.mergeTrainHeadBlocked(lane, owner, repo, pr.GetNumber(), pr.GetHead().GetSHA()), } + line := pr.GetBase().GetRef() + byIssue := byLine[line] + if byIssue == nil { + byIssue = map[int][]mergeTrainDuplicateCandidate{} + byLine[line] = byIssue + } for _, issue := range issues { byIssue[issue] = append(byIssue[issue], cand) } } - holds := mergeTrainDuplicateHolds(byIssue) + var holds []mergeTrainDuplicateHold + for _, byIssue := range byLine { + holds = append(holds, mergeTrainDuplicateHolds(byIssue)...) + } + sort.Slice(holds, func(i, j int) bool { return holds[i].Number < holds[j].Number }) if len(holds) == 0 { return prs } @@ -287,7 +310,7 @@ func (c *Engine) planClaimConflicts(ctx context.Context, plan *mergeTrainPlan, o for _, issue := range mergeTrainClosedIssues(pr, displayRepo) { for _, other := range byIssue[issue] { o := other.GetNumber() - if o == n || candidate[o] || mergeTrainAdoptionPair(pr, other) { + if o == n || candidate[o] || mergeTrainAdoptionPair(pr, other) || !mergeTrainSameLine(pr, other) { continue } if _, ok := c.recordedDecisionFor(ctx, owner, repo, n, pr.GetBase().GetRef(), pr.GetHead().GetSHA()); ok { diff --git a/src/pkg/github/automerge/automerge_merge_train_duplicate_test.go b/src/pkg/github/automerge/automerge_merge_train_duplicate_test.go index f141a5e23f..35f2ed1770 100644 --- a/src/pkg/github/automerge/automerge_merge_train_duplicate_test.go +++ b/src/pkg/github/automerge/automerge_merge_train_duplicate_test.go @@ -153,3 +153,46 @@ func TestPlanMergeTrainsHoldsSameIssueDuplicate(t *testing.T) { t.Fatalf("skip reason parsed %+v ok=%v", mt, ok) } } + +// The same fix opened against two release lines says "Fixes #N" twice and +// is not a duplicate: neither PR is held and neither is a claim conflict +// (hivecommons/hive#17436). Two PRs on the SAME line still compete. +func TestPlanDuplicateHoldsGroupsByBaseBranch(t *testing.T) { + c := &Engine{} + t0 := time.Date(2026, 11, 9, 17, 0, 0, 0, time.UTC) + pr := func(n int, base string, at time.Time) *gh.PullRequest { + return &gh.PullRequest{Number: gh.Int(n), Title: gh.String("t"), Body: gh.String("Fixes #17392"), CreatedAt: &gh.Timestamp{Time: at}, MergeableState: gh.String("clean"), State: gh.String("open"), Base: &gh.PullRequestBranch{Ref: gh.String(base)}, Head: &gh.PullRequestBranch{SHA: gh.String("sha")}} + } + prs := []*gh.PullRequest{ + pr(17414, "v5", t0), + pr(17415, "v6", t0.Add(time.Minute)), + pr(17420, "v6", t0.Add(2*time.Minute)), + } + plan := &mergeTrainPlan{lane: "self", displayRepo: "o/r"} + kept := c.planDuplicateHolds(context.Background(), plan, stageLaneSelf, "o", "r", "o/r", prs, func(*gh.PullRequest) string { return "" }) + if len(kept) != 2 || kept[0].GetNumber() != 17414 || kept[1].GetNumber() != 17415 { + t.Fatalf("kept = %v", kept) + } + if _, held := plan.duplicateOf(17415); held { + t.Fatal("a sibling on another base branch is not a duplicate") + } + if h, held := plan.duplicateOf(17420); !held || h.Winner != 17415 { + t.Fatalf("same-line duplicate hold = %+v held=%v", h, held) + } + if _, held := plan.claimConflictOf(17415); held { + t.Fatal("a sibling on another base branch is not a claim conflict") + } + + // A prefilter refusal on the v5 sibling leaves it an open claimant, but + // it still does not conflict with the v6 PR on another line. + plan2 := &mergeTrainPlan{} + c.planDuplicateHolds(context.Background(), plan2, stageLaneSelf, "o", "r", "o/r", prs[:2], func(p *gh.PullRequest) string { + if p.GetNumber() == 17414 { + return "label:hold" + } + return "" + }) + if _, held := plan2.claimConflictOf(17415); held { + t.Fatal("cross-line claimant must not hold the candidate") + } +} From 029bfda977e51664d8f9b6c3dfc8b2cf14cdd18d Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 17:10:04 -0500 Subject: [PATCH 068/123] =?UTF-8?q?=F0=9F=8C=B1=20dashboard:=20Merge=20que?= =?UTF-8?q?ue=20icon=20is=20a=20merge=20traffic=20sign,=20not=20a=20railca?= =?UTF-8?q?r=20(#17460)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Activity Monitor's Merge queue column header, 080 chevron, train chip and queue popover shared an inline-SVG railcar operators read as a tram front. Replace the one shared path with a W4-1 merge sign: an up arrow with a lane curving in from the lower right and joining the shaft mid-height. Same svg wrapper (currentColor, 14px, hover/aria-label Merge queue). Fixes #17459 Signed-off-by: Andrew Anderson --- changelog.d/changed-merge-queue-icon.md | 1 + src/docs/dashboard-copy-inventory.md | 4 ++-- .../dashboard-sections/activity-monitor.md | 4 ++-- .../stage_tracker_merge_train_test.go | 4 +++- .../dashboard/stage_tracker_ui_rows_test.go | 2 +- .../dashboard/static-src/js/tracker-row.js | 4 ++-- .../static-src/js/tracker-words-core.js | 15 +++++++++------ src/pkg/dashboard/static/index.html | 19 +++++++++++-------- 8 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 changelog.d/changed-merge-queue-icon.md diff --git a/changelog.d/changed-merge-queue-icon.md b/changelog.d/changed-merge-queue-icon.md new file mode 100644 index 0000000000..7f42ca6e19 --- /dev/null +++ b/changelog.d/changed-merge-queue-icon.md @@ -0,0 +1 @@ +- Activity Monitor: the **Merge queue** column header, its chevron, the merge-train chip and the Merge queue popover now wear a "merge" traffic-sign glyph (an up arrow with a lane curving in from the lower right, like the W4-1 road sign) instead of the railcar, which read as a tram front. Same inline SVG, `currentColor`, hover *Merge queue*. diff --git a/src/docs/dashboard-copy-inventory.md b/src/docs/dashboard-copy-inventory.md index c37c0538c1..c85fd6f503 100644 --- a/src/docs/dashboard-copy-inventory.md +++ b/src/docs/dashboard-copy-inventory.md @@ -123,10 +123,10 @@ old name). | `stageTrackerOrdinal` | chevron, hover, popover | — | `1st 2nd 3rd 4th … 11th 12th 13th 21st 22nd 23rd` | same | | `stageTrackerTrainStalledWord` + `STAGE_TRACKER_TRAIN_HEAD_STALL_WORD` | chevron label (stalled train), Merge queue popover | *Merge queue stalled · head #15425 waiting for a maintainer (untrusted author) 1h21m* — painted `--yellow` on the amber active chevron, so the row read as an **empty** chevron (#15529, #15530) | rider: *Merge queue · stalled — waiting on #15425 (needs maintainer merge) · 1h21m*; head row: *Merge queue · stalled — needs maintainer merge · 1h21m*; the why comes from `head_state` (`needs-human` → *needs maintainer merge* / *needs a human decision*, `ci` → *waiting for CI*, `soaking` → *soak overran*, `ready` → *waiting for a merge sweep*, `merging` → *merge call in flight*, `fixing` → *being fixed by its author*, `unknown` → *head not in this view*); an unmapped `merge_train.state` falls back to its humanised name + place (*Waiting for front · 3rd*), never `''`; `.ham-seg.active .ham-queue-stalled` inherits the chevron's text colour | `TestStageTrackerMergeTrainStateSlugsNeverLeak` (every state × stalled × head_state × place), `TestStageTrackerMergeTrainPayloadStates` | | `stageTrackerTrainQueueTip` | chevron hover | *Behind #15253 … Estimated turn: ~25m.* / *Front of the merge queue* | *2nd of 6 in the merge queue · behind #15253 · ETA ~25m.* / *1st of 6 in the merge queue · merges next · ETA ~4m.*; *· merge sweep running* lives here only (one label per chevron, #15416) | same | -| `stageTrackerTrainHeaderText` + `stageTrackerTrainIconHtml` | train header chip | `⛓ merge train · 2 PRs · front #15400` | 🚆 (inline-SVG railcar, hover *Merge queue*) `merge train · 2 PRs · 1st: #15400` | `TestStageTrackerMergeTrain` | +| `stageTrackerTrainHeaderText` + `stageTrackerTrainIconHtml` | train header chip | `⛓ merge train · 2 PRs · front #15400` | (inline-SVG merge sign, hover *Merge queue*) `merge train · 2 PRs · 1st: #15400` | `TestStageTrackerMergeTrain` | | `stageTrackerQueueMemberState` (`tracker-queue.js`) | Merge queue popover | *front of the queue* | *merges next* | `TestStageTrackerMergeQueuePopover` | | `stageTrackerAnchor` (`tracker-row-anchor.js`) | which column lights | a 1st-in-train head at 050/070 lit **CI / Review** | every train state lights **Merge queue** | `TestStageTrackerMergeTrainStatesLightMergeColumn` | -| `stageTrackerHeaderHtml` | column header | *Merge gate* | 🚆 *Merge queue* (same icon as the chip and the 080 chevron) | `TestStageTrackerHeader…` | +| `stageTrackerHeaderHtml` | column header | *Merge gate* | *Merge queue* led by the merge-sign icon (same icon as the chip and the 080 chevron) | `TestStageTrackerHeader…` | | Go: `prstage.MergeTrain.Sentence`, `stageTrackerMergeTrainFrontCaption`, `eta_basis` | gate reason, caption, hover | *front of the merge train (1st of 3)*, *Front of a merge train of N PRs* | *1st in the merge queue; merges next (1st of 3)*, *1st in a merge queue of N PRs* | `TestParseMergeTrainRejectsMalformed` | | "merge gate" in decision copy (`delegatedecision` glossary, ladder, dashboard decided/new/vocabulary) | glossary, ⋯ hints, PR comments | *the merge gate merges it once every check passes* | *the merge queue merges it …* | `TestStageTrackerDecisionGlossaryMirrorsGo` | diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index bcb18bf3d7..01606bd2e8 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -275,7 +275,7 @@ re-checked on * until it merges or is released; that is expected, not a dro batch. The row never says *preparation* or *unverified* — those are the scheduler's words, kept in the data ([#17335](https://github.com/hivecommons/hive/issues/17335)). -When several approved PRs to the same base touch the same files, the automerge lanes merge them one at a time ([#15117](https://github.com/hivecommons/hive/issues/15117)). The tracker renders every train contiguously, in merge order, with a thin left rail linking the rows and a header chip `🚆 merge train · 4 PRs · 1st: #15074` — the glyph is an inline-SVG railcar (14px, currentColor, hover *Merge queue*), the same icon the **Merge queue** column header and its chevrons wear; overlapping files are listed beside it. Pill wording per state is the PR's place in the queue (the owner's words — `front` and `queued-behind` appear nowhere a person reads): the head reads "Queued for merge · 1st of 4 · ~13m" (its own soak left plus the next pass); the others "Queued for merge · 2nd of 4 · ~4m", "Queued for merge · 3rd of 4", … (`1st 2nd 3rd 4th … 11th 12th 13th 21st`, always with the queue length, countdown to its turn); when the page draws more than one train each queue word ends with its train's tag — "Queued for merge · 1st of 2 · train main.go" (the first overlapping file's basename, else the head `#N`) — and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*, so two "1st"s on one page tell apart (one train → no tag); the header and every member row of a train share one rail accent (`.ham-train-k0…k3`, cycling in page order); once the front merged and the hive is rebasing a conflicting sibling, "Rebasing · attempt 1/2"; when the loop guard (`auto_merge.merge_train.max_rebase_attempts`) is spent, "Needs human decision · rebase failed twice" at stage/085 with the decision option "Rebase, then merge as maintainer". +When several approved PRs to the same base touch the same files, the automerge lanes merge them one at a time ([#15117](https://github.com/hivecommons/hive/issues/15117)). The tracker renders every train contiguously, in merge order, with a thin left rail linking the rows and a header chip `merge train · 4 PRs · 1st: #15074` led by the queue icon — the glyph is an inline-SVG merge sign — an up arrow with a lane curving in from the lower right, the W4-1 road sign (14px, currentColor, hover *Merge queue*; [#17459](https://github.com/hivecommons/hive/issues/17459)), the same icon the **Merge queue** column header and its chevrons wear; overlapping files are listed beside it. Pill wording per state is the PR's place in the queue (the owner's words — `front` and `queued-behind` appear nowhere a person reads): the head reads "Queued for merge · 1st of 4 · ~13m" (its own soak left plus the next pass); the others "Queued for merge · 2nd of 4 · ~4m", "Queued for merge · 3rd of 4", … (`1st 2nd 3rd 4th … 11th 12th 13th 21st`, always with the queue length, countdown to its turn); when the page draws more than one train each queue word ends with its train's tag — "Queued for merge · 1st of 2 · train main.go" (the first overlapping file's basename, else the head `#N`) — and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*, so two "1st"s on one page tell apart (one train → no tag); the header and every member row of a train share one rail accent (`.ham-train-k0…k3`, cycling in page order); once the front merged and the hive is rebasing a conflicting sibling, "Rebasing · attempt 1/2"; when the loop guard (`auto_merge.merge_train.max_rebase_attempts`) is spent, "Needs human decision · rebase failed twice" at stage/085 with the decision option "Rebase, then merge as maintainer". The tooltip lists the PRs ahead and the overlapping files. Waiting siblings are never red, never `needs human`; a `needs-rebase` label on one is reported under `stale_labels`, the train repairs it. Each item carries `merge_gate.state` (`queued-behind` / `rebasing` / `rebase-exhausted` / `front`, with an honest `reason` such as `behind #15074 in merge train (3rd of 4, overlapping files: stage_tracker.go, index.html)`) and `merge_train{id, state, front, position, size, attempt, max_attempts, overlap_files, ahead, members}`; the id is `#` and `members` is the whole roster in merge order. @@ -292,7 +292,7 @@ The tooltip lists the PRs ahead and the overlapping files. Waiting siblings are **One PR per issue** ([#15395](https://github.com/hivecommons/hive/issues/15395)). Two open PRs declaring the same `Fixes #N` never both ride the queue (hive's own #15402 and #15407, both for #15396, once sat side by side as "waiting its turn"). Before the trains are grouped the sweep keeps one PR per closing issue — a green head (not conflicting, not blocked on a red required check) beats a red one; among equals the earlier-opened wins — and holds the other out of every train with the stage reason `merge-train:duplicate-of#:/0:0/0:`. The held row's gate reads `duplicate-of:` (`merge_gate.duplicate_of`, `merge_gate.duplicate_issue`), its chip **Duplicate of #15402 · needs a pick** with no clock, it carries no `merge_train`, and it wears `needs-decision` so both PRs sit under their issue with the hold visible. *Let hive decide* on either row takes the existing supersede path (rule `one-pr-per-issue`): on the held PR it closes it as superseded by the kept one with a credit comment, through the same write gate as every delegate close; on the kept PR it releases it and names the duplicate the queue holds (or, if the kept PR has since gone red, only recommends the fix — the queue re-picks on its next pass, so an earlier red PR yields to a later green one). - **Countdown to auto-merge.** `eta_s` is the member's own remaining soak, plus — for each PR ahead — its remaining soak or, with no clock of its own, one sweep (the lanes' floor cadence), plus the wait for the next sweep tick; `eta_basis` is the short reading ("2 ahead · head soaking 12m · next pass in 40s"). The chip's `· ~4m` counts down in place from `eta_at` on the same tick as the soak clock, and `eta_at` is anchored server-side to the member's first estimate at its position (re-anchored only when a fresh estimate runs more than a sweep longer), so a poll re-render never resets it. Past the estimate it reads *any moment now*; past twice the first estimate `late` is set and the chip reads *running late* with the estimate kept in the hover. Always a `~`: an estimate, not a promise. A head on a person, on CI or being fixed — or a member that is itself a person's — carries no estimate and the blocker instead. -- **Merge queue popover.** The sticky bar's **🚆 Merge queue N** chip (hidden with no train) opens a popover listing every train in merge order — ordinal, #, title, state in words, ETA — with the head's blocker on the front row; same pattern as the **Merged** popover (click outside / Escape closes). +- **Merge queue popover.** The sticky bar's **Merge queue N** chip (led by the merge-sign icon) (hidden with no train) opens a popover listing every train in merge order — ordinal, #, title, state in words, ETA — with the head's blocker on the front row; same pattern as the **Merged** popover (click outside / Escape closes). - **Who rides.** A PR GitHub reports conflicting (`mergeable: CONFLICTING` / `DIRTY`) on its own, or one at **072 Returned to contributor** (by label or by the hive's stage record), is neither a member nor counted in the queue's length and draws no train idle comment — hive's own #15307 once read `queued-behind#15424:4/6` while conflicting at 072. A conflicting PR rides only while the train itself is repairing it (its rebase was requested behind a merged head and the loop guard still has attempts). - **Stall warning.** Once the head has sat in one stage longer than `governor.merge_train_stall_warn_s` (default 3600) and is not merging — a soaking head counts only once its own clock has overrun — every member's chip turns to **Merge queue · stalled — waiting on #15253 (waiting for CI) · 3h** (the head's own row: **Merge queue · stalled — waiting for CI · 3h**; an untrusted-author head reads *needs maintainer merge*), the popover marks the train, and the activity log records one `merge train stalled` line per train per hour. diff --git a/src/pkg/dashboard/stage_tracker_merge_train_test.go b/src/pkg/dashboard/stage_tracker_merge_train_test.go index fc71471c0f..f9a2a2e522 100644 --- a/src/pkg/dashboard/stage_tracker_merge_train_test.go +++ b/src/pkg/dashboard/stage_tracker_merge_train_test.go @@ -378,7 +378,9 @@ assert.strictEqual(stageTrackerTrainHeaderText(front.merge_train), 'merge train const ico = stageTrackerTrainIconHtml('ham-train-icon'); assert.ok(ico.startsWith('Merge queue') && ico.includes('aria-label="Merge queue"'), ico); -assert.ok(ico.includes(STAGE_TRACKER_TRAIN_ICON_PATH) && (ico.match(/]*d="M6 14\.5V3M3 6l3-3 3 3M13 14\.5c/.test(ico) && !ico.includes('(?:)?([^<]*)<\/span>/g)).map(m => m[1]), ['Open', 'Actionable', 'Claimed', 'PR in progress', 'CI', 'Review', 'Merge queue']); // The Merge queue column wears the train icon (hover "Merge queue"), the -// same railcar as the train header chip and the 080 chevron (#15395). +// same merge sign as the train header chip and the 080 chevron (#15395, #17459). assert.ok(head.includes('' + stageTrackerTrainIconHtml('ham-ico ham-train-icon ham-col-ico') + 'Merge queue'), head); assert.strictEqual((head.match(/Merge queue<\/title>/g) || []).length, 1); assert.ok(head.includes('<span class="ham-since">since</span>')); diff --git a/src/pkg/dashboard/static-src/js/tracker-row.js b/src/pkg/dashboard/static-src/js/tracker-row.js index 22cd0dd9b3..61eaa4500d 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row.js +++ b/src/pkg/dashboard/static-src/js/tracker-row.js @@ -138,9 +138,9 @@ // as one duplicated glyph (operator, 2026-11-03). 50: '<path d="M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z"/><circle cx="8" cy="8" r="2"/>', ci: '<path d="M5.5 1.5h5M6.5 1.5v4.6L2.6 12.9a1 1 0 0 0 .9 1.6h9a1 1 0 0 0 .9-1.6L9.5 6.1V1.5"/><path d="M4.4 10.5h7.2"/>', - // Merge queue: the same railcar as the column header and train chip + // Merge queue: the same merge sign as the column header and train chip // (STAGE_TRACKER_TRAIN_ICON_PATH in tracker-words.js; a test keeps them equal). - 80: '<rect x="2" y="3.5" width="12" height="7" rx="1.5"/><path d="M2 7.5h12M6.5 3.5v4M10.5 3.5v4M4 13.5l-1.5 1.5M12 13.5l1.5 1.5"/><circle cx="5" cy="12.5" r="1.5"/><circle cx="11" cy="12.5" r="1.5"/>', + 80: '<path stroke-width="2" d="M6 14.5V3M3 6l3-3 3 3M13 14.5c0-3.8-3.4-4.6-7-6.5"/>', 100: '<path d="M3 5h10M3 8h10M3 11h10"/>', 110: '<path d="M3 8l3 3 7-7"/>', history: '<path d="M2 8a6 6 0 1 0 6-6 6.5 6.5 0 0 0-4.5 1.83L2 5.33"/><path d="M2 2v3.33h3.33"/><path d="M8 4.67V8l2.67 1.33"/>', diff --git a/src/pkg/dashboard/static-src/js/tracker-words-core.js b/src/pkg/dashboard/static-src/js/tracker-words-core.js index 49f64ece3e..5cfc806262 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words-core.js +++ b/src/pkg/dashboard/static-src/js/tracker-words-core.js @@ -238,13 +238,16 @@ const STAGE_TRACKER_TRAIN_STATE_QUEUED = 'queued-behind'; const STAGE_TRACKER_TRAIN_STATE_REBASING = 'rebasing'; const STAGE_TRACKER_TRAIN_STATE_EXHAUSTED = 'rebase-exhausted'; - // The merge-queue icon: a side-view railcar on two wheels (14px, - // currentColor) — the owner read the old ⛓ as a scribble. One path for - // the Merge queue column header, the train header chip and the queue - // popover, so the picture means the same thing everywhere. - const STAGE_TRACKER_TRAIN_ICON_PATH = '<rect x="2" y="3.5" width="12" height="7" rx="1.5"/><path d="M2 7.5h12M6.5 3.5v4M10.5 3.5v4M4 13.5l-1.5 1.5M12 13.5l1.5 1.5"/><circle cx="5" cy="12.5" r="1.5"/><circle cx="11" cy="12.5" r="1.5"/>'; + // The merge-queue icon: a "merge" traffic sign (US W4-1) — an up arrow + // with a second lane curving in from the lower right and joining the + // shaft mid-height (14px, currentColor). The owner read the old ⛓ as a + // scribble and the railcar that replaced it as a tram front + // (hivecommons/hive#17459). One path for the Merge queue column header, + // the 080 chevron, the train header chip and the queue popover, so the + // picture means the same thing everywhere. + const STAGE_TRACKER_TRAIN_ICON_PATH = '<path stroke-width="2" d="M6 14.5V3M3 6l3-3 3 3M13 14.5c0-3.8-3.4-4.6-7-6.5"/>'; const STAGE_TRACKER_TRAIN_ICON_TITLE = 'Merge queue'; - // Pure: the inline-SVG train with its "Merge queue" hover. + // Pure: the inline-SVG merge sign with its "Merge queue" hover. function stageTrackerTrainIconHtml(cls, title) { const label = title || STAGE_TRACKER_TRAIN_ICON_TITLE; return `<svg class="${esc(cls || 'ham-train-icon')}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="${esc(label)}"><title>${esc(label)}${STAGE_TRACKER_TRAIN_ICON_PATH}`; diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index d8aaeee6d0..c8190cebac 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -15961,13 +15961,16 @@

    Where to get help

    const STAGE_TRACKER_TRAIN_STATE_QUEUED = 'queued-behind'; const STAGE_TRACKER_TRAIN_STATE_REBASING = 'rebasing'; const STAGE_TRACKER_TRAIN_STATE_EXHAUSTED = 'rebase-exhausted'; - // The merge-queue icon: a side-view railcar on two wheels (14px, - // currentColor) — the owner read the old ⛓ as a scribble. One path for - // the Merge queue column header, the train header chip and the queue - // popover, so the picture means the same thing everywhere. - const STAGE_TRACKER_TRAIN_ICON_PATH = ''; + // The merge-queue icon: a "merge" traffic sign (US W4-1) — an up arrow + // with a second lane curving in from the lower right and joining the + // shaft mid-height (14px, currentColor). The owner read the old ⛓ as a + // scribble and the railcar that replaced it as a tram front + // (hivecommons/hive#17459). One path for the Merge queue column header, + // the 080 chevron, the train header chip and the queue popover, so the + // picture means the same thing everywhere. + const STAGE_TRACKER_TRAIN_ICON_PATH = ''; const STAGE_TRACKER_TRAIN_ICON_TITLE = 'Merge queue'; - // Pure: the inline-SVG train with its "Merge queue" hover. + // Pure: the inline-SVG merge sign with its "Merge queue" hover. function stageTrackerTrainIconHtml(cls, title) { const label = title || STAGE_TRACKER_TRAIN_ICON_TITLE; return `${esc(label)}${STAGE_TRACKER_TRAIN_ICON_PATH}`; @@ -18155,9 +18158,9 @@

    Where to get help

    // as one duplicated glyph (operator, 2026-11-03). 50: '', ci: '', - // Merge queue: the same railcar as the column header and train chip + // Merge queue: the same merge sign as the column header and train chip // (STAGE_TRACKER_TRAIN_ICON_PATH in tracker-words.js; a test keeps them equal). - 80: '', + 80: '', 100: '', 110: '', history: '', From 22724a417f4886273e81a061bbd9f817a77ebb08 Mon Sep 17 00:00:00 2001 From: Karibhou <157208370+Karibhou@users.noreply.github.com> Date: Mon, 9 Nov 2026 23:16:53 +0100 Subject: [PATCH 069/123] =?UTF-8?q?=F0=9F=90=9B=20fix(dashboard):=20deflak?= =?UTF-8?q?e=20TestGitHubWebhookReceiverSchedulesTargetedTrackerRefresh=20?= =?UTF-8?q?(#17449)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(dashboard): deflake TestGitHubWebhookReceiverSchedulesTargetedTrackerRefresh newGitHubWebhookTestServer left the stage-tracker refresher on its production time.AfterFunc. Every test on that server that posts a delivery naming a managed PR or issue (receiver, wake, routing, review-dispatch, forgestate-count and CI-failure tests) armed a real 2s debounce that fired after the test returned. Its flush tries the re-read against the closed GitHub stub and then calls github.RecordWebhookTargetedRefreshes(1) on whatever process-wide webhook tracker is installed at that moment. Under -shuffle that can be the tracker TestGitHubWebhookReceiverSchedulesTargetedTrackerRefresh swapped in with a pinned clock, which asserts targeted_refreshes_1h is exactly 1; the stray count makes it 2 and the test fails until the rerun. Install the same hand-fired fakeTimers refresher the other webhook tests use, so the debounce window can never outlive its test. The helper's GitHub stub already fails any call, so no test on it relies on the re-read happening. Fixes #17446 Hive-Run: hivecommons/hive#17446 Hive-Plan: ci-flake hivecommons/hive#17446 Hive-Spec: ci-flake#17446 Signed-off-by: Karibhou * ci: retrigger v2 CI (overlayfs-exec-guard bobshell S3 download timeout) Signed-off-by: Karibhou --------- Signed-off-by: Karibhou Co-authored-by: Karibhou --- src/pkg/dashboard/api_github_webhook_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pkg/dashboard/api_github_webhook_test.go b/src/pkg/dashboard/api_github_webhook_test.go index 470f26f023..e2b0cd6e01 100644 --- a/src/pkg/dashboard/api_github_webhook_test.go +++ b/src/pkg/dashboard/api_github_webhook_test.go @@ -39,6 +39,17 @@ func newGitHubWebhookTestServer(t *testing.T) *Server { Ctx: context.Background(), Logger: logger, } + // Every delivery naming a managed PR or issue arms the stage-tracker + // refresher's debounce. On the default time.AfterFunc that timer fires + // ~2s after the test returned, and its flush counts a targeted re-read + // (failed or not) into the process-wide webhook tracker of whichever + // test runs then: under -shuffle that can be + // TestGitHubWebhookReceiverSchedulesTargetedTrackerRefresh, which pins + // targeted_refreshes_1h to exactly 1 (hivecommons/hive#17446). The + // GitHub stub above rejects every call, so no test on this server + // wants the re-read: a hand-fired timer keeps the window in the test. + s.webhookRefresh = newWebhookTrackerRefresher() + s.webhookRefresh.newTimer = (&fakeTimers{}).newTimer return s } From 0c807ec369273a53dee38bd5007eec5fd22ac488 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 17:20:28 -0500 Subject: [PATCH 070/123] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20stabilize?= =?UTF-8?q?=20scroll=20across=20all=20repaint=20paths=20(#17458)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content above the viewport changes height on SSE panel updates, lazy section loads, sparkline replays and pane polls, not only on render(), so the reader's section drifted up or down. Add a standalone scroll stabilizer: a ResizeObserver on the document and every [data-dashboard-section] re-applies a continuously maintained anchor (same shape as captureScrollAnchor) after layout and before paint, so the correction lands in the frame of the shift. Delta-based against a persistent node, it composes with native scroll anchoring and defers to hash/sidebar navigation settling. Signed-off-by: Andrew Anderson --- .../fixed-dashboard-scroll-stabilizer.md | 1 + .../static-src/js/scroll-stabilizer.js | 110 ++++++++++++++++++ src/pkg/dashboard/static-src/manifest.txt | 1 + src/pkg/dashboard/static/index.html | 110 ++++++++++++++++++ 4 files changed, 222 insertions(+) create mode 100644 changelog.d/fixed-dashboard-scroll-stabilizer.md create mode 100644 src/pkg/dashboard/static-src/js/scroll-stabilizer.js diff --git a/changelog.d/fixed-dashboard-scroll-stabilizer.md b/changelog.d/fixed-dashboard-scroll-stabilizer.md new file mode 100644 index 0000000000..e3f8e808a5 --- /dev/null +++ b/changelog.d/fixed-dashboard-scroll-stabilizer.md @@ -0,0 +1 @@ +- Dashboard: the page no longer drifts away from the section you are reading when other panels grow or shrink. A ResizeObserver-driven scroll stabilizer now pins the topmost visible section (or agent card) across every repaint path, not just the main status render. diff --git a/src/pkg/dashboard/static-src/js/scroll-stabilizer.js b/src/pkg/dashboard/static-src/js/scroll-stabilizer.js new file mode 100644 index 0000000000..ce1ec52621 --- /dev/null +++ b/src/pkg/dashboard/static-src/js/scroll-stabilizer.js @@ -0,0 +1,110 @@ + // ── Scroll stabilizer ────────────────────────────────────────────── + // render() pins the reader's section across its own repaint, but the + // page has many other repaint paths (SSE panel updates, lazy section + // loads, sparkline replays, pane polls) and each of them can change the + // height of content above the viewport, dragging what the reader is + // looking at up or down. Browser-native scroll anchoring does not help + // here: it gives up whenever the anchor node itself is replaced, which + // is exactly what an innerHTML rerender does. + // + // This keeps one live anchor (same shape as captureScrollAnchor: the + // topmost visible section, or the first visible agent card by key) and + // re-applies it from a ResizeObserver. ResizeObserver callbacks run + // after layout and before paint, so the correction lands in the same + // frame as the shift and the reader never sees the page move. Because + // the correction is delta-based against a persistent node, it composes + // with native anchoring instead of double-counting it. + const SCROLL_STABILIZER_MIN_DELTA_PX = 1; + let _ssAnchor = null; + let _ssCaptureQueued = false; + let _ssSelfScroll = false; + let _ssObserver = null; + let _ssDomObserver = null; + + function _ssSuppressed() { + // A hash/sidebar navigation is settling: ocSettleScroll owns the + // scroll until it is done, and we must not fight it. + if (typeof _hashScrollPending !== 'undefined' && _hashScrollPending) return true; + if (typeof _ocScrollSettleCancel !== 'undefined' && _ocScrollSettleCancel) return true; + return false; + } + + function _ssCapture() { + _ssCaptureQueued = false; + if (typeof captureScrollAnchor !== 'function') return; + _ssAnchor = window.scrollY > 0 ? captureScrollAnchor() : null; + } + + function _ssQueueCapture() { + if (_ssCaptureQueued) return; + _ssCaptureQueued = true; + requestAnimationFrame(_ssCapture); + } + + // Returns the vertical delta the anchor has drifted by, or 0. + function _ssDrift(anchor) { + if (!anchor) return 0; + if (anchor.cardKey && anchor.el && anchor.el.isConnected) { + const safeKey = (window.CSS && CSS.escape) ? CSS.escape(anchor.cardKey) : String(anchor.cardKey).replace(/["\\]/g, '\\$&'); + const card = anchor.el.querySelector(`.agent-card[data-agent="${safeKey}"]`); + if (card && card.getClientRects().length) return card.getBoundingClientRect().top - anchor.cardTop; + } + if (anchor.el && anchor.el.isConnected && anchor.el.getClientRects().length) { + return anchor.el.getBoundingClientRect().top - anchor.top; + } + return 0; + } + + function _ssCorrect() { + if (_ssSuppressed() || !_ssAnchor || window.scrollY <= 0) { _ssQueueCapture(); return; } + const delta = _ssDrift(_ssAnchor); + if (Math.abs(delta) >= SCROLL_STABILIZER_MIN_DELTA_PX) { + const before = window.scrollY; + _ssSelfScroll = true; + window.scrollBy(0, delta); + // Clamped at an edge: no scroll event will follow, so clear the flag. + if (window.scrollY === before) _ssSelfScroll = false; + } + // Content may have changed which section is topmost; refresh the + // anchor so the next shift is measured from where the reader is now. + _ssQueueCapture(); + } + + function _ssObserveSections() { + if (!_ssObserver) return; + const sections = document.querySelectorAll('[data-dashboard-section]'); + for (let i = 0; i < sections.length; i++) _ssObserver.observe(sections[i]); + } + + function initScrollStabilizer() { + if (_ssObserver || typeof ResizeObserver === 'undefined') return; + _ssObserver = new ResizeObserver(_ssCorrect); + _ssObserver.observe(document.documentElement); + if (document.body) _ssObserver.observe(document.body); + _ssObserveSections(); + // Sections that are rendered later (lazy panels) must be observed too; + // observe() is idempotent so re-walking on any subtree change is safe. + if (typeof MutationObserver !== 'undefined') { + let walkQueued = false; + _ssDomObserver = new MutationObserver(function() { + if (walkQueued) return; + walkQueued = true; + requestAnimationFrame(function() { walkQueued = false; _ssObserveSections(); }); + }); + _ssDomObserver.observe(document.body || document.documentElement, { childList: true, subtree: true }); + } + // The reader's own scrolling moves the anchor; our corrections do not. + window.addEventListener('scroll', function() { + if (_ssSelfScroll) { _ssSelfScroll = false; return; } + _ssQueueCapture(); + }, { passive: true }); + // A viewport resize changes every rect; re-measure instead of correcting. + window.addEventListener('resize', function() { _ssAnchor = null; _ssQueueCapture(); }, { passive: true }); + _ssQueueCapture(); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initScrollStabilizer); + } else { + initScrollStabilizer(); + } diff --git a/src/pkg/dashboard/static-src/manifest.txt b/src/pkg/dashboard/static-src/manifest.txt index 62820db249..648feda4ea 100644 --- a/src/pkg/dashboard/static-src/manifest.txt +++ b/src/pkg/dashboard/static-src/manifest.txt @@ -117,6 +117,7 @@ js/vault-audit.js js/review-queue.js js/contributors.js js/refresh.js +js/scroll-stabilizer.js js/inception.js js/debug-logs.js js/tooltips-dialogs.js diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index c8190cebac..51e0f53220 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -47241,6 +47241,116 @@ if (!_hashScrollPending) restoreScrollAnchor(scrollAnchor); } } + // ── Scroll stabilizer ────────────────────────────────────────────── + // render() pins the reader's section across its own repaint, but the + // page has many other repaint paths (SSE panel updates, lazy section + // loads, sparkline replays, pane polls) and each of them can change the + // height of content above the viewport, dragging what the reader is + // looking at up or down. Browser-native scroll anchoring does not help + // here: it gives up whenever the anchor node itself is replaced, which + // is exactly what an innerHTML rerender does. + // + // This keeps one live anchor (same shape as captureScrollAnchor: the + // topmost visible section, or the first visible agent card by key) and + // re-applies it from a ResizeObserver. ResizeObserver callbacks run + // after layout and before paint, so the correction lands in the same + // frame as the shift and the reader never sees the page move. Because + // the correction is delta-based against a persistent node, it composes + // with native anchoring instead of double-counting it. + const SCROLL_STABILIZER_MIN_DELTA_PX = 1; + let _ssAnchor = null; + let _ssCaptureQueued = false; + let _ssSelfScroll = false; + let _ssObserver = null; + let _ssDomObserver = null; + + function _ssSuppressed() { + // A hash/sidebar navigation is settling: ocSettleScroll owns the + // scroll until it is done, and we must not fight it. + if (typeof _hashScrollPending !== 'undefined' && _hashScrollPending) return true; + if (typeof _ocScrollSettleCancel !== 'undefined' && _ocScrollSettleCancel) return true; + return false; + } + + function _ssCapture() { + _ssCaptureQueued = false; + if (typeof captureScrollAnchor !== 'function') return; + _ssAnchor = window.scrollY > 0 ? captureScrollAnchor() : null; + } + + function _ssQueueCapture() { + if (_ssCaptureQueued) return; + _ssCaptureQueued = true; + requestAnimationFrame(_ssCapture); + } + + // Returns the vertical delta the anchor has drifted by, or 0. + function _ssDrift(anchor) { + if (!anchor) return 0; + if (anchor.cardKey && anchor.el && anchor.el.isConnected) { + const safeKey = (window.CSS && CSS.escape) ? CSS.escape(anchor.cardKey) : String(anchor.cardKey).replace(/["\\]/g, '\\$&'); + const card = anchor.el.querySelector(`.agent-card[data-agent="${safeKey}"]`); + if (card && card.getClientRects().length) return card.getBoundingClientRect().top - anchor.cardTop; + } + if (anchor.el && anchor.el.isConnected && anchor.el.getClientRects().length) { + return anchor.el.getBoundingClientRect().top - anchor.top; + } + return 0; + } + + function _ssCorrect() { + if (_ssSuppressed() || !_ssAnchor || window.scrollY <= 0) { _ssQueueCapture(); return; } + const delta = _ssDrift(_ssAnchor); + if (Math.abs(delta) >= SCROLL_STABILIZER_MIN_DELTA_PX) { + const before = window.scrollY; + _ssSelfScroll = true; + window.scrollBy(0, delta); + // Clamped at an edge: no scroll event will follow, so clear the flag. + if (window.scrollY === before) _ssSelfScroll = false; + } + // Content may have changed which section is topmost; refresh the + // anchor so the next shift is measured from where the reader is now. + _ssQueueCapture(); + } + + function _ssObserveSections() { + if (!_ssObserver) return; + const sections = document.querySelectorAll('[data-dashboard-section]'); + for (let i = 0; i < sections.length; i++) _ssObserver.observe(sections[i]); + } + + function initScrollStabilizer() { + if (_ssObserver || typeof ResizeObserver === 'undefined') return; + _ssObserver = new ResizeObserver(_ssCorrect); + _ssObserver.observe(document.documentElement); + if (document.body) _ssObserver.observe(document.body); + _ssObserveSections(); + // Sections that are rendered later (lazy panels) must be observed too; + // observe() is idempotent so re-walking on any subtree change is safe. + if (typeof MutationObserver !== 'undefined') { + let walkQueued = false; + _ssDomObserver = new MutationObserver(function() { + if (walkQueued) return; + walkQueued = true; + requestAnimationFrame(function() { walkQueued = false; _ssObserveSections(); }); + }); + _ssDomObserver.observe(document.body || document.documentElement, { childList: true, subtree: true }); + } + // The reader's own scrolling moves the anchor; our corrections do not. + window.addEventListener('scroll', function() { + if (_ssSelfScroll) { _ssSelfScroll = false; return; } + _ssQueueCapture(); + }, { passive: true }); + // A viewport resize changes every rect; re-measure instead of correcting. + window.addEventListener('resize', function() { _ssAnchor = null; _ssQueueCapture(); }, { passive: true }); + _ssQueueCapture(); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initScrollStabilizer); + } else { + initScrollStabilizer(); + } // ── Inception section ── let _inceptionState = null; let _campaigns = []; From 758e442546b1b516833f5a6ff3cbd89200495565 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 17:31:48 -0500 Subject: [PATCH 071/123] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20settled-cur?= =?UTF-8?q?rent=20stage=20chevron=20keeps=20its=20neutral=20fill=20while?= =?UTF-8?q?=20CI=20runs=20(#17462)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While a CI / Review track runs, the stage chevron renders settled-current (filled but still, icon only). The Open-column word tints (draft slate, blocked yellow, New blue, stale amber-red) and the held-gate amber were declared later in tracker.css at equal specificity, so they repainted the settled chevron and the row showed two coloured chevrons — hive's own #17329, a draft PR with no stage, read as slate Open + amber CI 51/64. One higher-specificity settled-current rule after the tints restores the neutral fill; the draft class stays for the tooltip. Node test covers the rendered classes and the CSS ordering/specificity. Fixes #17461 Signed-off-by: Andrew Anderson --- .../fixed-settled-open-chevron-tint.md | 1 + .../dashboard-sections/activity-monitor.md | 2 +- .../stage_tracker_remediation_chevron.test.js | 32 +++++++++++++++++++ src/pkg/dashboard/static-src/css/tracker.css | 8 +++++ src/pkg/dashboard/static/index.html | 8 +++++ 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 changelog.d/fixed-settled-open-chevron-tint.md diff --git a/changelog.d/fixed-settled-open-chevron-tint.md b/changelog.d/fixed-settled-open-chevron-tint.md new file mode 100644 index 0000000000..055c1dc98b --- /dev/null +++ b/changelog.d/fixed-settled-open-chevron-tint.md @@ -0,0 +1 @@ +- Activity Monitor: while CI or review runs, the stage chevron keeps its neutral settled-current fill — the Open-column draft / blocked / New / stale tints no longer paint a second coloured chevron beside the running track (a draft PR with no stage read as slate Open + amber CI). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 01606bd2e8..e912a6f266 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -453,7 +453,7 @@ Plain words throughout — working / waiting on X / set back by Y / merged — n An *active* chevron is filled amber and carries words; an inactive one is its icon alone (CI / Review: the ring, green when the last run on this head passed, red when it failed, neutral when not yet run), with the counts in its tooltip. On every strip: 1. **Exactly one lit stage per row.** One chevron is active — the column where the item is or where it is stuck; later stages are shown dim, with a muted queued note when they are next ([#17335](https://github.com/hivecommons/hive/issues/17335): a push during review lit *CI 7/11 · 4 running* and *Review 5/5 · adjudicating* amber together). -2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current — filled but still, icon only, its words in the tooltip — and nothing else is active. +2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current — filled but still, icon only, its words in the tooltip — and nothing else is active. Settled-current is always the neutral fill: the Open column's draft, blocked, New and stale tints and the held-gate amber never repaint it, so the running track is the row's only coloured chevron ([#17461](https://github.com/hivecommons/hive/issues/17461): a draft PR with no stage yet read as a slate Open beside amber CI). 3. **CI leads Review.** When both tracks would light at once — CI running while the review is queued, in progress or being re-adjudicated — CI is the lit chevron and Review is dim with a small note (*re-review queued* after a push, *review in progress*, *review queued*); its words stay in the tooltip, ending *… behind CI*. The stage chevron is the fallback: active only when no track is in motion. 4. **The PR in progress chevron speaks the PR's lifecycle** — draft, pushed, rebasing, *Unassigned · next: scanner*, *Deferred · waiting on #N*, *Waiting for @author · fix owed* — never a CI or review verdict. *CI failing*, *CI 4/11 · 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail. 5. **The CI and Review tooltips state what the track waits on — never "activity unknown".** With no verdict and no reviewer in flight the spoke derives the Review statement from what it already knows, in this order: the PR is merged or closed (*Review · n/a (closed)*), it is a draft (*Review · draft, not requested*), CI on the head has not finished (*Review · waiting for CI*), CI is done and nobody started (*Review · not started · hive reviewer next*, or *· needs reviewer* when the repo has no hive reviewer lane). A settled verdict explains itself — *Changes requested by the hive reviewer: 1 perspective posted findings … · 12m ago · quality ✓ · security ✗: token logged* — and stays known as its observation ages. The one no-data wording, *Review · no data for head f269349 yet · refreshing* (CI: *CI · no checks observed for head … yet · refreshing*), appears only when the spoke has fetched nothing for the head, and names the next step. diff --git a/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js b/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js index 9827f18c1e..defa54ca6c 100644 --- a/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js +++ b/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js @@ -40,6 +40,9 @@ const segments = new Function('stageTrackerAnchor', globals + ` const STAGE_TRACKER_ACTIVE_WORD = {70: 'Fixing'}; const STAGE_TRACKER_HUMAN_GATED = 85, STAGE_TRACKER_READY_FOR_HUMAN_MERGE = 90, STAGE_TRACKER_ADOPTED_BY_HIVE = 74; function stageTrackerSentinelInLane() { return false; } +function stageTrackerOpenSince(it) { return { ms: Date.parse(it.created_at || '') || 0 }; } +function stageTrackerShortAgo() { return '1d'; } +const STAGE_TRACKER_OPEN_STALE_DAYS = 7; function stageTrackerUnauthorizedWord() { return ''; } function stageTrackerManualMergeWord() { return 'Ready for human merge'; } function stageTrackerAdoptedWord() { return 'Adopted by hive'; } @@ -47,6 +50,7 @@ function stageTrackerAdoptedWord() { return 'Adopted by hive'; } const renderStrip = new Function('esc', 'stageTrackerSegments', 'stageTrackerActivityTrackHtml', globals + ` const STAGE_TRACKER_MOTION_STATIC = 'static', STAGE_TRACKER_MOTION_ACTIVE = 'active'; const STAGE_TRACKER_READY_FOR_HUMAN_MERGE = 90; +const STAGE_TRACKER_DRAFT_TIP = 'Draft — the author is still working on it.'; function stageTrackerActorKind() { return ''; } function stageTrackerActorTip() { return ''; } function stageTrackerMotion() { return STAGE_TRACKER_MOTION_STATIC; } @@ -334,3 +338,31 @@ test('a stalled or stale-polled text-bearing track is plainly active: one amber if (words) assert.ok(/\bactive\b/.test(m[1]) && !/\b(pending|todo|done|failing|ham-settled-current)\b/.test(m[1]), 'text without the one active fill: ' + m[1]); } }); + +// hivecommons/hive#17461: a draft PR with no stage yet (Open column) whose CI +// runs draws the Open chevron settled-current — icon only, neutral fill — +// and the running track is the row's only coloured chevron. The Open word +// tints (draft, blocked, New, stale) are declared after the settled rule at +// equal specificity; the settled fill must still win. +test('a draft Open PR with running CI: Open is settled-current and no Open tint repaints it', () => { + const c = cells(redPR({ stage: 0, modifiers: ['draft'], created_at: '2026-11-03T01:50:50Z', + ci_activity: { head: 'abc1234def', state: 'running', active: true, caption: 'CI 51/64 · 12 running', checks_passed: 51, checks_total: 64, source: 'checks', observed_at: '2026-11-04T02:40:00Z' }, + review_activity: { head: 'abc1234def', state: 'not_started', caption: 'Review · draft, not requested', source: 'none', observed_at: '2026-11-04T02:40:00Z' } })); + assert.match(c[0], /^
  • ({ sel: m[1].trim(), body: m[2] })); + const tints = rules.filter(r => /^\.ham-seg\.active\.(ham-open-\w+|ham-held)$/.test(r.sel) && /background/.test(r.body)); + assert.ok(tints.length >= 4, 'the Open tints are still single-rule backgrounds: ' + tints.map(r => r.sel).join(' | ')); + const settled = rules.findIndex(r => r.sel === '.ham-seg.ham-seg.active.ham-settled-current'); + assert.ok(settled >= 0, 'a settled-current rule outranks the three-class tints'); + assert.match(rules[settled].body, /background: var\(--surface-3\)/); + for (const t of tints) assert.ok(rules.indexOf(t) < settled, t.sel + ' is declared before the settled-current override'); + for (const t of tints) assert.ok(t.sel.split('.').length - 1 < rules[settled].sel.split('.').length - 1, t.sel + ' has lower specificity than the settled-current override'); +}); diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index cca0e25e3f..6971828712 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -484,6 +484,14 @@ .ham-seg.active.ham-open-advisory { background: var(--surface-2); color: var(--muted); } .ham-seg.active.ham-open-advisory .ham-seg-t::before { content: 'ⓘ'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-stale { background: color-mix(in srgb, var(--amber) 65%, var(--red)); } + /* While a CI / Review track runs, the stage chevron is settled-current: + the neutral still location, icon only (rule 2, hivecommons/hive#16643). + That fill wins over the Open word tints above (draft slate, blocked + yellow, New blue, stale amber-red) and the held-gate amber, which are + declared later at equal specificity and would otherwise paint a second + coloured chevron beside the running track (hivecommons/hive#17461: + a draft PR with no stage read as slate Open + amber CI). */ + .ham-seg.ham-seg.active.ham-settled-current { background: var(--surface-3); color: var(--text); } .ham-detour { white-space: normal; overflow-wrap: anywhere; } .ham-current-stage { display: none; margin: 0; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; } .ham-active-ico { display: none; } diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 51e0f53220..988d035a97 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1827,6 +1827,14 @@ .ham-seg.active.ham-open-advisory { background: var(--surface-2); color: var(--muted); } .ham-seg.active.ham-open-advisory .ham-seg-t::before { content: 'ⓘ'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-stale { background: color-mix(in srgb, var(--amber) 65%, var(--red)); } + /* While a CI / Review track runs, the stage chevron is settled-current: + the neutral still location, icon only (rule 2, hivecommons/hive#16643). + That fill wins over the Open word tints above (draft slate, blocked + yellow, New blue, stale amber-red) and the held-gate amber, which are + declared later at equal specificity and would otherwise paint a second + coloured chevron beside the running track (hivecommons/hive#17461: + a draft PR with no stage read as slate Open + amber CI). */ + .ham-seg.ham-seg.active.ham-settled-current { background: var(--surface-3); color: var(--text); } .ham-detour { white-space: normal; overflow-wrap: anywhere; } .ham-current-stage { display: none; margin: 0; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; } .ham-active-ico { display: none; } From 4cbefb71d8b954c727b6d44754fb3203df83ff05 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 22:51:08 +0000 Subject: [PATCH 072/123] =?UTF-8?q?=F0=9F=90=9B=20fix(sec-check):=20reques?= =?UTF-8?q?t=20Dependabot=20alerts=20read=20permission=20and=20document=20?= =?UTF-8?q?it=20(#17442)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(sec-check): request Dependabot alerts read permission and document it The sec-check policy calls the dependabot/alerts endpoint, but the contributor-tier App token never requested vulnerability_alerts, so the call returned 403 and the permission was undocumented. Request it as optional (retry without it when the installation has not accepted it) and add it to the App permissions table. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: williamdalessandro <231250207+williamdalessandro@users.noreply.github.com> * 🐛 fix(sec-check): only retry the Dependabot alerts mint on a permission refusal Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 fix(sec-check): scope vulnerability_alerts:read to the sec-check role token Least privilege (#17426 reviewer decision): only an ISSUES_AND_PRS agent with role sec-check mints the new sec-check tier (the contributor set plus Dependabot alerts read), via the same role-refinement path the reviewer tier uses. Every other contributor-tier token is unchanged. The App itself still declares the permission, so each installation re-accepts it once. Signed-off-by: Andrew Anderson --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Signed-off-by: Andrew Anderson Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: williamdalessandro <231250207+williamdalessandro@users.noreply.github.com> Co-authored-by: Andrew Anderson --- .../fixed-dependabot-alerts-permission.md | 1 + src/crux/agentmode/agentmode.go | 21 +++- src/crux/agentmode/reviewer_tier_test.go | 30 +++++ src/docs/github-app-setup.md | 1 + src/pkg/github/app.go | 41 +++++++ src/pkg/github/workflows_permission_test.go | 103 ++++++++++++++++++ src/pkg/mint/agent.go | 6 +- 7 files changed, 199 insertions(+), 4 deletions(-) create mode 100644 changelog.d/fixed-dependabot-alerts-permission.md diff --git a/changelog.d/fixed-dependabot-alerts-permission.md b/changelog.d/fixed-dependabot-alerts-permission.md new file mode 100644 index 0000000000..435a44da9c --- /dev/null +++ b/changelog.d/fixed-dependabot-alerts-permission.md @@ -0,0 +1 @@ +- The sec-check agent's Dependabot alerts call no longer 403s once the GitHub App is granted the new read-only Dependabot alerts permission (documented in the GitHub App setup guide); existing installations must re-accept it once. Only the sec-check role's token requests the grant — other agents' tokens are unchanged. diff --git a/src/crux/agentmode/agentmode.go b/src/crux/agentmode/agentmode.go index b6c195822f..43c52663e5 100644 --- a/src/crux/agentmode/agentmode.go +++ b/src/crux/agentmode/agentmode.go @@ -125,9 +125,23 @@ func TokenTierForRole(m AgentMode, role string) string { if m == ModeAdvisory && role == ReviewerRole { return "reviewer" } + if m == ModeIssuesAndPRs && role == SecCheckRole { + return SecCheckTier + } return m.TokenTier() } +// SecCheckRole is the agent role whose ISSUES_AND_PRS token additionally +// carries Dependabot alerts read (#17426). Like the reviewer refinement it +// is a role, not a rung on the mode ladder: a sec-check agent mints the +// SecCheckTier (the contributor set plus vulnerability_alerts:read) so that +// no other contributor-tier agent's token is widened by the grant. +const SecCheckRole = "sec-check" + +// SecCheckTier is the scoped-token tier TokenTierForRole yields for an +// ISSUES_AND_PRS agent with SecCheckRole. +const SecCheckTier = "sec-check" + // CanComment reports whether an agent at this mode may post a comment on an // issue. It sits at the ISSUES_ONLY rung: the newcomer token tier is the first // with Issues:write, and ADVISORY (advisor, and the reviewer refinement whose @@ -137,8 +151,9 @@ func TokenTierForRole(m AgentMode, role string) string { func (m AgentMode) CanComment() bool { return m >= ModeIssuesOnly } // ModeForTokenTier is the inverse of TokenTier / TokenTierForRole: the mode a -// scoped-token tier corresponds to. The reviewer tier maps to ADVISORY (it is -// a role refinement of that mode, see TokenTierForRole); "merger" is the +// scoped-token tier corresponds to. The reviewer tier maps to ADVISORY and the +// sec-check tier to ISSUES_AND_PRS (both are role refinements of their mode, +// see TokenTierForRole); "merger" is the // contribute queue's name for the tier above trusted and shares its mode. An // unknown tier reports ADVISORY and false, so a caller that gates a write on // the result fails closed. @@ -148,7 +163,7 @@ func ModeForTokenTier(tier string) (AgentMode, bool) { return ModeAdvisory, true case "newcomer": return ModeIssuesOnly, true - case "contributor": + case "contributor", SecCheckTier: return ModeIssuesAndPRs, true case "trusted", "merger": return ModeIssuesPRsMerge, true diff --git a/src/crux/agentmode/reviewer_tier_test.go b/src/crux/agentmode/reviewer_tier_test.go index a952a1bafd..37ae515560 100644 --- a/src/crux/agentmode/reviewer_tier_test.go +++ b/src/crux/agentmode/reviewer_tier_test.go @@ -62,3 +62,33 @@ func TestTokenTierForRole_ReviewerGainsNoModeCapability(t *testing.T) { t.Error("ADVISORY reports CanMerge — the reviewer's safety asymmetry depends on this staying false") } } + +// The sec-check role refines ISSUES_AND_PRS into a tier whose App token adds +// Dependabot alerts read (#17426). It is scoped to that one role and mode: +// every other contributor-tier agent, and a sec-check agent at any other mode, +// keeps the plain mode tier. +func TestTokenTierForRole_SecCheckGetsAlertsCapableTier(t *testing.T) { + if got := TokenTierForRole(ModeIssuesAndPRs, SecCheckRole); got != SecCheckTier { + t.Errorf("ISSUES_AND_PRS sec-check minted %q, want %q", got, SecCheckTier) + } + for _, role := range []string{"", "scanner", ReviewerRole} { + if got := TokenTierForRole(ModeIssuesAndPRs, role); got != "contributor" { + t.Errorf("ISSUES_AND_PRS %q minted %q, want contributor — only the sec-check role is refined", role, got) + } + } + for _, tc := range []struct { + mode AgentMode + want string + }{ + {ModeAdvisory, "advisor"}, + {ModeIssuesOnly, "newcomer"}, + {ModeIssuesPRsMerge, "trusted"}, + } { + if got := TokenTierForRole(tc.mode, SecCheckRole); got != tc.want { + t.Errorf("%v sec-check minted %q, want %q", tc.mode, got, tc.want) + } + } + if mode, ok := ModeForTokenTier(SecCheckTier); !ok || mode != ModeIssuesAndPRs { + t.Errorf("ModeForTokenTier(%q) = %v, %v; want ISSUES_AND_PRS, true", SecCheckTier, mode, ok) + } +} diff --git a/src/docs/github-app-setup.md b/src/docs/github-app-setup.md index 4d08f49443..74b3f3f053 100644 --- a/src/docs/github-app-setup.md +++ b/src/docs/github-app-setup.md @@ -93,6 +93,7 @@ Repository permissions used by the dashboard setup UI are: | Actions | Read and write (Read-only with `governor.ci.auto_approve_workflows: false`) | Inspect workflow runs; the default-on approval sweep approves gated `pull_request` runs for trusted bots, the App and dashboard-admitted heads with the App token ([#16603](https://github.com/hivecommons/hive/issues/16603)). If the sweep is off or refused and GitHub holds trusted Dependabot/App/clanker runs in `action_required`, Hive posts `/ok-to-test`; the repository-local `hive-ok-to-test` workflow uses its own `GITHUB_TOKEN` with Actions write to approve those runs. With Read and write, the contributor lane also approves held runs directly for a PR author the contributor registry admitted at a `require_tiers` tier (`auto_merge.contributor_lane.approve_held_runs_for_registry_trusted`). Optional: without it the hive marks such a PR `hive:unauthorized` and waits for a maintainer to click **Approve and run** ([#14589](https://github.com/hivecommons/hive/issues/14589)). | | Administration | Read-only | Read branch-protection rules before the merge-request watcher lands a PR; Hive refuses closed if it cannot verify the base branch is protected. | | Commit statuses | Read/write | Needed when `governor.labels.automerge` is the default `lgtm` on a repository running Prow's commit-bound `lgtm` (prow-github-actions v3): the queue action sets a `prow/lgtm` success status on the approved head so Prow does not strip the label. Without the write grant the label and approval still land, but every queue action takes the failure branch and posts a PR comment saying the status could not be set. Choose a distinct label such as `hive/auto-merge` if you would rather keep this at Read. | +| Dependabot alerts | Read-only | Required for the sec-check agent's Dependabot scanning (`gh api repos///dependabot/alerts`, [#17426](https://github.com/hivecommons/hive/issues/17426)). Least privilege: only the token minted for an ISSUES_AND_PRS agent with role `sec-check` requests `vulnerability_alerts: read`; every other agent's token is unchanged, even though the App itself must declare the permission. Existing installations must re-accept the updated permission once under Settings → Integrations → the app → Review request. Optional: without it the sec-check mint retries without the grant, the Dependabot call returns 403, and the hive still mints tokens. | | Workflows | Read/write | Let trusted-tier agents push branches that modify `.github/workflows/`, and let the contributor lane merge an owner-approved PR that edits `.github/workflows/**` (`auto_merge.contributor_lane.owner_approval_releases_workflow_fence`, [#14664](https://github.com/hivecommons/hive/issues/14664)); without the grant such a merge is refused and the hive marks the PR `hive:unauthorized` (`merge-workflow-path`) and parks it at 090 for a maintainer's **Merge** click. Without it GitHub also rejects any GitHub App-token push touching those files server-side ("refusing to allow a GitHub App to create or update workflow … without workflows permission") no matter what the token requests. Maintainer user credentials are separate and can still push workflow-file changes when their account has the normal repository rights; the Hive App cannot until this grant is added **and re-accepted on each installation** (an existing install must approve the new permission under Settings → Integrations → the app → Review request). See [`hive-open-pr`](hive-open-pr.md#workflow-file-pushes-rejected-by-app-tokens) for the agent delivery procedure and [#6985](https://github.com/hivecommons/hive/issues/6985) for the outstanding permission change. | Organization permission: diff --git a/src/pkg/github/app.go b/src/pkg/github/app.go index 136ad2b50b..1b649d45a0 100644 --- a/src/pkg/github/app.go +++ b/src/pkg/github/app.go @@ -17,6 +17,7 @@ import ( "github.com/golang-jwt/jwt/v5" gh "github.com/google/go-github/v72/github" "github.com/hivecommons/hive/crux" + "github.com/hivecommons/hive/crux/agentmode" "github.com/hivecommons/hive/pkg/config" ) @@ -334,6 +335,20 @@ func (a *AppAuth) ScopedTokenForRepos(ctx context.Context, tier string, repos [] PullRequests: gh.Ptr("write"), Metadata: gh.Ptr("read"), } + case agentmode.SecCheckTier: + // The sec-check role refinement of the contributor tier (#17426, + // agentmode.TokenTierForRole): the contributor set plus Dependabot + // alerts read so the agent can call dependabot/alerts. Scoped to + // this one role so no other ISSUES_AND_PRS agent's token carries + // it. Optional like Workflows: the mint below retries without it + // when the installation has not accepted the App permission. + perms = &gh.InstallationPermissions{ + Issues: gh.Ptr("write"), + Contents: gh.Ptr("write"), + PullRequests: gh.Ptr("write"), + Metadata: gh.Ptr("read"), + VulnerabilityAlerts: gh.Ptr("read"), + } case "trusted", "merger": perms = &gh.InstallationPermissions{ Issues: gh.Ptr("write"), @@ -425,6 +440,15 @@ func (a *AppAuth) ScopedTokenForRepos(ctx context.Context, tier string, repos [] defer cancel() jwtClient := newJWTClient(jwtToken, a.apiURL) installToken, _, err := jwtClient.Apps.CreateInstallationToken(mintCtx, installationID, opts) + if isPermissionNotGrantedMintError(err) && perms.VulnerabilityAlerts != nil && perms.Workflows == nil { + a.logger.Warn("scoped token mint with vulnerability_alerts:read failed; retrying without it — "+ + "the sec-check Dependabot alerts call will 403 until the App grants Dependabot alerts read-only and the installation re-accepts it; see docs/github-app-setup.md", + "tier", tier, "error", err) + perms.VulnerabilityAlerts = nil + alertsCtx, alertsCancel := mintContext(ctx) + defer alertsCancel() + installToken, _, err = jwtClient.Apps.CreateInstallationToken(alertsCtx, installationID, opts) + } if err != nil && perms.Workflows != nil { // The installation has likely not accepted the Workflows permission // on the App yet — GitHub refuses to mint a token requesting a @@ -448,6 +472,22 @@ func (a *AppAuth) ScopedTokenForRepos(ctx context.Context, tier string, repos [] return installToken.GetToken(), nil } +// isPermissionNotGrantedMintError reports whether an installation-token mint +// was refused because the request named a permission the installation has +// not accepted (GitHub answers 422 "The permissions requested are not granted +// to this installation."). A timeout, a repo-scope 422 (IsRepoScopeMintError) +// or any other failure is not that case and must not earn a second mint: the +// retry would double the bounded mint window and break the one-mint-per-repo +// accounting the hub relies on to exclude an unmintable repo. +func isPermissionNotGrantedMintError(err error) bool { + var ghErr *gh.ErrorResponse + if !errors.As(err, &ghErr) || ghErr.Response == nil { + return false + } + return ghErr.Response.StatusCode == http.StatusUnprocessableEntity && + strings.Contains(strings.ToLower(ghErr.Message), "permission") +} + // IsRepoScopeMintError reports whether an installation-token mint failed // because of the REPOSITORY the token was scoped to, not the tier or the App. // GitHub answers a token request naming a repository the installation cannot @@ -796,6 +836,7 @@ func installationPermissionMap(p *gh.InstallationPermissions) map[string]string put("metadata", p.GetMetadata()) put("pull_requests", p.GetPullRequests()) put("secrets", p.GetSecrets()) + put("vulnerability_alerts", p.GetVulnerabilityAlerts()) put("workflows", p.GetWorkflows()) return out } diff --git a/src/pkg/github/workflows_permission_test.go b/src/pkg/github/workflows_permission_test.go index 10213578be..4baa33e6a5 100644 --- a/src/pkg/github/workflows_permission_test.go +++ b/src/pkg/github/workflows_permission_test.go @@ -9,6 +9,9 @@ import ( "os" "testing" "time" + + "github.com/hivecommons/hive/crux" + "github.com/hivecommons/hive/crux/agentmode" ) // These are the regression tests for #4677: agents could not open PRs @@ -137,3 +140,103 @@ func TestScopedToken_WorkflowsFallbackWhenInstallationLacksGrant(t *testing.T) { } } } + +// Only the sec-check role refinement of the contributor tier requests +// Dependabot alerts read (#17426, least privilege): every other tier's token +// must not carry it. +func TestScopedToken_OnlySecCheckTierRequestsVulnerabilityAlerts(t *testing.T) { + var gotPerms map[string]string + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + gotPerms = decodePermissions(t, r) + json.NewEncoder(w).Encode(map[string]any{ + "token": "scoped-token", + "expires_at": time.Now().Add(time.Hour).Format(time.RFC3339), + }) + }) + server := httptest.NewServer(mux) + defer server.Close() + auth := newWorkflowsTestAuth(t, server.URL) + + for _, tier := range []string{"advisor", "reviewer", "newcomer", "contributor", "trusted", "merger", crux.SharedUIDReadTokenTier} { + if _, err := auth.ScopedToken(context.Background(), tier); err != nil { + t.Fatalf("ScopedToken(%q): %v", tier, err) + } + if got, present := gotPerms["vulnerability_alerts"]; present { + t.Errorf("tier %q requests vulnerability_alerts=%q; only the sec-check tier may", tier, got) + } + } + if _, err := auth.ScopedToken(context.Background(), agentmode.SecCheckTier); err != nil { + t.Fatalf("ScopedToken(sec-check): %v", err) + } + if gotPerms["vulnerability_alerts"] != "read" { + t.Errorf("sec-check tier vulnerability_alerts = %q, want read", gotPerms["vulnerability_alerts"]) + } + for _, perm := range []string{"contents", "issues", "pull_requests"} { + if gotPerms[perm] != "write" { + t.Errorf("sec-check tier %s = %q, want write (it is the contributor set plus alerts read)", perm, gotPerms[perm]) + } + } +} + +// The sec-check tier requests Dependabot alerts read and degrades to a token +// without it when the installation has not accepted the permission. +func TestScopedToken_SecCheckVulnerabilityAlertsWithFallback(t *testing.T) { + var requests []map[string]string + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + perms := decodePermissions(t, r) + requests = append(requests, perms) + if perms["vulnerability_alerts"] != "" { + w.WriteHeader(http.StatusUnprocessableEntity) + json.NewEncoder(w).Encode(map[string]any{"message": "The permissions requested are not granted to this installation."}) + return + } + json.NewEncoder(w).Encode(map[string]any{ + "token": "scoped-token-contributor", + "expires_at": time.Now().Add(time.Hour).Format(time.RFC3339), + }) + }) + server := httptest.NewServer(mux) + defer server.Close() + + auth := newWorkflowsTestAuth(t, server.URL) + if _, err := auth.ScopedToken(context.Background(), agentmode.SecCheckTier); err != nil { + t.Fatalf("ScopedToken: %v", err) + } + if len(requests) != 2 { + t.Fatalf("mint requests = %d, want 2", len(requests)) + } + if requests[0]["vulnerability_alerts"] != "read" { + t.Errorf("first mint vulnerability_alerts = %q, want read", requests[0]["vulnerability_alerts"]) + } + if _, present := requests[1]["vulnerability_alerts"]; present { + t.Errorf("retry still requests vulnerability_alerts: %v", requests[1]) + } + if requests[1]["pull_requests"] != "write" { + t.Errorf("retry pull_requests = %q, want write", requests[1]["pull_requests"]) + } +} + +// A repo-scope 422 (renamed / removed repository, #7869) is not a missing +// permission grant: the contributor mint must fail on the first attempt so +// the hub's one-mint-per-repo fall-through accounting still holds. +func TestScopedToken_SecCheckRepoScopeErrorDoesNotRetry(t *testing.T) { + var requests int + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + requests++ + w.WriteHeader(http.StatusUnprocessableEntity) + json.NewEncoder(w).Encode(map[string]any{"message": "There is at least one repository that does not exist or is not accessible to the parent installation."}) + }) + server := httptest.NewServer(mux) + defer server.Close() + + auth := newWorkflowsTestAuth(t, server.URL) + if _, err := auth.ScopedTokenForRepos(context.Background(), agentmode.SecCheckTier, []string{"gone"}); err == nil { + t.Fatal("ScopedTokenForRepos: want the repo-scope error, got nil") + } + if requests != 1 { + t.Fatalf("mint requests = %d, want 1 (a repo-scope 422 must not trigger the permission fallback)", requests) + } +} diff --git a/src/pkg/mint/agent.go b/src/pkg/mint/agent.go index 50cb1cb684..7021224a94 100644 --- a/src/pkg/mint/agent.go +++ b/src/pkg/mint/agent.go @@ -44,7 +44,11 @@ var tierScopes = map[string][]string{ "advisor": {ScopeIssuesRead}, "newcomer": {ScopeIssuesRead, ScopeIssuesWrite}, "contributor": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite}, - "trusted": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite, ScopeMerge}, + // The sec-check role refinement of contributor (agentmode.SecCheckTier): + // same hive-side scopes; the extra Dependabot alerts read lives only on + // the GitHub App token. + "sec-check": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite}, + "trusted": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite, ScopeMerge}, } // ScopesForTier returns the scope set for a trust tier. An unrecognized tier From 3c3da3efd3611a710567c46a193f6b130209fee5 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 22:59:18 +0000 Subject: [PATCH 073/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.1 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 14 ++++++++++++++ changelog.d/changed-merge-queue-icon.md | 1 - changelog.d/changed-price-table-2026-11-09.md | 1 - changelog.d/fixed-dashboard-scroll-stabilizer.md | 1 - changelog.d/fixed-forge-unreachable-heartbeat.md | 1 - .../fixed-merge-train-duplicate-per-base.md | 1 - changelog.d/fixed-settled-open-chevron-tint.md | 1 - 7 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/changed-merge-queue-icon.md delete mode 100644 changelog.d/changed-price-table-2026-11-09.md delete mode 100644 changelog.d/fixed-dashboard-scroll-stabilizer.md delete mode 100644 changelog.d/fixed-forge-unreachable-heartbeat.md delete mode 100644 changelog.d/fixed-merge-train-duplicate-per-base.md delete mode 100644 changelog.d/fixed-settled-open-chevron-tint.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 7679846ab6..5a06e3c4e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,20 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.211.1) + +### Changed + +- Activity Monitor: the **Merge queue** column header, its chevron, the merge-train chip and the Merge queue popover now wear a "merge" traffic-sign glyph (an up arrow with a lane curving in from the lower right, like the W4-1 road sign) instead of the railcar, which read as a tram front. Same inline SVG, `currentColor`, hover *Merge queue*. +- Refreshed the model list-price table from OpenRouter (3 rows moved; list prices as of 2026-11-09); the Cost panel estimate now uses the new rates. The `kimi-k3` row keeps its prior value: the OpenRouter quote (0.192 in / 16.00 out) is a catalogue anomaly the reconciler's plausibility guard now holds for review. + +### Fixed + +- Dashboard: the page no longer drifts away from the section you are reading when other panels grow or shrink. A ResizeObserver-driven scroll stabilizer now pins the topmost visible section (or agent card) across every repaint path, not just the main status render. +- An unreachable GitHub (Enterprise) host no longer makes every hub heartbeat stale: the github_auth health probe now runs under its own 3s sub-budget, reports its last cached result, and the heartbeat carries a new `forge_unreachable` field; the fleet-stats collector backs off exponentially up to 15 minutes during a forge outage and logs one WARN when it starts failing and one INFO on recovery instead of a WARN per retry ([#17427](https://github.com/hivecommons/hive/issues/17427)). +- The merge train's one-PR-per-issue rule now groups candidates by base branch, so the same fix opened against two release lines (v5 and v6, both `Fixes #N`) is no longer held as a duplicate and shown as "needs human decision"; the same-issue claim-conflict pass likewise ignores claimants on another base branch. Two PRs for one issue on the same line still compete as before ([#17436](https://github.com/hivecommons/hive/issues/17436)). +- Activity Monitor: while CI or review runs, the stage chevron keeps its neutral settled-current fill — the Open-column draft / blocked / New / stale tints no longer paint a second coloured chevron beside the running track (a draft PR with no stage read as slate Open + amber CI). + ## 2026-11-09 (v5.211.0) ### Added diff --git a/changelog.d/changed-merge-queue-icon.md b/changelog.d/changed-merge-queue-icon.md deleted file mode 100644 index 7f42ca6e19..0000000000 --- a/changelog.d/changed-merge-queue-icon.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: the **Merge queue** column header, its chevron, the merge-train chip and the Merge queue popover now wear a "merge" traffic-sign glyph (an up arrow with a lane curving in from the lower right, like the W4-1 road sign) instead of the railcar, which read as a tram front. Same inline SVG, `currentColor`, hover *Merge queue*. diff --git a/changelog.d/changed-price-table-2026-11-09.md b/changelog.d/changed-price-table-2026-11-09.md deleted file mode 100644 index 6ca50ecb22..0000000000 --- a/changelog.d/changed-price-table-2026-11-09.md +++ /dev/null @@ -1 +0,0 @@ -- Refreshed the model list-price table from OpenRouter (3 rows moved; list prices as of 2026-11-09); the Cost panel estimate now uses the new rates. The `kimi-k3` row keeps its prior value: the OpenRouter quote (0.192 in / 16.00 out) is a catalogue anomaly the reconciler's plausibility guard now holds for review. diff --git a/changelog.d/fixed-dashboard-scroll-stabilizer.md b/changelog.d/fixed-dashboard-scroll-stabilizer.md deleted file mode 100644 index e3f8e808a5..0000000000 --- a/changelog.d/fixed-dashboard-scroll-stabilizer.md +++ /dev/null @@ -1 +0,0 @@ -- Dashboard: the page no longer drifts away from the section you are reading when other panels grow or shrink. A ResizeObserver-driven scroll stabilizer now pins the topmost visible section (or agent card) across every repaint path, not just the main status render. diff --git a/changelog.d/fixed-forge-unreachable-heartbeat.md b/changelog.d/fixed-forge-unreachable-heartbeat.md deleted file mode 100644 index d8e9059562..0000000000 --- a/changelog.d/fixed-forge-unreachable-heartbeat.md +++ /dev/null @@ -1 +0,0 @@ -- An unreachable GitHub (Enterprise) host no longer makes every hub heartbeat stale: the github_auth health probe now runs under its own 3s sub-budget, reports its last cached result, and the heartbeat carries a new `forge_unreachable` field; the fleet-stats collector backs off exponentially up to 15 minutes during a forge outage and logs one WARN when it starts failing and one INFO on recovery instead of a WARN per retry ([#17427](https://github.com/hivecommons/hive/issues/17427)). diff --git a/changelog.d/fixed-merge-train-duplicate-per-base.md b/changelog.d/fixed-merge-train-duplicate-per-base.md deleted file mode 100644 index d6bb9e2916..0000000000 --- a/changelog.d/fixed-merge-train-duplicate-per-base.md +++ /dev/null @@ -1 +0,0 @@ -- The merge train's one-PR-per-issue rule now groups candidates by base branch, so the same fix opened against two release lines (v5 and v6, both `Fixes #N`) is no longer held as a duplicate and shown as "needs human decision"; the same-issue claim-conflict pass likewise ignores claimants on another base branch. Two PRs for one issue on the same line still compete as before ([#17436](https://github.com/hivecommons/hive/issues/17436)). diff --git a/changelog.d/fixed-settled-open-chevron-tint.md b/changelog.d/fixed-settled-open-chevron-tint.md deleted file mode 100644 index 055c1dc98b..0000000000 --- a/changelog.d/fixed-settled-open-chevron-tint.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: while CI or review runs, the stage chevron keeps its neutral settled-current fill — the Open-column draft / blocked / New / stale tints no longer paint a second coloured chevron beside the running track (a draft PR with no stage read as slate Open + amber CI). From ed4d55b20a659f9afe18b1cb2b57f1d41479100a Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 23:00:48 +0000 Subject: [PATCH 074/123] =?UTF-8?q?=F0=9F=90=9B=20fix(hub):=20label=20forg?= =?UTF-8?q?e-unreachable=20hives=20by=20host=20instead=20of=20generic=20st?= =?UTF-8?q?ale=20badges=20(#17441)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(hub): label forge-unreachable hives by host instead of generic stale badges A spoke whose pod cannot reach its GitHub host now reports forge_unreachable in its heartbeat. The pod is healthy; the break is egress to the forge. Previously the hub showed generic failing-check / stale-advisory badges and counted the resulting github_auth failure and stale stats against the hive's health. The hub now records the flag on the registry entry, exposes it (and a 'forge unreachable (host)' label) on the hive rows, renders that label instead of the generic pills, and skips the health/advisory/alert penalties for it. Old spokes omit the field and behave as before. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 fix(hub): share the amber pill markup so the style ratchet stays at baseline Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 📖 docs(hub): document the ForgeUnreachable advisory gate and harden the pill title Review follow-ups for #17441: - advisory-staleness.md: add the ForgeUnreachable gate note and a suppression-matrix row, so operators can find why a forge-unreachable hive shows no stale-advisory pill (#17433). - dashboard.html: amberNudgePill now escapes its title attribute with escAttr() instead of esc(); hardening only, the current callers pass hub-computed strings. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 fix(hub): keep non-auth failing checks and the stale gate on forge-unreachable beats Review follow-ups for #17441: - dashboard.html replaced the whole failing-check pill with the forge-unreachable pill, hiding e.g. a failing disk check while the alert feed still reported it. failingChecks now mirrors withoutForgeChecks (drops only github_auth when forgeUnreachableLabel is set) and the two pills render side by side. - hiveHealthBase cleared StatsStale on ForgeUnreachable beats, asserting health from cached stats. The stale gate is kept; it now names the forge as the cause ("heartbeat stats stale (forge unreachable)"). Tests split into fresh-beat-not-penalised and stale-beat-stays-unknown. Hive-Fix-Attempt: 2/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 fix(hub): blank the forge-unreachable label once a hive goes offline Review follow-ups for #17441: - forgeUnreachableLabel now returns "" when the hive is offline, mirroring advisoryStale. markStaleHives flips Online=false but leaves the last beat's ForgeUnreachable set, so a hive that stopped beating kept rendering 'forge unreachable (host)' with a 'hive itself is healthy' tooltip on an offline row. Gating in Go keeps the API and dashboard on one rule; the dashboard comment now says why fuPill is not re-gated on h.online. - Move ForgeUnreachableLabel below the AdvisoryStale/AdvisoryStaleReason pair so it no longer reads as covered by that pair's doc comment. Hive-Fix-Attempt: 3/6 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../fixed-hub-forge-unreachable-badge.md | 1 + src/docs/advisory-staleness.md | 6 ++ src/docs/api-reference/hub-server.md | 58 ++++++------- src/pkg/hub/advisory_staleness.go | 3 + src/pkg/hub/alerts.go | 7 ++ src/pkg/hub/assets/dashboard.html | 37 +++++++-- src/pkg/hub/forge_unreachable.go | 31 +++++++ src/pkg/hub/forge_unreachable_test.go | 81 +++++++++++++++++++ src/pkg/hub/health_verdict.go | 11 +++ src/pkg/hub/heartbeat.go | 1 + src/pkg/hub/saas_hives_api.go | 8 ++ src/pkg/hub/server.go | 9 ++- 12 files changed, 215 insertions(+), 38 deletions(-) create mode 100644 changelog.d/fixed-hub-forge-unreachable-badge.md create mode 100644 src/pkg/hub/forge_unreachable.go create mode 100644 src/pkg/hub/forge_unreachable_test.go diff --git a/changelog.d/fixed-hub-forge-unreachable-badge.md b/changelog.d/fixed-hub-forge-unreachable-badge.md new file mode 100644 index 0000000000..e67ea35bbf --- /dev/null +++ b/changelog.d/fixed-hub-forge-unreachable-badge.md @@ -0,0 +1 @@ +- hub: hives whose spoke reports `forge_unreachable` are labelled "forge unreachable (github_host)" instead of generic stale badges, and the condition no longer counts against their health or advisory status diff --git a/src/docs/advisory-staleness.md b/src/docs/advisory-staleness.md index 15e37f3a75..e9010d1411 100644 --- a/src/docs/advisory-staleness.md +++ b/src/docs/advisory-staleness.md @@ -15,6 +15,11 @@ never re-derives it. ## The gates +0. **Forge unreachable** — a beat carrying `ForgeUnreachable` is never stale, + whatever the digest's age or error. The spoke cannot reach its GitHub host + from the pod, so an ageing digest is a symptom of the egress fault rather + than a wedge of its own; the row shows a `forge unreachable (github_host)` + pill instead (#17433). 1. **Participation** — no post time *and* no error means "not an advisory hive (or a spoke too old to report)". Unknown, never stale. 2. **Reported error** — flagged with its cause, unless the App is still @@ -49,6 +54,7 @@ never re-derives it. | Pure PR/merge hive | Suppressed | Suppressed | unchanged (expected suppression) | | Every agent paused or off-schedule, digest ageing | Flagged stale — the pause itself lit the pill | Suppressed — no agents, no findings, no digest | Gate 3 (`allAgentsQuietByDesign`, #4528); counted as `hidden_stale` in diagnostics | | Spoke heartbeat collect timed out, beat carries cached/minimal stats (`statsStale`) | `advisory-stale` alert raised from the last-good `advisoryLastPostedAt` while fresh digests were posting | No fleet alert — the post time is not a fresh observation | The hub alert rule skips `StatsStale` beats (#12842); health verdict already reads "heartbeat stats stale" | +| Spoke cannot reach its GitHub host from the pod (`ForgeUnreachable`) | Generic stale pills lit the row while the real fault was cluster egress | No stale-advisory pill — the row shows `forge unreachable (github_host)` instead | `advisoryStale` returns early on `ForgeUnreachable` beats (#17433) | ## Diagnostics diff --git a/src/docs/api-reference/hub-server.md b/src/docs/api-reference/hub-server.md index 40f12e74f3..91265f4c73 100644 --- a/src/docs/api-reference/hub-server.md +++ b/src/docs/api-reference/hub-server.md @@ -33,39 +33,39 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | `GET` | `/api/hub/clusters` | Hub auth | List Clusters | `pkg/hub/saas.go:531` | | `GET` | `/api/hub/image-pulls` | Hub auth | Per-Release Image Pull Series | `pkg/hub/saas.go:377` | | `GET` | `/api/reach` | Hub admin | PR Reach Report (?pr=NNN or ?recent=K) | `pkg/hub/saas.go:522` | -| `GET` | `/fleet` | Hub handler-specific | My-Hives Fleet Page (static; data via `/api/saas/my-hives`) | `pkg/hub/server.go:1774` | -| `GET` | `/my-hives` | Hub handler-specific | 301 redirect to `/fleet` (query preserved) | `pkg/hub/server.go:1775` | +| `GET` | `/fleet` | Hub handler-specific | My-Hives Fleet Page (static; data via `/api/saas/my-hives`) | `pkg/hub/server.go:1780` | +| `GET` | `/my-hives` | Hub handler-specific | 301 redirect to `/fleet` (query preserved) | `pkg/hub/server.go:1781` | | `GET` | `/activity` | Signed-in user | Fleet activity page ([#16063](https://github.com/hivecommons/hive/issues/16063)): read-only, data-free shell that polls `/api/hub/activity` every 15 s with `If-None-Match`. No session → `307` to `/login`; blocked user → `403`. Own Content-Security-Policy (scripts and styles from `'self'` only, `script-src-attr`/`style-src-attr` `'none'`), `Cache-Control: no-cache` + content `ETag`. See [Hub Fleet activity page](../hub-fleet-activity.md) | `pkg/hub/activity_page.go` | | `GET` | `/activity/public` | Public | Public-safe Fleet activity page ([#15966](https://github.com/hivecommons/hive/issues/15966)): the same data-free shell as `/activity`, served without a session; on this path the page polls `/api/hub/activity/public` with `credentials: 'omit'`. Source of the `twitch.tv/hivecommonsfleet` broadcast. Same CSP and cache headers as `/activity`. See [Hub Fleet activity page](../hub-fleet-activity.md#public-safe-view) | `pkg/hub/activity_public.go` | | `GET` | `/activity/assets/{name}` | Public | The shared tracker assets the Fleet activity page loads, byte-identical: the row asset (`pkg/webassets/trackerrow`, [#16062](https://github.com/hivecommons/hive/issues/16062)) and the `am.*` URL-view and display-playlist helpers (`pkg/webassets/trackerview`, [#16064](https://github.com/hivecommons/hive/issues/16064)); only names in `trackerrow.Files` or `trackerview.Files`, else `404`. `Cache-Control: no-cache` + content `ETag` | `pkg/hub/activity_page.go` | -| `POST` | `/api/shared-agent-pool/leases` | Hub handler-specific | Acquire or renew a shared CLI session lease | `pkg/hub/server.go:1709` | -| `PUT` | `/api/shared-agent-pool/leases` | Hub handler-specific | Renew an active shared CLI session lease | `pkg/hub/server.go:1710` | -| `DELETE` | `/api/shared-agent-pool/leases` | Hub handler-specific | Release a shared CLI session lease | `pkg/hub/server.go:1711` | -| `POST` | `/api/heartbeat` | Hub handler-specific | Heartbeat. A request carrying `X-Hive-Activity-Update` is an activity-only update ([#15963](https://github.com/hivecommons/hive/issues/15963)): body `{"activity_update":{"hive_id","activity"}}`, the same per-hive bearer, accepted only for a hive already in the registry (`404` otherwise); it replaces the in-memory activity digest and nothing else, and the signed response carries `ok`, `activity_etag` and `activity_events_ack` (the highest activity event sequence number the hub holds for the hive, [#15964](https://github.com/hivecommons/hive/issues/15964); full heartbeat responses carry it too) | `pkg/hub/server.go:1712` | -| `POST` | `/api/task-status` | Hub handler-specific | Task Status | `pkg/hub/server.go:1713` | -| `GET` | `/api/registry` | Hub handler-specific | Registry | `pkg/hub/server.go:1721` | -| `GET` | `/api/hub/leaderboard` | Hub handler-specific | Leaderboard | `pkg/hub/server.go:1722` | -| `GET` | `/api/hub/stats` | Hub handler-specific | Stats | `pkg/hub/server.go:1723` | -| `GET` | `/api/fleet-stats` | Hub handler-specific | Fleet Stats | `pkg/hub/server.go:1724` | +| `POST` | `/api/shared-agent-pool/leases` | Hub handler-specific | Acquire or renew a shared CLI session lease | `pkg/hub/server.go:1715` | +| `PUT` | `/api/shared-agent-pool/leases` | Hub handler-specific | Renew an active shared CLI session lease | `pkg/hub/server.go:1716` | +| `DELETE` | `/api/shared-agent-pool/leases` | Hub handler-specific | Release a shared CLI session lease | `pkg/hub/server.go:1717` | +| `POST` | `/api/heartbeat` | Hub handler-specific | Heartbeat. A request carrying `X-Hive-Activity-Update` is an activity-only update ([#15963](https://github.com/hivecommons/hive/issues/15963)): body `{"activity_update":{"hive_id","activity"}}`, the same per-hive bearer, accepted only for a hive already in the registry (`404` otherwise); it replaces the in-memory activity digest and nothing else, and the signed response carries `ok`, `activity_etag` and `activity_events_ack` (the highest activity event sequence number the hub holds for the hive, [#15964](https://github.com/hivecommons/hive/issues/15964); full heartbeat responses carry it too) | `pkg/hub/server.go:1718` | +| `POST` | `/api/task-status` | Hub handler-specific | Task Status | `pkg/hub/server.go:1719` | +| `GET` | `/api/registry` | Hub handler-specific | Registry | `pkg/hub/server.go:1727` | +| `GET` | `/api/hub/leaderboard` | Hub handler-specific | Leaderboard | `pkg/hub/server.go:1728` | +| `GET` | `/api/hub/stats` | Hub handler-specific | Stats | `pkg/hub/server.go:1729` | +| `GET` | `/api/fleet-stats` | Hub handler-specific | Fleet Stats | `pkg/hub/server.go:1730` | | `GET` | `/api/hub/evidence` | Hub admin | Read-only cross-hive evidence drill-down from each spoke's stored heartbeat `evidence` summary ([#12116](https://github.com/hivecommons/hive/issues/12116)); non-admins get `403`. Returns `spokes`, `reporting`, pooled `calibration` (bucket 0–5 → `{n, bad, rate, lo, hi}`; the hub view folds the six buckets into four reviewer-confidence ranges), `findings[]` (the plain-language *What this says* sentences, generated from the same fields; [#12456](https://github.com/hivecommons/hive/issues/12456)), `by_acmm_level` (`level`, `hives`, `merged_90d`, `revert_rate`, and `time_to_merge` — `median_of_hive_medians_s`, `hives`, `n` — the median of the level's per-hive median time-to-merge, omitted when no hive at the level reports one; [#12464](https://github.com/hivecommons/hive/issues/12464)), `family_false_approve_rate` (`same`/`cross`/`mixed`, hives classed by their reviewer vs author family sets), fleet `record_coverage` (merged PRs with an evidence record over `prs_merged_90d`), fleet panels ([#12370](https://github.com/hivecommons/hive/issues/12370)) `outcomes_by_author_kind[]` (`kind`, `hives`, `n`, `merged`, `reverted`, `merge_rate`, `revert_rate`), `write_counters[]` (`tier`, `hives`, `attempted`, `blocked`, `block_rate`) and `shadow_gate` (`review_gate` / `intent` → `held` / `passed` outcomes with `revert_rate`), each omitted while no spoke reports it and repeated per `by_acmm_level[]` row, and per hive `hives[]` with `acmm_level`, `prs_merged_90d`, `record_coverage`, `family_mix`, false-approve / false-block / revert rates, families, a calibration series the raw `counts` behind them (including `by_author_kind`) so the drill-down can re-pool a hive / ACMM-level selection client-side, and `criteria[]`: the per-axis criteria table derived hub-side from the quadrant criteria (`axis`, `label`, `scored`, `criteria[]` with `name`, `label`, `status` `met`/`unmet`/`not_reported`, `display`/`score` when measured, `reason` otherwise; offline, evidence-less or unscored hives are `not_reported`, never `unmet`; [#12463](https://github.com/hivecommons/hive/issues/12463)). Every rate is `{n, rate, lo, hi}` with a 95% Wilson interval; `rate`/`lo`/`hi` are null when `n` < 10. Window selection ([RFC #12062](https://github.com/hivecommons/hive/issues/12062)): `?hours=24|168|720` pools each hive's matching heartbeat `windows` block instead of its 90-day block (any other or absent `hours` → 90 days); `?from=YYYY-MM-DD|RFC3339[&to=…]` (date-only `to` is inclusive, `to` defaults to now, `to` ≥ `from`, span ≤ 366 days, else `400`) is served from the smallest reported window that reaches back to `from` and flagged `window.approximate`. The response carries `window` (`hours`, `key`, `label`, `from`, `to`, `approximate`, `coverage_available` — `record_coverage` is only computed for the 90-day window because `prs_merged_90d` is a 90-day count), `window_unreported` and per-hive `window_unreported` for hives whose spoke predates per-window reporting. `?hive=[,…]` (repeatable) and `?level=` restrict the registry server-side to those hives / that ACMM level before pooling. Hub admins open it from the Fleet quadrant card or its **🔬 Evidence** button ([#12117](https://github.com/hivecommons/hive/issues/12117)), pick a window (24h / 7d / 30d / 90d / custom), filter it by hive and ACMM level and read each section's ⓘ explainer; the per-hive author-kind revert counts behind the *Revert rate by author kind* panel are `hives[].counts.by_author_kind` ([#12326](https://github.com/hivecommons/hive/issues/12326)). Never consulted by merge decisions | `pkg/hub/evidence.go` | | `GET` | `/api/hub/evidence/report` | Hub admin | Plain-language report of the hub evidence view ([#12456](https://github.com/hivecommons/hive/issues/12456)), rendered server-side from the same `EvidenceView` as `/api/hub/evidence` so every figure reconciles with the modal; non-admins get `403`. Same `hours=` / `from=` / `to=` window and `hive=` / `level=` filter parameters. `format=md` (default, `text/markdown`) or `format=html` (standalone page, inline CSS, no scripts or external assets, hive names escaped); any other value → `400`. `download=1` sets `Content-Disposition: attachment; filename="hive-evidence---.md|html"`, otherwise inline. Sections: Summary (the generated findings), What we measured and why, The numbers, How to read these, What is not reported yet and why, Grade per section, footer link to `review-evidence.md`. `Cache-Control: no-store`. Read-only; never consulted by merge decisions | `pkg/hub/evidence_report.go` | | `GET` | `/api/hub/activity` | Signed-in user | Read-only hub-wide activity view ([#15951](https://github.com/hivecommons/hive/issues/15951), RFC [#15861](https://github.com/hivecommons/hive/issues/15861)) merged from each spoke's heartbeat `activity` digest, held in hub memory only. Authorization is per user and per hive before aggregation: hub admins see every registered hive; everyone else only hives they own or hold an unexpired grant for; anonymous → `401`. Returns `hives[]` (`hive_id`, `name`, `status` `ok`/`stale`/`not_reporting`/`missing`, `reporting`, `stale` once the block is older than two heartbeats, `last_heartbeat`, `received_at`, `generated_at`, `totals` — `items`, `by_stage`, `by_modifier`, counting private and truncated items too — `truncated` and `events_dropped`), `items[]` (`hive_id`, `repo`, `n`, `kind`, `title`, `author_kind`, `stage`, `stage_n`, `since`, `mods`, `private`) ordered needs-human/needs-decision, stalled, furthest stage, oldest, a response-level `truncated` (cap 2000), and `events[]` ([#15964](https://github.com/hivecommons/hive/issues/15964): `hive_id`, `received_at`, `seq`, `type` `opened`/`stage`/`merged`, `repo`, `n`, `kind`, `title`, `from`, `stage`, `at`, `private`), oldest first, from a fleet-wide in-memory ring of at most 1,000 events, none held longer than 24 hours (ageing out is not counted in `events_dropped`; when full, the oldest event of the hive holding the most events is dropped, counted in that hive's `events_dropped`, so one hive cannot evict the others' events). Events are filtered per user and per hive exactly like items, before aggregation, so an event for a hive the viewer cannot see is never delivered; `mod`/`author_kind` filters keep only events whose item is still on the hive's board. A spoke block carries at most 200 events; drops are disclosed per hive as `events_dropped`. New events change the `ETag`. Each digest carries at most 100 items by default and never more than the 250-item hub ceiling; private-repository items appear only when the spoke opts in. Filters: `hive`, `repo`, `stage`, `mod`, `author_kind`, `q` (title substring or `#`), each ≤ 200 characters (else `400`). `ETag` + `If-None-Match` → `304`; `Cache-Control: private, no-cache`, `Vary: Cookie, Authorization`. No actions | `pkg/hub/activity.go` | | `GET` | `/api/hub/activity/public` | Public | Public-safe activity view ([#15966](https://github.com/hivecommons/hive/issues/15966)): the `/api/hub/activity` shape for anyone, never reading a cookie, token or `Authorization` header (credentials do not change the response). Only hives the registry lists as public on github.com, and only items and events not marked `private`; `totals`, per-hive `truncated` and `events_dropped`, hive owners and per-user grants are omitted. Same filters (`400` on an invalid one). The body is built at most once per 2 s per parsed filter and shared by every anonymous caller, so rows, `generated_at` and the `ETag` change at most every 2 s; query strings that parse to the default view share one entry. Toggling a hive's visibility drops the cache at once. `ETag` + `If-None-Match` → `304`; `Cache-Control: no-cache` | `pkg/hub/activity_public.go` | -| `GET` | `/api/hub/version` | Hub handler-specific | Hub Version | `pkg/hub/server.go:1732` | -| `DELETE` | `/api/hub/registry/{id}` | Hub handler-specific | Registry Delete | `pkg/hub/server.go:1742` | -| `POST` | `/api/contribute/register` | Hub handler-specific | Contribute Proxy | `pkg/hub/server.go:1743` | -| `GET` | `/api/contribute/status` | Hub handler-specific | Contribute Status | `pkg/hub/server.go:1744` | -| `GET` | `/api/contribute/ws` | Hub handler-specific | Contribute WSProxy | `pkg/hub/server.go:1745` | -| `POST` | `/api/github/webhook` | Hub handler-specific | GitHub Webhook | `pkg/hub/server.go:1746` | -| `GET` | `/gh-setup` | Hub handler-specific | GitHub App Setup Router | `pkg/hub/server.go:1747` | -| `GET` | `/learn` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1748` | -| `GET` | `/get-started` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1749` | -| `GET` | `/api/docs` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1752` | -| `GET` | `/api/reading-list` | Hub handler-specific | Reading List | `pkg/hub/server.go:1755` | -| `GET` | `/reading` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1756` | -| `GET` | `/cncf-reference-architecture` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1763` | -| `GET` | `/cncf-reference-architecture/console` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1764` | -| `GET` | `/cncf-reference-architecture/bluefin` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1765` | -| `GET` | `/{$}` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1782` | -| `GET` | `/og-card.png` | Hub handler-specific | OGCard | `pkg/hub/server.go:1787` | -| `GET` | `/` | Public | Static asset fallback (`http.FileServerFS` over the embedded `static/` tree) for any path no other route claims | `pkg/hub/server.go:1789` | +| `GET` | `/api/hub/version` | Hub handler-specific | Hub Version | `pkg/hub/server.go:1738` | +| `DELETE` | `/api/hub/registry/{id}` | Hub handler-specific | Registry Delete | `pkg/hub/server.go:1748` | +| `POST` | `/api/contribute/register` | Hub handler-specific | Contribute Proxy | `pkg/hub/server.go:1749` | +| `GET` | `/api/contribute/status` | Hub handler-specific | Contribute Status | `pkg/hub/server.go:1750` | +| `GET` | `/api/contribute/ws` | Hub handler-specific | Contribute WSProxy | `pkg/hub/server.go:1751` | +| `POST` | `/api/github/webhook` | Hub handler-specific | GitHub Webhook | `pkg/hub/server.go:1752` | +| `GET` | `/gh-setup` | Hub handler-specific | GitHub App Setup Router | `pkg/hub/server.go:1753` | +| `GET` | `/learn` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1754` | +| `GET` | `/get-started` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1755` | +| `GET` | `/api/docs` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1758` | +| `GET` | `/api/reading-list` | Hub handler-specific | Reading List | `pkg/hub/server.go:1761` | +| `GET` | `/reading` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1762` | +| `GET` | `/cncf-reference-architecture` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1769` | +| `GET` | `/cncf-reference-architecture/console` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1770` | +| `GET` | `/cncf-reference-architecture/bluefin` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1771` | +| `GET` | `/{$}` | Hub handler-specific | Static HTML page | `pkg/hub/server.go:1788` | +| `GET` | `/og-card.png` | Hub handler-specific | OGCard | `pkg/hub/server.go:1793` | +| `GET` | `/` | Public | Static asset fallback (`http.FileServerFS` over the embedded `static/` tree) for any path no other route claims | `pkg/hub/server.go:1795` | diff --git a/src/pkg/hub/advisory_staleness.go b/src/pkg/hub/advisory_staleness.go index fa71d7e717..245ef415ba 100644 --- a/src/pkg/hub/advisory_staleness.go +++ b/src/pkg/hub/advisory_staleness.go @@ -193,6 +193,9 @@ func carryAdvisoryPostTime(entry *RegistryEntry, prev RegistryEntry) { // returns false — never a false alarm — matching the rule the codebase already // applies to StartedAt and GitHubAPIURL. func advisoryStale(e RegistryEntry, now time.Time) (stale bool, reason string) { + if e.ForgeUnreachable { + return false, "" + } return advisoryStaleFromFreshness(e, advisoryFreshnessFor(e, now)) } diff --git a/src/pkg/hub/alerts.go b/src/pkg/hub/alerts.go index b759598fb4..dd0f65f465 100644 --- a/src/pkg/hub/alerts.go +++ b/src/pkg/hub/alerts.go @@ -637,6 +637,9 @@ type alertHive struct { // key material. InferenceAuthError string + // ForgeUnreachable exempts the github_auth check from the failing-check rule. + ForgeUnreachable bool + // GitHubAppRequired / GitHubAppState are the spoke's own report of whether // its config demands App auth and, when App auth is failing, WHY (the // github.AppAuthState wire token). Carried verbatim: the spoke owns the @@ -692,6 +695,7 @@ func alertHiveFromEntry(h MyHiveEntry) alertHive { InactiveAgentsReason: h.InactiveAgentsReason, InferenceAuthError: h.InferenceAuthError, + ForgeUnreachable: h.ForgeUnreachable, GitHubAppRequired: h.GitHubAppRequired, GitHubAppState: h.GitHubAppState, @@ -1141,6 +1145,9 @@ func evaluateAlertsInFleet(state *alertState, hives, fleet []alertHive, driftAle // seeded with a placeholder org/repo, which the check flags by design // until the slot is claimed (#12843). failing := failingHealthChecks(h.Health) + if h.ForgeUnreachable { + failing = withoutForgeChecks(failing) + } if h.IsPlaceholder { failing = withoutAuthClassChecks(failing, h.ProvStatus == statusAvailable) } diff --git a/src/pkg/hub/assets/dashboard.html b/src/pkg/hub/assets/dashboard.html index b4aa0af25f..220d0efbad 100644 --- a/src/pkg/hub/assets/dashboard.html +++ b/src/pkg/hub/assets/dashboard.html @@ -3847,7 +3847,15 @@

    '; } + /* forgeUnreachableSummary renders the hub-computed "forge unreachable (host)" + label (h.forgeUnreachableLabel). Amber: the pod is healthy, the cluster's + egress to the forge is not. */ + function forgeUnreachableSummary(h) { + if (!h || !h.forgeUnreachableLabel) return ''; + return amberNudgePill('The spoke cannot reach its GitHub host from the pod; the hive itself is healthy', h.forgeUnreachableLabel); + } + + /* amberNudgePill is the shared "worth noticing, not a row failure" pill used + by the stale-advisory and forge-unreachable summaries. */ + function amberNudgePill(title, label) { + var col = '#d29922'; + return '' + + esc(label) + ''; + } + /* advisoryStaleSummary renders a small "stale advisory" pill next to the failing-check pill when the hub has flagged this hive's advisory digest as stale. The flag (h.advisoryStale) and its reason are computed server-side @@ -3891,12 +3917,7 @@

    ' + - 'stale advisory'; + return amberNudgePill(h.advisoryStaleReason || 'Advisory digest has gone stale', 'stale advisory'); } /* advisoryFindingsSummary renders the finding count from this hive's last @@ -9530,7 +9551,7 @@

    ' + bulkCheckboxCell(h, section || 'all') + '' + ('⋮' + pendingBadge + '') + '' + - '' + (function() { var isHostedRow = h.hiveType === 'hosted' || (h.id && (h.id.startsWith('hosted-') || h.id.startsWith('saas-'))); var dh = isHostedRow && h.id ? ('/api/saas/hives/' + encodeURIComponent(h.id) + '/open') : (rb ? esc(rb) : ''); /* Label derived from the PROJECT (org + primary repo), not by splitting h.name — see hiveLabel. */ var label = hiveLabel(h); var orgName = label.line1; var repoName = label.line2; /* rp is the repo path shown in the GitHub-icon tooltip; use the same doubling-safe path the label shows (repoDisplayLine / hiveLabel), never org + '/' + primaryRepo which doubles the owner on a github.io/GHE hive whose primaryRepo is already 'owner/repo'. */ var rp = repoName || ''; /* The icon href must resolve to a real GitHub path. When primaryRepo already carries 'owner/repo', that pair IS the owner/repo the URL needs (not org, which may be a mis-parsed host); otherwise fall back to org + primaryRepo. */ var hasRepoPath = h.primaryRepo && h.primaryRepo.indexOf('/') !== -1; var rpOwner = hasRepoPath ? h.primaryRepo.split('/')[0] : h.org; var rpName = hasRepoPath ? h.primaryRepo.split('/').slice(1).join('/') : h.primaryRepo; var rpHref = ghRepoURL(hiveForgeHost(h), rpOwner, rpName); var ghIcon = (rp && rpHref) ? '' : (rp ? '' : ''); /* vanityDisplay is the friendly host shown in the status bar on hover. rb is resolvedBase(h), which the hub has already overlaid with the claimed vanity_url; it is only a DISPLAY url here, never the click target — see ssoDisplayLink. Empty for a row with no vanity host, which falls back to today's /open href. Only meaningful on hosted rows: a non-hosted row's dh IS rb already. */ var vanityDisplay = isHostedRow && rb ? rb : ''; var link = function(text, bold) { if (dh) { return ssoDisplayLink(dh, vanityDisplay, text, bold ? 'hive-name-link' : 'hive-sub-link'); } var s = bold ? 'font-weight:700;color:inherit' : 'color:#6b7280;font-weight:400'; return '' + esc(text) + ''; }; /* repoLink wraps the second line (the org/repo) in a link to the ACTUAL FORGE REPO (github.com / GHE host), NOT the spoke dashboard: the top line already opens the dashboard, so the repo path should take an operator to the code. rpHref is the same doubling-safe forge URL the GitHub icon uses (ghRepoURL(hiveForgeHost(h), rpOwner, rpName)); when it is empty (BYO/mis-parsed host) fall back to plain non-link text, never to the dashboard. */ var repoLink = function(text) { if (rpHref) { return '' + esc(text) + ''; } return '' + esc(text) + ''; }; var line1 = dot + ' ' + link(orgName, true) + heartbeatHeart(h) + nameEditAffordance(h); var fcPill = h.online ? failingCheckSummary(h) : ''; /* Advisory-staleness pill sits right beside the failing-check pill: both are "something is quietly wrong with this working hive" signals, and advisoryStaleSummary already self-suppresses (empty string) unless the hub flagged the digest stale, so unaffected rows are pixel-identical. */ var advPill = h.online ? advisoryStaleSummary(h) : ''; /* Advisory finding-count pill rides beside the staleness pill and carries the "(top N)" marker when the spoke capped its digest. */ var advCountPill = h.online ? advisoryFindingsSummary(h) : ''; /* Dead-link pill is deliberately NOT gated on h.online: the entire point is a hive that IS online and heartbeating while its public URL is broken, so gating it the way the other pills are gated would hide exactly the case it exists to surface. */ var dlPill = deadLinkSummary(h); var privatePill = privateURLSummary(h); /* Inference-auth pill: like the dead-link pill it is NOT gated on h.online, because the hive being online while every inference call 401s is exactly the case it surfaces. */ var iaPill = inferenceAuthSummary(h); var rsPill = restartStormSummary(h); /* Inline access faces sit on the name cell's second line, immediately after this row's own role badge: the badge already answers "what am I on this hive", so the co-members read as the natural continuation of the same thought, in the one cell that is left-aligned and has room to grow. It also keeps them out of the 16 dense metric columns, none of which is about people. Empty string when the viewer is the only member, so those rows are pixel-identical to today. */ var accessFaces = hiveAccessAvatars(h); /* Keyed off repoName, not orgName: line 1 now always carries SOME identity, so the presence of a second line is decided purely by whether there is a repo to put on it. Without a repo the row still shows the GitHub icon, role badge, faces and failing-check pill on the compact variant. */ var line2 = repoName ? '
    ' + repoLink(repoName) + ' ' + ghIcon + ' ' + roleBadge(h.role) + accessFaces + fcPill + advPill + advCountPill + dlPill + privatePill + iaPill + rsPill + '
    ' : '
    ' + ghIcon + ' ' + roleBadge(h.role) + accessFaces + fcPill + advPill + advCountPill + dlPill + privatePill + iaPill + rsPill + '
    '; var line3 = pendingPill ? '
    ' + pendingPill + '
    ' : ''; return line1 + line2 + line3; })() + '' + + '' + (function() { var isHostedRow = h.hiveType === 'hosted' || (h.id && (h.id.startsWith('hosted-') || h.id.startsWith('saas-'))); var dh = isHostedRow && h.id ? ('/api/saas/hives/' + encodeURIComponent(h.id) + '/open') : (rb ? esc(rb) : ''); /* Label derived from the PROJECT (org + primary repo), not by splitting h.name — see hiveLabel. */ var label = hiveLabel(h); var orgName = label.line1; var repoName = label.line2; /* rp is the repo path shown in the GitHub-icon tooltip; use the same doubling-safe path the label shows (repoDisplayLine / hiveLabel), never org + '/' + primaryRepo which doubles the owner on a github.io/GHE hive whose primaryRepo is already 'owner/repo'. */ var rp = repoName || ''; /* The icon href must resolve to a real GitHub path. When primaryRepo already carries 'owner/repo', that pair IS the owner/repo the URL needs (not org, which may be a mis-parsed host); otherwise fall back to org + primaryRepo. */ var hasRepoPath = h.primaryRepo && h.primaryRepo.indexOf('/') !== -1; var rpOwner = hasRepoPath ? h.primaryRepo.split('/')[0] : h.org; var rpName = hasRepoPath ? h.primaryRepo.split('/').slice(1).join('/') : h.primaryRepo; var rpHref = ghRepoURL(hiveForgeHost(h), rpOwner, rpName); var ghIcon = (rp && rpHref) ? '' : (rp ? '' : ''); /* vanityDisplay is the friendly host shown in the status bar on hover. rb is resolvedBase(h), which the hub has already overlaid with the claimed vanity_url; it is only a DISPLAY url here, never the click target — see ssoDisplayLink. Empty for a row with no vanity host, which falls back to today's /open href. Only meaningful on hosted rows: a non-hosted row's dh IS rb already. */ var vanityDisplay = isHostedRow && rb ? rb : ''; var link = function(text, bold) { if (dh) { return ssoDisplayLink(dh, vanityDisplay, text, bold ? 'hive-name-link' : 'hive-sub-link'); } var s = bold ? 'font-weight:700;color:inherit' : 'color:#6b7280;font-weight:400'; return '' + esc(text) + ''; }; /* repoLink wraps the second line (the org/repo) in a link to the ACTUAL FORGE REPO (github.com / GHE host), NOT the spoke dashboard: the top line already opens the dashboard, so the repo path should take an operator to the code. rpHref is the same doubling-safe forge URL the GitHub icon uses (ghRepoURL(hiveForgeHost(h), rpOwner, rpName)); when it is empty (BYO/mis-parsed host) fall back to plain non-link text, never to the dashboard. */ var repoLink = function(text) { if (rpHref) { return '' + esc(text) + ''; } return '' + esc(text) + ''; }; var line1 = dot + ' ' + link(orgName, true) + heartbeatHeart(h) + nameEditAffordance(h); var fcPill = h.online ? failingCheckSummary(h) : ''; /* Forge egress broken, pod healthy: the labelled pill replaces the stale-advisory pill and the github_auth entry (failingChecks already drops it), but any other failing check still renders beside it. Not re-gated on h.online here because the hub already blanks forgeUnreachableLabel for offline hives (forgeUnreachableLabel in Go), so the rule cannot drift between the API and this row. */ var fuPill = forgeUnreachableSummary(h); /* Advisory-staleness pill sits right beside the failing-check pill: both are "something is quietly wrong with this working hive" signals, and advisoryStaleSummary already self-suppresses (empty string) unless the hub flagged the digest stale, so unaffected rows are pixel-identical. */ var advPill = h.online && !fuPill ? advisoryStaleSummary(h) : ''; /* Advisory finding-count pill rides beside the staleness pill and carries the "(top N)" marker when the spoke capped its digest. */ var advCountPill = h.online ? advisoryFindingsSummary(h) : ''; /* Dead-link pill is deliberately NOT gated on h.online: the entire point is a hive that IS online and heartbeating while its public URL is broken, so gating it the way the other pills are gated would hide exactly the case it exists to surface. */ var dlPill = deadLinkSummary(h); var privatePill = privateURLSummary(h); /* Inference-auth pill: like the dead-link pill it is NOT gated on h.online, because the hive being online while every inference call 401s is exactly the case it surfaces. */ var iaPill = inferenceAuthSummary(h); var rsPill = restartStormSummary(h); /* Inline access faces sit on the name cell's second line, immediately after this row's own role badge: the badge already answers "what am I on this hive", so the co-members read as the natural continuation of the same thought, in the one cell that is left-aligned and has room to grow. It also keeps them out of the 16 dense metric columns, none of which is about people. Empty string when the viewer is the only member, so those rows are pixel-identical to today. */ var accessFaces = hiveAccessAvatars(h); /* Keyed off repoName, not orgName: line 1 now always carries SOME identity, so the presence of a second line is decided purely by whether there is a repo to put on it. Without a repo the row still shows the GitHub icon, role badge, faces and failing-check pill on the compact variant. */ var line2 = repoName ? '
    ' + repoLink(repoName) + ' ' + ghIcon + ' ' + roleBadge(h.role) + accessFaces + fuPill + fcPill + advPill + advCountPill + dlPill + privatePill + iaPill + rsPill + '
    ' : '
    ' + ghIcon + ' ' + roleBadge(h.role) + accessFaces + fuPill + fcPill + advPill + advCountPill + dlPill + privatePill + iaPill + rsPill + '
    '; var line3 = pendingPill ? '
    ' + pendingPill + '
    ' : ''; return line1 + line2 + line3; })() + '' + '' + locationCell + '' + '' + uptimeCell(h) + '' + /* No white-space:nowrap on the cell itself: the stacked lines each diff --git a/src/pkg/hub/forge_unreachable.go b/src/pkg/hub/forge_unreachable.go new file mode 100644 index 0000000000..17016f6102 --- /dev/null +++ b/src/pkg/hub/forge_unreachable.go @@ -0,0 +1,31 @@ +package hub + +import "strings" + +// forgeUnreachableLabel is the row label for a hive whose latest beat said the +// forge host cannot be reached from the pod; "" when it did not. Also "" once +// markStaleHives flips the hive offline: the flag is carried over from the last +// beat, and a hive that has stopped beating is not "healthy apart from forge +// egress" — the offline row must not claim it is. +func forgeUnreachableLabel(e RegistryEntry) string { + if !e.ForgeUnreachable || !e.Online { + return "" + } + if host := strings.TrimSpace(e.GitHubHost); host != "" { + return "forge unreachable (" + host + ")" + } + return "forge unreachable" +} + +// withoutForgeChecks drops the github_auth check, whose failure is a symptom +// of forge egress being down rather than of the hive being unhealthy. +func withoutForgeChecks(names []string) []string { + kept := names[:0:0] + for _, n := range names { + if n == healthCheckGitHubAuth { + continue + } + kept = append(kept, n) + } + return kept +} diff --git a/src/pkg/hub/forge_unreachable_test.go b/src/pkg/hub/forge_unreachable_test.go new file mode 100644 index 0000000000..242eed037b --- /dev/null +++ b/src/pkg/hub/forge_unreachable_test.go @@ -0,0 +1,81 @@ +package hub + +import ( + "testing" + "time" +) + +func TestForgeUnreachableLabel(t *testing.T) { + cases := []struct { + name string + e RegistryEntry + want string + }{ + {"host", RegistryEntry{Online: true, ForgeUnreachable: true, GitHubHost: "github.ibm.com"}, "forge unreachable (github.ibm.com)"}, + {"no host", RegistryEntry{Online: true, ForgeUnreachable: true}, "forge unreachable"}, + {"old spoke", RegistryEntry{Online: true, GitHubHost: "github.ibm.com"}, ""}, + {"offline", RegistryEntry{ForgeUnreachable: true, GitHubHost: "github.ibm.com"}, ""}, + } + for _, tc := range cases { + if got := forgeUnreachableLabel(tc.e); got != tc.want { + t.Errorf("%s: label = %q, want %q", tc.name, got, tc.want) + } + } +} + +func TestForgeUnreachable_NotCountedAgainstHealth(t *testing.T) { + e := RegistryEntry{ + ID: "h1", Online: true, ACMMLevel: 3, + GitHubAppState: "unreachable", GitHubAppRequired: true, + } + rollup := agentFleetRollup{Known: 1, Running: 1, Expected: 1} + app := GitHubAppHealth{Bucket: ghAppBucketBroken} + now := time.Now() + + before := hiveHealthFor(e, rollup, app, 0, now) + if before.State != HealthStateRed { + t.Fatalf("baseline broken-app beat should be red, got %q", before.State) + } + + e.ForgeUnreachable = true + after := hiveHealthFor(e, rollup, app, 0, now) + if after.State == HealthStateUnknown || after.State == HealthStateRed { + t.Fatalf("forge-unreachable hive must not be penalised, got %q (%s)", after.State, after.Reason) + } +} + +// A beat carrying both flags still has cached stats: the hub must not assert +// health from them, but it names the forge as the cause instead of a generic +// stale verdict. +func TestForgeUnreachable_StaleStatsStayUnknown(t *testing.T) { + e := RegistryEntry{ + ID: "h1", Online: true, StatsStale: true, ForgeUnreachable: true, ACMMLevel: 3, + } + rollup := agentFleetRollup{Known: 1, Running: 1, Expected: 1} + v := hiveHealthFor(e, rollup, GitHubAppHealth{Bucket: ghAppBucketOK}, 0, time.Now()) + if v.State != HealthStateUnknown { + t.Fatalf("stale stats must stay unknown even when forge unreachable, got %q", v.State) + } + if v.Reason != "heartbeat stats stale (forge unreachable)" { + t.Fatalf("reason = %q", v.Reason) + } +} + +func TestForgeUnreachable_NotStaleAdvisory(t *testing.T) { + e := advisoryModeEntry() + e.AdvisoryLastPostedAt = rfc3339Ago(30 * 24 * time.Hour) + if stale, _ := advisoryStale(e, advNow); !stale { + t.Fatal("baseline: aged digest should be stale") + } + e.ForgeUnreachable = true + if stale, reason := advisoryStale(e, advNow); stale { + t.Fatalf("forge-unreachable hive must not be stale-advisory, got %q", reason) + } +} + +func TestForgeUnreachable_WithoutForgeChecks(t *testing.T) { + got := withoutForgeChecks([]string{"github_auth", "disk"}) + if len(got) != 1 || got[0] != "disk" { + t.Fatalf("got %v", got) + } +} diff --git a/src/pkg/hub/health_verdict.go b/src/pkg/hub/health_verdict.go index 6968226353..d4259cf237 100644 --- a/src/pkg/hub/health_verdict.go +++ b/src/pkg/hub/health_verdict.go @@ -79,6 +79,14 @@ func hiveHealthFor(e RegistryEntry, rollup agentFleetRollup, app GitHubAppHealth func hiveHealthBase(e RegistryEntry, rollup agentFleetRollup, app GitHubAppHealth, queuedWork int, now time.Time) HealthVerdict { v := HealthVerdict{QueuedWork: queuedWork} + // Forge egress is broken, not the pod: the github_auth failure it causes + // must not read as a hive fault. StatsStale is deliberately NOT cleared + // here — cached stats are still cached, and the stale gate below never + // asserts health from them; the gate only names the forge as the cause. + if e.ForgeUnreachable { + app = GitHubAppHealth{Bucket: ghAppBucketUnknown} + } + // --- Unknown gates first: never claim health for a hive we can't see. --- if !e.Online { v.State = HealthStateUnknown @@ -89,6 +97,9 @@ func hiveHealthBase(e RegistryEntry, rollup agentFleetRollup, app GitHubAppHealt if e.StatsStale { v.State = HealthStateUnknown v.Reason = "heartbeat stats stale" + if e.ForgeUnreachable { + v.Reason = "heartbeat stats stale (forge unreachable)" + } v.OutputKind = outputKindForLevel(e.ACMMLevel) return v } diff --git a/src/pkg/hub/heartbeat.go b/src/pkg/hub/heartbeat.go index 1545db6c2d..242a9a3383 100644 --- a/src/pkg/hub/heartbeat.go +++ b/src/pkg/hub/heartbeat.go @@ -296,6 +296,7 @@ type HeartbeatPayload struct { GitBranch string `json:"git_branch,omitempty"` ImageRef string `json:"image_ref,omitempty"` GitHubHost string `json:"github_host,omitempty"` + ForgeUnreachable bool `json:"forge_unreachable,omitempty"` Timestamp string `json:"timestamp"` GitHubAppRequired bool `json:"github_app_required,omitempty"` GitHubAppPermIssue string `json:"github_app_perm_issue,omitempty"` diff --git a/src/pkg/hub/saas_hives_api.go b/src/pkg/hub/saas_hives_api.go index d7a205513a..71e215330d 100644 --- a/src/pkg/hub/saas_hives_api.go +++ b/src/pkg/hub/saas_hives_api.go @@ -174,6 +174,12 @@ type MyHiveEntry struct { AdvisoryStale bool `json:"advisoryStale,omitempty"` AdvisoryStaleReason string `json:"advisoryStaleReason,omitempty"` + // ForgeUnreachableLabel is "forge unreachable (host)" when the latest beat + // reported ForgeUnreachable and the hive is still online; the UI renders it + // in place of the generic failing-check / stale-advisory pills. Empty once + // the hive goes offline (forgeUnreachableLabel), like AdvisoryStale. + ForgeUnreachableLabel string `json:"forgeUnreachableLabel,omitempty"` + // AutoUpgradeBlocked is true when this hive has auto-upgrade ON but the hub // will REFUSE to arm it: upgradeCollectible() is false, so the spoke cannot // pull the instruction off its own heartbeat and triggerAutoUpgrades() @@ -1031,6 +1037,8 @@ func (s *HubServer) buildMyHivesResponse(username string, queryValues url.Values result[i].BudgetHealth = budgetHealthFor(result[i].RegistryEntry) result[i].GitHubAppHealth = githubAppHealthFor(result[i].RegistryEntry, journeyNow) + result[i].ForgeUnreachableLabel = forgeUnreachableLabel(result[i].RegistryEntry) + // Advisory-staleness pill, computed on read (same as Journey) so the // gating — advisory-mode participation, app-can-write, past-threshold — // lives ONLY in Go and the browser just renders the flag. diff --git a/src/pkg/hub/server.go b/src/pkg/hub/server.go index aa651b7e70..d107147380 100644 --- a/src/pkg/hub/server.go +++ b/src/pkg/hub/server.go @@ -338,7 +338,13 @@ type RegistryEntry struct { // from cache. The hive is online, but health/agent-derived truth must be // rendered as stale/unknown unless the beat explicitly carried a fresh // in-memory agent overlay. - StatsStale bool `json:"statsStale,omitempty"` + StatsStale bool `json:"statsStale,omitempty"` + // ForgeUnreachable is the spoke-reported flag that the GitHub host in + // GitHubHost cannot be reached from the pod (forge probe timed out or + // failed at the transport layer). The pod is healthy; the break is egress, + // so the hub labels the row by host and exempts it from health/advisory + // penalties. Old spokes omit it (false = today's behaviour). + ForgeUnreachable bool `json:"forgeUnreachable,omitempty"` Upgrading bool `json:"upgrading,omitempty"` UpgradeTarget string `json:"upgradeTarget,omitempty"` UpgradeStartedAt time.Time `json:"upgradeStartedAt,omitempty"` @@ -2123,6 +2129,7 @@ func (s *HubServer) handleHeartbeat(w http.ResponseWriter, r *http.Request) { }(), Online: true, StatsStale: payload.StatsStale, + ForgeUnreachable: payload.ForgeUnreachable, GitHubAppRequired: payload.GitHubAppRequired, // GitHubAppPermIssue is a full sentence the drift hover renders // verbatim ("The GitHub App is configured but has no installation. From 178e715aa23cd2176d8b83efd72912e118b98749 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 23:01:06 +0000 Subject: [PATCH 075/123] =?UTF-8?q?=F0=9F=93=96=20docs(runbook):=20recover?= =?UTF-8?q?=20fork=20PRs=20stalled=20on=20Prow=20presubmits=20(#17455)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(runbook): recover fork PRs stalled on Prow presubmits (#17451) Signed-off-by: operations <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 📖 docs(runbook): disambiguate /ok-to-test and align map title Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: guide <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: operations <280983584+hivecommons-hive[bot]@users.noreply.github.com> Signed-off-by: guide <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: operations <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...changed-17451-fork-pr-presubmit-runbook.md | 1 + src/docs/documentation-map.md | 1 + src/docs/fork-pr-presubmit-stall-runbook.md | 55 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 changelog.d/changed-17451-fork-pr-presubmit-runbook.md create mode 100644 src/docs/fork-pr-presubmit-stall-runbook.md diff --git a/changelog.d/changed-17451-fork-pr-presubmit-runbook.md b/changelog.d/changed-17451-fork-pr-presubmit-runbook.md new file mode 100644 index 0000000000..445b2f5673 --- /dev/null +++ b/changelog.d/changed-17451-fork-pr-presubmit-runbook.md @@ -0,0 +1 @@ +- A new [fork PR presubmit stall runbook](https://github.com/hivecommons/hive/blob/v5/src/docs/fork-pr-presubmit-stall-runbook.md) documents how to tell a missing Prow presubmit from a failing one and how to clear it with `/ok-to-test`, and what to do when dashboard-relayed `/lgtm` and `/approve` are rejected; the code fixes remain open in [#17451](https://github.com/hivecommons/hive/issues/17451). diff --git a/src/docs/documentation-map.md b/src/docs/documentation-map.md index f9c1a036fc..590617f66f 100644 --- a/src/docs/documentation-map.md +++ b/src/docs/documentation-map.md @@ -71,6 +71,7 @@ Documentation for the current Hive line (branch `v5`; the code and docs live und - [DiskPressure recovery runbook](diskpressure-recovery-runbook.md) — diagnose storage eviction, recover safely, and expand or migrate volumes. - [Agent backend-auth failure recovery runbook](backend-auth-recovery-runbook.md) — identify affected agents, re-authenticate the backend, and clear recovered fleet reports. +- [Fork PR stalled on Prow presubmits recovery runbook](fork-pr-presubmit-stall-runbook.md) — start missing presubmits with `/ok-to-test` and apply `/lgtm` and `/approve` as a person when relayed ones are rejected. - [Troubleshooting](troubleshooting.md) — container logs, config validation, agent tmux sessions, dashboard auth, GitHub credential checks, and GitHub App workflow-permission push rejections. - [Admin MCP reference](https://github.com/hivecommons/hive/blob/v6/src/docs/admin-mcp.md) (v6) — diagnostic reads for logs, startup output, request logs, agent terminals and kick logs, and crash/restart/memory evidence via the admin MCP: `log_sources`, `log_read` and its diagnostic read companions, and what still needs a host shell. - [Community and support](community.md) — Discord, contributor portal, issue tracker, and where to ask Hive Commons questions. diff --git a/src/docs/fork-pr-presubmit-stall-runbook.md b/src/docs/fork-pr-presubmit-stall-runbook.md new file mode 100644 index 0000000000..f19f959b70 --- /dev/null +++ b/src/docs/fork-pr-presubmit-stall-runbook.md @@ -0,0 +1,55 @@ +# Fork PR stalled on Prow presubmits — recovery runbook + +A fork PR from a contributor agent who is not an org member can pass every +GitHub Actions check and still sit unmerged: Tide reports +`Not mergeable. Jobs have not succeeded` and the board shows a check +such as `CI 10/11 · 'verify PR…'` with no link +([#17451](https://github.com/hivecommons/hive/issues/17451), seen on #17359, +stuck about four hours). Two independent gaps cause it; this runbook is how an +operator clears each by hand until they are closed in code. + +## 1. Confirm the diagnosis + +```bash +gh pr view --repo / --json labels,reviewDecision,statusCheckRollup +gh pr view --repo / --comments | grep -i -E "tide|not mergeable|restricted to collaborators|NOT APPROVED" +``` + +| Symptom | Meaning | +|---|---| +| Tide says `Jobs X, Y have not succeeded` and `X`/`Y` are absent from the PR's checks | Prow never ran the presubmits: the PR has no `ok-to-test` label. This is a missing check, not a failing one. | +| Prow replied `changing LGTM is restricted to collaborators` or `NOT APPROVED … please assign ` to a comment posted by the hive App | A dashboard-relayed `/lgtm` or `/approve` was ignored. The App is neither a collaborator nor in `OWNERS`, so no label was added and `reviewDecision` stays empty. | + +## 2. Start the presubmits + +A human with write access comments on the PR. This is Prow's `/ok-to-test` (trigger plugin, shows as Tide `Jobs X, Y have not succeeded`), not the same-repo `hive-ok-to-test` GitHub Actions workflow (shows as `workflow-approval-required:`; see [github-app-setup.md](github-app-setup.md)), which never covers fork heads: + +```text +/ok-to-test +/test all +``` + +Tide cleared within about 90 seconds in the observed case. Re-check after every +push: the label persists, but confirm that the jobs Tide named now appear on +the head commit. + +## 3. Apply the approvals as a person + +Do not rely on the dashboard's "approve" action for a Prow-gated repository +until it reports Prow's reply. Post `/lgtm` and `/approve` yourself, as a user +who is a collaborator and listed in `OWNERS`, then confirm the `lgtm` and +`approved` labels exist on the PR. If Prow answers `please assign `, +ask that owner to comment `/approve`. + +## 4. Permanent fixes (not done by this runbook) + +- Post `/ok-to-test` once when the hive opens or pushes to a fork PR for a + non-member agent, or add contributor agents to the Prow trusted org or team. +- Relay `/lgtm` and `/approve` with the approving human's token, or add the + hive App to `OWNERS`; surface Prow's rejection reply on the board instead of + showing "approved". +- Link Tide's status description on the board so a missing presubmit is + distinguishable from a failing check. + +These are tracked in #17451; remove the matching manual step above when each +one lands. From aecaf867e7fc569fdedebbe3a940f4f197939c41 Mon Sep 17 00:00:00 2001 From: Karibhou <157208370+Karibhou@users.noreply.github.com> Date: Tue, 10 Nov 2026 00:19:34 +0100 Subject: [PATCH 076/123] =?UTF-8?q?=F0=9F=90=9B=20fix(automerge):=20hold?= =?UTF-8?q?=20same-issue=20PRs=20only=20at=20the=20merge=20gate=20and=20ke?= =?UTF-8?q?ep=20the=20pick=20(#17444)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(automerge): hold same-issue PRs only at the merge gate and keep the pick The one-PR-per-issue rule and the cross-lane claim-conflict gate ran over every open candidate on every sweep, regardless of CI or review state, and the winner flipped the moment either head had a red check. #17414/#17415 read "needs human decision · Let hive decide" with CI at 19/64 and swapped duplicate-of numbers as checks went red and green. - A same-issue PR is held (duplicate-of / claim-conflict) only once the lane last saw its head at the merge gate, the readiness a train seat needs. Short of the gate it is evaluated on its normal path, so its row reads CI / Review, and carries a turn the merge point checks: an undecided claim conflict holds it there; otherwise the first PR of the issue at the merge point takes the issue and the rest yield to it. - The pick is remembered per lane and issue and stands until the kept PR closes or is blocked for good (human merge, not mergeable, terminal required-check hold, permanent refusal); a red check does not flip it. - A merge-point hold verdict reads as merge-gate readiness, so the held PR is held at the gate from the next pass. - The delegate no longer promises a re-pick on the next pass. Hive-Run: hivecommons/hive#17439 Hive-Plan: issue-17439 options A+C (defer to the merge gate, stable winner) Hive-Spec: hivecommons/hive#17439#expected Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Signed-off-by: Karibhou * 🐛 fix(automerge): key the same-issue winner by base; keep it when the claimant read fell back Review follow-up on #17444: a forge-state read failure on an event-narrowed pass no longer forgets a still-open remembered winner, and v5/v6 siblings no longer share one mergeTrainIssueWinners entry. Signed-off-by: Karibhou --------- Signed-off-by: Karibhou Co-authored-by: Karibhou Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- ...fixed-17439-merge-train-same-issue-gate.md | 1 + .../dashboard-sections/activity-monitor.md | 2 +- src/docs/hive-merge.md | 17 + src/docs/operator-reference/README.md | 2 +- src/pkg/delegatedecision/policy.go | 7 +- .../automerge/automerge_contributor_lane.go | 2 +- .../github/automerge/automerge_merge_train.go | 36 +- ...tomerge_merge_train_claim_conflict_test.go | 50 +++ .../automerge_merge_train_duplicate.go | 351 +++++++++++++++--- .../automerge_merge_train_duplicate_test.go | 173 +++++++-- .../github/automerge/automerge_sweep_loop.go | 4 +- 11 files changed, 562 insertions(+), 83 deletions(-) create mode 100644 changelog.d/fixed-17439-merge-train-same-issue-gate.md diff --git a/changelog.d/fixed-17439-merge-train-same-issue-gate.md b/changelog.d/fixed-17439-merge-train-same-issue-gate.md new file mode 100644 index 0000000000..7391997b45 --- /dev/null +++ b/changelog.d/fixed-17439-merge-train-same-issue-gate.md @@ -0,0 +1 @@ +- The merge train's one-PR-per-issue and same-issue claim-conflict holds now judge only heads at the merge gate ([#17439](https://github.com/hivecommons/hive/issues/17439)). A PR whose CI is still running or whose review is outstanding is evaluated as usual, so its tracker row reads CI / Review instead of "needs human decision · Let hive decide", and it is held at the merge point only if it gets there. The first same-issue PR at the merge point keeps the issue and that pick stands until it closes or is blocked for good, so a check going red mid-run no longer flips the winner and two PRs no longer wear each other's number as `duplicate-of`. diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index e912a6f266..3ce88077a7 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -289,7 +289,7 @@ The tooltip lists the PRs ahead and the overlapping files. Waiting siblings are **Queue position, countdown, stall** ([#15395](https://github.com/hivecommons/hive/issues/15395)). The queued chip is its place in the queue and nothing else — **Queued for merge · 2nd of 6 · ~4m** — so it reads the same whether or not a merge sweep is evaluating it: the sweep is the spinning ⬡ glyph and a *Checking now…* line in the hover, never a change of words (one label per chevron), and no state slug (`queued-behind`, `front`) ever reaches the page. The hover is the place sentence — *2nd of 6 in the merge queue · behind #15253 (soaking, 12m left) · ETA ~25m (2 ahead · head soaking 12m · next pass in 40s). Hive merges one at a time, in order.*; the head's reads *1st of 6 in the merge queue · merges next · ETA ~13m.* — or, when the head is on a person or on CI, the blocker instead of a clock: *… behind #15253 (waiting for a maintainer (untrusted author)) · no estimate until #15253 moves.* Every train state — the 1st included — lights the **Merge queue** column, whatever numeric stage the lane holds the head at (the train's facts are mirrored onto a head still at 050/060; hive's own #15400 once lit CI / Review beside its 2nd-place sibling) — a head under repair is no member (below) and lights CI / Review. The server adds to each member's `merge_train`: `length`, `head_number`, `head_state` (`needs-human` / `ci` / `soaking` / `ready` / `merging` / `fixing` / `unknown`), `head_reason` (plain words), `head_since`, `eta_s`, `eta_at`, `eta_basis`, `late`, `stalled`, `stalled_s`. -**One PR per issue** ([#15395](https://github.com/hivecommons/hive/issues/15395)). Two open PRs declaring the same `Fixes #N` never both ride the queue (hive's own #15402 and #15407, both for #15396, once sat side by side as "waiting its turn"). Before the trains are grouped the sweep keeps one PR per closing issue — a green head (not conflicting, not blocked on a red required check) beats a red one; among equals the earlier-opened wins — and holds the other out of every train with the stage reason `merge-train:duplicate-of#:/0:0/0:`. The held row's gate reads `duplicate-of:` (`merge_gate.duplicate_of`, `merge_gate.duplicate_issue`), its chip **Duplicate of #15402 · needs a pick** with no clock, it carries no `merge_train`, and it wears `needs-decision` so both PRs sit under their issue with the hold visible. *Let hive decide* on either row takes the existing supersede path (rule `one-pr-per-issue`): on the held PR it closes it as superseded by the kept one with a credit comment, through the same write gate as every delegate close; on the kept PR it releases it and names the duplicate the queue holds (or, if the kept PR has since gone red, only recommends the fix — the queue re-picks on its next pass, so an earlier red PR yields to a later green one). +**One PR per issue** ([#15395](https://github.com/hivecommons/hive/issues/15395)). Two open PRs declaring the same `Fixes #N` never both ride the queue (hive's own #15402 and #15407, both for #15396, once sat side by side as "waiting its turn"). Before the trains are grouped the sweep keeps one PR per closing issue, judging heads at the merge gate only ([#17439](https://github.com/hivecommons/hive/issues/17439)): a same-issue PR whose CI is still running or whose review is outstanding carries no hold and no `needs-decision` — its row reads CI / Review like any other — and is held at the merge point if it gets there behind the issue's kept PR. The first PR at the merge point keeps the issue; among several already at the gate a green head (not conflicting) beats a conflicting one and then the earlier-opened wins; the pick then stands until the kept PR closes or is blocked for good, so a check that goes red mid-run never flips it. The other PR, once at the gate, is held out of every train with the stage reason `merge-train:duplicate-of#:/0:0/0:`. The held row's gate reads `duplicate-of:` (`merge_gate.duplicate_of`, `merge_gate.duplicate_issue`), its chip **Duplicate of #15402 · needs a pick** with no clock, it carries no `merge_train`, and it wears `needs-decision` so both PRs sit under their issue with the hold visible. *Let hive decide* on either row takes the existing supersede path (rule `one-pr-per-issue`): on the held PR it closes it as superseded by the kept one with a credit comment, through the same write gate as every delegate close; on the kept PR it releases it and names the duplicate the queue holds (or, if the kept PR has since gone red, only recommends the fix — the queue keeps its pick until the kept PR closes or is blocked for good). - **Countdown to auto-merge.** `eta_s` is the member's own remaining soak, plus — for each PR ahead — its remaining soak or, with no clock of its own, one sweep (the lanes' floor cadence), plus the wait for the next sweep tick; `eta_basis` is the short reading ("2 ahead · head soaking 12m · next pass in 40s"). The chip's `· ~4m` counts down in place from `eta_at` on the same tick as the soak clock, and `eta_at` is anchored server-side to the member's first estimate at its position (re-anchored only when a fresh estimate runs more than a sweep longer), so a poll re-render never resets it. Past the estimate it reads *any moment now*; past twice the first estimate `late` is set and the chip reads *running late* with the estimate kept in the hover. Always a `~`: an estimate, not a promise. A head on a person, on CI or being fixed — or a member that is itself a person's — carries no estimate and the blocker instead. - **Merge queue popover.** The sticky bar's **Merge queue N** chip (led by the merge-sign icon) (hidden with no train) opens a popover listing every train in merge order — ordinal, #, title, state in words, ETA — with the head's blocker on the front row; same pattern as the **Merged** popover (click outside / Escape closes). diff --git a/src/docs/hive-merge.md b/src/docs/hive-merge.md index 61f733ea56..9520943bbc 100644 --- a/src/docs/hive-merge.md +++ b/src/docs/hive-merge.md @@ -1293,6 +1293,23 @@ recorded trusted decision on a PR's head (the tracker's Approve, or any what lifts the gate for that PR; closing the other ends it ([#15810](https://github.com/hivecommons/hive/issues/15810)). +Both rules judge **heads at the merge gate only**: a head the lane last saw +green with every required verdict recorded, the readiness a train seat needs +([#17439](https://github.com/hivecommons/hive/issues/17439)). A same-issue +PR whose CI is still running, or whose review is outstanding, is not held: +the lane evaluates it on its normal path, so its row reads CI running / +review pending, never *needs a pick* or *needs decision*. Should that head +reach the merge point it is held there instead of merging — on an undecided +claim conflict, or behind the PR that already holds its issue — and from the +next pass it is held at the gate like any other. Within one lane the first +PR at the merge point takes the issue; when several are already at the gate +the pick is the usual green-first, then earlier-opened. The pick then +**stands** until the kept PR closes or is blocked for good (a person merges +it, not mergeable, a terminal required-check hold, a permanent merge +refusal): a check that goes red mid-run no longer hands the issue to the +other PR, so two PRs never point at each other. The kept PR is remembered in +memory per lane and issue; a restart re-plans. + ### Hive-authored superseding PRs auto-merge Owner rule (@clubanderson): *"if a pr is superseded by a pr that a hive diff --git a/src/docs/operator-reference/README.md b/src/docs/operator-reference/README.md index 6a0c0615c3..90aa45ecdb 100644 --- a/src/docs/operator-reference/README.md +++ b/src/docs/operator-reference/README.md @@ -489,7 +489,7 @@ advanced into the merge path. | `auto_merge.require_current_base_default` | `false` | Hive-wide default of the current-base gate for repos in neither `require_current_base` nor `skip_current_base` (Settings → Features → Auto-merge → "Merge only on current base"). **Off** by default: the merge train already update-branches overlapping siblings, so the gate is being soaked per repo (hive's own hive first, via `require_current_base`) before any hive turns it on everywhere. When `true`, a behind head the App cannot update merges as it was tested, with one WARN per PR (`automerge current-base gate: … merging as tested`), so fork-heavy repos are not parked wholesale. | | `auto_merge.skip_current_base` | unset | Repo list (`owner/repo`) with an explicit **off** override for the current-base gate (Settings → Repos → "Merge only on current base" unchecked): a green head there merges even if the base has moved, whatever `require_current_base_default` says. An explicit `require_current_base` entry wins over this list. | | `auto_merge.merge_forward_trusted_human` | unset (off) | Repo list (`owner/repo`) where a `role/trusted` + `author/human` PR on a same-repo branch that GitHub reports as conflicting (`dirty`) gets the base merged into its head as one App-authored, signed-off merge commit via the GitHub merges API (no human commit is rewritten), then merges once CI is green on the new head. A real conflict pushes nothing and posts one `` note naming the files both sides changed. Fork heads and dependency-bot branches (`renovate/*` head ref, or a Renovate, Dependabot or Mergeraptor author) are never written. Attempted once per head (#13636). | -| `auto_merge.merge_train.enabled` | `true` | **Settings → Auto-merge → Merge train → Conflict-aware merge train.** Conflict-aware merge train in every automerge lane (hive, trusted-author, contributor) ([#15117](https://github.com/hivecommons/hive/issues/15117)). Each sweep groups the open approved / mergeable-pending PRs of one repo+base by overlapping changed files (`GET /pulls/{n}/files`, cached per head SHA) and lets ONE front per group merge — ordered readiness first: a head the lane last saw at the merge gate (green, approved, soaking or waiting on a sweep) leads, one it has not evaluated since its push comes next, one still at CI / Review trails, then clean-mergeable before behind, then oldest; recomputed every pass, so a member that turns green moves up and one that turns red moves back — while the others wait at stage/080 with lane reason `merge-train:queued-behind#:/:…` (tracker pill "In merge queue · 3 of 4 · ~4m", never a human stage, never `needs-rebase` as a human flag). The moment the front merges, every sibling whose branch is merely `behind` gets `PUT /pulls/{n}/update-branch`; a `dirty` one is handed to the fixer's rebase-resolve episode (`requested_by: merge-train`, the shared two-attempt guard of [#15104](https://github.com/hivecommons/hive/pull/15104); the fixer router still requires a head the hive can push to, so a fork without maintainer edits stays on the plain `conflicting` path for a person). A dependency bot's branch (`renovate/*` head ref, or a Renovate, Dependabot or Mergeraptor author) gets neither — behind or dirty, sibling or front, the bot rebases it itself (projectbluefin/utah#1097). A head the lane last saw blocked on its own (red required check, terminal hold, permanent merge refusal) never fronts, and a group whose best member is blocked imposes no ordering (fail-open) — nobody waits behind a PR that is not moving. One INFO line `merge train` per order change, not per cycle. The queue carries one PR per issue: when two open PRs declare the same `Fixes #N`, the sweep keeps one (green first, then the earlier-opened) and holds the other with lane reason `merge-train:duplicate-of#:/0:0/0:` (tracker pill "Duplicate of #15402 · needs a pick"; *Let hive decide* supersedes, [#15395](https://github.com/hivecommons/hive/issues/15395)). That pick sees one lane; when the two claimants sit in different lanes (the hive's own PR and a trusted human's PR for one issue) every lane holds its candidate with lane reason `merge-train:claim-conflict#:/0:0/0:` and the log line `same-issue claim conflict undecided: #A vs #B`, so neither is admitted until a decision is recorded on one head or the other PR closes — the PR parks at 085, the chevron reads "held · duplicate of #B · needs decision", and the row's options name the concrete PRs; the hive recommends and never picks ([#15810](https://github.com/hivecommons/hive/issues/15810)). `false` restores independent per-PR evaluation. A PR GitHub reports conflicting on its own, or one at stage/072 returned-to-contributor (label or stage record), is never a member nor counted in the train's size and draws no train idle comment; a conflicting PR rides only while the train itself is repairing it (its rebase requested behind a merged front, loop guard not spent) ([#15395](https://github.com/hivecommons/hive/issues/15395)). | +| `auto_merge.merge_train.enabled` | `true` | **Settings → Auto-merge → Merge train → Conflict-aware merge train.** Conflict-aware merge train in every automerge lane (hive, trusted-author, contributor) ([#15117](https://github.com/hivecommons/hive/issues/15117)). Each sweep groups the open approved / mergeable-pending PRs of one repo+base by overlapping changed files (`GET /pulls/{n}/files`, cached per head SHA) and lets ONE front per group merge — ordered readiness first: a head the lane last saw at the merge gate (green, approved, soaking or waiting on a sweep) leads, one it has not evaluated since its push comes next, one still at CI / Review trails, then clean-mergeable before behind, then oldest; recomputed every pass, so a member that turns green moves up and one that turns red moves back — while the others wait at stage/080 with lane reason `merge-train:queued-behind#:/:…` (tracker pill "In merge queue · 3 of 4 · ~4m", never a human stage, never `needs-rebase` as a human flag). The moment the front merges, every sibling whose branch is merely `behind` gets `PUT /pulls/{n}/update-branch`; a `dirty` one is handed to the fixer's rebase-resolve episode (`requested_by: merge-train`, the shared two-attempt guard of [#15104](https://github.com/hivecommons/hive/pull/15104); the fixer router still requires a head the hive can push to, so a fork without maintainer edits stays on the plain `conflicting` path for a person). A dependency bot's branch (`renovate/*` head ref, or a Renovate, Dependabot or Mergeraptor author) gets neither — behind or dirty, sibling or front, the bot rebases it itself (projectbluefin/utah#1097). A head the lane last saw blocked on its own (red required check, terminal hold, permanent merge refusal) never fronts, and a group whose best member is blocked imposes no ordering (fail-open) — nobody waits behind a PR that is not moving. One INFO line `merge train` per order change, not per cycle. The queue carries one PR per issue: when two open PRs declare the same `Fixes #N`, the sweep keeps one and holds the other with lane reason `merge-train:duplicate-of#:/0:0/0:` (tracker pill "Duplicate of #15402 · needs a pick"; *Let hive decide* supersedes, [#15395](https://github.com/hivecommons/hive/issues/15395)). That pick sees one lane; when the two claimants sit in different lanes (the hive's own PR and a trusted human's PR for one issue) every lane holds its candidate with lane reason `merge-train:claim-conflict#:/0:0/0:` and the log line `same-issue claim conflict undecided: #A vs #B`, so neither is admitted until a decision is recorded on one head or the other PR closes — the PR parks at 085, the chevron reads "held · duplicate of #B · needs decision", and the row's options name the concrete PRs; the hive recommends and never picks ([#15810](https://github.com/hivecommons/hive/issues/15810)). Both rules hold only heads at the merge gate ([#17439](https://github.com/hivecommons/hive/issues/17439)): a same-issue PR still running CI or awaiting review is evaluated as usual (its row reads CI / Review) and is held at the merge point only if it gets there; the first PR at the merge point keeps the issue (among several already at the gate: green first, then the earlier-opened), and the pick stands until that PR closes or is blocked for good — a check going red mid-run does not flip it. `false` restores independent per-PR evaluation. A PR GitHub reports conflicting on its own, or one at stage/072 returned-to-contributor (label or stage record), is never a member nor counted in the train's size and draws no train idle comment; a conflicting PR rides only while the train itself is repairing it (its rebase requested behind a merged front, loop guard not spent) ([#15395](https://github.com/hivecommons/hive/issues/15395)). | | `auto_merge.merge_train.max_rebase_attempts` | `2`; `0` uses the default | **Settings → Auto-merge → Merge train → Rebase attempts per front.** Loop guard: how many rebase-resolve requests the train makes for one PR behind one front. Past it the PR moves to stage/085 with the pill "Needs human decision · rebase failed twice" and the decision option "Rebase, then merge as maintainer". | | `auto_merge.native_merge_queue.enabled` | `false` | Opt-in: once the lane's gates pass, enqueue the PR into GitHub's native merge queue (App auth only) instead of merging directly, and withdraw only Hive's own entries when the PR loses eligibility ([#15198](https://github.com/hivecommons/hive/issues/15198)). Off keeps the pre-queue behaviour everywhere, including the `merge-queue-required` park. See [native-merge-queue.md](../native-merge-queue.md). | | `auto_merge.native_merge_queue.repos` | unset (every watched repo once enabled) | `owner/repo` allow-list for the hand-off, matched case-insensitively. | diff --git a/src/pkg/delegatedecision/policy.go b/src/pkg/delegatedecision/policy.go index ab1bf0d090..7cb2913fec 100644 --- a/src/pkg/delegatedecision/policy.go +++ b/src/pkg/delegatedecision/policy.go @@ -862,8 +862,9 @@ func decideClaimConflict(in Input, ref string) (Decision, bool) { } // decideTrainDuplicate resolves a same-issue pair the merge queue split -// (hivecommons/hive#15395). The queue's pick stands: a green head beats a -// red one, the earlier-opened wins among equals. Deciding on the held PR +// (hivecommons/hive#15395). The queue's pick stands: it picks between +// heads at the merge gate and keeps the pick until the kept PR closes or +// is blocked for good (hivecommons/hive#17439). Deciding on the held PR // closes it as superseded by the kept one, with a comment; deciding on // the kept PR releases it and names the duplicate the queue holds. A // paused repo only gets the recommendation. @@ -896,7 +897,7 @@ func decideTrainDuplicate(in Input, ref string) (Decision, bool) { held := fmt.Sprintf("#%d", other.Number) if in.Conflicting || in.CIRed() || in.DCOMissing { return recommendOnly(RuleOnePRPerIssue, - fmt.Sprintf("the merge queue kept %s over %s%s, but %s is not mergeable now (%s); the queue re-picks on its next pass", ref, held, issue, ref, mergeBlockers(in)), + fmt.Sprintf("the merge queue kept %s over %s%s, but %s is not mergeable now (%s); the queue keeps it until it closes or is blocked for good", ref, held, issue, ref, mergeBlockers(in)), "fix "+ref+" ("+mergeBlockers(in)+"), or decide on "+held+" to let it supersede this one"), true } return releasePR(RuleOnePRPerIssue, diff --git a/src/pkg/github/automerge/automerge_contributor_lane.go b/src/pkg/github/automerge/automerge_contributor_lane.go index 2e2d23e65e..e8a1f108d7 100644 --- a/src/pkg/github/automerge/automerge_contributor_lane.go +++ b/src/pkg/github/automerge/automerge_contributor_lane.go @@ -470,7 +470,7 @@ func (c *Engine) SweepContributorLaneAutoMerges(ctx context.Context, opts AutoMe } result.Candidates++ c.sweepClock.evaluating(displayRepo, number) - event, reason, err := c.trySweepContributorLanePR(withMergeTrainCandidateHold(ctx, c.mergeTrainCandidateReason(train, number)), displayRepo, owner, repoName, number, policy) + event, reason, err := c.trySweepContributorLanePR(c.mergeTrainEvalContext(ctx, train, number), displayRepo, owner, repoName, number, policy) c.sweepClock.evaluated() if err == nil { c.noteMergeTrainOutcome(stageLaneContributor, owner, repoName, number, pr.GetHead().GetSHA(), reason) diff --git a/src/pkg/github/automerge/automerge_merge_train.go b/src/pkg/github/automerge/automerge_merge_train.go index 1323bf2ecc..b8c1445759 100644 --- a/src/pkg/github/automerge/automerge_merge_train.go +++ b/src/pkg/github/automerge/automerge_merge_train.go @@ -417,11 +417,17 @@ type mergeTrainPlan struct { // on their current head: they hold no seat (hivecommons/hive#15825). candidates map[int]*mergeTrainGroup // duplicates are the PRs held out of every train this pass because - // another open PR fixes the same issue (one PR per issue). + // another open PR fixes the same issue (one PR per issue); only heads + // at the merge gate are held (hivecommons/hive#17439). duplicates map[int]mergeTrainDuplicateHold - // claimConflicts are the candidates held because an open PR outside - // this lane claims the same issue and no decision is recorded. + // claimConflicts are the candidates at the merge gate held because an + // open PR outside this lane claims the same issue and no decision is + // recorded. claimConflicts map[int]mergeTrainClaimConflict + // issueTurns are the same-issue PRs short of the merge gate: the lane + // evaluates them on their normal path and the merge point holds one + // rather than merging past either rule (hivecommons/hive#17439). + issueTurns map[int]mergeTrainIssueTurn } // group returns the train number rides in, if any. @@ -479,11 +485,17 @@ func withMergeTrainCandidateHold(ctx context.Context, reason string) context.Con } // mergeTrainCandidateHold is the hold reason a merge point returns instead -// of merging when the lane is evaluating a train candidate; "" otherwise. +// of merging, "" to go on: a same-issue PR's turn (mergeTrainEvalContext) +// first, then the hold of a train candidate. func mergeTrainCandidateHold(ctx context.Context) string { if ctx == nil { return "" } + if turn, ok := ctx.Value(mergeTrainIssueTurnKey{}).(func() string); ok { + if reason := turn(); reason != "" { + return reason + } + } reason, _ := ctx.Value(mergeTrainCandidateHoldKey{}).(string) return reason } @@ -1007,6 +1019,11 @@ type mergeTrainState struct { // the train (earliest first) and its loss is the ejection the log and // the stage store report. mergeTrainSeats map[string]mergeTrainSeat + // mergeTrainIssueWinners remembers, per lane and closing issue, the PR + // the one-PR-per-issue rule kept (hivecommons/hive#17439): it keeps the + // issue until it closes or its head is blocked for good, so a check + // that is red for a pass never flips the pick. + mergeTrainIssueWinners map[string]int // mergeTrainNow is the planner's clock (tests inject one). mergeTrainNow func() time.Time } @@ -1188,12 +1205,17 @@ func mergeTrainBlockingReason(reason string) bool { // mergeTrainReadinessOf reads a lane verdict as a readiness tier: a merge // (""), a soak, a merge-queue wait or a release hold is ready — the head -// would merge but for its turn; CI pending, no reviewer verdict yet or a +// would merge but for its turn; so is a merge-point hold for the train or +// for a same-issue PR (a lane verdict carries those only from the merge +// point, hivecommons/hive#17439); CI pending, no reviewer verdict yet or a // review gate still waiting is unready; any other reason says nothing // about readiness (unknown). func mergeTrainReadinessOf(reason string) int { - if mt, ok := prstage.ParseMergeTrain(reason); ok && mt.State == prstage.MergeTrainStateAdmitted { - return mergeTrainReadinessReady + if mt, ok := prstage.ParseMergeTrain(reason); ok { + switch mt.State { + case prstage.MergeTrainStateAdmitted, prstage.MergeTrainStateDuplicateOf, prstage.MergeTrainStateClaimConflict: + return mergeTrainReadinessReady + } } switch { case reason == "", strings.HasPrefix(reason, prstage.ContributorLaneReasonSoaking), diff --git a/src/pkg/github/automerge/automerge_merge_train_claim_conflict_test.go b/src/pkg/github/automerge/automerge_merge_train_claim_conflict_test.go index d937ab3010..589ec6f5eb 100644 --- a/src/pkg/github/automerge/automerge_merge_train_claim_conflict_test.go +++ b/src/pkg/github/automerge/automerge_merge_train_claim_conflict_test.go @@ -23,6 +23,14 @@ func claimPR(n int, login, body string, at time.Time) *gh.PullRequest { } } +// claimAtGate records the lane's "would merge" verdict for each PR's head +// on o/r: the merge gate the same-issue rules judge (hivecommons/hive#17439). +func claimAtGate(c *Engine, lane string, prs ...*gh.PullRequest) { + for _, pr := range prs { + c.noteMergeTrainOutcome(lane, "o", "r", pr.GetNumber(), pr.GetHead().GetSHA(), "") + } +} + // hivecommons/hive#15810: the hive's own #15783 (self lane) and a trusted // human's #15793 (trusted lane) both closed #15773 and both marched toward // merge because each lane's one-PR-per-issue rule saw only its own PRs. @@ -47,6 +55,8 @@ func TestPlanClaimConflictsHoldsCrossLanePair(t *testing.T) { } return "" } + claimAtGate(c, stageLaneSelf, hive) + claimAtGate(c, stageLaneTrusted, human) self := &mergeTrainPlan{lane: stageLaneSelf, displayRepo: "o/r"} kept := c.planDuplicateHolds(context.Background(), self, stageLaneSelf, "o", "r", "o/r", prs, selfOnly) @@ -101,6 +111,7 @@ func TestPlanClaimConflictsDecidedOrAdoptionAdmits(t *testing.T) { } c := &Engine{humanChangeRequests: store} prs := []*gh.PullRequest{claimPR(15783, "hive-app[bot]", "Closes #15773", t0), claimPR(15793, "clubanderson", "Fixes #15773", t0.Add(time.Hour))} + claimAtGate(c, stageLaneSelf, prs[0]) trusted := &mergeTrainPlan{lane: stageLaneTrusted} kept := c.planDuplicateHolds(context.Background(), trusted, stageLaneTrusted, "o", "r", "o/r", prs, func(p *gh.PullRequest) string { if p.GetUser().GetLogin() != "clubanderson" { @@ -134,6 +145,7 @@ func TestPlanClaimConflictsDecidedOrAdoptionAdmits(t *testing.T) { // Two candidates of one lane stay with the one-PR-per-issue winner // rule, which already sees them both. + claimAtGate(c, stageLaneSelf, prs...) plan = &mergeTrainPlan{lane: stageLaneSelf} c.planDuplicateHolds(context.Background(), plan, stageLaneSelf, "o", "r", "o/r", prs, all) if plan.claimConflicts != nil { @@ -153,6 +165,7 @@ func TestPlanClaimConflictsSeesClaimantsOutsideNarrowedList(t *testing.T) { hive, human := claimPR(15783, "hive-app[bot]", "Closes #15773", t0), claimPR(15793, "clubanderson", "Fixes #15773", t0.Add(time.Hour)) c := &Engine{} c.rememberClaimants("o/r", []*gh.PullRequest{hive, human}) + claimAtGate(c, stageLaneTrusted, human) plan := &mergeTrainPlan{lane: stageLaneTrusted} kept := c.planDuplicateHolds(context.Background(), plan, stageLaneTrusted, "o", "r", "o/r", []*gh.PullRequest{human}, func(*gh.PullRequest) string { return "" }) if h, held := plan.claimConflictOf(15793); !held || h.Other != 15783 || h.Issue != 15773 || len(kept) != 0 { @@ -165,3 +178,40 @@ func TestPlanClaimConflictsSeesClaimantsOutsideNarrowedList(t *testing.T) { t.Fatalf("other repo held: %+v", plan.claimConflicts) } } + +// hivecommons/hive#17439: a claimant whose CI is still running is not +// held for a decision — the lane evaluates it, so its row reads CI running +// — but the merge point holds it all the same; once its head is at the +// gate it is held for the decision. +func TestPlanClaimConflictsDefersHeadShortOfTheGate(t *testing.T) { + t0 := time.Date(2026, 11, 3, 10, 25, 0, 0, time.UTC) + hive, human := claimPR(15783, "hive-app[bot]", "Closes #15773", t0), claimPR(15793, "clubanderson", "Fixes #15773", t0.Add(time.Hour)) + trustedOnly := func(p *gh.PullRequest) string { + if p.GetUser().GetLogin() != "clubanderson" { + return "author:not-trusted" + } + return "" + } + c := &Engine{} + c.noteMergeTrainOutcome(stageLaneTrusted, "o", "r", 15793, human.GetHead().GetSHA(), "required-check-pending:build") + plan := &mergeTrainPlan{lane: stageLaneTrusted, displayRepo: "o/r", owner: "o", repo: "r"} + kept := c.planDuplicateHolds(context.Background(), plan, stageLaneTrusted, "o", "r", "o/r", []*gh.PullRequest{hive, human}, trustedOnly) + if _, held := plan.claimConflictOf(15793); held { + t.Fatal("held for a decision while its CI runs") + } + if len(kept) != 1 || kept[0].GetNumber() != 15783 { + t.Fatalf("kept %v, want the claimant out of the trains", kept) + } + reason := mergeTrainCandidateHold(c.mergeTrainEvalContext(context.Background(), plan, 15793)) + mt, ok := prstage.ParseMergeTrain(reason) + if !ok || mt.State != prstage.MergeTrainStateClaimConflict || mt.Front != 15783 || mt.Position != 15773 { + t.Fatalf("merge point = %q", reason) + } + + c.noteMergeTrainOutcome(stageLaneTrusted, "o", "r", 15793, human.GetHead().GetSHA(), reason) + plan = &mergeTrainPlan{lane: stageLaneTrusted, displayRepo: "o/r", owner: "o", repo: "r"} + c.planDuplicateHolds(context.Background(), plan, stageLaneTrusted, "o", "r", "o/r", []*gh.PullRequest{hive, human}, trustedOnly) + if h, held := plan.claimConflictOf(15793); !held || h.Other != 15783 || h.Issue != 15773 { + t.Fatalf("at the gate: hold=%+v held=%v", h, held) + } +} diff --git a/src/pkg/github/automerge/automerge_merge_train_duplicate.go b/src/pkg/github/automerge/automerge_merge_train_duplicate.go index 9d24578e2b..1306d2cf49 100644 --- a/src/pkg/github/automerge/automerge_merge_train_duplicate.go +++ b/src/pkg/github/automerge/automerge_merge_train_duplicate.go @@ -5,6 +5,7 @@ import ( "slices" "sort" "strconv" + "strings" "time" gh "github.com/google/go-github/v72/github" @@ -29,6 +30,14 @@ type mergeTrainDuplicateCandidate struct { // Green: the head is not blocked (red required check, terminal hold, // permanent refusal) and GitHub does not report it conflicting. Green bool + // AtGate: the lane last saw this exact head at the merge gate — CI + // green, every required verdict in (mergeTrainAtGate). Only such heads + // are picked between (hivecommons/hive#17439). + AtGate bool + // Terminal: the lane last saw this exact head blocked for good + // (mergeTrainHeadTerminal). A remembered winner in this state lets + // the issue go; a merely red check does not. + Terminal bool } // mergeTrainDuplicateHold is the losing side of a pair: Number is held as @@ -37,10 +46,10 @@ type mergeTrainDuplicateHold struct { Number, Winner, Issue int } -// mergeTrainDuplicateWinner picks the PR the queue keeps for one issue: -// a green head beats a red one; among equals the earlier-opened PR wins -// (lower number on a tie). So two green PRs keep the earlier; an earlier -// red one yields to a later green one. +// mergeTrainDuplicateWinner picks the best of the candidates: a green head +// beats a red one; among equals the earlier-opened PR wins (lower number +// on a tie). mergeTrainIssueWinner asks it about the heads at the merge +// gate only. func mergeTrainDuplicateWinner(cands []mergeTrainDuplicateCandidate) int { if len(cands) == 0 { return 0 @@ -64,11 +73,36 @@ func mergeTrainDuplicateBetter(a, b mergeTrainDuplicateCandidate) bool { return a.Number < b.Number } -// mergeTrainDuplicateHolds groups the candidates by the issue each one -// closes and holds every PR but the winner per issue. A PR closing several -// issues is held on the first issue it loses. Holds come back sorted by -// PR number so the plan is stable across passes. -func mergeTrainDuplicateHolds(byIssue map[int][]mergeTrainDuplicateCandidate) []mergeTrainDuplicateHold { +// mergeTrainIssueWinner is the PR one issue's group yields to +// (hivecommons/hive#17439): the winner remembered from an earlier pass +// while it is still in the group and not blocked for good — a check that +// is red mid-run never hands the issue to the other PR — else the best +// of the members at the merge gate; 0 while no member is at the gate, so +// the first PR to reach the merge point takes the issue. +func mergeTrainIssueWinner(cands []mergeTrainDuplicateCandidate, remembered int) int { + var atGate []mergeTrainDuplicateCandidate + for _, c := range cands { + if remembered > 0 && c.Number == remembered && !c.Terminal { + return remembered + } + if c.AtGate { + atGate = append(atGate, c) + } + } + return mergeTrainDuplicateWinner(atGate) +} + +// mergeTrainDuplicatePicks runs the one-PR-per-issue rule over every issue +// two or more candidates close. remembered is the winner the lane kept per +// issue on an earlier pass. winners names each contested issue's winner +// (0: nobody at the gate yet); holds are the members at the merge gate +// that yield to a winner, sorted by PR number (a PR closing several +// issues is held on the first it loses); turns are, per member short of +// the gate, the issues whose turn it must claim at the merge point before +// it may merge (hivecommons/hive#17439). +func mergeTrainDuplicatePicks(byIssue map[int][]mergeTrainDuplicateCandidate, remembered map[int]int) (winners map[int]int, holds []mergeTrainDuplicateHold, turns map[int][]int) { + winners = map[int]int{} + turns = map[int][]int{} held := map[int]mergeTrainDuplicateHold{} issues := make([]int, 0, len(byIssue)) for issue := range byIssue { @@ -80,22 +114,30 @@ func mergeTrainDuplicateHolds(byIssue map[int][]mergeTrainDuplicateCandidate) [] if len(cands) < 2 { continue } - winner := mergeTrainDuplicateWinner(cands) + winner := mergeTrainIssueWinner(cands, remembered[issue]) + winners[issue] = winner for _, c := range cands { if c.Number == winner { continue } + if !c.AtGate { + turns[c.Number] = append(turns[c.Number], issue) + continue + } if _, done := held[c.Number]; !done { held[c.Number] = mergeTrainDuplicateHold{Number: c.Number, Winner: winner, Issue: issue} } } } - out := make([]mergeTrainDuplicateHold, 0, len(held)) + for n := range held { + delete(turns, n) + } + holds = make([]mergeTrainDuplicateHold, 0, len(held)) for _, h := range held { - out = append(out, h) + holds = append(holds, h) } - sort.Slice(out, func(i, j int) bool { return out[i].Number < out[j].Number }) - return out + sort.Slice(holds, func(i, j int) bool { return holds[i].Number < holds[j].Number }) + return winners, holds, turns } // mergeTrainClosedIssues reads the same-repo issues a PR's title and body @@ -128,25 +170,47 @@ func mergeTrainSameLine(a, b *gh.PullRequest) bool { } // planDuplicateHolds runs the one-PR-per-issue rule over the lane's -// candidates before the trains are grouped: the held PRs leave the -// candidate list and the plan remembers who each one yields to. PRs are -// grouped by base branch first, so siblings on different release lines -// never compete. +// candidates before the trains are grouped (hivecommons/hive#15395). PRs +// are grouped by base branch first, so siblings on different release +// lines never compete (hivecommons/hive#17436). The rule judges heads at +// the merge gate only (hivecommons/hive#17439): a same-issue candidate +// whose CI is still running or whose review is outstanding is evaluated +// on its normal path, so its row reads CI running / review pending rather +// than "needs a pick", and carries a turn the merge point checks, so it +// still cannot merge past the rule. A candidate at the gate behind its +// issue's winner is held: it leaves the candidate list and the plan +// remembers who it yields to. func (c *Engine) planDuplicateHolds(ctx context.Context, plan *mergeTrainPlan, lane, owner, repo, displayRepo string, prs []*gh.PullRequest, prefilter func(*gh.PullRequest) string) []*gh.PullRequest { - prs = c.planClaimConflicts(ctx, plan, owner, repo, displayRepo, prs, prefilter) + candidate := map[int]bool{} + for _, pr := range prs { + if pr != nil && pr.GetNumber() > 0 && mergeTrainCandidate(prefilter(pr)) { + candidate[pr.GetNumber()] = true + } + } + if len(candidate) == 0 { + return prs + } + claimants, whole := c.claimantsForConflicts(ctx, owner, repo, prs) + if whole { + c.forgetClosedMergeTrainWinners(lane, owner, repo, claimants) + } + prs = c.planClaimConflicts(ctx, plan, lane, owner, repo, displayRepo, prs, claimants, candidate) byLine := map[string]map[int][]mergeTrainDuplicateCandidate{} for _, pr := range prs { - if pr == nil || pr.GetNumber() <= 0 || !mergeTrainCandidate(prefilter(pr)) { + if pr == nil || !candidate[pr.GetNumber()] { continue } issues := mergeTrainClosedIssues(pr, displayRepo) if len(issues) == 0 { continue } + n, sha := pr.GetNumber(), pr.GetHead().GetSHA() cand := mergeTrainDuplicateCandidate{ - Number: pr.GetNumber(), + Number: n, CreatedAt: pr.GetCreatedAt().Time, - Green: !mergeTrainDirty(pr.GetMergeableState()) && !c.mergeTrainHeadBlocked(lane, owner, repo, pr.GetNumber(), pr.GetHead().GetSHA()), + Green: !mergeTrainDirty(pr.GetMergeableState()) && !c.mergeTrainHeadBlocked(lane, owner, repo, n, sha), + AtGate: c.mergeTrainAtGate(lane, owner, repo, pr), + Terminal: c.mergeTrainHeadTerminal(lane, owner, repo, n, sha), } line := pr.GetBase().GetRef() byIssue := byLine[line] @@ -159,8 +223,14 @@ func (c *Engine) planDuplicateHolds(ctx context.Context, plan *mergeTrainPlan, l } } var holds []mergeTrainDuplicateHold - for _, byIssue := range byLine { - holds = append(holds, mergeTrainDuplicateHolds(byIssue)...) + for line, byIssue := range byLine { + winners, h, turns := mergeTrainDuplicatePicks(byIssue, c.mergeTrainRememberedWinners(lane, owner, repo, line, byIssue)) + c.rememberMergeTrainWinners(lane, owner, repo, line, displayRepo, winners) + holds = append(holds, h...) + for n, issues := range turns { + plan.deferIssueTurn(n, mergeTrainIssueTurn{Base: line, Issues: issues}) + c.debug("merge train: same-issue PR short of the merge gate; evaluated, held at the merge point", "repo", displayRepo, "pr", n, "issues", issues, "lane", plan.lane) + } } sort.Slice(holds, func(i, j int) bool { return holds[i].Number < holds[j].Number }) if len(holds) == 0 { @@ -253,25 +323,27 @@ func (c *Engine) rememberClaimants(fullRepo string, prs []*gh.PullRequest) { // the forge-state snapshot when one is wired, else the full /pulls list // the lane's openPullRequests just fetched for this repo (remembered // before narrowing to targets); the lane's own list only when neither is -// available (a bare Engine in tests). -func (c *Engine) claimantsForConflicts(ctx context.Context, owner, repo string, prs []*gh.PullRequest) []*gh.PullRequest { +// available (a bare Engine in tests). whole is false when a wired +// forge-state read failed and the lane's own, possibly event-narrowed, +// list stands in: absence from it does not mean a PR closed. +func (c *Engine) claimantsForConflicts(ctx context.Context, owner, repo string, prs []*gh.PullRequest) (claimants []*gh.PullRequest, whole bool) { if c == nil { - return prs + return prs, true } if c.openPRs == nil { c.claimantsMu.Lock() all, ok := c.claimants[owner+"/"+repo] c.claimantsMu.Unlock() if ok && len(all) > 0 { - return all + return all, true } - return prs + return prs, true } all, skip, err := c.openPullRequests(ctx, owner, repo, nil) if err != nil || skip != "" || len(all) == 0 { - return prs + return prs, false } - return all + return all, true } // planClaimConflicts holds every lane candidate whose closing issue another @@ -281,19 +353,14 @@ func (c *Engine) claimantsForConflicts(ctx context.Context, owner, repo string, // them both; the gate exists for the pair the lanes split — the hive's // own PR in the self lane and a trusted human's PR in the trusted lane // both marched toward merge for hivecommons/hive#15773 because each lane -// saw only its own (hivecommons/hive#15810). -func (c *Engine) planClaimConflicts(ctx context.Context, plan *mergeTrainPlan, owner, repo, displayRepo string, prs []*gh.PullRequest, prefilter func(*gh.PullRequest) string) []*gh.PullRequest { - candidate := map[int]bool{} - for _, pr := range prs { - if pr != nil && pr.GetNumber() > 0 && mergeTrainCandidate(prefilter(pr)) { - candidate[pr.GetNumber()] = true - } - } - if len(candidate) == 0 { - return prs - } +// saw only its own (hivecommons/hive#15810). Only a head at the merge gate +// is held for the decision; one whose CI is still running or whose review +// is outstanding is evaluated on its normal path and meets the same hold +// at the merge point (hivecommons/hive#17439). Either way it leaves the +// list the trains and the winner rule are grouped from. +func (c *Engine) planClaimConflicts(ctx context.Context, plan *mergeTrainPlan, lane, owner, repo, displayRepo string, prs, claimants []*gh.PullRequest, candidate map[int]bool) []*gh.PullRequest { byIssue := map[int][]*gh.PullRequest{} - for _, pr := range c.claimantsForConflicts(ctx, owner, repo, prs) { + for _, pr := range claimants { if pr == nil || pr.GetNumber() <= 0 || (pr.State != nil && pr.GetState() != "open") { continue } @@ -329,11 +396,19 @@ func (c *Engine) planClaimConflicts(ctx context.Context, plan *mergeTrainPlan, o if len(held) == 0 { return prs } - plan.claimConflicts = held kept := make([]*gh.PullRequest, 0, len(prs)) for _, pr := range prs { - if _, h := held[pr.GetNumber()]; !h { + h, conflicted := held[pr.GetNumber()] + switch { + case !conflicted: kept = append(kept, pr) + case c.mergeTrainAtGate(lane, owner, repo, pr): + if plan.claimConflicts == nil { + plan.claimConflicts = map[int]mergeTrainClaimConflict{} + } + plan.claimConflicts[h.Number] = h + default: + plan.deferIssueTurn(h.Number, mergeTrainIssueTurn{Conflict: h}) } } return kept @@ -356,3 +431,189 @@ func (c *Engine) mergeTrainClaimConflictSkip(plan *mergeTrainPlan, number int) s c.debug("automerge skip", "repo", plan.displayRepo, "pr", number, "reason", reason, "lane", plan.lane, "other", strconv.Itoa(h.Other)) return reason } + +// mergeTrainAtGate reports whether the lane last saw this exact head at +// the merge gate — CI green, every required verdict recorded, mergeable +// but for its turn — the readiness a train seat needs too. Only such a +// head is judged by the same-issue rules (hivecommons/hive#17439): a PR +// whose CI is still running or whose review is outstanding is not yet a +// pick anyone could make. +func (c *Engine) mergeTrainAtGate(lane, owner, repo string, pr *gh.PullRequest) bool { + n, sha := pr.GetNumber(), pr.GetHead().GetSHA() + return !c.mergeTrainHeadBlocked(lane, owner, repo, n, sha) && c.mergeTrainHeadReadiness(lane, owner, repo, n, sha) == mergeTrainReadinessReady +} + +// mergeTrainHeadTerminal reports whether this exact head was last seen by +// the lane blocked for good: a person merges it, or a hold no CI re-run +// clears (not mergeable, a terminal required-check hold, a permanent merge +// refusal). A red check is not terminal — on a head whose CI is still +// running it is noise, and a re-run or the fixer may clear it — so it +// never costs a remembered winner its issue (hivecommons/hive#17439). +func (c *Engine) mergeTrainHeadTerminal(lane, owner, repo string, number int, sha string) bool { + v, ok := c.mergeTrainVerdictFor(lane, owner, repo, number, sha) + return ok && (v.humanMerge || (v.blocked && classifyCIReason(v.reason) != ciReasonRed)) +} + +// mergeTrainIssueTurn is a same-issue PR the lane evaluates on its normal +// path because its head is not at the merge gate yet +// (hivecommons/hive#17439). Its row shows CI and review as they are; if +// the head reaches the merge point it is held there instead of merging: +// on an undecided claim conflict (Conflict.Other set), or behind the PR +// that already holds the turn of one of Issues on base branch Base. +type mergeTrainIssueTurn struct { + Conflict mergeTrainClaimConflict + Base string + Issues []int +} + +// deferIssueTurn records number as evaluated with a same-issue turn. +func (p *mergeTrainPlan) deferIssueTurn(number int, t mergeTrainIssueTurn) { + if p.issueTurns == nil { + p.issueTurns = map[int]mergeTrainIssueTurn{} + } + p.issueTurns[number] = t +} + +// issueTurnOf reports the same-issue turn number is evaluated with. +func (p *mergeTrainPlan) issueTurnOf(number int) (mergeTrainIssueTurn, bool) { + if p == nil || p.issueTurns == nil { + return mergeTrainIssueTurn{}, false + } + t, ok := p.issueTurns[number] + return t, ok +} + +// mergeTrainIssueTurnKey is the context key under which a lane carries a +// same-issue PR's turn to the merge point. +type mergeTrainIssueTurnKey struct{} + +// mergeTrainEvalContext is the context a lane evaluates number under: its +// same-issue turn, if any, and its train candidate hold. The merge point +// asks mergeTrainCandidateHold, which settles the turn first. +func (c *Engine) mergeTrainEvalContext(ctx context.Context, plan *mergeTrainPlan, number int) context.Context { + if t, ok := plan.issueTurnOf(number); ok { + ctx = context.WithValue(ctx, mergeTrainIssueTurnKey{}, func() string { + return c.mergeTrainIssueTurnHold(plan, number, t) + }) + } + return withMergeTrainCandidateHold(ctx, c.mergeTrainCandidateReason(plan, number)) +} + +// mergeTrainIssueTurnHold is the hold a same-issue PR meets at the merge +// point, "" when it may go on: an undecided claim conflict holds it; +// otherwise it claims each issue's turn in order and yields to the first +// issue another PR already holds — reaching the merge point behind the +// issue's winner is the same verdict as waiting at the gate behind it. +func (c *Engine) mergeTrainIssueTurnHold(plan *mergeTrainPlan, number int, t mergeTrainIssueTurn) string { + if t.Conflict.Other > 0 { + return mergeTrainClaimConflictReason(t.Conflict) + } + for _, issue := range t.Issues { + if w := c.claimMergeTrainIssueTurn(plan.lane, plan.owner, plan.repo, t.Base, plan.displayRepo, issue, number); w != number { + return mergeTrainDuplicateReason(mergeTrainDuplicateHold{Number: number, Winner: w, Issue: issue}) + } + } + return "" +} + +// mergeTrainIssueWinnerKey keys the PR that holds issue's turn on one +// base branch: release-line siblings never share a turn +// (hivecommons/hive#17436). It extends the lane's verdict key, so +// forgetClosedMergeTrainWinners still finds it by prefix. +func mergeTrainIssueWinnerKey(lane, owner, repo, base string, issue int) string { + return mergeTrainVerdictKey(lane, owner, repo, issue) + "@" + base +} + +// claimMergeTrainIssueTurn is the merge point's one-PR-per-issue check: +// the PR that holds issue's turn on base when it is another; otherwise +// number takes the turn — the first of the issue's PRs at the merge point +// keeps the issue until it closes or is blocked for good — and is +// returned. +func (c *Engine) claimMergeTrainIssueTurn(lane, owner, repo, base, displayRepo string, issue, number int) int { + key := mergeTrainIssueWinnerKey(lane, owner, repo, base, issue) + c.mergeTrainMu.Lock() + if w := c.mergeTrainIssueWinners[key]; w > 0 && w != number { + c.mergeTrainMu.Unlock() + return w + } + _, had := c.mergeTrainIssueWinners[key] + if c.mergeTrainIssueWinners == nil { + c.mergeTrainIssueWinners = map[string]int{} + } + c.mergeTrainIssueWinners[key] = number + c.mergeTrainMu.Unlock() + if !had { + c.info("merge train: first at the merge gate keeps the issue", "repo", displayRepo, "pr", number, "issue", issue, "base", base, "lane", lane) + } + return number +} + +// mergeTrainRememberedWinners reads the winner the lane kept on base on +// an earlier pass for each issue two or more candidates close. +func (c *Engine) mergeTrainRememberedWinners(lane, owner, repo, base string, byIssue map[int][]mergeTrainDuplicateCandidate) map[int]int { + out := map[int]int{} + c.mergeTrainMu.Lock() + defer c.mergeTrainMu.Unlock() + for issue, cands := range byIssue { + if len(cands) < 2 { + continue + } + if w, ok := c.mergeTrainIssueWinners[mergeTrainIssueWinnerKey(lane, owner, repo, base, issue)]; ok { + out[issue] = w + } + } + return out +} + +// rememberMergeTrainWinners stores this pass's pick on base per contested +// issue: a winner is kept for the next pass; an issue nobody at the gate +// holds is forgotten, so the first of its PRs at the merge point takes +// it. A new winner is logged once. +func (c *Engine) rememberMergeTrainWinners(lane, owner, repo, base, displayRepo string, winners map[int]int) { + type pick struct{ issue, winner, was int } + var picked []pick + c.mergeTrainMu.Lock() + for issue, w := range winners { + key := mergeTrainIssueWinnerKey(lane, owner, repo, base, issue) + was := c.mergeTrainIssueWinners[key] + if w <= 0 { + delete(c.mergeTrainIssueWinners, key) + continue + } + if c.mergeTrainIssueWinners == nil { + c.mergeTrainIssueWinners = map[string]int{} + } + c.mergeTrainIssueWinners[key] = w + if was != w { + picked = append(picked, pick{issue: issue, winner: w, was: was}) + } + } + c.mergeTrainMu.Unlock() + sort.Slice(picked, func(i, j int) bool { return picked[i].issue < picked[j].issue }) + for _, p := range picked { + c.info("merge train: same-issue winner picked at the merge gate", "repo", displayRepo, "issue", p.issue, "base", base, "winner", p.winner, "previous", p.was, "lane", lane) + } +} + +// forgetClosedMergeTrainWinners drops the lane's remembered winners on +// owner/repo whose PR is no longer among the repository's open PRs. +func (c *Engine) forgetClosedMergeTrainWinners(lane, owner, repo string, open []*gh.PullRequest) { + if len(open) == 0 { + return + } + alive := make(map[int]bool, len(open)) + for _, pr := range open { + if pr != nil && pr.GetNumber() > 0 && (pr.State == nil || pr.GetState() == "open") { + alive[pr.GetNumber()] = true + } + } + prefix := mergeTrainVerdictKey(lane, owner, repo, 0) + prefix = prefix[:strings.LastIndex(prefix, "#")+1] + c.mergeTrainMu.Lock() + defer c.mergeTrainMu.Unlock() + for key, w := range c.mergeTrainIssueWinners { + if strings.HasPrefix(key, prefix) && !alive[w] { + delete(c.mergeTrainIssueWinners, key) + } + } +} diff --git a/src/pkg/github/automerge/automerge_merge_train_duplicate_test.go b/src/pkg/github/automerge/automerge_merge_train_duplicate_test.go index 35f2ed1770..eec863ffad 100644 --- a/src/pkg/github/automerge/automerge_merge_train_duplicate_test.go +++ b/src/pkg/github/automerge/automerge_merge_train_duplicate_test.go @@ -2,6 +2,7 @@ package automerge import ( "context" + "slices" "testing" "time" @@ -40,33 +41,82 @@ func TestMergeTrainDuplicateWinner(t *testing.T) { } } -func TestMergeTrainDuplicateHolds(t *testing.T) { +// The one-PR-per-issue rule picks only between heads at the merge gate +// and keeps its pick until the winner is blocked for good +// (hivecommons/hive#17439): a head still running CI is neither picked nor +// held — it claims the issue's turn at the merge point instead. +func TestMergeTrainDuplicatePicks(t *testing.T) { t0 := time.Date(2026, 10, 29, 10, 0, 0, 0, time.UTC) - byIssue := map[int][]mergeTrainDuplicateCandidate{ - 15396: {{Number: 15402, CreatedAt: t0, Green: true}, {Number: 15407, CreatedAt: t0.Add(time.Hour), Green: true}}, - 15300: {{Number: 15320, CreatedAt: t0, Green: false}, {Number: 15330, CreatedAt: t0.Add(time.Hour), Green: true}}, - 15999: {{Number: 15350, CreatedAt: t0, Green: true}}, - } - got := mergeTrainDuplicateHolds(byIssue) - want := []mergeTrainDuplicateHold{{Number: 15320, Winner: 15330, Issue: 15300}, {Number: 15407, Winner: 15402, Issue: 15396}} - if len(got) != len(want) { - t.Fatalf("holds = %+v, want %+v", got, want) - } - for i := range want { - if got[i] != want[i] { - t.Fatalf("hold[%d] = %+v, want %+v", i, got[i], want[i]) - } + cand := func(n, min int, atGate bool) mergeTrainDuplicateCandidate { + return mergeTrainDuplicateCandidate{Number: n, CreatedAt: t0.Add(time.Duration(min) * time.Minute), Green: atGate, AtGate: atGate} } - reason := mergeTrainDuplicateReason(want[1]) - if reason != "merge-train:duplicate-of#15402:15396/0:0/0:" { - t.Fatalf("reason = %q", reason) + terminal := func(c mergeTrainDuplicateCandidate) mergeTrainDuplicateCandidate { + c.Terminal = true + return c } - m, ok := prstage.ParseMergeTrain(reason) - if !ok || m.State != prstage.MergeTrainStateDuplicateOf || m.Front != 15402 || m.Position != 15396 { - t.Fatalf("parse = %+v ok=%v", m, ok) + for _, tc := range []struct { + name string + cands []mergeTrainDuplicateCandidate + remembered int + winner int + held []int + turns []int + }{ + {"both at the gate: the earlier wins, the later is held", []mergeTrainDuplicateCandidate{cand(15407, 30, true), cand(15402, 0, true)}, 0, 15402, []int{15407}, nil}, + {"CI running on both: nobody is picked or held", []mergeTrainDuplicateCandidate{cand(15402, 0, false), cand(15407, 30, false)}, 0, 0, nil, []int{15402, 15407}}, + {"only the later at the gate: it takes the issue, the earlier is not held", []mergeTrainDuplicateCandidate{cand(15402, 0, false), cand(15407, 30, true)}, 0, 15407, nil, []int{15402}}, + {"remembered winner with a red check keeps the issue", []mergeTrainDuplicateCandidate{cand(15402, 0, false), cand(15407, 30, true)}, 15402, 15402, []int{15407}, nil}, + {"remembered winner blocked for good lets it go", []mergeTrainDuplicateCandidate{terminal(cand(15402, 0, false)), cand(15407, 30, true)}, 15402, 15407, nil, []int{15402}}, + {"remembered winner gone: re-picked at the gate", []mergeTrainDuplicateCandidate{cand(15407, 30, true), cand(15410, 60, true)}, 15402, 15407, []int{15410}, nil}, + } { + t.Run(tc.name, func(t *testing.T) { + winners, holds, turns := mergeTrainDuplicatePicks(map[int][]mergeTrainDuplicateCandidate{15396: tc.cands}, map[int]int{15396: tc.remembered}) + if winners[15396] != tc.winner { + t.Fatalf("winner = #%d, want #%d", winners[15396], tc.winner) + } + var held []int + for _, h := range holds { + if h.Winner != tc.winner || h.Issue != 15396 { + t.Fatalf("hold %+v, want behind #%d for #15396", h, tc.winner) + } + held = append(held, h.Number) + } + if !slices.Equal(held, tc.held) { + t.Fatalf("held = %v, want %v", held, tc.held) + } + var turned []int + for n, issues := range turns { + if !slices.Equal(issues, []int{15396}) { + t.Fatalf("turn of #%d = %v", n, issues) + } + turned = append(turned, n) + } + slices.Sort(turned) + if !slices.Equal(turned, tc.turns) { + t.Fatalf("turns = %v, want %v", turned, tc.turns) + } + }) + } + + // A PR closing two issues is held on the first it loses and claims no + // turn on the other; an issue only one PR closes is no contest. + winners, holds, turns := mergeTrainDuplicatePicks(map[int][]mergeTrainDuplicateCandidate{ + 15300: {cand(15320, 0, true), cand(15330, 60, true)}, + 15301: {cand(15330, 60, true), cand(15340, 90, false)}, + 15999: {cand(15350, 0, true)}, + }, nil) + if len(holds) != 1 || holds[0] != (mergeTrainDuplicateHold{Number: 15330, Winner: 15320, Issue: 15300}) { + t.Fatalf("holds = %+v", holds) + } + if len(turns) != 1 || !slices.Equal(turns[15340], []int{15301}) { + t.Fatalf("turns = %v", turns) + } + if _, contested := winners[15999]; contested || winners[15301] != 15330 { + t.Fatalf("winners = %v", winners) } - if s := m.Sentence(); s != "duplicate of #15402 for issue #15396; superseded by #15402 — the merge queue carries one PR per issue; close it or let the delegate decide" { - t.Fatalf("sentence = %q", s) + mt, ok := prstage.ParseMergeTrain(mergeTrainDuplicateReason(holds[0])) + if !ok || mt.State != prstage.MergeTrainStateDuplicateOf || mt.Front != 15320 || mt.Position != 15300 { + t.Fatalf("reason parsed %+v ok=%v", mt, ok) } } @@ -86,6 +136,9 @@ func TestPlanDuplicateHoldsFiltersCandidates(t *testing.T) { pr(15411, "Fixes #15397", t0, "clean"), } plan := &mergeTrainPlan{lane: "self", displayRepo: "o/r"} + for _, p := range prs { + c.noteMergeTrainOutcome(stageLaneSelf, "o", "r", p.GetNumber(), p.GetHead().GetSHA(), "") + } kept := c.planDuplicateHolds(context.Background(), plan, stageLaneSelf, "o", "r", "o/r", prs, func(*gh.PullRequest) string { return "" }) if len(kept) != 3 || kept[0].GetNumber() != 15407 { t.Fatalf("kept = %v", kept) @@ -154,6 +207,76 @@ func TestPlanMergeTrainsHoldsSameIssueDuplicate(t *testing.T) { } } +// hivecommons/hive#17439: #17414 and #17415 fixed one issue and, with CI +// at 19/64, both read "needs human decision" while the winner flipped on +// every red check. A head short of the merge gate is not held: the lane +// evaluates it, so its row reads CI running. The first to reach the merge +// point keeps the issue; the other is held there and, at the gate, held +// behind it. A red check on the winner does not flip the pick; a block no +// re-run clears does. +func TestPlanDuplicateHoldsJudgesOnlyHeadsAtTheGate(t *testing.T) { + c := &Engine{} + t0 := time.Date(2026, 11, 9, 17, 0, 0, 0, time.UTC) + early, late := claimPR(17414, "hive-app[bot]", "Fixes #17392", t0), claimPR(17415, "hive-app[bot]", "Fixes #17392", t0.Add(time.Minute)) + prs := []*gh.PullRequest{early, late} + note := func(pr *gh.PullRequest, reason string) { + c.noteMergeTrainOutcome(stageLaneSelf, "o", "r", pr.GetNumber(), pr.GetHead().GetSHA(), reason) + } + plan := func() *mergeTrainPlan { + p := &mergeTrainPlan{lane: stageLaneSelf, displayRepo: "o/r", owner: "o", repo: "r"} + c.planDuplicateHolds(context.Background(), p, stageLaneSelf, "o", "r", "o/r", prs, func(*gh.PullRequest) string { return "" }) + return p + } + atMergePoint := func(p *mergeTrainPlan, pr *gh.PullRequest) string { + return mergeTrainCandidateHold(c.mergeTrainEvalContext(context.Background(), p, pr.GetNumber())) + } + + note(early, "required-check-failing:lint") + note(late, "required-check-pending:build") + p := plan() + if p.duplicates != nil || p.claimConflicts != nil { + t.Fatalf("held while CI runs: dup=%v conflict=%v", p.duplicates, p.claimConflicts) + } + if _, turn := p.issueTurnOf(17414); !turn { + t.Fatal("the red head carries no turn to the merge point") + } + if r := atMergePoint(p, late); r != "" { + t.Fatalf("first at the merge point held: %q", r) + } + held := atMergePoint(p, early) + if mt, ok := prstage.ParseMergeTrain(held); !ok || mt.State != prstage.MergeTrainStateDuplicateOf || mt.Front != 17415 || mt.Position != 17392 { + t.Fatalf("second at the merge point = %q", held) + } + + note(late, prstage.ContributorLaneReasonSoaking) + note(early, held) + p = plan() + if h, ok := p.duplicateOf(17414); !ok || h.Winner != 17415 || h.Issue != 17392 { + t.Fatalf("at the gate behind the first: %+v held=%v", h, ok) + } + if _, ok := p.duplicateOf(17415); ok { + t.Fatal("the winner is held") + } + + note(late, "required-check-failing:build") + p = plan() + if h, ok := p.duplicateOf(17414); !ok || h.Winner != 17415 { + t.Fatalf("a red check flipped the pick: %+v held=%v", h, ok) + } + + note(late, "not-mergeable") + p = plan() + if _, ok := p.duplicateOf(17414); ok { + t.Fatal("a winner blocked for good still holds the issue") + } + if r := atMergePoint(p, early); r != "" { + t.Fatalf("the new winner is held at the merge point: %q", r) + } + if mt, ok := prstage.ParseMergeTrain(atMergePoint(p, late)); !ok || mt.State != prstage.MergeTrainStateDuplicateOf || mt.Front != 17414 { + t.Fatalf("the old winner at the merge point = %+v ok=%v", mt, ok) + } +} + // The same fix opened against two release lines says "Fixes #N" twice and // is not a duplicate: neither PR is held and neither is a claim conflict // (hivecommons/hive#17436). Two PRs on the SAME line still compete. @@ -168,6 +291,10 @@ func TestPlanDuplicateHoldsGroupsByBaseBranch(t *testing.T) { pr(17415, "v6", t0.Add(time.Minute)), pr(17420, "v6", t0.Add(2*time.Minute)), } + // Every head is at the merge gate, so the rule judges them now. + for _, p := range prs { + c.noteMergeTrainOutcome(stageLaneSelf, "o", "r", p.GetNumber(), p.GetHead().GetSHA(), prstage.ContributorLaneReasonSoaking) + } plan := &mergeTrainPlan{lane: "self", displayRepo: "o/r"} kept := c.planDuplicateHolds(context.Background(), plan, stageLaneSelf, "o", "r", "o/r", prs, func(*gh.PullRequest) string { return "" }) if len(kept) != 2 || kept[0].GetNumber() != 17414 || kept[1].GetNumber() != 17415 { diff --git a/src/pkg/github/automerge/automerge_sweep_loop.go b/src/pkg/github/automerge/automerge_sweep_loop.go index 7094451fd9..9626c2f2a3 100644 --- a/src/pkg/github/automerge/automerge_sweep_loop.go +++ b/src/pkg/github/automerge/automerge_sweep_loop.go @@ -303,7 +303,7 @@ func (c *Engine) SweepSelfAuthoredAutoMerges(ctx context.Context, opts AutoMerge result.Candidates++ repoCandidates++ c.sweepClock.evaluating(repo, number) - event, reason, err := c.trySweepSelfAuthoredPR(withMergeTrainCandidateHold(ctx, c.mergeTrainCandidateReason(train, number)), repo, owner, repoName, number, branchUpdateAttempts < selfAuthoredSweepMaxBranchUpdates) + event, reason, err := c.trySweepSelfAuthoredPR(c.mergeTrainEvalContext(ctx, train, number), repo, owner, repoName, number, branchUpdateAttempts < selfAuthoredSweepMaxBranchUpdates) c.sweepClock.evaluated() if event.BranchUpdated || reason == "updated-branch" || reason == "update-branch" { branchUpdateAttempts++ @@ -498,7 +498,7 @@ func (c *Engine) SweepTrustedAuthorAutoMerges(ctx context.Context, opts AutoMerg } result.Candidates++ c.sweepClock.evaluating(displayRepo, number) - event, reason, err := c.trySweepTrustedAuthorPR(withMergeTrainCandidateHold(ctx, c.mergeTrainCandidateReason(train, number)), displayRepo, owner, repoName, number, policy) + event, reason, err := c.trySweepTrustedAuthorPR(c.mergeTrainEvalContext(ctx, train, number), displayRepo, owner, repoName, number, policy) c.sweepClock.evaluated() if err == nil { c.noteMergeTrainOutcome(stageLaneTrusted, owner, repoName, number, pr.GetHead().GetSHA(), reason) From a546424365192d6ceac94197899f8eb9fca3c70a Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 23:41:56 +0000 Subject: [PATCH 077/123] =?UTF-8?q?=F0=9F=90=9B=20fix(knowledge):=20make?= =?UTF-8?q?=20advisor=5Fllm=20endpoint=20path-aware=20for=20the=20Copilot?= =?UTF-8?q?=20chat=20API=20(#17469)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(knowledge): make advisor_llm endpoint path-aware so Copilot chat API works without a query hack Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> * 🐛 fix(knowledge): delegate advisor_llm URL to LiteLLMChatCompletionsURL; document full Copilot endpoint Address review findings on #17469: - knowledgeAdviserLLMURL keeps only the /chat/completions pass-through and delegates the /v1 and bare-host arms to config.LiteLLMChatCompletionsURL so the two cannot drift. - Docs now give a single Copilot instruction (the full https://api.githubcopilot.com/chat/completions) and explain why the bare host 404s instead of contradicting themselves. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- changelog.d/fixed-advisor-llm-endpoint-path.md | 1 + src/cmd/hive/knowledge_adviser_llm.go | 14 +++++++++++++- src/cmd/hive/knowledge_adviser_llm_test.go | 13 +++++++++++++ src/docs/agent-knowledge-and-memory.md | 8 ++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 changelog.d/fixed-advisor-llm-endpoint-path.md diff --git a/changelog.d/fixed-advisor-llm-endpoint-path.md b/changelog.d/fixed-advisor-llm-endpoint-path.md new file mode 100644 index 0000000000..e5367dcbd0 --- /dev/null +++ b/changelog.d/fixed-advisor-llm-endpoint-path.md @@ -0,0 +1 @@ +- The knowledge advisor_llm endpoint is now path-aware: an endpoint already ending in `/chat/completions` is used as-is and a `/v1` base gets `/chat/completions`, so the Copilot chat API (`https://api.githubcopilot.com/chat/completions`) works without a `?_=` query hack. Bare-host endpoints behave as before. diff --git a/src/cmd/hive/knowledge_adviser_llm.go b/src/cmd/hive/knowledge_adviser_llm.go index da6507e872..233a540260 100644 --- a/src/cmd/hive/knowledge_adviser_llm.go +++ b/src/cmd/hive/knowledge_adviser_llm.go @@ -344,13 +344,25 @@ func buildKnowledgeAdviserLLMPrompt(kickSummary string, scope crux.KnowledgeScop return b.String() } +// knowledgeAdviserLLMURL maps the configured endpoint to the chat URL: a base +// already ending in /chat/completions is used as-is (the Copilot API has no +// /v1 prefix); anything else is delegated to config.LiteLLMChatCompletionsURL +// so the /v1 and bare-host handling stays in one place. +func knowledgeAdviserLLMURL(endpoint string) string { + base := strings.TrimRight(strings.TrimSpace(endpoint), "/") + if strings.HasSuffix(base, "/chat/completions") { + return base + } + return config.LiteLLMChatCompletionsURL(base) +} + func (d *knowledgeAdviserLLM) complete(ctx context.Context, r config.ResolvedAdvisorLLM, reqBody knowledgeAdviserLLMRequest) (knowledgeAdviserLLMResponse, error) { var cr knowledgeAdviserLLMResponse body, err := json.Marshal(reqBody) if err != nil { return cr, fmt.Errorf("marshal knowledge advisor request: %w", err) } - req, err := http.NewRequestWithContext(ctx, http.MethodPost, r.Endpoint+"/v1/chat/completions", bytes.NewReader(body)) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, knowledgeAdviserLLMURL(r.Endpoint), bytes.NewReader(body)) if err != nil { return cr, fmt.Errorf("build knowledge advisor request: %w", err) } diff --git a/src/cmd/hive/knowledge_adviser_llm_test.go b/src/cmd/hive/knowledge_adviser_llm_test.go index 5ddeba5bf5..9a478e9cd7 100644 --- a/src/cmd/hive/knowledge_adviser_llm_test.go +++ b/src/cmd/hive/knowledge_adviser_llm_test.go @@ -353,6 +353,19 @@ func TestKnowledgeAdviserLLM_EndpointErrorFallsBackPerOnError(t *testing.T) { } } +func TestKnowledgeAdviserLLMURL(t *testing.T) { + for in, want := range map[string]string{ + "https://api.githubcopilot.com": "https://api.githubcopilot.com/v1/chat/completions", + "https://x.example/v1": "https://x.example/v1/chat/completions", + "https://x.example/v1/": "https://x.example/v1/chat/completions", + "https://api.githubcopilot.com/chat/completions": "https://api.githubcopilot.com/chat/completions", + } { + if got := knowledgeAdviserLLMURL(in); got != want { + t.Errorf("knowledgeAdviserLLMURL(%q) = %q, want %q", in, got, want) + } + } +} + func TestKnowledgeAdviserLLM_PerAgentHourBudget(t *testing.T) { f := newLLMFixture(t, config.AdvisorLLMConfig{Mode: config.AdvisorLLMModeRank, OnError: config.AdvisorLLMOnErrorSilence}) for i := 0; i < config.AdvisorLLMMaxCallsPerAgentHourCap; i++ { diff --git a/src/docs/agent-knowledge-and-memory.md b/src/docs/agent-knowledge-and-memory.md index 3f6392b28d..9cbac7e37b 100644 --- a/src/docs/agent-knowledge-and-memory.md +++ b/src/docs/agent-knowledge-and-memory.md @@ -161,6 +161,14 @@ flowchart LR 600 characters), the runtime's scrubbed pane tail (`pane_lines`, verbatim) and each candidate as `slug — title — summary` with the same ≤300-character summary phase 1 would type. Entry bodies never reach the model. +- **Endpoint path.** A bare host gets `/v1/chat/completions`, a base ending in + `/v1` gets `/chat/completions`, and an endpoint already ending in + `/chat/completions` is used as-is. For the Copilot API set + `endpoint: https://api.githubcopilot.com/chat/completions` with + `api_key_file: /data/copilot-user-token`. Do not use the bare + `https://api.githubcopilot.com` host: it would get `/v1/chat/completions` + appended, and the Copilot API has no `/v1` prefix, so the call 404s (and + under `on_error: silence` the advisor is disabled silently). - **Call.** One chat completion per decision: `temperature: 0`, about 120 output tokens, `timeout_s`, and the `user` field set to `hive-knowledge-advisor:` so proxy spend logs attribute cost per From 5ec64269158164c6986520362daf019f68104b5d Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Mon, 9 Nov 2026 23:48:13 +0000 Subject: [PATCH 078/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.2 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 12 ++++++++++++ .../changed-17451-fork-pr-presubmit-runbook.md | 1 - .../fixed-17439-merge-train-same-issue-gate.md | 1 - changelog.d/fixed-dependabot-alerts-permission.md | 1 - changelog.d/fixed-hub-forge-unreachable-badge.md | 1 - 5 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/changed-17451-fork-pr-presubmit-runbook.md delete mode 100644 changelog.d/fixed-17439-merge-train-same-issue-gate.md delete mode 100644 changelog.d/fixed-dependabot-alerts-permission.md delete mode 100644 changelog.d/fixed-hub-forge-unreachable-badge.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a06e3c4e4..436af26fe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,18 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-09 (v5.211.2) + +### Changed + +- A new [fork PR presubmit stall runbook](https://github.com/hivecommons/hive/blob/v5/src/docs/fork-pr-presubmit-stall-runbook.md) documents how to tell a missing Prow presubmit from a failing one and how to clear it with `/ok-to-test`, and what to do when dashboard-relayed `/lgtm` and `/approve` are rejected; the code fixes remain open in [#17451](https://github.com/hivecommons/hive/issues/17451). + +### Fixed + +- The merge train's one-PR-per-issue and same-issue claim-conflict holds now judge only heads at the merge gate ([#17439](https://github.com/hivecommons/hive/issues/17439)). A PR whose CI is still running or whose review is outstanding is evaluated as usual, so its tracker row reads CI / Review instead of "needs human decision · Let hive decide", and it is held at the merge point only if it gets there. The first same-issue PR at the merge point keeps the issue and that pick stands until it closes or is blocked for good, so a check going red mid-run no longer flips the winner and two PRs no longer wear each other's number as `duplicate-of`. +- The sec-check agent's Dependabot alerts call no longer 403s once the GitHub App is granted the new read-only Dependabot alerts permission (documented in the GitHub App setup guide); existing installations must re-accept it once. Only the sec-check role's token requests the grant — other agents' tokens are unchanged. +- hub: hives whose spoke reports `forge_unreachable` are labelled "forge unreachable (github_host)" instead of generic stale badges, and the condition no longer counts against their health or advisory status + ## 2026-11-09 (v5.211.1) ### Changed diff --git a/changelog.d/changed-17451-fork-pr-presubmit-runbook.md b/changelog.d/changed-17451-fork-pr-presubmit-runbook.md deleted file mode 100644 index 445b2f5673..0000000000 --- a/changelog.d/changed-17451-fork-pr-presubmit-runbook.md +++ /dev/null @@ -1 +0,0 @@ -- A new [fork PR presubmit stall runbook](https://github.com/hivecommons/hive/blob/v5/src/docs/fork-pr-presubmit-stall-runbook.md) documents how to tell a missing Prow presubmit from a failing one and how to clear it with `/ok-to-test`, and what to do when dashboard-relayed `/lgtm` and `/approve` are rejected; the code fixes remain open in [#17451](https://github.com/hivecommons/hive/issues/17451). diff --git a/changelog.d/fixed-17439-merge-train-same-issue-gate.md b/changelog.d/fixed-17439-merge-train-same-issue-gate.md deleted file mode 100644 index 7391997b45..0000000000 --- a/changelog.d/fixed-17439-merge-train-same-issue-gate.md +++ /dev/null @@ -1 +0,0 @@ -- The merge train's one-PR-per-issue and same-issue claim-conflict holds now judge only heads at the merge gate ([#17439](https://github.com/hivecommons/hive/issues/17439)). A PR whose CI is still running or whose review is outstanding is evaluated as usual, so its tracker row reads CI / Review instead of "needs human decision · Let hive decide", and it is held at the merge point only if it gets there. The first same-issue PR at the merge point keeps the issue and that pick stands until it closes or is blocked for good, so a check going red mid-run no longer flips the winner and two PRs no longer wear each other's number as `duplicate-of`. diff --git a/changelog.d/fixed-dependabot-alerts-permission.md b/changelog.d/fixed-dependabot-alerts-permission.md deleted file mode 100644 index 435a44da9c..0000000000 --- a/changelog.d/fixed-dependabot-alerts-permission.md +++ /dev/null @@ -1 +0,0 @@ -- The sec-check agent's Dependabot alerts call no longer 403s once the GitHub App is granted the new read-only Dependabot alerts permission (documented in the GitHub App setup guide); existing installations must re-accept it once. Only the sec-check role's token requests the grant — other agents' tokens are unchanged. diff --git a/changelog.d/fixed-hub-forge-unreachable-badge.md b/changelog.d/fixed-hub-forge-unreachable-badge.md deleted file mode 100644 index e67ea35bbf..0000000000 --- a/changelog.d/fixed-hub-forge-unreachable-badge.md +++ /dev/null @@ -1 +0,0 @@ -- hub: hives whose spoke reports `forge_unreachable` are labelled "forge unreachable (github_host)" instead of generic stale badges, and the condition no longer counts against their health or advisory status From 7573389c799856b4937c34361b02de5796d1c0aa Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Tue, 10 Nov 2026 00:19:03 +0000 Subject: [PATCH 079/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.3 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-advisor-llm-endpoint-path.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-advisor-llm-endpoint-path.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 436af26fe8..6877c31cc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-10 (v5.211.3) + +### Fixed + +- The knowledge advisor_llm endpoint is now path-aware: an endpoint already ending in `/chat/completions` is used as-is and a `/v1` base gets `/chat/completions`, so the Copilot chat API (`https://api.githubcopilot.com/chat/completions`) works without a `?_=` query hack. Bare-host endpoints behave as before. + ## 2026-11-09 (v5.211.2) ### Changed diff --git a/changelog.d/fixed-advisor-llm-endpoint-path.md b/changelog.d/fixed-advisor-llm-endpoint-path.md deleted file mode 100644 index e5367dcbd0..0000000000 --- a/changelog.d/fixed-advisor-llm-endpoint-path.md +++ /dev/null @@ -1 +0,0 @@ -- The knowledge advisor_llm endpoint is now path-aware: an endpoint already ending in `/chat/completions` is used as-is and a `/v1` base gets `/chat/completions`, so the Copilot chat API (`https://api.githubcopilot.com/chat/completions`) works without a `?_=` query hack. Bare-host endpoints behave as before. From cb742f97c3b85e7dac8d7046b175ebaee0f750a2 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 19:27:47 -0500 Subject: [PATCH 080/123] =?UTF-8?q?=F0=9F=90=9B=20activity=20monitor:=20li?= =?UTF-8?q?ght=20a=20needs-decision=20PR's=20real=20stage=20and=20carry=20?= =?UTF-8?q?the=20ask=20as=20a=20pill=20(#17457)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 activity monitor: light a needs-decision PR's real stage and carry the ask as a pill A PR parked at stage/085-needs-decision whose head is short of merge-ready (checks running, red or unreported; review verdict pending or asking for a person) forced a 'Needs human · decision' chevron into the PR in progress column while the CI and Review chevrons spun dim (#17442 under #17426; #17416 read 'Needs human · review' the same way). The lit chevron is now the PR's real stage: the CI track (with motion while checks run) or the Review track, wearing an amber ham-human-gated marker; PR in progress is passed and Merge queue stays empty. The ask rides as the needs-decision pill (human icon, question in the hover, decision popover on click) — the server re-adds the modifier once the head's tracks are known, and the page derives it for older payloads — and the lit track's tooltip ends '· needs a person: '. One lit stage per row. Only a merge-ready, queued or merging 085 keeps the gate. Fixes #17453 Signed-off-by: Andrew Anderson * fix(dashboard): sync shared anchor asset; needs-decision fallback yields to human pills Signed-off-by: Andrew Anderson * fix(dashboard): pad the needs-decision popover pill to the phone tap target Signed-off-by: Andrew Anderson * fix(dashboard): keep the needs-decision pill on one line in nested-PR heads Signed-off-by: Andrew Anderson * fix(dashboard): ask pill wears the person icon and folds to it in the stacked head Signed-off-by: Andrew Anderson * test(dashboard): track the ask pill's trigger call in the popover source guard Signed-off-by: Andrew Anderson --------- Signed-off-by: Andrew Anderson --- .../fixed-needs-decision-real-stage.md | 1 + .../dashboard-sections/activity-monitor.md | 9 +- src/pkg/dashboard/stage_tracker_build.go | 6 +- .../stage_tracker_decision_popover_test.go | 2 +- .../stage_tracker_hold_provenance_test.go | 27 ++++++ .../stage_tracker_item_column_test.go | 48 ++++++++--- src/pkg/dashboard/stage_tracker_test.go | 5 +- .../dashboard/stage_tracker_ui_rows_test.go | 67 ++++++++++++--- src/pkg/dashboard/stage_tracker_vocabulary.go | 50 ++++++++--- src/pkg/dashboard/static-src/css/tracker.css | 18 ++++ .../static-src/js/tracker-row-anchor.js | 9 +- .../static-src/js/tracker-row-strip.js | 34 +++++++- .../static-src/js/tracker-words-core.js | 21 +++-- src/pkg/dashboard/static/index.html | 82 +++++++++++++++---- .../trackerrow/tracker-row-anchor.js | 9 +- 15 files changed, 314 insertions(+), 74 deletions(-) create mode 100644 changelog.d/fixed-needs-decision-real-stage.md diff --git a/changelog.d/fixed-needs-decision-real-stage.md b/changelog.d/fixed-needs-decision-real-stage.md new file mode 100644 index 0000000000..4f4d690831 --- /dev/null +++ b/changelog.d/fixed-needs-decision-real-stage.md @@ -0,0 +1 @@ +- Activity Monitor: a PR parked at `stage/085-needs-decision` whose head is short of merge-ready (checks running, red or unreported; review verdict pending or asking for a person) now lights its real stage — the CI or Review track, with an amber human-gated marker — and carries the ask as the **needs human decision** pill (question in the hover, decision popover on click) instead of forcing a *Needs human · decision* chevron into the PR in progress column while CI and Review spun dim (#17442, #17416). PR in progress is passed, Merge queue stays empty; one lit stage per row. diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 3ce88077a7..2213e3a2ab 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -72,7 +72,7 @@ Side stages share a column rather than adding columns: | 045 Needs human decision | Actionable on an issue. A pre-045 issue still wearing 085 is drawn here until reconciliation. | | 070 Fixing / 071 Needs author / 072 Returned to contributor | CI / Review: Hive repairs its own PR at 070; a human author acts at 071; a contributor agent gets its PR back at 072. `needs-rebase` explains a repair here, not at 050. | | 074 Adopted by hive | CI / Review while the Hive repairs adopted work; pending, green or red pushes remain 074 until the merge gate takes it. | -| 085 Needs human decision / 090 Ready for human merge | Merge queue on a PR. Read the decision or merge reason rather than assuming Hive will merge it. A 090 cell reading **Held · sentinel · confirm intent** or **Held · hold** is a gate on an otherwise ready PR: Hive never merges it while the gate stands. | +| 085 Needs human decision / 090 Ready for human merge | A human gate is a pill on the PR's real stage, not a stage of its own ([#17327](https://github.com/hivecommons/hive/issues/17327), [#17453](https://github.com/hivecommons/hive/issues/17453)). A 085 PR whose head is short of merge-ready — checks running, red or unreported; the review verdict pending or asking for a person — lights **CI / Review** (the CI track while checks run or are not green, the Review track while its verdict is what waits), with an amber marker on the lit track and the **needs human decision** pill carrying the question (its popover holds the actions); PR in progress is passed, Merge queue empty. Only a 085 PR that is merge-ready (review approved, CI green on this head), queued or merging, and every 090, sits in the **Merge queue** column — read the decision or merge reason rather than assuming Hive will merge it. A 090 cell reading **Held · sentinel · confirm intent** or **Held · hold** is a gate on an otherwise ready PR: Hive never merges it while the gate stands. | | 060 / 080 / 095 / 100 | Separate gate states; use the [merge-gate reference](#merge-queue-pills--legend) below for exact words and countdowns. | The author legend is a blue Hive hexagon, purple contributor-agent robot or teal human silhouette. The kind is `author/*`, inferred from the snapshot if its label is absent; the link tooltip names the login. On Claimed, the actor is the claim holder; on PR in progress and Returned to contributor it is the author. Hive owns review, adoption and auto-merge work; a human owns a human decision or manual merge. The payload's `stage_actor` is the authoritative actor (see [Who is on it](#who-is-on-it-actor-icons)). @@ -244,13 +244,13 @@ The payload also carries `sentinel_details`: one entry per finding with its `rul A person's *Approve* through that dialog **is** the human review the alert asked for: it removes the `sentinel-alert` label when present and records a `sentinel_acknowledged` human action keyed to the head in the review evidence bundle, so a bundle-only alert (findings but no label — hivecommons/crux#30) clears too; the payload then reads `sentinel_alert: false` with `sentinel_reason` suffixed `— acknowledged by @login`, the findings stay on record, and a new head starts over. -The delegated *Let hive decide* path never clears it. Hovering the lit chevron of a parked row names the parking stage itself (`Needs human decision`), not the 080 column it rides on; `Next move` follows the real stage (human at 085 and at a held 090, hive at 080). A held row's stage never advances the merge: the lanes and the dashboard's one-click shortcuts check the gate itself, so a parked PR never merges unattended. Lane text and chip update in place on refresh (keyed reconcile, no flash). +The delegated *Let hive decide* path never clears it. Hovering the lit chevron of a parked row names the parking stage itself (`Needs human decision`) when it sits in the Merge queue column, and *· needs a person: * on the lit CI / Review track when the head is not merge-ready ([#17453](https://github.com/hivecommons/hive/issues/17453)); `Next move` follows the real stage (human at 085 and at a held 090, hive at 080). A held row's stage never advances the merge: the lanes and the dashboard's one-click shortcuts check the gate itself, so a parked PR never merges unattended. Lane text and chip update in place on refresh (keyed reconcile, no flash). #### Unauthorized pill A pull request the hive cannot move because its GitHub App lacks a permission for the next step — it wears `hive:unauthorized` ([#14589](https://github.com/hivecommons/hive/issues/14589)); first case: approving held `action_required` workflow runs needs `actions: write` — carries the `unauthorized` modifier in the tracker payload, drawn in the far-right pill column exactly like `stalled` / `hold` / `draft` but muted (dashed, `--text-muted`), never red: it is nothing wrong, just a step only a person may take. -It counts under **Needs attention**. Before the merge gate only the held-workflow-runs step shows (see *Pills before the merge gate*). Its tooltip (payload `unauthorized`) names the missing permission and the human step; on the **Needs human decision** lane the lit chevron and the caption read **Awaiting human: approve workflow runs** (payload `unauthorized_step`, from the `unauthorized:` stage reason). The pill, label and payload fields clear themselves in the tick the step is no longer needed. +It counts under **Needs attention**. Before the merge gate only the held-workflow-runs step shows (see *Pills before the merge gate*). Its tooltip (payload `unauthorized`) names the missing permission and the human step; on the **Needs human decision** lane the caption reads **Awaiting human: approve workflow runs** (payload `unauthorized_step`, from the `unauthorized:` stage reason) and the row lights its real stage — the CI / Review track, amber-marked — with the `unauthorized` pill carrying the step ([#16524](https://github.com/hivecommons/hive/issues/16524), [#17453](https://github.com/hivecommons/hive/issues/17453)). The pill, label and payload fields clear themselves in the tick the step is no longer needed. #### Merge train @@ -456,7 +456,8 @@ An *active* chevron is filled amber and carries words; an inactive one is its ic 2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current — filled but still, icon only, its words in the tooltip — and nothing else is active. Settled-current is always the neutral fill: the Open column's draft, blocked, New and stale tints and the held-gate amber never repaint it, so the running track is the row's only coloured chevron ([#17461](https://github.com/hivecommons/hive/issues/17461): a draft PR with no stage yet read as a slate Open beside amber CI). 3. **CI leads Review.** When both tracks would light at once — CI running while the review is queued, in progress or being re-adjudicated — CI is the lit chevron and Review is dim with a small note (*re-review queued* after a push, *review in progress*, *review queued*); its words stay in the tooltip, ending *… behind CI*. The stage chevron is the fallback: active only when no track is in motion. 4. **The PR in progress chevron speaks the PR's lifecycle** — draft, pushed, rebasing, *Unassigned · next: scanner*, *Deferred · waiting on #N*, *Waiting for @author · fix owed* — never a CI or review verdict. *CI failing*, *CI 4/11 · 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail. -5. **The CI and Review tooltips state what the track waits on — never "activity unknown".** With no verdict and no reviewer in flight the spoke derives the Review statement from what it already knows, in this order: the PR is merged or closed (*Review · n/a (closed)*), it is a draft (*Review · draft, not requested*), CI on the head has not finished (*Review · waiting for CI*), CI is done and nobody started (*Review · not started · hive reviewer next*, or *· needs reviewer* when the repo has no hive reviewer lane). A settled verdict explains itself — *Changes requested by the hive reviewer: 1 perspective posted findings … · 12m ago · quality ✓ · security ✗: token logged* — and stays known as its observation ages. The one no-data wording, *Review · no data for head f269349 yet · refreshing* (CI: *CI · no checks observed for head … yet · refreshing*), appears only when the spoke has fetched nothing for the head, and names the next step. +5. **A human gate is a pill, not a stage.** A PR parked at 085 for a person — a reviewer's question, a permission only a maintainer holds, a rerun to approve — with checks running, red or unreported, or its review verdict pending, is drawn at its real stage: CI (with motion while checks run) or Review is the one lit chevron, wearing an amber marker (`ham-human-gated`), and the ask is the **needs human decision** pill in the row's pill strip (human icon, the question in its hover, the decision popover on click); the lit track's tooltip ends *· needs a person: *. It never lights a *Needs human · decision* chevron in the PR in progress column while CI and Review spin dim ([#17453](https://github.com/hivecommons/hive/issues/17453): #17442 did, with CI 3/9 running; #17416 read *Needs human · review* the same way). Only a merge-ready, queued or merging 085 is a Merge queue matter. +6. **The CI and Review tooltips state what the track waits on — never "activity unknown".** With no verdict and no reviewer in flight the spoke derives the Review statement from what it already knows, in this order: the PR is merged or closed (*Review · n/a (closed)*), it is a draft (*Review · draft, not requested*), CI on the head has not finished (*Review · waiting for CI*), CI is done and nobody started (*Review · not started · hive reviewer next*, or *· needs reviewer* when the repo has no hive reviewer lane). A settled verdict explains itself — *Changes requested by the hive reviewer: 1 perspective posted findings … · 12m ago · quality ✓ · security ✗: token logged* — and stays known as its observation ages. The one no-data wording, *Review · no data for head f269349 yet · refreshing* (CI: *CI · no checks observed for head … yet · refreshing*), appears only when the spoke has fetched nothing for the head, and names the next step. On a red PR (CI failing or changes requested on the current head, or a 07x fix stage) the PR in progress word comes from pickup evidence: diff --git a/src/pkg/dashboard/stage_tracker_build.go b/src/pkg/dashboard/stage_tracker_build.go index 7ad8b31296..e56e7682ba 100644 --- a/src/pkg/dashboard/stage_tracker_build.go +++ b/src/pkg/dashboard/stage_tracker_build.go @@ -166,7 +166,10 @@ func (s *Server) buildStageTracker(status *StatusPayload, store *stagelabels.Sto it.Modifiers, it.DeferredModifiers = stageTrackerModifiers(labels, status.HiveID, rec, hasRec, overrides, now, draft, it.Reason, it.Kind, stage, it.Mirrored) // 045/085 have their own chevron word ("Needs human decision"); the // chip only adds information when needs-decision modifies another - // stage. + // stage — or when the 085 row's chevron is its real stage (CI / + // Review) and the pill is what carries the ask; that case is + // re-added once the head's tracks are known + // (stageTrackerApplyPersonActsOnPRPill). if stage == stagelabels.NeedsDecision || stage == stagelabels.IssueNeedsDecision { it.Modifiers = slices.DeleteFunc(it.Modifiers, func(m string) bool { return m == modNeedsDecision }) } @@ -565,6 +568,7 @@ func (s *Server) buildStageTracker(status *StatusPayload, store *stagelabels.Sto it.CodeActivity, it.Remediation, it.Deferral, it.ReviewActivity, it.DisplayColumn, it.Caption = activityItem.CodeActivity, activityItem.Remediation, activityItem.Deferral, activityItem.ReviewActivity, activityItem.DisplayColumn, activityItem.Caption stageTrackerApplyReworkOwedBy(it) stageTrackerApplyTrainQueuedCaption(it) + stageTrackerApplyPersonActsOnPRPill(it) } stageTrackerApplyReauthor(resp.Items, store, status.GitHubBaseURL, now) resp.NeedsHuman, resp.OnHold = stageTrackerHumanCounts(resp.Items) diff --git a/src/pkg/dashboard/stage_tracker_decision_popover_test.go b/src/pkg/dashboard/stage_tracker_decision_popover_test.go index 8ef140c234..3b1f6c75c2 100644 --- a/src/pkg/dashboard/stage_tracker_decision_popover_test.go +++ b/src/pkg/dashboard/stage_tracker_decision_popover_test.go @@ -155,7 +155,7 @@ func TestStageTrackerDecisionPopoverTriggersInRow(t *testing.T) { `typeof stageTrackerDecisionOf === 'function' ? stageTrackerDecisionOf(item) : null`, `stageTrackerDecisionTriggerHtml(decision, caption, fullTip)`, `if (typeof hideConfigTooltip === 'function') hideConfigTooltip();`, - `stageTrackerDecisionTriggerHtml(decision, inner, tip, 'ham-badge ham-badge-mod ' + cls)`, + `stageTrackerDecisionTriggerHtml(decision, askIco ? askIco + ` + "`${inner}`" + ` : inner, tip, 'ham-badge ham-badge-mod ' + cls + (askIco ? ' ham-mod-ask' : ''))`, `${decision ? '' : ` + "` title=\"${esc(tip)}\"`" + `}`, `if (typeof stageTrackerWireDecisionPop === 'function') stageTrackerWireDecisionPop(el);`, `decision_needed: lp.decision_needed || null`, diff --git a/src/pkg/dashboard/stage_tracker_hold_provenance_test.go b/src/pkg/dashboard/stage_tracker_hold_provenance_test.go index 29b326842b..e3741971a8 100644 --- a/src/pkg/dashboard/stage_tracker_hold_provenance_test.go +++ b/src/pkg/dashboard/stage_tracker_hold_provenance_test.go @@ -146,6 +146,7 @@ func TestStageTrackerHoldProvenanceJS(t *testing.T) { "function stageTrackerItemKey(it) { return it.repo + '/' + it.kind + '#' + it.number; }", "function stageTrackerDecisionTriggerHtml(decision, inner, tip, cls) { return ''; }", jsConstLine(t, html, "STAGE_TRACKER_MOD_PRIORITY"), + jsConstLine(t, html, "STAGE_TRACKER_HUMAN_MODS"), jsConstLine(t, html, "STAGE_TRACKER_MOD_TEXT"), jsConstLine(t, html, "STAGE_TRACKER_HANDLED_TEXT"), jsConstLine(t, html, "STAGE_TRACKER_DRAFT_TIP"), @@ -155,7 +156,10 @@ func TestStageTrackerHoldProvenanceJS(t *testing.T) { jsFunc(t, html, "stageTrackerDecisionOf"), jsFunc(t, html, "stageTrackerHoldPill"), jsFunc(t, html, "stageTrackerHoldTip"), + jsConstBlock(t, html, "STAGE_TRACKER_ICONS"), + jsFunc(t, html, "stageTrackerIcon"), jsFunc(t, html, "stageTrackerChipsHtml"), + stageTrackerManualMergeJS(t, html), }, "\n")+` const hold = { by: 'hive', source: 'reporter-trust', reason: 'reporter trust (issue #15017 by @Karibhou, contributor)', since: '2026-10-20T17:14:14Z', issue: 15017, reporter: 'Karibhou', association: 'contributor', pill: 'Held by hive · reporter trust (issue #15017 by @Karibhou, contributor)' }; const decision = { question: 'The hive held this PR itself for reporter trust (issue #15017 by @Karibhou, contributor). Release the hold, or keep it?', asked_by: 'the hive', options: [ { action: 'release', label: 'Release hold', enabled: true } ] }; @@ -182,5 +186,28 @@ assert.strictEqual(stageTrackerHoldPill({ hold: null }), ''); assert.strictEqual(stageTrackerHoldTip({ hold: {} }, 0), ''); // Without the pill field the text is built from the parts. assert.strictEqual(stageTrackerHoldPill({ hold: { by: 'hive', reason: 'r' } }), 'Held by hive · r'); +// hivecommons/hive#17442 (#17453): a 085 PR with CI running and the review +// verdict pending lights its real stage, so the ask rides as the +// needs-decision pill — even on a payload that predates the server adding +// the modifier — and that pill opens the decision popover. +const ask = { question: 'Dependabot alerts need the security_events read permission. Grant it, or merge without the check?', asked_by: 'sec-check', options: [ { action: 'decide:approve', label: 'Approve', enabled: true }, { action: 'decide:delegate', label: 'Let hive decide', enabled: true } ] }; +const running = { repo: 'hivecommons/hive', kind: 'pr', number: 17442, stage: 85, head: 'c0ffee1', modifiers: [], decision_needed: ask, + ci_activity: { head: 'c0ffee1', state: 'running', active: true, checks_passed: 3, checks_total: 9 }, + review_activity: { head: 'c0ffee1', state: 'human_decision', perspectives_done: 5, perspectives_total: 5 } }; +const rpill = stageTrackerChipsHtml(running); +assert.ok(rpill.includes('ham-mod-needs-decision') && rpill.includes('>needs human decision<'), rpill); +assert.ok(rpill.includes('ham-mod-ask') && rpill.includes('ham-mod-ico') && rpill.includes('needs human decision'), 'the ask pill wears the person icon with its words foldable: ' + rpill); +assert.ok(rpill.includes('ham-decision-trigger') && rpill.includes('data-ham-decision="hivecommons/hive/pr#17442"'), rpill); +assert.ok(!rpill.includes('+1'), 'one pill, not duplicated: ' + rpill); +// The server already carrying the modifier adds nothing twice. +const served = stageTrackerChipsHtml(Object.assign({}, running, { modifiers: ['needs-decision'] })); +assert.strictEqual((served.match(/ham-mod-needs-decision/g) || []).length, 1, served); +assert.ok(!served.includes('+1'), served); +// A pill that already names the person owed (unauthorized, hold) stands in: no needs-decision stacked behind it. +const gated = stageTrackerChipsHtml(Object.assign({}, running, { modifiers: ['unauthorized'] })); +assert.ok(!gated.includes('ham-mod-needs-decision') && !gated.includes('+1'), gated); +// A merge-ready 085 twin (approved + CI green) is the gate's: no invented pill. +const ready = stageTrackerChipsHtml(Object.assign({}, running, { ci_activity: { head: 'c0ffee1', state: 'passing' }, review_activity: { head: 'c0ffee1', state: 'approved' } })); +assert.ok(!ready.includes('ham-mod-needs-decision'), ready); `) } diff --git a/src/pkg/dashboard/stage_tracker_item_column_test.go b/src/pkg/dashboard/stage_tracker_item_column_test.go index 6404ddc4b7..3c5b547ce2 100644 --- a/src/pkg/dashboard/stage_tracker_item_column_test.go +++ b/src/pkg/dashboard/stage_tracker_item_column_test.go @@ -143,9 +143,12 @@ func TestStageTrackerFixingAfterMergeFailedColumn(t *testing.T) { // TestStageTrackerPersonActsOnPRColumn replays hive's own #16524: a PR // parked at 085 under hive:unauthorized (a maintainer must rerun shared // CI on GitHub) with CI unknown and review findings open. The ask is a -// person's move ON THE PR, so its chevron is PR in progress and the -// Merge queue column is empty — the gate is only for rows queued / -// merging / merged, or a merge-ready PR parked on a merge decision. +// person's move ON THE PR, so its chevron is the PR's REAL stage — the +// CI / Review column — and the Merge queue column is empty: the gate is +// only for rows queued / merging / merged, or a merge-ready PR parked on +// a merge decision. The human gate itself is the needs-decision pill, +// never a PR in progress chevron (hivecommons/hive#17453, replaying +// #17442: 085 with CI running and the review verdict pending). func TestStageTrackerPersonActsOnPRColumn(t *testing.T) { head := "7879a51f276a0f9aa5adc995d9d09a74487bbcf4" ci := func(state string) *StageTrackerActivity { return &StageTrackerActivity{Head: head, State: state} } @@ -160,19 +163,22 @@ func TestStageTrackerPersonActsOnPRColumn(t *testing.T) { mut func(*StageTrackerItem) want int }{ - {"#16524 as served", func(*StageTrackerItem) {}, trackerColumnPR}, - {"unauthorized step, no track evidence", func(it *StageTrackerItem) { it.CIActivity, it.ReviewActivity = nil, nil }, trackerColumnPR}, + {"#16524 as served", func(*StageTrackerItem) {}, trackerColumnReview}, + {"unauthorized step, no track evidence", func(it *StageTrackerItem) { it.CIActivity, it.ReviewActivity = nil, nil }, trackerColumnReview}, {"unauthorized step on a merge-ready head", func(it *StageTrackerItem) { it.CIActivity, it.ReviewActivity = ci("passing"), review("approved") }, trackerColumnMergeGate}, - {"decision with review findings open", func(it *StageTrackerItem) { it.Reason, it.UnauthorizedStep = "", "" }, trackerColumnPR}, + {"decision with review findings open", func(it *StageTrackerItem) { it.Reason, it.UnauthorizedStep = "", "" }, trackerColumnReview}, {"decision with CI red, review approved", func(it *StageTrackerItem) { it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = "", "", ci("failing"), review("approved") - }, trackerColumnPR}, - {"approved decision with CI running on the head keeps the gate", func(it *StageTrackerItem) { + }, trackerColumnReview}, + {"#17442: decision with CI running, review verdict pending (#17453)", func(it *StageTrackerItem) { + it.Number, it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = 17442, "", "", ci("running"), review("human_decision") + }, trackerColumnReview}, + {"approved decision with CI running on the head is at CI, not the gate (#17453)", func(it *StageTrackerItem) { it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = "", "", ci("running"), review("approved") - }, trackerColumnMergeGate}, - {"approved decision with CI queued on the head keeps the gate", func(it *StageTrackerItem) { + }, trackerColumnReview}, + {"approved decision with CI queued on the head is at CI, not the gate (#17453)", func(it *StageTrackerItem) { it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = "", "", ci("queued"), review("approved") - }, trackerColumnMergeGate}, + }, trackerColumnReview}, {"bare 085 decision keeps the gate (#14821)", func(it *StageTrackerItem) { it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = "", "", nil, nil }, trackerColumnMergeGate}, @@ -203,4 +209,24 @@ func TestStageTrackerPersonActsOnPRColumn(t *testing.T) { if !strings.Contains(caption, "Waiting for a maintainer · rerun shared ci on GitHub") || strings.Contains(caption, "Awaiting human") || actor != "maintainer" { t.Fatalf("caption %q actor %q", caption, actor) } + // The ask rides as the needs-decision pill once the head's tracks are + // known (hivecommons/hive#17453): added when a person acts on the PR, + // never duplicated, and left alone on a merge-ready or queued row. + pill := live() + pill.Number, pill.Reason, pill.UnauthorizedStep, pill.CIActivity, pill.ReviewActivity = 17442, "", "", ci("running"), review("human_decision") + pill.Modifiers = []string{modStalled} + stageTrackerApplyPersonActsOnPRPill(&pill) + if strings.Join(pill.Modifiers, ",") != modStalled+","+modNeedsDecision { + t.Fatalf("#17442 modifiers %v, want [%s %s]", pill.Modifiers, modStalled, modNeedsDecision) + } + stageTrackerApplyPersonActsOnPRPill(&pill) + if strings.Join(pill.Modifiers, ",") != modStalled+","+modNeedsDecision { + t.Fatalf("#17442 modifiers duplicated: %v", pill.Modifiers) + } + ready := live() + ready.Reason, ready.UnauthorizedStep, ready.CIActivity, ready.ReviewActivity = "", "", ci("passing"), review("approved") + stageTrackerApplyPersonActsOnPRPill(&ready) + if len(ready.Modifiers) != 0 { + t.Fatalf("merge-ready 085 grew modifiers %v", ready.Modifiers) + } } diff --git a/src/pkg/dashboard/stage_tracker_test.go b/src/pkg/dashboard/stage_tracker_test.go index 7e567fa29f..805a31e63c 100644 --- a/src/pkg/dashboard/stage_tracker_test.go +++ b/src/pkg/dashboard/stage_tracker_test.go @@ -539,8 +539,11 @@ func TestStageTrackerEndpoint(t *testing.T) { t.Fatalf("pr103 history = %+v, want the second hop marked as the 100 → 050 fall", h) } + // A label-only 085 PR with no merge-ready evidence on its head lights + // its real stage (CI / Review), so the ask rides as the needs-decision + // pill (hivecommons/hive#17453). pr104 := trackerItem(t, resp, "pr", 104) - if pr104.Stage != 85 || pr104.StageSince != nil || len(pr104.History) != 0 || hasMod(pr104, modNeedsDecision) || pr104.Actor != "maintainer" { + if pr104.Stage != 85 || pr104.StageSince != nil || len(pr104.History) != 0 || !hasMod(pr104, modNeedsDecision) || pr104.Actor != "maintainer" { t.Fatalf("label-only pr104 = %+v", pr104) } diff --git a/src/pkg/dashboard/stage_tracker_ui_rows_test.go b/src/pkg/dashboard/stage_tracker_ui_rows_test.go index 4a012dcf64..9f56d6a52e 100644 --- a/src/pkg/dashboard/stage_tracker_ui_rows_test.go +++ b/src/pkg/dashboard/stage_tracker_ui_rows_test.go @@ -697,7 +697,13 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ assert.strictEqual(ci[1], 'done', '11/11 passed is done-style: ' + adoptedRow); const parkedRow = stageTrackerRowHtml({ repo: 'acme/console', number: 16510, kind: 'pr', stage: 85, display_column: 85, head: 'f269349', needs_human: true, author: 'thatguywob', author_kind: 'human', review_activity: { head: 'f269349', state: 'human_decision', caption: 'Review findings · human decision', perspectives_done: 5, perspectives_total: 5, source: 'verified-review-bundle', observed_at: seen } }, stages, ctx); - assert.ok(/
  • ]*title="Review: Review 5\/5 · needs owner sign-off · /.test(parkedRow), 'genuinely parked on a person names the sign-off in the tooltip, still not amber: ' + parkedRow); + // Genuinely parked on a person (085, no checks known): the row's real stage + // is Review, whose verdict asked for that person — it is the one lit + // chevron, amber-marked for the human gate, naming the sign-off + // (hivecommons/hive#17453); CI is the dim unknown ring. + assert.ok(/
  • ]*title="Current pipeline phase · Review: Review 5\/5 · needs owner sign-off · /.test(parkedRow), 'genuinely parked on a person lights Review with the sign-off, amber-marked: ' + parkedRow); + assert.strictEqual(litChevrons(strip(parkedRow)), 1, parkedRow); + assert.ok(/
  • [^<]*<\/span>/.test(row) && !/ } // hivecommons/hive#16524: 085 under hive:unauthorized (a maintainer must // rerun shared CI on GitHub), CI unknown, review findings open. The ask is -// the person's move ON THE PR, not a merge matter: the chevron lights PR in -// progress with "Waiting for @clubanderson · rerun shared ci on GitHub" -// and the person icon; the Merge queue column stays empty. A merge-ready -// twin (approved + CI green) or a queued one keeps the gate. +// the person's move ON THE PR, not a merge matter: the row lights its REAL +// stage — the CI track, stalled, amber-marked (ham-human-gated) — with +// PR in progress passed and the Merge queue column empty; the ask rides +// as the needs-human pill, never as a "Needs human" chevron of its own +// (hivecommons/hive#17453). A merge-ready twin (approved + CI green) or a +// queued one keeps the gate. { const seen = new Date(now - 60000).toISOString(); const head = '7879a51'; @@ -755,12 +763,11 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ ci_activity: { head, state: 'unknown', caption: 'CI unknown · no check results observed for this head yet', checks_passed: 34, checks_total: 42, checks_failed: 1, source: 'github-graphql-cache+required-branch', observed_at: seen }, review_activity: { head, state: 'changes_requested', caption: 'Review findings · awaiting author', perspectives_done: 5, perspectives_total: 5, source: 'verified-review-bundle', observed_at: seen, since: seen } }, extra || {}); const rerun = stageTrackerRowHtml(shape(), stages, ctx); - assert.strictEqual(stageTrackerAnchor(85, stages, 'pr', shape()), 30, 'the ask is the person\'s move on the PR: PR in progress'); - assert.deepStrictEqual(segStates(rerun), [D, D, D, 'active detoured', T, T, 'todo cap'], 'PR in progress lit, Merge queue empty: ' + strip(rerun)); - assert.ok(rerun.includes('Waiting for @clubanderson · rerun shared ci on GitHub'), 'the chevron names the person and the step: ' + strip(rerun)); - assert.ok(!/
  • ]*>[\s\S]*?Awaiting human/.test(strip(rerun)), 'no "Awaiting human" chevron: ' + strip(rerun)); - const litSeg = /
  • ]*>([\s\S]*?)<\/li>/.exec(strip(rerun)); - assert.ok(litSeg && litSeg[1].includes('ham-actor-ico'), 'the person icon stays on the lit chevron: ' + strip(rerun)); + assert.strictEqual(stageTrackerAnchor(85, stages, 'pr', shape()), 50, 'the ask is the person\'s move on the PR: its real stage, CI / Review'); + assert.deepStrictEqual(segStates(rerun), [D, D, D, D, 'active detoured', T, 'todo cap'], 'CI / Review lit, PR in progress passed, Merge queue empty: ' + strip(rerun)); + assert.ok(/
  • ]*>[\s\S]*?(?:Awaiting human|Needs human|Waiting for @clubanderson)/.test(strip(rerun)), 'no "Needs human" stage chevron: ' + strip(rerun)); + assert.ok(rerun.includes('ham-mod-unauthorized'), 'the ask rides as the pill: ' + strip(rerun)); const mergeSeg = Array.from(strip(rerun).matchAll(/
  • ]*>([\s\S]*?)<\/li>/g)).filter(m => !m[1].includes('ham-activity-track') && !m[1].includes('ham-head'))[4]; assert.ok(mergeSeg && mergeSeg[1] === 'todo' && !/ham-chevron-copy/.test(mergeSeg[2]), 'the merge-queue chevron carries no words: ' + mergeSeg[0]); assert.strictEqual(litChevrons(strip(rerun)), 1, 'one lit chevron: ' + strip(rerun)); @@ -772,7 +779,43 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ assert.strictEqual(stageTrackerAnchor(85, stages, 'pr', { kind: 'pr', stage: 85, caption: 'decision requested' }), 80); // A nested PR under its issue follows the same column. const nested = stageTrackerRowHtml({ repo: 'hivecommons/hive', number: 16500, kind: 'issue', stage: 40, linked_prs: [shape()] }, stages, ctx); - assert.ok(nested.includes('Waiting for @clubanderson · rerun shared ci on GitHub'), 'nested PR carries the word: ' + nested); + assert.deepStrictEqual(segStates(nested), [D, D, D, D, 'active detoured', T, 'todo cap'], 'nested PR lights the same column: ' + strip(nested)); + assert.ok(/ham-activity-track active ham-stalled ham-human-gated/.test(nested), 'nested PR carries the amber marker: ' + strip(nested)); +} +// hivecommons/hive#17442 under #17426 (issue #17453, 2026-11-09 21:37Z): a +// plain 085 PR with CI running on its head and the review verdict pending +// read "Needs human · decision" as a lit PR in progress chevron while the +// CI and Review chevrons spun dim. The lit chevron is the PR's REAL stage: +// CI (running, with motion) wearing the amber human-gated marker; PR in +// progress is passed; Merge queue is empty; the ask is the needs-decision +// pill with the question in the CI tooltip. One lit stage per row. +{ + const seen = new Date(now - 60000).toISOString(); + const head = 'ab12cd3'; + const question = 'sec-check needs the Dependabot alerts read permission on this repo. Grant it, or merge without the check?'; + const ask = { question, asked_by: 'sec-check', since: seen, options: [{ action: 'decide:approve', label: 'Approve', enabled: true }, { action: 'decide:delegate', label: 'Let hive decide', enabled: true }] }; + const shape = (extra) => Object.assign({ repo: 'hivecommons/hive', number: 17442, kind: 'pr', stage: 85, head, author: 'hive[bot]', author_kind: 'hive', modifiers: ['needs-decision'], + caption: 'Needs human decision', decision_needed: ask, + ci_activity: { head, state: 'running', active: true, caption: 'CI running', checks_passed: 3, checks_total: 9, source: 'checks', observed_at: seen }, + review_activity: { head, state: 'human_decision', caption: 'Review 5/5 · needs human decision', perspectives_done: 5, perspectives_total: 5, source: 'verified-review-bundle', observed_at: seen, since: seen } }, extra || {}); + const row = stageTrackerRowHtml(shape(), stages, ctx); + assert.strictEqual(stageTrackerAnchor(85, stages, 'pr', shape()), 50, 'CI running on the head: the real stage is CI / Review'); + assert.deepStrictEqual(segStates(row), [D, D, D, D, 'active detoured', T, 'todo cap'], 'PR in progress passed, Merge queue empty: ' + strip(row)); + assert.strictEqual(litChevrons(strip(row)), 1, 'one lit chevron: ' + strip(row)); + assert.ok(/
  • ]*data-motion="active"[^>]*>[\s\S]*?CI 3\/9 · 6 running<\/span>/.test(row), 'CI is the lit chevron, in motion, amber-marked: ' + strip(row)); + assert.ok(/
  • ]*>[\s\S]*?Needs human/.test(strip(row)), 'no "Needs human" stage chevron: ' + strip(row)); + assert.ok(row.includes('ham-mod-needs-decision') && row.includes('>needs human decision<'), 'the ask rides as the needs-decision pill: ' + strip(row)); + assert.ok(row.includes('needs a person: ' + question.replace(/'/g, ''')) || row.includes('needs a person: ' + question), 'the lit CI chevron\'s tooltip carries the question: ' + row); + // The same row with CI green and the review verdict pending lights Review, stalled, amber-marked. + const reviewing = stageTrackerRowHtml(shape({ ci_activity: { head, state: 'passing', caption: 'CI green', checks_passed: 9, checks_total: 9, source: 'checks', observed_at: seen }, review_activity: { head, state: 'unknown', caption: 'Review pending', perspectives_done: 0, perspectives_total: 5, source: 'review-dispatch-wait', observed_at: seen } }), stages, ctx); + assert.strictEqual(litChevrons(strip(reviewing)), 1, strip(reviewing)); + assert.ok(/
  • ]*data-verdict="pass"/.test(reviewing), 'green CI is the ring alone: ' + strip(reviewing)); + // A payload that predates the server re-adding the modifier still shows the pill. + const bare = stageTrackerRowHtml(shape({ modifiers: [] }), stages, ctx); + assert.ok(bare.includes('ham-mod-needs-decision'), 'the pill is derived client-side too: ' + strip(bare)); + assert.strictEqual((bare.match(/ham-mod-needs-decision/g) || []).length, 1, bare); } // hivecommons/hive#16599 rows (canonical: active = amber + words, inactive = // icon only). #16567 (dependabot, 050, review approved, 10 workflow runs diff --git a/src/pkg/dashboard/stage_tracker_vocabulary.go b/src/pkg/dashboard/stage_tracker_vocabulary.go index f752323174..334fe8f5f3 100644 --- a/src/pkg/dashboard/stage_tracker_vocabulary.go +++ b/src/pkg/dashboard/stage_tracker_vocabulary.go @@ -2,6 +2,7 @@ package dashboard import ( "regexp" + "slices" "strings" "github.com/hivecommons/hive/pkg/stagelabels" @@ -89,21 +90,27 @@ func stageTrackerItemColumn(it *StageTrackerItem) int { } } if stageTrackerPersonActsOnPR(it) { - return trackerColumnPR + return trackerColumnReview } return stageTrackerColumn(st) } // stageTrackerPersonActsOnPR: a PR parked at 085 because a person has to // act ON THE PR — rerun CI, approve workflow runs, resolve a permission -// (reason `unauthorized:`), or answer review findings / red checks -// still open on its head — is not queued, merging or merge-ready, so its -// chevron lights PR in progress, never Merge queue. The Merge queue -// column is only for rows actually queued / merging / merged, or a -// merge-ready PR (review approved, CI green) parked on a merge decision. -// A bare 085 with no track evidence keeps the gate: the person decides -// there (hive#14821). Hive's own #16524 read "Awaiting human: rerun -// shared ci" under Merge queue with CI unknown and review findings open. +// (reason `unauthorized:`), or answer review findings / red or +// running checks still open on its head — is not queued, merging or +// merge-ready, so its chevron lights its REAL stage, CI / Review (the CI +// track while checks run or are red / unknown, the Review track while the +// verdict is pending), never Merge queue and never PR in progress: the +// human gate is a pill on the real stage, not a stage of its own (owner +// rule 2026-11-08, hivecommons/hive#17327; #17453 for the 085 park). The +// Merge queue column is only for rows actually queued / merging / merged, +// or a merge-ready PR (review approved, CI green) parked on a merge +// decision. A bare 085 with no track evidence keeps the gate: the person +// decides there (hive#14821). Hive's own #16524 read "Awaiting human: +// rerun shared ci" under Merge queue with CI unknown and review findings +// open; #17442 read "Needs human · decision" under PR in progress while +// CI ran. func stageTrackerPersonActsOnPR(it *StageTrackerItem) bool { if it == nil || it.Kind != "pr" || stageByNumber(it.Stage) != stagelabels.NeedsDecision { return false @@ -120,6 +127,23 @@ func stageTrackerPersonActsOnPR(it *StageTrackerItem) bool { return stageTrackerNotMergeReadyEvidence(it) } +// stageTrackerApplyPersonActsOnPRPill: once the head's tracks are known, +// a 085 PR whose chevron is its real stage (stageTrackerPersonActsOnPR → +// CI / Review) gets the `needs-decision` modifier back, so the pill strip +// carries the ask — the human icon, the decision popover, the question in +// the tooltip — where the chevron no longer says "Needs human decision" +// (hivecommons/hive#17453). The modifier keeps its place in the pill +// order (stageTrackerModifierOrder). +func stageTrackerApplyPersonActsOnPRPill(it *StageTrackerItem) { + if it == nil || !stageTrackerPersonActsOnPR(it) || slices.Contains(it.Modifiers, modNeedsDecision) { + return + } + it.Modifiers = append(it.Modifiers, modNeedsDecision) + slices.SortStableFunc(it.Modifiers, func(a, b string) int { + return slices.Index(stageTrackerModifierOrder, a) - slices.Index(stageTrackerModifierOrder, b) + }) +} + func stageTrackerActivityOnHead(it *StageTrackerItem, a *StageTrackerActivity) bool { return a != nil && (a.Head == "" || it.Head == "" || strings.EqualFold(a.Head, it.Head)) } @@ -134,12 +158,12 @@ func stageTrackerMergeReadyEvidence(it *StageTrackerItem) bool { // stageTrackerNotMergeReadyEvidence: a track on the current head says the // PR is short of merge-ready (review not approved, CI not green). CI that -// is queued or running on the same head is a re-run, not a regression, so -// it does not count. +// is queued or running on the same head counts too: the head's real stage +// is CI while checks run, so the row lights the CI track, not the gate +// (hivecommons/hive#17453). func stageTrackerNotMergeReadyEvidence(it *StageTrackerItem) bool { return (stageTrackerActivityOnHead(it, it.ReviewActivity) && it.ReviewActivity.State != "approved") || - (stageTrackerActivityOnHead(it, it.CIActivity) && it.CIActivity.State != "passing" && - it.CIActivity.State != "queued" && it.CIActivity.State != "running") + (stageTrackerActivityOnHead(it, it.CIActivity) && it.CIActivity.State != "passing") } // stageTrackerStagePhrase is the stage as a lowercase clause for the diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index 6971828712..15e157241a 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -137,6 +137,12 @@ .ham-head-cols .ham-seg.ham-head-tools { align-items: flex-start; } .ham-head-cols .ham-seg.ham-head-tools:has(> .ham-badges:empty) { display: none; } .ham-head-cols .ham-badges > :is(button, a) { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; } + /* The short needs-human popover pill stays one line: breaking "needs + human decision" mid-pill grows a nested-PR row by a text line and a + landscape phone loses its second row (hivecommons/hive#17453). */ + .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-needs-decision { white-space: nowrap; } + .ham-badge-mod.ham-mod-ask { position: relative; } + .ham-badge-mod .ham-mod-ico { vertical-align: text-bottom; margin-right: var(--sp-1); } .ham-head-cols .ham-badge { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; } .ham-head-main { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: var(--sp-3); min-width: 0; } .ham-head-main > .ham-badge { flex: 0 1 auto; } @@ -470,6 +476,10 @@ the Merge queue cell wears the pill amber — held, not queued, not red. */ .ham-seg.active.ham-held { background: var(--amber); color: var(--surface-0); } .ham-seg.active.ham-held .ham-detour::before { content: '⏸'; margin-right: var(--sp-1); } + /* A 085 PR a person acts on lights its real stage — the CI / Review + track — and that track wears an amber marker; the gate itself is the + needs-human pill beside the row (hivecommons/hive#17453). */ + .ham-seg.ham-activity-track.active.ham-human-gated { outline: var(--focus-ring-width) solid var(--amber); outline-offset: calc(-1 * var(--focus-ring-width)); } .ham-seg.active.ham-open-hold .ham-seg-t::before { content: '⏸'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-blocked { background: var(--yellow); color: var(--surface-0); } .ham-seg.active.ham-open-blocked .ham-seg-t::before { content: '⛔'; margin-right: var(--sp-1); } @@ -993,6 +1003,9 @@ .ham-head-cols .ham-strip > .ham-seg { grid-column: 1 / -1; grid-row: auto; padding: 0; } .ham-head-cols .ham-head-lead:empty { display: none; } .ham-head-cols > .ham-since { display: none; } + /* Stacked head: the ask pill is its person icon alone (#17453). */ + .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-ask > .ham-mod-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } + .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-ask > .ham-mod-ico { margin-right: 0; } .ham-row .ham-seg { padding: 0 var(--sp-2) 0 var(--sp-3); } .ham-row .ham-seg.cap { flex-basis: 2em; } .ham-since { width: 3em; } @@ -1221,6 +1234,11 @@ box-sizing: border-box; min-height: var(--tap-target); min-width: var(--tap-target); } #activity-monitor-section .ham-notes-btn { font-size: var(--tap-glyph); padding-top: var(--sp-2); padding-bottom: var(--sp-2); } + /* A needs-human / hold pill that opens the decision popover keeps its + one-line box so a card row stays under the #17161 height budget; the + hit area is padded out to the tap target like .ham-pill (#17453). */ + #activity-monitor-section .ham-badge-mod.ham-decision-trigger { position: relative; } + #activity-monitor-section .ham-badge-mod.ham-decision-trigger::before { content: ""; position: absolute; inset: calc((1lh - var(--tap-target)) / 2) calc((100% - var(--tap-target)) / 2); } /* A card keeps its two-line head and its density (#17161): the 🗒 shows on a phone only once the item has notes; the row's ⋯ menu carries "Maintainer notes…" for the rest. */ diff --git a/src/pkg/dashboard/static-src/js/tracker-row-anchor.js b/src/pkg/dashboard/static-src/js/tracker-row-anchor.js index b8454d15d9..3974e51083 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-anchor.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-anchor.js @@ -45,9 +45,12 @@ // next to its 2nd-place sibling in Merge queue (hivecommons/hive#15395). if (item && item.merge_train && item.merge_train.state && cur > STAGE_TRACKER_PR_COLUMN) return STAGE_TRACKER_MERGE_COLUMN; // A person owes a step on the PR itself (085 under hive:unauthorized, - // not merge-ready): PR in progress, with the merge-queue chevron - // empty (hivecommons/hive#16524). - if (kind === 'pr' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return STAGE_TRACKER_PR_COLUMN; + // a reviewer's question, CI running or red on the head — not + // merge-ready): the row lights its REAL stage, CI / Review, with the + // merge-queue chevron empty and PR in progress passed; the human gate + // rides as the needs-human pill, never as a chevron of its own + // (hivecommons/hive#16524, #17327, #17453). + if (kind === 'pr' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return 50; if (cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION || cur === STAGE_TRACKER_TRIAGE_NEEDED || cur === STAGE_TRACKER_POSSIBLY_EXISTS || cur === STAGE_TRACKER_OPEN_FOR_DISCUSSION) return STAGE_TRACKER_ISSUE_DECISION_COLUMN; if (cur === STAGE_TRACKER_NEEDS_DECISION && kind === 'issue') return STAGE_TRACKER_ISSUE_DECISION_COLUMN; if (STAGE_TRACKER_PATH.indexOf(cur) >= 0) return cur; diff --git a/src/pkg/dashboard/static-src/js/tracker-row-strip.js b/src/pkg/dashboard/static-src/js/tracker-row-strip.js index e1b1f840f2..4ea3ce113a 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-strip.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-strip.js @@ -205,6 +205,10 @@ function stageTrackerStalledTrack(item) { const on = kind => { const a = item && item[kind + '_activity']; return a && item.head && a.head === item.head ? a.state || 'unknown' : 'unknown'; }; if (typeof stageTrackerStageTrack === 'function' && stageTrackerStageTrack(item)) return ''; + // A 085 PR a person acts on whose review already asked for that + // person (human_decision) is at Review: the ask came from the + // review, whatever CI has or has not reported (hivecommons/hive#17453). + if (on('review') === 'human_decision' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return 'review'; if (on('ci') !== 'passing') return 'ci'; return 'review'; } @@ -256,7 +260,12 @@ function stageTrackerTrackRunning(item, kind) { const a = item && item[kind + '_activity']; if (!a || !item.head || a.head !== item.head) return false; - if (stageTrackerWaitingOnPerson(item)) return false; + // A 085 PR a person acts on (stageTrackerPersonActsOnPR) is parked, + // but checks genuinely running on its head are still motion: the CI + // track is its real stage and lights (hivecommons/hive#17453). + // Inferred motion (the ring count below) stays off for it. + const personActs = typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item); + if (stageTrackerWaitingOnPerson(item) && !personActs) return false; const moving = kind === 'ci' ? ['running', 'queued'] : ['reviewing', 'adjudicating', 'assigned']; if (a.active || moving.includes(a.state)) return true; // A CI ring that is not full is a running ring: checks counted on @@ -374,7 +383,11 @@ const queuedNote = queued && typeof stageTrackerQueuedTrackNote === 'function' ? stageTrackerQueuedTrackNote(item, kind) : ''; // A demoted track is still: no pulse beside the lead. if (queued) active = false; - const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') : (finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo') + (queued ? ' ham-track-queued' : ''); + // The lit track of a 085 PR a person acts on wears an amber marker + // (ham-human-gated): the chevron is the real stage, the gate is the + // needs-human pill beside it (hivecommons/hive#17453). + const humanGated = lit && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item); + const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') + (humanGated ? ' ham-human-gated' : '') : (finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo') + (queued ? ' ham-track-queued' : ''); const approvalPending = kind === 'ci' && matches ? stageTrackerWorkflowApprovalPending(a) : 0; const humanAction = approvalPending > 0 ? STAGE_TRACKER_WORKFLOW_APPROVAL_TIP : kind === 'review' && state === 'human_decision' ? 'Needs a person\'s decision' : ''; const personIco = stalled && humanAction ? stageTrackerIcon('human', 'ham-ico ham-actor-ico', humanAction) : ''; @@ -432,6 +445,7 @@ (matches && a.actor ? ' · actor ' + a.actor : '') + (codeNote || contextWord ? ' · ' + (codeNote || contextWord) : '') + (hold ? ' · ' + (hold.pill || 'Held by @' + hold.by) + (hold.reason ? ' · ' + hold.reason : '') : '') + + (humanGated && item.decision_needed && item.decision_needed.question && !String(tip).includes(String(item.decision_needed.question)) ? ' · needs a person: ' + String(item.decision_needed.question) : '') + (waitLead ? ' · hive is waiting on ' + waitLead.waitingOn + (waitLead.newHead && sha7 ? ' for new head ' + sha7 : '') : '') + (queuedNote ? ' · ' + queuedNote + ' behind ' + (lead === 'ci' ? 'CI' : 'Review') : ''); const tipID = 'ham-track-tip-' + [item.repo || '', item.kind || '', item.number || 0, kind].map(x => encodeURIComponent(String(x))).join('-'); @@ -946,6 +960,16 @@ const sentinel = stageTrackerSentinelChipHtml(item) + (typeof stageTrackerPreparationChipHtml === 'function' ? stageTrackerPreparationChipHtml(item) : '') + (typeof stageTrackerAdoptionChipHtml === 'function' ? stageTrackerAdoptionChipHtml(item) : '') + (typeof stageTrackerPresenceChipHtml === 'function' ? stageTrackerPresenceChipHtml(item) : '') + (typeof stageTrackerPushChipHtml === 'function' ? stageTrackerPushChipHtml(item, Date.now()) : '') + (typeof stageTrackerReroutePillHtml === 'function' ? stageTrackerReroutePillHtml(item) : '') + (typeof stageTrackerSupersedesChipHtml === 'function' ? stageTrackerSupersedesChipHtml(item, Date.now()) : '') + (typeof stageTrackerOverlapBadgeHtml === 'function' ? stageTrackerOverlapBadgeHtml(item) : ''); const mods = (Array.isArray(item.modifiers) ? item.modifiers.slice() : []) .sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); + // A 085 PR a person acts on lights its real stage (CI / Review), so + // the chevron no longer says "Needs human decision": the ask rides + // here as the needs-decision pill (hivecommons/hive#17453). The server + // re-adds the modifier (stageTrackerApplyPersonActsOnPRPill); this + // covers a payload that predates it. Any pill that already names the + // person owed (unauthorized, hold …) stands in for it. + if (item.kind === 'pr' && !mods.some(m => STAGE_TRACKER_HUMAN_MODS.indexOf(m) >= 0) && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) { + mods.push('needs-decision'); + mods.sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); + } if (!mods.length) return sentinel; // A regression the hive is working through yields the lead pill to any // other modifier and, alone, draws muted as "stage reset" rather than red. @@ -998,7 +1022,11 @@ // of a native tooltip. // A hive-set hold is a decision too (release or keep): its pill opens the same popover. const decision = (mods[0] === 'needs-human' || mods[0] === 'needs-decision' || decisionPR || (holdPill && item.hold && item.hold.by === 'hive')) && typeof stageTrackerDecisionOf === 'function' ? stageTrackerDecisionOf(item) : null; - if (decision) return sentinel + stageTrackerDecisionTriggerHtml(decision, inner, tip, 'ham-badge ham-badge-mod ' + cls); + // The ask pill wears the person icon; in the stacked head layout the + // words fold into the icon so a nested PR's title keeps its line and + // the popover / hover still carry the question (hivecommons/hive#17453). + const askIco = askable && typeof stageTrackerIcon === 'function' ? stageTrackerIcon('human', 'ham-ico ham-mod-ico') : ''; + if (decision) return sentinel + stageTrackerDecisionTriggerHtml(decision, askIco ? askIco + `${inner}` : inner, tip, 'ham-badge ham-badge-mod ' + cls + (askIco ? ' ham-mod-ask' : '')); // No popover to open (the ask is the issue's own while a covering // PR drives the strip): the pill is a button that reveals the row's // "Needs human: …" note line and carries the full reason as its hover. diff --git a/src/pkg/dashboard/static-src/js/tracker-words-core.js b/src/pkg/dashboard/static-src/js/tracker-words-core.js index 5cfc806262..fd88f334c0 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words-core.js +++ b/src/pkg/dashboard/static-src/js/tracker-words-core.js @@ -60,14 +60,19 @@ } // A PR parked at 085 because a person has to act ON THE PR (rerun CI, // approve workflow runs, resolve a permission, answer review findings - // or red checks still open on its head) is not queued, merging or - // merge-ready: it lights PR in progress, never Merge queue. Merge - // queue is only for rows actually queued / merging / merged, or a - // merge-ready PR (review approved, CI green on this head) parked on a - // merge decision. A bare 085 with no track evidence keeps the gate: - // the person decides there (hive#14821). Hive's own #16524 read - // "Awaiting human: rerun shared ci" under Merge queue with CI unknown - // and review findings open. Mirrors stageTrackerPersonActsOnPR in Go. + // or red / running checks still open on its head) is not queued, + // merging or merge-ready: it lights its REAL stage, CI / Review — the + // CI track while checks run or are red / unknown, the Review track + // while the verdict is pending — never Merge queue and never PR in + // progress; the gate is the needs-human pill (hivecommons/hive#17327, + // #17453). Merge queue is only for rows actually queued / merging / + // merged, or a merge-ready PR (review approved, CI green on this head) + // parked on a merge decision. A bare 085 with no track evidence keeps + // the gate: the person decides there (hive#14821). Hive's own #16524 + // read "Awaiting human: rerun shared ci" under Merge queue with CI + // unknown and review findings open; #17442 read "Needs human · + // decision" under PR in progress while CI ran. Mirrors + // stageTrackerPersonActsOnPR in Go. function stageTrackerPersonActsOnPR(item) { if (!item || (item.via_pr ? 'pr' : item.kind) !== 'pr' || Number(item.stage) !== STAGE_TRACKER_HUMAN_GATED) return false; if (item.merge_gate && item.merge_gate.state) return false; diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 988d035a97..c9a16c898f 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1480,6 +1480,12 @@ .ham-head-cols .ham-seg.ham-head-tools { align-items: flex-start; } .ham-head-cols .ham-seg.ham-head-tools:has(> .ham-badges:empty) { display: none; } .ham-head-cols .ham-badges > :is(button, a) { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; } + /* The short needs-human popover pill stays one line: breaking "needs + human decision" mid-pill grows a nested-PR row by a text line and a + landscape phone loses its second row (hivecommons/hive#17453). */ + .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-needs-decision { white-space: nowrap; } + .ham-badge-mod.ham-mod-ask { position: relative; } + .ham-badge-mod .ham-mod-ico { vertical-align: text-bottom; margin-right: var(--sp-1); } .ham-head-cols .ham-badge { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; } .ham-head-main { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: var(--sp-3); min-width: 0; } .ham-head-main > .ham-badge { flex: 0 1 auto; } @@ -1813,6 +1819,10 @@ the Merge queue cell wears the pill amber — held, not queued, not red. */ .ham-seg.active.ham-held { background: var(--amber); color: var(--surface-0); } .ham-seg.active.ham-held .ham-detour::before { content: '⏸'; margin-right: var(--sp-1); } + /* A 085 PR a person acts on lights its real stage — the CI / Review + track — and that track wears an amber marker; the gate itself is the + needs-human pill beside the row (hivecommons/hive#17453). */ + .ham-seg.ham-activity-track.active.ham-human-gated { outline: var(--focus-ring-width) solid var(--amber); outline-offset: calc(-1 * var(--focus-ring-width)); } .ham-seg.active.ham-open-hold .ham-seg-t::before { content: '⏸'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-blocked { background: var(--yellow); color: var(--surface-0); } .ham-seg.active.ham-open-blocked .ham-seg-t::before { content: '⛔'; margin-right: var(--sp-1); } @@ -2336,6 +2346,9 @@ .ham-head-cols .ham-strip > .ham-seg { grid-column: 1 / -1; grid-row: auto; padding: 0; } .ham-head-cols .ham-head-lead:empty { display: none; } .ham-head-cols > .ham-since { display: none; } + /* Stacked head: the ask pill is its person icon alone (#17453). */ + .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-ask > .ham-mod-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } + .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-ask > .ham-mod-ico { margin-right: 0; } .ham-row .ham-seg { padding: 0 var(--sp-2) 0 var(--sp-3); } .ham-row .ham-seg.cap { flex-basis: 2em; } .ham-since { width: 3em; } @@ -2564,6 +2577,11 @@ box-sizing: border-box; min-height: var(--tap-target); min-width: var(--tap-target); } #activity-monitor-section .ham-notes-btn { font-size: var(--tap-glyph); padding-top: var(--sp-2); padding-bottom: var(--sp-2); } + /* A needs-human / hold pill that opens the decision popover keeps its + one-line box so a card row stays under the #17161 height budget; the + hit area is padded out to the tap target like .ham-pill (#17453). */ + #activity-monitor-section .ham-badge-mod.ham-decision-trigger { position: relative; } + #activity-monitor-section .ham-badge-mod.ham-decision-trigger::before { content: ""; position: absolute; inset: calc((1lh - var(--tap-target)) / 2) calc((100% - var(--tap-target)) / 2); } /* A card keeps its two-line head and its density (#17161): the 🗒 shows on a phone only once the item has notes; the row's ⋯ menu carries "Maintainer notes…" for the rest. */ @@ -15791,14 +15809,19 @@

    Where to get help

    } // A PR parked at 085 because a person has to act ON THE PR (rerun CI, // approve workflow runs, resolve a permission, answer review findings - // or red checks still open on its head) is not queued, merging or - // merge-ready: it lights PR in progress, never Merge queue. Merge - // queue is only for rows actually queued / merging / merged, or a - // merge-ready PR (review approved, CI green on this head) parked on a - // merge decision. A bare 085 with no track evidence keeps the gate: - // the person decides there (hive#14821). Hive's own #16524 read - // "Awaiting human: rerun shared ci" under Merge queue with CI unknown - // and review findings open. Mirrors stageTrackerPersonActsOnPR in Go. + // or red / running checks still open on its head) is not queued, + // merging or merge-ready: it lights its REAL stage, CI / Review — the + // CI track while checks run or are red / unknown, the Review track + // while the verdict is pending — never Merge queue and never PR in + // progress; the gate is the needs-human pill (hivecommons/hive#17327, + // #17453). Merge queue is only for rows actually queued / merging / + // merged, or a merge-ready PR (review approved, CI green on this head) + // parked on a merge decision. A bare 085 with no track evidence keeps + // the gate: the person decides there (hive#14821). Hive's own #16524 + // read "Awaiting human: rerun shared ci" under Merge queue with CI + // unknown and review findings open; #17442 read "Needs human · + // decision" under PR in progress while CI ran. Mirrors + // stageTrackerPersonActsOnPR in Go. function stageTrackerPersonActsOnPR(item) { if (!item || (item.via_pr ? 'pr' : item.kind) !== 'pr' || Number(item.stage) !== STAGE_TRACKER_HUMAN_GATED) return false; if (item.merge_gate && item.merge_gate.state) return false; @@ -18010,9 +18033,12 @@

    Where to get help

    // next to its 2nd-place sibling in Merge queue (hivecommons/hive#15395). if (item && item.merge_train && item.merge_train.state && cur > STAGE_TRACKER_PR_COLUMN) return STAGE_TRACKER_MERGE_COLUMN; // A person owes a step on the PR itself (085 under hive:unauthorized, - // not merge-ready): PR in progress, with the merge-queue chevron - // empty (hivecommons/hive#16524). - if (kind === 'pr' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return STAGE_TRACKER_PR_COLUMN; + // a reviewer's question, CI running or red on the head — not + // merge-ready): the row lights its REAL stage, CI / Review, with the + // merge-queue chevron empty and PR in progress passed; the human gate + // rides as the needs-human pill, never as a chevron of its own + // (hivecommons/hive#16524, #17327, #17453). + if (kind === 'pr' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return 50; if (cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION || cur === STAGE_TRACKER_TRIAGE_NEEDED || cur === STAGE_TRACKER_POSSIBLY_EXISTS || cur === STAGE_TRACKER_OPEN_FOR_DISCUSSION) return STAGE_TRACKER_ISSUE_DECISION_COLUMN; if (cur === STAGE_TRACKER_NEEDS_DECISION && kind === 'issue') return STAGE_TRACKER_ISSUE_DECISION_COLUMN; if (STAGE_TRACKER_PATH.indexOf(cur) >= 0) return cur; @@ -18641,6 +18667,10 @@

    Where to get help

    function stageTrackerStalledTrack(item) { const on = kind => { const a = item && item[kind + '_activity']; return a && item.head && a.head === item.head ? a.state || 'unknown' : 'unknown'; }; if (typeof stageTrackerStageTrack === 'function' && stageTrackerStageTrack(item)) return ''; + // A 085 PR a person acts on whose review already asked for that + // person (human_decision) is at Review: the ask came from the + // review, whatever CI has or has not reported (hivecommons/hive#17453). + if (on('review') === 'human_decision' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return 'review'; if (on('ci') !== 'passing') return 'ci'; return 'review'; } @@ -18692,7 +18722,12 @@

    Where to get help

    function stageTrackerTrackRunning(item, kind) { const a = item && item[kind + '_activity']; if (!a || !item.head || a.head !== item.head) return false; - if (stageTrackerWaitingOnPerson(item)) return false; + // A 085 PR a person acts on (stageTrackerPersonActsOnPR) is parked, + // but checks genuinely running on its head are still motion: the CI + // track is its real stage and lights (hivecommons/hive#17453). + // Inferred motion (the ring count below) stays off for it. + const personActs = typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item); + if (stageTrackerWaitingOnPerson(item) && !personActs) return false; const moving = kind === 'ci' ? ['running', 'queued'] : ['reviewing', 'adjudicating', 'assigned']; if (a.active || moving.includes(a.state)) return true; // A CI ring that is not full is a running ring: checks counted on @@ -18810,7 +18845,11 @@

    Where to get help

    const queuedNote = queued && typeof stageTrackerQueuedTrackNote === 'function' ? stageTrackerQueuedTrackNote(item, kind) : ''; // A demoted track is still: no pulse beside the lead. if (queued) active = false; - const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') : (finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo') + (queued ? ' ham-track-queued' : ''); + // The lit track of a 085 PR a person acts on wears an amber marker + // (ham-human-gated): the chevron is the real stage, the gate is the + // needs-human pill beside it (hivecommons/hive#17453). + const humanGated = lit && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item); + const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') + (humanGated ? ' ham-human-gated' : '') : (finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo') + (queued ? ' ham-track-queued' : ''); const approvalPending = kind === 'ci' && matches ? stageTrackerWorkflowApprovalPending(a) : 0; const humanAction = approvalPending > 0 ? STAGE_TRACKER_WORKFLOW_APPROVAL_TIP : kind === 'review' && state === 'human_decision' ? 'Needs a person\'s decision' : ''; const personIco = stalled && humanAction ? stageTrackerIcon('human', 'ham-ico ham-actor-ico', humanAction) : ''; @@ -18868,6 +18907,7 @@

    Where to get help

    (matches && a.actor ? ' · actor ' + a.actor : '') + (codeNote || contextWord ? ' · ' + (codeNote || contextWord) : '') + (hold ? ' · ' + (hold.pill || 'Held by @' + hold.by) + (hold.reason ? ' · ' + hold.reason : '') : '') + + (humanGated && item.decision_needed && item.decision_needed.question && !String(tip).includes(String(item.decision_needed.question)) ? ' · needs a person: ' + String(item.decision_needed.question) : '') + (waitLead ? ' · hive is waiting on ' + waitLead.waitingOn + (waitLead.newHead && sha7 ? ' for new head ' + sha7 : '') : '') + (queuedNote ? ' · ' + queuedNote + ' behind ' + (lead === 'ci' ? 'CI' : 'Review') : ''); const tipID = 'ham-track-tip-' + [item.repo || '', item.kind || '', item.number || 0, kind].map(x => encodeURIComponent(String(x))).join('-'); @@ -19382,6 +19422,16 @@

    Where to get help

    const sentinel = stageTrackerSentinelChipHtml(item) + (typeof stageTrackerPreparationChipHtml === 'function' ? stageTrackerPreparationChipHtml(item) : '') + (typeof stageTrackerAdoptionChipHtml === 'function' ? stageTrackerAdoptionChipHtml(item) : '') + (typeof stageTrackerPresenceChipHtml === 'function' ? stageTrackerPresenceChipHtml(item) : '') + (typeof stageTrackerPushChipHtml === 'function' ? stageTrackerPushChipHtml(item, Date.now()) : '') + (typeof stageTrackerReroutePillHtml === 'function' ? stageTrackerReroutePillHtml(item) : '') + (typeof stageTrackerSupersedesChipHtml === 'function' ? stageTrackerSupersedesChipHtml(item, Date.now()) : '') + (typeof stageTrackerOverlapBadgeHtml === 'function' ? stageTrackerOverlapBadgeHtml(item) : ''); const mods = (Array.isArray(item.modifiers) ? item.modifiers.slice() : []) .sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); + // A 085 PR a person acts on lights its real stage (CI / Review), so + // the chevron no longer says "Needs human decision": the ask rides + // here as the needs-decision pill (hivecommons/hive#17453). The server + // re-adds the modifier (stageTrackerApplyPersonActsOnPRPill); this + // covers a payload that predates it. Any pill that already names the + // person owed (unauthorized, hold …) stands in for it. + if (item.kind === 'pr' && !mods.some(m => STAGE_TRACKER_HUMAN_MODS.indexOf(m) >= 0) && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) { + mods.push('needs-decision'); + mods.sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); + } if (!mods.length) return sentinel; // A regression the hive is working through yields the lead pill to any // other modifier and, alone, draws muted as "stage reset" rather than red. @@ -19434,7 +19484,11 @@

    Where to get help

    // of a native tooltip. // A hive-set hold is a decision too (release or keep): its pill opens the same popover. const decision = (mods[0] === 'needs-human' || mods[0] === 'needs-decision' || decisionPR || (holdPill && item.hold && item.hold.by === 'hive')) && typeof stageTrackerDecisionOf === 'function' ? stageTrackerDecisionOf(item) : null; - if (decision) return sentinel + stageTrackerDecisionTriggerHtml(decision, inner, tip, 'ham-badge ham-badge-mod ' + cls); + // The ask pill wears the person icon; in the stacked head layout the + // words fold into the icon so a nested PR's title keeps its line and + // the popover / hover still carry the question (hivecommons/hive#17453). + const askIco = askable && typeof stageTrackerIcon === 'function' ? stageTrackerIcon('human', 'ham-ico ham-mod-ico') : ''; + if (decision) return sentinel + stageTrackerDecisionTriggerHtml(decision, askIco ? askIco + `${inner}` : inner, tip, 'ham-badge ham-badge-mod ' + cls + (askIco ? ' ham-mod-ask' : '')); // No popover to open (the ask is the issue's own while a covering // PR drives the strip): the pill is a button that reveals the row's // "Needs human: …" note line and carries the full reason as its hover. diff --git a/src/pkg/webassets/trackerrow/tracker-row-anchor.js b/src/pkg/webassets/trackerrow/tracker-row-anchor.js index b8454d15d9..3974e51083 100644 --- a/src/pkg/webassets/trackerrow/tracker-row-anchor.js +++ b/src/pkg/webassets/trackerrow/tracker-row-anchor.js @@ -45,9 +45,12 @@ // next to its 2nd-place sibling in Merge queue (hivecommons/hive#15395). if (item && item.merge_train && item.merge_train.state && cur > STAGE_TRACKER_PR_COLUMN) return STAGE_TRACKER_MERGE_COLUMN; // A person owes a step on the PR itself (085 under hive:unauthorized, - // not merge-ready): PR in progress, with the merge-queue chevron - // empty (hivecommons/hive#16524). - if (kind === 'pr' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return STAGE_TRACKER_PR_COLUMN; + // a reviewer's question, CI running or red on the head — not + // merge-ready): the row lights its REAL stage, CI / Review, with the + // merge-queue chevron empty and PR in progress passed; the human gate + // rides as the needs-human pill, never as a chevron of its own + // (hivecommons/hive#16524, #17327, #17453). + if (kind === 'pr' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return 50; if (cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION || cur === STAGE_TRACKER_TRIAGE_NEEDED || cur === STAGE_TRACKER_POSSIBLY_EXISTS || cur === STAGE_TRACKER_OPEN_FOR_DISCUSSION) return STAGE_TRACKER_ISSUE_DECISION_COLUMN; if (cur === STAGE_TRACKER_NEEDS_DECISION && kind === 'issue') return STAGE_TRACKER_ISSUE_DECISION_COLUMN; if (STAGE_TRACKER_PATH.indexOf(cur) >= 0) return cur; From 70e18aa49095d981bf48eeb0860f0a8e2697d51f Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 00:45:06 +0000 Subject: [PATCH 081/123] =?UTF-8?q?=F0=9F=90=9B=20fix(config):=20shrink=20?= =?UTF-8?q?cfgReloadMu=20critical=20section=20so=20hot-reload=20is=20appli?= =?UTF-8?q?ed=20and=20not=20clobbered=20by=20persist=20(#17472)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(config): stop the governor run loop starving hot-reload and clobbering reloaded config Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> * 🐛 fix(config): save a reloaded config back when a stale save landed while it was parked Review findings on #17472: the cfg_reload.go comment and changelog said the tick's persist rewrote hive.yaml without saying how, and the generation gate only covers that one writer. persistState does write hive.yaml, through Config.ReconcilePausedAndSave; the comments now name that path. The savers that run without cfgReloadMu (hub heartbeat callbacks, dashboard mutations, the agent pause callback) could still write the pre-reload config to disk while a reload sat parked behind a long tick, which is the overwrite the issue reports. config.SaveSeq() now counts config writes. submitConfigReload records it when a reload is parked; applyPendingReloadLocked compares after the swap and, if any save ran in between, saves the reloaded config back so disk matches memory. The save arms SkipNext via the save observer, so it does not re-trigger the watcher. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 📝 docs(changelog): put the reload-starvation entry back under changelog.d/ The previous commit rewrote the entry at src/changelog.d/ by mistake. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 fix(config): persist governor state after a mid-tick reload and lock the shutdown save Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- changelog.d/fixed-config-reload-starvation.md | 1 + src/cmd/hive/boot.go | 22 +++ src/cmd/hive/boot_watchers_deps_test.go | 30 ++--- src/cmd/hive/cfg_reload.go | 125 ++++++++++++++++++ src/cmd/hive/cfg_reload_test.go | 103 +++++++++++++++ src/cmd/hive/main.go | 59 +++++---- src/cmd/hive/run_loop_deps_test.go | 93 +++++++++++++ src/pkg/config/config.go | 13 ++ src/pkg/config/config_extra_test.go | 33 +++++ 9 files changed, 434 insertions(+), 45 deletions(-) create mode 100644 changelog.d/fixed-config-reload-starvation.md create mode 100644 src/cmd/hive/cfg_reload.go create mode 100644 src/cmd/hive/cfg_reload_test.go diff --git a/changelog.d/fixed-config-reload-starvation.md b/changelog.d/fixed-config-reload-starvation.md new file mode 100644 index 0000000000..3d1fb9de43 --- /dev/null +++ b/changelog.d/fixed-config-reload-starvation.md @@ -0,0 +1 @@ +- Editing `hive.yaml` on a busy hive now takes effect: a config hot-reload no longer waits behind a whole governor cycle but is applied before that cycle's state persist, so the persist (which also rewrites `hive.yaml`) saves the reloaded config instead of the one the cycle started from, and the shutdown persist now takes the config lock so it cannot race a reload. If any other save (hub heartbeat, dashboard, agent pause) wrote the pre-reload config to `hive.yaml` while the reload was waiting, the reloaded config is saved back once it is applied ([#17467](https://github.com/hivecommons/hive/issues/17467)). diff --git a/src/cmd/hive/boot.go b/src/cmd/hive/boot.go index 0a489d76a9..96abb844ce 100644 --- a/src/cmd/hive/boot.go +++ b/src/cmd/hive/boot.go @@ -74,7 +74,29 @@ type boot struct { // the governor loop's tick bodies that read cfg. Without it, a reload // racing the fast agent-status tick crashed the process with "concurrent // map read and map write" in buildConfiguredAgents. + // + // The governor loop holds it for a whole tick, so the watcher callback + // never waits for it: submitConfigReload parks the reload in + // pendingReload and the holder applies it at its next safe point via + // lockCfg/unlockCfg (hivecommons/hive#17467). cfgReloadMu sync.Mutex + // reloadApply swaps a reloaded config into cfg and re-syncs the + // subsystems that cache it. Caller holds cfgReloadMu; it returns the + // ACMM level transition to fire once the lock is released. + reloadApply func(*config.Config) (prevACMMLevel, nextACMMLevel int) + // pendingACMM holds ACMM transitions applied under cfgReloadMu that + // unlockCfg fires after releasing it; guarded by cfgReloadMu. + pendingACMM [][2]int + // pendingReloadMu guards pendingReload, the newest reload the watcher + // delivered that has not been applied yet, and parkedSaveSeq, the + // config.SaveSeq() seen when the oldest of those reloads was parked. + pendingReloadMu sync.Mutex + pendingReload *config.Config + parkedSaveSeq uint64 + // configSaveSeq and saveConfig default to config.SaveSeq and cfg.Save; + // tests replace them. + configSaveSeq func() uint64 + saveConfig func() error // sweepConfig is an immutable copy published outside long-running eval IO. sweepConfig atomic.Pointer[config.Config] diff --git a/src/cmd/hive/boot_watchers_deps_test.go b/src/cmd/hive/boot_watchers_deps_test.go index 82fa1595b1..3ee597579c 100644 --- a/src/cmd/hive/boot_watchers_deps_test.go +++ b/src/cmd/hive/boot_watchers_deps_test.go @@ -244,11 +244,13 @@ func TestBootWatchersWith_ReloadWithChangedIdentityRebuildsAuth(t *testing.T) { // A config reload runs on the watcher's timer goroutine and mutates *cfg // (including the cfg.Agents map) that the governor loop's ticks read. It must -// wait for cfgReloadMu, or a reload racing the fast agent-status tick crashes -// the process with "concurrent map read and map write". -func TestBootWatchersWith_ReloadWaitsForConfigLock(t *testing.T) { +// not touch cfg while the loop holds cfgReloadMu, or a reload racing the fast +// agent-status tick crashes the process with "concurrent map read and map +// write". It must not wait for the lock either: the loop holds it for whole +// ticks, which starved hot-reload (hivecommons/hive#17467). The reload is +// parked and applied when the holder releases the lock. +func TestBootWatchersWith_ReloadDefersWhileConfigLockHeld(t *testing.T) { const reloadWait = 5 * time.Second - const blockedCheck = 100 * time.Millisecond f := newBootWatchersFake() cfg := bootWatchersConfig() @@ -265,7 +267,7 @@ func TestBootWatchersWith_ReloadWaitsForConfigLock(t *testing.T) { "scanner": {Enabled: true, Backend: "copilot", Model: "gpt-5.4"}, } - b.cfgReloadMu.Lock() + b.lockCfg() done := make(chan struct{}) go func() { f.onReload(newCfg) @@ -274,22 +276,16 @@ func TestBootWatchersWith_ReloadWaitsForConfigLock(t *testing.T) { select { case <-done: - b.cfgReloadMu.Unlock() - t.Fatal("reload applied while the governor loop held cfgReloadMu") - case <-time.After(blockedCheck): + case <-time.After(reloadWait): + b.unlockCfg() + t.Fatal("reload callback blocked on cfgReloadMu held by the governor loop") } if sameStringSlice(cfg.Project.Repos, []string{"widgets", "reloaded"}) { - b.cfgReloadMu.Unlock() + b.unlockCfg() t.Fatal("reload mutated cfg while the governor loop held cfgReloadMu") } - - b.cfgReloadMu.Unlock() - select { - case <-done: - case <-time.After(reloadWait): - t.Fatal("reload never completed after cfgReloadMu was released") - } + b.unlockCfg() if !sameStringSlice(cfg.Project.Repos, []string{"widgets", "reloaded"}) { - t.Fatalf("repos = %v after reload, want the reloaded list", cfg.Project.Repos) + t.Fatalf("repos = %v after the lock was released, want the reloaded list", cfg.Project.Repos) } } diff --git a/src/cmd/hive/cfg_reload.go b/src/cmd/hive/cfg_reload.go new file mode 100644 index 0000000000..941dbee0b6 --- /dev/null +++ b/src/cmd/hive/cfg_reload.go @@ -0,0 +1,125 @@ +package main + +import "github.com/hivecommons/hive/pkg/config" + +// submitConfigReload is the config watcher's callback. The governor loop +// holds cfgReloadMu for a whole tick (minutes on a busy spoke), so waiting +// for it starved hot-reload, and every save made from the in-memory config +// in the meantime (the tick's persistState, whose +// Config.ReconcilePausedAndSave rewrites hive.yaml) wrote the pre-reload +// config over the operator's edit (hivecommons/hive#17467). The reload is +// parked instead: applied now when the lock is free, otherwise by the holder +// at its next safe point, which is always before the tick's persist. Only the +// newest parked reload is applied; each one is a full file. +// +// Savers that run without cfgReloadMu (heartbeat callbacks, dashboard +// mutations, the pause callback) can still write the pre-reload config to +// hive.yaml while the reload is parked. config.SaveSeq() is recorded at park +// time so applyPendingReloadLocked can detect that and save the reloaded +// config back to disk. +func (b *boot) submitConfigReload(newCfg *config.Config) { + b.pendingReloadMu.Lock() + if b.pendingReload == nil { + b.parkedSaveSeq = b.currentSaveSeq() + } + b.pendingReload = newCfg + b.pendingReloadMu.Unlock() + if !b.cfgReloadMu.TryLock() { + if b.logger != nil { + b.logger.Info("config reload deferred until the governor cycle reaches a safe point") + } + return + } + b.unlockCfg() +} + +// lockCfg acquires cfgReloadMu and applies any parked reload, so the work +// that follows reads the newest config. +func (b *boot) lockCfg() { + b.cfgReloadMu.Lock() + b.applyPendingReloadLocked() +} + +// unlockCfg applies any parked reload, releases cfgReloadMu and fires the +// ACMM transitions those reloads caused. A reload parked after the last check +// but before the release (its TryLock failed against us) is picked up by the +// loop, so a parked reload is never stranded. +func (b *boot) unlockCfg() { + for { + b.applyPendingReloadLocked() + transitions := b.pendingACMM + b.pendingACMM = nil + b.cfgReloadMu.Unlock() + for _, t := range transitions { + b.onACMMLevelChanged(t[0], t[1]) + } + if !b.hasPendingReload() || !b.cfgReloadMu.TryLock() { + return + } + } +} + +func (b *boot) hasPendingReload() bool { + b.pendingReloadMu.Lock() + defer b.pendingReloadMu.Unlock() + return b.pendingReload != nil && b.reloadApply != nil +} + +func (b *boot) currentSaveSeq() uint64 { + if b.configSaveSeq != nil { + return b.configSaveSeq() + } + return config.SaveSeq() +} + +func (b *boot) saveReloadedConfig() error { + if b.saveConfig != nil { + return b.saveConfig() + } + return b.cfg.Save() +} + +// applyPendingReloadLocked swaps in the parked reload, if any. Caller holds +// cfgReloadMu. +// +// If any config save started while the reload was parked, hive.yaml now +// holds the pre-reload config, not the operator's edit. The reloaded config +// is saved back so disk matches memory; the save arms the watcher's SkipNext +// through the save observer, so it does not trigger another reload. +func (b *boot) applyPendingReloadLocked() { + if b.reloadApply == nil { + return + } + b.pendingReloadMu.Lock() + newCfg := b.pendingReload + parkedSeq := b.parkedSaveSeq + b.pendingReload = nil + b.pendingReloadMu.Unlock() + if newCfg == nil { + return + } + prev, next := b.reloadApply(newCfg) + if prev != next { + b.pendingACMM = append(b.pendingACMM, [2]int{prev, next}) + } + if seq := b.currentSaveSeq(); seq != parkedSeq { + if b.logger != nil { + b.logger.Info("config was saved while a reload was pending; saving the reloaded config back to disk", + "saves_while_pending", seq-parkedSeq) + } + if err := b.saveReloadedConfig(); err != nil && b.logger != nil { + b.logger.Error("failed to save reloaded config back to disk", "error", err) + } + } +} + +// persistCycleLocked is a governor tick's persist. persistState writes the +// governor snapshot and reach counters and ends in +// Config.ReconcilePausedAndSave, which rewrites hive.yaml from the in-memory +// config. Any parked reload is applied first, so the save writes the +// reloaded config rather than the one the tick started from, and the +// governor state is still saved this tick. Caller holds cfgReloadMu. +func (b *boot) persistCycleLocked(persist func(*boot)) { + b.applyPendingReloadLocked() + persist(b) +} diff --git a/src/cmd/hive/cfg_reload_test.go b/src/cmd/hive/cfg_reload_test.go new file mode 100644 index 0000000000..9d1def0dc1 --- /dev/null +++ b/src/cmd/hive/cfg_reload_test.go @@ -0,0 +1,103 @@ +package main + +import ( + "strings" + "testing" + + "github.com/hivecommons/hive/pkg/config" +) + +// A save that ran from the pre-reload config while the reload was parked +// left hive.yaml without the operator's edit; applying the reload must save +// the reloaded config back (hivecommons/hive#17467). +func TestApplyPendingReload_SavesBackAfterStaleSaveWhileParked(t *testing.T) { + b, log, _ := newLoopBoot(t, 60, 0) + b.reloadApply = func(newCfg *config.Config) (int, int) { + *b.cfg = *newCfg + return 0, 0 + } + var seq uint64 + b.configSaveSeq = func() uint64 { return seq } + var saved [][]string + b.saveConfig = func() error { + saved = append(saved, append([]string(nil), b.cfg.Project.Repos...)) + return nil + } + + newCfg := &config.Config{AgentRuntimeConfig: config.AgentRuntimeConfig{Agents: map[string]config.AgentConfig{"alpha": {Enabled: true}}}} + newCfg.Project.Repos = []string{"reloaded"} + + b.lockCfg() + b.submitConfigReload(newCfg) + seq++ // e.g. a heartbeat callback's cfg.Save() from the stale config + b.unlockCfg() + + if !sameStringSlice(b.cfg.Project.Repos, []string{"reloaded"}) { + t.Fatalf("repos = %v, want the reloaded config applied", b.cfg.Project.Repos) + } + if len(saved) != 1 || !sameStringSlice(saved[0], []string{"reloaded"}) { + t.Fatalf("saves after reload = %v, want exactly one save of the reloaded config", saved) + } + if !strings.Contains(log.String(), "saving the reloaded config back to disk") { + t.Fatalf("write-back not logged:\n%s", log.String()) + } +} + +func TestApplyPendingReload_NoSaveBackWithoutStaleSave(t *testing.T) { + b, _, _ := newLoopBoot(t, 60, 0) + b.reloadApply = func(newCfg *config.Config) (int, int) { + *b.cfg = *newCfg + return 0, 0 + } + b.configSaveSeq = func() uint64 { return 7 } + saves := 0 + b.saveConfig = func() error { saves++; return nil } + + newCfg := &config.Config{AgentRuntimeConfig: config.AgentRuntimeConfig{Agents: map[string]config.AgentConfig{"alpha": {Enabled: true}}}} + newCfg.Project.Repos = []string{"reloaded"} + + // Deferred and immediate paths both leave disk alone when nothing saved. + b.lockCfg() + b.submitConfigReload(newCfg) + b.unlockCfg() + b.submitConfigReload(newCfg) + + if saves != 0 { + t.Fatalf("saves = %d, want 0 when no save ran while the reload was pending", saves) + } + if !sameStringSlice(b.cfg.Project.Repos, []string{"reloaded"}) { + t.Fatalf("repos = %v, want the reloaded config applied", b.cfg.Project.Repos) + } +} + +// parkedSaveSeq belongs to the oldest unapplied reload: a save between two +// parked reloads still counts, since the disk may hold neither edit. +func TestApplyPendingReload_SaveSeqAnchoredToOldestParkedReload(t *testing.T) { + b, _, _ := newLoopBoot(t, 60, 0) + b.reloadApply = func(newCfg *config.Config) (int, int) { + *b.cfg = *newCfg + return 0, 0 + } + var seq uint64 + b.configSaveSeq = func() uint64 { return seq } + saves := 0 + b.saveConfig = func() error { saves++; return nil } + + first := &config.Config{AgentRuntimeConfig: config.AgentRuntimeConfig{Agents: map[string]config.AgentConfig{"alpha": {Enabled: true}}}} + first.Project.Repos = []string{"first"} + second := &config.Config{AgentRuntimeConfig: config.AgentRuntimeConfig{Agents: map[string]config.AgentConfig{"alpha": {Enabled: true}}}} + second.Project.Repos = []string{"second"} + + b.lockCfg() + b.submitConfigReload(first) + seq++ + b.submitConfigReload(second) + b.unlockCfg() + + if saves != 1 { + t.Fatalf("saves = %d, want 1", saves) + } + if !sameStringSlice(b.cfg.Project.Repos, []string{"second"}) { + t.Fatalf("repos = %v, want the newest reload applied", b.cfg.Project.Repos) + } +} diff --git a/src/cmd/hive/main.go b/src/cmd/hive/main.go index daaff1fa34..f3c6da9251 100644 --- a/src/cmd/hive/main.go +++ b/src/cmd/hive/main.go @@ -3740,17 +3740,14 @@ func (b *boot) bootWatchers() { b.bootWatchersWith(defaultBootWatchersDeps()) } // bootWatchersDeps. func (b *boot) bootWatchersWith(deps bootWatchersDeps) { // Watch hive.yaml for external changes and reload config when modified - b.configWatcher = deps.newConfigWatcher(b.configPath, func(newCfg *config.Config) { - b.cfgReloadMu.Lock() - prevACMMLevel := b.cfg.ACMMLevelOrZero() - nextACMMLevel := prevACMMLevel - defer func() { - b.publishSweepConfig() - b.cfgReloadMu.Unlock() - if prevACMMLevel != nextACMMLevel { - b.onACMMLevelChanged(prevACMMLevel, nextACMMLevel) - } - }() + // The watcher callback never waits for cfgReloadMu: submitConfigReload + // parks the config and whichever goroutine holds the lock applies it at + // its next safe point (hivecommons/hive#17467). reloadApply runs with + // cfgReloadMu held and returns the ACMM transition to fire after unlock. + b.reloadApply = func(newCfg *config.Config) (prevACMMLevel, nextACMMLevel int) { + prevACMMLevel = b.cfg.ACMMLevelOrZero() + nextACMMLevel = prevACMMLevel + defer b.publishSweepConfig() // Preserve runtime-only fields that are not in the YAML newCfg.HiveID = b.cfg.HiveID @@ -3918,7 +3915,9 @@ func (b *boot) bootWatchersWith(deps bootWatchersDeps) { } b.refreshDashboard() - }, b.logger) + return prevACMMLevel, nextACMMLevel + } + b.configWatcher = deps.newConfigWatcher(b.configPath, b.submitConfigReload, b.logger) config.SetSaveObserver(b.configWatcher.SkipNext) b.dashSrv.SetSkipReloadFunc(b.configWatcher.SkipNext) deps.startConfigWatcher(b.ctx, b.configWatcher) @@ -6033,16 +6032,16 @@ func (b *boot) runLoopWith(deps runLoopDeps) { if loopNow == nil { loopNow = time.Now } - b.cfgReloadMu.Lock() + b.lockCfg() b.publishSweepConfig() - b.cfgReloadMu.Unlock() + b.unlockCfg() if deps.startSweeps != nil { defer deps.startSweeps(b)() } // Cadence is measured from the start, including the first (often slow) // enumerate pass, not from completion of startup evaluation. lastEnumerateAt := loopNow() - b.cfgReloadMu.Lock() + b.lockCfg() initialTickStarted := time.Now() b.evalCycles++ deps.runEval(b, nil, evalSourceEnumerate) @@ -6062,8 +6061,8 @@ func (b *boot) runLoopWith(deps runLoopDeps) { if b.wd != nil { b.wd.Tick(b.ctx) } - deps.persist(b) - b.cfgReloadMu.Unlock() + b.persistCycleLocked(deps.persist) + b.unlockCfg() b.logger.Info("governor tick complete", "tick_wall_s", time.Since(initialTickStarted).Seconds(), "eval_s", initialEvalDuration.Seconds(), "rotation_s", initialRotationDuration.Seconds(), "sweeps_s", 0, "source", evalSourceEnumerate.String(), "startup", true) @@ -6085,7 +6084,7 @@ func (b *boot) runLoopWith(deps runLoopDeps) { if source == evalSourceEnumerate { lastEnumerateAt = loopNow() } - b.cfgReloadMu.Lock() + b.lockCfg() b.publishSweepConfig() restarted := deps.restartCrashed(b.ctx, b.agentMgr) for _, name := range restarted { @@ -6171,7 +6170,7 @@ func (b *boot) runLoopWith(deps runLoopDeps) { b.logger.Info("retro lane filed advisory beads", "findings", n) } } - deps.persist(b) + b.persistCycleLocked(deps.persist) effectiveEvalInterval, mode := evalIntervalAndModeForConfig(b.cfg, b.ghClient, b.logger) if effectiveEvalInterval != lastEvalInterval { b.logger.Info("eval interval changed, resetting ticker", @@ -6182,7 +6181,7 @@ func (b *boot) runLoopWith(deps runLoopDeps) { if b.evalLoop != nil { b.evalLoop.setInterval(effectiveEvalInterval, mode) } - b.cfgReloadMu.Unlock() + b.unlockCfg() b.logger.Info("governor tick complete", "tick_wall_s", time.Since(tickStarted).Seconds(), "eval_s", evalDuration.Seconds(), "rotation_s", rotationDuration.Seconds(), "sweeps_s", 0, "source", source.String()) @@ -6300,11 +6299,11 @@ func (b *boot) runLoopWith(deps runLoopDeps) { tick(evalSourceCached) } else { // Keep this cycle lean: planning and delivery without sweeps. - b.cfgReloadMu.Lock() + b.lockCfg() b.evalCycles++ deps.runEval(b, nil, evalSourceCached) - deps.persist(b) - b.cfgReloadMu.Unlock() + b.persistCycleLocked(deps.persist) + b.unlockCfg() } after, afterWho := b.gov.NextContinuousKickAt() if backoff, stalled := wakeHold.observe(next, after, who, afterWho, wakeNow()); stalled { @@ -6337,7 +6336,11 @@ func (b *boot) runLoopWith(deps runLoopDeps) { select { case <-b.ctx.Done(): b.logger.Info("shutting down, persisting state") - deps.persist(b) + // Under the config lock, so a reload being applied cannot race + // the final save and the save writes the newest config. + b.lockCfg() + b.persistCycleLocked(deps.persist) + b.unlockCfg() return case <-ticker.Chan(): tick(evalSourceEnumerate) @@ -6377,7 +6380,7 @@ func (b *boot) runLoopWith(deps runLoopDeps) { armContinuousWake() armWebhookHealthRecheck() case <-healthCh: - b.cfgReloadMu.Lock() + b.lockCfg() effectiveEvalInterval, mode := evalIntervalAndModeForConfig(b.cfg, b.ghClient, b.logger) if effectiveEvalInterval != lastEvalInterval { b.logger.Info("eval interval changed, resetting ticker", @@ -6388,17 +6391,17 @@ func (b *boot) runLoopWith(deps runLoopDeps) { if b.evalLoop != nil { b.evalLoop.setInterval(effectiveEvalInterval, mode) } - b.cfgReloadMu.Unlock() + b.unlockCfg() armWebhookHealthRecheck() case <-wakeCh: // The loop-top due check services this timer. armContinuousWake() case <-agentTickCh: - b.cfgReloadMu.Lock() + b.lockCfg() govState := b.gov.GetState() agentStatuses := b.agentMgr.AllStatuses() payload := dashboard.BuildAgentOnlyStatus(govState, agentStatuses, b.cfg) - b.cfgReloadMu.Unlock() + b.unlockCfg() b.dashSrv.BroadcastAgentStatus(payload) } } diff --git a/src/cmd/hive/run_loop_deps_test.go b/src/cmd/hive/run_loop_deps_test.go index bef9bdff5d..acc2af2af4 100644 --- a/src/cmd/hive/run_loop_deps_test.go +++ b/src/cmd/hive/run_loop_deps_test.go @@ -170,6 +170,99 @@ func TestRunLoopWithRunsFirstCycleThenTicks(t *testing.T) { } } +// hivecommons/hive#17467: a hot-reload delivered while a governor tick holds +// cfgReloadMu must not wait for the tick and must be applied before that +// tick's persist, so the persist saves the reloaded config (not the one the +// tick started from) and the governor state is not deferred a tick. The +// shutdown persist also saves the reloaded config. +func TestRunLoopWithAppliesMidCycleReloadWithoutClobbering(t *testing.T) { + b, log, cancel := newLoopBoot(t, 60, 0) + b.reloadApply = func(newCfg *config.Config) (int, int) { + *b.cfg = *newCfg + return 0, 0 + } + gov := newFakeTicker() + h := &loopHarness{startupOK: true, pending: []*fakeTicker{gov}, persisted: make(chan struct{}, 8)} + deps := h.deps() + + var persistedRepos [][]string + basePersist := deps.persist + deps.persist = func(b *boot) { + persistedRepos = append(persistedRepos, append([]string(nil), b.cfg.Project.Repos...)) + basePersist(b) + } + baseEval := deps.runEval + deps.runEval = func(b *boot, restarted []string, source evalCycleSource) { + baseEval(b, restarted, source) + if len(h.evals) != 2 { + return + } + // The watcher fires on its own goroutine while this tick holds + // cfgReloadMu; it must return without waiting for the tick. + newCfg := &config.Config{AgentRuntimeConfig: config.AgentRuntimeConfig{Agents: map[string]config.AgentConfig{"alpha": {Enabled: true}}}} + newCfg.Governor.EvalIntervalS = 60 + newCfg.Project.Repos = []string{"reloaded"} + submitted := make(chan struct{}) + go func() { + b.submitConfigReload(newCfg) + close(submitted) + }() + select { + case <-submitted: + case <-time.After(5 * time.Second): + t.Error("config reload blocked behind the governor tick") + } + if sameStringSlice(b.cfg.Project.Repos, []string{"reloaded"}) { + t.Error("reload mutated cfg while the eval cycle was running") + } + } + + done := runLoopAsync(b, deps) + <-h.persisted // startup cycle + gov.fire() // reload lands mid-tick and is applied before its persist + <-h.persisted + cancel() + waitDone(t, done) + + if !sameStringSlice(b.cfg.Project.Repos, []string{"reloaded"}) { + t.Fatalf("repos = %v, want the reloaded config applied", b.cfg.Project.Repos) + } + // startup cycle, the tick the reload landed in, shutdown. + if len(persistedRepos) != 3 || len(persistedRepos[0]) != 0 || + !sameStringSlice(persistedRepos[1], []string{"reloaded"}) || !sameStringSlice(persistedRepos[2], []string{"reloaded"}) { + t.Fatalf("persisted repos per save = %v, want [[] [reloaded] [reloaded]]", persistedRepos) + } + if !strings.Contains(log.String(), "config reload deferred") { + t.Fatalf("deferred reload not logged:\n%s", log.String()) + } +} + +// hivecommons/hive#17467: the shutdown persist takes cfgReloadMu, so it cannot +// save while a reload is being applied. +func TestRunLoopWithShutdownPersistTakesConfigLock(t *testing.T) { + b, _, cancel := newLoopBoot(t, 60, 0) + gov := newFakeTicker() + h := &loopHarness{startupOK: true, pending: []*fakeTicker{gov}, persisted: make(chan struct{}, 8)} + done := runLoopAsync(b, h.deps()) + <-h.persisted // startup cycle + + b.lockCfg() + cancel() + select { + case <-h.persisted: + b.unlockCfg() + t.Fatal("shutdown persist ran while cfgReloadMu was held") + case <-time.After(100 * time.Millisecond): + } + b.unlockCfg() + select { + case <-h.persisted: + case <-time.After(5 * time.Second): + t.Fatal("shutdown persist did not run after cfgReloadMu was released") + } + waitDone(t, done) +} + // staticFleet is a watchdog.Fleet with no agents, so Tick is a no-op and the // test only exercises runLoop's mode re-resolution. type staticFleet struct{} diff --git a/src/pkg/config/config.go b/src/pkg/config/config.go index 146d23e878..d7dac38cbb 100644 --- a/src/pkg/config/config.go +++ b/src/pkg/config/config.go @@ -19,6 +19,7 @@ import ( "strconv" "strings" "sync" + "sync/atomic" "testing" "time" @@ -44,6 +45,17 @@ import ( // only the last 1-2 on the PVC. Serializing every Save() closes the race. var saveMu sync.Mutex +// saveSeq counts the config file writes this process has started. A reload +// that cannot be applied yet records it when it is parked; a different value +// when it is finally applied means some other saver rewrote hive.yaml from the +// pre-reload config in between (hivecommons/hive#17467). +var saveSeq atomic.Uint64 + +// SaveSeq reports the number of config file writes started by this process: +// every Config.Save, SetAgentPausedAndSave and ReconcilePausedAndSave that +// reached the write stage, from any goroutine. +func SaveSeq() uint64 { return saveSeq.Load() } + var ( saveObserverMu sync.Mutex saveObserver func() @@ -7515,6 +7527,7 @@ func (c *Config) saveLocked() error { return fmt.Errorf("marshaling config: %w", err) } + saveSeq.Add(1) notifySaveObserver() // Write the dashboard overlay before touching the watched primary config. diff --git a/src/pkg/config/config_extra_test.go b/src/pkg/config/config_extra_test.go index 7de1d8bb3a..4c773db9fa 100644 --- a/src/pkg/config/config_extra_test.go +++ b/src/pkg/config/config_extra_test.go @@ -1107,3 +1107,36 @@ func TestGitHubGraphQLPRBatchYAMLRoundTrip(t *testing.T) { t.Fatalf("yaml page size = %d, want 25", got) } } + +func TestSaveSeq_CountsStartedWrites(t *testing.T) { + dir := t.TempDir() + cfg := &Config{ + SourcePath: filepath.Join(dir, "hive.yaml"), + Project: ProjectConfig{Org: "testorg", Repos: []string{"repo1"}}, + AgentRuntimeConfig: AgentRuntimeConfig{ + Agents: map[string]AgentConfig{"scanner": {Backend: "claude", Paused: false}}, + }, + } + + before := SaveSeq() + if err := cfg.Save(); err != nil { + t.Fatalf("Save() error: %v", err) + } + if got := SaveSeq(); got != before+1 { + t.Fatalf("SaveSeq after Save = %d, want %d", got, before+1) + } + if _, err := cfg.SetAgentPausedAndSave("scanner", true); err != nil { + t.Fatalf("SetAgentPausedAndSave() error: %v", err) + } + if got := SaveSeq(); got != before+2 { + t.Fatalf("SaveSeq after SetAgentPausedAndSave = %d, want %d", got, before+2) + } + + noPath := &Config{Project: ProjectConfig{Org: "org"}, AgentRuntimeConfig: AgentRuntimeConfig{Agents: map[string]AgentConfig{"x": {}}}} + if err := noPath.Save(); err == nil { + t.Fatal("expected error with no source path") + } + if got := SaveSeq(); got != before+2 { + t.Fatalf("SaveSeq after rejected save = %d, want unchanged %d", got, before+2) + } +} From a580d9b42868c6b9ebd87402f4723162ad506460 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Tue, 10 Nov 2026 01:00:33 +0000 Subject: [PATCH 082/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.4 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-needs-decision-real-stage.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-needs-decision-real-stage.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 6877c31cc1..4f39def337 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-10 (v5.211.4) + +### Fixed + +- Activity Monitor: a PR parked at `stage/085-needs-decision` whose head is short of merge-ready (checks running, red or unreported; review verdict pending or asking for a person) now lights its real stage — the CI or Review track, with an amber human-gated marker — and carries the ask as the **needs human decision** pill (question in the hover, decision popover on click) instead of forcing a *Needs human · decision* chevron into the PR in progress column while CI and Review spun dim (#17442, #17416). PR in progress is passed, Merge queue stays empty; one lit stage per row. + ## 2026-11-10 (v5.211.3) ### Fixed diff --git a/changelog.d/fixed-needs-decision-real-stage.md b/changelog.d/fixed-needs-decision-real-stage.md deleted file mode 100644 index 4f4d690831..0000000000 --- a/changelog.d/fixed-needs-decision-real-stage.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: a PR parked at `stage/085-needs-decision` whose head is short of merge-ready (checks running, red or unreported; review verdict pending or asking for a person) now lights its real stage — the CI or Review track, with an amber human-gated marker — and carries the ask as the **needs human decision** pill (question in the hover, decision popover on click) instead of forcing a *Needs human · decision* chevron into the PR in progress column while CI and Review spun dim (#17442, #17416). PR in progress is passed, Merge queue stays empty; one lit stage per row. From 9612138f6ca517bf30eccc753216723f16a4d219 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 01:10:56 +0000 Subject: [PATCH 083/123] =?UTF-8?q?=F0=9F=90=9B=20agent:=20log=20the=20tok?= =?UTF-8?q?en-restart=20give-up=20once=20per=20episode,=20not=20once=20per?= =?UTF-8?q?=20pane=20flap=20(#17485)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 agent: log the token-restart give-up once per episode, not once per pane flap Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 agent: make the storm simulator re-arm via rearmTokenRestartCap Review follow-up for #17485: - simulatePollTick inlined the pre-fix re-arm (attempts=0, latch=false), so the 24h storm simulations no longer exercised the production path and would not catch a regression of #17483. Call rearmTokenRestartCap. - The source-grep guard matched the removed inline literal and was vacuous; it now requires the poller to call rearmTokenRestartCap and rejects any inline clear of tokenRestartGaveUp. - Reword the tokenRestartGaveUp field doc: the latch is no longer cleared alongside the counter. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 agent: pin the recovery test to the latch-holds-while-window-full contract TestTokenRestartCapReArmsAfterGenuineRecovery asserted the give-up latch clears on a genuine recovery, then on the next line asserted an in-window nudge still gives up. Under the #17483 fix that second give-up must not re-log the WARN, so the latch has to hold through the recovery while the rolling ledger is full, and drop only once the window drains and a fresh fire happens. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../fixed-token-restart-giveup-relog.md | 1 + src/crux/agent/manager.go | 4 +- src/crux/agent/manager_poll.go | 6 +-- src/crux/agent/stuck_login_diagnosis.go | 20 ++++++++- src/crux/agent/stuck_login_diagnosis_test.go | 44 +++++++++++++++++++ .../agent/token_restart_boot_pane_test.go | 24 ++++++---- 6 files changed, 85 insertions(+), 14 deletions(-) create mode 100644 changelog.d/fixed-token-restart-giveup-relog.md diff --git a/changelog.d/fixed-token-restart-giveup-relog.md b/changelog.d/fixed-token-restart-giveup-relog.md new file mode 100644 index 0000000000..f08cf679be --- /dev/null +++ b/changelog.d/fixed-token-restart-giveup-relog.md @@ -0,0 +1 @@ +- Agent: the token-restart give-up diagnosis ("the agent is still at a login prompt") now logs once per give-up episode instead of once per pane flap; the per-boot re-arm keeps the latch while the rolling 24h restart window is still full (#17483). diff --git a/src/crux/agent/manager.go b/src/crux/agent/manager.go index 02f424ba34..6e4aae98ab 100644 --- a/src/crux/agent/manager.go +++ b/src/crux/agent/manager.go @@ -329,7 +329,9 @@ type AgentProcess struct { // lastTokenRestart beside it. tokenRestartAttempts int // tokenRestartGaveUp latches once the cap is hit so the diagnosis is logged - // a single time rather than every poll (~3s). Cleared alongside the counter. + // a single time rather than every poll (~3s). Cleared by a fresh fire in + // decideTokenRestart, by clearTokenRestartCap, and by the per-boot re-arm + // (rearmTokenRestartCap) only once the rolling window has drained (#17483). tokenRestartGaveUp bool // tokenRestartFiredAt is the rolling ledger of token-triggered restart // times inside tokenRestartWindow. Unlike tokenRestartAttempts it is NOT diff --git a/src/crux/agent/manager_poll.go b/src/crux/agent/manager_poll.go index 112f75cad4..a620e31f25 100644 --- a/src/crux/agent/manager_poll.go +++ b/src/crux/agent/manager_poll.go @@ -96,9 +96,9 @@ func (m *Manager) pollTmuxOutputForAgent(agent *AgentProcess, ctx context.Contex if agent.shouldResetTokenRestartCap(paneHasCLIMarker(strings.Join(tail, "\n")), startedAt, time.Now()) { // A future "token appeared, nudge it" restart is now a // fresh theory rather than a repeat of one that already - // failed. Reset both halves of the cap together. - agent.tokenRestartAttempts = 0 - agent.tokenRestartGaveUp = false + // failed. The latch survives while the rolling window is + // still full (#17483). + agent.rearmTokenRestartCap(time.Now()) } } diff --git a/src/crux/agent/stuck_login_diagnosis.go b/src/crux/agent/stuck_login_diagnosis.go index d0e1481dbf..9dd5726d2e 100644 --- a/src/crux/agent/stuck_login_diagnosis.go +++ b/src/crux/agent/stuck_login_diagnosis.go @@ -150,9 +150,26 @@ func (a *AgentProcess) decideTokenRestart(now time.Time) tokenRestartAction { a.tokenRestartAttempts++ a.lastTokenRestart = now a.tokenRestartFiredAt = append(a.tokenRestartFiredAt, now) + // A fresh attempt is a new theory: if this episode also fails, the + // give-up diagnosis must log again, once. + a.tokenRestartGaveUp = false return tokenRestartFire } +// rearmTokenRestartCap is the poller's per-boot re-arm: it zeroes the attempt +// counter but keeps the give-up latch while the rolling window ledger would +// make decideTokenRestart give up again straight away. Clearing it +// unconditionally made every pane flap (login line gone, then back) re-run the +// give-up WARN and diagnosis, once per flap rather than once per episode +// (#17483). The ledger itself is deliberately not reset: that would re-enable +// the restart storm the window ended (#6578). +func (a *AgentProcess) rearmTokenRestartCap(now time.Time) { + a.tokenRestartAttempts = 0 + if a.tokenRestartsInWindow(now) < tokenRestartWindowMax { + a.tokenRestartGaveUp = false + } +} + // tokenRestartsInWindow prunes the rolling ledger to tokenRestartWindow and // returns how many token-triggered restarts fired inside it. func (a *AgentProcess) tokenRestartsInWindow(now time.Time) int { @@ -170,7 +187,8 @@ func (a *AgentProcess) tokenRestartsInWindow(now time.Time) int { // clearTokenRestartCap is the operator-facing reset: it re-arms the per-boot // cap, the give-up latch AND the rolling window ledger together, so a reset // or resume genuinely allows the heal to run again. The poller's own re-arm -// (shouldResetTokenRestartCap) deliberately touches only the first two. +// (rearmTokenRestartCap) deliberately leaves the ledger alone and keeps the +// latch while the ledger is full. func (a *AgentProcess) clearTokenRestartCap() { a.tokenRestartAttempts = 0 a.tokenRestartGaveUp = false diff --git a/src/crux/agent/stuck_login_diagnosis_test.go b/src/crux/agent/stuck_login_diagnosis_test.go index e165b60c90..2188114b9c 100644 --- a/src/crux/agent/stuck_login_diagnosis_test.go +++ b/src/crux/agent/stuck_login_diagnosis_test.go @@ -534,3 +534,47 @@ func TestDiagnoseStuckLoginUnreadableDoesNotBlameTheAgent(t *testing.T) { t.Errorf("diagnosis should say the identity is undetermined from the hive's view:\n%s", got) } } + +func TestRearmTokenRestartCapKeepsLatchWhileWindowFull(t *testing.T) { + now := time.Date(2026, 11, 9, 12, 0, 0, 0, time.UTC) + tests := []struct { + name string + age time.Duration + wantGaveUp bool + wantGiveUp bool + }{ + {"ledger full inside window keeps latch", time.Hour, true, true}, + {"ledger expired clears latch", tokenRestartWindow + time.Minute, false, false}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + a := &AgentProcess{Name: "quality", tokenRestartGaveUp: true, tokenRestartAttempts: tokenRestartMaxAttempts} + for i := 0; i < tokenRestartWindowMax; i++ { + a.tokenRestartFiredAt = append(a.tokenRestartFiredAt, now.Add(-tc.age)) + } + a.rearmTokenRestartCap(now) + if a.tokenRestartAttempts != 0 { + t.Fatalf("attempts = %d, want 0", a.tokenRestartAttempts) + } + if a.tokenRestartGaveUp != tc.wantGaveUp { + t.Fatalf("gaveUp = %v, want %v", a.tokenRestartGaveUp, tc.wantGaveUp) + } + if tc.wantGiveUp { + if got := a.decideTokenRestart(now); got != tokenRestartGiveUp { + t.Fatalf("decide = %v, want give-up", got) + } + } + }) + } +} + +func TestDecideTokenRestartFireClearsLatch(t *testing.T) { + a := &AgentProcess{Name: "quality", tokenRestartGaveUp: true} + now := time.Date(2026, 11, 9, 12, 0, 0, 0, time.UTC) + if got := a.decideTokenRestart(now); got != tokenRestartFire { + t.Fatalf("decide = %v, want fire", got) + } + if a.tokenRestartGaveUp { + t.Fatal("gaveUp still latched after a fresh fire") + } +} diff --git a/src/crux/agent/token_restart_boot_pane_test.go b/src/crux/agent/token_restart_boot_pane_test.go index 25c80489e0..2eea9420de 100644 --- a/src/crux/agent/token_restart_boot_pane_test.go +++ b/src/crux/agent/token_restart_boot_pane_test.go @@ -76,9 +76,11 @@ func TestPollerUsesTokenRestartCapResetGate(t *testing.T) { if !strings.Contains(string(src), "shouldResetTokenRestartCap(") { t.Fatal("pollTmuxOutputForAgent must call shouldResetTokenRestartCap; otherwise the boot pane re-arms the restart storm (#8711)") } - if strings.Contains(string(src), "agent.tokenRestartAttempts = 0\n\t\t\t\tagent.tokenRestartGaveUp = false") && - !strings.Contains(string(src), "if agent.shouldResetTokenRestartCap") { - t.Fatal("poller resets token restart attempts without the cap reset gate") + if !strings.Contains(string(src), "agent.rearmTokenRestartCap(") { + t.Fatal("pollTmuxOutputForAgent must re-arm via rearmTokenRestartCap; an inline reset wipes the give-up latch on every pane flap (#17483)") + } + if strings.Contains(string(src), "agent.tokenRestartGaveUp = false") { + t.Fatal("poller clears tokenRestartGaveUp inline instead of through rearmTokenRestartCap (#17483)") } } @@ -92,8 +94,7 @@ func (a *AgentProcess) simulatePollTick(t *testing.T, pane []string, startedAt * } else { *loginStreak = 0 if a.shouldResetTokenRestartCap(hasCLI, startedAt, now) { - a.tokenRestartAttempts = 0 - a.tokenRestartGaveUp = false + a.rearmTokenRestartCap(now) } } if !showsLogin || *loginStreak < loginStreakRestartMin { @@ -234,21 +235,26 @@ func TestTokenRestartCapReArmsAfterGenuineRecovery(t *testing.T) { loginStreak := 0 a.simulatePollTick(t, readyPane, &started, now, &loginStreak) - if a.tokenRestartGaveUp { - t.Fatal("latch survived a genuine recovery: a real login would never re-enable the nudge") - } if a.tokenRestartAttempts != 0 { t.Fatalf("attempts = %d after recovery, want 0", a.tokenRestartAttempts) } // The per-boot cap is re-armed, but the rolling 24h budget was spent by // the three restarts above (#12466): a nudge inside the window still - // gives up, and a nudge once the window has rolled on fires again. + // gives up, so the give-up latch must hold through the recovery or that + // give-up would re-log the WARN once per pane flap (#17483). A nudge once + // the window has rolled on fires again and drops the latch. + if !a.tokenRestartGaveUp { + t.Fatal("latch cleared by a recovery inside the window: the next give-up would re-log the diagnosis (#17483)") + } if got := a.decideTokenRestart(now); got != tokenRestartGiveUp { t.Fatalf("after recovery inside the window: got %v, want giveUp", got) } if got := a.decideTokenRestart(now.Add(tokenRestartWindow + time.Second)); got != tokenRestartFire { t.Fatalf("after recovery and a full window: got %v, want fire", got) } + if a.tokenRestartGaveUp { + t.Fatal("latch survived a fresh fire after the window drained: a real login would never re-enable the nudge") + } } // TestShouldResetTokenRestartCapConditions pins each branch of the rule, From 0c718569e548ea07dc3b27f9752cf690cb9b874c Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Tue, 10 Nov 2026 01:32:22 +0000 Subject: [PATCH 084/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.5 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-config-reload-starvation.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-config-reload-starvation.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f39def337..0a3d5e5c1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-10 (v5.211.5) + +### Fixed + +- Editing `hive.yaml` on a busy hive now takes effect: a config hot-reload no longer waits behind a whole governor cycle but is applied before that cycle's state persist, so the persist (which also rewrites `hive.yaml`) saves the reloaded config instead of the one the cycle started from, and the shutdown persist now takes the config lock so it cannot race a reload. If any other save (hub heartbeat, dashboard, agent pause) wrote the pre-reload config to `hive.yaml` while the reload was waiting, the reloaded config is saved back once it is applied ([#17467](https://github.com/hivecommons/hive/issues/17467)). + ## 2026-11-10 (v5.211.4) ### Fixed diff --git a/changelog.d/fixed-config-reload-starvation.md b/changelog.d/fixed-config-reload-starvation.md deleted file mode 100644 index 3d1fb9de43..0000000000 --- a/changelog.d/fixed-config-reload-starvation.md +++ /dev/null @@ -1 +0,0 @@ -- Editing `hive.yaml` on a busy hive now takes effect: a config hot-reload no longer waits behind a whole governor cycle but is applied before that cycle's state persist, so the persist (which also rewrites `hive.yaml`) saves the reloaded config instead of the one the cycle started from, and the shutdown persist now takes the config lock so it cannot race a reload. If any other save (hub heartbeat, dashboard, agent pause) wrote the pre-reload config to `hive.yaml` while the reload was waiting, the reloaded config is saved back once it is applied ([#17467](https://github.com/hivecommons/hive/issues/17467)). From b5d366df1b740ee7fa37d8107539d4ec7d09618a Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 01:48:09 +0000 Subject: [PATCH 085/123] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20surface=20P?= =?UTF-8?q?row's=20rejection=20of=20relayed=20/lgtm=20and=20/approve=20(#1?= =?UTF-8?q?7478)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 dashboard: surface Prow's rejection of relayed /lgtm and /approve Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 📝 dashboard: document prow_rejected and poll the full Prow reply window Review follow-ups for #17478: - activity-monitor.md now describes the first-Approve path: the commands are posted, Prow's rejection is awaited, and the response carries `prow_rejected: true` with the "posted, but Prow rejected them" toast, before the later `commands_skipped` path. - awaitProwRejection sleeps min(interval, remaining) so the last read lands at the end of prowReplyWindow instead of stopping one interval short (polls at 0/2/4/6s rather than 0/2/4s). Hive-Fix-Attempt: 1/6 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- ...d-17475-prow-approve-rejection-surfaced.md | 1 + .../dashboard-sections/activity-monitor.md | 2 +- src/pkg/dashboard/api_repo_item_decision.go | 21 +++++++--- .../dashboard/api_repo_item_decision_test.go | 16 ++++++++ src/pkg/github/issue_unpark_command_test.go | 8 ++++ src/pkg/github/pr_decision_operator.go | 39 +++++++++++++++++++ src/pkg/github/pr_decision_operator_test.go | 35 +++++++++++++++++ 7 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 changelog.d/fixed-17475-prow-approve-rejection-surfaced.md diff --git a/changelog.d/fixed-17475-prow-approve-rejection-surfaced.md b/changelog.d/fixed-17475-prow-approve-rejection-surfaced.md new file mode 100644 index 0000000000..6b06dc8cd2 --- /dev/null +++ b/changelog.d/fixed-17475-prow-approve-rejection-surfaced.md @@ -0,0 +1 @@ +- Dashboard: an Approve on a Prow repo now reads Prow's reply to the relayed `/lgtm` + `/approve` and says Prow rejected them instead of showing "approved" (#17475, part of #17451). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 2213e3a2ab..7dbe054c99 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -489,7 +489,7 @@ A PR waiting for a person to merge it (*Ready for human merge*, a `human_merge_r *Close as superseded by…* on a nested PR with exactly one open sibling under the same issue pre-fills that sibling's number. Within the general *Decide…* group, the first entry is *Let hive decide* (see [Let hive decide](#let-hive-decide) below): the hive decides as the owner's delegate and records it the way a person's decision is recorded. For a PR: *Approve (/lgtm + /approve)* posts those two commands as comments attributed to you and records your approval against the PR's current head as the human answer the row was parked for — a `requires_human` / decision-requested reviewer verdict, the hive's own `needs-human` park (a supersession question, say), the `sentinel-alert` label and the evidence bundle's sentinel findings are all released by it (the response's `released` lists what was: `approval-recorded`, `needs-human`, `sentinel-label`, `sentinel-acknowledged`), the stage engine re-derives the stage on the spot and the tracker cache is dropped — and the sentinel sweep honours the release for that head, re-arming only on a new push — so the row leaves *Needs human decision* for 080 *Awaiting merge admission* on the next read; the merge gate (and the auto-merge lanes, which honour the recorded approval on that head exactly as a trusted merger's GitHub Approve review) takes it from there; this approval path neither submits a GitHub review as you nor merges immediately. To merge, use the 090 **Approve and let hive merge** action (or the secondary **Merge now as maintainer** for a direct merge). -On a Prow repo where the hive bot is not an approver, Prow has already answered the hive's earlier commands with "restricted to collaborators" / "NOT APPROVED"; a later Approve then records the decision without posting the two comments again and says so (`commands_skipped: prow-rejects-bot-commands`, and the toast reads *Approval recorded; `/lgtm` + `/approve` not posted*). A new head carries no answer: pushing to the PR re-asks. +On a Prow repo where the hive bot is not an approver, the first Approve posts the two commands and then waits a few seconds for Prow's answer; when Prow rejects them ("restricted to collaborators" / "NOT APPROVED") the response carries `prow_rejected: true` and the toast reads *Approval of #N recorded in hive; `/lgtm` + `/approve` posted, but Prow rejected them* instead of a plain "Approved". Prow's reply stays on the PR, so a later Approve records the decision without posting the two comments again and says so (`commands_skipped: prow-rejects-bot-commands`, and the toast reads *Approval recorded; `/lgtm` + `/approve` not posted*). A new head carries no answer: pushing to the PR re-asks. The delegated *Let hive decide* path still posts the comments only — it recommends and never clears a sentinel alert — *Close as superseded by…* (a picker listing the other open PRs in the repo, or type `#458` / `owner/repo#458` / a URL; then an optional comment, then the sweep's labelled close), *Won't fix…* (a comment naming you, then a not-planned close) and *Give direction…* (your text is recorded as `/hive decision ` against the head, so the author agent pushes a new head; only on PRs the hive opened). diff --git a/src/pkg/dashboard/api_repo_item_decision.go b/src/pkg/dashboard/api_repo_item_decision.go index cb22a66f79..c6a7026252 100644 --- a/src/pkg/dashboard/api_repo_item_decision.go +++ b/src/pkg/dashboard/api_repo_item_decision.go @@ -191,6 +191,10 @@ type repoItemDecisionResponse struct { // the hive bot is not an approver, so they would only draw another // "NOT APPROVED" (dibs#510). The approval itself is still recorded. CommandsSkipped string `json:"commands_skipped,omitempty"` + // ProwRejected is set when the `/lgtm` + `/approve` were posted and Prow + // replied that it does not accept them from the hive bot + // (hivecommons/hive#17475). + ProwRejected bool `json:"prow_rejected,omitempty"` // Rebase is set when an approval landed on a PR that is behind or // conflicting with its base: the rebase episode the approval opened // (hivecommons/hive#15103), so the row reads "Rebasing · attempt n/2". @@ -235,6 +239,9 @@ type repoItemApproveFacts struct { // because Prow already rejected the hive's commands on this PR // (dibs#510); the hive's own approval record is what counts. CommandsSkipped bool + // ProwRejected: the commands were posted and Prow's reply rejected them + // (hivecommons/hive#17475); later approvals on the PR skip them. + ProwRejected bool // ToContributor is the contributor whose hive a direction was carried // to (a clanker-authored PR, hivecommons/hive#15159); "" when the @@ -737,7 +744,7 @@ func (s *Server) handlePullRequestDecision(ctx context.Context, w http.ResponseW ) var released []string stage, commandsSkipped, reportingError := "", "", "" - sentinelOpen, prow := false, false + sentinelOpen, prow, prowRejected := false, false, false toContributor := "" if decision == repoItemDecisionApprove { var event ghpkg.PullRequestApprovalEvent @@ -748,7 +755,7 @@ func (s *Server) handlePullRequestDecision(ctx context.Context, w http.ResponseW }) head = event.HeadSHA released, stage, sentinelOpen, prow = repoItemApprovalReleased(event), event.Stage, event.SentinelLabelOpen, event.ProwManaged - commandsSkipped = event.CommandsSkipped + commandsSkipped, prowRejected = event.CommandsSkipped, event.ProwRejected reportingError = event.ReportingError } else { var event ghpkg.PullRequestDecisionEvent @@ -789,7 +796,7 @@ func (s *Server) handlePullRequestDecision(ctx context.Context, w http.ResponseW } s.audit.LogRecord(user, action, auditDetail("repo", repoFull, "number", numStr, "type", "pr", "head", head, "decision", comment, "released", strings.Join(released, ","), "stage", stage, "admitted_by", admitted, "commands_skipped", commandsSkipped, "to_contributor", toContributor), "", repoFull, number) result := repoItemDecisionResultWith(repoFull, number, "pr", decision, comment, "", "", repoItemApproveFacts{ - User: user, Released: released, Stage: stage, SentinelOpen: sentinelOpen, SentinelLabel: s.sentinelLabel(), SoakMinutes: s.approveSoakMinutes(admitted != ""), Prow: prow, CommandsSkipped: commandsSkipped != "", ToContributor: toContributor, + User: user, Released: released, Stage: stage, SentinelOpen: sentinelOpen, SentinelLabel: s.sentinelLabel(), SoakMinutes: s.approveSoakMinutes(admitted != ""), Prow: prow, CommandsSkipped: commandsSkipped != "", ProwRejected: prowRejected, ToContributor: toContributor, }) if reportingError != "" { s.audit.LogRecord(user, auditRepoItemDecisionApprove+"_reporting_failed", auditDetail("repo", repoFull, "number", numStr, "head", head, "error", reportingError), "", repoFull, number) @@ -809,7 +816,7 @@ func (s *Server) handlePullRequestDecision(ctx context.Context, w http.ResponseW // The row's park was just answered: serve the re-derived stage on the // next tracker read instead of the cached 085. s.invalidateStageTrackerForWebhook() - jsonResponse(w, repoItemDecisionResponse{OK: true, Repo: repoFull, Number: number, Decision: decision, Status: status, Released: released, Stage: stage, Head: head, AdmittedBy: admitted, CommandsSkipped: commandsSkipped, Rebase: rebase, + jsonResponse(w, repoItemDecisionResponse{OK: true, Repo: repoFull, Number: number, Decision: decision, Status: status, Released: released, Stage: stage, Head: head, AdmittedBy: admitted, CommandsSkipped: commandsSkipped, ProwRejected: prowRejected, Rebase: rebase, Result: result}) } @@ -892,7 +899,7 @@ func repoItemApproveResult(out *RowActionResult, number int, facts repoItemAppro released[r] = true } headline := "Approved #" + strconv.Itoa(number) - if facts.Prow { + if facts.Prow || facts.ProwRejected { headline = "Approval of #" + strconv.Itoa(number) + " recorded in hive" } if u := strings.TrimSpace(facts.User); u != "" { @@ -909,6 +916,8 @@ func repoItemApproveResult(out *RowActionResult, number int, facts repoItemAppro out.Outcome = headline + "." if facts.CommandsSkipped { out.Posted = append(out.Posted, "`/lgtm` + `/approve` not posted (Prow does not accept the hive bot's commands on this repo)") + } else if facts.ProwRejected { + out.Posted = append(out.Posted, "`/lgtm` + `/approve` posted, but Prow rejected them (the hive bot is not a collaborator or OWNERS approver)") } else { out.Posted = append(out.Posted, "`/lgtm` posted", "`/approve` posted") } @@ -929,7 +938,7 @@ func repoItemApproveResult(out *RowActionResult, number int, facts repoItemAppro default: out.Next = "Hive merges it on its next merge pass once CI is green and the head has soaked" + repoItemSoakNote(facts.SoakMinutes) + "." } - if facts.Prow || facts.CommandsSkipped { + if facts.Prow || facts.CommandsSkipped || facts.ProwRejected { // Prow reads `/approve` only from OWNERS; the hive's account is not // one, so the relayed command is "NOT APPROVED" there. out.Next = "Prow approval still needs an OWNERS reviewer: the relayed `/approve` came from hive's account, which Prow does not count. " + out.Next diff --git a/src/pkg/dashboard/api_repo_item_decision_test.go b/src/pkg/dashboard/api_repo_item_decision_test.go index 84e3a94dcb..1afe7755c2 100644 --- a/src/pkg/dashboard/api_repo_item_decision_test.go +++ b/src/pkg/dashboard/api_repo_item_decision_test.go @@ -450,3 +450,19 @@ func TestRepoItemDecisionWordingNeverSaysSweep(t *testing.T) { } } } + +// A Prow rejection of the relayed commands must not read as "approved" +// (hivecommons/hive#17475). +func TestRepoItemApproveResultSurfacesProwRejection(t *testing.T) { + out := &RowActionResult{} + repoItemApproveResult(out, 17359, repoItemApproveFacts{User: "alice", ProwRejected: true}) + if strings.HasPrefix(out.Outcome, "Approved #") || !strings.Contains(out.Outcome, "recorded in hive") { + t.Fatalf("outcome = %q, want the hive-only approval wording", out.Outcome) + } + if got := strings.Join(out.Posted, "\n"); !strings.Contains(got, "Prow rejected") || strings.Contains(got, "`/lgtm` posted") { + t.Fatalf("posted = %q, want Prow's rejection named", got) + } + if !strings.Contains(out.Next, "OWNERS reviewer") { + t.Fatalf("next = %q, want the OWNERS note", out.Next) + } +} diff --git a/src/pkg/github/issue_unpark_command_test.go b/src/pkg/github/issue_unpark_command_test.go index f9f8bda079..7106afd63c 100644 --- a/src/pkg/github/issue_unpark_command_test.go +++ b/src/pkg/github/issue_unpark_command_test.go @@ -56,6 +56,9 @@ type unparkServer struct { added map[int][]string // removed maps issue number to the labels removed from it. removed map[int][]string + // replyAfterPost maps issue number to comments that appear in its + // listing once a comment is POSTed on it (e.g. Prow's reply). + replyAfterPost map[int][]unparkWireComment // permissions maps login to the permission level the API reports. permissions map[string]string // roles maps login to the role_name the permission endpoint reports @@ -206,6 +209,11 @@ func newUnparkServer(t *testing.T, owner, repo string, issues []unparkWireIssue, } _ = json.NewDecoder(r.Body).Decode(&body) rec.posted[n] = append(rec.posted[n], body.Body) + if extra := rec.replyAfterPost[n]; len(extra) > 0 { + iss := byNum[n] + iss.Comments = append(append([]unparkWireComment(nil), iss.Comments...), extra...) + byNum[n] = iss + } _ = json.NewEncoder(w).Encode(map[string]any{"id": 9000 + len(rec.posted[n])}) case strings.HasPrefix(path, "issues/comments/") && r.Method == http.MethodPatch: diff --git a/src/pkg/github/pr_decision_operator.go b/src/pkg/github/pr_decision_operator.go index b239777715..ef60d74c63 100644 --- a/src/pkg/github/pr_decision_operator.go +++ b/src/pkg/github/pr_decision_operator.go @@ -88,6 +88,12 @@ type PullRequestApprovalEvent struct { // so posting again would only draw the same "NOT APPROVED" reply. The // hive's own approval record is unaffected. CommandsSkipped string + // ProwRejected is true when the `/lgtm` + `/approve` comments were + // posted and Prow answered them with a rejection ("restricted to + // collaborators" / "NOT APPROVED") before the approval reported. Prow's + // reply stays on the PR, so the next Approve takes the CommandsSkipped + // path (hivecommons/hive#17475). + ProwRejected bool // ReportingError preserves partial progress: the native approval stands, // but comments, labels or stage reporting must be retried/reconciled. ReportingError string @@ -101,6 +107,38 @@ const PRApprovalCommandsSkippedProw = "prow-rejects-bot-commands" // bot's `/lgtm` or `/approve` carries no weight on the repo. var prowCommandRejections = []string{"restricted to collaborators", "NOT APPROVED"} +// prowReplyWindow and prowReplyInterval bound how long an Approve on a +// Prow-managed PR waits for Prow to answer the commands it just relayed. +var ( + prowReplyWindow = 6 * time.Second + prowReplyInterval = 2 * time.Second +) + +// awaitProwRejection reads the PR's comments for Prow's rejection of the +// hive commands just posted: once when wait is false, otherwise polling +// every prowReplyInterval with a final read at the end of prowReplyWindow, +// since Prow answers a few seconds after the post. +func (c *Client) awaitProwRejection(ctx context.Context, owner, name string, number int, wait bool) bool { + deadline := time.Now().Add(prowReplyWindow) + for { + if rejected, err := c.prowRejectedHiveCommands(ctx, owner, name, number); err == nil && rejected { + return true + } + if !wait { + return false + } + remaining := time.Until(deadline) + if remaining <= 0 { + return false + } + select { + case <-ctx.Done(): + return false + case <-time.After(min(prowReplyInterval, remaining)): + } + } +} + // prowRejectedHiveCommands reports whether the Prow bot has replied to one of the hive's earlier dashboard approval commands on the // PR with a Prow rejection (dibs#510: `/lgtm` → "changing LGTM is // restricted to collaborators", `/approve` → "[APPROVALNOTIFIER] This PR is @@ -473,6 +511,7 @@ func (c *Client) reportOperatorPullRequestApproval(ctx context.Context, owner, n if c.logger != nil { c.logger.Info("pull request approval commands posted by dashboard decision", "repo", event.Repo, "pr", number, "actor", actor, "head", head) } + event.ProwRejected = c.awaitProwRejection(ctx, owner, name, number, event.ProwManaged) } return ctx.Err() } diff --git a/src/pkg/github/pr_decision_operator_test.go b/src/pkg/github/pr_decision_operator_test.go index e13726f50e..8e3b53e517 100644 --- a/src/pkg/github/pr_decision_operator_test.go +++ b/src/pkg/github/pr_decision_operator_test.go @@ -390,6 +390,41 @@ func TestRecordOperatorPullRequestApprovalSkipsCommandsProwRejected(t *testing.T } } +// On a Prow repo where rejection has not been observed yet, Prow answers the +// relayed commands after they are posted. The approval event reports that +// reply instead of leaving the board at "approved" (hivecommons/hive#17475). +func TestRecordOperatorPullRequestApprovalReportsProwRejectionAfterPost(t *testing.T) { + oldWindow, oldInterval := prowReplyWindow, prowReplyInterval + prowReplyWindow, prowReplyInterval = time.Second, 10*time.Millisecond + t.Cleanup(func() { prowReplyWindow, prowReplyInterval = oldWindow, oldInterval }) + at := time.Date(2026, 10, 29, 0, 32, 0, 0, time.UTC).Format(time.RFC3339) + own := unparkWireComment{ID: 9001, Body: renderPRApprovalCommandComment("/lgtm", "clubanderson", liveDecisionHead), User: wireUser{Login: "hive[bot]"}, CreatedAt: at, UpdatedAt: at} + reply := unparkWireComment{ID: 9100, Body: "@hive[bot]: changing LGTM is restricted to collaborators\n\nIn response to [this](https://github.com/org/repo/pull/1#issuecomment-9001):", User: wireUser{Login: "kubestellar-prow[bot]"}, CreatedAt: at, UpdatedAt: at} + for _, tc := range []struct { + name string + labels []string + after []unparkWireComment + want bool + }{ + {"prow rejects", []string{"size/XS"}, []unparkWireComment{own, reply}, true}, + {"prow silent", []string{"size/XS"}, []unparkWireComment{own}, false}, + } { + t.Run(tc.name, func(t *testing.T) { + pr := hiveParkedPR() + pr.Labels = append(pr.Labels, wireLabel{Name: tc.labels[0]}) + c, rec := newUnparkPRClient(t, []unparkWireIssue{pr}, map[string]string{"clubanderson": "admin"}) + rec.replyAfterPost = map[int][]unparkWireComment{liveDecisionPR: tc.after} + event, err := c.RecordOperatorPullRequestApprovalWith(context.Background(), "org/repo", liveDecisionPR, "clubanderson", PullRequestApprovalOptions{HumanChangeRequests: review.NewHumanChangeRequests("")}) + if err != nil { + t.Fatalf("approval: %v", err) + } + if event.ProwRejected != tc.want || event.CommandsSkipped != "" || len(rec.posted[liveDecisionPR]) != len(PRApprovalCommands) { + t.Fatalf("event = %+v, want ProwRejected %v with commands posted", event, tc.want) + } + }) + } +} + // TestRecordOperatorPullRequestDecisionCarriesDirectionToContributorHive: // a direction on a contributor's clanker PR (author/clanker) is accepted // and carried to that contributor's hive — recorded against the head as a From b8192199bf617a6c429ef951e9aee5ff4383dc7b Mon Sep 17 00:00:00 2001 From: Karibhou <157208370+Karibhou@users.noreply.github.com> Date: Tue, 10 Nov 2026 02:55:39 +0100 Subject: [PATCH 086/123] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20show=20Tide?= =?UTF-8?q?'s=20reason=20on=20a=20CI=20chevron=20with=20a=20missing=20Prow?= =?UTF-8?q?=20presubmit=20(#17480)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(dashboard): show Tide's reason on a CI chevron with a missing Prow presubmit A required Prow presubmit that never ran has no check run to link to, so the CI chevron read "CI 10/11 · 'verify PR…'" with no link and looked the same as a failing check. Commit statuses now carry their description, and when a counted required check has no run or only a pending commit status, the CI track quotes Tide's description in its detail and links to Tide's target_url when the check has no link of its own. Tide stays out of the pass/fail tally. Hive-Run: hivecommons/hive#17476 Hive-Plan: hivecommons/hive#17451 child 2 (surface Tide status on the stage tracker) Hive-Spec: hivecommons/hive#17476#scope Signed-off-by: Karibhou * 🐛 ci(mutation): mutate only changed lines so large packages finish in time mutation-report.sh ran gremlins over the whole changed package, so a PR touching pkg/dashboard or pkg/github timed out at the 20-minute job limit and reported a red check that never judged the change. Run gremlins from inside each changed package with --diff origin/ and diff.relative=true, so git diff paths match gremlins' package-relative file paths and only added lines are mutated. Coverage chdirs to the module root, so the JSON output path is now absolute. Fixes #17463 Signed-off-by: Karibhou * 🐛 ci(governance): re-pin TRUSTED_SCRIPTS_TREE for the mutation-report.sh change The second commit edits src/scripts/mutation-report.sh, so the src/scripts tree is now 4307b1a9. integration-governance.cjs refused to verify with the old pin ('Trusted control/helper closure unavailable'), failing runtime-tests and build-and-test. Signed-off-by: Karibhou --------- Signed-off-by: Karibhou Co-authored-by: Karibhou --- .github/scripts/integration-governance.cjs | 2 +- changelog.d/fixed-17463-mutation-diff-only.md | 1 + changelog.d/fixed-17476-tide-ci-chevron.md | 1 + src/pkg/dashboard/stage_tracker_activity.go | 51 +++++++++++++++++++ .../dashboard/stage_tracker_activity_test.go | 49 ++++++++++++++++++ src/pkg/github/pr_ci_activity.go | 4 ++ src/pkg/github/webhook_cache.go | 1 + src/pkg/github/webhook_ci_evidence.go | 1 + src/pkg/github/webhook_ci_evidence_test.go | 4 +- src/scripts/mutation-report.sh | 19 +++++-- 10 files changed, 125 insertions(+), 8 deletions(-) create mode 100644 changelog.d/fixed-17463-mutation-diff-only.md create mode 100644 changelog.d/fixed-17476-tide-ci-chevron.md diff --git a/.github/scripts/integration-governance.cjs b/.github/scripts/integration-governance.cjs index 7e6e6ee2b4..7433d207d8 100644 --- a/.github/scripts/integration-governance.cjs +++ b/.github/scripts/integration-governance.cjs @@ -9,7 +9,7 @@ const MAX_COMMITS = 1000; const MAX_AUTHOR_BATCH = 50; // This literal is inside the enrolled .github closure. A caller-supplied // preparedBy.sourceSHA must never choose a new executable verifier tree. -const TRUSTED_SCRIPTS_TREE = 'a9b6bee3eb2dec5e71af2e84a5841aed96df4bb1'; +const TRUSTED_SCRIPTS_TREE = '4307b1a9d25267e7ef60a7921e7a9fb68bd1bcde'; const SOURCE = 'https://github.com/kubernetes-sigs/kubebuilder-release-tools/tree/012269a88fa4c034a0acf1ba84c26b195c0dbab4'; const sha = value => crypto.createHash('sha256').update(value).digest('hex'); const git = (args, cwd = process.cwd()) => diff --git a/changelog.d/fixed-17463-mutation-diff-only.md b/changelog.d/fixed-17463-mutation-diff-only.md new file mode 100644 index 0000000000..a2f956608c --- /dev/null +++ b/changelog.d/fixed-17463-mutation-diff-only.md @@ -0,0 +1 @@ +- CI: the advisory `mutation` check now mutates only the lines a PR adds (`gremlins --diff`, run from inside each changed package so paths match) instead of every file under the changed package, so PRs touching large packages such as `pkg/dashboard` or `pkg/github` no longer hit the 20-minute job limit and show a red check that never judged the change. ([#17463](https://github.com/hivecommons/hive/issues/17463)) diff --git a/changelog.d/fixed-17476-tide-ci-chevron.md b/changelog.d/fixed-17476-tide-ci-chevron.md new file mode 100644 index 0000000000..15a0c17f41 --- /dev/null +++ b/changelog.d/fixed-17476-tide-ci-chevron.md @@ -0,0 +1 @@ +- Dashboard: when a required check on a Prow repository has never reported (or is only a pending commit status), the stage tracker's CI chevron now quotes Tide's status description in its tooltip ("Not mergeable. Jobs … have not succeeded.") and links to Tide's page when the check has no link of its own, so a presubmit that never ran no longer looks like a failing check. Tide stays out of the pass/fail tally. ([#17476](https://github.com/hivecommons/hive/issues/17476)) diff --git a/src/pkg/dashboard/stage_tracker_activity.go b/src/pkg/dashboard/stage_tracker_activity.go index 94f1647aa5..5ac1657bd0 100644 --- a/src/pkg/dashboard/stage_tracker_activity.go +++ b/src/pkg/dashboard/stage_tracker_activity.go @@ -136,6 +136,9 @@ func stageTrackerCIActivity(pr github.PullRequest, now time.Time) *StageTrackerA for _, name := range a.Required { settled[name] = true } + // Required checks with no run at all, or only a pending commit status: + // on a Prow repository, a presubmit that never ran or has not finished. + presubmitWaiting := map[string]bool{} for _, observation := range observations { name := observation.name check := github.PRActivityCheck{} @@ -168,6 +171,9 @@ func stageTrackerCIActivity(pr github.PullRequest, now time.Time) *StageTrackerA state = "failing" } } + if state == "missing" || (state == "queued" && len(observation.checks) == 1 && check.Kind == "commit_status") { + presubmitWaiting[name] = true + } if state != "passing" && state != "failing" && state != "skipped" { settled[name] = false } @@ -307,9 +313,54 @@ func stageTrackerCIActivity(pr github.PullRequest, now time.Time) *StageTrackerA // age rides ObservedAt for the tooltip, never a dimmer state // (hivecommons/hive#16643). out.Active = out.State == "running" || out.State == "queued" + stageTrackerAttachTide(out, a, presubmitWaiting) return out } +// stageTrackerTideContext is the commit status Prow's Tide reports. It is +// merge-bot state, not CI: the CI track borrows its words and link only. +const stageTrackerTideContext = "tide" + +// stageTrackerAttachTide lays Tide's own words and link over a CI track +// that counts a required check with no run, or only a pending commit status +// (hivecommons/hive#17476): a Prow presubmit that never ran has no check run +// to link to, and Tide's description ("Not mergeable. Jobs … have not +// succeeded.") is what tells it apart from a failing check. The chevron +// links to Tide's target_url only when the leading evidence has no URL of +// its own (a pending Prow job keeps the link to its run). +func stageTrackerAttachTide(out *StageTrackerActivity, a *github.PRCIActivity, waiting map[string]bool) { + if len(waiting) == 0 || out.State == "passing" { + return + } + var tide *github.PRActivityCheck + for i := range a.Checks { + check := &a.Checks[i] + if !strings.EqualFold(check.Name, stageTrackerTideContext) || (check.Head != "" && !strings.EqualFold(check.Head, a.Head)) { + continue + } + if tide == nil || (check.Since != nil && (tide.Since == nil || check.Since.After(*tide.Since))) { + tide = check + } + } + if tide == nil || (tide.State == "completed" && tide.Conclusion == "success") { + return + } + if desc := strings.TrimSpace(tide.Description); desc != "" { + names := make([]string, 0, len(waiting)) + for _, name := range a.Required { + if waiting[name] { + names = append(names, name) + } + } + out.Detail = strings.TrimSpace(out.Detail + fmt.Sprintf(" Tide, Prow's merge bot, reports %q: %s %s a Prow presubmit that has not run or finished on this commit, not a failed check.", desc, strings.Join(names, ", "), pluralVerb(len(names), "is", "are"))) + } + if out.URL == "" { + if u := strings.TrimSpace(tide.URL); strings.HasPrefix(u, "https://") || strings.HasPrefix(u, "http://") { + out.URL = u + } + } +} + // stageTrackerWorkflowApprovalBlockerPrefix leads the CI blocker when the // unreported checks are workflow runs waiting on GitHub's approve-workflows // gate; the strip reads the count after the colon. diff --git a/src/pkg/dashboard/stage_tracker_activity_test.go b/src/pkg/dashboard/stage_tracker_activity_test.go index 56f729e835..451aea5f91 100644 --- a/src/pkg/dashboard/stage_tracker_activity_test.go +++ b/src/pkg/dashboard/stage_tracker_activity_test.go @@ -61,6 +61,55 @@ func TestStageTrackerActivityRequiredCI(t *testing.T) { } } +// A required Prow presubmit that never ran has no check run to link to; +// Tide's commit status carries the reason. The CI track borrows Tide's +// description and link so it reads differently from a failing check, and +// Tide itself never enters the tally (hivecommons/hive#17476). +func TestStageTrackerCIActivityTideExplainsMissingPresubmit(t *testing.T) { + now := time.Date(2026, 11, 9, 21, 0, 0, 0, time.UTC) + const tideDesc = "Not mergeable. Jobs native-queue-policy, verify PR contents have not succeeded." + const tideURL = "https://prow.example/tide" + fixture := func(verify ...github.PRActivityCheck) github.PullRequest { + checks := append([]github.PRActivityCheck{ + {Name: "build", State: "completed", Conclusion: "success", URL: "https://ci.example/build"}, + {Name: "tide", State: "pending", Kind: "commit_status", URL: tideURL, Description: tideDesc}, + }, verify...) + return github.PullRequest{HeadSHA: "head", CIActivity: &github.PRCIActivity{ + Head: "head", Source: "github-check-runs", ObservedAt: &now, StatusesKnown: true, StatusesObservedAt: &now, + RequiredKnown: true, RequiredSource: "protection", Required: []string{"build", "verify PR contents"}, + RequiredChecks: []github.PRRequiredCheck{{Name: "build", AppKnown: true}, {Name: "verify PR contents", AppKnown: true}}, + Checks: checks, + }} + } + + got := stageTrackerCIActivity(fixture(), now) + if got.State != "missing" || got.ChecksTotal != 2 || got.ChecksPassed != 1 || got.ChecksFailed != 0 { + t.Fatalf("never-ran presubmit: %+v, want missing 1/2 with tide uncounted", got) + } + if got.URL != tideURL || !strings.Contains(got.Detail, tideDesc) || !strings.Contains(got.Detail, "verify PR contents is a Prow presubmit") { + t.Fatalf("never-ran presubmit carries no Tide link or words: url=%q detail=%q", got.URL, got.Detail) + } + + // A pending Prow job keeps the link to its own run; Tide's words ride along. + got = stageTrackerCIActivity(fixture(github.PRActivityCheck{Name: "verify PR contents", State: "pending", Kind: "commit_status", URL: "https://prow.example/job/1"}), now) + if got.State != "queued" || got.URL != "https://prow.example/job/1" || !strings.Contains(got.Detail, tideDesc) { + t.Fatalf("pending presubmit: %+v", got) + } + + // A failing check is a failing check: its own link, no Tide sentence. + got = stageTrackerCIActivity(fixture(github.PRActivityCheck{Name: "verify PR contents", State: "completed", Conclusion: "failure", URL: "https://ci.example/verify"}), now) + if got.State != "failing" || got.URL != "https://ci.example/verify" || strings.Contains(got.Detail, "Tide") { + t.Fatalf("failing check borrowed Tide: %+v", got) + } + + // Tide in the pool says nothing worth showing. + pr := fixture() + pr.CIActivity.Checks[1].State, pr.CIActivity.Checks[1].Conclusion = "completed", "success" + if got = stageTrackerCIActivity(pr, now); got.URL != "" || strings.Contains(got.Detail, "Tide") { + t.Fatalf("mergeable Tide still annotated: %+v", got) + } +} + func trackerActivityFixture(now time.Time) (github.PullRequest, review.DispatchState, *StatusPayload) { pr := github.PullRequest{Repo: "org/repo", Number: 7, Author: "author", HeadSHA: "head"} dispatch := review.DispatchState{GeneratedAt: now, Pending: []review.PendingReview{ diff --git a/src/pkg/github/pr_ci_activity.go b/src/pkg/github/pr_ci_activity.go index 52ee5be70b..4173ce9d0f 100644 --- a/src/pkg/github/pr_ci_activity.go +++ b/src/pkg/github/pr_ci_activity.go @@ -37,6 +37,9 @@ type PRActivityCheck struct { AppID *int64 `json:"app_id,omitempty"` Head string `json:"head,omitempty"` Kind string `json:"kind,omitempty"` + // Description is a commit status's own sentence (Tide's "Not mergeable. + // Jobs … have not succeeded."); check runs leave it empty. + Description string `json:"description,omitempty"` } // With AppKnown, nil or -1 is a forge-observed any-App constraint. @@ -130,6 +133,7 @@ func (a *PRCIActivity) addCommitStatuses(statuses []*gh.RepoStatus, observedAt t check := PRActivityCheck{ Name: status.GetContext(), State: "completed", URL: status.GetTargetURL(), ID: status.GetID(), NodeID: status.GetNodeID(), Head: a.Head, Kind: "commit_status", + Description: status.GetDescription(), } switch status.GetState() { case "success": diff --git a/src/pkg/github/webhook_cache.go b/src/pkg/github/webhook_cache.go index 5835d8137d..155572129d 100644 --- a/src/pkg/github/webhook_cache.go +++ b/src/pkg/github/webhook_cache.go @@ -558,6 +558,7 @@ type webhookEventPayload struct { State string `json:"state"` Context string `json:"context"` TargetURL string `json:"target_url"` + Description string `json:"description"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` Branches []struct { diff --git a/src/pkg/github/webhook_ci_evidence.go b/src/pkg/github/webhook_ci_evidence.go index 576d51c812..da5f1a5893 100644 --- a/src/pkg/github/webhook_ci_evidence.go +++ b/src/pkg/github/webhook_ci_evidence.go @@ -426,6 +426,7 @@ func webhookCIChecks(event string, p webhookEventPayload) []PRActivityCheck { check := PRActivityCheck{ Name: strings.TrimSpace(p.Context), State: "completed", URL: p.TargetURL, ID: p.ID, NodeID: p.NodeID, Head: strings.TrimSpace(p.SHA), Kind: "commit_status", + Description: p.Description, } switch p.State { case "success": diff --git a/src/pkg/github/webhook_ci_evidence_test.go b/src/pkg/github/webhook_ci_evidence_test.go index d36229b62f..b57cb4917f 100644 --- a/src/pkg/github/webhook_ci_evidence_test.go +++ b/src/pkg/github/webhook_ci_evidence_test.go @@ -175,7 +175,7 @@ func TestWebhookCIChecksStatusAndWorkflowJob(t *testing.T) { c.ciRefetch = &ciRefetcher{newTimer: func(_ time.Duration, f func()) ciRefetchTimer { return &ciTestTimer{} }} c.storePRDetail("repo", 3, testPRDetail(3, "sha-3", clock.now, "clean")) - status := []byte(`{"id":91,"node_id":"SC_91","sha":"sha-3","state":"success","context":"dco","target_url":"https://dco/3","created_at":"2026-10-08T12:00:00Z","repository":{"full_name":"org/repo"}}`) + status := []byte(`{"id":91,"node_id":"SC_91","sha":"sha-3","state":"success","context":"dco","description":"DCO signed","target_url":"https://dco/3","created_at":"2026-10-08T12:00:00Z","repository":{"full_name":"org/repo"}}`) res, err := c.HandleWebhookEvent("status", status) if err != nil || res.CIEvidence == nil || res.CIEvidence.Applied != 1 { t.Fatalf("status delivery: res=%+v err=%v", res.CIEvidence, err) @@ -193,7 +193,7 @@ func TestWebhookCIChecksStatusAndWorkflowJob(t *testing.T) { for _, check := range got.Checks { byName[check.Name] = check } - if dco := byName["dco"]; dco.Kind != "commit_status" || dco.State != "completed" || dco.Conclusion != "success" || dco.NodeID != "SC_91" { + if dco := byName["dco"]; dco.Kind != "commit_status" || dco.State != "completed" || dco.Conclusion != "success" || dco.NodeID != "SC_91" || dco.Description != "DCO signed" { t.Fatalf("dco = %+v", dco) } if gate := byName["gate"]; gate.AppID == nil || *gate.AppID != githubActionsAppID || gate.Conclusion != "success" || gate.URL != "https://gh/job/501" { diff --git a/src/scripts/mutation-report.sh b/src/scripts/mutation-report.sh index e4170b9055..5187c11e66 100755 --- a/src/scripts/mutation-report.sh +++ b/src/scripts/mutation-report.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # Advisory mutation report for the Go packages a PR touches (#17349, Phase 1). -# Runs gremlins on each changed package, then upserts ONE -# PR comment listing surviving (LIVED) mutants in changed files. Never fails. +# Runs gremlins on the lines each changed package's diff adds (#17463), then +# upserts ONE PR comment listing surviving (LIVED) +# mutants in changed files. Never fails. # # Two phases so the token never shares an environment with PR-controlled code: # mutation-report.sh run runs gremlins (no GH_TOKEN) and writes @@ -52,6 +53,7 @@ fi base_ref="${BASE_REF:?BASE_REF is required}" coefficient="${MUTATION_TIMEOUT_COEFFICIENT:-3}" mkdir -p "$out_dir" +out_abs=$(cd "$out_dir" && pwd) changed=$(git diff --name-only --diff-filter=d "origin/${base_ref}...HEAD" -- 'src/*.go' \ | grep -vE '(_test\.go$|(^|/)testdata/|\.pb\.go$|_gen\.go$|_generated\.go$|(^|/)mock)' || true) @@ -86,14 +88,21 @@ while IFS= read -r pkg; do done <<< "$pkgs" pkgs="${roots%$'\n'}" +# gremlins --diff reads `git diff --merge-base ` from its own working +# directory and matches those paths against files relative to the package it +# mutates. Run it from inside the package with diff.relative so both sides use +# package-relative paths; otherwise every mutant would be skipped, or (with no +# --diff) the whole package is mutated and the job times out (#17463). Coverage +# chdirs to the module root, so the output path must be absolute. i=0 while IFS= read -r pkg; do [ -n "$pkg" ] || continue i=$((i + 1)) printf '%s\n' "$pkg" > "$out_dir/pkg-$i.dir" - echo "::group::gremlins unleash ./$pkg" - (cd src && gremlins unleash --timeout-coefficient "$coefficient" \ - --output "../$out_dir/pkg-$i.json" "./$pkg") || echo "gremlins exited non-zero for $pkg (advisory)" + echo "::group::gremlins unleash ./$pkg --diff origin/${base_ref}" + (cd "src/$pkg" && GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=diff.relative GIT_CONFIG_VALUE_0=true \ + gremlins unleash --timeout-coefficient "$coefficient" --diff "origin/${base_ref}" \ + --output "$out_abs/pkg-$i.json") || echo "gremlins exited non-zero for $pkg (advisory)" echo "::endgroup::" done <<< "$pkgs" From d3b1a110f12d4d61780c4bb862e97aa702680897 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Tue, 10 Nov 2026 02:03:45 +0000 Subject: [PATCH 087/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.6 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-token-restart-giveup-relog.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-token-restart-giveup-relog.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a3d5e5c1a..da06ec3369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-10 (v5.211.6) + +### Fixed + +- Agent: the token-restart give-up diagnosis ("the agent is still at a login prompt") now logs once per give-up episode instead of once per pane flap; the per-boot re-arm keeps the latch while the rolling 24h restart window is still full (#17483). + ## 2026-11-10 (v5.211.5) ### Fixed diff --git a/changelog.d/fixed-token-restart-giveup-relog.md b/changelog.d/fixed-token-restart-giveup-relog.md deleted file mode 100644 index f08cf679be..0000000000 --- a/changelog.d/fixed-token-restart-giveup-relog.md +++ /dev/null @@ -1 +0,0 @@ -- Agent: the token-restart give-up diagnosis ("the agent is still at a login prompt") now logs once per give-up episode instead of once per pane flap; the per-boot re-arm keeps the latch while the rolling 24h restart window is still full (#17483). From a28c1c77a0a6ffd576cc7ae7f1af540231963375 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 21:13:05 -0500 Subject: [PATCH 088/123] =?UTF-8?q?=F0=9F=90=9B=20fix(dashboard):=20exclud?= =?UTF-8?q?e=20Prow=20merge-gate=20contexts=20from=20the=20CI=20chevron=20?= =?UTF-8?q?tally=20(#17495)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Activity Monitor CI chevron counted tide (Prow's merge-gate status, pending until lgtm/approved and all presubmits are green) as a running check, reading 'CI 18/19 · tide running' on an all-green head and keeping the CI lane lit. Centralize github.IsMergeGateContext (tide, enforce-guardrails, dco/DCO) and filter it out of the dashboard tally's required set, bindings and observed checks; merge eligibility is unchanged. Fixes #17494 Signed-off-by: Andrew Anderson Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/fixed-ci-tally-excludes-tide.md | 1 + .../dashboard-sections/activity-monitor.md | 2 +- src/pkg/dashboard/stage_tracker_activity.go | 25 ++++++++- .../dashboard/stage_tracker_activity_test.go | 54 ++++++++++++++++++- src/pkg/github/client.go | 3 +- src/pkg/github/commit_ci.go | 22 ++++++++ src/pkg/github/merge_gate_context_test.go | 19 +++++++ 7 files changed, 121 insertions(+), 5 deletions(-) create mode 100644 changelog.d/fixed-ci-tally-excludes-tide.md create mode 100644 src/pkg/github/merge_gate_context_test.go diff --git a/changelog.d/fixed-ci-tally-excludes-tide.md b/changelog.d/fixed-ci-tally-excludes-tide.md new file mode 100644 index 0000000000..0d88c1ec29 --- /dev/null +++ b/changelog.d/fixed-ci-tally-excludes-tide.md @@ -0,0 +1 @@ +- Activity Monitor: the CI chevron no longer counts Prow's `tide` merge-gate status (or `enforce-guardrails` / DCO) as a check, so a PR whose tests are all green reads `CI 18/18` instead of `CI 18/19 · 'tide' running` and the lit stage moves on to Review / Merge queue; merge eligibility still enforces the gates. diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 7dbe054c99..fe7c034000 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -453,7 +453,7 @@ Plain words throughout — working / waiting on X / set back by Y / merged — n An *active* chevron is filled amber and carries words; an inactive one is its icon alone (CI / Review: the ring, green when the last run on this head passed, red when it failed, neutral when not yet run), with the counts in its tooltip. On every strip: 1. **Exactly one lit stage per row.** One chevron is active — the column where the item is or where it is stuck; later stages are shown dim, with a muted queued note when they are next ([#17335](https://github.com/hivecommons/hive/issues/17335): a push during review lit *CI 7/11 · 4 running* and *Review 5/5 · adjudicating* amber together). -2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current — filled but still, icon only, its words in the tooltip — and nothing else is active. Settled-current is always the neutral fill: the Open column's draft, blocked, New and stale tints and the held-gate amber never repaint it, so the running track is the row's only coloured chevron ([#17461](https://github.com/hivecommons/hive/issues/17461): a draft PR with no stage yet read as a slate Open beside amber CI). +2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). The CI count, its pending names and its motion cover tests only: Prow's `tide` merge-gate status (pending on every PR until it carries lgtm/approved and all presubmits are green), `enforce-guardrails` and the DCO sign-off context (`dco` / `DCO`) are merge gates, not checks, so a PR whose only pending context is `tide` reads *CI 18/18* and lights Review or the Merge queue — never *CI 18/19 · 'tide' running* (`github.IsMergeGateContext`; merge eligibility still enforces the gates). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current — filled but still, icon only, its words in the tooltip — and nothing else is active. Settled-current is always the neutral fill: the Open column's draft, blocked, New and stale tints and the held-gate amber never repaint it, so the running track is the row's only coloured chevron ([#17461](https://github.com/hivecommons/hive/issues/17461): a draft PR with no stage yet read as a slate Open beside amber CI). 3. **CI leads Review.** When both tracks would light at once — CI running while the review is queued, in progress or being re-adjudicated — CI is the lit chevron and Review is dim with a small note (*re-review queued* after a push, *review in progress*, *review queued*); its words stay in the tooltip, ending *… behind CI*. The stage chevron is the fallback: active only when no track is in motion. 4. **The PR in progress chevron speaks the PR's lifecycle** — draft, pushed, rebasing, *Unassigned · next: scanner*, *Deferred · waiting on #N*, *Waiting for @author · fix owed* — never a CI or review verdict. *CI failing*, *CI 4/11 · 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail. 5. **A human gate is a pill, not a stage.** A PR parked at 085 for a person — a reviewer's question, a permission only a maintainer holds, a rerun to approve — with checks running, red or unreported, or its review verdict pending, is drawn at its real stage: CI (with motion while checks run) or Review is the one lit chevron, wearing an amber marker (`ham-human-gated`), and the ask is the **needs human decision** pill in the row's pill strip (human icon, the question in its hover, the decision popover on click); the lit track's tooltip ends *· needs a person: *. It never lights a *Needs human · decision* chevron in the PR in progress column while CI and Review spin dim ([#17453](https://github.com/hivecommons/hive/issues/17453): #17442 did, with CI 3/9 running; #17416 read *Needs human · review* the same way). Only a merge-ready, queued or merging 085 is a Merge queue matter. diff --git a/src/pkg/dashboard/stage_tracker_activity.go b/src/pkg/dashboard/stage_tracker_activity.go index 5ac1657bd0..e392530d55 100644 --- a/src/pkg/dashboard/stage_tracker_activity.go +++ b/src/pkg/dashboard/stage_tracker_activity.go @@ -77,6 +77,9 @@ func stageTrackerCIActivity(pr github.PullRequest, now time.Time) *StageTrackerA if a == nil || pr.HeadSHA == "" || !strings.EqualFold(a.Head, pr.HeadSHA) { return out } + // The gates stay on `full`: Tide's words and link are read from it. + full := a + a = stageTrackerCITestActivity(a) out.Source, out.ObservedAt = a.Source, a.ObservedAt if a.RequiredSource != "" { out.Source += "+required-" + a.RequiredSource @@ -313,10 +316,30 @@ func stageTrackerCIActivity(pr github.PullRequest, now time.Time) *StageTrackerA // age rides ObservedAt for the tooltip, never a dimmer state // (hivecommons/hive#16643). out.Active = out.State == "running" || out.State == "queued" - stageTrackerAttachTide(out, a, presubmitWaiting) + stageTrackerAttachTide(out, full, presubmitWaiting) return out } +// stageTrackerCITestActivity is the activity with merge-gate contexts +// removed from the required set, its bindings and the observed checks. +// Prow's `tide` status is pending on every PR until it carries lgtm/approved +// and all presubmits are green, and the DCO gate is a sign-off check: neither +// is a test, so neither counts toward the CI tally, names the check the head +// waits on, or keeps the CI lane lit once the real checks have settled. The +// caller's activity is left untouched; merge eligibility still reads the +// gates from it. +func stageTrackerCITestActivity(a *github.PRCIActivity) *github.PRCIActivity { + scoped := *a + scoped.Required = slices.DeleteFunc(slices.Clone(a.Required), github.IsMergeGateContext) + scoped.RequiredChecks = slices.DeleteFunc(slices.Clone(a.RequiredChecks), func(binding github.PRRequiredCheck) bool { + return github.IsMergeGateContext(binding.Name) + }) + scoped.Checks = slices.DeleteFunc(slices.Clone(a.Checks), func(check github.PRActivityCheck) bool { + return github.IsMergeGateContext(check.Name) + }) + return &scoped +} + // stageTrackerTideContext is the commit status Prow's Tide reports. It is // merge-bot state, not CI: the CI track borrows its words and link only. const stageTrackerTideContext = "tide" diff --git a/src/pkg/dashboard/stage_tracker_activity_test.go b/src/pkg/dashboard/stage_tracker_activity_test.go index 451aea5f91..9e7b132347 100644 --- a/src/pkg/dashboard/stage_tracker_activity_test.go +++ b/src/pkg/dashboard/stage_tracker_activity_test.go @@ -33,7 +33,7 @@ func TestStageTrackerActivityRequiredCI(t *testing.T) { Head: "head", Source: "github-check-runs", ObservedAt: &now, RequiredKnown: tc.known, Required: []string{"build"}, StatusesKnown: true, RequiredSource: "protection", RequiredChecks: []github.PRRequiredCheck{{Name: "build", AppKnown: true}}, Checks: []github.PRActivityCheck{{Name: "build", State: tc.state, Conclusion: tc.conclusion}, - {Name: "tide", State: "queued"}, {Name: "optional", State: "completed", Conclusion: "failure"}}, + {Name: "lint", State: "queued"}, {Name: "optional", State: "completed", Conclusion: "failure"}}, }} got := stageTrackerCIActivity(pr, now) if got.State != tc.want || got.Active != (tc.want == "running" || tc.want == "queued") { @@ -740,3 +740,55 @@ func TestTrackerAggregateSignOffOnly(t *testing.T) { } } } + +func TestStageTrackerActivityCIExcludesMergeGateContexts(t *testing.T) { + now := time.Date(2026, 11, 9, 18, 0, 0, 0, time.UTC) + green := func(name string) github.PRActivityCheck { + return github.PRActivityCheck{Name: name, State: "completed", Conclusion: "success"} + } + build := func(gate string, gateState string, extra ...github.PRActivityCheck) github.PullRequest { + required := []string{"build", "test", gate} + bindings := []github.PRRequiredCheck{{Name: "build", AppKnown: true}, {Name: "test", AppKnown: true}, {Name: gate, AppKnown: true}} + checks := append([]github.PRActivityCheck{green("build"), green("test"), {Name: gate, State: gateState, Kind: "commit_status"}}, extra...) + return github.PullRequest{HeadSHA: "head", CIActivity: &github.PRCIActivity{ + Head: "head", Source: "github-check-runs", ObservedAt: &now, RequiredKnown: true, Required: required, + RequiredSource: "protection", RequiredChecks: bindings, Checks: checks, StatusesKnown: true, + }} + } + for _, gate := range []string{"tide", "dco", "DCO"} { + t.Run(gate+" pending is not a test", func(t *testing.T) { + pr := build(gate, "pending") + got := stageTrackerCIActivity(pr, now) + if got.State != "passing" || got.Active || got.ChecksTotal != 2 || got.ChecksPassed != 2 || len(got.ChecksPending) != 0 { + t.Fatalf("%s counted toward CI: %+v", gate, got) + } + if got.Caption != "CI green · all 2 required checks passed" { + t.Fatalf("caption = %q", got.Caption) + } + // The caller's activity keeps the gate for merge eligibility. + if len(pr.CIActivity.Required) != 3 || len(pr.CIActivity.Checks) != 3 { + t.Fatalf("activity mutated: %+v", pr.CIActivity) + } + }) + } + t.Run("real pending check still counts", func(t *testing.T) { + pr := build("tide", "pending", github.PRActivityCheck{Name: "lint", State: "in_progress"}) + pr.CIActivity.Required = append(pr.CIActivity.Required, "lint") + pr.CIActivity.RequiredChecks = append(pr.CIActivity.RequiredChecks, github.PRRequiredCheck{Name: "lint", AppKnown: true}) + got := stageTrackerCIActivity(pr, now) + if got.State != "running" || !got.Active || got.ChecksTotal != 3 || got.ChecksPassed != 2 { + t.Fatalf("real check dropped: %+v", got) + } + if got.Caption != "CI running · 'lint' pending" { + t.Fatalf("caption = %q", got.Caption) + } + }) + t.Run("required set unknown", func(t *testing.T) { + pr := github.PullRequest{HeadSHA: "head", CIActivity: &github.PRCIActivity{Head: "head", Source: "github-check-runs", ObservedAt: &now, + Checks: []github.PRActivityCheck{green("build"), {Name: "tide", State: "pending", Kind: "commit_status"}}}} + got := stageTrackerCIActivity(pr, now) + if got.State != "unknown" || got.Active || got.ChecksTotal != 1 || got.ChecksPassed != 1 || len(got.ChecksPending) != 0 { + t.Fatalf("tide counted on head without required set: %+v", got) + } + }) +} diff --git a/src/pkg/github/client.go b/src/pkg/github/client.go index 3836976dca..ffd41523b6 100644 --- a/src/pkg/github/client.go +++ b/src/pkg/github/client.go @@ -2786,8 +2786,7 @@ func (c *Client) headTreeOID(ctx context.Context, owner, repoName string, pr *Pu // for hours (2026-08-04). The merge step itself re-enforces these gates — // counting them here only poisons the eligibility signal. func isMetaCheck(name string) bool { - switch name { - case "tide", "enforce-guardrails": + if isProwMergeGateContext(name) { return true } diff --git a/src/pkg/github/commit_ci.go b/src/pkg/github/commit_ci.go index 345c1b2022..9bd3255a93 100644 --- a/src/pkg/github/commit_ci.go +++ b/src/pkg/github/commit_ci.go @@ -750,6 +750,28 @@ func isDCOContext(name string) bool { // gate (`dco` from Prow's plugin, `DCO` from the DCO GitHub App). func IsDCOContext(name string) bool { return isDCOContext(name) } +// isProwMergeGateContext reports the commit statuses Prow posts as merge +// gates rather than tests: `tide` stays pending until the PR carries +// lgtm/approved and every presubmit is green; `enforce-guardrails` mirrors +// repository policy. +func isProwMergeGateContext(name string) bool { + switch strings.TrimSpace(name) { + case "tide", "enforce-guardrails": + return true + } + return false +} + +// IsMergeGateContext reports whether a status context / check-run name is a +// merge gate rather than a test: Prow's `tide` and `enforce-guardrails` +// statuses plus the DCO sign-off gate (`dco` / `DCO`). The dashboard's CI +// tally leaves these out of its count, its pending names and its lane state +// (hivecommons/hive: "CI 18/19 · 'tide' running" on a PR whose tests were +// all green); merge eligibility still enforces them separately. +func IsMergeGateContext(name string) bool { + return isProwMergeGateContext(name) || isDCOContext(name) +} + // CommitCIReasonIsPending reports whether a commit-CI skip reason means the // checks are still running or not yet reported, as opposed to failing. func CommitCIReasonIsPending(reason string) bool { return commitCIReasonIsPending(reason) } diff --git a/src/pkg/github/merge_gate_context_test.go b/src/pkg/github/merge_gate_context_test.go new file mode 100644 index 0000000000..340ef3e026 --- /dev/null +++ b/src/pkg/github/merge_gate_context_test.go @@ -0,0 +1,19 @@ +package github + +import "testing" + +func TestIsMergeGateContext(t *testing.T) { + for name, want := range map[string]bool{ + "tide": true, " tide ": true, "enforce-guardrails": true, "dco": true, "DCO": true, + "build": false, "test": false, "Test (chromium, shard 1)": false, "netlify/site/deploy-preview": false, "": false, + } { + if got := IsMergeGateContext(name); got != want { + t.Errorf("IsMergeGateContext(%q) = %v, want %v", name, got, want) + } + } + for _, name := range []string{"tide", "enforce-guardrails"} { + if !isMetaCheck(name) { + t.Errorf("isMetaCheck(%q) lost the Prow merge gate", name) + } + } +} From 38ba6b7c023068c1288bbbfeb742391bb4a1056f Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 21:34:57 -0500 Subject: [PATCH 089/123] =?UTF-8?q?=F0=9F=90=9B=20fix(dashboard,scanner):?= =?UTF-8?q?=20name=20the=20shared-CI=20incident=20a=20deferral=20waits=20o?= =?UTF-8?q?n=20and=20lift=20it=20when=20the=20incident=20closes=20(#17502)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A PR deferred to a fleet-wide [shared-ci] incident read "Deferred · by scanner" with no why, and stayed deferred after the incident closed because the rerun sweep only re-runs failure/timed_out runs while a job cut off by timeout-minutes is recorded as cancelled. - relay: record the incident as an `incident` pair on agent_pr_deferred; accept a semicolon as a sentence opener - dashboard: render "Waiting on shared CI · #N" with the incident linked and a tooltip naming the failing check; plain deferrals lead with the agent's reason - sweep: a cancelled newest run is red and re-run whole; the comment reads "Shared-CI incident #N closed — re-running ``" and stamps alongside the rerun marker Fixes #17500 Signed-off-by: Andrew Anderson --- ...shared-ci-deferral-wording-and-autolift.md | 1 + .../dashboard-sections/activity-monitor.md | 5 +- src/docs/github-write-surface.md | 2 +- .../glossary-and-operations.md | 2 +- .../sweeps-and-operations.md | 12 +- src/pkg/dashboard/stage_tracker_deferral.go | 113 +++++++++++++++--- .../dashboard/stage_tracker_deferral_test.go | 48 +++++++- .../stage_tracker_remediation_chevron.test.js | 14 +++ src/pkg/dashboard/static-src/css/tracker.css | 2 + .../static-src/js/tracker-row-strip.js | 6 +- src/pkg/dashboard/static/index.html | 8 +- src/pkg/github/pr_deferral.go | 22 +++- src/pkg/github/pr_deferral_test.go | 19 +++ src/pkg/github/shared_ci_rerun.go | 53 +++++++- src/pkg/github/shared_ci_rerun_test.go | 61 ++++++++++ 15 files changed, 331 insertions(+), 37 deletions(-) create mode 100644 changelog.d/fixed-shared-ci-deferral-wording-and-autolift.md diff --git a/changelog.d/fixed-shared-ci-deferral-wording-and-autolift.md b/changelog.d/fixed-shared-ci-deferral-wording-and-autolift.md new file mode 100644 index 0000000000..f46683fef6 --- /dev/null +++ b/changelog.d/fixed-shared-ci-deferral-wording-and-autolift.md @@ -0,0 +1 @@ +- Activity Monitor: a PR deferred to a fleet-wide `[shared-ci]` incident now reads *Waiting on shared CI · #N* with the incident linked and a tooltip that names the failing check and promises the lift, instead of *Deferred · by scanner*; a plain deferral's tooltip leads with the agent's reason. The shared-CI rerun sweep now treats a newest run that concluded `cancelled` (a job cut off by `timeout-minutes`) as red, re-runs it once when the incident closes and comments *Shared-CI incident #N closed — re-running ``* (``), so a PR like hive#17471 no longer sits deferred after the incident is over (#17500). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index fe7c034000..210528fb84 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -465,11 +465,12 @@ On a red PR (CI failing or changes requested on the current head, or a 07x fix s |---|---|---|---| | *Remediating · scanner · 4m* | `remediating` | amber, pulsing | A hive fix kick, a clanker claim or a working agent's action on the PR landed after the red signal. | | *Fix pushed f269349 · re-review pending* | `fix_pushed` | done-style, green word | A new head landed after the red signal; CI and the re-review on it are the open work. | -| *Deferred · waiting on #17345 +1* | `deferred` | amber, still | A hive agent deferred this head ([#17347](https://github.com/hivecommons/hive/issues/17347)): its comment on the PR said *Deferring …* / *Deferred …* / *Waiting on #N*. The word names the first successor issue or PR it named (`+N` for more; *Deferred · by scanner* when it named none); the tooltip carries the deferral's own words, every successor and the first one's link. When the deferral says a maintainer may close the PR, the row's lead action is `[Close now]`. | +| *Deferred · waiting on #17345 +1* | `deferred` | amber, still | A hive agent deferred this head ([#17347](https://github.com/hivecommons/hive/issues/17347)): its comment on the PR said *Deferring …* / *Deferred …* / *Waiting on #N*. The word names the first successor issue or PR it named (`+N` for more; *Deferred · by scanner* when it named none); the tooltip leads with the deferral's own reason (its first sentence), then every successor and the first one's link. When the deferral says a maintainer may close the PR, the row's lead action is `[Close now]`. | +| *Waiting on shared CI · #17463* | `deferred` | amber, still | The deferral waits on a fleet-wide `[shared-ci]` incident ([#17500](https://github.com/hivecommons/hive/issues/17500)): the agent's comment carried the `` marker and the relay recorded the incident number (`incident` pair; `deferral.incident` / `deferral.incident_url` in the payload). The word links the incident issue; the tooltip reads *`mutation` is failing fleet-wide; tracked in #17463. Lifts automatically when that issue closes.* It never reads *Deferred · by scanner*: the incident, not the agent, is the why. | | *Waiting for @author · fix owed* | `waiting_owner` | amber, still | The author owes the next head (071/072). | | *Unassigned · next: scanner* | `unassigned` | amber-red, still | Nobody picked it up and the hive did not defer it. | -The relay records a deferral as an `agent_pr_deferred` audit entry bound to the PR's head at the time. A fix kick, claim or push for the same head *after* the deferral returns the row to *Remediating* / *Fix pushed*; a new head clears the deferral, because the hive has to decide again. The deferring agent's own comment, or a later note on the PR, is never read as pickup. +The relay records a deferral as an `agent_pr_deferred` audit entry bound to the PR's head at the time. A shared-CI deferral lifts without a person: once the incident issue closes, the shared-CI rerun sweep re-runs the PR's red workflow run (a run cut off by `timeout-minutes` is recorded as `cancelled` and counts as red), comments *Shared-CI incident #N closed — re-running ``* with the `` marker, and never repeats for that PR and incident; the fresh verdict then moves the row on. A fix kick, claim or push for the same head *after* the deferral returns the row to *Remediating* / *Fix pushed*; a new head clears the deferral, because the hive has to decide again. The deferring agent's own comment, or a later note on the PR, is never read as pickup. #### The row's lead action, inline diff --git a/src/docs/github-write-surface.md b/src/docs/github-write-surface.md index 0018a357d7..bd4a8b6d1e 100644 --- a/src/docs/github-write-surface.md +++ b/src/docs/github-write-surface.md @@ -144,7 +144,7 @@ writes no entry. | Attribution trailer reconcile | `attribution.go` (`ReconcilePRAttribution`) | yes (`pr_attribution_reconciled`) | yes | | Task-list sweep closes | `task_list_sweep.go` | yes (`task-list-sweep-closed`) | yes | | Supersession sweep (notice, `hive/superseded` close, own-PR update-branch + body `Closes`→`Refs` rewrite, `needs-human` + `Parked` fact on escalation) | `pr_supersession_sweep.go`, `pr_supersession_autoclose.go`, `pr_supersession_resolve.go` | yes (`supersession-sweep-*`) | yes | -| Shared-CI rerun (`rerun-failed-jobs`, `hive-shared-ci-rerun-` comment) | `shared_ci_rerun.go` | yes (`shared-ci-rerun`) | yes | +| Shared-CI rerun (`rerun-failed-jobs`, or `rerun` for a `cancelled` run; `hive-shared-ci-rerun-` + `hive-shared-ci-lifted-` comment) | `shared_ci_rerun.go` | yes (`shared-ci-rerun`) | yes | | Open-PR dispatch guard (`has-open-pr` label on a refused issue) and duplicate-fix sweep (one `hive:duplicate-fix` comment; `hive/superseded` close of the later hive PR, or `needs-human` + `Parked` fact on escalation) | `open_pr_links.go`, `pr_duplicate_fix_sweep.go` | yes (`duplicate-fix-*`) | yes | | Duplicate-PR sweep suggestions | `duplicate_sweep.go` | yes (`duplicate-sweep-suggested`) | yes (target = surviving PR) | | Hold-label migration (one-time) | `hive_hold_migration.go` | yes (`hold_migration_label_added`, one per item labeled; the migration report file is still written) | yes | diff --git a/src/docs/labels-and-control-signals/glossary-and-operations.md b/src/docs/labels-and-control-signals/glossary-and-operations.md index 6273c4a31d..5c1d52e9ae 100644 --- a/src/docs/labels-and-control-signals/glossary-and-operations.md +++ b/src/docs/labels-and-control-signals/glossary-and-operations.md @@ -225,7 +225,7 @@ The dashboard renders every open issue and PR's stage as one unified tracker str ## Non-label equivalents - **Human comments and assignees** can acknowledge hive-filed directions for #5117; assignees also affect ranking. -- **Hidden comment markers** carry state that no label does. `` records an issue claim, `` dedupes a published finding, `` marks an overlap notice, `` starts the question auto-close clock, and `` is stamped on the single comment a fix lane leaves on a PR it defers to shared incident `#` (`DEFER_TO_INCIDENT` from `bin/hive-baseline-check.sh`), so "every PR incident `#` broke" stays greppable after the fix lands ([#10441](https://github.com/hivecommons/hive/issues/10441)). One marker per PR per incident; it is never edited or removed while the incident is open. While incident `#` is open, the governor records it as `deferred_incident` on the PR's `ci-failing.json` row and the kick builders keep that PR out of every CI-FAILING / FIX-BEFORE-NEW repair list, naming it only as deferred; once the incident closes the PR is listed for repair again ([#10528](https://github.com/hivecommons/hive/issues/10528)). When the incident closes (not as "not planned"), the shared-CI rerun sweep re-runs the failed jobs of each still-open PR carrying that marker — the newest failed or timed-out run per workflow on the PR head — using the hive's own credential, then stamps `` on the PR so it is re-run at most once per incident; disable with `shared_ci_rerun.enabled: false` ([#12253](https://github.com/hivecommons/hive/issues/12253)). +- **Hidden comment markers** carry state that no label does. `` records an issue claim, `` dedupes a published finding, `` marks an overlap notice, `` starts the question auto-close clock, and `` is stamped on the single comment a fix lane leaves on a PR it defers to shared incident `#` (`DEFER_TO_INCIDENT` from `bin/hive-baseline-check.sh`), so "every PR incident `#` broke" stays greppable after the fix lands ([#10441](https://github.com/hivecommons/hive/issues/10441)). One marker per PR per incident; it is never edited or removed while the incident is open. While incident `#` is open, the governor records it as `deferred_incident` on the PR's `ci-failing.json` row and the kick builders keep that PR out of every CI-FAILING / FIX-BEFORE-NEW repair list, naming it only as deferred; once the incident closes the PR is listed for repair again ([#10528](https://github.com/hivecommons/hive/issues/10528)). When the incident closes (not as "not planned"), the shared-CI rerun sweep re-runs the failed jobs of each still-open PR carrying that marker — the newest failed, timed-out or cancelled run per workflow on the PR head — using the hive's own credential, then stamps `` and `` on the PR so it is re-run at most once per incident; disable with `shared_ci_rerun.enabled: false` ([#12253](https://github.com/hivecommons/hive/issues/12253)). - **Paused repos** (`project.paused_repos`) stop whole-repo write/merge/enumeration paths without labels. - **Contributor queue holds** such as active leases, cooldowns, dependencies, and quota guard holds suppress contributor offers without touching GitHub labels. - **Jira/Linear labels** map only where the work-source adapter supports them: Linear skips held work using substring hold labels; Jira skips exact configured hold labels; GitHub Projects currently imports labels but does not use a hold gate. diff --git a/src/docs/operator-reference/sweeps-and-operations.md b/src/docs/operator-reference/sweeps-and-operations.md index dd3538473b..e9e558eb20 100644 --- a/src/docs/operator-reference/sweeps-and-operations.md +++ b/src/docs/operator-reference/sweeps-and-operations.md @@ -281,11 +281,17 @@ someone re-runs it. The shared-CI rerun sweep - For each open PR whose newest shared-CI marker names one of those incidents, it re-runs the failed jobs (`POST .../actions/runs/{id}/rerun-failed-jobs`) of the newest run per workflow on the PR head when that run concluded - `failure` or `timed_out`, using the hive's App/daemon credential. It pushes + `failure` or `timed_out`, using the hive's App/daemon credential. A newest + run that concluded `cancelled` — how a job cut off by its `timeout-minutes` + is recorded, the shape of the `mutation` incident #17463 — is red too and + is re-run whole (`POST .../actions/runs/{id}/rerun`), since it has no + "failed" job for the other endpoint (hivecommons/hive#17500). It pushes nothing to the branch, so it applies to every author; PRs with a hold or `do-not-merge` label are skipped. -- It then posts one comment carrying ``, - which keeps the PR to one re-run per incident. A PR with nothing red on its +- It then posts one comment, *Shared-CI incident #N closed — re-running + ``*, carrying `` and + ``; either marker keeps the PR to one + re-run per incident. A PR with nothing red on its head gets no comment. At most 10 PRs are re-run per pass; each re-run is logged as `shared-ci rerun repo=… pr=… incident=#…` and audited as `shared-ci-rerun`. diff --git a/src/pkg/dashboard/stage_tracker_deferral.go b/src/pkg/dashboard/stage_tracker_deferral.go index e9a55bd097..06d3e4c993 100644 --- a/src/pkg/dashboard/stage_tracker_deferral.go +++ b/src/pkg/dashboard/stage_tracker_deferral.go @@ -23,6 +23,12 @@ const codeStateDeferred = "deferred" // prProgressDeferredWord leads the deferred chevron word. const prProgressDeferredWord = "Deferred" +// prProgressSharedCIWord leads the word of a deferral that waits on a +// [shared-ci] incident: "Waiting on shared CI · #N" (hivecommons/hive#17500). +// "Deferred · by scanner" said nothing about why; the incident is the why, +// and it lifts on its own when the incident closes. +const prProgressSharedCIWord = "Waiting on shared CI" + // prDeferralAuditLookback bounds how far back a deferral is read. A // deferral stands while its head does; a fortnight-old head nobody moved is // the same decision. @@ -52,6 +58,12 @@ type StageTrackerDeferral struct { // CloseOK is true when the deferral says a maintainer may close the PR // now: the row then offers Close now. CloseOK bool `json:"close_ok,omitempty"` + // Incident is the [shared-ci] incident issue (same repository) the + // deferral waits on, from the relay's incident pair; 0 when the + // deferral is the agent's own decision. + Incident int `json:"incident,omitempty"` + // IncidentURL links the incident issue on GitHub. + IncidentURL string `json:"incident_url,omitempty"` } func (s *Server) prDeferralAuditEntries(now time.Time) []AuditEntry { @@ -115,6 +127,9 @@ func stageTrackerDeferrals(entries []AuditEntry, qualify func(string) string) ma } d.Successors = strings.Fields(kv[github.PRDeferralPairSuccessors]) d.CloseOK, _ = strconv.ParseBool(kv[github.PRDeferralPairCloseOK]) + if n, err := strconv.Atoi(kv[github.PRDeferralPairIncident]); err == nil && n > 0 { + d.Incident = n + } out[github.ReviewQueueKey(repo, e.Target)] = d } return out @@ -134,6 +149,9 @@ func stageTrackerDeferralFor(it *StageTrackerItem, deferrals map[string]StageTra if len(d.Successors) > 0 { d.SuccessorURL = stageTrackerRefURL(it.Repo, d.Successors[0], githubBaseURL) } + if d.Incident > 0 { + d.IncidentURL = stageTrackerRefURL(it.Repo, "#"+strconv.Itoa(d.Incident), githubBaseURL) + } d.Successors = append([]string(nil), d.Successors...) return &d } @@ -154,13 +172,44 @@ func stageTrackerRefURL(repo, ref, githubBaseURL string) string { } // stageTrackerDeferredActivity is the PR in progress code activity of a -// deferred head: "Deferred · waiting on #17345 +1" (first successor, then -// how many more), or "Deferred · by scanner" when it names none. +// deferred head. A deferral to a shared-CI incident reads "Waiting on shared +// CI · #17463", linked to the incident, and its detail names the failing +// check and that it lifts when the incident closes. Any other deferral +// reads "Deferred · waiting on #17345 +1" (first successor, then how many +// more) or "Deferred · by scanner" when it names none, and its detail leads +// with the agent's own reason. func stageTrackerDeferredActivity(it *StageTrackerItem, d *StageTrackerDeferral, redWord string, redSince time.Time) *StageTrackerActivity { out := &StageTrackerActivity{Head: it.Head, State: codeStateDeferred, Actor: d.Actor, Source: "hive-deferral", Since: d.Since, URL: d.SuccessorURL} if out.URL == "" { out.URL = d.URL } + who := d.Actor + if who == "" { + who = "the hive" + } + facts := who + " deferred head " + stageTrackerShortSHA(it.Head) + if d.Since != nil { + facts += " at " + d.Since.UTC().Format(time.RFC3339) + } + redAt := "" + if !redSince.IsZero() { + redAt = " at " + redSince.UTC().Format(time.RFC3339) + } + standing := redWord + redAt + " stands on this head; a fix kick, claim or push after the deferral returns it to Remediating, and a new head clears it." + if d.Incident > 0 { + ref := "#" + strconv.Itoa(d.Incident) + out.Caption = prProgressSharedCIWord + " · " + ref + if d.IncidentURL != "" { + out.URL = d.IncidentURL + } + detail := stageTrackerFailingChecksPhrase(it) + " is failing fleet-wide; tracked in " + ref + ". Lifts automatically when that issue closes." + detail += " " + facts + "." + if d.Reason != "" { + detail += " " + stageTrackerFirstSentence(d.Reason) + } + out.Detail = detail + " " + standing + return out + } out.Caption = prProgressDeferredWord switch { case len(d.Successors) > 0: @@ -171,30 +220,58 @@ func stageTrackerDeferredActivity(it *StageTrackerItem, d *StageTrackerDeferral, case d.Actor != "": out.Caption += " · by " + d.Actor } - who := d.Actor - if who == "" { - who = "the hive" - } - detail := who + " deferred head " + stageTrackerShortSHA(it.Head) - if d.Since != nil { - detail += " at " + d.Since.UTC().Format(time.RFC3339) - } + detail := "" if d.Reason != "" { - detail += ": " + strings.TrimRight(d.Reason, " .") + "." - } else { - detail += "." + // The why leads: the word alone ("Deferred · by scanner") says + // nothing about it (hivecommons/hive#17500). + detail = stageTrackerFirstSentence(d.Reason) + " " } + detail += facts + "." if len(d.Successors) > 0 { detail += " Waiting on " + strings.Join(d.Successors, ", ") + "." } - redAt := "" - if !redSince.IsZero() { - redAt = " at " + redSince.UTC().Format(time.RFC3339) - } - detail += " " + redWord + redAt + " stands on this head; a fix kick, claim or push after the deferral returns it to Remediating, and a new head clears it." + detail += " " + standing if d.CloseOK { detail += " The deferral says a maintainer may close it now." } out.Detail = detail return out } + +// stageTrackerFailingChecksPhrase names the red checks on the row's head +// in backticks ("`mutation`", "`lint` and `test`"); "CI" when the CI +// activity records none by name. +func stageTrackerFailingChecksPhrase(it *StageTrackerItem) string { + a := it.CIActivity + if a == nil || !strings.EqualFold(a.Head, it.Head) || len(a.ChecksFailing) == 0 { + return "CI" + } + names := make([]string, len(a.ChecksFailing)) + for i, n := range a.ChecksFailing { + names[i] = "`" + n + "`" + } + if len(names) == 1 { + return names[0] + } + return strings.Join(names[:len(names)-1], ", ") + " and " + names[len(names)-1] +} + +// stageTrackerFirstSentence is the first sentence of a deferral reason, +// ending in a period: the tooltip's one-line why. A dot inside a token +// ("docs/a.md", "#17463.") does not end it; a bare "Deferring." is kept as +// is. +func stageTrackerFirstSentence(reason string) string { + s := strings.TrimSpace(reason) + for i := 0; i < len(s); i++ { + if s[i] != '.' && s[i] != '!' && s[i] != '?' { + continue + } + if i+1 == len(s) { + return s + } + if s[i+1] == ' ' || s[i+1] == '\n' { + return s[:i+1] + } + } + return strings.TrimRight(s, " ") + "." +} diff --git a/src/pkg/dashboard/stage_tracker_deferral_test.go b/src/pkg/dashboard/stage_tracker_deferral_test.go index 4fb0d7cab6..442acba668 100644 --- a/src/pkg/dashboard/stage_tracker_deferral_test.go +++ b/src/pkg/dashboard/stage_tracker_deferral_test.go @@ -71,7 +71,12 @@ func TestStageTrackerDeferredReadsDeferredWaitingOnSuccessor(t *testing.T) { if ca.URL != "https://github.com/org/repo/issues/17345" || ca.Actor != "scanner" || ca.Since == nil || !ca.Since.Equal(now.Add(-20*time.Minute)) { t.Fatalf("the successor is linked and the deferral dated: url=%q actor=%q since=%v", ca.URL, ca.Actor, ca.Since) } - for _, want := range []string{deferralReason[:len(deferralReason)-1], "Waiting on #17345, #17344.", "a new head clears it", "may close it now", "Changes requested"} { + // The tooltip leads with the why: the reason's first sentence (hivecommons/hive#17500). + firstSentence := deferralReason[:strings.Index(deferralReason, ". Deferring.")+1] + if !strings.HasPrefix(ca.Detail, firstSentence+" scanner deferred head ") { + t.Fatalf("detail must lead with the reason: %q", ca.Detail) + } + for _, want := range []string{"Waiting on #17345, #17344.", "a new head clears it", "may close it now", "Changes requested"} { if !strings.Contains(ca.Detail, want) { t.Fatalf("detail misses %q: %q", want, ca.Detail) } @@ -99,6 +104,47 @@ func TestStageTrackerDeferredWithoutSuccessorsNamesWhoDeferred(t *testing.T) { } } +// hivecommons/hive#17500: hive#17471 read "Deferred · by scanner" while its +// only red check was the fleet-wide `mutation` incident #17463. The relay's +// incident pair makes the row say so, link the incident and promise the +// lift; the successor list (which also names #17463) does not lead. +func TestStageTrackerDeferredToSharedCIIncidentReadsWaitingOnSharedCI(t *testing.T) { + now := time.Date(2026, 11, 10, 1, 30, 0, 0, time.UTC) + reason := "No PR-side repair; deferring until that incident closes." + detail := "repo=org/repo, number=7, head=abc1234def, successors=#17463, close_ok=false, url=https://github.com/org/repo/pull/7#issuecomment-9, incident=17463, reason=" + reason + ", agent=scanner, backend=copilot" + entries := []AuditEntry{{Timestamp: now.Add(-20 * time.Minute).Format(time.RFC3339), Action: github.AuditActionAgentPRDeferred, Agent: "scanner", Repo: "org/repo", Target: 7, Detail: detail}} + it := deferredRedPR(now, entries...) + it.CIActivity = &StageTrackerActivity{Head: it.Head, State: "failing", ChecksFailing: []string{"mutation"}, Since: it.CIActivity.Since} + if it.Deferral == nil || it.Deferral.Incident != 17463 || it.Deferral.IncidentURL != "https://github.com/org/repo/issues/17463" { + t.Fatalf("incident pair read and linked: %+v", it.Deferral) + } + stageTrackerApplyRemediation(it, review.DispatchState{}, nil, "scanner", now) + ca := it.CodeActivity + if ca.State != codeStateDeferred || ca.Caption != "Waiting on shared CI · #17463" || ca.URL != "https://github.com/org/repo/issues/17463" { + t.Fatalf("shared-CI word: state=%s caption=%q url=%q", ca.State, ca.Caption, ca.URL) + } + if !strings.HasPrefix(ca.Detail, "`mutation` is failing fleet-wide; tracked in #17463. Lifts automatically when that issue closes. scanner deferred head abc1234 at ") || !strings.Contains(ca.Detail, reason) { + t.Fatalf("detail: %q", ca.Detail) + } + if it.Caption != ca.Caption { + t.Fatalf("070 caption follows the code word: %q", it.Caption) + } +} + +func TestStageTrackerFirstSentence(t *testing.T) { + cases := map[string]string{ + "Deferring.": "Deferring.", + "Deferring this PR (dependabot-authored). Waiting on #9.": "Deferring this PR (dependabot-authored).", + "See docs/a.md for why; deferring until #17463. closes": "See docs/a.md for why; deferring until #17463.", + "no punctuation at all": "no punctuation at all.", + } + for in, want := range cases { + if got := stageTrackerFirstSentence(in); got != want { + t.Errorf("%q: got %q, want %q", in, got, want) + } + } +} + func TestStageTrackerDeferralPrecedence(t *testing.T) { now := time.Date(2026, 11, 9, 4, 0, 0, 0, time.UTC) fix := func(at time.Time) review.DispatchState { diff --git a/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js b/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js index defa54ca6c..2d13499f23 100644 --- a/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js +++ b/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js @@ -127,6 +127,20 @@ test('deferred: PR in progress is plain amber and still, names the successor, an assert.match(pr, /Close now is on the row/); }); +// hivecommons/hive#17500: a deferral to a shared-CI incident says so in the +// word, links the incident, and the tooltip promises the lift. +test('deferred to a shared-CI incident: the word is Waiting on shared CI with the incident linked', () => { + const item = redPR({ display_column: 30, + deferral: { head: 'abc1234def', actor: 'scanner', successors: ['#17463'], incident: 17463, incident_url: 'https://github.com/org/repo/issues/17463' }, + code_activity: { head: 'abc1234def', state: 'deferred', caption: 'Waiting on shared CI · #17463', actor: 'scanner', source: 'hive-deferral', since: '2026-11-10T01:13:00Z', url: 'https://github.com/org/repo/issues/17463', + detail: '`mutation` is failing fleet-wide; tracked in #17463. Lifts automatically when that issue closes. scanner deferred head abc1234 at 2026-11-10T01:13:00Z.' } }); + const pr = cells(item)[3]; + assert.match(pr, /ham-remediation-deferred/); + assert.match(pr, /Waiting on shared CI · ]*>#17463<\/a>/); + assert.doesNotMatch(pr, /Deferred · by/); + assert.match(pr, /Lifts automatically when that issue closes/); +}); + test('a red PR with a stale code head renders no remediation attributes', () => { const item = redPR({ display_column: 30, code_activity: { head: 'older', state: 'unassigned', caption: 'Unassigned · next: scanner' } }); const html = renderStrip(item, stages, null, now, {}); diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index 15e157241a..8dce519905 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -382,6 +382,8 @@ (stage_tracker_remediation.go). */ .ham-seg.active.ham-remediation-unassigned { background: color-mix(in srgb, var(--amber) 70%, var(--red)); } .ham-seg.active.ham-remediation-deferred { background: var(--amber); } + /* The shared-CI incident a deferral waits on is a link in the word (hivecommons/hive#17500). */ + .ham-seg.active.ham-remediation-deferred .ham-incident-link { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; } .ham-seg.done.ham-fix-pushed { color: var(--green); } /* A done decision column that still names the blocker a person must clear while a covering PR drives the strip (hivecommons/docs#612). */ diff --git a/src/pkg/dashboard/static-src/js/tracker-row-strip.js b/src/pkg/dashboard/static-src/js/tracker-row-strip.js index 4ea3ce113a..86c75c68be 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-strip.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-strip.js @@ -616,7 +616,11 @@ const progressActor = typeof stageTrackerPRProgressActor === 'function' && active && !sg.cap && sg.number === STAGE_TRACKER_PR_COLUMN && !sg.detour && !gateWord ? stageTrackerPRProgressActor(item, wordText) : null; const progressHolderHtml = holderHtml || (progressActor ? ` · ${esc(progressActor.who)}` : ''); const progressIco = progressActor && !actorIco && !holderIco ? stageTrackerIcon(progressActor.kind, 'ham-ico ham-actor-ico', 'Working the PR: ' + progressActor.kind + ' ' + progressActor.who) : ''; - const word = sg.detour ? `${esc(sg.detour.text)}${detourHolder}${reasonHtml}` : (gateWord || `${esc(sg.short)}${progressHolderHtml}${reasonHtml}`); + // A deferral to a shared-CI incident links the incident in its + // word, "Waiting on shared CI · #17463" (hivecommons/hive#17500). + const incident = sg.detour && sg.number === 30 && remediation === 'deferred' && item.deferral && Number(item.deferral.incident) > 0 && item.deferral.incident_url ? '#' + Number(item.deferral.incident) : ''; + const detourText = incident && sg.detour.text.indexOf(incident) >= 0 ? esc(sg.detour.text).replace(esc(incident), `${esc(incident)}`) : (sg.detour ? esc(sg.detour.text) : ''); + const word = sg.detour ? `${detourText}${detourHolder}${reasonHtml}` : (gateWord || `${esc(sg.short)}${progressHolderHtml}${reasonHtml}`); const gateCue = gateWord && typeof stageTrackerGateCueHtml === 'function' ? stageTrackerGateCueHtml(item, nowMs, trains) : ''; // The agent-working spinner (tracker-cues) names the agent and what // it did, so a spinning glyph is never unexplained. diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index c9a16c898f..a775fe6a31 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1725,6 +1725,8 @@ (stage_tracker_remediation.go). */ .ham-seg.active.ham-remediation-unassigned { background: color-mix(in srgb, var(--amber) 70%, var(--red)); } .ham-seg.active.ham-remediation-deferred { background: var(--amber); } + /* The shared-CI incident a deferral waits on is a link in the word (hivecommons/hive#17500). */ + .ham-seg.active.ham-remediation-deferred .ham-incident-link { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; } .ham-seg.done.ham-fix-pushed { color: var(--green); } /* A done decision column that still names the blocker a person must clear while a covering PR drives the strip (hivecommons/docs#612). */ @@ -19078,7 +19080,11 @@

    Where to get help

    const progressActor = typeof stageTrackerPRProgressActor === 'function' && active && !sg.cap && sg.number === STAGE_TRACKER_PR_COLUMN && !sg.detour && !gateWord ? stageTrackerPRProgressActor(item, wordText) : null; const progressHolderHtml = holderHtml || (progressActor ? ` · ${esc(progressActor.who)}` : ''); const progressIco = progressActor && !actorIco && !holderIco ? stageTrackerIcon(progressActor.kind, 'ham-ico ham-actor-ico', 'Working the PR: ' + progressActor.kind + ' ' + progressActor.who) : ''; - const word = sg.detour ? `${esc(sg.detour.text)}${detourHolder}${reasonHtml}` : (gateWord || `${esc(sg.short)}${progressHolderHtml}${reasonHtml}`); + // A deferral to a shared-CI incident links the incident in its + // word, "Waiting on shared CI · #17463" (hivecommons/hive#17500). + const incident = sg.detour && sg.number === 30 && remediation === 'deferred' && item.deferral && Number(item.deferral.incident) > 0 && item.deferral.incident_url ? '#' + Number(item.deferral.incident) : ''; + const detourText = incident && sg.detour.text.indexOf(incident) >= 0 ? esc(sg.detour.text).replace(esc(incident), `${esc(incident)}`) : (sg.detour ? esc(sg.detour.text) : ''); + const word = sg.detour ? `${detourText}${detourHolder}${reasonHtml}` : (gateWord || `${esc(sg.short)}${progressHolderHtml}${reasonHtml}`); const gateCue = gateWord && typeof stageTrackerGateCueHtml === 'function' ? stageTrackerGateCueHtml(item, nowMs, trains) : ''; // The agent-working spinner (tracker-cues) names the agent and what // it did, so a spinning glyph is never unexplained. diff --git a/src/pkg/github/pr_deferral.go b/src/pkg/github/pr_deferral.go index a72d2e08f2..3bba8beaf3 100644 --- a/src/pkg/github/pr_deferral.go +++ b/src/pkg/github/pr_deferral.go @@ -32,6 +32,11 @@ const ( PRDeferralPairCloseOK = "close_ok" PRDeferralPairURL = "url" PRDeferralPairReason = "reason" + // PRDeferralPairIncident is the [shared-ci] incident issue the deferral + // waits on (`` in the comment), when any. The + // dashboard reads it as "Waiting on shared CI · #N"; absent, the + // deferral is the agent's own decision (hivecommons/hive#17500). + PRDeferralPairIncident = "incident" ) // prDeferralReasonMax bounds the reason carried in the audit detail. @@ -40,7 +45,9 @@ const prDeferralReasonMax = 300 // prDeferralSentence matches a sentence or line that opens with // "Deferring"/"Deferred" (after markdown and an optional "Status:" or // "Update:" label), up to its closing punctuation; a dot inside a token -// ("docs/a.md") does not end it. The verb must defer the PR itself: it +// ("docs/a.md") does not end it. A semicolon opens a sentence too: the +// scanner's shared-CI deferral reads "No PR-side repair; deferring until +// that incident closes." (hivecommons/hive#17500). The verb must defer the PR itself: it // stands alone ("Deferring."), is followed by punctuation ("Deferring: …", // "Deferring (…)") or takes the PR or a wait as its object ("Deferring this // PR", "Deferred until …", "Deferred to #N"). "Deferred the flaky-test @@ -49,7 +56,7 @@ const prDeferralReasonMax = 300 // comment ("… a maintainer may also close it now. Deferring.") rather than // opening it, unlike an issue deferral (commentDeferral), which only looks // at how the comment starts. -var prDeferralSentence = regexp.MustCompile(`(?im)(?:^|[.!?][ \t]+)[^\w\n]*(?:(?:status|update)\s*:[^\w\n]*)?` + +var prDeferralSentence = regexp.MustCompile(`(?im)(?:^|[.!?;][ \t]+)[^\w\n]*(?:(?:status|update)\s*:[^\w\n]*)?` + `(deferr(?:ed|ing)(?:` + `(?:[ \t]+(?:this|it|the[ \t]+(?:PR|pull[ \t]+request)|until|pending|to|for[ \t]+now|in[ \t]+favou?r[ \t]+of)\b|[ \t]*[^\w\s.!?])` + `(?:[^.!?\n]|[.!?][^\s.!?])*[.!?]?` + @@ -83,6 +90,9 @@ type prDeferral struct { Reason string Successors []string CloseOK bool + // Incident is the shared-CI incident issue number the comment's + // `` marker names; 0 when none. + Incident int } // parsePRDeferral reports whether body, a hive agent's comment on repo's @@ -115,6 +125,7 @@ func parsePRDeferral(body, repo string, number int) (prDeferral, bool) { Reason: prDeferralTrim(reason), Successors: prDeferralRefs(note, repo, number), CloseOK: prDeferralCloseOK.MatchString(note), + Incident: newestSharedCIMarker([]string{body}), }, true } @@ -162,13 +173,16 @@ var prDeferralPairBoundary = regexp.MustCompile(`, ([a-z_]+)=`) // boundary inside the reason is written as "; =" and the reason stays // one value. func (d prDeferral) auditPairs(head, url string) []string { - return []string{ + pairs := []string{ PRDeferralPairHead, head, PRDeferralPairSuccessors, strings.Join(d.Successors, " "), PRDeferralPairCloseOK, strconv.FormatBool(d.CloseOK), PRDeferralPairURL, url, - PRDeferralPairReason, prDeferralPairBoundary.ReplaceAllString(d.Reason, "; $1="), } + if d.Incident > 0 { + pairs = append(pairs, PRDeferralPairIncident, strconv.Itoa(d.Incident)) + } + return append(pairs, PRDeferralPairReason, prDeferralPairBoundary.ReplaceAllString(d.Reason, "; $1=")) } // recordPRDeferral audits a relayed comment that defers an open pull diff --git a/src/pkg/github/pr_deferral_test.go b/src/pkg/github/pr_deferral_test.go index 822cc76819..dc34e95e2c 100644 --- a/src/pkg/github/pr_deferral_test.go +++ b/src/pkg/github/pr_deferral_test.go @@ -91,6 +91,25 @@ func TestPRDeferralAuditPairsNeutralizeBoundariesInTheReason(t *testing.T) { } } +// A deferral stamped with the shared-CI marker carries the incident number +// as its own pair, ahead of the reason (hivecommons/hive#17500). +func TestPRDeferralAuditPairsCarryTheSharedCIIncident(t *testing.T) { + body := "The red `mutation` check here is the advisory job hitting its 20-minute limit, the same across sibling PRs — tracked in #17463, not caused by this diff. No PR-side repair; deferring until that incident closes.\n\n" + d, ok := parsePRDeferral(body, "o/r", 17471) + if !ok || d.Incident != 17463 { + t.Fatalf("incident = %d ok=%v, want 17463", d.Incident, ok) + } + pairs := d.auditPairs("abc", "https://github.com/o/r/pull/17471") + joined := strings.Join(pairs, ",") + if !strings.Contains(joined, PRDeferralPairIncident+",17463,"+PRDeferralPairReason+",") { + t.Fatalf("incident pair must precede the reason: %q", joined) + } + plain, _ := parsePRDeferral("Deferring this PR (dependabot-authored).", "o/r", 1) + if plain.Incident != 0 || strings.Contains(strings.Join(plain.auditPairs("abc", ""), ","), PRDeferralPairIncident) { + t.Fatalf("no marker, no incident pair: %v", plain.auditPairs("abc", "")) + } +} + // The relay records a deferral on an open PR bound to its head, and nothing // for an issue number (pulls API 404) or a comment that defers nothing. func TestRecordPRDeferral(t *testing.T) { diff --git a/src/pkg/github/shared_ci_rerun.go b/src/pkg/github/shared_ci_rerun.go index 27b71c0e95..8d3f2d3767 100644 --- a/src/pkg/github/shared_ci_rerun.go +++ b/src/pkg/github/shared_ci_rerun.go @@ -33,10 +33,19 @@ const ( // once-per-PR-per-incident record; sharedCIMarkerRE does not match it. var sharedCIRerunMarkerRE = regexp.MustCompile(``) +// sharedCILiftedMarkerRE matches the marker that says the deferral to +// incident was lifted on this PR (hivecommons/hive#17500). The sweep +// stamps it next to the rerun marker; either one dedupes. +var sharedCILiftedMarkerRE = regexp.MustCompile(``) + func sharedCIRerunMarker(incident int) string { return fmt.Sprintf("", incident) } +func sharedCILiftedMarker(incident int) string { + return fmt.Sprintf("", incident) +} + // SharedCIRerunOptions bounds one SweepSharedCIReruns pass. type SharedCIRerunOptions struct { // MaxPRs caps PRs re-run per pass; non-positive means DefaultSharedCIRerunMaxPRs. @@ -244,6 +253,11 @@ func pendingSharedCIReruns(texts []string, closed map[int]bool) []int { done[n] = true } } + for _, m := range sharedCILiftedMarkerRE.FindAllStringSubmatch(text, -1) { + if n, err := strconv.Atoi(m[1]); err == nil { + done[n] = true + } + } } var out []int for n := range stamped { @@ -336,7 +350,7 @@ func (c *Client) trySharedCIRerun(ctx context.Context, repo, owner, repoName str blocked = true break } - if _, err := c.client.Actions.RerunFailedJobsByID(ctx, owner, repoName, run.GetID()); err != nil { + if err := c.rerunSharedCIRun(ctx, owner, repoName, run); err != nil { if isWriteForbiddenError(err) { // The App installation lacks the Actions write permission for // rerun-failed-jobs: a permanent gap, so stop this pass and @@ -401,8 +415,28 @@ func (c *Client) markSharedCIRerunForbidden(repo string) bool { return true } +// rerunSharedCIRun re-runs one red workflow run. A failed or timed-out run +// gets its failed jobs re-run; a cancelled run (a job that hit its +// timeout-minutes is recorded as cancelled, hivecommons/hive#17500) has no +// "failed" job for that endpoint, so the whole workflow is re-run. +func (c *Client) rerunSharedCIRun(ctx context.Context, owner, repo string, run *gh.WorkflowRun) error { + if run.GetConclusion() == sharedCIConclusionCancelled { + _, err := c.client.Actions.RerunWorkflowByID(ctx, owner, repo, run.GetID()) + return err + } + _, err := c.client.Actions.RerunFailedJobsByID(ctx, owner, repo, run.GetID()) + return err +} + +// sharedCIConclusionCancelled is GitHub's conclusion for a run whose job +// was cancelled, including by its own timeout-minutes. +const sharedCIConclusionCancelled = "cancelled" + // latestFailedWorkflowRuns returns, per workflow, the newest run for sha when -// that run completed as failure or timed_out. +// that run completed red: failure, timed_out, or cancelled (a job cut off +// by timeout-minutes, which is how the shared-CI `mutation` incident of +// hivecommons/hive#17463 presented). Newest-per-workflow keeps a run +// cancelled by a later push or re-run out of the list. func (c *Client) latestFailedWorkflowRuns(ctx context.Context, owner, repo, sha string) ([]*gh.WorkflowRun, error) { if sha == "" { return nil, nil @@ -437,7 +471,7 @@ func (c *Client) latestFailedWorkflowRuns(ctx context.Context, owner, repo, sha continue } switch run.GetConclusion() { - case "failure", "timed_out": + case "failure", "timed_out", sharedCIConclusionCancelled: out = append(out, run) } } @@ -450,13 +484,22 @@ func renderSharedCIRerunComment(incidents []int, sha string, runs []*gh.Workflow refs := make([]string, len(incidents)) for i, n := range incidents { fmt.Fprintln(&b, sharedCIRerunMarker(n)) + fmt.Fprintln(&b, sharedCILiftedMarker(n)) refs[i] = "#" + strconv.Itoa(n) } short := sha if len(short) > 7 { short = short[:7] } - fmt.Fprintf(&b, "Shared-CI incident %s is closed, so Hive re-ran the failed jobs on `%s`:\n\n", strings.Join(refs, ", "), short) + names := make([]string, 0, len(runs)) + for _, run := range runs { + name := run.GetName() + if name == "" { + name = fmt.Sprintf("run %d", run.GetID()) + } + names = append(names, "`"+name+"`") + } + fmt.Fprintf(&b, "Shared-CI incident %s closed — re-running %s on `%s`:\n\n", strings.Join(refs, ", "), strings.Join(names, ", "), short) for _, run := range runs { name := run.GetName() if name == "" { @@ -469,6 +512,6 @@ func renderSharedCIRerunComment(incidents []int, sha string, runs []*gh.Workflow } } fmt.Fprintln(&b) - fmt.Fprintln(&b, "_Hive re-runs a PR at most once per incident; the new results are this PR's verdict._") + fmt.Fprintln(&b, "_The deferral to that incident is lifted; Hive re-runs a PR at most once per incident and the new results are this PR's verdict._") return b.String() } diff --git a/src/pkg/github/shared_ci_rerun_test.go b/src/pkg/github/shared_ci_rerun_test.go index a5e85374b3..8c2506201a 100644 --- a/src/pkg/github/shared_ci_rerun_test.go +++ b/src/pkg/github/shared_ci_rerun_test.go @@ -44,6 +44,7 @@ type sharedCIRerunFake struct { issues []sharedCIRerunIssue prs map[int]*sharedCIRerunPR reruns []int64 + fullReruns []int64 posted map[int][]string commentLists map[int]int forbidRerun bool @@ -58,6 +59,7 @@ func newSharedCIRerunFake(t *testing.T, issues []sharedCIRerunIssue, prs []*shar } commentsRE := regexp.MustCompile(`^/repos/org/repo/issues/(\d+)/comments$`) rerunRE := regexp.MustCompile(`^/repos/org/repo/actions/runs/(\d+)/rerun-failed-jobs$`) + fullRerunRE := regexp.MustCompile(`^/repos/org/repo/actions/runs/(\d+)/rerun$`) updated := "2026-10-15T00:00:00Z" srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { f.mu.Lock() @@ -142,6 +144,10 @@ func newSharedCIRerunFake(t *testing.T, issues []sharedCIRerunIssue, prs []*shar return } w.WriteHeader(http.StatusCreated) + case fullRerunRE.MatchString(r.URL.Path) && r.Method == http.MethodPost: + id, _ := strconv.ParseInt(fullRerunRE.FindStringSubmatch(r.URL.Path)[1], 10, 64) + f.fullReruns = append(f.fullReruns, id) + w.WriteHeader(http.StatusCreated) default: t.Errorf("unexpected request %s %s", r.Method, r.URL.Path) w.WriteHeader(http.StatusNotFound) @@ -276,6 +282,60 @@ func TestSweepSharedCIReruns_SkipsWorkflowWhoseNewestRunPassed(t *testing.T) { } } +// hivecommons/hive#17500: a job cut off by its timeout-minutes is recorded +// as a cancelled run, not a failed one; hive#17471 sat "Deferred" after +// incident #17463 closed because the sweep saw nothing red. A cancelled +// newest run is red: the whole workflow is re-run once, the PR is told the +// deferral lifted, and the next pass does nothing. +func TestSweepSharedCIReruns_LiftsDeferralWhenTheRedRunWasCancelled(t *testing.T) { + now := sharedCIRerunNow() + issues := []sharedCIRerunIssue{{Number: 17463, Title: "[shared-ci] mutation failing across org/repo", ClosedAt: now.Add(-time.Hour)}} + prs := []*sharedCIRerunPR{{ + Number: 1, SHA: "41dda120fa", Comments: []string{"tracked in #17463; deferring until that incident closes.\n\n"}, + Runs: []sharedCIRerunRun{{ID: 59, WorkflowID: 7, RunNumber: 59, Attempt: 1, Status: "completed", Conclusion: "cancelled"}}, + }} + srv, fake := newSharedCIRerunFake(t, issues, prs) + c := newTestClient(t, srv, "org", []string{"org/repo"}) + opts := SharedCIRerunOptions{Now: sharedCIRerunNow} + res, err := c.SweepSharedCIReruns(context.Background(), opts) + if err != nil { + t.Fatalf("sweep: %v", err) + } + reruns, posted, _ := fake.snap() + fake.mu.Lock() + full := append([]int64(nil), fake.fullReruns...) + fake.mu.Unlock() + if len(reruns) != 0 || !reflect.DeepEqual(full, []int64{59}) || len(res.Rerun) != 1 { + t.Fatalf("a cancelled run is re-run whole: failed-jobs=%v full=%v result=%+v", reruns, full, res) + } + if len(posted[1]) != 1 { + t.Fatalf("one lift comment, got %q", posted[1]) + } + for _, want := range []string{"", "", "Shared-CI incident #17463 closed — re-running `CI`"} { + if !strings.Contains(posted[1][0], want) { + t.Fatalf("lift comment misses %q: %q", want, posted[1][0]) + } + } + + res, err = c.SweepSharedCIReruns(context.Background(), opts) + if err != nil { + t.Fatalf("second sweep: %v", err) + } + _, posted, _ = fake.snap() + fake.mu.Lock() + full = append([]int64(nil), fake.fullReruns...) + fake.mu.Unlock() + if len(full) != 1 || len(posted[1]) != 1 || len(res.Rerun) != 0 { + t.Fatalf("second pass must lift nothing: full=%v posted=%d result=%+v", full, len(posted[1]), res) + } + + // The memo is per process; a fresh client sees the lifted marker and stays quiet too. + c2 := newTestClient(t, srv, "org", []string{"org/repo"}) + if res, err = c2.SweepSharedCIReruns(context.Background(), opts); err != nil || len(res.Rerun) != 0 { + t.Fatalf("fresh client re-lifted: err=%v result=%+v", err, res) + } +} + func TestPendingSharedCIReruns(t *testing.T) { closed := map[int]bool{10: true, 11: true} cases := []struct { @@ -286,6 +346,7 @@ func TestPendingSharedCIReruns(t *testing.T) { {"no marker", []string{"hello"}, nil}, {"closed incident pending", []string{""}, []int{10}}, {"already rerun", []string{"", ""}, nil}, + {"already lifted", []string{"", ""}, nil}, {"newest marker still open", []string{"", ""}, nil}, {"two closed incidents", []string{"", ""}, []int{10, 11}}, {"rerun marker alone is not a deferral", []string{""}, nil}, From 235099b0028002a9b128a2aced982f9aee053e84 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 02:36:39 +0000 Subject: [PATCH 090/123] =?UTF-8?q?=F0=9F=90=9B=20fix(hub):=20make=20/etc/?= =?UTF-8?q?hive/hive.yaml=20durable=20on=20hosted=20spokes=20(#17471)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(hub): make /etc/hive/hive.yaml durable on hosted spokes and report the persisted config path Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> * 📖 docs(config): reconcile config-layering with the #17468 symlink and pin Save() in-place write Review follow-ups for #17471: - config-layering.md: the 'On Kubernetes' paragraph still said the entrypoint copies the runtime config over the config path; it now covers the linked steady state and the unlinked cases. The #17468 block moved below the 'Outside Kubernetes' paragraph so that paragraph keeps its subject, which is now also named explicitly. - config.go: comment at the Save() write site explaining that the in-place O_WRONLY|O_TRUNC write (not temp-file+rename) is what keeps the hosted-spoke symlink intact, and TestSaveThroughSymlinkKeepsLink pinning it. - config.go: refresh the pre-#2402 'recovery copy' / 're-seeds on every boot' comments on the runtime write and DashboardOverlayFile. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 📖 docs(config): scope /etc/hive/hive.yaml durability to re-provisioned spokes and add the boot-line verification step Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../fixed-etc-hive-config-not-persisted.md | 1 + src/cmd/hive/main.go | 9 +++ src/deploy/entrypoint.sh | 8 ++- src/docs/config-layering.md | 38 +++++++++- src/docs/kubernetes-deployment.md | 2 +- src/docs/manual-provisioning.md | 9 +-- src/pkg/config/config.go | 61 +++++++++++++--- src/pkg/config/config_save_test.go | 71 +++++++++++++++++++ src/pkg/dashboard/api_config_export.go | 17 +++-- src/pkg/dashboard/api_config_export_test.go | 51 +++++++++++++ src/pkg/hub/saas_provision.go | 11 ++- src/pkg/hub/seed_only_first_boot_test.go | 49 ++++++++++++- 12 files changed, 300 insertions(+), 27 deletions(-) create mode 100644 changelog.d/fixed-etc-hive-config-not-persisted.md diff --git a/changelog.d/fixed-etc-hive-config-not-persisted.md b/changelog.d/fixed-etc-hive-config-not-persisted.md new file mode 100644 index 0000000000..c2ce33fbfa --- /dev/null +++ b/changelog.d/fixed-etc-hive-config-not-persisted.md @@ -0,0 +1 @@ +- Edits to `/etc/hive/hive.yaml` on hub-provisioned spokes provisioned (or re-applied) after this change now survive a pod restart: the config path is a link to the persisted `/data/hive.yaml.runtime` instead of a throwaway `emptyDir` copy; existing spokes need their deployment re-applied (hub upgrades do not rewrite the init command). Startup logs which file is the boot source of truth, and `/api/config/export` reports it as `metadata.persisted_path`. diff --git a/src/cmd/hive/main.go b/src/cmd/hive/main.go index f3c6da9251..a26dd7992e 100644 --- a/src/cmd/hive/main.go +++ b/src/cmd/hive/main.go @@ -646,6 +646,15 @@ func (b *boot) bootConfigWith(deps bootConfigDeps) bool { b.logger = deps.fileLogger(b.cfg) slog.SetDefault(b.logger) + // #17468: one line naming the file this boot actually read. On hosted + // spokes /etc/hive/hive.yaml is a symlink into the PVC, so the resolved + // path is the persisted file an operator must edit. + b.logger.Info("boot: config source of truth", + "loaded_from", b.configPath, + "boot_source", config.ResolvedConfigPath(b.configPath), + "persisted_path", config.PersistedConfigPath(b.configPath), + ) + // Load or generate a unique Hive ID for this instance b.cfg.HiveID = deps.hiveID(b.logger) _ = os.Setenv("HIVE_ID", b.cfg.HiveID) // valid key/value; Setenv cannot fail on Unix diff --git a/src/deploy/entrypoint.sh b/src/deploy/entrypoint.sh index e66123aaac..b2f04031b4 100644 --- a/src/deploy/entrypoint.sh +++ b/src/deploy/entrypoint.sh @@ -1017,7 +1017,13 @@ if [ "$IS_KUBERNETES" = "true" ]; then # deliberately NOT merged — it is frozen at provision and every field it # could contribute is either already here or re-asserted by the hub on # the next heartbeat (~30s), including hub.is_public. - if cp "$HIVE_CONFIG_BOOT" "$HIVE_CONFIG_PATH" 2>/dev/null; then + # + # #17468: on hosted spokes the copy-config init container links the + # config path to the runtime config, so the two are one file. cp would + # refuse ("are the same file") and land in the read-only branch below. + if [ "$HIVE_CONFIG_PATH" -ef "$HIVE_CONFIG_BOOT" ]; then + echo "[entrypoint] K8s mode — booting from runtime config $HIVE_CONFIG_BOOT ($HIVE_CONFIG_PATH links to it; ConfigMap is a seed, not merged)" + elif cp "$HIVE_CONFIG_BOOT" "$HIVE_CONFIG_PATH" 2>/dev/null; then echo "[entrypoint] K8s mode — booting from runtime config $HIVE_CONFIG_BOOT (ConfigMap is a seed, not merged)" else export HIVE_CONFIG="$HIVE_CONFIG_BOOT" diff --git a/src/docs/config-layering.md b/src/docs/config-layering.md index 0e68abda0e..965fb3990f 100644 --- a/src/docs/config-layering.md +++ b/src/docs/config-layering.md @@ -114,7 +114,11 @@ ambiguity cost real debugging time. **On Kubernetes it is the boot input after the first boot** (#2392). When a non-empty `/data/hive.yaml.runtime` (or the legacy `hive.yaml.bak`) exists, the -entrypoint copies it over the config path and boots from it; the ConfigMap seed +binary boots from it, either directly through the `/etc/hive/hive.yaml` link +(on a spoke whose `copy-config` init container carries the #17468 `ln -sf`; +the entrypoint then skips the copy) or, on a spoke not yet linked (older init +command, or legacy `hive.yaml.bak` only), by the entrypoint copying the runtime +config over the config path. Either way the ConfigMap seed is not used and the overlay merge does not run. Only when neither exists (first boot, or a hive reprovisioned onto a PVC without one) does the entrypoint start from the seed, merge `/data/hive.yaml.dashboard` over it, and *write* the result @@ -122,7 +126,7 @@ to `hive.yaml.runtime`. `Config.Save()` rewrites it on every save. With neither file and no seed, the entrypoint exits 1. The `copy-config` init container only seeds the config path when the PVC has no runtime config (#2402). -**Outside Kubernetes it is a live boot input, and the source of truth.** There is no +**Outside Kubernetes, `hive.yaml.runtime` is a live boot input, and the source of truth.** There is no ConfigMap and no overlay in that mode, so the entrypoint restores this file over the config path on every boot (or points `HIVE_CONFIG` straight at it, and pins the same path into the launch argv as `--config`, when the config path is @@ -135,6 +139,36 @@ outside Kubernetes because this file already plays that role. > not an input" and mentioned Docker only in passing. That was wrong for every > non-Kubernetes hive, where the file is precisely an input. +**Which file to edit on a hosted spoke** ([#17468](https://github.com/hivecommons/hive/issues/17468)). +`/etc/hive` is an `emptyDir`, so nothing written there survives a restart on +its own. The three files are: + +| File | Role | Survives restart | +|---|---|---| +| `/data/hive.yaml.runtime` | the persisted boot source after first boot; `Config.Save()` writes it on every save | yes (PVC) | +| `/data/hive.yaml.dashboard` | secret-free overlay merged over the ConfigMap seed **only** on a boot with no runtime config (first boot, reprovision) | yes (PVC) | +| `/etc/hive/hive.yaml` | the config path the binary loads; once a runtime config exists, the init container makes it a **symlink** to `/data/hive.yaml.runtime` | only through the link | + +On a spoke provisioned (or whose deployment manifest was re-applied) after +#17468, editing `/etc/hive/hive.yaml` edits the runtime config, and `kubectl +rollout restart` keeps the change. `Config.Save()` writes the config path in +place (no temp-file rename), so saves do not replace the link. The link exists +only where the init container carries the `ln -sf`: it is written into the +provision manifest, and hub upgrades (`kubectl set image`) do not rewrite the +init command, so spokes provisioned earlier keep the old `cp`-only command and +lose edits to `/etc/hive/hive.yaml` on restart. A spoke carrying only the +legacy `hive.yaml.bak` is never linked (that file is never written), and on +first boot the path is a plain copy of the seed until the next restart. + +To check, read the `boot: config source of truth` log line: if `boot_source` +differs from `persisted_path`, the path is **not** linked, so edit +`persisted_path` instead. To pick up the new init command, re-apply the +deployment; inspect the current one with the jsonpath one-liner in +[HUB_DISASTER_RECOVERY.md](../../docs/HUB_DISASTER_RECOVERY.md). The binary logs `boot: config source of truth` at startup +with `loaded_from`, `boot_source` (symlinks resolved) and `persisted_path`, and +`/api/config/export` reports the same file as `metadata.persisted_path` — +edit that one. + ### Which mode am I in? There is no Docker-specific or Podman-specific code path. The entrypoint and diff --git a/src/docs/kubernetes-deployment.md b/src/docs/kubernetes-deployment.md index e710647a1a..88093449d8 100644 --- a/src/docs/kubernetes-deployment.md +++ b/src/docs/kubernetes-deployment.md @@ -182,6 +182,6 @@ through the authenticated `/terminal` proxy on 3002. | Mount Path | Purpose | |------------|---------| -| `/etc/hive/hive.yaml` | Configuration (read-only, from ConfigMap) | +| `/etc/hive/hive.yaml` | Configuration (writable `emptyDir`; symlink to `/data/hive.yaml.runtime` once one exists; ConfigMap is only the first-boot seed) | | `/data` | Persistent state: metrics, beads, logs | | `/secrets` | GitHub App key and other secrets (read-only) | diff --git a/src/docs/manual-provisioning.md b/src/docs/manual-provisioning.md index a8b2c0c3cf..c8c9e666d2 100644 --- a/src/docs/manual-provisioning.md +++ b/src/docs/manual-provisioning.md @@ -1393,14 +1393,14 @@ spec: # ── init containers — REQUIRED. The ConfigMap is mounted read-only at # /etc/hive-seed and copied into a WRITABLE emptyDir at /etc/hive. The hive # process must WRITE /etc/hive/hive.yaml at runtime (on first boot the entrypoint - # seeds it, then merges the PVC overlay over it; later boots restore it from + # seeds it, then merges the PVC overlay over it; later boots link it to # /data/hive.yaml.runtime; the dashboard's Save writes it). Mounting the ConfigMap DIRECTLY at /etc/hive makes it read-only and # every config save fails with "open /etc/hive/hive.yaml: read-only file # system" — and dashboard-installed GitHub App auth / ACMM changes are lost. initContainers: - name: copy-config image: ${IMAGE} - command: ["sh","-c","if [ -s /data/hive.yaml.runtime ]; then echo runtime-config-exists-for-recovery; elif [ -s /data/hive.yaml.bak ]; then echo legacy-runtime-config-exists-for-recovery; else cp /etc/hive-seed/hive.yaml /etc/hive/hive.yaml && echo configmap-copied-first-boot; fi"] + command: ["sh","-c","if [ -s /data/hive.yaml.runtime ]; then echo runtime-config-exists-for-recovery; ln -sf /data/hive.yaml.runtime /etc/hive/hive.yaml && echo config-path-linked-to-runtime || echo config-path-link-failed; elif [ -s /data/hive.yaml.bak ]; then echo legacy-runtime-config-exists-for-recovery; else cp /etc/hive-seed/hive.yaml /etc/hive/hive.yaml && echo configmap-copied-first-boot; fi"] volumeMounts: - { name: config, mountPath: /etc/hive-seed, readOnly: true } - { name: config-writable, mountPath: /etc/hive } @@ -1627,8 +1627,9 @@ entrypoint: 2. merges the PVC dashboard overlay `/data/hive.yaml.dashboard` **over** it, and 3. writes `/data/hive.yaml.runtime`. -On **every later boot** it copies `/data/hive.yaml.runtime` over -`/etc/hive/hive.yaml` and boots from that; the seed is not used and the overlay +On **every later boot** the init container symlinks `/etc/hive/hive.yaml` to +`/data/hive.yaml.runtime` (a spoke with only the legacy `.bak` is not linked, and +the entrypoint copies it over instead) and the hive boots from that; the seed is not used and the overlay merge does not run. With neither file and no seed, it exits 1. The dashboard's `Config.Save()` writes the effective source, the dashboard diff --git a/src/pkg/config/config.go b/src/pkg/config/config.go index d7dac38cbb..894772dd14 100644 --- a/src/pkg/config/config.go +++ b/src/pkg/config/config.go @@ -7545,6 +7545,14 @@ func (c *Config) saveLocked() error { // replaces the inode — the host file is never updated, so acmm_level // and other runtime changes are lost on container restart. // + // #17468: the same in-place write is what keeps hosted spokes durable. + // There the copy-config init container makes SourcePath + // (/etc/hive/hive.yaml, an emptyDir) a symlink to RuntimeConfigFile on + // the PVC; O_WRONLY|O_TRUNC follows the link and writes the PVC file, + // whereas a temp-file+rename would replace the link with a regular + // emptyDir file and silently revert the fix. Pinned by + // TestSaveThroughSymlinkKeepsLink — do not switch this to a rename. + // // #3961: a source-path failure must NOT abort the save. On deployments // that mount the config read-only (a ConfigMap mounted straight at // /etc/hive/hive.yaml — the issue's k3s case), this write can NEVER @@ -7576,10 +7584,15 @@ func (c *Config) saveLocked() error { } } - // Persist the runtime config to the PVC. In K8s this is a recovery copy - // (the ConfigMap seed plus the overlay is authoritative); in Docker/LXC - // it IS the boot-time source of truth, since there is no ConfigMap and - // no overlay there. The entrypoint decides which applies. + // Persist the runtime config to the PVC. In K8s this is the boot input + // after first boot (#2392): the entrypoint boots from it and the seed + + // overlay merge runs only when it is absent. On hosted spokes + // SourcePath already links to it (#17468), so this write is the same + // file a second time; it still matters on the restart right after + // first boot and on legacy-.bak-only spokes, where the config path is + // a plain copy. In Docker/LXC it IS the boot-time source of truth, + // since there is no ConfigMap and no overlay there. The entrypoint + // decides which applies. // // Always written under the new name. The legacy file is never written, // renamed or removed here — see RuntimeConfigFileLegacy. @@ -7661,13 +7674,41 @@ const defaultRuntimeConfigFile = "/data/hive.yaml.runtime" // Removable one release after every live hive has written the new name. const RuntimeConfigFileLegacy = "/data/hive.yaml.bak" +// ResolvedConfigPath is path with symlinks resolved, or path itself when it +// cannot be resolved. On hosted spokes /etc/hive/hive.yaml links to +// RuntimeConfigFile (#17468), so this names the file a boot actually read. +func ResolvedConfigPath(path string) string { + if resolved, err := filepath.EvalSymlinks(path); err == nil { + return resolved + } + return path +} + +// PersistedConfigPath names the file whose content survives a restart and is +// the next boot's input — the one an operator must edit. That is +// RuntimeConfigFile whenever the hive has one (every container deployment +// after its first boot), else the legacy name the entrypoint falls back to; +// otherwise the loaded config path, resolved, is the only copy (a bare binary +// on a host). +func PersistedConfigPath(sourcePath string) string { + for _, p := range []string{RuntimeConfigFile, RuntimeConfigFileLegacy} { + if fi, err := os.Stat(p); err == nil && fi.Mode().IsRegular() && fi.Size() > 0 { + return p + } + } + return ResolvedConfigPath(sourcePath) +} + // DashboardOverlayFile is where Save() persists a secret-free copy of the -// dashboard-edited config on the PVC in Kubernetes mode. The copy-config -// init container re-seeds /etc/hive/hive.yaml FROM THE CONFIGMAP on every -// pod boot, so without this overlay every dashboard save (LiteLLM -// endpoint, notifications, agent tweaks, ...) silently vanished on the -// next restart or upgrade. The entrypoint merges this file over the -// ConfigMap seed at boot; the ConfigMap stays authoritative for the +// dashboard-edited config on the PVC in Kubernetes mode. Before #2402 the +// copy-config init container re-seeded /etc/hive/hive.yaml from the +// ConfigMap on every pod boot, so without this overlay every dashboard save +// (LiteLLM endpoint, notifications, agent tweaks, ...) silently vanished on +// the next restart or upgrade. Since #2402 the runtime config is the boot +// input once it exists (and since #17468 the config path links to it), so +// the overlay is consumed only on a boot with no runtime config — first +// boot or a reprovision onto a fresh PVC — where the entrypoint merges it +// over the ConfigMap seed; the ConfigMap stays authoritative there for the // hub/admin-managed keys (acmm_level, hub.is_public). // // A package var (not const) only so tests can point it at a temp dir; it diff --git a/src/pkg/config/config_save_test.go b/src/pkg/config/config_save_test.go index 25855bb146..6721e4277c 100644 --- a/src/pkg/config/config_save_test.go +++ b/src/pkg/config/config_save_test.go @@ -107,6 +107,77 @@ func TestSaveNoAgents(t *testing.T) { } } +// TestSaveThroughSymlinkKeepsLink pins the write strategy the #17468 fix +// depends on. On hosted spokes the copy-config init container makes the +// config path (/etc/hive/hive.yaml, an emptyDir) a symlink to the PVC +// runtime config. Save() must write THROUGH that link in place: a +// temp-file+rename would replace the symlink with a regular emptyDir file, +// and the next pod restart would silently revert the fix. +func TestSaveThroughSymlinkKeepsLink(t *testing.T) { + dir := t.TempDir() + etcDir := filepath.Join(dir, "etc", "hive") + dataDir := filepath.Join(dir, "data") + for _, d := range []string{etcDir, dataDir} { + if err := os.MkdirAll(d, 0o755); err != nil { + t.Fatal(err) + } + } + runtimePath := filepath.Join(dataDir, "hive.yaml.runtime") + cfgPath := filepath.Join(etcDir, "hive.yaml") + if err := os.WriteFile(runtimePath, []byte("old: content\n"), 0o600); err != nil { + t.Fatal(err) + } + if err := os.Symlink(runtimePath, cfgPath); err != nil { + t.Fatal(err) + } + + origOverlay, origRuntime := DashboardOverlayFile, RuntimeConfigFile + DashboardOverlayFile = filepath.Join(dataDir, "hive.yaml.dashboard") + RuntimeConfigFile = runtimePath + t.Cleanup(func() { DashboardOverlayFile, RuntimeConfigFile = origOverlay, origRuntime }) + t.Setenv("KUBERNETES_SERVICE_HOST", "10.0.0.1") + + level := 4 + cfg := &Config{ + SourcePath: cfgPath, + Project: ProjectConfig{Org: "testorg", Name: "test"}, + AgentRuntimeConfig: AgentRuntimeConfig{ + Agents: map[string]AgentConfig{"scanner": {Role: "scanner"}}, + }, + ACMMLevel: &level, + } + if err := cfg.Save(); err != nil { + t.Fatalf("Save through symlinked config path: %v", err) + } + + fi, err := os.Lstat(cfgPath) + if err != nil { + t.Fatal(err) + } + if fi.Mode()&os.ModeSymlink == 0 { + t.Fatalf("Save() replaced the config-path symlink with a regular file (#17468) — mode %v", fi.Mode()) + } + if target, err := os.Readlink(cfgPath); err != nil || target != runtimePath { + t.Fatalf("config path links to %q (err %v), want %q", target, err, runtimePath) + } + + data, err := os.ReadFile(runtimePath) + if err != nil { + t.Fatal(err) + } + if string(data) == "old: content\n" || !strings.Contains(string(data), "testorg") { + t.Fatalf("runtime config was not written through the link: %q", data) + } + // What the config path reads is byte-identical to the persisted file. + viaLink, err := os.ReadFile(cfgPath) + if err != nil { + t.Fatal(err) + } + if string(viaLink) != string(data) { + t.Fatal("config path and runtime config diverged after Save()") + } +} + func TestSaveReadOnlyDir(t *testing.T) { breakPVCLayers(t) // with working PVC layers Save() would return nil dir := t.TempDir() diff --git a/src/pkg/dashboard/api_config_export.go b/src/pkg/dashboard/api_config_export.go index fd96df04be..e8b4606d8e 100644 --- a/src/pkg/dashboard/api_config_export.go +++ b/src/pkg/dashboard/api_config_export.go @@ -42,6 +42,10 @@ type configExportMetadata struct { Version string `json:"version"` Commit string `json:"commit"` LayerPath map[string]configFileInfo `json:"layer_paths"` + // PersistedPath is the file that survives a restart and is the next + // boot's input — the one to edit (#17468). On a hosted spoke + // /etc/hive/hive.yaml is only a link to it. + PersistedPath string `json:"persisted_path"` } type configExportLayers struct { @@ -185,12 +189,13 @@ func (s *Server) buildConfigExport() (configExportResponse, error) { SchemaVersion: 1, GeneratedAt: configExportNow().UTC().Format(time.RFC3339), Metadata: configExportMetadata{ - HiveID: cfg.HiveID, - Name: cfg.Project.Name, - Org: cfg.Project.Org, - Version: version, - Commit: commit, - LayerPath: layerPaths, + HiveID: cfg.HiveID, + Name: cfg.Project.Name, + Org: cfg.Project.Org, + Version: version, + Commit: commit, + LayerPath: layerPaths, + PersistedPath: config.PersistedConfigPath(cfg.SourcePath), }, Effective: effective, Layers: configExportLayers{ diff --git a/src/pkg/dashboard/api_config_export_test.go b/src/pkg/dashboard/api_config_export_test.go index 0b18a9ee3e..db9103f4a3 100644 --- a/src/pkg/dashboard/api_config_export_test.go +++ b/src/pkg/dashboard/api_config_export_test.go @@ -207,3 +207,54 @@ func TestConfigExportFilenameHeader(t *testing.T) { t.Fatalf("Content-Disposition = %q, want %q", got, want) } } + +// TestConfigExportReportsPersistedPath pins #17468: on a hosted spoke +// /etc/hive/hive.yaml is a link into the PVC, and the export must name the +// persisted file — not the emptyDir path — so operators edit the right one. +func TestConfigExportReportsPersistedPath(t *testing.T) { + srv, dir := configExportFixture(t) + runtimePath := filepath.Join(dir, "hive.yaml.runtime") + oldRuntime := config.RuntimeConfigFile + config.RuntimeConfigFile = runtimePath + t.Cleanup(func() { config.RuntimeConfigFile = oldRuntime }) + + linkDir := filepath.Join(dir, "etc-hive") + if err := os.MkdirAll(linkDir, 0o755); err != nil { + t.Fatal(err) + } + linkPath := filepath.Join(linkDir, "hive.yaml") + if err := os.Symlink(runtimePath, linkPath); err != nil { + t.Fatal(err) + } + srv.deps.Config.SourcePath = linkPath + + export := func() map[string]any { + t.Helper() + req := httptest.NewRequest(http.MethodGet, "/api/config/export", nil) + markOwnerRequest(req) + rec := httptest.NewRecorder() + srv.handleConfigExport(rec, req) + if rec.Code != http.StatusOK { + t.Fatalf("status = %d: %s", rec.Code, rec.Body.String()) + } + return decodeConfigExport(t, rec)["metadata"].(map[string]any) + } + + if err := os.WriteFile(runtimePath, []byte("acmm_level: 3\n"), 0o600); err != nil { + t.Fatal(err) + } + if got := export()["persisted_path"]; got != runtimePath { + t.Fatalf("persisted_path = %v, want the PVC runtime config %s", got, runtimePath) + } + + // No runtime config (a bare binary on a host): the loaded file is the + // only copy, so it is the persisted path. + if err := os.Remove(runtimePath); err != nil { + t.Fatal(err) + } + plain := filepath.Join(dir, "hive.yaml") + srv.deps.Config.SourcePath = plain + if got := export()["persisted_path"]; got != plain { + t.Fatalf("persisted_path = %v, want the loaded config %s when no runtime config exists", got, plain) + } +} diff --git a/src/pkg/hub/saas_provision.go b/src/pkg/hub/saas_provision.go index 5ce35ac816..d03dd213b7 100644 --- a/src/pkg/hub/saas_provision.go +++ b/src/pkg/hub/saas_provision.go @@ -3431,7 +3431,16 @@ spec: # Both runtime names are probed: ~16 of 50 live spokes still carry only # the legacy hive.yaml.bak, so keying on the new name alone would treat # them as first-boot and re-seed a hive that has real config on its PVC. - command: ["sh", "-c", "if [ -s /data/hive.yaml.runtime ]; then echo runtime-config-exists-for-recovery; elif [ -s /data/hive.yaml.bak ]; then echo legacy-runtime-config-exists-for-recovery; else cp /etc/hive-seed/hive.yaml /etc/hive/hive.yaml && echo configmap-copied-first-boot; fi"] + # + # Steady state (#17468): /etc/hive is an emptyDir, so a regular file + # there is a throwaway cache and operator edits to it vanished on + # restart. Symlink it to the PVC runtime config instead, so the path + # every runbook names IS the persisted boot source. Config.Save writes + # the config path in place (O_TRUNC, no rename), so the link survives + # saves. Only the NEW name is linked: the legacy .bak is never written + # (config.RuntimeConfigFileLegacy), and linking it would make every + # save write it. + command: ["sh", "-c", "if [ -s /data/hive.yaml.runtime ]; then echo runtime-config-exists-for-recovery; ln -sf /data/hive.yaml.runtime /etc/hive/hive.yaml && echo config-path-linked-to-runtime || echo config-path-link-failed; elif [ -s /data/hive.yaml.bak ]; then echo legacy-runtime-config-exists-for-recovery; else cp /etc/hive-seed/hive.yaml /etc/hive/hive.yaml && echo configmap-copied-first-boot; fi"] volumeMounts: - name: config mountPath: /etc/hive-seed diff --git a/src/pkg/hub/seed_only_first_boot_test.go b/src/pkg/hub/seed_only_first_boot_test.go index b9bd39377f..72744d57a3 100644 --- a/src/pkg/hub/seed_only_first_boot_test.go +++ b/src/pkg/hub/seed_only_first_boot_test.go @@ -32,6 +32,15 @@ func initCommand(t *testing.T) string { // runInit executes the init command against a temp filesystem and returns what // it echoed plus whether the seed was copied over the config path. func runInit(t *testing.T, files map[string]string) (string, bool) { + t.Helper() + out, copied, _ := runInitIn(t, files) + return out, copied +} + +// runInitIn is runInit that also returns the temp root, for assertions on +// what the command left at the config path. "copied" means the config path +// now reads as the SEED — a symlink to the runtime config is not a copy. +func runInitIn(t *testing.T, files map[string]string) (string, bool, string) { t.Helper() root := t.TempDir() for rel, content := range files { @@ -53,10 +62,10 @@ func runInit(t *testing.T, files map[string]string) (string, bool) { out, _ := exec.Command("sh", "-c", cmd).CombinedOutput() copied := false - if b, err := os.ReadFile(filepath.Join(root, "etc/hive/hive.yaml")); err == nil && len(b) > 0 { + if b, err := os.ReadFile(filepath.Join(root, "etc/hive/hive.yaml")); err == nil && len(b) > 0 && string(b) == files["etc/hive-seed/hive.yaml"] { copied = true } - return string(out), copied + return string(out), copied, root } // TestSeedIsCopiedOnlyOnFirstBoot pins phase 3: the ConfigMap is a SEED, not a @@ -93,6 +102,37 @@ func TestSeedIsCopiedOnlyOnFirstBoot(t *testing.T) { } }) + // #17468: /etc/hive is an emptyDir, so a regular file there is a cache + // that loses every operator edit on restart. In steady state the config + // path must BE the persisted runtime config — a symlink — so editing the + // path every runbook names edits the file the next boot reads. + t.Run("steady state: config path links to the PVC runtime config", func(t *testing.T) { + files := map[string]string{"data/hive.yaml.runtime": "acmm_level: 5\n"} + for k, v := range seed { + files[k] = v + } + out, _, root := runInitIn(t, files) + cfgPath := filepath.Join(root, "etc/hive/hive.yaml") + runtimePath := filepath.Join(root, "data/hive.yaml.runtime") + target, err := os.Readlink(cfgPath) + if err != nil { + t.Fatalf("config path is not a symlink — edits to it are lost on restart (#17468): %v\n%s", err, out) + } + if target != runtimePath { + t.Fatalf("config path links to %q, want the runtime config %q", target, runtimePath) + } + if !strings.Contains(out, "config-path-linked-to-runtime") { + t.Errorf("link not reported: %s", out) + } + // An edit through the config path lands in the persisted file. + if err := os.WriteFile(cfgPath, []byte("acmm_level: 4\n"), 0o644); err != nil { + t.Fatal(err) + } + if b, _ := os.ReadFile(runtimePath); string(b) != "acmm_level: 4\n" { + t.Fatalf("edit via the config path did not reach the runtime config; runtime = %q", b) + } + }) + // THE MIGRATION CASE. ~16 of 50 live spokes still carry only the legacy // hive.yaml.bak. Keying first-boot detection on the new name alone would // treat every one of them as new and re-seed a hive that has real config. @@ -108,6 +148,11 @@ func TestSeedIsCopiedOnlyOnFirstBoot(t *testing.T) { if !strings.Contains(out, "legacy-runtime-config-exists-for-recovery") { t.Errorf("legacy runtime config not reported: %s", out) } + // The legacy file is never written (config.RuntimeConfigFileLegacy); + // linking it would make every Config.Save write it. + if strings.Contains(out, "config-path-linked-to-runtime") { + t.Errorf("config path was linked on a legacy-only spoke: %s", out) + } }) // An empty file is not a config. Watchtower zeroing the file is a real From 97b01be2c2c77398e5d4f414c1c5e4f3034b6dbc Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 02:52:56 +0000 Subject: [PATCH 091/123] =?UTF-8?q?=F0=9F=90=9B=20fix(agentmode):=20sec-ch?= =?UTF-8?q?eck=20keeps=20Dependabot=20alerts=20read=20above=20ISSUES=5FAND?= =?UTF-8?q?=5FPRS=20(#17498)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(agentmode): mint the alerts-capable sec-check tier at ISSUES_PRS_MERGE too Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 fix(github): keep Dependabot alerts read when only Workflows is refused GitHub's 422 does not name the refused permission, so dropping alerts on the first refusal left a sec-check-trusted token without vulnerability_alerts:read on installations that accepted alerts but not Workflows (#4677-style). Restore the alerts grant when the alerts-less retry is still refused so the Workflows retry keeps it, and drop both only when neither is accepted. Reword the setup doc's least-privilege row to cover ISSUES_PRS_MERGE and restore the reviewer trusted test row. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 test(agentmode): drop the stale ISSUES_PRS_MERGE=trusted row for sec-check The table-driven case still asserted the pre-#17496 behaviour and contradicted the sec-check-trusted assertion added below it. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...496-sec-check-tier-above-issues-and-prs.md | 1 + src/crux/agentmode/agentmode.go | 26 +++- src/crux/agentmode/claim_comment_test.go | 3 + src/crux/agentmode/reviewer_tier_test.go | 15 +- src/docs/github-app-setup.md | 2 +- src/pkg/github/app.go | 54 +++++-- src/pkg/github/workflows_permission_test.go | 146 ++++++++++++++++++ src/pkg/mint/agent.go | 3 + src/pkg/mint/agent_test.go | 9 +- 9 files changed, 234 insertions(+), 25 deletions(-) create mode 100644 changelog.d/fixed-17496-sec-check-tier-above-issues-and-prs.md diff --git a/changelog.d/fixed-17496-sec-check-tier-above-issues-and-prs.md b/changelog.d/fixed-17496-sec-check-tier-above-issues-and-prs.md new file mode 100644 index 0000000000..342df5cfa9 --- /dev/null +++ b/changelog.d/fixed-17496-sec-check-tier-above-issues-and-prs.md @@ -0,0 +1 @@ +- Security: a `sec-check` agent configured at `ISSUES_PRS_MERGE` (or `autonomous`) now mints a new `sec-check-trusted` token tier — the trusted set plus Dependabot alerts read — so `dependabot/alerts` no longer returns 403; the grant stays optional and role-scoped. ([#17496](https://github.com/hivecommons/hive/issues/17496)) diff --git a/src/crux/agentmode/agentmode.go b/src/crux/agentmode/agentmode.go index 43c52663e5..c98890d905 100644 --- a/src/crux/agentmode/agentmode.go +++ b/src/crux/agentmode/agentmode.go @@ -125,23 +125,34 @@ func TokenTierForRole(m AgentMode, role string) string { if m == ModeAdvisory && role == ReviewerRole { return "reviewer" } - if m == ModeIssuesAndPRs && role == SecCheckRole { - return SecCheckTier + if role == SecCheckRole { + switch m { + case ModeIssuesAndPRs: + return SecCheckTier + case ModeIssuesPRsMerge: + return SecCheckTrustedTier + } } return m.TokenTier() } -// SecCheckRole is the agent role whose ISSUES_AND_PRS token additionally -// carries Dependabot alerts read (#17426). Like the reviewer refinement it +// SecCheckRole is the agent role whose token at ISSUES_AND_PRS and above +// additionally carries Dependabot alerts read (#17426, #17496). Like the reviewer refinement it // is a role, not a rung on the mode ladder: a sec-check agent mints the // SecCheckTier (the contributor set plus vulnerability_alerts:read) so that -// no other contributor-tier agent's token is widened by the grant. +// no other contributor-tier agent's token is widened by the grant. At +// ISSUES_PRS_MERGE it mints SecCheckTrustedTier, the trusted set plus the +// same grant. const SecCheckRole = "sec-check" // SecCheckTier is the scoped-token tier TokenTierForRole yields for an // ISSUES_AND_PRS agent with SecCheckRole. const SecCheckTier = "sec-check" +// SecCheckTrustedTier is the scoped-token tier TokenTierForRole yields for an +// ISSUES_PRS_MERGE agent with SecCheckRole (#17496). +const SecCheckTrustedTier = "sec-check-trusted" + // CanComment reports whether an agent at this mode may post a comment on an // issue. It sits at the ISSUES_ONLY rung: the newcomer token tier is the first // with Issues:write, and ADVISORY (advisor, and the reviewer refinement whose @@ -152,7 +163,8 @@ func (m AgentMode) CanComment() bool { return m >= ModeIssuesOnly } // ModeForTokenTier is the inverse of TokenTier / TokenTierForRole: the mode a // scoped-token tier corresponds to. The reviewer tier maps to ADVISORY and the -// sec-check tier to ISSUES_AND_PRS (both are role refinements of their mode, +// sec-check tier to ISSUES_AND_PRS and the sec-check-trusted tier to +// ISSUES_PRS_MERGE (all are role refinements of their mode, // see TokenTierForRole); "merger" is the // contribute queue's name for the tier above trusted and shares its mode. An // unknown tier reports ADVISORY and false, so a caller that gates a write on @@ -165,7 +177,7 @@ func ModeForTokenTier(tier string) (AgentMode, bool) { return ModeIssuesOnly, true case "contributor", SecCheckTier: return ModeIssuesAndPRs, true - case "trusted", "merger": + case "trusted", "merger", SecCheckTrustedTier: return ModeIssuesPRsMerge, true default: return ModeAdvisory, false diff --git a/src/crux/agentmode/claim_comment_test.go b/src/crux/agentmode/claim_comment_test.go index 189763633c..f0916728de 100644 --- a/src/crux/agentmode/claim_comment_test.go +++ b/src/crux/agentmode/claim_comment_test.go @@ -50,6 +50,9 @@ func TestModeForTokenTier_InvertsTokenTier(t *testing.T) { if got, ok := ModeForTokenTier("merger"); !ok || got != ModeIssuesPRsMerge { t.Errorf("merger tier = %v,%v; want ISSUES_PRS_MERGE", got, ok) } + if got, ok := ModeForTokenTier(SecCheckTrustedTier); !ok || got != ModeIssuesPRsMerge { + t.Errorf("sec-check-trusted tier = %v,%v; want ISSUES_PRS_MERGE", got, ok) + } if got, ok := ModeForTokenTier("revoked"); ok || got != ModeAdvisory || got.CanComment() { t.Errorf("unknown tier = %v,%v; must fail closed to ADVISORY", got, ok) } diff --git a/src/crux/agentmode/reviewer_tier_test.go b/src/crux/agentmode/reviewer_tier_test.go index 37ae515560..2f449f412d 100644 --- a/src/crux/agentmode/reviewer_tier_test.go +++ b/src/crux/agentmode/reviewer_tier_test.go @@ -66,7 +66,8 @@ func TestTokenTierForRole_ReviewerGainsNoModeCapability(t *testing.T) { // The sec-check role refines ISSUES_AND_PRS into a tier whose App token adds // Dependabot alerts read (#17426). It is scoped to that one role and mode: // every other contributor-tier agent, and a sec-check agent at any other mode, -// keeps the plain mode tier. +// keeps the plain mode tier — except ISSUES_PRS_MERGE, which mints the +// sec-check-trusted tier (#17496). func TestTokenTierForRole_SecCheckGetsAlertsCapableTier(t *testing.T) { if got := TokenTierForRole(ModeIssuesAndPRs, SecCheckRole); got != SecCheckTier { t.Errorf("ISSUES_AND_PRS sec-check minted %q, want %q", got, SecCheckTier) @@ -82,12 +83,22 @@ func TestTokenTierForRole_SecCheckGetsAlertsCapableTier(t *testing.T) { }{ {ModeAdvisory, "advisor"}, {ModeIssuesOnly, "newcomer"}, - {ModeIssuesPRsMerge, "trusted"}, } { if got := TokenTierForRole(tc.mode, SecCheckRole); got != tc.want { t.Errorf("%v sec-check minted %q, want %q", tc.mode, got, tc.want) } } + if got := TokenTierForRole(ModeIssuesPRsMerge, SecCheckRole); got != SecCheckTrustedTier { + t.Errorf("ISSUES_PRS_MERGE sec-check minted %q, want %q", got, SecCheckTrustedTier) + } + for _, role := range []string{"", "scanner", ReviewerRole} { + if got := TokenTierForRole(ModeIssuesPRsMerge, role); got != "trusted" { + t.Errorf("ISSUES_PRS_MERGE %q minted %q, want trusted — only the sec-check role is refined", role, got) + } + } + if mode, ok := ModeForTokenTier(SecCheckTrustedTier); !ok || mode != ModeIssuesPRsMerge { + t.Errorf("ModeForTokenTier(%q) = %v, %v; want ISSUES_PRS_MERGE, true", SecCheckTrustedTier, mode, ok) + } if mode, ok := ModeForTokenTier(SecCheckTier); !ok || mode != ModeIssuesAndPRs { t.Errorf("ModeForTokenTier(%q) = %v, %v; want ISSUES_AND_PRS, true", SecCheckTier, mode, ok) } diff --git a/src/docs/github-app-setup.md b/src/docs/github-app-setup.md index 74b3f3f053..5689a23d75 100644 --- a/src/docs/github-app-setup.md +++ b/src/docs/github-app-setup.md @@ -93,7 +93,7 @@ Repository permissions used by the dashboard setup UI are: | Actions | Read and write (Read-only with `governor.ci.auto_approve_workflows: false`) | Inspect workflow runs; the default-on approval sweep approves gated `pull_request` runs for trusted bots, the App and dashboard-admitted heads with the App token ([#16603](https://github.com/hivecommons/hive/issues/16603)). If the sweep is off or refused and GitHub holds trusted Dependabot/App/clanker runs in `action_required`, Hive posts `/ok-to-test`; the repository-local `hive-ok-to-test` workflow uses its own `GITHUB_TOKEN` with Actions write to approve those runs. With Read and write, the contributor lane also approves held runs directly for a PR author the contributor registry admitted at a `require_tiers` tier (`auto_merge.contributor_lane.approve_held_runs_for_registry_trusted`). Optional: without it the hive marks such a PR `hive:unauthorized` and waits for a maintainer to click **Approve and run** ([#14589](https://github.com/hivecommons/hive/issues/14589)). | | Administration | Read-only | Read branch-protection rules before the merge-request watcher lands a PR; Hive refuses closed if it cannot verify the base branch is protected. | | Commit statuses | Read/write | Needed when `governor.labels.automerge` is the default `lgtm` on a repository running Prow's commit-bound `lgtm` (prow-github-actions v3): the queue action sets a `prow/lgtm` success status on the approved head so Prow does not strip the label. Without the write grant the label and approval still land, but every queue action takes the failure branch and posts a PR comment saying the status could not be set. Choose a distinct label such as `hive/auto-merge` if you would rather keep this at Read. | -| Dependabot alerts | Read-only | Required for the sec-check agent's Dependabot scanning (`gh api repos///dependabot/alerts`, [#17426](https://github.com/hivecommons/hive/issues/17426)). Least privilege: only the token minted for an ISSUES_AND_PRS agent with role `sec-check` requests `vulnerability_alerts: read`; every other agent's token is unchanged, even though the App itself must declare the permission. Existing installations must re-accept the updated permission once under Settings → Integrations → the app → Review request. Optional: without it the sec-check mint retries without the grant, the Dependabot call returns 403, and the hive still mints tokens. | +| Dependabot alerts | Read-only | Required for the sec-check agent's Dependabot scanning (`gh api repos///dependabot/alerts`, [#17426](https://github.com/hivecommons/hive/issues/17426)). Least privilege: only the token minted for an agent with role `sec-check` at ISSUES_AND_PRS or ISSUES_PRS_MERGE ([#17496](https://github.com/hivecommons/hive/issues/17496)) requests `vulnerability_alerts: read`; every other agent's token is unchanged, even though the App itself must declare the permission. Existing installations must re-accept the updated permission once under Settings → Integrations → the app → Review request. Optional: without it the sec-check mint retries without the grant, the Dependabot call returns 403, and the hive still mints tokens. | | Workflows | Read/write | Let trusted-tier agents push branches that modify `.github/workflows/`, and let the contributor lane merge an owner-approved PR that edits `.github/workflows/**` (`auto_merge.contributor_lane.owner_approval_releases_workflow_fence`, [#14664](https://github.com/hivecommons/hive/issues/14664)); without the grant such a merge is refused and the hive marks the PR `hive:unauthorized` (`merge-workflow-path`) and parks it at 090 for a maintainer's **Merge** click. Without it GitHub also rejects any GitHub App-token push touching those files server-side ("refusing to allow a GitHub App to create or update workflow … without workflows permission") no matter what the token requests. Maintainer user credentials are separate and can still push workflow-file changes when their account has the normal repository rights; the Hive App cannot until this grant is added **and re-accepted on each installation** (an existing install must approve the new permission under Settings → Integrations → the app → Review request). See [`hive-open-pr`](hive-open-pr.md#workflow-file-pushes-rejected-by-app-tokens) for the agent delivery procedure and [#6985](https://github.com/hivecommons/hive/issues/6985) for the outstanding permission change. | Organization permission: diff --git a/src/pkg/github/app.go b/src/pkg/github/app.go index 1b649d45a0..f68664c810 100644 --- a/src/pkg/github/app.go +++ b/src/pkg/github/app.go @@ -349,7 +349,7 @@ func (a *AppAuth) ScopedTokenForRepos(ctx context.Context, tier string, repos [] Metadata: gh.Ptr("read"), VulnerabilityAlerts: gh.Ptr("read"), } - case "trusted", "merger": + case "trusted", "merger", agentmode.SecCheckTrustedTier: perms = &gh.InstallationPermissions{ Issues: gh.Ptr("write"), Contents: gh.Ptr("write"), @@ -367,6 +367,12 @@ func (a *AppAuth) ScopedTokenForRepos(ctx context.Context, tier string, repos [] // breaking every trusted-tier mint. Workflows: gh.Ptr("write"), } + if tier == agentmode.SecCheckTrustedTier { + // The sec-check role refinement of trusted (#17496): adds + // Dependabot alerts read, optional like Workflows (the mint + // below retries without it). + perms.VulnerabilityAlerts = gh.Ptr("read") + } case "reviewer": // The reviewer tier is the advisor tier under a distinct name: the // role plumbing (agentmode.TokenTierForRole) stays, the permission @@ -436,18 +442,40 @@ func (a *AppAuth) ScopedTokenForRepos(ctx context.Context, tier string, repos [] if len(repos) > 0 { opts.Repositories = repos } - mintCtx, cancel := mintContext(ctx) - defer cancel() jwtClient := newJWTClient(jwtToken, a.apiURL) - installToken, _, err := jwtClient.Apps.CreateInstallationToken(mintCtx, installationID, opts) - if isPermissionNotGrantedMintError(err) && perms.VulnerabilityAlerts != nil && perms.Workflows == nil { + mint := func() (*gh.InstallationToken, error) { + mintCtx, cancel := mintContext(ctx) + defer cancel() + tok, _, err := jwtClient.Apps.CreateInstallationToken(mintCtx, installationID, opts) + return tok, err + } + warnAlertsDropped := func(err error) { a.logger.Warn("scoped token mint with vulnerability_alerts:read failed; retrying without it — "+ "the sec-check Dependabot alerts call will 403 until the App grants Dependabot alerts read-only and the installation re-accepts it; see docs/github-app-setup.md", "tier", tier, "error", err) + } + installToken, err := mint() + if isPermissionNotGrantedMintError(err) && perms.VulnerabilityAlerts != nil { + // GitHub does not say which requested permission the installation + // has not accepted. Drop the alerts grant first (the newest one, + // #17426) and retry. perms.VulnerabilityAlerts = nil - alertsCtx, alertsCancel := mintContext(ctx) - defer alertsCancel() - installToken, _, err = jwtClient.Apps.CreateInstallationToken(alertsCtx, installationID, opts) + if perms.Workflows == nil { + warnAlertsDropped(err) + } + refusedErr := err + installToken, err = mint() + switch { + case err == nil && perms.Workflows != nil: + warnAlertsDropped(refusedErr) + case isPermissionNotGrantedMintError(err) && perms.Workflows != nil: + // Still refused without alerts, so Workflows is (at least) what + // the installation lacks. Restore the alerts grant so the + // Workflows retry below keeps Dependabot alerts read on an + // installation that accepted it but not Workflows (#17496); + // if that retry is refused too, both are dropped. + perms.VulnerabilityAlerts = gh.Ptr("read") + } } if err != nil && perms.Workflows != nil { // The installation has likely not accepted the Workflows permission @@ -460,9 +488,13 @@ func (a *AppAuth) ScopedTokenForRepos(ctx context.Context, tier string, repos [] "(App settings → Permissions → Workflows → Read and write, then re-accept on the installation; see docs/github-app-setup.md)", "tier", tier, "error", err) perms.Workflows = nil - retryCtx, retryCancel := mintContext(ctx) - defer retryCancel() - installToken, _, err = jwtClient.Apps.CreateInstallationToken(retryCtx, installationID, opts) + installToken, err = mint() + if isPermissionNotGrantedMintError(err) && perms.VulnerabilityAlerts != nil { + // Neither optional grant is accepted: mint the bare trusted set. + warnAlertsDropped(err) + perms.VulnerabilityAlerts = nil + installToken, err = mint() + } } if err != nil { return "", fmt.Errorf("creating scoped token for tier %s: %w", tier, err) diff --git a/src/pkg/github/workflows_permission_test.go b/src/pkg/github/workflows_permission_test.go index 4baa33e6a5..f5b3fdb1e7 100644 --- a/src/pkg/github/workflows_permission_test.go +++ b/src/pkg/github/workflows_permission_test.go @@ -169,6 +169,15 @@ func TestScopedToken_OnlySecCheckTierRequestsVulnerabilityAlerts(t *testing.T) { if _, err := auth.ScopedToken(context.Background(), agentmode.SecCheckTier); err != nil { t.Fatalf("ScopedToken(sec-check): %v", err) } + if _, err := auth.ScopedToken(context.Background(), agentmode.SecCheckTrustedTier); err != nil { + t.Fatalf("ScopedToken(sec-check-trusted): %v", err) + } + if gotPerms["vulnerability_alerts"] != "read" { + t.Errorf("sec-check-trusted tier vulnerability_alerts = %q, want read", gotPerms["vulnerability_alerts"]) + } + if _, err := auth.ScopedToken(context.Background(), agentmode.SecCheckTier); err != nil { + t.Fatalf("ScopedToken(sec-check): %v", err) + } if gotPerms["vulnerability_alerts"] != "read" { t.Errorf("sec-check tier vulnerability_alerts = %q, want read", gotPerms["vulnerability_alerts"]) } @@ -179,6 +188,143 @@ func TestScopedToken_OnlySecCheckTierRequestsVulnerabilityAlerts(t *testing.T) { } } +// The sec-check-trusted tier (#17496) is the trusted set plus Dependabot +// alerts read, and degrades to a token without only the alerts grant (keeping +// Workflows) when the installation has accepted Workflows but not alerts. +func TestScopedToken_SecCheckTrustedTierAlertsWithFallback(t *testing.T) { + var requests []map[string]string + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + perms := decodePermissions(t, r) + requests = append(requests, perms) + if perms["vulnerability_alerts"] != "" { + w.WriteHeader(http.StatusUnprocessableEntity) + json.NewEncoder(w).Encode(map[string]any{"message": "The permissions requested are not granted to this installation."}) + return + } + json.NewEncoder(w).Encode(map[string]any{ + "token": "scoped-token-trusted", + "expires_at": time.Now().Add(time.Hour).Format(time.RFC3339), + }) + }) + server := httptest.NewServer(mux) + defer server.Close() + + auth := newWorkflowsTestAuth(t, server.URL) + if _, err := auth.ScopedToken(context.Background(), agentmode.SecCheckTrustedTier); err != nil { + t.Fatalf("ScopedToken: %v", err) + } + if len(requests) != 2 { + t.Fatalf("mint requests = %d, want 2", len(requests)) + } + first := requests[0] + if first["vulnerability_alerts"] != "read" { + t.Errorf("first mint vulnerability_alerts = %q, want read", first["vulnerability_alerts"]) + } + for perm, want := range map[string]string{"contents": "write", "issues": "write", "pull_requests": "write", "checks": "read", "workflows": "write"} { + if first[perm] != want { + t.Errorf("first mint %s = %q, want %q (trusted set plus alerts read)", perm, first[perm], want) + } + } + if _, present := requests[1]["vulnerability_alerts"]; present { + t.Errorf("retry still requests vulnerability_alerts: %v", requests[1]) + } + if requests[1]["workflows"] != "write" { + t.Errorf("retry workflows = %q, want write (only the alerts grant is dropped)", requests[1]["workflows"]) + } +} + +// An installation that accepted Dependabot alerts but not Workflows (#4677, +// #17496): GitHub's 422 does not name the refused permission, so the broker +// must not conclude the alerts grant is missing. The final token keeps +// vulnerability_alerts:read and drops only workflows. +func TestScopedToken_SecCheckTrustedTierKeepsAlertsWhenWorkflowsRefused(t *testing.T) { + var requests []map[string]string + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + perms := decodePermissions(t, r) + requests = append(requests, perms) + if perms["workflows"] != "" { + w.WriteHeader(http.StatusUnprocessableEntity) + json.NewEncoder(w).Encode(map[string]any{"message": "The permissions requested are not granted to this installation."}) + return + } + json.NewEncoder(w).Encode(map[string]any{ + "token": "scoped-token-alerts", + "expires_at": time.Now().Add(time.Hour).Format(time.RFC3339), + }) + }) + server := httptest.NewServer(mux) + defer server.Close() + + auth := newWorkflowsTestAuth(t, server.URL) + token, err := auth.ScopedToken(context.Background(), agentmode.SecCheckTrustedTier) + if err != nil { + t.Fatalf("ScopedToken: %v", err) + } + if token != "scoped-token-alerts" { + t.Fatalf("token = %q, want the alerts-capable mint's token", token) + } + if len(requests) != 3 { + t.Fatalf("mint requests = %d, want 3 (with both, without alerts, without workflows)", len(requests)) + } + last := requests[len(requests)-1] + if last["vulnerability_alerts"] != "read" { + t.Errorf("final mint vulnerability_alerts = %q, want read (the grant is accepted; only workflows was refused)", last["vulnerability_alerts"]) + } + if _, present := last["workflows"]; present { + t.Errorf("final mint still requests workflows: %v", last) + } + for _, perm := range []string{"contents", "issues", "pull_requests"} { + if last[perm] != "write" { + t.Errorf("final mint %s = %q, want write", perm, last[perm]) + } + } +} + +// An installation that accepted neither Workflows nor Dependabot alerts still +// mints the bare trusted set for the sec-check-trusted tier. +func TestScopedToken_SecCheckTrustedTierDropsBothWhenNeitherGranted(t *testing.T) { + var requests []map[string]string + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + perms := decodePermissions(t, r) + requests = append(requests, perms) + if perms["workflows"] != "" || perms["vulnerability_alerts"] != "" { + w.WriteHeader(http.StatusUnprocessableEntity) + json.NewEncoder(w).Encode(map[string]any{"message": "The permissions requested are not granted to this installation."}) + return + } + json.NewEncoder(w).Encode(map[string]any{ + "token": "scoped-token-bare", + "expires_at": time.Now().Add(time.Hour).Format(time.RFC3339), + }) + }) + server := httptest.NewServer(mux) + defer server.Close() + + auth := newWorkflowsTestAuth(t, server.URL) + token, err := auth.ScopedToken(context.Background(), agentmode.SecCheckTrustedTier) + if err != nil { + t.Fatalf("ScopedToken: %v", err) + } + if token != "scoped-token-bare" { + t.Fatalf("token = %q, want the bare trusted mint's token", token) + } + if len(requests) != 4 { + t.Fatalf("mint requests = %d, want 4", len(requests)) + } + last := requests[len(requests)-1] + for _, perm := range []string{"workflows", "vulnerability_alerts"} { + if _, present := last[perm]; present { + t.Errorf("final mint still requests %s: %v", perm, last) + } + } + if last["contents"] != "write" { + t.Errorf("final mint contents = %q, want write", last["contents"]) + } +} + // The sec-check tier requests Dependabot alerts read and degrades to a token // without it when the installation has not accepted the permission. func TestScopedToken_SecCheckVulnerabilityAlertsWithFallback(t *testing.T) { diff --git a/src/pkg/mint/agent.go b/src/pkg/mint/agent.go index 7021224a94..5e854e8051 100644 --- a/src/pkg/mint/agent.go +++ b/src/pkg/mint/agent.go @@ -49,6 +49,9 @@ var tierScopes = map[string][]string{ // the GitHub App token. "sec-check": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite}, "trusted": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite, ScopeMerge}, + // The sec-check role refinement of trusted (agentmode.SecCheckTrustedTier): + // same hive-side scopes as trusted. + "sec-check-trusted": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite, ScopeMerge}, } // ScopesForTier returns the scope set for a trust tier. An unrecognized tier diff --git a/src/pkg/mint/agent_test.go b/src/pkg/mint/agent_test.go index ef3d233962..f80723fe28 100644 --- a/src/pkg/mint/agent_test.go +++ b/src/pkg/mint/agent_test.go @@ -21,10 +21,11 @@ func testMinter(t *testing.T) *Minter { func TestScopesForTier(t *testing.T) { cases := map[string][]string{ - "advisor": {ScopeIssuesRead}, - "newcomer": {ScopeIssuesRead, ScopeIssuesWrite}, - "contributor": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite}, - "trusted": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite, ScopeMerge}, + "advisor": {ScopeIssuesRead}, + "newcomer": {ScopeIssuesRead, ScopeIssuesWrite}, + "contributor": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite}, + "trusted": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite, ScopeMerge}, + "sec-check-trusted": {ScopeIssuesRead, ScopeIssuesWrite, ScopeContentsWrite, ScopePullsWrite, ScopeMerge}, } for tier, want := range cases { got := ScopesForTier(tier) From adae396ac49c9c60781f789e5d2cd2d53206bd5e Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Tue, 10 Nov 2026 03:05:00 +0000 Subject: [PATCH 092/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.7 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 10 ++++++++++ changelog.d/fixed-17463-mutation-diff-only.md | 1 - .../fixed-17475-prow-approve-rejection-surfaced.md | 1 - changelog.d/fixed-17476-tide-ci-chevron.md | 1 - changelog.d/fixed-ci-tally-excludes-tide.md | 1 - .../fixed-shared-ci-deferral-wording-and-autolift.md | 1 - 6 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/fixed-17463-mutation-diff-only.md delete mode 100644 changelog.d/fixed-17475-prow-approve-rejection-surfaced.md delete mode 100644 changelog.d/fixed-17476-tide-ci-chevron.md delete mode 100644 changelog.d/fixed-ci-tally-excludes-tide.md delete mode 100644 changelog.d/fixed-shared-ci-deferral-wording-and-autolift.md diff --git a/CHANGELOG.md b/CHANGELOG.md index da06ec3369..152a9b0b49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,16 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-10 (v5.211.7) + +### Fixed + +- CI: the advisory `mutation` check now mutates only the lines a PR adds (`gremlins --diff`, run from inside each changed package so paths match) instead of every file under the changed package, so PRs touching large packages such as `pkg/dashboard` or `pkg/github` no longer hit the 20-minute job limit and show a red check that never judged the change. ([#17463](https://github.com/hivecommons/hive/issues/17463)) +- Dashboard: an Approve on a Prow repo now reads Prow's reply to the relayed `/lgtm` + `/approve` and says Prow rejected them instead of showing "approved" (#17475, part of #17451). +- Dashboard: when a required check on a Prow repository has never reported (or is only a pending commit status), the stage tracker's CI chevron now quotes Tide's status description in its tooltip ("Not mergeable. Jobs … have not succeeded.") and links to Tide's page when the check has no link of its own, so a presubmit that never ran no longer looks like a failing check. Tide stays out of the pass/fail tally. ([#17476](https://github.com/hivecommons/hive/issues/17476)) +- Activity Monitor: the CI chevron no longer counts Prow's `tide` merge-gate status (or `enforce-guardrails` / DCO) as a check, so a PR whose tests are all green reads `CI 18/18` instead of `CI 18/19 · 'tide' running` and the lit stage moves on to Review / Merge queue; merge eligibility still enforces the gates. +- Activity Monitor: a PR deferred to a fleet-wide `[shared-ci]` incident now reads *Waiting on shared CI · #N* with the incident linked and a tooltip that names the failing check and promises the lift, instead of *Deferred · by scanner*; a plain deferral's tooltip leads with the agent's reason. The shared-CI rerun sweep now treats a newest run that concluded `cancelled` (a job cut off by `timeout-minutes`) as red, re-runs it once when the incident closes and comments *Shared-CI incident #N closed — re-running ``* (``), so a PR like hive#17471 no longer sits deferred after the incident is over (#17500). + ## 2026-11-10 (v5.211.6) ### Fixed diff --git a/changelog.d/fixed-17463-mutation-diff-only.md b/changelog.d/fixed-17463-mutation-diff-only.md deleted file mode 100644 index a2f956608c..0000000000 --- a/changelog.d/fixed-17463-mutation-diff-only.md +++ /dev/null @@ -1 +0,0 @@ -- CI: the advisory `mutation` check now mutates only the lines a PR adds (`gremlins --diff`, run from inside each changed package so paths match) instead of every file under the changed package, so PRs touching large packages such as `pkg/dashboard` or `pkg/github` no longer hit the 20-minute job limit and show a red check that never judged the change. ([#17463](https://github.com/hivecommons/hive/issues/17463)) diff --git a/changelog.d/fixed-17475-prow-approve-rejection-surfaced.md b/changelog.d/fixed-17475-prow-approve-rejection-surfaced.md deleted file mode 100644 index 6b06dc8cd2..0000000000 --- a/changelog.d/fixed-17475-prow-approve-rejection-surfaced.md +++ /dev/null @@ -1 +0,0 @@ -- Dashboard: an Approve on a Prow repo now reads Prow's reply to the relayed `/lgtm` + `/approve` and says Prow rejected them instead of showing "approved" (#17475, part of #17451). diff --git a/changelog.d/fixed-17476-tide-ci-chevron.md b/changelog.d/fixed-17476-tide-ci-chevron.md deleted file mode 100644 index 15a0c17f41..0000000000 --- a/changelog.d/fixed-17476-tide-ci-chevron.md +++ /dev/null @@ -1 +0,0 @@ -- Dashboard: when a required check on a Prow repository has never reported (or is only a pending commit status), the stage tracker's CI chevron now quotes Tide's status description in its tooltip ("Not mergeable. Jobs … have not succeeded.") and links to Tide's page when the check has no link of its own, so a presubmit that never ran no longer looks like a failing check. Tide stays out of the pass/fail tally. ([#17476](https://github.com/hivecommons/hive/issues/17476)) diff --git a/changelog.d/fixed-ci-tally-excludes-tide.md b/changelog.d/fixed-ci-tally-excludes-tide.md deleted file mode 100644 index 0d88c1ec29..0000000000 --- a/changelog.d/fixed-ci-tally-excludes-tide.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: the CI chevron no longer counts Prow's `tide` merge-gate status (or `enforce-guardrails` / DCO) as a check, so a PR whose tests are all green reads `CI 18/18` instead of `CI 18/19 · 'tide' running` and the lit stage moves on to Review / Merge queue; merge eligibility still enforces the gates. diff --git a/changelog.d/fixed-shared-ci-deferral-wording-and-autolift.md b/changelog.d/fixed-shared-ci-deferral-wording-and-autolift.md deleted file mode 100644 index f46683fef6..0000000000 --- a/changelog.d/fixed-shared-ci-deferral-wording-and-autolift.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: a PR deferred to a fleet-wide `[shared-ci]` incident now reads *Waiting on shared CI · #N* with the incident linked and a tooltip that names the failing check and promises the lift, instead of *Deferred · by scanner*; a plain deferral's tooltip leads with the agent's reason. The shared-CI rerun sweep now treats a newest run that concluded `cancelled` (a job cut off by `timeout-minutes`) as red, re-runs it once when the incident closes and comments *Shared-CI incident #N closed — re-running ``* (``), so a PR like hive#17471 no longer sits deferred after the incident is over (#17500). From 1af27befb49ead46f815da2b06aca8504b793fc8 Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Tue, 10 Nov 2026 03:34:57 +0000 Subject: [PATCH 093/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.8 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 7 +++++++ .../fixed-17496-sec-check-tier-above-issues-and-prs.md | 1 - changelog.d/fixed-etc-hive-config-not-persisted.md | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/fixed-17496-sec-check-tier-above-issues-and-prs.md delete mode 100644 changelog.d/fixed-etc-hive-config-not-persisted.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 152a9b0b49..7a939275e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-10 (v5.211.8) + +### Fixed + +- Security: a `sec-check` agent configured at `ISSUES_PRS_MERGE` (or `autonomous`) now mints a new `sec-check-trusted` token tier — the trusted set plus Dependabot alerts read — so `dependabot/alerts` no longer returns 403; the grant stays optional and role-scoped. ([#17496](https://github.com/hivecommons/hive/issues/17496)) +- Edits to `/etc/hive/hive.yaml` on hub-provisioned spokes provisioned (or re-applied) after this change now survive a pod restart: the config path is a link to the persisted `/data/hive.yaml.runtime` instead of a throwaway `emptyDir` copy; existing spokes need their deployment re-applied (hub upgrades do not rewrite the init command). Startup logs which file is the boot source of truth, and `/api/config/export` reports it as `metadata.persisted_path`. + ## 2026-11-10 (v5.211.7) ### Fixed diff --git a/changelog.d/fixed-17496-sec-check-tier-above-issues-and-prs.md b/changelog.d/fixed-17496-sec-check-tier-above-issues-and-prs.md deleted file mode 100644 index 342df5cfa9..0000000000 --- a/changelog.d/fixed-17496-sec-check-tier-above-issues-and-prs.md +++ /dev/null @@ -1 +0,0 @@ -- Security: a `sec-check` agent configured at `ISSUES_PRS_MERGE` (or `autonomous`) now mints a new `sec-check-trusted` token tier — the trusted set plus Dependabot alerts read — so `dependabot/alerts` no longer returns 403; the grant stays optional and role-scoped. ([#17496](https://github.com/hivecommons/hive/issues/17496)) diff --git a/changelog.d/fixed-etc-hive-config-not-persisted.md b/changelog.d/fixed-etc-hive-config-not-persisted.md deleted file mode 100644 index c2ce33fbfa..0000000000 --- a/changelog.d/fixed-etc-hive-config-not-persisted.md +++ /dev/null @@ -1 +0,0 @@ -- Edits to `/etc/hive/hive.yaml` on hub-provisioned spokes provisioned (or re-applied) after this change now survive a pod restart: the config path is a link to the persisted `/data/hive.yaml.runtime` instead of a throwaway `emptyDir` copy; existing spokes need their deployment re-applied (hub upgrades do not rewrite the init command). Startup logs which file is the boot source of truth, and `/api/config/export` reports it as `metadata.persisted_path`. From 0994434bc5005933d7439967ed726ff01331ca64 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 22:39:03 -0500 Subject: [PATCH 094/123] =?UTF-8?q?=F0=9F=90=9B=20fix(dashboard):=20CI=20c?= =?UTF-8?q?hevron=20no=20longer=20stays=20lit=20after=20every=20check=20ha?= =?UTF-8?q?s=20concluded=20(#17509)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A required check with no run on the head is a settled word, never inferred motion from a part-filled tally; at 060 reviewed with every reported check concluded, Review is the lit chevron and CI is its blocker only when red. A CI snapshot that still claims a check running or queued after dashboard.stage_tracker.ci_activity_stale_m (default 10) is re-listed from GitHub on the next tracker build, bypassing the batch cache, ETag and stage, coalesced per head. Fixes hivecommons/hive#17508 Signed-off-by: Andrew Anderson --- ...fixed-ci-chevron-stale-after-completion.md | 1 + .../dashboard-sections/activity-monitor.md | 1 + .../operator-reference/runtime-and-quota.md | 1 + src/pkg/config/config.go | 23 +++++ src/pkg/dashboard/stage_tracker_activity.go | 12 +++ .../dashboard/stage_tracker_activity_test.go | 95 +++++++++++++++++++ src/pkg/dashboard/stage_tracker_build.go | 21 ++++ .../stage_tracker_remediation_chevron.test.js | 10 +- .../stage_tracker_stale_ci_lead_test.go | 49 ++++++++++ .../static-src/js/tracker-row-strip.js | 9 +- src/pkg/dashboard/static/index.html | 9 +- src/pkg/github/ci_activity_stale.go | 81 ++++++++++++++++ src/pkg/github/webhook_ci_evidence.go | 3 + src/pkg/github/webhook_ci_evidence_test.go | 36 +++++++ 14 files changed, 348 insertions(+), 3 deletions(-) create mode 100644 changelog.d/fixed-ci-chevron-stale-after-completion.md create mode 100644 src/pkg/dashboard/stage_tracker_stale_ci_lead_test.go create mode 100644 src/pkg/github/ci_activity_stale.go diff --git a/changelog.d/fixed-ci-chevron-stale-after-completion.md b/changelog.d/fixed-ci-chevron-stale-after-completion.md new file mode 100644 index 0000000000..2b38634152 --- /dev/null +++ b/changelog.d/fixed-ci-chevron-stale-after-completion.md @@ -0,0 +1 @@ +- Dashboard: the Activity Monitor's CI chevron no longer stays lit as running after every check on the head has concluded. A required check that never produced a run is a settled word (*hasn't reported*), never inferred motion from a part-filled tally; at `060 reviewed` with all reported checks concluded, Review is the lit chevron and CI is its blocker only when red. A CI snapshot that still claims a check running or queued after `dashboard.stage_tracker.ci_activity_stale_m` (default 10 minutes) is re-listed from GitHub on the next tracker build regardless of the batch cache, ETag or stage. ([#17508](https://github.com/hivecommons/hive/issues/17508)) diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 210528fb84..e01feef7a1 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -454,6 +454,7 @@ An *active* chevron is filled amber and carries words; an inactive one is its ic 1. **Exactly one lit stage per row.** One chevron is active — the column where the item is or where it is stuck; later stages are shown dim, with a muted queued note when they are next ([#17335](https://github.com/hivecommons/hive/issues/17335): a push during review lit *CI 7/11 · 4 running* and *Review 5/5 · adjudicating* amber together). 2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). The CI count, its pending names and its motion cover tests only: Prow's `tide` merge-gate status (pending on every PR until it carries lgtm/approved and all presubmits are green), `enforce-guardrails` and the DCO sign-off context (`dco` / `DCO`) are merge gates, not checks, so a PR whose only pending context is `tide` reads *CI 18/18* and lights Review or the Merge queue — never *CI 18/19 · 'tide' running* (`github.IsMergeGateContext`; merge eligibility still enforces the gates). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current — filled but still, icon only, its words in the tooltip — and nothing else is active. Settled-current is always the neutral fill: the Open column's draft, blocked, New and stale tints and the held-gate amber never repaint it, so the running track is the row's only coloured chevron ([#17461](https://github.com/hivecommons/hive/issues/17461): a draft PR with no stage yet read as a slate Open beside amber CI). + A CI word is motion only when GitHub reports it: a check run whose status is not `completed`, or a non-merge-gate commit status still `pending`. A required check with no run on the head is settled (*hasn't reported*), never *running*, however many of its neighbours are green; at `060 reviewed` with every reported check concluded, **Review** is the lit chevron and CI is its blocker only when red. A CI snapshot that still claims a check running or queued after `dashboard.stage_tracker.ci_activity_stale_m` (default 10 minutes) is re-listed from GitHub on the next tracker build regardless of the batch cache, ETag or stage, so a listing taken while checks were starting cannot stay lit for hours ([#17508](https://github.com/hivecommons/hive/issues/17508): *CI 2/3 · running* eight hours after every check had passed). 3. **CI leads Review.** When both tracks would light at once — CI running while the review is queued, in progress or being re-adjudicated — CI is the lit chevron and Review is dim with a small note (*re-review queued* after a push, *review in progress*, *review queued*); its words stay in the tooltip, ending *… behind CI*. The stage chevron is the fallback: active only when no track is in motion. 4. **The PR in progress chevron speaks the PR's lifecycle** — draft, pushed, rebasing, *Unassigned · next: scanner*, *Deferred · waiting on #N*, *Waiting for @author · fix owed* — never a CI or review verdict. *CI failing*, *CI 4/11 · 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail. 5. **A human gate is a pill, not a stage.** A PR parked at 085 for a person — a reviewer's question, a permission only a maintainer holds, a rerun to approve — with checks running, red or unreported, or its review verdict pending, is drawn at its real stage: CI (with motion while checks run) or Review is the one lit chevron, wearing an amber marker (`ham-human-gated`), and the ask is the **needs human decision** pill in the row's pill strip (human icon, the question in its hover, the decision popover on click); the lit track's tooltip ends *· needs a person: *. It never lights a *Needs human · decision* chevron in the PR in progress column while CI and Review spin dim ([#17453](https://github.com/hivecommons/hive/issues/17453): #17442 did, with CI 3/9 running; #17416 read *Needs human · review* the same way). Only a merge-ready, queued or merging 085 is a Merge queue matter. diff --git a/src/docs/operator-reference/runtime-and-quota.md b/src/docs/operator-reference/runtime-and-quota.md index 3c67b48d2b..dd3d67c23f 100644 --- a/src/docs/operator-reference/runtime-and-quota.md +++ b/src/docs/operator-reference/runtime-and-quota.md @@ -645,6 +645,7 @@ dashboard: webhook_refresh_replay_window_s: 1800 # re-apply re-reads to snapshots published meanwhile closed_sweep_interval_s: 300 # list items closed since the last look and evict rows still shown; -1 disables waiting_push_stale_h: 4 # hours without a push on a CI / Review row before the pill's age turns muted-amber + ci_activity_stale_m: 10 # minutes a CI snapshot may still claim a check running before the head's check runs are re-listed; -1 disables toast_info_s: 15 # how long the tracker's result / waiting-on-you toasts stay (3-120 s); the merge banner stays twice as long toast_error_s: 30 # how long a failed row action's toast stays (3-120 s); editable from the Activity Monitor's ⚙ → Toasts & timing merged_hold_s: 8 # ceiling on the "Merging · merge landed" bridge; celebration fires on the merged fact (min 3) diff --git a/src/pkg/config/config.go b/src/pkg/config/config.go index 894772dd14..96b71636ef 100644 --- a/src/pkg/config/config.go +++ b/src/pkg/config/config.go @@ -5211,6 +5211,12 @@ type DashboardStageTrackerConfig struct { // age takes the muted-stale tone (hivecommons/hive#15784). 0 means the // default (4); a negative value never marks the wait stale. WaitingPushStaleH int `yaml:"waiting_push_stale_h,omitempty" json:"waiting_push_stale_h,omitempty"` + // CIActivityStaleM is how many minutes a head's CI snapshot may claim a + // check still running or queued before the tracker re-lists the head's + // check runs on its next build, whatever the batch cache or ETag says + // (hivecommons/hive#17508). 0 means the default (10); a negative value + // disables the re-list. + CIActivityStaleM int `yaml:"ci_activity_stale_m,omitempty" json:"ci_activity_stale_m,omitempty"` // ToastInfoS is how many seconds the activity monitor's informational // toasts (action results, waiting-on-human nudges, the merge banner) // stay up before dismissing themselves (hivecommons/hive#15813). @@ -5356,6 +5362,23 @@ func (c *Config) StageTrackerWebhookRefreshDebounce() time.Duration { return defaultStageTrackerWebhookRefreshDebounce } +// defaultStageTrackerCIActivityStale is dashboard.stage_tracker.ci_activity_stale_m's default. +const defaultStageTrackerCIActivityStale = 10 * time.Minute + +// StageTrackerCIActivityStale is the effective +// dashboard.stage_tracker.ci_activity_stale_m as a duration: how old a CI +// snapshot that still claims a check running or queued may be before the +// tracker re-lists the head's check runs. 0 disables the re-list. +func (c *Config) StageTrackerCIActivityStale() time.Duration { + if c == nil || c.Dashboard.StageTracker.CIActivityStaleM == 0 { + return defaultStageTrackerCIActivityStale + } + if c.Dashboard.StageTracker.CIActivityStaleM < 0 { + return 0 + } + return time.Duration(c.Dashboard.StageTracker.CIActivityStaleM) * time.Minute +} + // StageTrackerCacheTTL is the effective dashboard.stage_tracker.cache_ttl_s: // the configured value, else the governor eval interval, else its default. func (c *Config) StageTrackerCacheTTL() time.Duration { diff --git a/src/pkg/dashboard/stage_tracker_activity.go b/src/pkg/dashboard/stage_tracker_activity.go index e392530d55..5bb980b41a 100644 --- a/src/pkg/dashboard/stage_tracker_activity.go +++ b/src/pkg/dashboard/stage_tracker_activity.go @@ -142,6 +142,9 @@ func stageTrackerCIActivity(pr github.PullRequest, now time.Time) *StageTrackerA // Required checks with no run at all, or only a pending commit status: // on a Prow repository, a presubmit that never ran or has not finished. presubmitWaiting := map[string]bool{} + // Required checks with no run on the head while commit statuses were + // not read: unknown rather than missing, with the no-run caption. + noRunUnread := map[string]bool{} for _, observation := range observations { name := observation.name check := github.PRActivityCheck{} @@ -154,8 +157,14 @@ func stageTrackerCIActivity(pr github.PullRequest, now time.Time) *StageTrackerA case len(observation.checks) > 1: state = "unknown" case !ok: + // No run of that name on the head. With commit statuses read it + // is missing; without them a status could still provide it, so + // the word stays unknown — but a settled unknown, never motion + // (hivecommons/hive#17508), with the no-run caption below. if a.StatusesKnown { state = "missing" + } else { + noRunUnread[name] = true } case check.State == "queued" || check.State == "waiting" || check.State == "pending" || check.State == "requested": state = "queued" @@ -304,6 +313,9 @@ func stageTrackerCIActivity(pr github.PullRequest, now time.Time) *StageTrackerA if statusesMissing { out.Caption = "CI unknown · commit statuses not observed for this head" out.Detail = "A required check is reported as a commit status rather than a check run, and hive has not yet fetched commit statuses for the PR's current commit." + } else if noRunUnread[out.Blocker] { + out.Caption = "CI waiting · required check " + check + " hasn't reported for this head yet" + out.Detail = "Branch protection requires a check named " + check + ", but no check run with that name exists for the PR's current commit, and hive has not yet read its commit statuses. Usually the workflow that produces it has not been triggered; a push, re-run, or label can start it." } else { out.Caption = "CI unknown · " + check + " reported but with no conclusion" out.Detail = "Required check " + check + " exists for the PR's current commit but hive cannot read a clear result from it (several runs share the name, or the run ended with no conclusion)." diff --git a/src/pkg/dashboard/stage_tracker_activity_test.go b/src/pkg/dashboard/stage_tracker_activity_test.go index 9e7b132347..201ba9d732 100644 --- a/src/pkg/dashboard/stage_tracker_activity_test.go +++ b/src/pkg/dashboard/stage_tracker_activity_test.go @@ -792,3 +792,98 @@ func TestStageTrackerActivityCIExcludesMergeGateContexts(t *testing.T) { } }) } + +// hivecommons/promptargs#467 at stage/060-reviewed: branch protection +// requires build-and-test (22), (24) and (26); only (24) and (26) exist on +// the head (both green, with DCO, FOSSA, mutation and friends), Tide is +// pending. The CI chevron read `CI 2/3 · running` for eight hours +// (hivecommons/hive#17508). A required name with no run on the head is a +// settled "missing", never motion, whether or not commit statuses were read; +// the tally counts what GitHub reports. +func TestStageTrackerCIActivityNeverReportedRequiredIsSettled(t *testing.T) { + observed := time.Date(2026, 11, 9, 18, 24, 40, 0, time.UTC) + now := observed.Add(8 * time.Hour) + actions := int64(15368) + done := func(name string) github.PRActivityCheck { + return github.PRActivityCheck{Name: name, State: "completed", Conclusion: "success", Head: "045b8e1", AppID: &actions, Since: &observed} + } + for _, statusesKnown := range []bool{true, false} { + pr := github.PullRequest{HeadSHA: "045b8e1", BaseRef: "main", CIActivity: &github.PRCIActivity{ + Head: "045b8e1", Source: "github-check-runs", ObservedAt: &observed, StatusesKnown: statusesKnown, + RequiredKnown: true, RequiredSource: "protection", + Required: []string{"build-and-test (22)", "build-and-test (24)", "build-and-test (26)"}, + RequiredChecks: []github.PRRequiredCheck{ + {Name: "build-and-test (22)", AppKnown: true, AppID: &actions}, + {Name: "build-and-test (24)", AppKnown: true, AppID: &actions}, + {Name: "build-and-test (26)", AppKnown: true, AppID: &actions}, + }, + Checks: []github.PRActivityCheck{ + done("build-and-test (24)"), done("build-and-test (26)"), done("DCO"), done("mutation"), done("verify"), done("FOSSA"), done("copilot-automation"), + {Name: "tide", State: "pending", Kind: "commit_status", Head: "045b8e1", Description: "Not mergeable. Needs lgtm, approved labels."}, + }, + }} + got := stageTrackerCIActivity(pr, now) + // Statuses read: missing. Not read: unknown (a status could still + // provide it) — either way settled, never active. + want := "missing" + if !statusesKnown { + want = "unknown" + } + if got.Active || got.State != want || got.Blocker != "build-and-test (22)" { + t.Fatalf("statusesKnown=%v: never-reported required check = %+v, want settled %s", statusesKnown, got, want) + } + if !strings.HasPrefix(got.Caption, "CI waiting · required check 'build-and-test (22)' hasn't reported") { + t.Fatalf("statusesKnown=%v: caption = %q", statusesKnown, got.Caption) + } + if got.ChecksTotal != 3 || got.ChecksPassed != 2 || got.ChecksFailed != 0 || len(got.ChecksPending) != 1 { + t.Fatalf("statusesKnown=%v: tally = %d/%d failed=%d pending=%v", statusesKnown, got.ChecksPassed, got.ChecksTotal, got.ChecksFailed, got.ChecksPending) + } + if strings.Contains(got.Caption, "running") || strings.Contains(got.Caption, "no conclusion") { + t.Fatalf("statusesKnown=%v: caption claims motion or ambiguity: %q", statusesKnown, got.Caption) + } + // Every check GitHub reports is concluded: nothing claims motion, + // so no stale re-list is owed however old the snapshot. + if github.CIActivityClaimsMotion(pr.CIActivity) || github.CIActivityStale(pr.CIActivity, now, 10*time.Minute) { + t.Fatalf("statusesKnown=%v: a concluded head claims motion", statusesKnown) + } + } +} + +// A snapshot that still says a check runs is re-listed once it is older +// than dashboard.stage_tracker.ci_activity_stale_m; a fresh one, a +// concluded one, or one whose only motion is Tide's pending status is not. +func TestStageTrackerRelistsStaleRunningCI(t *testing.T) { + now := time.Date(2026, 11, 10, 2, 50, 0, 0, time.UTC) + running := func(age time.Duration, checks ...github.PRActivityCheck) *github.PRCIActivity { + at := now.Add(-age) + return &github.PRCIActivity{Head: "head", Source: "github-check-runs", ObservedAt: &at, Checks: checks} + } + inProgress := github.PRActivityCheck{Name: "build-and-test (22)", State: "in_progress"} + green := github.PRActivityCheck{Name: "build-and-test (24)", State: "completed", Conclusion: "success"} + tide := github.PRActivityCheck{Name: "tide", State: "pending", Kind: "commit_status"} + for _, tc := range []struct { + name string + a *github.PRCIActivity + want bool + }{ + {"running for 17m", running(17*time.Minute, inProgress, green), true}, + {"queued for 17m", running(17*time.Minute, github.PRActivityCheck{Name: "lint", State: "queued"}), true}, + {"running for 3m", running(3*time.Minute, inProgress), false}, + {"all concluded for 8h", running(8*time.Hour, green), false}, + {"only tide pending for 8h", running(8*time.Hour, green, tide), false}, + {"no observation time", &github.PRCIActivity{Head: "head", Checks: []github.PRActivityCheck{inProgress}}, false}, + } { + if got := github.CIActivityStale(tc.a, now, 10*time.Minute); got != tc.want { + t.Errorf("%s: stale = %v, want %v", tc.name, got, tc.want) + } + } + if github.CIActivityStale(running(time.Hour, inProgress), now, 0) { + t.Errorf("a disabled guard (0) relisted") + } + + s := &Server{deps: &Dependencies{}} + pr := github.PullRequest{Repo: "hivecommons/promptargs", Number: 467, HeadSHA: "head", CIActivity: running(17*time.Minute, inProgress)} + if s.stageTrackerRelistStaleCI(pr, now) { + t.Fatalf("relisted with no GitHub client") + } +} diff --git a/src/pkg/dashboard/stage_tracker_build.go b/src/pkg/dashboard/stage_tracker_build.go index e56e7682ba..ddde26791b 100644 --- a/src/pkg/dashboard/stage_tracker_build.go +++ b/src/pkg/dashboard/stage_tracker_build.go @@ -467,6 +467,7 @@ func (s *Server) buildStageTracker(status *StatusPayload, store *stagelabels.Sto // a head the cycle never listed counts from the deliveries alone // (hivecommons/hive#16521). activityPR.CIActivity = github.HeadCIActivity(activityPR.Repo, pr.HeadSHA, pr.CIActivity) + s.stageTrackerRelistStaleCI(activityPR, now) it.CIActivity = stageTrackerCIActivity(activityPR, now) var bundle *evidence.Bundle if evidenceVerifier != nil && pr.HeadSHA != "" { @@ -1079,3 +1080,23 @@ func stageTrackerSinceUnblock(it *StageTrackerItem, rec stagelabels.Record, hasR t := rec.UnblockedAt it.StageSince = &t } + +// stageTrackerRelistStaleCI asks for one fresh check-run listing of a head +// whose CI snapshot still claims a check running or queued after +// dashboard.stage_tracker.ci_activity_stale_m (default 10). The cycle's +// listing can outlive the checks it describes — the GraphQL batch skips a +// clean repository, an ETag replays — and nothing else re-reads a head +// whose PR has not changed; promptargs#467 rendered `CI 2/3 · running` for +// eight hours after every check had passed (hivecommons/hive#17508). The +// listing is coalesced and budget-aware; it lands in the webhook CI +// evidence store for the next build. +func (s *Server) stageTrackerRelistStaleCI(pr github.PullRequest, now time.Time) bool { + if s == nil || s.deps == nil || s.deps.GHClient == nil || pr.HeadSHA == "" { + return false + } + maxAge := s.deps.Config.StageTrackerCIActivityStale() + if !github.CIActivityStale(pr.CIActivity, now, maxAge) { + return false + } + return s.deps.GHClient.RequestHeadCIRelist(pr.Repo, pr.Number, pr.HeadSHA, pr.BaseRef, maxAge) +} diff --git a/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js b/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js index 2d13499f23..392ef02d45 100644 --- a/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js +++ b/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js @@ -305,9 +305,17 @@ test('#16539 shape: a queued swarm reads 0/5 and, as the stage\'s own track, is // hivecommons/hive#16631: a CI ring that is not full is a running ring. // 13/19 with checks still pending is active with its count beside the // running Review; only a complete 19/19 ring is the silent green glyph. +// The backend says running/queued whenever a check is in motion; its own +// `unknown` beside a part-filled ring (a required name with no run, statuses +// unread) is settled, not inferred motion (hivecommons/hive#17508). test('#16628 shape: CI 13/19 with pending checks + review in progress → both tracks active with words', () => { const review = { head: 'abc1234def', state: 'reviewing', active: true, caption: 'Review 0/5 · in progress', perspectives_done: 0, perspectives_total: 5, source: 'dispatch', observed_at: seen }; - for (const state of ['running', 'unknown', 'queued']) { + const unknown = cells(redPR({ display_column: 50, stage: 50, + ci_activity: { head: 'abc1234def', state: 'unknown', caption: 'CI waiting', checks_passed: 13, checks_total: 19, source: 'checks', observed_at: seen }, + review_activity: review })); + assert.doesNotMatch(unknown[4], /class="ham-seg ham-activity-track active ham-current"/, 'unknown: a part-filled ring with no motion reported is not lit'); + assert.equal(litCount(unknown.join('')), 1, 'unknown: only Review is in motion'); + for (const state of ['running', 'queued']) { const c = cells(redPR({ display_column: 50, stage: 50, ci_activity: { head: 'abc1234def', state, caption: 'CI ' + state, checks_passed: 13, checks_total: 19, source: 'checks', observed_at: seen }, review_activity: review })); diff --git a/src/pkg/dashboard/stage_tracker_stale_ci_lead_test.go b/src/pkg/dashboard/stage_tracker_stale_ci_lead_test.go new file mode 100644 index 0000000000..6a8a07ff82 --- /dev/null +++ b/src/pkg/dashboard/stage_tracker_stale_ci_lead_test.go @@ -0,0 +1,49 @@ +package dashboard + +import ( + "os/exec" + "strings" + "testing" +) + +// hivecommons/promptargs#467 at stage/060-reviewed with every check on the +// head concluded (one required name never reported, Tide pending): the row +// lights Review, not CI, and a backend `unknown` word beside a 2/3 ring is +// not inferred motion (hivecommons/hive#17508). A red check at 060 still +// makes CI the blocker. +func TestStageTrackerReviewedRowWithConcludedChecksLightsReview(t *testing.T) { + node, err := exec.LookPath("node") + if err != nil { + t.Skip("node not available") + } + html := indexHTML(t) + script := strings.Join([]string{ + "const assert = require('assert');", + jsFunc(t, html, "stageTrackerWaitingOnPerson"), + jsFunc(t, html, "stageTrackerTrackRunning"), + jsFunc(t, html, "stageTrackerStageTrack"), + jsFunc(t, html, "stageTrackerStalledTrack"), + jsFunc(t, html, "stageTrackerTrackWouldLight"), + jsFunc(t, html, "stageTrackerLeadTrack"), + }, "\n") + ` +const ci = state => ({ head: '045b8e1', state, active: false, checks_total: 3, checks_passed: 2, checks_failed: 0, checks_pending: ['build-and-test (22)'], blocker: 'build-and-test (22)' }); +const row = (stage, ciState, reviewState) => ({ kind: 'pr', repo: 'hivecommons/promptargs', number: 467, head: '045b8e1', stage, ci_activity: ci(ciState), review_activity: { head: '045b8e1', state: reviewState } }); + +for (const st of ['missing', 'unknown', 'passing']) { + const item = row(60, st, 'approved'); + assert.strictEqual(stageTrackerTrackRunning(item, 'ci'), false, 'CI ' + st + ' with a 2/3 ring is not motion at 060'); + assert.strictEqual(stageTrackerStalledTrack(item), 'review', 'at 060 with CI ' + st + ' the stalled track is Review'); + assert.strictEqual(stageTrackerLeadTrack(item, true, stageTrackerStalledTrack(item)), 'review', 'Review is the one lit chevron at 060 with CI ' + st); +} +assert.strictEqual(stageTrackerStalledTrack(row(60, 'failing', 'approved')), 'ci', 'a red check at 060 keeps CI the blocker'); +// 050 keeps its rule: CI not green is the blocker when the review has settled. +assert.strictEqual(stageTrackerStalledTrack(row(50, 'missing', 'approved')), 'ci'); +// Genuine motion still lights CI at 060. +const live = row(60, 'running', 'approved'); live.ci_activity.active = true; +assert.strictEqual(stageTrackerTrackRunning(live, 'ci'), true); +assert.strictEqual(stageTrackerLeadTrack(live, true, ''), 'ci'); +` + if out, err := runNodeStdin(node, script); err != nil { + t.Fatalf("node fixture failed: %v\n%s", err, out) + } +} diff --git a/src/pkg/dashboard/static-src/js/tracker-row-strip.js b/src/pkg/dashboard/static-src/js/tracker-row-strip.js index 86c75c68be..549bf9083e 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-strip.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-strip.js @@ -209,6 +209,10 @@ // person (human_decision) is at Review: the ask came from the // review, whatever CI has or has not reported (hivecommons/hive#17453). if (on('review') === 'human_decision' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return 'review'; + // 060 reviewed with every check on the head concluded: the review is + // the row's own stage, so Review is the lit chevron; CI is its + // blocker only when a check is red (hivecommons/hive#17508). + if (Number(item.stage) === 60 && on('ci') !== 'failing') return 'review'; if (on('ci') !== 'passing') return 'ci'; return 'review'; } @@ -278,7 +282,10 @@ // waiting on checks, whatever its cached counts say. if ((item.decision_needed && item.decision_needed.question) || item.human_attention) return false; const total = Number(a.checks_total) || 0, done = (Number(a.checks_passed) || 0) + (Number(a.checks_failed) || 0); - const settledWords = ['passing', 'failing', 'skipped', 'missing', 'human_decision']; + // The backend's own `unknown` (an ambiguous required run, statuses + // not read) is not motion either: a 2/3 ring with a never-reported + // check lit CI for eight hours on a green head (hivecommons/hive#17508). + const settledWords = ['passing', 'failing', 'skipped', 'missing', 'human_decision', 'unknown']; return total > 0 && done < total && !settledWords.includes(a.state); } diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index a775fe6a31..f393a0937c 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -18673,6 +18673,10 @@

    Where to get help

    // person (human_decision) is at Review: the ask came from the // review, whatever CI has or has not reported (hivecommons/hive#17453). if (on('review') === 'human_decision' && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) return 'review'; + // 060 reviewed with every check on the head concluded: the review is + // the row's own stage, so Review is the lit chevron; CI is its + // blocker only when a check is red (hivecommons/hive#17508). + if (Number(item.stage) === 60 && on('ci') !== 'failing') return 'review'; if (on('ci') !== 'passing') return 'ci'; return 'review'; } @@ -18742,7 +18746,10 @@

    Where to get help

    // waiting on checks, whatever its cached counts say. if ((item.decision_needed && item.decision_needed.question) || item.human_attention) return false; const total = Number(a.checks_total) || 0, done = (Number(a.checks_passed) || 0) + (Number(a.checks_failed) || 0); - const settledWords = ['passing', 'failing', 'skipped', 'missing', 'human_decision']; + // The backend's own `unknown` (an ambiguous required run, statuses + // not read) is not motion either: a 2/3 ring with a never-reported + // check lit CI for eight hours on a green head (hivecommons/hive#17508). + const settledWords = ['passing', 'failing', 'skipped', 'missing', 'human_decision', 'unknown']; return total > 0 && done < total && !settledWords.includes(a.state); } diff --git a/src/pkg/github/ci_activity_stale.go b/src/pkg/github/ci_activity_stale.go new file mode 100644 index 0000000000..93205673f0 --- /dev/null +++ b/src/pkg/github/ci_activity_stale.go @@ -0,0 +1,81 @@ +package github + +import ( + "strings" + "time" +) + +// CIActivityClaimsMotion reports whether the snapshot still shows a check on +// its head executing or waiting: a check run whose status is not completed, +// or a commit status still pending — merge-gate contexts (Tide, DCO) aside, +// since those wait on review, not on CI. +func CIActivityClaimsMotion(a *PRCIActivity) bool { + if a == nil { + return false + } + for _, check := range a.Checks { + if check.Head != "" && !strings.EqualFold(check.Head, a.Head) { + continue + } + if IsMergeGateContext(check.Name) { + continue + } + switch check.State { + case "completed", "unknown", "": + continue + } + return true + } + return false +} + +// CIActivityStale reports whether a snapshot that still claims a check in +// motion was observed more than maxAge ago. GitHub's check runs finish in +// minutes; a snapshot that has said "running" for longer than that was not +// refreshed — the batch cache skipped a clean repository, the ETag replayed, +// or the listing was taken while the checks were starting +// (hivecommons/hive#17508: `CI 2/3 · running` eight hours after every check +// had passed). maxAge <= 0 disables the guard. +func CIActivityStale(a *PRCIActivity, now time.Time, maxAge time.Duration) bool { + if a == nil || maxAge <= 0 || a.ObservedAt == nil || a.ObservedAt.IsZero() { + return false + } + if !CIActivityClaimsMotion(a) { + return false + } + return now.Sub(*a.ObservedAt) > maxAge +} + +// RequestHeadCIRelist queues one coalesced check-run listing for the head, +// bypassing the GraphQL batch cache and any ETag: the result lands in the +// webhook CI evidence store, which HeadCIActivity lays over the cycle's +// listing on the next tracker build. A head relisted within minGap is left +// alone so a genuinely long-running check costs one listing per gap, not +// one per build. It reports whether a listing is now pending. +func (c *Client) RequestHeadCIRelist(repo string, number int, head, baseRef string, minGap time.Duration) bool { + if c == nil || strings.TrimSpace(head) == "" || number <= 0 { + return false + } + r := c.ciRefetcher() + key := ciEvidenceKey(repo, head) + r.mu.Lock() + if r.relisted == nil { + r.relisted = map[ciHeadKey]time.Time{} + } + now := sharedWebhookTracker().now() + if last, ok := r.relisted[key]; ok && minGap > 0 && now.Sub(last) < minGap { + r.mu.Unlock() + return false + } + r.relisted[key] = now + for k, at := range r.relisted { + if now.Sub(at) > ciRelistMemory { + delete(r.relisted, k) + } + } + r.mu.Unlock() + return r.enqueue(ciRefetchTarget{repo: repo, fullName: repo, head: head, number: number, baseRef: baseRef}) +} + +// ciRelistMemory bounds how long a head's last stale-relist time is kept. +const ciRelistMemory = 24 * time.Hour diff --git a/src/pkg/github/webhook_ci_evidence.go b/src/pkg/github/webhook_ci_evidence.go index da5f1a5893..8b7a69c8e2 100644 --- a/src/pkg/github/webhook_ci_evidence.go +++ b/src/pkg/github/webhook_ci_evidence.go @@ -559,6 +559,9 @@ type ciRefetcher struct { newTimer func(d time.Duration, f func()) ciRefetchTimer fetch func(ctx context.Context, t ciRefetchTarget) error ctx func() context.Context + // relisted is when each head was last relisted for a stale snapshot + // (RequestHeadCIRelist). + relisted map[ciHeadKey]time.Time // flushes counts debounce windows that fired (tests). flushes int } diff --git a/src/pkg/github/webhook_ci_evidence_test.go b/src/pkg/github/webhook_ci_evidence_test.go index b57cb4917f..20bc3d3d83 100644 --- a/src/pkg/github/webhook_ci_evidence_test.go +++ b/src/pkg/github/webhook_ci_evidence_test.go @@ -302,3 +302,39 @@ func TestWebhookCIRefetchListsHeadOnceAndRecordsListing(t *testing.T) { t.Fatalf("cancelled context still listed: %d", listings) } } + +// A tracker build that finds a head's CI snapshot still claiming motion past +// the stale window asks for one coalesced listing of that head, bypassing +// the batch cache; the same head is not relisted again within the window, +// so a genuinely long-running check costs one listing per window, not one +// per build (hivecommons/hive#17508). +func TestRequestHeadCIRelistCoalescesPerHead(t *testing.T) { + c, clock := setupWebhookCacheTest(t) + t.Cleanup(ResetCIEvidenceForTest(clock.Now)) + var fired func() + c.ciRefetch = &ciRefetcher{newTimer: func(_ time.Duration, f func()) ciRefetchTimer { fired = f; return &ciTestTimer{} }} + var fetched []ciRefetchTarget + c.ciRefetch.fetch = func(_ context.Context, t ciRefetchTarget) error { fetched = append(fetched, t); return nil } + + if !c.RequestHeadCIRelist("hivecommons/promptargs", 467, "045b8e1", "main", 10*time.Minute) { + t.Fatalf("first stale request not queued") + } + if c.RequestHeadCIRelist("hivecommons/promptargs", 467, "045b8e1", "main", 10*time.Minute) { + t.Fatalf("a head relisted seconds ago was queued again") + } + if c.ciRefetch.pendingCount() != 1 || fired == nil { + t.Fatalf("pending=%d timer armed=%v, want one coalesced listing", c.ciRefetch.pendingCount(), fired != nil) + } + fired() + if len(fetched) != 1 || fetched[0].head != "045b8e1" || fetched[0].number != 467 || fetched[0].baseRef != "main" { + t.Fatalf("fetched = %+v, want one listing of 045b8e1 for #467 on main", fetched) + } + + clock.now = clock.now.Add(11 * time.Minute) + if !c.RequestHeadCIRelist("hivecommons/promptargs", 467, "045b8e1", "main", 10*time.Minute) { + t.Fatalf("a head still claiming motion past the window was not relisted again") + } + if c.RequestHeadCIRelist("hivecommons/promptargs", 0, "045b8e1", "main", 10*time.Minute) || c.RequestHeadCIRelist("hivecommons/promptargs", 467, "", "main", 10*time.Minute) { + t.Fatalf("a request without a PR number or head was queued") + } +} From a725f11982c9f4d10ec6041005dcb94c6d33babc Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 9 Nov 2026 22:51:33 -0500 Subject: [PATCH 095/123] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20one=20human?= =?UTF-8?q?-gate=20pill=20per=20gated=20row=20=E2=80=94=20fixed=20verbs=20?= =?UTF-8?q?per=20reason,=20no=20needs-human=20chevron=20words,=20Confirm?= =?UTF-8?q?=20safe=20for=20sentinel=20alerts=20(#17505)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 dashboard: one human-gate pill per gated row, no needs-human chevron words Every row a person must settle carries exactly one segmented '👤 Needs human · ' control whose verbs are fixed per reason (review / decision / sentinel / hold; stacked reasons union, ≤3 visible + … menu). 'Needs human', 'Held · sentinel' and 'Sentinel alert · needs human' never ride a chevron: the lit chevron is the real stage with the amber ham-human-gated outline. Secondary rows of a shared PR render no gate; their 'decision pending on #N' chip links to the primary row. A new POST …/items/{number}/sentinel-confirm endpoint (comment + label removal, audited) gives a sentinel alert its own verb, Confirm safe. Fixes #17504 Signed-off-by: Andrew Anderson * Fix CI: typed RowActionTarget compare, token-only gate radii, register sentinel-confirm write site Signed-off-by: Andrew Anderson * Fix CI: openapi route, solicited writes, owner path, notice gate, lead pins, fold gate verbs on stacked/phone tiers Signed-off-by: Andrew Anderson * Keep the informational sentinel-notice chip beside the gate pill Signed-off-by: Andrew Anderson --------- Signed-off-by: Andrew Anderson Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/changed-needs-human-gate-pill.md | 1 + dashboard/openapi.json | 116 +++++ src/docs/api-reference/agents-and-controls.md | 16 +- src/docs/api-reference/beads.md | 10 +- src/docs/api-reference/configuration.md | 26 +- src/docs/api-reference/dashboard-misc.md | 24 +- src/docs/api-reference/inception.md | 28 +- src/docs/api-reference/knowledge.md | 90 ++-- src/docs/api-reference/nous.md | 50 +- src/docs/api-reference/packs-and-acmm.md | 23 +- src/docs/dashboard-copy-inventory.md | 1 + .../dashboard-sections/activity-monitor.md | 31 +- src/docs/notifications.md | 1 + src/pkg/dashboard/api.go | 1 + .../api_repo_item_sentinel_confirm.go | 153 ++++++ .../api_repo_item_sentinel_confirm_test.go | 125 +++++ src/pkg/dashboard/operator_actions.go | 6 + src/pkg/dashboard/operator_actions_test.go | 2 + .../stage_tracker_human_gate_test.go | 225 +++++++++ .../stage_tracker_lead_action_test.go | 4 +- .../stage_tracker_needs_human_reason_test.go | 10 +- .../stage_tracker_repo_grouping_test.go | 1 + .../stage_tracker_sentinel_lane_test.go | 177 ++++--- .../stage_tracker_sentinel_notice_test.go | 11 +- .../stage_tracker_ui_prelude_test.go | 1 + .../dashboard/stage_tracker_ui_rows_test.go | 46 +- src/pkg/dashboard/static-src/css/tracker.css | 43 +- .../static-src/js/tracker-actions.js | 38 +- .../static-src/js/tracker-human-gate.js | 224 +++++++++ .../static-src/js/tracker-row-layout.js | 3 +- .../static-src/js/tracker-row-render.js | 9 +- .../static-src/js/tracker-row-strip.js | 45 +- .../dashboard/static-src/js/tracker-row.js | 33 +- .../static-src/js/tracker-words-stage.js | 1 - .../dashboard/static-src/js/tracker-words.js | 44 +- src/pkg/dashboard/static-src/manifest.txt | 1 + src/pkg/dashboard/static/index.html | 440 ++++++++++++++---- src/pkg/github/notification_write_sites.go | 1 + 38 files changed, 1615 insertions(+), 446 deletions(-) create mode 100644 changelog.d/changed-needs-human-gate-pill.md create mode 100644 src/pkg/dashboard/api_repo_item_sentinel_confirm.go create mode 100644 src/pkg/dashboard/api_repo_item_sentinel_confirm_test.go create mode 100644 src/pkg/dashboard/stage_tracker_human_gate_test.go create mode 100644 src/pkg/dashboard/static-src/js/tracker-human-gate.js diff --git a/changelog.d/changed-needs-human-gate-pill.md b/changelog.d/changed-needs-human-gate-pill.md new file mode 100644 index 0000000000..0e5d03d09d --- /dev/null +++ b/changelog.d/changed-needs-human-gate-pill.md @@ -0,0 +1 @@ +- Activity Monitor: every row a person must settle now carries exactly one human-gate control — a segmented `👤 Needs human · ` pill whose verbs are fixed per reason (review: Approve · Request changes… · Let hive decide; decision: Decide… · Approve as-is · Let hive decide; sentinel: Confirm safe · Let hive decide; hold: Release hold · Let hive decide; stacked reasons union, ≤ 3 visible + `…`). "Needs human", "Held · sentinel" and "Sentinel alert · needs human" never ride a chevron any more — the lit chevron is the real stage with the amber outline — the scattered `sentinel` chip / `Approve ▸` / `Let hive decide ▸` are folded into the pill, secondary rows of a shared PR render no gate (their *decision pending on #N* chip links to the primary row), and a new `POST /api/repos/{owner}/{repo}/items/{number}/sentinel-confirm` endpoint gives a sentinel alert its own answer (hivecommons/hive#17470). diff --git a/dashboard/openapi.json b/dashboard/openapi.json index b468e6494e..a895906118 100644 --- a/dashboard/openapi.json +++ b/dashboard/openapi.json @@ -29148,6 +29148,122 @@ } } }, + "/api/repos/{owner}/{repo}/items/{number}/sentinel-confirm": { + "post": { + "tags": [ + "Status" + ], + "summary": "Confirm a sentinel finding safe on one issue or pull request from the activity monitor", + "description": "Backs the human-gate pill's Confirm safe verb on a row carrying the sentinel label. Posts a comment marked `` naming the signed-in operator (plus their words when given), then removes the configured sentinel label so the merge gate no longer holds the item; when the label is already gone the comment is still posted and the response says alreadyClear. Same authorisation as the hold toggle plus a signed-in GitHub user; every confirmation is written to the audit log as repo_item_sentinel_confirm.", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "Optional: why the finding is safe; posted with the confirmation" + }, + "type": { + "type": "string", + "enum": [ + "issue", + "pr" + ], + "description": "Row kind for the result wording; defaults to issue" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Finding confirmed safe", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "type": "boolean" + }, + "repo": { + "type": "string" + }, + "number": { + "type": "integer" + }, + "label": { + "type": "string", + "description": "The configured sentinel label" + }, + "removed": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Sentinel labels removed from the item" + }, + "alreadyClear": { + "type": "boolean", + "description": "No sentinel label was on the item; only the comment was posted" + }, + "result": { + "type": "object", + "description": "Shared row-action outcome for the dashboard toast" + } + } + } + } + } + }, + "400": { + "description": "Invalid request body" + }, + "401": { + "description": "GitHub user session required" + }, + "403": { + "description": "Repository write permission required" + }, + "502": { + "description": "GitHub mutation failed" + }, + "503": { + "description": "GitHub client not configured" + } + } + } + }, "/api/notes": { "get": { "tags": [ diff --git a/src/docs/api-reference/agents-and-controls.md b/src/docs/api-reference/agents-and-controls.md index 5b7bc3ec01..1523bc34b8 100644 --- a/src/docs/api-reference/agents-and-controls.md +++ b/src/docs/api-reference/agents-and-controls.md @@ -23,15 +23,15 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | `GET` | `/api/model-advisor` | Dashboard auth/session | Model Advisor | `pkg/dashboard/api.go:174` | | `GET` | `/api/governor/pr-models` | Dashboard auth/session | Agent-authored PR distribution by normalized attribution model/backend for `window=7d`, `30d`, or `all`, including per-model rework stats and the top 10 most-reworked PRs | `pkg/dashboard/api.go:175` | | `GET` | `/api/reviewer/accuracy` | Dashboard auth/session | Reviewer verdict calibration for the configured window: false-approve/false-block rates and confidence buckets per perspective and reviewer model | `pkg/dashboard/api.go:238` | -| `GET` | `/api/review/queue` | Dashboard auth/session | PR review queue: every open PR (agent and contributor, actionable and held) ranked by triage class, confidence band, CI state and age, with per-PR `reasons`; unreviewed items carry `pending_since` and `redispatch_count` from the review dispatch state; each entry carries `stage` `{stage, entered_at, last_activity_at, quiet_for, stalled, waiting_on_hive, past_dwell, history[]}` from the stage-label store (`stalled`/`past_dwell` follow `governor.labels.stage.dwell` and `stalled.require_quiet`; `history[]` is `{from, to, at, reason, regressed}`, newest last, capped at 8) and the top-level `hive_held` counts PRs past their stage dwell while waiting on the hive (`waiting_on_hive` and `past_dwell` both true); paged with `limit` (1-200, default 50) and `offset` | `pkg/dashboard/api.go:513` | -| `POST` | `/api/review/queue/{owner}/{repo}/{number}/superseded/close` | Owner only | Close a superseded PR now (grace window or not): posts the close comment, adds `hive/superseded`, closes it | `pkg/dashboard/api.go:516` | -| `POST` | `/api/review/queue/{owner}/{repo}/{number}/superseded/keep-open` | Owner only | Keep a superseded PR open: adds `hive/keep-open`, which the supersession sweep never auto-closes | `pkg/dashboard/api.go:517` | -| `GET` | `/api/review/pipeline` | Dashboard auth/session | Review pipeline: one card per review-queue PR placed in its stage (`unreviewed`, `reviewing`, `changes_requested`, `fixing`, `human_hold`, `approved`, `merged`, `abandoned`) with `since`, `reviewers`, P0–P3 `severity` counts, `loop_count`/`loop_cap`, `next_action` and `reasons`; filtered by `repo` and `stage`, paged with `limit` (1-200, default 50) and `offset` | `pkg/dashboard/api.go:521` | +| `GET` | `/api/review/queue` | Dashboard auth/session | PR review queue: every open PR (agent and contributor, actionable and held) ranked by triage class, confidence band, CI state and age, with per-PR `reasons`; unreviewed items carry `pending_since` and `redispatch_count` from the review dispatch state; each entry carries `stage` `{stage, entered_at, last_activity_at, quiet_for, stalled, waiting_on_hive, past_dwell, history[]}` from the stage-label store (`stalled`/`past_dwell` follow `governor.labels.stage.dwell` and `stalled.require_quiet`; `history[]` is `{from, to, at, reason, regressed}`, newest last, capped at 8) and the top-level `hive_held` counts PRs past their stage dwell while waiting on the hive (`waiting_on_hive` and `past_dwell` both true); paged with `limit` (1-200, default 50) and `offset` | `pkg/dashboard/api.go:514` | +| `POST` | `/api/review/queue/{owner}/{repo}/{number}/superseded/close` | Owner only | Close a superseded PR now (grace window or not): posts the close comment, adds `hive/superseded`, closes it | `pkg/dashboard/api.go:517` | +| `POST` | `/api/review/queue/{owner}/{repo}/{number}/superseded/keep-open` | Owner only | Keep a superseded PR open: adds `hive/keep-open`, which the supersession sweep never auto-closes | `pkg/dashboard/api.go:518` | +| `GET` | `/api/review/pipeline` | Dashboard auth/session | Review pipeline: one card per review-queue PR placed in its stage (`unreviewed`, `reviewing`, `changes_requested`, `fixing`, `human_hold`, `approved`, `merged`, `abandoned`) with `since`, `reviewers`, P0–P3 `severity` counts, `loop_count`/`loop_cap`, `next_action` and `reasons`; filtered by `repo` and `stage`, paged with `limit` (1-200, default 50) and `offset` | `pkg/dashboard/api.go:522` | | `GET` | `/api/review/dispatch/events` | Dashboard auth/session | Webhook review dispatch queue: `enabled`, `webhooks_configured`, `debounce_s`, `pending` (soonest first) and `recent` (newest first) dispatches with repo, number, head SHA, action, timestamps and coalesced count, plus `stats` counters; in memory, never calls GitHub | `pkg/dashboard/api_review_event_dispatch.go:16` | -| `GET` | `/api/review/evidence` | Merger or owner | [Review evidence bundle](../review-evidence.md) for one PR head. Query `repo` (`owner/name`), `number`, optional `head` (full SHA or unique prefix of at least 7 characters; `409` when ambiguous; default is the newest head), `format=json\|zip` (default `json`) and `download=1` for an attachment. `json` returns the bundle bytes exactly as sealed (verdicts, posted reviews, policy, CI check runs, sentinel findings, human actions, merge event, `hash`, optional `signature`); `zip` adds `verdicts.json`, `review-links.json` and a `manifest.json` of SHA-256s plus the signing public key when readable. `400` for a bad `repo`/`number`; `404` with `status: "expired"`/`expired: true` when retention removed a bundle Hive can prove existed, otherwise `status: "not_found"` | `pkg/dashboard/api.go:525` | -| `GET` | `/api/review/evidence/list` | Merger or owner | Every retained evidence bundle id and head for one PR (`repo`, `number`), oldest first, with the newest marked latest; `400` for a bad `repo`/`number` | `pkg/dashboard/api.go:526` | -| `GET` | `/api/evidence/write-counters` | Merger or owner | Durable attempted vs blocked agent GitHub write counters ([#12069](https://github.com/hivecommons/hive/issues/12069)): `totals` by intent tier (ACMM mode) with `blocked_by_reason`, and `weeks` keyed by the UTC Monday of each ISO week with per-tier and per-reason counts. Persisted across restarts; observation only, never gates a write or merge. Empty `totals`/`weeks` before anything is recorded | `pkg/dashboard/api.go:528` | -| `GET` | `/api/evidence/summary` | Dashboard auth/session | Read-only aggregate over `/data/evidence` bundles (schema v1) plus reviewer accuracy. Query `hours` (default 24, capped like `/api/pr-throughput`; `0` = all time) or a custom `from`/`to` range (RFC3339 or `YYYY-MM-DD`, date-only `to` inclusive, `to` defaults to now; `400` when `to` precedes `from`, the span exceeds 3 × 366 days, or `to` is given without `from`; the response echoes `from`/`to`), `repo` (`owner/name`) and `author_kind=human\|agent\|bot`; `400` for a bad value. A PR falls in the window by its open time (earliest bundle `created_at` or `merge.opened_at`), never by when a bundle was written; all bundles of a PR are folded so the newest supplies verdicts and the merge / `reverted_by` / backfilled close come from whichever record knows them. Returns `available_windows` (`{"24","168","720","all"}` → PR count under the same filters), `outcomes_by_author_kind` (merged/closed/open; `closed` comes from backfilled records, `reverted_14d` is null until bundles record it), `reviewer_calibration` buckets per perspective, `reviewer_accuracy_by_model` split by author kind (blocks split into `enforced_blocks` / `advisory_blocks` by `policy.require_approval`; advisory blocks that preceded a merge are `dissent_before_merge`, not false blocks), `sentinel_hits_per_week`, `shadow_gate` (`n`, `would_have_held`, `would_have_blocked`, and per gate `review_gate` / `intent` the evaluated `n` with `held` / `passed` outcomes `{n, merged, closed, open, reverted}`, plus `review_gate_by_lane` `{merge_eligible, self_merge}`), `write_counters` (per intent tier `{attempted, blocked, blocked_by_reason}` from the proxy write counter file; omitted when absent or unreadable), `write_activity` (blocked ÷ every agent write in the window: `total_writes`, `blocked`, `direct` `{recorded, since, partial_coverage, attempted, blocked, by_tier, blocked_by_reason}` from the proxy's weekly counter buckets under `/data/hive-metrics/write-counters.json`, `mediated` `{n, refused, by_action}` from the audit log), `claim_vs_verdict` (per ISO week of agent-authored PRs: `n`, `claimed`, `ci_captured`, `ci_not_green`, `verdict_not_approve`, `both`; records with empty CI are excluded from the CI column and disclosed under `missing.records_empty_ci`), `ci_recovery` (`policy` `{self_authored_automerge, required_checks}`, `n`, `at_claim` `{green, red, pending, none}`, `red` `{n, recovered_merged, green_open, abandoned, pending, outcome_unknown, enriched, not_enriched, median_pushes_to_green, median_hours_to_green, same_head_recovered}`, `gate` `{merged_n, with_checks, green, green_from_bundles, non_required_red, required_unknown, breaches, breach_prs[], suspected, suspected_prs[], pending, unknown, green_to_merge_n, median_green_to_merge_hours}` over every merged PR by GitHub-confirmed state of the *required* checks on the merged head, as the merge gate judges (`breach_prs[]` carry `red`, `merged_by`; a red non-required check is disclosed, not a breach; a red review-time snapshot, a required check with no run, or a red read without a resolvable required set is only suspected), and `convergence` `{n, passes {"1","2","3","4+","never"}, settled, in_flight, unknown, median_passes, from_github, from_bundles, by_week[]}` over agent PRs by CI passes to first green, from the durable `/data/hive-metrics/ci-recovery.json` GitHub check-run trail rollup), `work_balance` (per ISO week: `n`, `opened` by actor kind `{human, agent, bot}`, `closed`, `prs_opened`, `prs_merged`, `prs_closed`, `queue_issues`, `queue_prs`, `issue_source` `github|audit`, `throttled`) with `work_balance_sources` (`issues_github_since`, `issues_fetched_at`, `issues_known`, `audit_only_weeks`, `issue_series_weeks`, `queue_samples`, `queue_retention_days`; issues from the durable GitHub rollup `/data/hive-metrics/issue-activity.json` for weeks at or after `issues_github_since` and, for earlier weeks, from the backfilled issue series `///issues/.json` written by the issue backfill ([#12527](https://github.com/hivecommons/hive/pull/12527)) when its coverage spans the requested portion of the week (`issue_series_weeks` counts the repo-weeks it supplied), else the audit log (`audit_only_weeks`), PRs from folded bundles, queue depth from governor snapshots; `missing.issues_human_opens_unobserved` is true while no GitHub rollup exists unless the issue series covers every row, and whenever any row fell back to the audit log, `missing.throttle_windows_unavailable` discloses that no governor throttle windows are reported), `intent_counters` (per intent tier `{attempted, blocked}` from `/data/hive-metrics/intent-counters.json` — evaluations and the subset the intent gate would have blocked with enforcement on, [#12362](https://github.com/hivecommons/hive/issues/12362); omitted when absent or unreadable), `complexity_by_repo` (per managed repo the newest 12 monthly complexity snapshots, oldest first, each `{month, ref, captured_at, files, functions, mean_cyclomatic, median_cyclomatic, p90_cyclomatic, max_cyclomatic, functions_over_threshold, threshold, static_warnings, static_warnings_by_tool}`; omitted when no repo has a snapshot), the `/api/reviewer/accuracy` summary, and `n` plus `missing` counts (unknown-model verdicts, empty CI, unreadable records). Never consulted by merge decisions. | `pkg/dashboard/api.go:531` | +| `GET` | `/api/review/evidence` | Merger or owner | [Review evidence bundle](../review-evidence.md) for one PR head. Query `repo` (`owner/name`), `number`, optional `head` (full SHA or unique prefix of at least 7 characters; `409` when ambiguous; default is the newest head), `format=json\|zip` (default `json`) and `download=1` for an attachment. `json` returns the bundle bytes exactly as sealed (verdicts, posted reviews, policy, CI check runs, sentinel findings, human actions, merge event, `hash`, optional `signature`); `zip` adds `verdicts.json`, `review-links.json` and a `manifest.json` of SHA-256s plus the signing public key when readable. `400` for a bad `repo`/`number`; `404` with `status: "expired"`/`expired: true` when retention removed a bundle Hive can prove existed, otherwise `status: "not_found"` | `pkg/dashboard/api.go:526` | +| `GET` | `/api/review/evidence/list` | Merger or owner | Every retained evidence bundle id and head for one PR (`repo`, `number`), oldest first, with the newest marked latest; `400` for a bad `repo`/`number` | `pkg/dashboard/api.go:527` | +| `GET` | `/api/evidence/write-counters` | Merger or owner | Durable attempted vs blocked agent GitHub write counters ([#12069](https://github.com/hivecommons/hive/issues/12069)): `totals` by intent tier (ACMM mode) with `blocked_by_reason`, and `weeks` keyed by the UTC Monday of each ISO week with per-tier and per-reason counts. Persisted across restarts; observation only, never gates a write or merge. Empty `totals`/`weeks` before anything is recorded | `pkg/dashboard/api.go:529` | +| `GET` | `/api/evidence/summary` | Dashboard auth/session | Read-only aggregate over `/data/evidence` bundles (schema v1) plus reviewer accuracy. Query `hours` (default 24, capped like `/api/pr-throughput`; `0` = all time) or a custom `from`/`to` range (RFC3339 or `YYYY-MM-DD`, date-only `to` inclusive, `to` defaults to now; `400` when `to` precedes `from`, the span exceeds 3 × 366 days, or `to` is given without `from`; the response echoes `from`/`to`), `repo` (`owner/name`) and `author_kind=human\|agent\|bot`; `400` for a bad value. A PR falls in the window by its open time (earliest bundle `created_at` or `merge.opened_at`), never by when a bundle was written; all bundles of a PR are folded so the newest supplies verdicts and the merge / `reverted_by` / backfilled close come from whichever record knows them. Returns `available_windows` (`{"24","168","720","all"}` → PR count under the same filters), `outcomes_by_author_kind` (merged/closed/open; `closed` comes from backfilled records, `reverted_14d` is null until bundles record it), `reviewer_calibration` buckets per perspective, `reviewer_accuracy_by_model` split by author kind (blocks split into `enforced_blocks` / `advisory_blocks` by `policy.require_approval`; advisory blocks that preceded a merge are `dissent_before_merge`, not false blocks), `sentinel_hits_per_week`, `shadow_gate` (`n`, `would_have_held`, `would_have_blocked`, and per gate `review_gate` / `intent` the evaluated `n` with `held` / `passed` outcomes `{n, merged, closed, open, reverted}`, plus `review_gate_by_lane` `{merge_eligible, self_merge}`), `write_counters` (per intent tier `{attempted, blocked, blocked_by_reason}` from the proxy write counter file; omitted when absent or unreadable), `write_activity` (blocked ÷ every agent write in the window: `total_writes`, `blocked`, `direct` `{recorded, since, partial_coverage, attempted, blocked, by_tier, blocked_by_reason}` from the proxy's weekly counter buckets under `/data/hive-metrics/write-counters.json`, `mediated` `{n, refused, by_action}` from the audit log), `claim_vs_verdict` (per ISO week of agent-authored PRs: `n`, `claimed`, `ci_captured`, `ci_not_green`, `verdict_not_approve`, `both`; records with empty CI are excluded from the CI column and disclosed under `missing.records_empty_ci`), `ci_recovery` (`policy` `{self_authored_automerge, required_checks}`, `n`, `at_claim` `{green, red, pending, none}`, `red` `{n, recovered_merged, green_open, abandoned, pending, outcome_unknown, enriched, not_enriched, median_pushes_to_green, median_hours_to_green, same_head_recovered}`, `gate` `{merged_n, with_checks, green, green_from_bundles, non_required_red, required_unknown, breaches, breach_prs[], suspected, suspected_prs[], pending, unknown, green_to_merge_n, median_green_to_merge_hours}` over every merged PR by GitHub-confirmed state of the *required* checks on the merged head, as the merge gate judges (`breach_prs[]` carry `red`, `merged_by`; a red non-required check is disclosed, not a breach; a red review-time snapshot, a required check with no run, or a red read without a resolvable required set is only suspected), and `convergence` `{n, passes {"1","2","3","4+","never"}, settled, in_flight, unknown, median_passes, from_github, from_bundles, by_week[]}` over agent PRs by CI passes to first green, from the durable `/data/hive-metrics/ci-recovery.json` GitHub check-run trail rollup), `work_balance` (per ISO week: `n`, `opened` by actor kind `{human, agent, bot}`, `closed`, `prs_opened`, `prs_merged`, `prs_closed`, `queue_issues`, `queue_prs`, `issue_source` `github|audit`, `throttled`) with `work_balance_sources` (`issues_github_since`, `issues_fetched_at`, `issues_known`, `audit_only_weeks`, `issue_series_weeks`, `queue_samples`, `queue_retention_days`; issues from the durable GitHub rollup `/data/hive-metrics/issue-activity.json` for weeks at or after `issues_github_since` and, for earlier weeks, from the backfilled issue series `///issues/.json` written by the issue backfill ([#12527](https://github.com/hivecommons/hive/pull/12527)) when its coverage spans the requested portion of the week (`issue_series_weeks` counts the repo-weeks it supplied), else the audit log (`audit_only_weeks`), PRs from folded bundles, queue depth from governor snapshots; `missing.issues_human_opens_unobserved` is true while no GitHub rollup exists unless the issue series covers every row, and whenever any row fell back to the audit log, `missing.throttle_windows_unavailable` discloses that no governor throttle windows are reported), `intent_counters` (per intent tier `{attempted, blocked}` from `/data/hive-metrics/intent-counters.json` — evaluations and the subset the intent gate would have blocked with enforcement on, [#12362](https://github.com/hivecommons/hive/issues/12362); omitted when absent or unreadable), `complexity_by_repo` (per managed repo the newest 12 monthly complexity snapshots, oldest first, each `{month, ref, captured_at, files, functions, mean_cyclomatic, median_cyclomatic, p90_cyclomatic, max_cyclomatic, functions_over_threshold, threshold, static_warnings, static_warnings_by_tool}`; omitted when no repo has a snapshot), the `/api/reviewer/accuracy` summary, and `n` plus `missing` counts (unknown-model verdicts, empty CI, unreadable records). Never consulted by merge decisions. | `pkg/dashboard/api.go:532` | | `GET` | `/api/agents` | Dashboard auth/session | Agents List | `pkg/dashboard/api.go:319` | | `POST` | `/api/agents` | Owner only | Agent Create | `pkg/dashboard/api.go:320` | | `POST` | `/api/agents/import` | Owner only | Agent Import | `pkg/dashboard/api.go:321` | diff --git a/src/docs/api-reference/beads.md b/src/docs/api-reference/beads.md index 5caebab49f..5b1fa09a82 100644 --- a/src/docs/api-reference/beads.md +++ b/src/docs/api-reference/beads.md @@ -5,8 +5,8 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | Method | Path | Auth | Purpose | Source | |---|---|---|---|---| -| `GET` | `/api/beads` | Dashboard auth/session | Beads List | `pkg/dashboard/api.go:497` | -| `GET` | `/api/beads/{agent}` | Dashboard auth/session | Beads List | `pkg/dashboard/api.go:498` | -| `POST` | `/api/beads/{agent}` | Owner only | Beads Create | `pkg/dashboard/api.go:499` | -| `POST` | `/api/beads/reset` | Owner only | Beads Reset | `pkg/dashboard/api.go:500` | -| `POST` | `/api/beads/reset/{agent}` | Owner only | Beads Reset Agent | `pkg/dashboard/api.go:501` | +| `GET` | `/api/beads` | Dashboard auth/session | Beads List | `pkg/dashboard/api.go:498` | +| `GET` | `/api/beads/{agent}` | Dashboard auth/session | Beads List | `pkg/dashboard/api.go:499` | +| `POST` | `/api/beads/{agent}` | Owner only | Beads Create | `pkg/dashboard/api.go:500` | +| `POST` | `/api/beads/reset` | Owner only | Beads Reset | `pkg/dashboard/api.go:501` | +| `POST` | `/api/beads/reset/{agent}` | Owner only | Beads Reset Agent | `pkg/dashboard/api.go:502` | diff --git a/src/docs/api-reference/configuration.md b/src/docs/api-reference/configuration.md index 159c17bfa7..cfc998bdb2 100644 --- a/src/docs/api-reference/configuration.md +++ b/src/docs/api-reference/configuration.md @@ -75,17 +75,17 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | `POST` | `/api/config/governor/repos/check-access` | Dashboard auth/session | Governor Repo Check Access | `pkg/dashboard/api.go:313` | | `PUT` | `/api/config/github` | Owner only | Config GitHub | `pkg/dashboard/api.go:314` | | `GET` | `/api/config/github/forge-apps` | Dashboard auth/session | Config GitHub Forge Apps | `pkg/dashboard/api.go:317` | -| `GET` | `/api/config/sidebar` | Dashboard auth/session | Sidebar Get | `pkg/dashboard/api.go:371` | -| `PUT` | `/api/config/sidebar` | Dashboard auth/session | Sidebar Set | `pkg/dashboard/api.go:372` | -| `GET` | `/api/config/backends` | Dashboard auth/session | Backends | `pkg/dashboard/api.go:373` | -| `GET` | `/api/compliance/status` | Merger or owner | Evaluated compliance controls for the frameworks in `compliance.frameworks` (`compliance.Report`, JSON): per control `meets`/`deviates`/`off`/`not_covered` with current vs recommended value per mapped setting, a summary, and the non-certification disclaimer — see [Compliance](../compliance.md) ([#11078](https://github.com/hivecommons/hive/issues/11078)) | `pkg/dashboard/api.go:363` | -| `GET` | `/api/compliance/posture` | Merger or owner | Posture-check catalogue, effective interval / window / history retention, and the latest run (`compliance.PostureRun`: schedule/manual trigger, `triggered_by` identity, and per-check `pass`/`fail`/`skip`/`error`, detail, control ids, evidence refs); `?since=` (RFC 3339, `YYYY-MM-DD` or a look-back such as `168h`) adds every run since then, oldest first, capped at 1000 — see [Compliance](../compliance.md#posture-checks-catalogue) ([#11079](https://github.com/hivecommons/hive/issues/11079)) | `pkg/dashboard/api.go:364` | -| `POST` | `/api/compliance/posture/run` | Merger or owner | Run the posture checks now, attributed to the authenticated user, and record the pass in the history; audited as `compliance_posture_run`; `409` when no framework is selected or a pass is already running ([#11079](https://github.com/hivecommons/hive/issues/11079)) | `pkg/dashboard/api.go:365` | -| `GET` | `/api/compliance/posture/history` | Owner only | Posture history for `?since=`/`?until=` (default the last 30 days) as one series per check: points (`at`, `status`), status counts, `last_fail_at` and the latest result with detail and evidence refs; at most the 1000 most recent runs — see [Compliance](../compliance.md#evidence-exports-and-attestations) ([#11081](https://github.com/hivecommons/hive/issues/11081)) | `pkg/dashboard/api.go:366` | -| `GET` | `/api/compliance/export` | Owner only | Evidence download for `?since=`/`?until=`: `kind=controls` (`json`/`md`), `posture` (`json`/`csv`), `audit` (`json`), `config` (redacted effective config + sha256, `json`), `attestations` (`json`/`csv`) or `bundle` (`json`). Every format includes source, period, generator, selected profile versions, attesters, retention and a per-section SHA-256 manifest; audited as `compliance_export` with the SHA-256 of the delivered bytes ([#11081](https://github.com/hivecommons/hive/issues/11081), [#13582](https://github.com/hivecommons/hive/issues/13582)) | `pkg/dashboard/api.go:367` | -| `GET` | `/api/compliance/attestations` | Owner only | Owner attestations, newest first (`?framework=` filters) ([#11081](https://github.com/hivecommons/hive/issues/11081)) | `pkg/dashboard/api.go:368` | -| `POST` | `/api/compliance/attestations` | Owner only | Record `{"framework", "reviewed_on", "note"}` for the signed-in owner; audited as `compliance_attestation`; `201` with the attestation, `400` for an unknown framework, a bad or future date, or a note over 2000 characters ([#11081](https://github.com/hivecommons/hive/issues/11081)) | `pkg/dashboard/api.go:369` | -| `PUT` | `/api/config/governor/compliance` | Owner only | Settings → Compliance framework picker: `{"frameworks": [...]}` sets `compliance.frameworks` (empty list deselects all, absent key leaves it unchanged; unknown/duplicate ids are a `400` before any change); audited as `config_compliance`; returns the re-evaluated `compliance.Report` ([#11080](https://github.com/hivecommons/hive/issues/11080)) | `pkg/dashboard/api.go:538` | +| `GET` | `/api/config/sidebar` | Dashboard auth/session | Sidebar Get | `pkg/dashboard/api.go:372` | +| `PUT` | `/api/config/sidebar` | Dashboard auth/session | Sidebar Set | `pkg/dashboard/api.go:373` | +| `GET` | `/api/config/backends` | Dashboard auth/session | Backends | `pkg/dashboard/api.go:374` | +| `GET` | `/api/compliance/status` | Merger or owner | Evaluated compliance controls for the frameworks in `compliance.frameworks` (`compliance.Report`, JSON): per control `meets`/`deviates`/`off`/`not_covered` with current vs recommended value per mapped setting, a summary, and the non-certification disclaimer — see [Compliance](../compliance.md) ([#11078](https://github.com/hivecommons/hive/issues/11078)) | `pkg/dashboard/api.go:364` | +| `GET` | `/api/compliance/posture` | Merger or owner | Posture-check catalogue, effective interval / window / history retention, and the latest run (`compliance.PostureRun`: schedule/manual trigger, `triggered_by` identity, and per-check `pass`/`fail`/`skip`/`error`, detail, control ids, evidence refs); `?since=` (RFC 3339, `YYYY-MM-DD` or a look-back such as `168h`) adds every run since then, oldest first, capped at 1000 — see [Compliance](../compliance.md#posture-checks-catalogue) ([#11079](https://github.com/hivecommons/hive/issues/11079)) | `pkg/dashboard/api.go:365` | +| `POST` | `/api/compliance/posture/run` | Merger or owner | Run the posture checks now, attributed to the authenticated user, and record the pass in the history; audited as `compliance_posture_run`; `409` when no framework is selected or a pass is already running ([#11079](https://github.com/hivecommons/hive/issues/11079)) | `pkg/dashboard/api.go:366` | +| `GET` | `/api/compliance/posture/history` | Owner only | Posture history for `?since=`/`?until=` (default the last 30 days) as one series per check: points (`at`, `status`), status counts, `last_fail_at` and the latest result with detail and evidence refs; at most the 1000 most recent runs — see [Compliance](../compliance.md#evidence-exports-and-attestations) ([#11081](https://github.com/hivecommons/hive/issues/11081)) | `pkg/dashboard/api.go:367` | +| `GET` | `/api/compliance/export` | Owner only | Evidence download for `?since=`/`?until=`: `kind=controls` (`json`/`md`), `posture` (`json`/`csv`), `audit` (`json`), `config` (redacted effective config + sha256, `json`), `attestations` (`json`/`csv`) or `bundle` (`json`). Every format includes source, period, generator, selected profile versions, attesters, retention and a per-section SHA-256 manifest; audited as `compliance_export` with the SHA-256 of the delivered bytes ([#11081](https://github.com/hivecommons/hive/issues/11081), [#13582](https://github.com/hivecommons/hive/issues/13582)) | `pkg/dashboard/api.go:368` | +| `GET` | `/api/compliance/attestations` | Owner only | Owner attestations, newest first (`?framework=` filters) ([#11081](https://github.com/hivecommons/hive/issues/11081)) | `pkg/dashboard/api.go:369` | +| `POST` | `/api/compliance/attestations` | Owner only | Record `{"framework", "reviewed_on", "note"}` for the signed-in owner; audited as `compliance_attestation`; `201` with the attestation, `400` for an unknown framework, a bad or future date, or a note over 2000 characters ([#11081](https://github.com/hivecommons/hive/issues/11081)) | `pkg/dashboard/api.go:370` | +| `PUT` | `/api/config/governor/compliance` | Owner only | Settings → Compliance framework picker: `{"frameworks": [...]}` sets `compliance.frameworks` (empty list deselects all, absent key leaves it unchanged; unknown/duplicate ids are a `400` before any change); audited as `config_compliance`; returns the re-evaluated `compliance.Report` ([#11080](https://github.com/hivecommons/hive/issues/11080)) | `pkg/dashboard/api.go:539` | | `GET` | `/api/config/governor/threshold-scaling` | Owner only | Governor Threshold Scaling Get | `pkg/dashboard/api.go:219` | | `PUT` | `/api/config/governor/threshold-scaling` | Owner only | Governor Threshold Scaling Set | `pkg/dashboard/api.go:220` | @@ -94,8 +94,8 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | `PUT` | `/api/config/governor/watchdog` | Owner only | Governor Watchdog | `pkg/dashboard/api.go:229` | | `GET` | `/api/config/escalation` | Owner only | Escalation Config Get | `pkg/dashboard/api.go:232` | | `PUT` | `/api/config/escalation` | Owner only | Escalation Config Set | `pkg/dashboard/api.go:233` | -| `GET` | `/api/config/write-surface` | Owner only | Lane write allowlist (`write_surface.allowlist`, [#9587](https://github.com/hivecommons/hive/issues/9587)): `allowlist`, `ops`, `warnings` | `pkg/dashboard/api.go:534` | -| `PUT` | `/api/config/write-surface` | Owner only | Replace the lane write allowlist; `{"allowlist": {}}` clears it; unknown operation or bad lane name is a 400 with nothing changed | `pkg/dashboard/api.go:535` | +| `GET` | `/api/config/write-surface` | Owner only | Lane write allowlist (`write_surface.allowlist`, [#9587](https://github.com/hivecommons/hive/issues/9587)): `allowlist`, `ops`, `warnings` | `pkg/dashboard/api.go:535` | +| `PUT` | `/api/config/write-surface` | Owner only | Replace the lane write allowlist; `{"allowlist": {}}` clears it; unknown operation or bad lane name is a 400 with nothing changed | `pkg/dashboard/api.go:536` | | `GET` | `/api/config/review` | Dashboard auth/session | Review Config Get | `pkg/dashboard/api.go:236` | | `PUT` | `/api/config/review` | Owner only | Review Config Set | `pkg/dashboard/api.go:239` | | `PUT` | `/api/config/governor/features` | Owner only | Governor Features | `pkg/dashboard/api.go:245` | diff --git a/src/docs/api-reference/dashboard-misc.md b/src/docs/api-reference/dashboard-misc.md index 63af99a4d8..f893a521f4 100644 --- a/src/docs/api-reference/dashboard-misc.md +++ b/src/docs/api-reference/dashboard-misc.md @@ -25,7 +25,7 @@ The monitor renders CI and Review concurrently on one shared PR row; see | Method | Path | Auth | Purpose | Source | |---|---|---|---|---| | `GET` | `/api/audit` | Read-write role | Audit Log — `{"entries": [...]}` envelope, newest first, capped at 200; response shape and the serve-time `user_name` field in [audit-log.md](../audit-log.md#get-apiaudit) | `pkg/dashboard/api.go:62` | -| `GET` | `/api/watchdog/activity` | Read-write role | Watchdog activity readout for the Health tab (#7254): `watchdog-*` audit actions over `?days=` (default 30, clamped to 90) — total / taken / observed / `byAction`, a zero-filled per-day `daily` histogram, per-agent `agents` liveness, and the Observe → Heal `promotion` hint; see [agent-watchdog.md](../agent-watchdog.md#watchdog-activity-strip) | `pkg/dashboard/api.go:508` | +| `GET` | `/api/watchdog/activity` | Read-write role | Watchdog activity readout for the Health tab (#7254): `watchdog-*` audit actions over `?days=` (default 30, clamped to 90) — total / taken / observed / `byAction`, a zero-filled per-day `daily` histogram, per-agent `agents` liveness, and the Observe → Heal `promotion` hint; see [agent-watchdog.md](../agent-watchdog.md#watchdog-activity-strip) | `pkg/dashboard/api.go:509` | | `POST` | `/api/presence` | Dashboard auth/session | Presence | `pkg/dashboard/api.go:65` | | `POST` | `/api/upgrade/announce` | Owner role | Announce a pod roll before it happens ([#15788](https://github.com/hivecommons/hive/issues/15788)): body `{"target": "", "source": "hub"|"operator", "reason": "..."}` (`version` is an alias of `target`; all fields optional). Marks `/api/status`/`/api/version` `upgradeProgress` as `state: pulling, phase: announced` with the target and publishes an SSE `upgrading` event so every open dashboard shows the upgrade animation; a SIGTERM afterwards (or with no announce at all) publishes `phase: restarting` from the same record. The hub sends the same announce through the heartbeat response (`upgrade_announce`) for hub-managed hives; an announce with no kill expires after 15 minutes. Returns `{ok, upgradeProgress}` | `pkg/dashboard/api.go:68` | | `GET` | `/api/prompt-history` | Dashboard auth/session | Prompt History | `pkg/dashboard/api.go:66` | @@ -40,18 +40,18 @@ The monitor renders CI and Review concurrently on one shared PR row; see | `GET` | `/api/convergence/soak` | Owner only | Convergence Soak Status | `pkg/dashboard/api.go:263` | -| `POST` | `/api/plan/from-issue` | Dashboard auth/session | Plan From Issue | `pkg/dashboard/api.go:460` | -| `GET` | `/api/plan/{epicID}` | Dashboard auth/session | Plan Tree | `pkg/dashboard/api.go:463` | -| `POST` | `/api/plan/{epicID}/approve` | Owner only | Plan Approve | `pkg/dashboard/api.go:464` | -| `POST` | `/api/plan/{epicID}/reject` | Owner only | Plan Reject | `pkg/dashboard/api.go:466` | -| `POST` | `/api/plan/{epicID}/child/{childID}` | Owner only | Plan Child Action | `pkg/dashboard/api.go:467` | +| `POST` | `/api/plan/from-issue` | Dashboard auth/session | Plan From Issue | `pkg/dashboard/api.go:461` | +| `GET` | `/api/plan/{epicID}` | Dashboard auth/session | Plan Tree | `pkg/dashboard/api.go:464` | +| `POST` | `/api/plan/{epicID}/approve` | Owner only | Plan Approve | `pkg/dashboard/api.go:465` | +| `POST` | `/api/plan/{epicID}/reject` | Owner only | Plan Reject | `pkg/dashboard/api.go:467` | +| `POST` | `/api/plan/{epicID}/child/{childID}` | Owner only | Plan Child Action | `pkg/dashboard/api.go:468` | | `POST` | `/api/linear/agent/install` | Owner only | Linear Agent Install (OAuth start) | `pkg/dashboard/api_linear_agent.go:215` | | `GET` | `/api/linear/agent/status` | Owner only | Linear Agent Status | `pkg/dashboard/api_linear_agent.go:216` | | `POST` | `/api/linear/agent/disconnect` | Owner only | Linear Agent Disconnect | `pkg/dashboard/api_linear_agent.go:217` | | `GET` | `/api/upstream-watch` | Owner only | Upstream-watch divergence: per watched fork the upstream followed, the watermark and last-run time, surfaced/ported/dismissed/skipped counts, and the recent upstream refs with their upstream URL, diff URL, fork issue number and state. Read-only — it reads the config and the watch state file, never GitHub. Also carries `interval`, `project_repos` and each repo's configured entry (`config`) for the editor. | `pkg/dashboard/api.go:305` | | `PUT` | `/api/config/upstream-watch` | Owner only | Upstream Watch Config Update: edit `upstream_watch` from the Features tab. Body `{enabled?, interval?, repos?: {: {upstream?, sources?, pr_labels?, max_issues_per_run?, label?} \| null}}` — absent keys are unchanged, `null` removes a repo, keys are stored as the bare repo name. Validated with the loader's rules before the config changes (400 on failure), then persisted and audited as `config_upstream_watch`. | `pkg/dashboard/api.go:306` | -| `GET` | `/api/hotspots` | Dashboard auth/session | Merge-hotspot advisor report (`?repo=owner/name` optional): files repeatedly touched by concurrent PRs over the last `governor.hotspot_window_days`, each with `prs` (distinct PRs), `pr_numbers`, `overlaps` (PR pairs open at the same time), `conflicts` (rebase conflicts blamed on the file), `lines`, `kind` (`code`/`doc`/`lock`/`generated`/`data`), `score`, `symbol_groups`, `recommendation` (`split-code`/`split-doc`/`split-source`/`report-only`/`none`), `reason`, `generated_from`, `source_files` (files under `generated_from`, when known), `issue_number`/`issue_url` of the modularize issue filed, `last_updated`; top-level `count`/`actionable`/`filed`. Derived from the merge train's own PR file lists and the rebase follow-through's conflict records — never lists PRs or files from GitHub. See [operator-reference.md § Merge-hotspot advisor](../operator-reference.md#merge-hotspot-advisor-governorhotspot_). | `pkg/dashboard/api.go:545` | +| `GET` | `/api/hotspots` | Dashboard auth/session | Merge-hotspot advisor report (`?repo=owner/name` optional): files repeatedly touched by concurrent PRs over the last `governor.hotspot_window_days`, each with `prs` (distinct PRs), `pr_numbers`, `overlaps` (PR pairs open at the same time), `conflicts` (rebase conflicts blamed on the file), `lines`, `kind` (`code`/`doc`/`lock`/`generated`/`data`), `score`, `symbol_groups`, `recommendation` (`split-code`/`split-doc`/`split-source`/`report-only`/`none`), `reason`, `generated_from`, `source_files` (files under `generated_from`, when known), `issue_number`/`issue_url` of the modularize issue filed, `last_updated`; top-level `count`/`actionable`/`filed`. Derived from the merge train's own PR file lists and the rebase follow-through's conflict records — never lists PRs or files from GitHub. See [operator-reference.md § Merge-hotspot advisor](../operator-reference.md#merge-hotspot-advisor-governorhotspot_). | `pkg/dashboard/api.go:546` | | `GET` | `/api/widget` | Dashboard auth/session | Widget | `pkg/dashboard/api.go:117` | | `GET` | `/api/pane/{agent}` | Dashboard auth/session | Pane | `pkg/dashboard/api.go:122` | | `GET` | `/api/role` | Dashboard auth/session | Role | `pkg/dashboard/api.go:136` | @@ -62,11 +62,11 @@ The monitor renders CI and Review concurrently on one shared PR row; see | `GET` | `/api/stage-tracker` | Dashboard auth/session | Stage Tracker: every open issue and pull request of the watched repos for the Hive activity monitor — actionable, held, claimed, in-progress, covered-by-PR, filtered (`needs-*`), draft and exempt-labelled items alike, each with `stage`, `stage_since`, `labels`, `created_at`, `author_kind`, `modifiers`, `claimant: {kind: hive-agent|clanker|person, login, agent, hive, since, source: claim-ledger|claim-comment|assignee|kick-history|author}` naming who holds a claimed / in-progress issue or a PR under review or rework (absent when nobody is named; mirrored onto `linked_prs[]`), (PRs) `sentinel_alert` / `sentinel_findings` / `sentinel_reason` when the sentinel flagged the PR, `decision_needed` on a row parked on a person (085 / 045 / 015, the needs-human pill; mirrored onto the issue's `linked_prs[]` entry): `{question, asked_by, since, blocker, blocker_reason, options: [{action, label, enabled, reason_if_disabled}]}` — the reviewer's own decision question when the verdict record has one, the blocker in plain words, and the applicable actions under the row context menu's action ids (`decide:delegate` first), (PRs) `lineage` on the hive's copy of an adopted PR — `{kind: adopted|superseded|rebased-by-hive, from_number, from_url, from_author, from_author_kind, to_number, to_url, at, reason}`, derived from the stage store's adoption record or the `hive/adopt-` head branch, mirrored onto the issue's `linked_prs[]` entry; absent on every other row — and (issues) `linked_prs`; items with no stage yet report stage `0` "Open"; `needs_human_labels` is the "a person must act" label set behind the monitor's Needs human facet (the same list as `/api/status.labelPresets[needs-human]`); `recently_merged` lists the PRs (`repo`, `number`, `merged_at`) whose `pr_merged` audit entry is under 30 minutes old, so a client diffing two payloads can tell a merge from a close; a PR in a conflict-aware merge train carries `merge_train` `{id, state, front, position, size, attempt, max_attempts, overlap_files, ahead, length, head_number, head_state, head_reason, head_since, eta_s, eta_at, eta_basis, late, stalled, stalled_s}` — `head_state` one of `needs-human` / `ci` / `soaking` / `ready` / `merging` / `fixing` / `unknown` with `head_reason` in plain words; `eta_s` / `eta_at` the estimated wait for this member's own merge attempt (own remaining soak + each PR ahead's remaining soak or one sweep + the next sweep tick; absent while the head waits on a person or CI), `eta_at` anchored to the member's first estimate at its position so a countdown survives polls, `eta_basis` its short reading ("2 ahead · head soaking 12m · next sweep in 40s"), `late` once now has overrun the first estimate twice over, `stalled` / `stalled_s` once the head has sat longer than `governor.merge_train_stall_warn_s` ([#15395](https://github.com/hivecommons/hive/issues/15395)); a PR the queue holds because another open PR declares the same `Fixes #N` carries no `merge_train` and a `merge_gate` of `{state: "duplicate-of:", duplicate_of, duplicate_issue}` plus the `needs-decision` modifier (the queue keeps one PR per issue: green first, then the earlier-opened); a PR GitHub reports conflicting on its own, or one under repair (stage/070, 071, 072, 074, 085, or a red required check), carries no `merge_train` and is not counted in any member's `size` / `length` — a repaired member the view dropped carries `left_train: {why: fixing|needs-author|returned-to-contributor|adopted-by-hive|needs-decision|checks-failing, note}` instead (mirrored onto the issue's `linked_prs[]` entry), and a train left with one member reports no `merge_train` at all; a PR short of the merge queue (below stage/080) the planner ordered rides no train either — it carries `overlap: {behind, with, files, note}` ("overlaps #15637 (sidebar.html, index.html) — will queue behind it") and no `merge_train`, and counts in no member's `size` — the state slugs (`front`, `queued-behind`) are payload values only, the SPA renders ordinal places ("Queued for merge · 1st of 2", with the train's tag when more than one train is on the page). Served from a server-side cache rebuilt at most every `dashboard.stage_tracker.cache_ttl_s` (default `governor.eval_interval_s`) from the spoke's existing snapshot — a request never calls GitHub. Carries `generated_at`, `source` (`cache` or `fresh`), `cache_ttl_s`, an `ETag` and `Cache-Control: private, max-age=`; `If-None-Match` yields 304. Each hit is recorded under REST caller `dashboard:stage-tracker` so `/api/gh-rate-limits` shows it charged nothing. | `pkg/dashboard/api.go:190` | | `GET` | `/api/matrix/lines` | Dashboard auth/session | Matrix Lines (deprecated name, see [Published-checkpoint regions](#published-checkpoint-regions)): serve bounded backlog of pushed lines behind dashboard.matrix with repo allowlist filtering. `max` counts only lines the repo allowlist admits, so a page is never emptied by filtered-out lines. A client paging with `max` should use the last returned line's `seq` as its next `since`, not the top-level `seq`, which is the source's latest sequence number and would skip lines still past the page. `more` is true only while another line the caller may see remains past the page; stop paging when it is false. | `pkg/dashboard/api.go:191` | | `POST` | `/api/prs/{owner}/{repo}/{number}/queue-automerge` | Merger/owner role | Queue PRAuto Merge | `pkg/dashboard/api.go:192` | -| `GET` | `/api/inference/models/{backend}` | Dashboard auth/session | Inference Models | `pkg/dashboard/api.go:376` | -| `GET` | `/api/hive-id` | Dashboard auth/session | Hive IDGet | `pkg/dashboard/api.go:439` | -| `PUT` | `/api/hive-id` | Owner only | Hive IDSet | `pkg/dashboard/api.go:440` | -| `POST` | `/api/chat` | Dashboard auth/session | Chat | `pkg/dashboard/api.go:469` | -| `GET` | `/api/auth/token` | Public | Auth Token | `pkg/dashboard/api.go:503` | +| `GET` | `/api/inference/models/{backend}` | Dashboard auth/session | Inference Models | `pkg/dashboard/api.go:377` | +| `GET` | `/api/hive-id` | Dashboard auth/session | Hive IDGet | `pkg/dashboard/api.go:440` | +| `PUT` | `/api/hive-id` | Owner only | Hive IDSet | `pkg/dashboard/api.go:441` | +| `POST` | `/api/chat` | Dashboard auth/session | Chat | `pkg/dashboard/api.go:470` | +| `GET` | `/api/auth/token` | Public | Auth Token | `pkg/dashboard/api.go:504` | | `GET` | `/api/v1/` | GitHub token | Contributor v1 API dispatcher | `pkg/dashboard/api_contribute.go:350` | | `POST` | `/api/v1/` | GitHub token | Contributor v1 API dispatcher | `pkg/dashboard/api_contribute.go:351` | | `GET` | `/api/docs` | Dashboard auth/session | APIDocs | `pkg/dashboard/api_contribute.go:352` | diff --git a/src/docs/api-reference/inception.md b/src/docs/api-reference/inception.md index 87aa1ac754..9446f8926b 100644 --- a/src/docs/api-reference/inception.md +++ b/src/docs/api-reference/inception.md @@ -5,17 +5,17 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | Method | Path | Auth | Purpose | Source | |---|---|---|---|---| -| `POST` | `/api/inception/start` | Owner only | Inception Start | `pkg/dashboard/api.go:442` | -| `POST` | `/api/inception/scan` | Owner only | Inception Scan | `pkg/dashboard/api.go:443` | -| `GET` | `/api/inception/state` | Dashboard auth/session | Inception State | `pkg/dashboard/api.go:444` | -| `POST` | `/api/inception/questions` | Owner only | Inception Set Questions | `pkg/dashboard/api.go:445` | -| `POST` | `/api/inception/answer` | Owner only | Inception Answer | `pkg/dashboard/api.go:446` | -| `POST` | `/api/inception/facts` | Owner only | Inception Record Facts | `pkg/dashboard/api.go:447` | -| `GET` | `/api/inception/scaffold` | Dashboard auth/session | Inception Scaffold | `pkg/dashboard/api.go:448` | -| `POST` | `/api/inception/approve` | Owner only | Inception Approve | `pkg/dashboard/api.go:449` | -| `POST` | `/api/inception/reset` | Owner only | Inception Reset | `pkg/dashboard/api.go:450` | -| `GET` | `/api/inception/ideation-facts` | Dashboard auth/session | Inception Ideation Facts | `pkg/dashboard/api.go:451` | -| `GET` | `/api/inception/download` | Dashboard auth/session | Inception Download | `pkg/dashboard/api.go:452` | -| `GET` | `/api/inception/has-files` | Dashboard auth/session | Inception Has Files | `pkg/dashboard/api.go:453` | -| `PUT` | `/api/inception/wiki-name` | Owner only | Inception Rename Wiki | `pkg/dashboard/api.go:454` | -| `POST` | `/api/inception/import` | Owner only | Inception Import | `pkg/dashboard/api.go:455` | +| `POST` | `/api/inception/start` | Owner only | Inception Start | `pkg/dashboard/api.go:443` | +| `POST` | `/api/inception/scan` | Owner only | Inception Scan | `pkg/dashboard/api.go:444` | +| `GET` | `/api/inception/state` | Dashboard auth/session | Inception State | `pkg/dashboard/api.go:445` | +| `POST` | `/api/inception/questions` | Owner only | Inception Set Questions | `pkg/dashboard/api.go:446` | +| `POST` | `/api/inception/answer` | Owner only | Inception Answer | `pkg/dashboard/api.go:447` | +| `POST` | `/api/inception/facts` | Owner only | Inception Record Facts | `pkg/dashboard/api.go:448` | +| `GET` | `/api/inception/scaffold` | Dashboard auth/session | Inception Scaffold | `pkg/dashboard/api.go:449` | +| `POST` | `/api/inception/approve` | Owner only | Inception Approve | `pkg/dashboard/api.go:450` | +| `POST` | `/api/inception/reset` | Owner only | Inception Reset | `pkg/dashboard/api.go:451` | +| `GET` | `/api/inception/ideation-facts` | Dashboard auth/session | Inception Ideation Facts | `pkg/dashboard/api.go:452` | +| `GET` | `/api/inception/download` | Dashboard auth/session | Inception Download | `pkg/dashboard/api.go:453` | +| `GET` | `/api/inception/has-files` | Dashboard auth/session | Inception Has Files | `pkg/dashboard/api.go:454` | +| `PUT` | `/api/inception/wiki-name` | Owner only | Inception Rename Wiki | `pkg/dashboard/api.go:455` | +| `POST` | `/api/inception/import` | Owner only | Inception Import | `pkg/dashboard/api.go:456` | diff --git a/src/docs/api-reference/knowledge.md b/src/docs/api-reference/knowledge.md index 8c52923008..dacadb8729 100644 --- a/src/docs/api-reference/knowledge.md +++ b/src/docs/api-reference/knowledge.md @@ -5,38 +5,38 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | Method | Path | Auth | Purpose | Source | |---|---|---|---|---| -| `GET` | `/api/knowledge` | Dashboard auth/session | Paginated knowledge facts: `type` filter, `limit` (default 50, max 200; invalid/non-positive values use the default), `offset` (default 0). Returns `enabled`, `facts`, `count` (this page), `total`, `limit`, `offset`, `has_more`; ordered by layer then slug. Offsets are not snapshot cursors: concurrent edits may shift pages. | `pkg/dashboard/api.go:378` | -| `GET` | `/api/knowledge/export` | Dashboard auth/session | Knowledge Export | `pkg/dashboard/api.go:379` | -| `POST` | `/mcp/knowledge` | Public (read-only) when the dashboard setting or `HIVE_PUBLIC_KNOWLEDGE` is on; otherwise 404 to a signed-in caller and 401 to one who is not | Public Knowledge MCP endpoint — `initialize`, `tools/list`, `tools/call` for `knowledge_search`/`knowledge_toc`/`knowledge_get`/`knowledge_export` ([docs](../public-knowledge-mcp.md)) | `pkg/dashboard/api.go:388` | -| `GET` | `/api/knowledge/search` | Dashboard auth/session | Knowledge Search | `pkg/dashboard/api.go:380` | -| `GET` | `/api/knowledge/toc` | Dashboard auth/session | Scoped knowledge table of contents: capped, body-free entries (`id`, `title`, `type`, `layer`, `repo`, `tags`, `status`, `confidence`, `updated`, `size_bytes`, `source`) plus `total`/`returned`/`truncated`. Query: `layers`, `repos`, `types`, `tags` (comma-separated), `limit` (default 50, max 200), `include_states` (operator opt-in for `draft`/`deprecated`/`superseded`/`all`), `format=prompt` with `max_chars` for a bounded markdown rendering, `agent` to apply that agent's `knowledge.agent_scopes` entry (the other parameters can only narrow it). Approved knowledge only by default ([docs](../knowledge-toc.md)) | `pkg/dashboard/api.go:381` | -| `GET` | `/api/knowledge/effective` | Dashboard auth/session | Effective knowledge for one agent (`agent` required): the agent's `knowledge.agent_scopes` entry (unrestricted when it has none) intersected with the request scope (approved only unless `include_states` is set). Returns `scope` (resolved scope applied, with `configured`), `included` TOC entries, `excluded` entries each with a `reason` (`lifecycle`, `layer`, `repo`, `type` or `tag` — first failing check, in that order), `included_total`/`excluded_total`/`included_returned`/`excluded_returned` and `truncated`; `limit` caps each list (default 50, max 200) ([docs](../knowledge-toc.md#effective-knowledge)) | `pkg/dashboard/api.go:382` | -| `GET` | `/api/knowledge/entry/{id}` | Dashboard auth/session | Full read of one knowledge entry: `markdown` (front-matter plus body) and the fact. Takes the same scope, `include_states` and `agent` query as the table of contents and returns 404 for an entry outside it ([docs](../knowledge-toc.md)) | `pkg/dashboard/api.go:383` | -| `POST` | `/api/knowledge/cli-memory/drain-legacy` | Owner only | One-shot drain of the shared home's legacy Claude memory (`/data/home/.claude/projects/*/memory`) into `state: draft` entries in `bead-synth-wiki`, tagged `cli-memory` and `agent:shared`, deduplicated by content hash. Body `{"truncate": bool}` (default false) empties only files whose every fact is now stored. Returns `store`, `agent`, `sources`, `drained`, `dupes`, `skipped`, `truncate`, `truncated`, `kept`, `errors`; 409 when the vault is not connected. Audited as `knowledge_drain_legacy_memory` ([docs](../knowledge-lifecycle.md#auto-memory-drafts)) | `pkg/dashboard/api.go:385` | -| `GET` | `/api/knowledge/public` | Dashboard auth/session | Public Knowledge MCP sharing status (`enabled`, `tags`, `source`, endpoint URL) | `pkg/dashboard/api.go:389` | -| `PUT` | `/api/knowledge/public` | Owner only | Persist public Knowledge MCP sharing setting; overrides env vars until changed | `pkg/dashboard/api.go:390` | -| `GET` | `/api/knowledge/health` | Dashboard auth/session | Knowledge Health | `pkg/dashboard/api.go:391` | -| `GET` | `/api/knowledge/stats` | Dashboard auth/session | Knowledge Stats | `pkg/dashboard/api.go:392` | -| `GET` | `/api/knowledge/graph` | Dashboard auth/session | Knowledge Graph | `pkg/dashboard/api.go:393` | -| `GET` | `/api/knowledge/fact-history` | Dashboard auth/session | Fact History | `pkg/dashboard/api.go:394` | -| `POST` | `/api/knowledge/create` | Dashboard auth/session | Create one fact (`title`, `body`, `type`, `tags`, `layer`, `confidence`, `state`). `state` is `approved` (default) or `draft`; a draft is written with `state: draft` into the local channel named by `layer` (400 when there is none, 409 when its title already names an entry). A request tagged `cli-memory` must be a draft carrying only `cli-memory`, `agent:`, `cli:`, `memhash:` and `repo:/` tags (400 otherwise) | `pkg/dashboard/api.go:395` | -| `POST` | `/api/knowledge/import` | Dashboard auth/session | Knowledge Import | `pkg/dashboard/api.go:396` | -| `POST` | `/api/knowledge/promote` | Dashboard auth/session | Knowledge Promote | `pkg/dashboard/api.go:402` | -| `GET` | `/api/knowledge/subscriptions` | Dashboard auth/session | Knowledge Subs List | `pkg/dashboard/api.go:403` | -| `POST` | `/api/knowledge/subscriptions` | Dashboard auth/session | Knowledge Subs Add | `pkg/dashboard/api.go:404` | -| `DELETE` | `/api/knowledge/subscriptions` | Dashboard auth/session | Knowledge Subs Remove | `pkg/dashboard/api.go:405` | -| `PUT` | `/api/knowledge/{layer}/{slug}` | Dashboard auth/session | Knowledge Update | `pkg/dashboard/api.go:406` | -| `DELETE` | `/api/knowledge/{layer}/{slug}` | Dashboard auth/session | Knowledge Delete | `pkg/dashboard/api.go:407` | -| `GET` | `/api/knowledge/{layer}` | Dashboard auth/session | Knowledge Layer | `pkg/dashboard/api.go:408` | -| `GET` | `/api/knowledge/{layer}/{slug}` | Dashboard auth/session | Knowledge Fact | `pkg/dashboard/api.go:409` | -| `PUT` | `/api/knowledge/enabled` | Owner only | Knowledge Toggle | `pkg/dashboard/api.go:410` | -| `GET` | `/api/knowledge/bead-synthesizer` | Dashboard auth/session | Bead Synth Status | `pkg/dashboard/api.go:411` | -| `PUT` | `/api/knowledge/bead-synthesizer/enabled` | Owner only | Bead Synth Toggle | `pkg/dashboard/api.go:412` | -| `GET` | `/api/knowledge/vaults` | Dashboard auth/session | Vaults List | `pkg/dashboard/api.go:413` | -| `POST` | `/api/knowledge/vaults` | Owner only | Vaults Connect | `pkg/dashboard/api.go:414` | -| `DELETE` | `/api/knowledge/vaults` | Dashboard auth/session | Vaults Disconnect | `pkg/dashboard/api.go:415` | -| `POST` | `/api/knowledge/vaults/reindex` | Dashboard auth/session | Vaults Reindex | `pkg/dashboard/api.go:416` | -| `GET` | `/api/knowledge/vaults/{name}/facts` | Dashboard auth/session | Vault Facts | `pkg/dashboard/api.go:417` | +| `GET` | `/api/knowledge` | Dashboard auth/session | Paginated knowledge facts: `type` filter, `limit` (default 50, max 200; invalid/non-positive values use the default), `offset` (default 0). Returns `enabled`, `facts`, `count` (this page), `total`, `limit`, `offset`, `has_more`; ordered by layer then slug. Offsets are not snapshot cursors: concurrent edits may shift pages. | `pkg/dashboard/api.go:379` | +| `GET` | `/api/knowledge/export` | Dashboard auth/session | Knowledge Export | `pkg/dashboard/api.go:380` | +| `POST` | `/mcp/knowledge` | Public (read-only) when the dashboard setting or `HIVE_PUBLIC_KNOWLEDGE` is on; otherwise 404 to a signed-in caller and 401 to one who is not | Public Knowledge MCP endpoint — `initialize`, `tools/list`, `tools/call` for `knowledge_search`/`knowledge_toc`/`knowledge_get`/`knowledge_export` ([docs](../public-knowledge-mcp.md)) | `pkg/dashboard/api.go:389` | +| `GET` | `/api/knowledge/search` | Dashboard auth/session | Knowledge Search | `pkg/dashboard/api.go:381` | +| `GET` | `/api/knowledge/toc` | Dashboard auth/session | Scoped knowledge table of contents: capped, body-free entries (`id`, `title`, `type`, `layer`, `repo`, `tags`, `status`, `confidence`, `updated`, `size_bytes`, `source`) plus `total`/`returned`/`truncated`. Query: `layers`, `repos`, `types`, `tags` (comma-separated), `limit` (default 50, max 200), `include_states` (operator opt-in for `draft`/`deprecated`/`superseded`/`all`), `format=prompt` with `max_chars` for a bounded markdown rendering, `agent` to apply that agent's `knowledge.agent_scopes` entry (the other parameters can only narrow it). Approved knowledge only by default ([docs](../knowledge-toc.md)) | `pkg/dashboard/api.go:382` | +| `GET` | `/api/knowledge/effective` | Dashboard auth/session | Effective knowledge for one agent (`agent` required): the agent's `knowledge.agent_scopes` entry (unrestricted when it has none) intersected with the request scope (approved only unless `include_states` is set). Returns `scope` (resolved scope applied, with `configured`), `included` TOC entries, `excluded` entries each with a `reason` (`lifecycle`, `layer`, `repo`, `type` or `tag` — first failing check, in that order), `included_total`/`excluded_total`/`included_returned`/`excluded_returned` and `truncated`; `limit` caps each list (default 50, max 200) ([docs](../knowledge-toc.md#effective-knowledge)) | `pkg/dashboard/api.go:383` | +| `GET` | `/api/knowledge/entry/{id}` | Dashboard auth/session | Full read of one knowledge entry: `markdown` (front-matter plus body) and the fact. Takes the same scope, `include_states` and `agent` query as the table of contents and returns 404 for an entry outside it ([docs](../knowledge-toc.md)) | `pkg/dashboard/api.go:384` | +| `POST` | `/api/knowledge/cli-memory/drain-legacy` | Owner only | One-shot drain of the shared home's legacy Claude memory (`/data/home/.claude/projects/*/memory`) into `state: draft` entries in `bead-synth-wiki`, tagged `cli-memory` and `agent:shared`, deduplicated by content hash. Body `{"truncate": bool}` (default false) empties only files whose every fact is now stored. Returns `store`, `agent`, `sources`, `drained`, `dupes`, `skipped`, `truncate`, `truncated`, `kept`, `errors`; 409 when the vault is not connected. Audited as `knowledge_drain_legacy_memory` ([docs](../knowledge-lifecycle.md#auto-memory-drafts)) | `pkg/dashboard/api.go:386` | +| `GET` | `/api/knowledge/public` | Dashboard auth/session | Public Knowledge MCP sharing status (`enabled`, `tags`, `source`, endpoint URL) | `pkg/dashboard/api.go:390` | +| `PUT` | `/api/knowledge/public` | Owner only | Persist public Knowledge MCP sharing setting; overrides env vars until changed | `pkg/dashboard/api.go:391` | +| `GET` | `/api/knowledge/health` | Dashboard auth/session | Knowledge Health | `pkg/dashboard/api.go:392` | +| `GET` | `/api/knowledge/stats` | Dashboard auth/session | Knowledge Stats | `pkg/dashboard/api.go:393` | +| `GET` | `/api/knowledge/graph` | Dashboard auth/session | Knowledge Graph | `pkg/dashboard/api.go:394` | +| `GET` | `/api/knowledge/fact-history` | Dashboard auth/session | Fact History | `pkg/dashboard/api.go:395` | +| `POST` | `/api/knowledge/create` | Dashboard auth/session | Create one fact (`title`, `body`, `type`, `tags`, `layer`, `confidence`, `state`). `state` is `approved` (default) or `draft`; a draft is written with `state: draft` into the local channel named by `layer` (400 when there is none, 409 when its title already names an entry). A request tagged `cli-memory` must be a draft carrying only `cli-memory`, `agent:`, `cli:`, `memhash:` and `repo:/` tags (400 otherwise) | `pkg/dashboard/api.go:396` | +| `POST` | `/api/knowledge/import` | Dashboard auth/session | Knowledge Import | `pkg/dashboard/api.go:397` | +| `POST` | `/api/knowledge/promote` | Dashboard auth/session | Knowledge Promote | `pkg/dashboard/api.go:403` | +| `GET` | `/api/knowledge/subscriptions` | Dashboard auth/session | Knowledge Subs List | `pkg/dashboard/api.go:404` | +| `POST` | `/api/knowledge/subscriptions` | Dashboard auth/session | Knowledge Subs Add | `pkg/dashboard/api.go:405` | +| `DELETE` | `/api/knowledge/subscriptions` | Dashboard auth/session | Knowledge Subs Remove | `pkg/dashboard/api.go:406` | +| `PUT` | `/api/knowledge/{layer}/{slug}` | Dashboard auth/session | Knowledge Update | `pkg/dashboard/api.go:407` | +| `DELETE` | `/api/knowledge/{layer}/{slug}` | Dashboard auth/session | Knowledge Delete | `pkg/dashboard/api.go:408` | +| `GET` | `/api/knowledge/{layer}` | Dashboard auth/session | Knowledge Layer | `pkg/dashboard/api.go:409` | +| `GET` | `/api/knowledge/{layer}/{slug}` | Dashboard auth/session | Knowledge Fact | `pkg/dashboard/api.go:410` | +| `PUT` | `/api/knowledge/enabled` | Owner only | Knowledge Toggle | `pkg/dashboard/api.go:411` | +| `GET` | `/api/knowledge/bead-synthesizer` | Dashboard auth/session | Bead Synth Status | `pkg/dashboard/api.go:412` | +| `PUT` | `/api/knowledge/bead-synthesizer/enabled` | Owner only | Bead Synth Toggle | `pkg/dashboard/api.go:413` | +| `GET` | `/api/knowledge/vaults` | Dashboard auth/session | Vaults List | `pkg/dashboard/api.go:414` | +| `POST` | `/api/knowledge/vaults` | Owner only | Vaults Connect | `pkg/dashboard/api.go:415` | +| `DELETE` | `/api/knowledge/vaults` | Dashboard auth/session | Vaults Disconnect | `pkg/dashboard/api.go:416` | +| `POST` | `/api/knowledge/vaults/reindex` | Dashboard auth/session | Vaults Reindex | `pkg/dashboard/api.go:417` | +| `GET` | `/api/knowledge/vaults/{name}/facts` | Dashboard auth/session | Vault Facts | `pkg/dashboard/api.go:418` | | `GET` | `/api/config/knowledge/connectors` | Dashboard auth/session | Knowledge connectors config (name, type, layer, scope, env/file auth reference) and registered types | `pkg/dashboard/api.go` | | `PUT` | `/api/config/knowledge/connectors` | Owner only | Replace `knowledge.connectors` after validation; inline secrets rejected | `pkg/dashboard/api.go` | | `GET` | `/api/config/knowledge/connectors/status` | Dashboard auth/session | Per-connector status pill, last sync, pages/facts, last error, plus the `publish` mirror status | `pkg/dashboard/api.go` | @@ -46,19 +46,19 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | `PUT` | `/api/config/knowledge/agent-scopes` | Owner only | Replace `knowledge.agent_scopes` after validating layer and state names; persisted and audited as `config_knowledge_agent_scopes` | `pkg/dashboard/api.go` | | `GET` | `/api/config/knowledge/pipeline` | Owner only | Scalar bead synthesizer, curator, code map and primer settings, plus the read-only engine, vault paths and primer merge strategy ([docs](../settings.md#knowledge)) | `pkg/dashboard/api.go` | | `PUT` | `/api/config/knowledge/pipeline` | Owner only | Update those settings after `config.ValidateKnowledgePipeline`; 0 or empty restores the default; the bead synthesizer switch applies at once, the rest after a restart; audited as `config_knowledge_pipeline` | `pkg/dashboard/api.go` | -| `GET` | `/api/knowledge/git-sources` | Dashboard auth/session | Git Sources List | `pkg/dashboard/api.go:427` | -| `POST` | `/api/knowledge/git-sources` | Owner only | Git Sources Connect | `pkg/dashboard/api.go:428` | -| `DELETE` | `/api/knowledge/git-sources` | Owner only | Git Sources Disconnect | `pkg/dashboard/api.go:429` | -| `POST` | `/api/knowledge/obsidian/sync` | Dashboard auth/session | Obsidian Sync | `pkg/dashboard/api.go:430` | -| `GET` | `/api/knowledge/documents` | Dashboard auth/session | Documents List | `pkg/dashboard/api.go:431` | -| `POST` | `/api/knowledge/documents` | Dashboard auth/session | Documents Import | `pkg/dashboard/api.go:432` | -| `GET` | `/api/knowledge/documents/{slug}` | Dashboard auth/session | Document Get | `pkg/dashboard/api.go:433` | -| `DELETE` | `/api/knowledge/documents/{slug}` | Dashboard auth/session | Document Delete | `pkg/dashboard/api.go:434` | -| `POST` | `/api/knowledge/documents/{slug}/reimport` | Dashboard auth/session | Document Reimport | `pkg/dashboard/api.go:435` | -| `GET` | `/api/knowledge/context7/search` | Dashboard auth/session | Context7 Search | `pkg/dashboard/api.go:436` | -| `POST` | `/api/knowledge/cleanup-orphans` | Dashboard auth/session | Cleanup Orphans | `pkg/dashboard/api.go:437` | -| `GET` | `/api/knowledge/channels` | Dashboard auth/session | Knowledge Channels List | `pkg/dashboard/api.go:400` | -| `POST` | `/api/knowledge/channels` | Dashboard auth/session | Knowledge Channel Create | `pkg/dashboard/api.go:401` | +| `GET` | `/api/knowledge/git-sources` | Dashboard auth/session | Git Sources List | `pkg/dashboard/api.go:428` | +| `POST` | `/api/knowledge/git-sources` | Owner only | Git Sources Connect | `pkg/dashboard/api.go:429` | +| `DELETE` | `/api/knowledge/git-sources` | Owner only | Git Sources Disconnect | `pkg/dashboard/api.go:430` | +| `POST` | `/api/knowledge/obsidian/sync` | Dashboard auth/session | Obsidian Sync | `pkg/dashboard/api.go:431` | +| `GET` | `/api/knowledge/documents` | Dashboard auth/session | Documents List | `pkg/dashboard/api.go:432` | +| `POST` | `/api/knowledge/documents` | Dashboard auth/session | Documents Import | `pkg/dashboard/api.go:433` | +| `GET` | `/api/knowledge/documents/{slug}` | Dashboard auth/session | Document Get | `pkg/dashboard/api.go:434` | +| `DELETE` | `/api/knowledge/documents/{slug}` | Dashboard auth/session | Document Delete | `pkg/dashboard/api.go:435` | +| `POST` | `/api/knowledge/documents/{slug}/reimport` | Dashboard auth/session | Document Reimport | `pkg/dashboard/api.go:436` | +| `GET` | `/api/knowledge/context7/search` | Dashboard auth/session | Context7 Search | `pkg/dashboard/api.go:437` | +| `POST` | `/api/knowledge/cleanup-orphans` | Dashboard auth/session | Cleanup Orphans | `pkg/dashboard/api.go:438` | +| `GET` | `/api/knowledge/channels` | Dashboard auth/session | Knowledge Channels List | `pkg/dashboard/api.go:401` | +| `POST` | `/api/knowledge/channels` | Dashboard auth/session | Knowledge Channel Create | `pkg/dashboard/api.go:402` | | `GET` | `/api/knowledge/connectors` | Dashboard auth/session | Knowledge connector statuses and publish mirror status (`{"connectors": [...], "publish": {...}\|null}`, see [knowledge-connectors.md](../knowledge-connectors.md)) | `pkg/dashboard/api_knowledge_connectors.go:23` | | `POST` | `/api/knowledge/connectors/{name}/sync` | Owner only | Start one connector sync now (202; 404 unknown, 409 running) | `pkg/dashboard/api_knowledge_connectors.go:24` | | `POST` | `/api/knowledge/publish/sync` | Owner only | Run a publish mirror batch now (202 with publish status; 503 mirror not running, 409 batch in progress) | `pkg/dashboard/api_knowledge_connectors.go:25` | diff --git a/src/docs/api-reference/nous.md b/src/docs/api-reference/nous.md index 70dc9a23f0..c0249cf03f 100644 --- a/src/docs/api-reference/nous.md +++ b/src/docs/api-reference/nous.md @@ -5,28 +5,28 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | Method | Path | Auth | Purpose | Source | |---|---|---|---|---| -| `GET` | `/api/nous/status` | Dashboard auth/session | Nous Status — includes `experimentLoop` (`dir`, `lastWriteAt`, `running`, `idleAfterSeconds`): whether the external experiment loop, the only producer of proposals, has written under `/var/run/nous/governor` within 24 evaluation cycles; ready cards then carry `experimentLoopIdle` ([#12541](https://github.com/hivecommons/hive/issues/12541)) | `pkg/dashboard/api.go:471` | -| `GET` | `/api/nous/ledger` | Dashboard auth/session | Nous Ledger | `pkg/dashboard/api.go:472` | -| `GET` | `/api/nous/principles` | Dashboard auth/session | Nous Principles | `pkg/dashboard/api.go:473` | -| `POST` | `/api/nous/approve` | Owner only | Nous Approve | `pkg/dashboard/api.go:474` | -| `POST` | `/api/nous/abort` | Owner only | Nous Abort | `pkg/dashboard/api.go:475` | -| `PUT` | `/api/nous/mode` | Owner only | Nous Mode | `pkg/dashboard/api.go:476` | -| `PUT` | `/api/nous/scope` | Owner only | Nous Scope | `pkg/dashboard/api.go:477` | -| `GET` | `/api/nous/phase` | Dashboard auth/session | Nous Phase | `pkg/dashboard/api.go:478` | -| `PUT` | `/api/nous/gate-decision` | Owner only | Nous Gate Decision | `pkg/dashboard/api.go:479` | -| `GET` | `/api/nous/gate-pending` | Dashboard auth/session | Nous Gate Pending | `pkg/dashboard/api.go:480` | -| `POST` | `/api/nous/gate-respond` | Owner only | Nous Gate Respond | `pkg/dashboard/api.go:481` | -| `GET` | `/api/nous/gate-response` | Dashboard auth/session | Nous Gate Response | `pkg/dashboard/api.go:482` | -| `GET` | `/api/nous/config` | Dashboard auth/session | Nous Config Get | `pkg/dashboard/api.go:483` | -| `PUT` | `/api/nous/config/goals` | Owner only | Nous Config Goals — legacy; the dashboard no longer exposes the research question in the ⚙ dialog, use `PATCH /api/nous/campaigns/{id}` | `pkg/dashboard/api.go:484` | -| `PUT` | `/api/nous/config/repos` | Owner only | Nous Config Repos — the allow-list of repos experiments may target (empty = any) | `pkg/dashboard/api.go:485` | -| `PUT` | `/api/nous/config/output` | Owner only | Nous Config Output | `pkg/dashboard/api.go:486` | -| `PUT` | `/api/nous/config/fast-fail` | Owner only | Nous Config Fast Fail | `pkg/dashboard/api.go:487` | -| `PUT` | `/api/nous/config/schedule` | Owner only | Nous Config Schedule | `pkg/dashboard/api.go:488` | -| `PUT` | `/api/nous/config/controllables` | Owner only | Nous Config Controllables | `pkg/dashboard/api.go:489` | -| `PUT` | `/api/nous/config/principles` | Owner only | Nous Config Principles | `pkg/dashboard/api.go:490` | -| `DELETE` | `/api/nous/principles/{id}` | Owner only | Nous Delete Principle | `pkg/dashboard/api.go:491` | -| `POST` | `/api/nous/campaign/start` | Owner only | Nous Campaign Start — archives the active campaign and starts a new experiment whose baseline restarts at 0 ([#12501](https://github.com/hivecommons/hive/issues/12501)) | `pkg/dashboard/api.go:492` | -| `GET` | `/api/nous/campaigns` | Any | Nous Campaigns List — every experiment with its per-campaign baseline, scope, results and stage ([#12532](https://github.com/hivecommons/hive/issues/12532)) | `pkg/dashboard/api.go:493` | -| `POST` | `/api/nous/campaigns` | Owner only | Nous Campaigns Create — starts an experiment alongside the running ones; 409 `scope_conflict` when a running experiment shares a repo target or both are hive-wide ([#12532](https://github.com/hivecommons/hive/issues/12532)) | `pkg/dashboard/api.go:494` | -| `PATCH` | `/api/nous/campaigns/{id}` | Owner only | Nous Campaign Patch — pause / resume / archive, or edit question, hypothesis and scope. Hypothesis/tag edits save in place (`status: "updated"`); a changed question or repo set needs `restart: true` (else 409 `restart_required`) and archives the campaign as version N while creating version N+1 with `restartedFrom` (`status: "restarted", campaign, archived`); resume, scope widening and restarts re-run the conflict guard ([#12532](https://github.com/hivecommons/hive/issues/12532)) | `pkg/dashboard/api.go:495` | +| `GET` | `/api/nous/status` | Dashboard auth/session | Nous Status — includes `experimentLoop` (`dir`, `lastWriteAt`, `running`, `idleAfterSeconds`): whether the external experiment loop, the only producer of proposals, has written under `/var/run/nous/governor` within 24 evaluation cycles; ready cards then carry `experimentLoopIdle` ([#12541](https://github.com/hivecommons/hive/issues/12541)) | `pkg/dashboard/api.go:472` | +| `GET` | `/api/nous/ledger` | Dashboard auth/session | Nous Ledger | `pkg/dashboard/api.go:473` | +| `GET` | `/api/nous/principles` | Dashboard auth/session | Nous Principles | `pkg/dashboard/api.go:474` | +| `POST` | `/api/nous/approve` | Owner only | Nous Approve | `pkg/dashboard/api.go:475` | +| `POST` | `/api/nous/abort` | Owner only | Nous Abort | `pkg/dashboard/api.go:476` | +| `PUT` | `/api/nous/mode` | Owner only | Nous Mode | `pkg/dashboard/api.go:477` | +| `PUT` | `/api/nous/scope` | Owner only | Nous Scope | `pkg/dashboard/api.go:478` | +| `GET` | `/api/nous/phase` | Dashboard auth/session | Nous Phase | `pkg/dashboard/api.go:479` | +| `PUT` | `/api/nous/gate-decision` | Owner only | Nous Gate Decision | `pkg/dashboard/api.go:480` | +| `GET` | `/api/nous/gate-pending` | Dashboard auth/session | Nous Gate Pending | `pkg/dashboard/api.go:481` | +| `POST` | `/api/nous/gate-respond` | Owner only | Nous Gate Respond | `pkg/dashboard/api.go:482` | +| `GET` | `/api/nous/gate-response` | Dashboard auth/session | Nous Gate Response | `pkg/dashboard/api.go:483` | +| `GET` | `/api/nous/config` | Dashboard auth/session | Nous Config Get | `pkg/dashboard/api.go:484` | +| `PUT` | `/api/nous/config/goals` | Owner only | Nous Config Goals — legacy; the dashboard no longer exposes the research question in the ⚙ dialog, use `PATCH /api/nous/campaigns/{id}` | `pkg/dashboard/api.go:485` | +| `PUT` | `/api/nous/config/repos` | Owner only | Nous Config Repos — the allow-list of repos experiments may target (empty = any) | `pkg/dashboard/api.go:486` | +| `PUT` | `/api/nous/config/output` | Owner only | Nous Config Output | `pkg/dashboard/api.go:487` | +| `PUT` | `/api/nous/config/fast-fail` | Owner only | Nous Config Fast Fail | `pkg/dashboard/api.go:488` | +| `PUT` | `/api/nous/config/schedule` | Owner only | Nous Config Schedule | `pkg/dashboard/api.go:489` | +| `PUT` | `/api/nous/config/controllables` | Owner only | Nous Config Controllables | `pkg/dashboard/api.go:490` | +| `PUT` | `/api/nous/config/principles` | Owner only | Nous Config Principles | `pkg/dashboard/api.go:491` | +| `DELETE` | `/api/nous/principles/{id}` | Owner only | Nous Delete Principle | `pkg/dashboard/api.go:492` | +| `POST` | `/api/nous/campaign/start` | Owner only | Nous Campaign Start — archives the active campaign and starts a new experiment whose baseline restarts at 0 ([#12501](https://github.com/hivecommons/hive/issues/12501)) | `pkg/dashboard/api.go:493` | +| `GET` | `/api/nous/campaigns` | Any | Nous Campaigns List — every experiment with its per-campaign baseline, scope, results and stage ([#12532](https://github.com/hivecommons/hive/issues/12532)) | `pkg/dashboard/api.go:494` | +| `POST` | `/api/nous/campaigns` | Owner only | Nous Campaigns Create — starts an experiment alongside the running ones; 409 `scope_conflict` when a running experiment shares a repo target or both are hive-wide ([#12532](https://github.com/hivecommons/hive/issues/12532)) | `pkg/dashboard/api.go:495` | +| `PATCH` | `/api/nous/campaigns/{id}` | Owner only | Nous Campaign Patch — pause / resume / archive, or edit question, hypothesis and scope. Hypothesis/tag edits save in place (`status: "updated"`); a changed question or repo set needs `restart: true` (else 409 `restart_required`) and archives the campaign as version N while creating version N+1 with `restartedFrom` (`status: "restarted", campaign, archived`); resume, scope widening and restarts re-run the conflict guard ([#12532](https://github.com/hivecommons/hive/issues/12532)) | `pkg/dashboard/api.go:496` | diff --git a/src/docs/api-reference/packs-and-acmm.md b/src/docs/api-reference/packs-and-acmm.md index 5040dbb1c3..8ecae2c22b 100644 --- a/src/docs/api-reference/packs-and-acmm.md +++ b/src/docs/api-reference/packs-and-acmm.md @@ -18,15 +18,16 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f | `GET` | `/api/repos/{owner}/{repo}/items/{number}` | Dashboard session | Per-item detail for the activity monitor's decision badge: `{repo, number, stage, stage_slug, operator_actions[], operator_action_count, last_operator_action}`. `operator_actions[]` is the server-side ledger of every row action submitted from the dashboard (hold/release, decision, decide-delegated, send-to-human, accept-triage — recorded by `recordOperatorAction` around those routes) as `{action, actor, at, note, target, outcome: pending|applied|no-op|failed, detail, head_sha, stage}`; `last_operator_action` adds the derived `state` (`waiting|addressed|stuck|pending|failed`), `stuck_after_seconds` and `followed[]` (the stage hops after the action). The same `last_operator_action` / `operator_action_count` ride every stage-tracker row and linked PR. Persisted in `/data/operator-actions.json`; `HIVE_OPERATOR_ACTION_STUCK_AFTER` (default `30m`) sets the stuck window. Rows also carry `rebase_merge: {state: approved|rebasing|ci-pending|merged|failed, actor, base, text, fail_reason, conflict_files[], armed_at}` while a *Rebase, then merge as maintainer* follow-through is live or just settled (persisted in `/data/rebase-merge-followups.json`; `fail_reason: foreign-head` when the head moved after the approval by someone other than the hive, so nothing merged), and `rebase: {attempt, max, exhausted, head, text}` on a conflicting PR the fixer is rebasing under the two-attempt loop guard (`/data/rebase-attempts.json`). | `pkg/dashboard/api.go`, `pkg/dashboard/operator_actions.go` | | `POST` | `/api/repos/{owner}/{repo}/items/{number}/hold` | Owner or repo write/maintain/admin | Add or remove a dashboard hold chip for an issue or PR. Body `{"held": true}` adds the hive's exact-match canonical `hive-pause/` label (shortened with a hash suffix when the plain spelling would exceed GitHub's 50-character label cap, [#17037](https://github.com/hivecommons/hive/issues/17037)); `{"held": false}` removes exactly the labels causing the hold (`hive-pause/` and/or generic hold labels) and never removes `hive/` provenance. A GitHub failure answers `424` with the step and GitHub's reason — never `502`/`503`, which the hosted Ingress replaces with its generic "hive unavailable" page. Every toggle writes an audit-log entry; the #8851 upgrade migration writes `/data/hive-hold-migration-.json` with audit-backed, provenance-only, and ambiguous legacy `hive/` classifications. | `pkg/dashboard/api.go:345`, `pkg/dashboard/api_repo_hold.go` | | `POST` | `/api/repos/{owner}/{repo}/items/{number}/decision` | Owner or repo write/maintain/admin, signed-in GitHub user | Record an operator decision from the activity monitor's row menu / selection bar. Body `{"decision": "approve"|"direction"|"close-superseded"|"close-wontfix"|"close-read"|"close-issue"|"adopt"|"reroute"|"re-author"|"merge-now"|"queue-merge", "comment": "…", "type": "issue"|"pr", "superseded_by": "#458", "force": true, "to": ""|"any"}` (`force` only with `adopt`, `to` only with `reroute`; an unknown `decision` is a 400). On an issue parked at 045, `approve`/`direction` act exactly as a maintainer's `/hive approve` / `/hive decision ` comment would (labels, `approved-direction`, stage-engine Unparked fact, reply comment naming the operator). On a PR parked at 085 (`type: "pr"`), `approve` posts the `/lgtm` and `/approve` commands as two comments attributed to the operator, records the approval against the head as the human answer to a `requires_human` / decision-requested verdict (the lanes and the stage engine honour it like a trusted merger's Approve review), lifts `needs-human`, clears the sentinel label and acknowledges the bundle's sentinel findings for that head, re-derives the stage and drops the tracker cache — the response adds `released` (`approval-recorded`, `needs-human`, `sentinel-label`, `sentinel-acknowledged`) and `stage`; the merge gate decides from there (no review as the operator, no merge) — and `direction` records the text as a human change request against the head — the `/hive decision` fix lane — on a hive-authored PR, and on a contributor's clanker PR (`author/clanker` / hive attribution markers) where the text is posted to the contributor's hive and the PR moves to `stage/072-returned-to-contributor` (`status: "direction-returned-to-contributor"`); a person's PR, which no hive can carry direction to, answers 409. The close variants first post a required comment naming the operator (and the superseding PR when `superseded_by` is given); a failed comment prevents closure. `close-superseded` and `close-wontfix` close as **not planned**; `close-read` acknowledges an advisory issue and closes it **as completed**. `close-issue` (`type: "issue"` only) closes the single named open issue **as completed**, at any stage, leaving linked PRs and other issues untouched; it returns 400 for a PR (including one sent as an issue), 404 when the issue is not found, and 409 when already closed. It retains the existing permission and mutation gates, including the paused-repo `status: "refused"` result without writes. `adopt` and `re-author` require `type: "pr"` and queue adoption via the `adoption/supersede` label (409 unless `governor.labels.stage.adoption` is enabled). `adopt` with `"force": true` is *Adopt now* ([#15038](https://github.com/hivecommons/hive/issues/15038)): it bypasses the author's presence, the grace window and `maintainer_policy`, marks the stage record and nudges the automerge sweep so the adoption engine supersedes the head at once (responds `status: "already-adopted"` when nothing is left to do; 400 on the hive's own PR). `reroute` (`type: "pr"`, `"to": ""|"any"`) hands the PR's follow-up work to another online clanker through the contributor fix queue, posts a `` note and arms a pickup timer that falls back to Adopt now after `governor.reroute.pickup_timeout`; answers `status: "rerouted"`, 409 when no clanker is online or adoption is disabled. On a PR at 090, `queue-merge` (*Approve and let hive merge*, the lead action) records an approval attributed to the operator and applies the automerge label, returning `status: "queued-for-merge"` (on the hive's own PR, which the App cannot review, the queue note is a comment and the operator's approval is recorded as `approve` records it — `released` lists `approval-recorded`, `admitted`); hive's merge sweep merges on its next tick once CI is green and the head has soaked, and that recorded operator approval is the one thing that lets the sweep merge an untrusted-author PR (the merge comment names the operator). `merge-now` (*Merge now as maintainer*, secondary) posts an attributed comment and merges immediately through the hive's GitHub App, returning `status: "merged"`. Both require `type: "pr"` and a verified owner or `merger` role in addition to the route's repo permission check; both refuse closed/merged PRs and the operator's own PR. `merge-now` on a PR whose `mergeable_state` is `dirty`/`behind` instead answers `202` with `status: "rebase-queued"` (approval recorded, rebase kicked, merge follows via the follow-through once the hive's own rebase is green; a head pushed by anyone else fails the follow-through closed; `head-not-pushable` refusal on a fork without maintainer edits). `approve` on such a PR adds `rebase: {attempt, max, exhausted, head, text}` for the rebase episode it opened. Every decision writes an audit-log entry (`repo_item_decision_*`, e.g. `repo_item_decision_adopt_now`, `repo_item_decision_reroute`). | `pkg/dashboard/api.go:346`, `pkg/dashboard/api_repo_item_decision.go` | -| `GET` | `/api/notes` | Signed-in GitHub user (or verified owner) | Maintainer notes — the private per-item notes maintainers leave each other on Activity Monitor rows ([#maintainer-notes](../operator-reference.md#maintainer-notes)). `?repo=owner/name&number=N` lists one item's live notes oldest first; with no query, every live note in the hive (the SPA's count badges). `{notes: [{id, repo, number, author, text, created_at}]}`. Never read from or written to GitHub. | `pkg/dashboard/api.go:349`, `pkg/dashboard/api_maintainer_notes.go` | -| `POST` | `/api/notes` | Owner or repo write/maintain/admin, signed-in GitHub user | Append a maintainer note. Body `{repo, number, text}` — `text` is plain text up to 2000 characters; the author is the dashboard session's GitHub login, never a body field. `401` signed out, `403` without write on the repo, `400` for an empty/oversized note or a bad item. `201 {ok, note}`; appended to `/data/maintainer-notes.jsonl`, audited as `maintainer_note_add`, and broadcast as the `maintainer-notes` SSE event `{seq, repo, number, count, action}` so other maintainers' browsers refresh the row. | `pkg/dashboard/api.go:350`, `pkg/dashboard/api_maintainer_notes.go` | -| `DELETE` | `/api/notes/{id}` | The note's author, or a verified owner | Tombstone a maintainer note (append-only store: a `deleted_at` record, never a rewrite). `404` unknown or already deleted, `403` for anyone else. `{ok, note}`; audited as `maintainer_note_delete`, broadcast as `maintainer-notes`. | `pkg/dashboard/api.go:351`, `pkg/dashboard/api_maintainer_notes.go` | +| `GET` | `/api/notes` | Signed-in GitHub user (or verified owner) | Maintainer notes — the private per-item notes maintainers leave each other on Activity Monitor rows ([#maintainer-notes](../operator-reference.md#maintainer-notes)). `?repo=owner/name&number=N` lists one item's live notes oldest first; with no query, every live note in the hive (the SPA's count badges). `{notes: [{id, repo, number, author, text, created_at}]}`. Never read from or written to GitHub. | `pkg/dashboard/api.go:350`, `pkg/dashboard/api_maintainer_notes.go` | +| `POST` | `/api/notes` | Owner or repo write/maintain/admin, signed-in GitHub user | Append a maintainer note. Body `{repo, number, text}` — `text` is plain text up to 2000 characters; the author is the dashboard session's GitHub login, never a body field. `401` signed out, `403` without write on the repo, `400` for an empty/oversized note or a bad item. `201 {ok, note}`; appended to `/data/maintainer-notes.jsonl`, audited as `maintainer_note_add`, and broadcast as the `maintainer-notes` SSE event `{seq, repo, number, count, action}` so other maintainers' browsers refresh the row. | `pkg/dashboard/api.go:351`, `pkg/dashboard/api_maintainer_notes.go` | +| `DELETE` | `/api/notes/{id}` | The note's author, or a verified owner | Tombstone a maintainer note (append-only store: a `deleted_at` record, never a rewrite). `404` unknown or already deleted, `403` for anyone else. `{ok, note}`; audited as `maintainer_note_delete`, broadcast as `maintainer-notes`. | `pkg/dashboard/api.go:352`, `pkg/dashboard/api_maintainer_notes.go` | | `POST` / `GET` | `/api/repos/{owner}/{repo}/items/{number}/decide-delegated` | Same as `…/hold` (owner or repo write), signed-in GitHub user; `decisions.delegate.enabled` (403 when off) | *Let hive decide*: enqueue a delegated-decision job in which the hive decides the parked item itself as the owner's delegate under `pkg/delegatedecision.PolicyText` and records it as a human decision (`/hive decision` comment with the `` marker, park labels off, `triage/accepted`, queue approval on a PR head). Body `{"type": "issue"|"pr", "reason", "caption", "sentinel_reason"}`. `POST` answers 202 with the job (`{id, status: "running"|"done"|"failed", decision: {verdict, rule, text, rationale, actions, keeps_park, ladder?: {decision, reason, ruled_out[]}}, notes, error}`; `ladder` is set on contributor-PR decisions and names the rung that decided — `already-fixed` → `mergeable-as-is` → `rebase-then-merge` → `return-to-contributor` → `contributor-offline` — and why each rung above it did not apply); 409 with the running job while one is in flight; `GET` reads it. Rails: never merges, refuses items wearing `hold`, never grants secrets/permissions (`needs-owner` + `hold` instead), recommends only on hive policy/governance questions (keeps 085). Audited as `repo_item_decision_delegated[_failed]`. See [dashboard-sections.md](../dashboard-sections.md#let-hive-decide). | `pkg/dashboard/api.go:329`, `pkg/dashboard/api_repo_item_decide_delegated.go` | -| `POST` | `/api/repos/{owner}/{repo}/items/{number}/decide-delegated/plan` | Same as `…/decide-delegated` | Preview for *Let hive decide*: runs the same owner-delegate policy with **no side effects** (nothing written, no job) and answers `{would, rule, acting, title, summary, why, consequences[], ladder, mergeable_as_is, alternatives[], writes: false, prior, notes}` — `summary` is one verb-first sentence with no "Hive would:" prefix (*Send #15332 back to its author with one instruction: make CI green, nothing else.*), `why` one short line (*CI is red.*), `consequences` at most two items, `ladder` the rung that decided with its `ruled_out` list, and `mergeable_as_is` whether an as-is merge is honest (the queue-merge and merge-now alternatives are dropped when it is not). The dialog shows **Cancel** / **Let hive do that**, plus **Approve and let hive merge** (or **Merge now as maintainer** when the hive would approve anyway) only when `mergeable_as_is`; only then does the SPA post `…/decide-delegated` with `chosen` naming the button. A transient GitHub failure (5xx, rate limit, timeout) is retried twice with backoff before the plan gives up. A failure answers `{ok: false, error, reason, retryable, attempts, elapsed_ms, hive, hint}` under **409** when the item is no longer open (`reason: not-open`) or **424** when a read it depends on failed (`github`), is not configured (`config`) or the plan itself failed (`plan`) — never 502/503, which the hosted Ingress intercepts and replaces with its generic *hive unavailable* page (hivecommons/hive#16776). See [dashboard-sections.md](../dashboard-sections.md#let-hive-decide). | `pkg/dashboard/api.go:354`, `pkg/dashboard/api_repo_item_decide_delegated_plan.go` | -| `POST` | `/api/repos/{owner}/{repo}/items/{number}/blocker/recheck` | Same as `…/hold` (owner or repo write), signed-in GitHub user | *Re-check permissions* on an issue parked on a capability blocker (#15099): probes the GitHub App installation's permissions; when the missing permission is granted, clears every ledger entry blocked on it and un-parks the item (`{result: {outcome: "released", …}}`), otherwise `{result: {outcome: "no-effect", reason: "blocker", options: [...]}}`; 404 when the item has no blocker, 409 when the blocker is not a capability gap | `pkg/dashboard/api.go:355` | -| `POST` | `/api/repos/{owner}/{repo}/items/{number}/blocker/close-partial` | Same as `…/hold` (owner or repo write), signed-in GitHub user | Option (c) on a capability blocker (#15099): labels the issue `hive/partially-addressed`, posts the operator's `{"comment"}` naming what remains and closes it; the ledger entry is cleared | `pkg/dashboard/api.go:356` | -| `POST` | `/api/repos/{owner}/{repo}/items/{number}/accept-triage` | Owner or repo write/maintain/admin | Accept triage on an issue from the activity monitor's row menu — what a maintainer accepting triage on GitHub does by hand: adds the reporter-trust triage label (`triage/accepted`, or the first of `issue_filter.reporter_trust.untrusted_require_labels`; the label is created in the repo if missing) and removes the awaiting label (`needs-triage` / `reporter_trust.awaiting_label`) and a Hive-written `stage/015-triage-needed`. Empty body. Returns `{ok, repo, number, acceptLabel, added, removed, alreadyAccepted, minStatusSeq}`; an issue already carrying the accept label with nothing left to remove is a no-op (`alreadyAccepted: true`, no write, no audit). 404 for a pull request or an unknown item. The status snapshot's labels are patched so the next reconcile reads 010 Actionable before the engine's own 015 → 010 derivation. Every write is audited as `repo_item_accept_triage` under the dashboard user. | `pkg/dashboard/api.go:552`, `pkg/dashboard/api_repo_item_accept_triage.go` | -| `GET` | `/api/acmm/evaluation` | Dashboard auth/session | ACMMEvaluation — combined codebase + operational result, cached server-side for 1 hour (`acmmEvalTTL`). `?refresh=1` (the dashboard's "🔄 Re-evaluate" button, #5877) bypasses the hourly TTL but is debounced server-side: requests within 1 minute of the last evaluation (`acmmRefreshDebounce`) still serve the cache, since a full refresh costs up to ~29 GitHub GetContents calls per repo. The response's `last_evaluated_at` timestamp reports when the cached evaluation was computed | `pkg/dashboard/api.go:358`, `pkg/dashboard/api_acmm_eval.go` | -| `POST` | `/api/acmm/issue` | Owner only | ACMMCreate Issue — files on GitHub or, with `governor.acmm.issue_tracker: work_source` / body `tracker: "work_source"` on a Linear-sourced hive, on Linear; response `tracker` says which. See [ACMM policy matrix](../acmm-policy-matrix.md#where-acmm-gap-issues-are-filed) | `pkg/dashboard/api.go:359` | -| `GET` | `/api/acmm-recommendation` | Dashboard auth/session | Advisory level-up recommendation (`acmmadvisor.Recommendation`, JSON): never changes the applied level — see [ACMM advisor](../acmm-advisor.md) | `pkg/dashboard/api.go:360` | -| `GET` | `/api/hive-advice` | Dashboard auth/session | Weekly owner advice (`hiveadvisor.Result`, JSON) shared with the advisory digest: recommendations with `items`, `links` (Overview export paths) and `bands`; `bands[]` rule text; `counts` naming the governor actionable queue vs. the Overview total. Which recommendations show is frozen for 7 days; their numbers refresh every call — see [Owner advice](../advisory.md#owner-advice) | `pkg/dashboard/api.go:362`, `pkg/dashboard/api_hive_advice.go` | +| `POST` | `/api/repos/{owner}/{repo}/items/{number}/decide-delegated/plan` | Same as `…/decide-delegated` | Preview for *Let hive decide*: runs the same owner-delegate policy with **no side effects** (nothing written, no job) and answers `{would, rule, acting, title, summary, why, consequences[], ladder, mergeable_as_is, alternatives[], writes: false, prior, notes}` — `summary` is one verb-first sentence with no "Hive would:" prefix (*Send #15332 back to its author with one instruction: make CI green, nothing else.*), `why` one short line (*CI is red.*), `consequences` at most two items, `ladder` the rung that decided with its `ruled_out` list, and `mergeable_as_is` whether an as-is merge is honest (the queue-merge and merge-now alternatives are dropped when it is not). The dialog shows **Cancel** / **Let hive do that**, plus **Approve and let hive merge** (or **Merge now as maintainer** when the hive would approve anyway) only when `mergeable_as_is`; only then does the SPA post `…/decide-delegated` with `chosen` naming the button. A transient GitHub failure (5xx, rate limit, timeout) is retried twice with backoff before the plan gives up. A failure answers `{ok: false, error, reason, retryable, attempts, elapsed_ms, hive, hint}` under **409** when the item is no longer open (`reason: not-open`) or **424** when a read it depends on failed (`github`), is not configured (`config`) or the plan itself failed (`plan`) — never 502/503, which the hosted Ingress intercepts and replaces with its generic *hive unavailable* page (hivecommons/hive#16776). See [dashboard-sections.md](../dashboard-sections.md#let-hive-decide). | `pkg/dashboard/api.go:355`, `pkg/dashboard/api_repo_item_decide_delegated_plan.go` | +| `POST` | `/api/repos/{owner}/{repo}/items/{number}/blocker/recheck` | Same as `…/hold` (owner or repo write), signed-in GitHub user | *Re-check permissions* on an issue parked on a capability blocker (#15099): probes the GitHub App installation's permissions; when the missing permission is granted, clears every ledger entry blocked on it and un-parks the item (`{result: {outcome: "released", …}}`), otherwise `{result: {outcome: "no-effect", reason: "blocker", options: [...]}}`; 404 when the item has no blocker, 409 when the blocker is not a capability gap | `pkg/dashboard/api.go:356` | +| `POST` | `/api/repos/{owner}/{repo}/items/{number}/blocker/close-partial` | Same as `…/hold` (owner or repo write), signed-in GitHub user | Option (c) on a capability blocker (#15099): labels the issue `hive/partially-addressed`, posts the operator's `{"comment"}` naming what remains and closes it; the ledger entry is cleared | `pkg/dashboard/api.go:357` | +| `POST` | `/api/repos/{owner}/{repo}/items/{number}/accept-triage` | Owner or repo write/maintain/admin | Accept triage on an issue from the activity monitor's row menu — what a maintainer accepting triage on GitHub does by hand: adds the reporter-trust triage label (`triage/accepted`, or the first of `issue_filter.reporter_trust.untrusted_require_labels`; the label is created in the repo if missing) and removes the awaiting label (`needs-triage` / `reporter_trust.awaiting_label`) and a Hive-written `stage/015-triage-needed`. Empty body. Returns `{ok, repo, number, acceptLabel, added, removed, alreadyAccepted, minStatusSeq}`; an issue already carrying the accept label with nothing left to remove is a no-op (`alreadyAccepted: true`, no write, no audit). 404 for a pull request or an unknown item. The status snapshot's labels are patched so the next reconcile reads 010 Actionable before the engine's own 015 → 010 derivation. Every write is audited as `repo_item_accept_triage` under the dashboard user. | `pkg/dashboard/api.go:553`, `pkg/dashboard/api_repo_item_accept_triage.go` | +| `POST` | `/api/repos/{owner}/{repo}/items/{number}/sentinel-confirm` | Owner or repo write/maintain/admin | **Confirm safe** on the activity monitor's human-gate pill ([#17470](https://github.com/hivecommons/hive/issues/17470)): a person confirms a sentinel finding is intended. Body `{comment?, type?}` (`type` is `pr` or `issue`, comment ≤ 4000 characters). Posts the confirmation as a comment first — ``, `@user confirmed the sentinel finding safe from the dashboard.`, then the comment text — and removes every label matching the configured sentinel label (`sentinel.label`, default `sentinel-alert`, case-insensitive). Returns `{ok, repo, number, label, removed, alreadyClear, result}`; with no sentinel label on the item the comment is still posted and `alreadyClear` is true. 403 for a repository the hive does not watch. Audited as `repo_item_sentinel_confirm` under the dashboard user; the operator-action ledger records it as `confirm-sentinel`. | `pkg/dashboard/api.go:347`, `pkg/dashboard/api_repo_item_sentinel_confirm.go` | +| `GET` | `/api/acmm/evaluation` | Dashboard auth/session | ACMMEvaluation — combined codebase + operational result, cached server-side for 1 hour (`acmmEvalTTL`). `?refresh=1` (the dashboard's "🔄 Re-evaluate" button, #5877) bypasses the hourly TTL but is debounced server-side: requests within 1 minute of the last evaluation (`acmmRefreshDebounce`) still serve the cache, since a full refresh costs up to ~29 GitHub GetContents calls per repo. The response's `last_evaluated_at` timestamp reports when the cached evaluation was computed | `pkg/dashboard/api.go:359`, `pkg/dashboard/api_acmm_eval.go` | +| `POST` | `/api/acmm/issue` | Owner only | ACMMCreate Issue — files on GitHub or, with `governor.acmm.issue_tracker: work_source` / body `tracker: "work_source"` on a Linear-sourced hive, on Linear; response `tracker` says which. See [ACMM policy matrix](../acmm-policy-matrix.md#where-acmm-gap-issues-are-filed) | `pkg/dashboard/api.go:360` | +| `GET` | `/api/acmm-recommendation` | Dashboard auth/session | Advisory level-up recommendation (`acmmadvisor.Recommendation`, JSON): never changes the applied level — see [ACMM advisor](../acmm-advisor.md) | `pkg/dashboard/api.go:361` | +| `GET` | `/api/hive-advice` | Dashboard auth/session | Weekly owner advice (`hiveadvisor.Result`, JSON) shared with the advisory digest: recommendations with `items`, `links` (Overview export paths) and `bands`; `bands[]` rule text; `counts` naming the governor actionable queue vs. the Overview total. Which recommendations show is frozen for 7 days; their numbers refresh every call — see [Owner advice](../advisory.md#owner-advice) | `pkg/dashboard/api.go:363`, `pkg/dashboard/api_hive_advice.go` | diff --git a/src/docs/dashboard-copy-inventory.md b/src/docs/dashboard-copy-inventory.md index c85fd6f503..b9441cd69e 100644 --- a/src/docs/dashboard-copy-inventory.md +++ b/src/docs/dashboard-copy-inventory.md @@ -67,6 +67,7 @@ The new hover, verbatim (title line omitted): | `stageTrackerTriageNeededCaption` (`stageTrackerCaption` 015, `stageTrackerNewState` hold text) | row caption, feed | 110 ("Actionable, but no maintainer has looked at it yet; waiting for triage — triage needed: carries needs triage": *triage* ×3 after the chevron word) / 84 ("New · waiting for a maintainer's triage (add `triage/accepted`); the hive's next pass in 7m") | 31 ("Triage needed — accept or close"; the next-mover and next-pass narration stay on the chevron hover) | `TestStageTracker_TriageNeededStage`, `TestStageTracker_ReporterTrustHoldReadsTriageNeeded`, `TestStageTrackerNewState` | | `stageTrackerLeadActionHtml` (`tracker-actions.js`) | the row header's inline lead button (chip slot) | — (the lead sat in the ⋯ menu only) | the menu entry's label (1–4), its hint as the hover | `TestStageTrackerLeadActionInline`, `TestStageTrackerMaintainerRowsHaveLeadAction` | | Toasts (`STAGE_TRACKER_ACTING_CAPTIONS`, acted labels) | toast | 2–4 each | unchanged | — | +| `stageTrackerHumanGateHtml` + `stageTrackerHumanGateStatusText` / `stageTrackerHumanGateTip` / `stageTrackerHumanGateVerbs` (`tracker-human-gate.js`, [#17470](https://github.com/hivecommons/hive/issues/17470)) | the one human-gate pill in the chip slot: status segment, its hover, the verb buttons, the `…` menu | three or four controls for one gate — *Needs human · review* chevron word (3) + `sentinel` chip (1) + `Approve ▸` (1) + `Let hive decide ▸` (3) — and no verb at all for a sentinel alert or a held 090 (*Held · sentinel · confirm intent*, 4) | one pill: *Needs human · review, sentinel* (4) + fixed verbs per reason (1–2 words each, ≤ 3 visible, the rest behind `…`); hover = one line per reason (`review: `, `sentinel: `); *settling…* (1) after a verb runs | `TestStageTrackerHumanGateRows`, `TestStageTrackerHumanGateWiring`, `TestStageTrackerSentinelLaneText` | | `stageTrackerStripItems` holder token + `stageTrackerClaimantIconKind` (`tracker-row-strip.js`, `tracker-row.js`) on the PR in progress chevron ([#15541](https://github.com/hivecommons/hive/issues/15541)) | lit chevron word, chevron hover | *PR in progress* (bare; the holder token only reached PRs from review on) | *PR in progress · scanner ⬡*, *PR in progress · @odttlnt's clanker 🤖*, *PR in progress · @clubanderson 👤* — the same token and hover line as *Claimed ·*; the name ellipsizes before the one-line sub-row wraps; a detour word that already names them (*Returned to @bob's clanker*) does not repeat them | `TestStageTrackerClaimantChevronJS`, `TestStageTrackerPRClaimant`, `TestStageTrackerClaimantStage` | | `stageTrackerHolderPresenceHtml` (`tracker-words.js`) after the holder token; `stageTrackerOfflineAuthorCaption` + `stageTrackerWaitingOn` at stage None (Go) | lit chevron holder suffix, chevron hover, row caption | *PR in progress · @odttlnt's clanker 🤖* (no live state; a fork PR the gate kept label-less read as unclassified even when the engine held it at 085) | *PR in progress · @odttlnt's clanker 🤖 · ■ offline 3h* (muted; *· ○ not registered* for a login with no profile here; nothing when online); caption "@odttlnt's clanker is offline 3h; a green PR is reviewed and merged without its author — hive adopts it only once it is returned (red CI, conflicts or review asks) and nothing is pushed for 15m"; a suppressed-label 085 record keeps *Needs human decision* | `TestStageTrackerHolderPresenceJS`, `TestStageTrackerUnclassifiedClankerPROfflineCaption`, `TestStageTrackerSuppressedDecisionRecordKeepsStage` | | `stageTrackerLinkedPRProgress` (Go) + `stageTrackerEventText` / `stageTrackerNestedOpenPRs` (`tracker-motion.js`, `tracker-row-layout.js`) on an adoption pair ([#15495](https://github.com/hivecommons/hive/issues/15495)) | issue row caption, feed line, inline lead button | *fell back to Covered by pr — Covered by PR #15537 — Review swarm requested; … ; PR #15508 — Hive adopted this PR … — changes requested* (48) and a *Let hive decide — all 2 PRs* lead on a row with nothing to decide | *Covered by #15537 (adopted from @mendezr's #15508) — in CI / review* (11); the feed says *moved to* when an issue stops mirroring its PR; the pair counts as one open PR so no lead button | `TestStageTrackerLinkedPRProgressCollapsesAdoptionPair`, `TestStageTrackerAdoptionPairIsOneOpenPR`, `TestStageTrackerEventTextUnmirroredCoveredByPR` | diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index e01feef7a1..82ddea591f 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -72,7 +72,7 @@ Side stages share a column rather than adding columns: | 045 Needs human decision | Actionable on an issue. A pre-045 issue still wearing 085 is drawn here until reconciliation. | | 070 Fixing / 071 Needs author / 072 Returned to contributor | CI / Review: Hive repairs its own PR at 070; a human author acts at 071; a contributor agent gets its PR back at 072. `needs-rebase` explains a repair here, not at 050. | | 074 Adopted by hive | CI / Review while the Hive repairs adopted work; pending, green or red pushes remain 074 until the merge gate takes it. | -| 085 Needs human decision / 090 Ready for human merge | A human gate is a pill on the PR's real stage, not a stage of its own ([#17327](https://github.com/hivecommons/hive/issues/17327), [#17453](https://github.com/hivecommons/hive/issues/17453)). A 085 PR whose head is short of merge-ready — checks running, red or unreported; the review verdict pending or asking for a person — lights **CI / Review** (the CI track while checks run or are not green, the Review track while its verdict is what waits), with an amber marker on the lit track and the **needs human decision** pill carrying the question (its popover holds the actions); PR in progress is passed, Merge queue empty. Only a 085 PR that is merge-ready (review approved, CI green on this head), queued or merging, and every 090, sits in the **Merge queue** column — read the decision or merge reason rather than assuming Hive will merge it. A 090 cell reading **Held · sentinel · confirm intent** or **Held · hold** is a gate on an otherwise ready PR: Hive never merges it while the gate stands. | +| 085 Needs human decision / 090 Ready for human merge | A human gate is a pill on the PR's real stage, not a stage of its own ([#17327](https://github.com/hivecommons/hive/issues/17327), [#17453](https://github.com/hivecommons/hive/issues/17453)). A 085 PR whose head is short of merge-ready — checks running, red or unreported; the review verdict pending or asking for a person — lights **CI / Review** (the CI track while checks run or are not green, the Review track while its verdict is what waits), with an amber marker on the lit track and the one **👤 Needs human · …** gate pill carrying the question and the verbs (see *Settling a human gate*); PR in progress is passed, Merge queue empty. Only a 085 PR that is merge-ready (review approved, CI green on this head), queued or merging, and every 090, sits in the **Merge queue** column — read the decision or merge reason rather than assuming Hive will merge it. A 090 held by a sentinel alert or a `hold` label keeps its own column word with the amber marker; the gate pill names the reason (`sentinel`, `hold`) and Hive never merges it while the gate stands ([#17470](https://github.com/hivecommons/hive/issues/17470)). | | 060 / 080 / 095 / 100 | Separate gate states; use the [merge-gate reference](#merge-queue-pills--legend) below for exact words and countdowns. | The author legend is a blue Hive hexagon, purple contributor-agent robot or teal human silhouette. The kind is `author/*`, inferred from the snapshot if its label is absent; the link tooltip names the login. On Claimed, the actor is the claim holder; on PR in progress and Returned to contributor it is the author. Hive owns review, adoption and auto-merge work; a human owns a human decision or manual merge. The payload's `stage_actor` is the authoritative actor (see [Who is on it](#who-is-on-it-actor-icons)). @@ -236,15 +236,30 @@ Durations, the flash timing (`--ham-move-flash-ms`, `--ham-move-flash-gap-ms`, ` #### Sentinel alert -A pull request the suspicious-activity sentinel flagged — it wears the `sentinel-alert` label (`sentinel.label`), or the review evidence bundle for its current head records sentinel findings — carries `sentinel_alert: true` in the tracker payload (with `sentinel_findings` and a short `sentinel_reason` when the bundle has them); a webhook label change flips it live. **A sentinel alert is a gate, not a stage** (owner decision 2026-11-08, [#17327](https://github.com/hivecommons/hive/issues/17327)): the column is the PR's real progress (CI, Review, or Merge queue once checks are green and the verdict approves) and the alert rides along as a pill. A green, reviewed, flagged PR stands at `090` in the **Merge queue** column and its lit chevron reads **Held · sentinel · confirm intent** (amber, `ham-held`; the same words lead the cell's `title` / `aria-label`, followed by the sentinel reason, the route reason and "Hive never merges this head while the gate stands."), never *Queued for merge*; a PR a `hold` / `do-not-merge*` label stops reads **Held · hold** the same way, with the holder and reason from the hold pill. The cell keeps the sentinel question's actions — *Approve* (the human review the alert asked for), *Let hive decide*, direction, close. In the **Needs human decision** lane (a reviewer's question on a flagged head) the lit chevron's own words read **Sentinel alert · needs human** (danger-tinted, the same wording in the cell's `title` and `aria-label`, and in the compact caption), so a maintainer reads the security implication before the stage mechanics; in every other lane at or past the merge gate (080, 095, 100) the row shows a compact danger-tinted `sentinel` chip ahead of `needs rebase` / `regressed` / `stalled`; before the gate the chip is held back with the other merge-gate pills (see *Pills before the merge gate*) while `sentinel_alert` stays truthful in the payload. +A pull request the suspicious-activity sentinel flagged — it wears the `sentinel-alert` label (`sentinel.label`), or the review evidence bundle for its current head records sentinel findings — carries `sentinel_alert: true` in the tracker payload (with `sentinel_findings` and a short `sentinel_reason` when the bundle has them); a webhook label change flips it live. **A sentinel alert is a gate, not a stage** (owner decision 2026-11-08, [#17327](https://github.com/hivecommons/hive/issues/17327)): the column is the PR's real progress (CI, Review, or Merge queue once checks are green and the verdict approves) and the alert rides along as a pill. The lit chevron never names the alert ([#17470](https://github.com/hivecommons/hive/issues/17470) — *Held · sentinel · confirm intent* and *Sentinel alert · needs human* are gone): a green, reviewed, flagged PR stands at `090` in the **Merge queue** column with its own column word and the amber `ham-human-gated` marker, never *Queued for merge*; a PR still running CI lights CI the same way. The alert is a reason of the row's one **👤 Needs human · sentinel** gate pill, whose hover is the sentinel reason and whose verbs are **Confirm safe** and **Let hive decide** (see *Settling a human gate*); a `hold` / `do-not-merge*` label is the `hold` reason of the same pill, with the holder and reason from the hold data. Where the gate pill does not render (a draft, a merged head) the row shows the compact danger-tinted `sentinel` chip ahead of `needs rebase` / `regressed` / `stalled` instead; before the merge gate the chip is held back with the other merge-gate pills (see *Pills before the merge gate*) while `sentinel_alert` stays truthful in the payload. -The tooltip reads "Sentinel flagged security-relevant changes at ``: ``" (a generic description stands in when the bundle has no reason). An issue carried by one flagged PR shows the lane text too, and a nested PR sub-row shows its own. The *Decide…* dialogs for a flagged PR open with a ⚠ line per flagged PR naming the sentinel reason, and *Approve* is styled as a dangerous action. +The tooltip reads "Sentinel flagged security-relevant changes at ``: ``" (a generic description stands in when the bundle has no reason). An issue carried by one flagged PR carries the gate pill too, and a nested PR sub-row carries its own. The *Decide…* dialogs for a flagged PR open with a ⚠ line per flagged PR naming the sentinel reason, and *Approve* is styled as a dangerous action. The payload also carries `sentinel_details`: one entry per finding with its `rule` (`sensitive_path`, `permission_escalation`, `ci_gate_weakening`, …), `summary`, the flagged `paths` (sorted, at most 10 per finding) and `more_paths` for any cut. The *Let hive decide* dialog's ▼ Details and the ⚠ chip tooltip list them under the sentinel line — `· sensitive_path: .github/workflows/release.yml (+N more)` — so the person can see *which* files tripped the sentinel, not just how many; `/api/sentinel` serves the same `findings` per row, and the hive's "reviewed, intended" decision comment on a trusted author's flagged PR names the same files after the reason. The findings come from the head's review evidence bundle or the sweep's own record; nothing is re-fetched from GitHub. -A person's *Approve* through that dialog **is** the human review the alert asked for: it removes the `sentinel-alert` label when present and records a `sentinel_acknowledged` human action keyed to the head in the review evidence bundle, so a bundle-only alert (findings but no label — hivecommons/crux#30) clears too; the payload then reads `sentinel_alert: false` with `sentinel_reason` suffixed `— acknowledged by @login`, the findings stay on record, and a new head starts over. +**Confirm safe** on the gate pill is the alert's own answer: it posts the person's confirmation as a comment (``, their words after it) and then removes the `sentinel-alert` label (`POST …/items/{number}/sentinel-confirm`, audited as `repo_item_sentinel_confirm`). A person's *Approve* through the decision dialog **is** also the human review the alert asked for: it removes the `sentinel-alert` label when present and records a `sentinel_acknowledged` human action keyed to the head in the review evidence bundle, so a bundle-only alert (findings but no label — hivecommons/crux#30) clears too; the payload then reads `sentinel_alert: false` with `sentinel_reason` suffixed `— acknowledged by @login`, the findings stay on record, and a new head starts over. -The delegated *Let hive decide* path never clears it. Hovering the lit chevron of a parked row names the parking stage itself (`Needs human decision`) when it sits in the Merge queue column, and *· needs a person: * on the lit CI / Review track when the head is not merge-ready ([#17453](https://github.com/hivecommons/hive/issues/17453)); `Next move` follows the real stage (human at 085 and at a held 090, hive at 080). A held row's stage never advances the merge: the lanes and the dashboard's one-click shortcuts check the gate itself, so a parked PR never merges unattended. Lane text and chip update in place on refresh (keyed reconcile, no flash). +The delegated *Let hive decide* path never clears it. Hovering the lit chevron of a parked row names the parking stage itself (`Needs human decision`) when it sits in the Merge queue column, and *· needs a person: * on the lit CI / Review track when the head is not merge-ready ([#17453](https://github.com/hivecommons/hive/issues/17453)); `Next move` follows the real stage (human at 085 and at a held 090, hive at 080). A held row's stage never advances the merge: the lanes and the dashboard's one-click shortcuts check the gate itself, so a parked PR never merges unattended. The gate pill and the chip update in place on refresh (keyed reconcile, no flash). + +#### Settling a human gate + +Every row a person must settle carries exactly **one** control for it ([#17470](https://github.com/hivecommons/hive/issues/17470); owner, 2026-11-10: "I don't see a consistent way to settle each of these using the UI"): a segmented pill, `[👤 Needs human · ] [verb] [verb] [verb] [… more]`, in the row's pill strip. The status segment names *why* — `review`, `decision`, `sentinel`, `hold`, comma-separated when they stack — and carries the reviewer's question or the sentinel rule as its hover (and, when the row carries a decision, the decision popover on click; the question also stays in the expander line). The verbs are fixed per reason, so the same reason always offers the same answers; stacked reasons union their verbs in reason order, de-duplicated, at most three visible with the rest behind a `…` menu (the same popover pattern as the row's ⋯ menu); on the stacked head (≤ 1100px) and the phone card the status folds to its icon and only the first verb stays inline, the rest behind the `…`, so the pill is one line and leaves the title its room. "Needs human" is never a chevron word: the lit chevron is the row's real stage with the amber `ham-human-gated` outline as the bar's only cue. The `sentinel`, `hold`, `needs-human` and `needs-decision` chips step aside when the pill renders; `↻ N` retry and the notes button stay separate. + +| Reason | Set by | Verbs | What gets posted | +|---|---|---|---| +| `review` | the review verdict requires a human on this head (`review_activity.state: human_decision`) | **Approve** · **Request changes…** · **Let hive decide** | Approve posts `/lgtm` + `/approve` on the current head (`…/items/{n}/decision`, `approve`); Request changes opens a modal whose text is posted as `/hive decision ` (`decision: direction`), the author agent pushes a new head; Let hive decide records a `/hive decision` under the hive's policy. | +| `decision` | `stage/085-needs-decision` on a PR, `045` on an issue, or a `needs-decision` / `needs-human` modifier | **Decide…** · **Approve as-is** (PR rows; *Approve* when stacked with `review`) · **Let hive decide** | Decide opens a modal with the question pre-filled; the answer is posted as `/hive decision `; Approve as-is is the GitHub approval of the head as it stands; Let hive decide as above. An issue with no PR offers Decide… and Let hive decide only. | +| `sentinel` | the `sentinel-alert` label or blocking findings on this head (`sentinel_alert`, not the trusted-author notice) | **Confirm safe** · **Let hive decide** | Confirm safe comments `` with the person's words and removes the sentinel label (`POST …/items/{n}/sentinel-confirm`, audited `repo_item_sentinel_confirm`); Let hive decide never clears the alert. | +| `hold` | a `hold` / `do-not-merge*` label (`hold`, `modifiers: hold`) | **Release hold** · **Let hive decide** | Release hold removes the label (`POST …/items/{n}/hold`, `{"held": false}`); Let hive decide as above. | + +Every verb runs `runRowAction` — the row menu's own path: the in-app confirm or prompt modal (never a native dialog), the result toast saying what was posted, the acting row — and the pill reads **settling…** (dashed outline, verbs disabled) until the next snapshot re-renders the row. A verb the viewer cannot run is greyed with the reason, never hidden. The review verdict's own question is not a second reason: a `requires_human` verdict on a 085 PR reads `review` alone; `review, sentinel` when the sentinel also flags it. + +A **secondary row of a shared PR** — an issue drawn under another listed issue's row because one PR closes both ([#17333](https://github.com/hivecommons/hive/issues/17333)) — never renders a gate pill or an amber chevron of its own; its *decision pending on #N* chip is a link that scrolls to and focuses the row that carries the gate. #### Unauthorized pill @@ -324,7 +339,7 @@ Issues on their own stages (Open, 010, 020, 045) keep every pill: a `needs-human `stage/071-needs-author` is a person's PR: a human-authored pull request sent back by a maintainer's CHANGES_REQUESTED review or by the review swarm. The same verdict on a clanker-authored PR (`author/clanker`, or an author resolved to a contributor's hive agent) routes to `stage/072-returned-to-contributor`, whichever lane carried it. The actor is the owning contributor, the caption reads `Returned to @thatguywob's hive — @clubanderson requested changes`, and the normal contributor nudge goes to that hive ([hivecommons/hive#15159](https://github.com/hivecommons/hive/pull/15159): a human's out-of-cycle review on a clanker PR parked it at 071 under a maintainer's name). -The 071/072 chevron names the routing — `Needs @sam`, `Returned to @thatguywob's hive` — and a sentinel finding on such a row is a ` · sentinel` suffix on that word (the chip folds into it, the tooltip carries the finding). `Sentinel alert · needs human` is only the chevron word when the maintainer's review is still outstanding (085). A trusted human's CHANGES_REQUESTED review on the current head *is* the human those parks (sentinel alert, `hold`, workflow-path) were waiting for: the PR routes to 071/072 and the sentinel pass does not re-assert 085 until a new head re-arms the alert. +The 071/072 chevron names the routing — `Needs @sam`, `Returned to @thatguywob's hive` — and a sentinel finding on such a row is the `sentinel` reason of the gate pill beside it (the chip folds into the pill, its hover carries the finding); the chevron word never names it. A trusted human's CHANGES_REQUESTED review on the current head *is* the human those parks (sentinel alert, `hold`, workflow-path) were waiting for: the PR routes to 071/072 and the sentinel pass does not re-assert 085 until a new head re-arms the alert. A return placed by hand counts too: when a trusted maintainer swaps `stage/085` for `stage/071`/`stage/072` on the PR, the reconciler reads the label event once per head, records it as that maintainer's change request against the head, and keeps the stage. The hive's own label events and untrusted actors are not honoured. @@ -457,7 +472,7 @@ An *active* chevron is filled amber and carries words; an inactive one is its ic A CI word is motion only when GitHub reports it: a check run whose status is not `completed`, or a non-merge-gate commit status still `pending`. A required check with no run on the head is settled (*hasn't reported*), never *running*, however many of its neighbours are green; at `060 reviewed` with every reported check concluded, **Review** is the lit chevron and CI is its blocker only when red. A CI snapshot that still claims a check running or queued after `dashboard.stage_tracker.ci_activity_stale_m` (default 10 minutes) is re-listed from GitHub on the next tracker build regardless of the batch cache, ETag or stage, so a listing taken while checks were starting cannot stay lit for hours ([#17508](https://github.com/hivecommons/hive/issues/17508): *CI 2/3 · running* eight hours after every check had passed). 3. **CI leads Review.** When both tracks would light at once — CI running while the review is queued, in progress or being re-adjudicated — CI is the lit chevron and Review is dim with a small note (*re-review queued* after a push, *review in progress*, *review queued*); its words stay in the tooltip, ending *… behind CI*. The stage chevron is the fallback: active only when no track is in motion. 4. **The PR in progress chevron speaks the PR's lifecycle** — draft, pushed, rebasing, *Unassigned · next: scanner*, *Deferred · waiting on #N*, *Waiting for @author · fix owed* — never a CI or review verdict. *CI failing*, *CI 4/11 · 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail. -5. **A human gate is a pill, not a stage.** A PR parked at 085 for a person — a reviewer's question, a permission only a maintainer holds, a rerun to approve — with checks running, red or unreported, or its review verdict pending, is drawn at its real stage: CI (with motion while checks run) or Review is the one lit chevron, wearing an amber marker (`ham-human-gated`), and the ask is the **needs human decision** pill in the row's pill strip (human icon, the question in its hover, the decision popover on click); the lit track's tooltip ends *· needs a person: *. It never lights a *Needs human · decision* chevron in the PR in progress column while CI and Review spin dim ([#17453](https://github.com/hivecommons/hive/issues/17453): #17442 did, with CI 3/9 running; #17416 read *Needs human · review* the same way). Only a merge-ready, queued or merging 085 is a Merge queue matter. +5. **A human gate is a pill, not a stage.** A PR parked at 085 for a person — a reviewer's question, a permission only a maintainer holds, a rerun to approve — with checks running, red or unreported, or its review verdict pending, is drawn at its real stage: CI (with motion while checks run) or Review is the one lit chevron, wearing an amber marker (`ham-human-gated`), and the ask is the one **👤 Needs human · …** gate pill in the row's pill strip (the question in its hover, the decision popover on click, the verbs beside it — see *Settling a human gate*); the lit track's tooltip ends *· needs a person: *. It never lights a *Needs human · decision* chevron in the PR in progress column while CI and Review spin dim ([#17453](https://github.com/hivecommons/hive/issues/17453): #17442 did, with CI 3/9 running; #17416 read *Needs human · review* the same way). Only a merge-ready, queued or merging 085 is a Merge queue matter. 6. **The CI and Review tooltips state what the track waits on — never "activity unknown".** With no verdict and no reviewer in flight the spoke derives the Review statement from what it already knows, in this order: the PR is merged or closed (*Review · n/a (closed)*), it is a draft (*Review · draft, not requested*), CI on the head has not finished (*Review · waiting for CI*), CI is done and nobody started (*Review · not started · hive reviewer next*, or *· needs reviewer* when the repo has no hive reviewer lane). A settled verdict explains itself — *Changes requested by the hive reviewer: 1 perspective posted findings … · 12m ago · quality ✓ · security ✗: token logged* — and stays known as its observation ages. The one no-data wording, *Review · no data for head f269349 yet · refreshing* (CI: *CI · no checks observed for head … yet · refreshing*), appears only when the spoke has fetched nothing for the head, and names the next step. On a red PR (CI failing or changes requested on the current head, or a 07x fix stage) the PR in progress word comes from pickup evidence: @@ -475,7 +490,7 @@ The relay records a deferral as an `agent_pr_deferred` audit entry bound to the #### The row's lead action, inline -A row whose next move is yours does not hide its answer behind three dots. Beside the chips on the right of the header (and on a nested PR sub-row's own header), the row renders its **lead action** as a real `'), 'the alert has its verb: ' + gate[1]); +assert.ok(!parked.includes('ham-badge-sentinel'), 'no chip when the gate already says it'); assert.ok(parked.includes(esc(TIP)), 'the PR link tooltip carries the sentinel line'); -// Other lanes: chip beside the modifier pill, same tooltip. +// Other lanes: the alert alone is a gate — the pill carries it beside the +// modifier chip, same tooltip; the sentinel chip stands in only where +// the gate does not render (a draft). const review = stageTrackerRowHtml(P('o/r', 110, 50, Object.assign({ modifiers: ['needs-rebase'] }, flagged)), stages, ctx); assert.ok(!review.includes('') && review.includes('data-track="ci"') && review.includes('data-track="review"'), 'the informational notice preserves both independent tracks off the merge gate'); const chips = /([\s\S]*?)<\/span><\/li>/.exec(review); assert.ok(chips, review); -assert.ok(/^sentinel<\/span>needs rebase<\/span>$/.test(chips[1]), 'sentinel chip leads the chip area: ' + chips[1]); -assert.ok(chips[1].includes('title="' + TIP + '"'), chips[1]); +assert.ok(/^needs rebase<\/span>sentinel<\/span>/.test(draft) && !draft.includes('ham-human-gate'), 'a draft is no gate: the chip says it: ' + draft); +assert.ok(draft.includes('title="' + TIP + '"'), draft); const generic = stageTrackerRowHtml(P('o/r', 110, 71, { sentinel_alert: true }), stages, ctx); assert.ok(generic.includes('Sentinel flagged security-relevant changes: ' + esc(STAGE_TRACKER_SENTINEL_TIP_FALLBACK)), 'generic tooltip without a reason: ' + generic); // 071/072 + sentinel (hivecommons/hive#15159): the chevron keeps the -// routing word — the human already acted — with the alert as a suffix, -// never "needs human"; the chip is folded into the word. +// routing word — the human already acted — never "needs human"; the +// alert is the gate pill's reason, not a chevron suffix. assert.strictEqual(stageTrackerReturnedWord({ stage: 72, kind: 'pr', author: 'thatguywob', author_kind: 'clanker' }, 'Returned to contributor'), "Returned to @thatguywob's clanker"); assert.strictEqual(stageTrackerReturnedWord({ stage: 72, kind: 'pr', author: 'bee', author_kind: 'hive' }, 'Returned to contributor'), "Returned to @bee's hive"); // An issue row drawn through its one covering PR names the PR's author, @@ -426,28 +429,23 @@ assert.strictEqual(stageTrackerReturnedWord(Object.assign({}, viaPR, { linked_pr // A row the sweep marked superseded says so instead of "Returned to": // nothing is owed by the author; a maintainer closes it (#15303 / #15304). assert.strictEqual(stageTrackerReturnedWord({ stage: 72, kind: 'pr', author: 'thatguywob', author_kind: 'clanker', superseded: { reason: 'superseded', closer_pr: 15304, closer_repo: 'hive' } }, 'Returned to contributor'), 'Superseded by #15304 · decide'); -assert.strictEqual(stageTrackerReturnedWord(Object.assign({ stage: 72, kind: 'pr', author: 'thatguywob', author_kind: 'clanker', superseded: { closer_pr: 15304 } }, flagged), 'x'), 'Superseded by #15304 · decide · sentinel'); +assert.strictEqual(stageTrackerReturnedWord(Object.assign({ stage: 72, kind: 'pr', author: 'thatguywob', author_kind: 'clanker', superseded: { closer_pr: 15304 } }, flagged), 'x'), 'Superseded by #15304 · decide', 'no sentinel suffix on the word'); assert.strictEqual(stageTrackerReturnedWord({ stage: 72, kind: 'pr', author: 'thatguywob', author_kind: 'clanker', superseded: true }, 'Returned to contributor'), "Returned to @thatguywob's clanker", 'a bare nested flag names no closer'); assert.strictEqual(stageTrackerReturnedWord({ stage: 72, kind: 'pr', author: 'sam', author_kind: 'human' }, 'Returned to contributor'), 'Returned to @sam'); assert.strictEqual(stageTrackerReturnedWord({ stage: 71, kind: 'pr', author: 'sam' }, 'Needs author'), 'Needs @sam'); assert.strictEqual(stageTrackerReturnedWord({ stage: 72, kind: 'pr' }, 'Returned to contributor'), 'Returned to contributor', 'no author → stage word'); -assert.strictEqual(stageTrackerReturnedWord(Object.assign({ stage: 72, kind: 'pr', author: 'thatguywob', author_kind: 'clanker' }, flagged), 'x'), "Returned to @thatguywob's clanker · sentinel"); -assert.ok(stageTrackerSentinelAsSuffix(P('o/r', 1, 72, flagged)) && stageTrackerSentinelAsSuffix(P('o/r', 1, 71, flagged))); -assert.ok(!stageTrackerSentinelAsSuffix(P('o/r', 1, 85, flagged)) && !stageTrackerSentinelAsSuffix(I('o/r', 1, 72, flagged))); +assert.strictEqual(stageTrackerReturnedWord(Object.assign({ stage: 72, kind: 'pr', author: 'thatguywob', author_kind: 'clanker' }, flagged), 'x'), "Returned to @thatguywob's clanker"); const returned = stageTrackerRowHtml(P('o/r', 15159, 72, Object.assign({ author: 'thatguywob', author_kind: 'clanker' }, flagged)), stages, ctx); -const retLit = /
  • ]*)>([\s\S]*?)<\/li>/.exec(returned); -assert.ok(retLit, 'the lit 072 chevron is tinted: ' + returned); -assert.ok(retLit[2].includes("Returned to @thatguywob's clanker · sentinel"), 'routing word with sentinel suffix: ' + retLit[2]); -assert.ok(!returned.includes('needs human') && !returned.includes('Needs human'), 'no needs-human wording at 072: ' + returned); -assert.ok(retLit[1].includes("aria-label=\"Returned to @thatguywob's clanker · sentinel — " + TIP + '"'), 'aria names the routing: ' + retLit[1]); -assert.ok(retLit[1].includes(' — ' + TIP), 'the tooltip carries the reason: ' + retLit[1]); -assert.ok(!returned.includes('ham-badge-sentinel'), 'no chip when the word carries the suffix'); +const retLit = /
  • ]*)>([\s\S]*?)<\/li>/.exec(returned); +assert.ok(retLit, 'the lit 072 chevron wears the amber outline: ' + returned); +assert.ok(retLit[2].includes("Returned to @thatguywob's clanker"), 'routing word, no sentinel suffix: ' + retLit[2]); +assert.ok(!/entinel/.test(retLit[2].replace(/]*class="config-tooltip ham-chevron-tip"[^>]*>[^<]*<\/span>/g, '')), 'no sentinel word on the chevron: ' + retLit[2]); +assert.ok(returned.includes('data-ham-gate-reasons="sentinel"') && returned.includes('>Confirm safe'), 'the alert is the gate pill\'s reason: ' + returned); +assert.ok(!returned.includes('ham-badge-sentinel'), 'no chip beside the gate'); const needsAuthor = stageTrackerRowHtml(P('o/r', 15160, 71, Object.assign({ author: 'sam', author_kind: 'human' }, flagged)), stages, ctx); -assert.ok(needsAuthor.includes('Needs @sam · sentinel') && !needsAuthor.includes('needs human'), needsAuthor); +assert.ok(needsAuthor.includes('Needs @sam') && needsAuthor.includes('data-ham-gate-reasons="sentinel"'), needsAuthor); const returnedClean = stageTrackerRowHtml(P('o/r', 15161, 72, { author: 'thatguywob', author_kind: 'clanker' }), stages, ctx); -assert.ok(returnedClean.includes("Returned to @thatguywob's clanker") && !returnedClean.includes('ham-sentinel') && !returnedClean.includes('entinel'), returnedClean); -// 085 still says it in full. -assert.ok(stageTrackerRowHtml(P('o/r', 15162, 85, flagged), stages, ctx).includes('Sentinel alert · needs human')); +assert.ok(returnedClean.includes("Returned to @thatguywob's clanker") && !returnedClean.includes('ham-human-gate') && !returnedClean.includes('entinel'), returnedClean); // Give direction on a clanker PR is carried to the contributor's clanker, // not to the hive's own fixer. assert.strictEqual(stageTrackerDirectionCarrier([{ kind: 'pr', author: 'thatguywob', author_kind: 'clanker' }]), "@thatguywob's clanker"); @@ -457,17 +455,17 @@ assert.strictEqual(stageTrackerDirectionCarrier([]), 'the author agent'); // Clean rows carry none of it. const clean = stageTrackerRowHtml(P('o/r', 104, 85), stages, ctx); -assert.ok(clean.includes('Needs human decision') && !clean.includes('entinel'), clean); +assert.ok(clean.includes('data-ham-gate-reasons="decision"') && !clean.includes('entinel'), clean); assert.ok(!stageTrackerRowHtml(P('o/r', 1, 50, { modifiers: ['needs-rebase'] }), stages, ctx).includes('entinel')); -// An issue with one covering PR rides that PR's lane word; several covering +// An issue with one covering PR carries that PR's gate; several covering // PRs put the alert on the flagged sub-row only. const single = stageTrackerRowHtml(I('o/r', 13, 85, { linked_prs: [Object.assign({ number: 112, stage: 85, title: 'Covers 13' }, flagged)] }), stages, ctx); -assert.ok(single.includes('Sentinel alert · needs human') && !single.includes('ham-badge-sentinel'), single); +assert.ok(single.includes('data-ham-gate-reasons="decision sentinel"') && !single.includes('ham-badge-sentinel') && !single.includes('Sentinel alert · needs human'), single); const multi = stageTrackerRowHtml(I('o/r', 14, 20, { linked_prs: [Object.assign({ number: 115, stage: 85, title: 'A' }, flagged), { number: 116, stage: 50, title: 'B' }] }), stages, ctx); const subs = multi.split('
    Ready for human merge · human merge') && !breaking.includes('Awaiting human merge'), 'breaking-change 090 word: ' + breaking); -// hivecommons/hive#17327: a sentinel alert or hold label is a gate on the -// PR's real stage. A green, reviewed, flagged PR stands at 090 and its Merge -// queue cell reads "Held · sentinel · confirm intent" (amber ham-held, never -// red ham-sentinel, never "Queued for merge"), the tooltip carries the -// sentinel reason and the never-merges rule, and no sentinel chip repeats it. -assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 90, flagged)), 'Held · sentinel · confirm intent'); -assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 90, { modifiers: ['hold'], hold: { by: 'clubanderson', reason: 'wait for the release' } })), 'Held · hold'); -assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 90, { sentinel_alert: true, sentinel_notice: true })), '', 'the trusted-author notice is not a gate'); -assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 85, flagged)), '', 'only the 090 row wears the held word'); -assert.strictEqual(stageTrackerHeldWord(P('o/r', 1, 90)), ''); -assert.ok(stageTrackerSentinelInLane(P('o/r', 1, 90, flagged)), 'the held 090 word carries the alert: no chip'); +// hivecommons/hive#17327 → #17470: a sentinel alert or hold label is a +// gate on the PR's real stage. A green, reviewed, flagged PR stands at 090; +// the Merge queue cell keeps its own word (amber ham-human-gated, never +// "Held · sentinel", never red ham-sentinel), the gate pill names the +// reason with the sentinel rule as its hover and Confirm safe as its verb, +// and no sentinel chip repeats it. +assert.strictEqual(keys(P('o/r', 1, 90, flagged)), 'sentinel'); +assert.strictEqual(keys(P('o/r', 1, 90, { modifiers: ['hold'], hold: { by: 'clubanderson', reason: 'wait for the release' } })), 'hold'); +assert.strictEqual(keys(P('o/r', 1, 90, { sentinel_alert: true, sentinel_notice: true })), '', 'the trusted-author notice is not a gate'); +assert.strictEqual(keys(P('o/r', 1, 90)), ''); const heldSentinel = stageTrackerRowHtml(P('o/r', 17327, 90, Object.assign({ reason: 'a sentinel alert is open on this PR' }, flagged)), stages, ctx); -assert.ok(heldSentinel.includes('Held · sentinel · confirm intent'), 'held 090 word: ' + heldSentinel); -assert.ok(heldSentinel.includes('ham-held') && !heldSentinel.includes('ham-sentinel"') && !heldSentinel.includes('ham-sentinel ') , 'amber held class, not the red sentinel one: ' + heldSentinel); -assert.ok(!heldSentinel.includes('Queued for merge') && !heldSentinel.includes('Ready for human merge'), 'never queued / ready: ' + heldSentinel); -assert.ok(heldSentinel.includes(TIP) && heldSentinel.includes('Hive never merges this head while the gate stands.'), 'tooltip carries the reason and the rule: ' + heldSentinel); -assert.ok(!heldSentinel.includes('ham-badge-sentinel'), 'no sentinel chip beside the held word: ' + heldSentinel); +assert.ok(!heldSentinel.includes('Held · ') && !heldSentinel.includes('ham-held') && !heldSentinel.includes('ham-sentinel"'), 'no held / sentinel chevron word: ' + heldSentinel); +assert.ok(/
  • Confirm safe'), 'the gate pill carries the alert and its verb: ' + heldSentinel); +assert.ok(heldSentinel.includes(esc(TIP)), 'the hover carries the reason: ' + heldSentinel); +assert.ok(!heldSentinel.includes('ham-badge-sentinel'), 'no sentinel chip beside the gate: ' + heldSentinel); const heldHold = stageTrackerRowHtml(P('o/r', 17328, 90, { modifiers: ['hold'], hold: { by: 'clubanderson', reason: 'wait for the release', since: '2026-11-08T09:00:00Z' }, reason: 'held by label hold' }), stages, ctx); -assert.ok(heldHold.includes('Held · hold') && heldHold.includes('ham-held') && !heldHold.includes('Queued for merge'), 'held-by-label 090 word: ' + heldHold); -assert.ok(heldHold.includes('Held by @clubanderson · wait for the release'), 'hold tooltip names the holder: ' + heldHold); +assert.ok(!heldHold.includes('Held · hold') && !heldHold.includes('ham-held') && heldHold.includes('data-ham-gate-reasons="hold"') && heldHold.includes('>Release hold'), 'held-by-label 090 gate: ' + heldHold); +assert.ok(heldHold.includes('Held by @clubanderson · wait for the release'), 'the gate hover names the holder: ' + heldHold); // Decide… preface: one line per flagged PR, nothing for clean ones. assert.strictEqual(stageTrackerSentinelPreface([P('o/r', 109, 85, flagged), P('o/r', 104, 85)]), '⚠ o/r#109 — ' + TIP); @@ -556,7 +553,7 @@ r = stageTrackerReconcile(el, [row(P('o/r', 109, 85, flagged))], opts); assert.deepStrictEqual(r, { kept: 0, replaced: 1, entered: 0, exited: 0, deferred: 0 }, 'flag on → same key, swapped in place'); assert.strictEqual(el.children.length, 1); assert.notStrictEqual(el.children[0], first); -assert.ok(el.children[0].html.includes('Sentinel alert · needs human')); +assert.ok(el.children[0].html.includes('data-ham-gate-reasons="decision sentinel"')); assert.ok(!el.children[0].classList.contains('ham-entering'), 'a replaced row does not fade in'); r = stageTrackerReconcile(el, [row(P('o/r', 109, 85))], opts); assert.deepStrictEqual(r, { kept: 0, replaced: 1, entered: 0, exited: 0, deferred: 0 }, 'flag off → swapped back'); diff --git a/src/pkg/dashboard/stage_tracker_sentinel_notice_test.go b/src/pkg/dashboard/stage_tracker_sentinel_notice_test.go index 5737795610..07a642709a 100644 --- a/src/pkg/dashboard/stage_tracker_sentinel_notice_test.go +++ b/src/pkg/dashboard/stage_tracker_sentinel_notice_test.go @@ -43,8 +43,11 @@ func TestStageTrackerSentinelNoticePreservesActualReviewerDecision(t *testing.T) jsFunc(t, html, "stageTrackerSentinelTipWithPaths")+ jsFunc(t, html, "stageTrackerSentinelPreface")+ "\nconst notice = "+string(payload)+";\n"+` -assert.strictEqual(stageTrackerSentinelInLane(notice), false); -assert.strictEqual(stageTrackerSentinelAsSuffix({...notice, stage:71}), false); +const noticeKeys = stageTrackerHumanGateReasons(notice).map(r => r.key); +assert.ok(!noticeKeys.includes('sentinel'), 'an informational notice is not a human gate: ' + noticeKeys); +assert.deepStrictEqual(noticeKeys, ['decision'], 'the reviewer question stays the only gate on the row'); +assert.ok(stageTrackerRowHtml(notice, stages, ctx).includes('data-ham-gate-reasons="decision"'), 'the gate pill names the reviewer question, not the notice'); +assert.ok(!stageTrackerRowHtml(notice, stages, ctx).includes('gate:confirm-sentinel'), 'nothing to confirm on an informational notice'); assert.ok(stageTrackerSentinelTip(notice).includes('Informational security notice (not a merge gate)')); assert.ok(!stageTrackerSentinelTip({...notice, sentinel_reason:''}).includes('must review before merge')); const own = stageTrackerRowHtml(notice, stages, ctx); @@ -64,8 +67,8 @@ const nested = stageTrackerRowHtml({repo:notice.repo, kind:'issue', number:500, assert.ok(!text(nested).includes('Sentinel alert'), text(nested)); assert.ok(!text(nested).includes('Needs @clubanderson'), text(nested)); const blocking = {...notice, sentinel_notice:false}; -assert.strictEqual(stageTrackerSentinelInLane(blocking), true, 'actual blocking alert remains a sentinel gate'); -assert.strictEqual(stageTrackerSentinelAsSuffix({...blocking, stage:71}), true); +assert.ok(stageTrackerHumanGateReasons(blocking).some(r => r.key === 'sentinel'), 'actual blocking alert remains a sentinel gate'); +assert.ok(stageTrackerHumanGateReasons({...blocking, stage:71}).some(r => r.key === 'sentinel'), 'the gate stands on a returned PR too'); assert.ok(!stageTrackerSentinelTip(blocking).includes('Informational')); `) it.SentinelNotice = false diff --git a/src/pkg/dashboard/stage_tracker_ui_prelude_test.go b/src/pkg/dashboard/stage_tracker_ui_prelude_test.go index cef38b281f..f47aa07989 100644 --- a/src/pkg/dashboard/stage_tracker_ui_prelude_test.go +++ b/src/pkg/dashboard/stage_tracker_ui_prelude_test.go @@ -138,6 +138,7 @@ func stageTrackerRowsPreludeJS(t *testing.T, html string) string { jsFunc(t, html, "stageTrackerNeedsHumanWord"), jsFunc(t, html, "stageTrackerBlockedForDecisionPR"), jsFunc(t, html, "stageTrackerChipsHtml"), + stageTrackerHumanGateJS(t, html), jsFunc(t, html, "stageTrackerHeadColsHtml"), jsFunc(t, html, "stageTrackerSinceHtml"), jsFunc(t, html, "stageTrackerSubRowHtml"), diff --git a/src/pkg/dashboard/stage_tracker_ui_rows_test.go b/src/pkg/dashboard/stage_tracker_ui_rows_test.go index 9f56d6a52e..d36707fa75 100644 --- a/src/pkg/dashboard/stage_tracker_ui_rows_test.go +++ b/src/pkg/dashboard/stage_tracker_ui_rows_test.go @@ -57,10 +57,11 @@ row = stageTrackerRowHtml({ repo: 'acme/console', number: 12, kind: 'pr', title: assert.ok(row.includes('scanner logscrub misses attrs'), 'linked issue slot draws the chip: ' + row); // Open but held: the Open segment itself names the hold state and the row -// tooltip names the matching hold label, while the trailing flag pill remains. +// tooltip names the matching hold label; the hold is a human gate, so the +// trailing control is the one gate pill (reason "hold") rather than a chip. row = stageTrackerRowHtml({ repo: 'acme/console', number: 9, kind: 'pr', title: 'Paused', stage: 0, caption: 'No stage recorded yet', labels: ['do-not-merge/hold'], modifiers: ['hold'] }, stages, ctx); -assert.deepStrictEqual(segStates(row), ['active ham-open-hold', T, T, T, T, T, 'todo cap']); -assert.ok(row.includes('ham-mod-hold">hold'), row); +assert.deepStrictEqual(segStates(row), ['active ham-open-hold ham-human-gated', T, T, T, T, T, 'todo cap']); +assert.ok(!row.includes('ham-mod-hold">hold') && row.includes('ham-human-gate') && row.includes('Needs human · hold'), row); assert.ok(tooltip(row).includes('Open · on hold (do-not-merge/hold) · No stage recorded yet · acme/console'), tooltip(row)); // Open and awaiting triage: the action chip reads "triage needed"; the Open @@ -111,7 +112,7 @@ assert.deepStrictEqual(stageTrackerOpenSince({ created_at: '2025-01-01T00:00:00Z assert.deepStrictEqual(stageTrackerOpenSince({}), { ms: 0, fromCreated: false }); row = stageTrackerRowHtml({ repo: 'acme/console', number: 23, kind: 'pr', title: 'Held', stage: 0, stage_since: new Date(now - 3 * 86400000).toISOString(), modifiers: ['hold'] }, stages, ctx); assert.strictEqual(openWord(row), 'Open · hold', 'Open · hold never carries the age (owner)'); -assert.deepStrictEqual(segStates(row), ['active ham-open-hold', T, T, T, T, T, 'todo cap'], 'held: no stale tint either'); +assert.deepStrictEqual(segStates(row), ['active ham-open-hold ham-human-gated', T, T, T, T, T, 'todo cap'], 'held: no stale tint either'); // Open · blocked (the blocked label) mirrors Open · hold but, unlike it, // keeps the age — a stale blocked item is what the owner wants to see // (hivecommons/hive#14194). hold wins when both are present. @@ -151,7 +152,7 @@ row = stageTrackerRowHtml({ repo: 'acme/console', number: 30, kind: 'issue', tit assert.ok(!row.includes('3d'), 'only blocked rows borrow created_at for the since column'); row = stageTrackerRowHtml({ repo: 'acme/console', number: 27, kind: 'pr', title: 'Held and blocked', stage: 0, stage_since: new Date(now - 3 * 86400000).toISOString(), modifiers: ['blocked', 'hold'] }, stages, ctx); assert.strictEqual(openWord(row), 'Open · hold', 'hold is a human instruction: it wins over blocked and still carries no age'); -assert.deepStrictEqual(segStates(row), ['active ham-open-hold', T, T, T, T, T, 'todo cap']); +assert.deepStrictEqual(segStates(row), ['active ham-open-hold ham-human-gated', T, T, T, T, T, 'todo cap']); row = stageTrackerRowHtml({ repo: 'acme/console', number: 28, kind: 'pr', title: 'Blocked later', stage: 50, modifiers: ['blocked'] }, stages, ctx); assert.ok(!row.includes('ham-open-blocked') && !row.includes('Open · blocked'), 'blocked past Open is a chip, not an Open word'); // A draft PR with no stage (hivecommons/hive#14572): the far-right pill @@ -173,6 +174,7 @@ assert.strictEqual(stageTrackerCurrentStageHtml({ stage: 0, stage_since: new Dat // and the folded draft still explains itself on hover. row = stageTrackerRowHtml({ repo: 'acme/console', number: 31, kind: 'pr', title: 'Held draft', stage: 0, stage_since: new Date(now - 3 * 86400000).toISOString(), labels: ['do-not-merge/hold'], modifiers: ['hold', 'draft'] }, stages, ctx); assert.strictEqual(openWord(row), 'Open · hold', 'hold wins the Open word over draft'); +// A draft is not a human gate, so the held draft keeps its chips and no gate pill. assert.deepStrictEqual(segStates(row), ['active ham-open-hold', T, T, T, T, T, 'todo cap']); assert.ok(row.includes('ham-mod-hold" title="' + STAGE_TRACKER_DRAFT_TIP + '">hold +1'), 'hold leads, draft folded: ' + row); row = stageTrackerRowHtml({ repo: 'acme/console', number: 32, kind: 'pr', title: 'Still drafting', stage: 50, modifiers: ['draft'] }, stages, ctx); @@ -241,7 +243,8 @@ assert.strictEqual(stageTrackerAnchor(95, stages, 'pr'), STAGE_TRACKER_MERGE_COL // PR returned to contributor: detour badge rides Review; chip cap = author kind + first modifier (+N). row = stageTrackerRowHtml({ repo: 'acme/console', number: 102, kind: 'pr', title: 'Fix flaky', stage: 72, lane: 'contributor', tier: 'trusted', author: 'karibhou', author_kind: 'clanker', author_kind_source: 'inferred', modifiers: ['needs-rebase', 'needs-human'], caption: 'Returned to @karibhou', history: [{number:50,slug:'review-pending'},{number:60,slug:'reviewed'},{number:72,slug:'returned-to-contributor',from:60}] }, stages, ctx); -assert.deepStrictEqual(segStates(row), [D, D, D, 'active detoured', T, T, 'todo cap']); +// needs-human is a gate reason: the lit chevron wears the amber outline and the gate pill carries the verbs. +assert.deepStrictEqual(segStates(row), [D, D, D, 'active detoured ham-human-gated', T, T, 'todo cap']); // hivecommons/hive#15159: the chevron names the routing — the contributor's clanker, for a clanker's PR. assert.ok(row.includes('Returned to @karibhou's clanker'), row); // Invariant: a PR never occupies the issue slot. A PR with no linked issue @@ -257,7 +260,8 @@ assert.ok(!/#102') && prCol(row)[0].includes('Fix flaky'), 'coloured author icon, #102, title in the PR column: ' + prCol(row)[0]); assert.strictEqual(titles(row, 'Fix flaky'), 1, 'title appears once'); assert.strictEqual(chips(row), 1, 'author kind is an icon, not a chip'); -assert.ok(row.includes('ham-mod-needs-human">needs human +1'), row); +// needs-human moved into the gate pill, so the chip strip reads the remaining modifier alone. +assert.ok(row.includes('ham-mod-needs-rebase">needs rebase') && !row.includes('ham-mod-needs-human') && row.includes('ham-human-gate'), row); assert.ok(tooltip(row).includes('Flags: needs-rebase, needs-human') && tooltip(row).includes('Trail: CI / Review → Reviewed → Returned to contributor'), tooltip(row)); // PR reviewed (060): pre-admission (CI pending or soak), so CI / Review stays lit; the merge gate starts at 080. @@ -281,10 +285,15 @@ assert.ok(row.includes('3h'), row); row = stageTrackerRowHtml({ repo: 'acme/console', number: 105, kind: 'pr', stage: 90 }, stages, ctx); assert.deepStrictEqual(segStates(row), [D, D, D, D, D, 'active detoured', 'todo cap']); assert.ok(row.includes('Ready for human merge')); -// 085 has its own word; needs-decision as a modifier elsewhere reads "needs human decision". +// 085 on a PR: the chevron reads the real stage column (the human gate is +// the pill on the right, never a chevron word — hivecommons/hive#17470). row = stageTrackerRowHtml({ repo: 'acme/console', number: 106, kind: 'pr', stage: 85, modifiers: ['blocked'], caption: 'DCO failing — fix, waive or close' }, stages, ctx); -assert.deepStrictEqual(segStates(row), [D, D, D, D, D, 'active detoured', 'todo cap']); -assert.ok(row.includes('Needs human decision') && !row.includes('ham-mod-needs-decision'), row); +assert.deepStrictEqual(segStates(row), [D, D, D, D, D, 'active detoured ham-human-gated', 'todo cap']); +assert.ok(row.includes('Merge queue') && !row.includes('ham-mod-needs-decision'), row); +// (The hover tooltip may still open with "Needs human decision"; the visible chevron copy never does.) +assert.ok(!strip(row).split('

    ')[0].replace(/]*class="config-tooltip[^"]*"[^>]*>[\s\S]*?<\/span>/g, '').replace(/<[^>]*>/g, '').includes('Needs human'), 'no "Needs human" chevron word: ' + strip(row)); +assert.ok(row.includes('

    Needs human decision · '), 'the expander line still names the decision: ' + row); +assert.ok(row.includes('ham-human-gate') && row.includes('Needs human · decision'), row); assert.ok(tooltip(row).includes('Needs a human decision'), row); // A blocked issue with a hive:recheck-after deadline names it on the chip // (hivecommons/hive#13310); a bare blocked row keeps the plain chip. @@ -299,7 +308,7 @@ assert.ok(row.includes('>blocked') && !row.includes('re-check'), row); // pre-045 issue still wearing 085 is drawn the same way until re-staged. for (const parked of [45, 85]) { row = stageTrackerRowHtml({ repo: 'acme/console', number: 355, kind: 'issue', stage: parked }, stages, ctx); - assert.deepStrictEqual(segStates(row), [D, 'active detoured', T, T, T, T, 'todo cap'], row); + assert.deepStrictEqual(segStates(row), [D, 'active detoured ham-human-gated', T, T, T, T, 'todo cap'], row); assert.ok(row.includes('Needs human decision') && tooltip(row).includes('Needs a human decision') && !tooltip(row).includes('(its PR)'), row); } // 045 needs attention like the other parking stages. @@ -314,7 +323,7 @@ assert.strictEqual(stageTrackerHeadline({ kind: 'pr', stage: 70, modifiers: ['re // ...but an issue whose single covering PR sits on 085 still rides the PR's // merge gate, with the "(its PR)" suffix. row = stageTrackerRowHtml({ repo: 'acme/console', number: 356, kind: 'issue', stage: 40, linked_prs: [{ number: 109, author_kind: 'hive', stage: 85 }] }, stages, ctx); -assert.deepStrictEqual(segStates(row), [D, D, D, D, D, 'active detoured', 'todo cap'], row); +assert.deepStrictEqual(segStates(row), [D, D, D, D, D, 'active detoured ham-human-gated', 'todo cap'], row); assert.ok(tooltip(row).includes('Needs a human decision (its PR)'), row); // A PR parked at 085 lights the 080 column as a detour; its chevron hover // names the parking stage, not the column it rides on — the owner read @@ -326,7 +335,8 @@ assert.ok(chevronTip(row).startsWith('Needs human decision') && !chevronTip(row) row = stageTrackerRowHtml({ repo: 'acme/console', number: 14830, kind: 'pr', stage: 80, caption: 'CI green' }, stages, ctx); assert.ok(chevronTip(row).startsWith('Awaiting merge admission — not yet admitted') && chevronTip(row).includes('Next move: hive'), '080 keeps its own hover: ' + chevronTip(row)); row = stageTrackerRowHtml({ repo: 'acme/console', number: 107, kind: 'pr', stage: 50, modifiers: ['needs-decision'] }, stages, ctx); -assert.ok(row.includes('ham-mod-needs-decision">needs human decision') && tooltip(row).includes('Flags: needs human decision'), row); +// needs-decision as a modifier is the gate pill's reason "decision", not a chip; the row tooltip still flags it. +assert.ok(!row.includes('ham-mod-needs-decision') && row.includes('Needs human · decision') && tooltip(row).includes('Flags: needs human decision'), row); // Whose move it is, as an ink-coloured icon after the word: Review = hive, // PR in progress = the PR author, Claimed = the claimant; Open/Actionable carry none. assert.ok(row.includes('data-track="ci"') && row.includes('data-track="review"') && !row.includes('ham-actor-ico'), 'a native stage cannot identify the actual reviewer: ' + row); @@ -559,7 +569,7 @@ assert.deepStrictEqual(segStates(row), ['active', T, T, T, T, T, 'todo cap']); // is what the chevron says, the actor is whose move it is. The active // chevron now leads with its stage icon, so the regex skips that svg. const prWords = {}; -for (const [st, word, actor] of [[50, 'CI / Review', 'hive'], [60, 'Review passed', 'hive'], [70, 'Fixing', 'author'], [71, 'Needs author', 'author'], [72, 'Returned to contributor', 'author'], [74, 'Adopted by hive', 'hive'], [80, 'Queued for merge', 'hive'], [85, 'Needs human decision', 'human'], [90, 'Ready for human merge', 'human'], [100, 'Merging', 'hive']]) { +for (const [st, word, actor] of [[50, 'CI / Review', 'hive'], [60, 'Review passed', 'hive'], [70, 'Fixing', 'author'], [71, 'Needs author', 'author'], [72, 'Returned to contributor', 'author'], [74, 'Adopted by hive', 'hive'], [80, 'Queued for merge', 'hive'], [85, 'Merge queue', 'human'], [90, 'Ready for human merge', 'human'], [100, 'Merging', 'hive']]) { const r = stageTrackerRowHtml({ repo: 'acme/console', number: 500 + st, kind: 'pr', stage: st, author_kind: 'clanker' }, stages, ctx); if ([50, 60, 70, 71, 72, 74].includes(st)) { assert.ok(r.includes('data-track="ci"') && r.includes('data-track="review"'), 'pre-gate tracks remain separate at ' + st); @@ -749,7 +759,7 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ // the person's move ON THE PR, not a merge matter: the row lights its REAL // stage — the CI track, stalled, amber-marked (ham-human-gated) — with // PR in progress passed and the Merge queue column empty; the ask rides -// as the needs-human pill, never as a "Needs human" chevron of its own +// in the one human-gate pill, never as a "Needs human" chevron of its own // (hivecommons/hive#17453). A merge-ready twin (approved + CI green) or a // queued one keeps the gate. { @@ -805,7 +815,7 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ assert.ok(/

  • ]*data-motion="active"[^>]*>[\s\S]*?CI 3\/9 · 6 running<\/span>/.test(row), 'CI is the lit chevron, in motion, amber-marked: ' + strip(row)); assert.ok(/
  • ]*>[\s\S]*?Needs human/.test(strip(row)), 'no "Needs human" stage chevron: ' + strip(row)); - assert.ok(row.includes('ham-mod-needs-decision') && row.includes('>needs human decision<'), 'the ask rides as the needs-decision pill: ' + strip(row)); + assert.ok(!row.includes('ham-mod-needs-decision') && row.includes('ham-human-gate') && row.includes('Needs human · review, decision'), 'the ask rides as the human-gate pill (review verdict + 085 stack): ' + row); assert.ok(row.includes('needs a person: ' + question.replace(/'/g, ''')) || row.includes('needs a person: ' + question), 'the lit CI chevron\'s tooltip carries the question: ' + row); // The same row with CI green and the review verdict pending lights Review, stalled, amber-marked. const reviewing = stageTrackerRowHtml(shape({ ci_activity: { head, state: 'passing', caption: 'CI green', checks_passed: 9, checks_total: 9, source: 'checks', observed_at: seen }, review_activity: { head, state: 'unknown', caption: 'Review pending', perspectives_done: 0, perspectives_total: 5, source: 'review-dispatch-wait', observed_at: seen } }), stages, ctx); @@ -814,8 +824,8 @@ assert.ok(/[^<]*<\/span>/.test(row) && !/ assert.ok(/
  • ]*data-verdict="pass"/.test(reviewing), 'green CI is the ring alone: ' + strip(reviewing)); // A payload that predates the server re-adding the modifier still shows the pill. const bare = stageTrackerRowHtml(shape({ modifiers: [] }), stages, ctx); - assert.ok(bare.includes('ham-mod-needs-decision'), 'the pill is derived client-side too: ' + strip(bare)); - assert.strictEqual((bare.match(/ham-mod-needs-decision/g) || []).length, 1, bare); + assert.ok(bare.includes('ham-human-gate') && bare.includes('Needs human · review, decision'), 'the gate is derived client-side too: ' + bare); + assert.strictEqual((bare.match(/class="ham-human-gate"/g) || []).length, 1, 'exactly one gate control: ' + bare); } // hivecommons/hive#16599 rows (canonical: active = amber + words, inactive = // icon only). #16567 (dependabot, 050, review approved, 10 workflow runs diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index 8dce519905..7acbbe0327 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -316,7 +316,6 @@ status token the sentinel pill on the repo card already uses. */ .ham-badge-sentinel { color: var(--status-error); border-color: color-mix(in srgb, var(--status-error) 55%, transparent); font-weight: var(--fw-medium); } .ham-badge-sentinel.ham-sentinel-notice { color: var(--status-info); border-color: color-mix(in srgb, var(--status-info) 55%, transparent); } - .ham-seg.active.ham-sentinel { background: var(--status-error); color: var(--surface-0); } /* 072 adoption chip (maintainer-policy, hive PR 14524): "waiting on @author (maintainer, offline 26h) — adopt?" */ .ham-badge-adoption { color: var(--status-warn); border-color: color-mix(in srgb, var(--status-warn) 55%, transparent); font-weight: var(--fw-medium); } /* "supersedes N": the closed original a live PR replaced (hive PR 15135 follow-up). Muted — a trace, not a call to act. */ @@ -476,12 +475,10 @@ .ham-seg.active.ham-open-hold { background: var(--yellow); color: var(--surface-0); } /* A 090 row a sentinel alert or hold label gates (hivecommons/hive#17327): the Merge queue cell wears the pill amber — held, not queued, not red. */ - .ham-seg.active.ham-held { background: var(--amber); color: var(--surface-0); } - .ham-seg.active.ham-held .ham-detour::before { content: '⏸'; margin-right: var(--sp-1); } /* A 085 PR a person acts on lights its real stage — the CI / Review track — and that track wears an amber marker; the gate itself is the needs-human pill beside the row (hivecommons/hive#17453). */ - .ham-seg.ham-activity-track.active.ham-human-gated { outline: var(--focus-ring-width) solid var(--amber); outline-offset: calc(-1 * var(--focus-ring-width)); } + .ham-seg.active.ham-human-gated { outline: var(--focus-ring-width) solid var(--amber); outline-offset: calc(-1 * var(--focus-ring-width)); } .ham-seg.active.ham-open-hold .ham-seg-t::before { content: '⏸'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-blocked { background: var(--yellow); color: var(--surface-0); } .ham-seg.active.ham-open-blocked .ham-seg-t::before { content: '⛔'; margin-right: var(--sp-1); } @@ -981,6 +978,30 @@ /* Busy (Let hive decide gathering its preview) also sets aria-disabled, so this compound rule sits after the disabled one and wins: the working colour, not faint/dashed. */ .ham-lead-act[aria-busy="true"][aria-disabled="true"] { cursor: progress; opacity: 1; border-style: solid; border-color: var(--cue-work); background: color-mix(in srgb, var(--cue-work) 10%, transparent); color: var(--cue-work); } + /* One human-gate control per gated row: a segmented pill whose left + segment names the reasons (👤 Needs human · review, sentinel) and whose + right segments are the verbs those reasons determine. Replaces the + scattered sentinel chip + Approve + Let hive decide + needs-human pill. */ + .ham-human-gate { display: inline-flex; align-items: stretch; max-width: 100%; overflow: hidden; border: var(--line-width) solid color-mix(in srgb, var(--amber) 60%, var(--line-subtle)); border-radius: var(--r-pill); background: color-mix(in srgb, var(--amber) 8%, var(--panel)); font-size: var(--fs-xs); line-height: 1.5; vertical-align: middle; } + .ham-human-gate > .ham-gate-status { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; padding: 0 var(--sp-2) 0 var(--sp-3); border: 0; background: transparent; color: var(--amber); font: inherit; font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + .ham-human-gate > .ham-gate-status > .ham-mod-word { overflow: hidden; text-overflow: ellipsis; } + .ham-human-gate > button.ham-gate-status { cursor: pointer; } + .ham-human-gate > button.ham-gate-status:hover, .ham-human-gate > button.ham-gate-status:focus-visible { text-decoration: underline; outline: none; } + .ham-human-gate > .ham-gate-act { --ham-gate-seg-radius: 0; border-radius: var(--ham-gate-seg-radius); border-top: 0; border-bottom: 0; border-right: 0; border-left-color: color-mix(in srgb, var(--amber) 35%, transparent); margin: 0; } + .ham-human-gate > .ham-gate-act.ham-act-secondary, .ham-human-gate > .ham-gate-more { --ham-act-fill: transparent; --ham-act-ink: var(--text); } + .ham-human-gate > .ham-gate-act:hover, .ham-human-gate > .ham-gate-act:focus-visible { box-shadow: none; background: color-mix(in srgb, var(--amber) 22%, transparent); filter: none; } + .ham-human-gate > .ham-gate-act.ham-act-primary:hover, .ham-human-gate > .ham-gate-act.ham-act-primary:focus-visible { filter: brightness(1.12); } + .ham-human-gate > .ham-gate-more { padding-inline: var(--sp-2); } + .ham-human-gate > .ham-gate-more::after { content: none; } + .ham-human-gate > .ham-gate-more[aria-expanded="true"] { background: color-mix(in srgb, var(--amber) 22%, transparent); } + .ham-human-gate.ham-gate-settling { opacity: 0.75; border-style: dashed; } + .ham-human-gate.ham-gate-settling > .ham-gate-status { color: var(--cue-work); } + /* Strip tier: the … button only when a verb overflows; menu copies of + the inline verbs stay hidden. The phone tier flips both. */ + .ham-gate-more-wrap[data-ham-gate-overflow="0"], .ham-gate-menu > [data-ham-gate-inline] { display: none; } + .ham-gate-menu[hidden] { display: none; } + /* The passive "decision pending on #N" chip is a link to the primary row. */ + .ham-decision-pending[data-ham-scroll-to] { text-decoration: underline dotted; text-underline-offset: var(--sp-1); } /* The technical background folds behind one collapsed Details. */ .ham-decision-details { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); color: var(--text-muted); } .ham-decision-details > summary { cursor: pointer; color: var(--text-faint); } @@ -1008,6 +1029,13 @@ /* Stacked head: the ask pill is its person icon alone (#17453). */ .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-ask > .ham-mod-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-ask > .ham-mod-ico { margin-right: 0; } + .ham-head-cols .ham-human-gate > .ham-gate-status > .ham-mod-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } + .ham-head-cols .ham-human-gate > .ham-gate-status { position: relative; padding-right: var(--sp-2); } + /* Stacked head: the first verb inline, the rest behind …, so the pill + leaves the title its line and no verb is squeezed into a fragment. */ + .ham-head-cols .ham-human-gate > .ham-gate-act-rest { display: none; } + .ham-head-cols .ham-human-gate .ham-gate-more-wrap[data-ham-gate-overflow="0"] { display: inline; } + .ham-head-cols .ham-human-gate .ham-gate-menu > [data-ham-gate-inline] { display: flex; } .ham-row .ham-seg { padding: 0 var(--sp-2) 0 var(--sp-3); } .ham-row .ham-seg.cap { flex-basis: 2em; } .ham-since { width: 3em; } @@ -1240,6 +1268,13 @@ one-line box so a card row stays under the #17161 height budget; the hit area is padded out to the tap target like .ham-pill (#17453). */ #activity-monitor-section .ham-badge-mod.ham-decision-trigger { position: relative; } + /* Gate segments keep the one-line pill; each segment pads its hit area + out to the tap target so the phone harness sees ≥44×44. */ + #activity-monitor-section .ham-human-gate { display: inline-flex; line-height: inherit; vertical-align: baseline; } + #activity-monitor-section .ham-human-gate > .ham-gate-act, #activity-monitor-section .ham-human-gate > .ham-gate-more, #activity-monitor-section .ham-human-gate > button.ham-gate-status { position: relative; display: inline-flex; min-width: var(--tap-target); min-height: 0; height: auto; padding-block: 0; line-height: inherit; } + #activity-monitor-section .ham-human-gate > .ham-gate-act-rest { display: none; } + + #activity-monitor-section .ham-human-gate > .ham-gate-act::before, #activity-monitor-section .ham-human-gate > .ham-gate-more::before, #activity-monitor-section .ham-human-gate > button.ham-gate-status::before { content: ""; position: absolute; inset: calc((1lh - var(--tap-target)) / 2) 0; } #activity-monitor-section .ham-badge-mod.ham-decision-trigger::before { content: ""; position: absolute; inset: calc((1lh - var(--tap-target)) / 2) calc((100% - var(--tap-target)) / 2); } /* A card keeps its two-line head and its density (#17161): the 🗒 shows on a phone only once the item has notes; the row's ⋯ menu diff --git a/src/pkg/dashboard/static-src/js/tracker-actions.js b/src/pkg/dashboard/static-src/js/tracker-actions.js index 94a6ffb54c..691b54825c 100644 --- a/src/pkg/dashboard/static-src/js/tracker-actions.js +++ b/src/pkg/dashboard/static-src/js/tracker-actions.js @@ -43,6 +43,8 @@ open: 'Open on GitHub', copy: 'Copy link', 'open:app-settings': 'Grant the App permission', 'blocker:recheck': 'Re-check permissions', 'blocker:patch': 'Prepare the patch for a person to push', 'blocker:close-partial': 'Mark partially-addressed and close', 'blocker:wait': 'Keep waiting', + // The human-gate pill's reason-bound verbs (hivecommons/hive#17470). + 'gate:decide': 'Decide', 'gate:request-changes': 'Request changes', 'gate:confirm-sentinel': 'Confirm safe', }; // Actions that end with a commit on the base branch — the lead // "Approve and let hive merge" (the hive's sweep merges on its next @@ -983,8 +985,14 @@ const key = sub ? sub.dataset.hamSubKey : (row ? row.dataset.hamKey : ''); const item = key ? stageTrackerItemByKey(_stageTracker, key) : null; if (!item) return; - stageTrackerDecisionRun(item, b.dataset.hamAct); + const run = stageTrackerDecisionRun(item, b.dataset.hamAct); + // A human-gate verb that went through reads "settling…" on its pill + // until the next snapshot re-renders the row (hivecommons/hive#17470). + if (b.classList.contains('ham-gate-act') && run && typeof run.then === 'function' && typeof stageTrackerHumanGateSettling === 'function') { + run.then(r => { if (r && !r.cancelled && Array.isArray(r.results) && r.results.length && r.results.every(x => x && x.ok)) stageTrackerHumanGateSettling(b); }, () => {}); + } }); + if (typeof stageTrackerWireHumanGate === 'function') stageTrackerWireHumanGate(el); // Cmd/Ctrl- or Shift-click anywhere on a row (not on its links or // buttons) selects it too. el.addEventListener('click', e => { @@ -1360,6 +1368,14 @@ const to = payload.to || stageTrackerRerouteTargetOf(id) || STAGE_TRACKER_REROUTE_ANY; return { url: '/api/repos/' + seg + '/items/' + n + '/decision', body: { decision: 'reroute', to, comment: payload.comment || '', type } }; } + // The human-gate verbs: Decide… and Request changes… are directions + // (the "/hive decision …" carrier); Confirm safe clears the sentinel. + if (id === 'gate:decide' || id === 'gate:request-changes') { + return { url: '/api/repos/' + seg + '/items/' + n + '/decision', body: { decision: 'direction', comment: payload.comment || '', type } }; + } + if (id === 'gate:confirm-sentinel') { + return { url: '/api/repos/' + seg + '/items/' + n + '/sentinel-confirm', body: { comment: payload.comment || '', type } }; + } if (id.indexOf('decide:') === 0) { const body = { decision: id.slice('decide:'.length), comment: payload.comment || '', type }; if (payload.supersededBy) body.superseded_by = payload.supersededBy; @@ -2104,6 +2120,21 @@ return (await stageTrackerAsk(id, 'confirm', { title: 'Approve pull request' + (items.length > 1 ? 's' : ''), message: preface + 'Post "/lgtm" and "/approve" on ' + refs + ' as ' + who + '? The merge queue takes it from there — the dashboard does not merge.', confirmLabel: 'Post /lgtm + /approve', danger: !!sentinel })) ? {} : null; } return (await stageTrackerAsk(id, 'confirm', { title: 'Approve direction', message: 'Record "/hive approve" on ' + refs + ' as ' + who + '? The hive un-parks the issue' + (items.length > 1 ? 's' : '') + ' and carries on; nothing is merged.', confirmLabel: 'Approve' })) ? {} : null; + case 'gate:decide': { + // The reviewer's question leads the modal, pre-filled; the answer is required. + const dec = typeof stageTrackerDecisionOf === 'function' ? stageTrackerDecisionOf(items[0]) : null; + const q = (dec && dec.item && dec.item.decision_needed && dec.item.decision_needed.question) || (items[0] && items[0].human_attention && items[0].human_attention.reason) || ''; + const v = await hivePrompt({ title: 'Decide — ' + refs, label: preface + (q ? 'Question: ' + q + '\n\n' : '') + 'Your decision (posted as "/hive decision …"; the hive carries on with it)', placeholder: 'e.g. take option B and keep the API as is', validate: s => s ? true : 'A decision is required', confirmLabel: 'Send' }); + return v == null ? null : { comment: v }; + } + case 'gate:request-changes': { + const v = await hivePrompt({ title: 'Request changes — ' + refs, label: preface + 'What should change on ' + refs + '? (posted as "/hive decision …"; ' + stageTrackerDirectionCarrier(items) + ' pushes a new head)', placeholder: 'e.g. drop the retry loop and keep the flag', validate: s => s ? true : 'The requested change is required', confirmLabel: 'Send' }); + return v == null ? null : { comment: v }; + } + case 'gate:confirm-sentinel': { + const v = await stageTrackerAsk(id, 'prompt', { title: 'Confirm safe — ' + refs, label: preface + 'Confirm the sentinel finding is intended: this comments your confirmation on ' + refs + ' and removes the sentinel label so the lane may continue. Note (optional)', placeholder: 'e.g. the workflow edit is the point of this PR', confirmLabel: 'Confirm safe', danger: true }); + return v == null ? null : { comment: v }; + } case 'decide:direction': { // The direction is required, so this prompt is never skipped. const v = await hivePrompt(prs @@ -2253,11 +2284,12 @@ 'decide:delegate': 'Hive deciding…', 'decide:delegate:preview': 'Asking the hive…', 'decide:delegate-all': 'Hive deciding each PR…', 'decide:delegate:rerun': 'Hive deciding again…', 'decide:approve': 'Approving…', 'decide:direction': 'Recording direction…', 'decide:close-superseded': 'Closing…', 'decide:close-wontfix': 'Closing…', 'decide:close-read': 'Closing…', 'decide:close-deferred': 'Closing…', 'decide:close-issue': 'Closing…', 'decide:merge-now': 'Merging…', 'decide:queue-merge': 'Recording approval…', 'decide:adopt': 'Adopting…', 'decide:adopt-now': 'Adopting now…', 'decide:reroute': 'Rerouting…', + 'gate:decide': 'Sending your decision…', 'gate:request-changes': 'Requesting changes…', 'gate:confirm-sentinel': 'Confirming safe…', }; const STAGE_TRACKER_ACTION_WORDS = { adopted: 'adopted', approved: 'approved', recommended: 'recommendation only', closed: 'closed', directed: 'direction recorded', refused: 'refused', 'decided-each': 'decided per PR', merged: 'merged', 'queued-for-merge': 'queued for merge — hive merges it on its next pass once CI is green', [STAGE_TRACKER_ACTION_REBASE_QUEUED]: 'rebase queued, merge to follow', - held: 'held', released: 'hold released', rescanned: 'rescanned', 'triage-accepted': 'triage accepted', 'needs-human': 'marked needs-human', rerouted: 'rerouted', [STAGE_TRACKER_ACTION_NOOP]: 'no change', + held: 'held', released: 'hold released', 'sentinel-confirmed': 'sentinel confirmed safe', rescanned: 'rescanned', 'triage-accepted': 'triage accepted', 'needs-human': 'marked needs-human', rerouted: 'rerouted', [STAGE_TRACKER_ACTION_NOOP]: 'no change', [STAGE_TRACKER_ACTION_NO_EFFECT]: 'no effect yet', }; // Once the server has answered, a terminal action's caption says so @@ -2270,7 +2302,7 @@ } // The ledger name of a row action id (the inverse of the badge's // STAGE_TRACKER_ACTED_OPTION_ID), for a failure noted on the client. - const STAGE_TRACKER_ACTION_LEDGER_NAME = { 'decide:delegate': 'let-hive-decide', 'decide:approve': 'approve', 'decide:direction': 'give-direction', 'decide:close-superseded': 'close-superseded', 'decide:close-wontfix': 'wontfix', 'decide:close-deferred': 'wontfix', 'decide:close-read': 'close-read', 'decide:close-issue': 'close-issue', 'accept-triage': 'accept-triage', hold: 'hold', release: 'release', 'needs-human': 'mark-needs-human', 'decide:merge-now': 'merge-now', 'decide:queue-merge': 'queue-merge', 'decide:adopt': 'adopt', 'decide:adopt-now': 'adopt-now', 'decide:reroute': 'reroute' }; + const STAGE_TRACKER_ACTION_LEDGER_NAME = { 'decide:delegate': 'let-hive-decide', 'decide:approve': 'approve', 'decide:direction': 'give-direction', 'decide:close-superseded': 'close-superseded', 'decide:close-wontfix': 'wontfix', 'decide:close-deferred': 'wontfix', 'decide:close-read': 'close-read', 'decide:close-issue': 'close-issue', 'accept-triage': 'accept-triage', hold: 'hold', release: 'release', 'needs-human': 'mark-needs-human', 'decide:merge-now': 'merge-now', 'decide:queue-merge': 'queue-merge', 'decide:adopt': 'adopt', 'decide:adopt-now': 'adopt-now', 'decide:reroute': 'reroute', 'gate:decide': 'give-direction', 'gate:request-changes': 'give-direction', 'gate:confirm-sentinel': 'confirm-sentinel' }; // A failed or refused action is noted on the row at once, so the // history badge turns red and its hover's first line names the reason // — the server's ledger only sees 5xx and refused answers, and a diff --git a/src/pkg/dashboard/static-src/js/tracker-human-gate.js b/src/pkg/dashboard/static-src/js/tracker-human-gate.js new file mode 100644 index 0000000000..57d2d72534 --- /dev/null +++ b/src/pkg/dashboard/static-src/js/tracker-human-gate.js @@ -0,0 +1,224 @@ + /* ---- The human gate: one control per gated row ---------------------- + A row a person must settle used to say so three or four ways at once + — a "Needs human · review" chevron word, a `sentinel` chip, a + needs-decision pill, `Approve ▸` and `Let hive decide ▸` — and still + offered no verb for some gates (a sentinel alert had nothing that + confirmed it; a "needs decision" had nothing that decided). The + maintainer on hivecommons/hive (2026-11-10): "I don't see a consistent + way to settle each of these using the UI. Some are confusing, others + have no controls to take action, others have too many." + + Now every gated row carries exactly ONE segmented pill: + [👤 Needs human · ] [verb] [verb] [verb] [… more] + The status segment names why (review / decision / sentinel / hold, + comma-separated when they stack) and carries the reviewer's question + or the sentinel rule as its hover and popover; the verb segments are + the fixed set for those reasons (STAGE_TRACKER_GATE_VERBS), unioned + and de-duplicated, at most STAGE_TRACKER_GATE_VISIBLE visible with the + rest behind a `…` menu. "Needs human" is never a chevron word: the lit + chevron is the row's real stage with the amber ham-human-gated outline + as the bar's only cue. A secondary row of a shared PR renders no gate + of its own; its "decision pending on #N" chip is the link to the row + that does. Every verb runs the row menu's path (runRowAction: in-app + modal, result toast, acting row); the pill reads "settling…" until the + next snapshot. */ + const STAGE_TRACKER_GATE_WORD = 'Needs human'; + const STAGE_TRACKER_GATE_SETTLING = 'settling…'; + const STAGE_TRACKER_GATE_VISIBLE = 3; + // Reason → verbs, in the order they stand on the pill. The same reason + // always offers the same verbs (the maintainer's "consistent way"). + const STAGE_TRACKER_GATE_VERBS = { + review: ['decide:approve', 'gate:request-changes', 'decide:delegate'], + decision: ['gate:decide', 'decide:approve', 'decide:delegate'], + sentinel: ['gate:confirm-sentinel', 'decide:delegate'], + hold: ['release', 'decide:delegate'], + }; + const STAGE_TRACKER_GATE_ORDER = ['review', 'decision', 'sentinel', 'hold']; + const STAGE_TRACKER_GATE_PR_ONLY = ['decide:approve', 'gate:request-changes']; + // The verb's label on the pill; "Approve" reads "Approve as-is" when the + // gate is a decision (a GitHub approval of the head as it stands). + const STAGE_TRACKER_GATE_LABELS = { + 'decide:approve': 'Approve', 'gate:request-changes': 'Request changes…', 'decide:delegate': 'Let hive decide', + 'gate:decide': 'Decide…', 'gate:confirm-sentinel': 'Confirm safe', release: 'Release hold', + }; + const STAGE_TRACKER_GATE_APPROVE_AS_IS = 'Approve as-is'; + // What each verb posts, for the pill hover and the docs table. + const STAGE_TRACKER_GATE_POSTS = { + 'decide:approve': 'Posts a GitHub approval (/lgtm + /approve) on the current head.', + 'gate:request-changes': 'Posts your text as "/hive decision …" — the hive pushes a new head.', + 'decide:delegate': 'The hive decides for you under its policy and rails; recorded as your decision.', + 'gate:decide': 'Answers the question as "/hive decision …" — the hive carries on with your answer.', + 'gate:confirm-sentinel': 'Comments your confirmation and removes the sentinel label.', + release: 'Removes the hold label; the lane may merge.', + }; + + // Pure: whether the row is a PR (its own, or an issue drawn through its + // one covering PR) — the gate is a PR matter except for a parked issue. + function stageTrackerGateIsPR(item) { + return !!item && (item.via_pr ? 'pr' : item.kind) === 'pr'; + } + // Pure: the reasons a person is owed on the row, each with the text the + // status segment explains itself with. [] when nobody is owed anything. + // review — the reviewer's verdict requires a human (review_activity + // human_decision on this head); tip = the reviewer's question + // decision — stage/085 (PR) or 045 (issue), or a needs-decision / + // needs-human modifier; tip = the decision question + // sentinel — a blocking sentinel alert; tip = the rule and paths + // hold — a hold label; tip = who held it and why + function stageTrackerHumanGateReasons(item) { + if (!item || item.state === 'closed' || item.superseded || item.superseded_by || item.adopted_by) return []; + if (Number(item.stage) >= (typeof STAGE_TRACKER_TERMINAL === 'number' ? STAGE_TRACKER_TERMINAL : 110)) return []; + const mods = Array.isArray(item.modifiers) ? item.modifiers : []; + if (mods.indexOf('merged') >= 0 || mods.indexOf('draft') >= 0) return []; + const out = []; + const pr = stageTrackerGateIsPR(item); + const onHead = a => !!a && (!a.head || !item.head || String(a.head) === String(item.head)); + const review = pr && onHead(item.review_activity) ? item.review_activity : null; + if (review && review.state === 'human_decision') { + out.push({ key: 'review', tip: String(review.blocker || review.detail || review.caption || '').trim() || 'A reviewer asked for a person\'s sign-off.' }); + } + const stage = Number(item.stage) || 0; + const prDecision = typeof STAGE_TRACKER_NEEDS_DECISION === 'number' ? STAGE_TRACKER_NEEDS_DECISION : 85; + const issueDecision = typeof STAGE_TRACKER_ISSUE_NEEDS_DECISION === 'number' ? STAGE_TRACKER_ISSUE_NEEDS_DECISION : 45; + // A pre-045 issue still wearing 085 is parked on a person all the same. + const decisionStage = pr ? stage === prDecision : (stage === issueDecision || stage === prDecision); + const flagged = decisionStage || mods.indexOf('needs-decision') >= 0 || mods.indexOf('needs-human') >= 0 || item.needs_human === true; + // An unauthorized step and a structured blocker name the person owed + // in their own pills (hive-bot-lacks-permission, Blocked · …); they + // are not a decision anyone is asked for. + if (flagged && !String(item.unauthorized_step || '').trim() && !(item.blocker && String(item.blocker.short || '').trim())) { + const d = item.decision_needed || {}; + const attention = typeof stageTrackerHumanAttentionOf === 'function' ? stageTrackerHumanAttentionOf(item) : null; + const ask = typeof stageTrackerNeedsHumanAsk === 'function' ? stageTrackerNeedsHumanAsk(item) : null; + const short = typeof stageTrackerNeedsHumanShort === 'function' ? stageTrackerNeedsHumanShort(item) : ''; + const tip = String(d.question || (attention && (attention.question || attention.reason)) || (ask && (ask.question || ask.reason)) || short || '').trim(); + // The review gate already carries the reviewer's question; the same + // question is not a second reason. + if (!(review && review.state === 'human_decision' && out.length && (!tip || out[0].tip === tip))) out.push({ key: 'decision', tip: tip || 'A person\'s decision is owed.' }); + } + if (item.sentinel_alert && !item.sentinel_notice) { + out.push({ key: 'sentinel', tip: typeof stageTrackerSentinelTipWithPaths === 'function' ? stageTrackerSentinelTipWithPaths(item) : (typeof stageTrackerSentinelTip === 'function' ? stageTrackerSentinelTip(item) : 'Sentinel alert') }); + } + if (item.hold || mods.indexOf('hold') >= 0) { + const tip = typeof stageTrackerHoldTip === 'function' ? stageTrackerHoldTip(item, Date.now()) : ''; + out.push({ key: 'hold', tip: tip || 'A hold label keeps the hive off this item until a person releases it.' }); + } + out.sort((x, y) => STAGE_TRACKER_GATE_ORDER.indexOf(x.key) - STAGE_TRACKER_GATE_ORDER.indexOf(y.key)); + return out; + } + // Pure: the verbs for a set of reasons — the union in reason order, + // de-duplicated, first label wins (so "Approve" on review + decision + // reads "Approve", and "Approve as-is" when the decision stands alone). + function stageTrackerHumanGateVerbs(reasons, item) { + const ids = []; + // A row with no PR has no head to approve or send back; those verbs + // belong to PR rows (or an issue drawn through its covering PR). + const onPR = item == null || stageTrackerGateIsPR(item); + (reasons || []).forEach(r => (STAGE_TRACKER_GATE_VERBS[r.key] || []).forEach(id => { if (ids.indexOf(id) < 0 && (onPR || STAGE_TRACKER_GATE_PR_ONLY.indexOf(id) < 0)) ids.push(id); })); + const onlyDecision = (reasons || []).length && reasons.every(r => r.key === 'decision'); + return ids.map(id => ({ id, label: id === 'decide:approve' && onlyDecision ? STAGE_TRACKER_GATE_APPROVE_AS_IS : STAGE_TRACKER_GATE_LABELS[id] || id, posts: STAGE_TRACKER_GATE_POSTS[id] || '' })); + } + // Pure: the status segment's words — "Needs human · review, sentinel". + function stageTrackerHumanGateStatusText(reasons) { + return STAGE_TRACKER_GATE_WORD + (reasons && reasons.length ? ' · ' + reasons.map(r => r.key).join(', ') : ''); + } + // Pure: the status segment's hover — one line per reason. + function stageTrackerHumanGateTip(reasons) { + return (reasons || []).map(r => r.key + ': ' + r.tip).join('\n'); + } + // Pure: whether a verb is enabled for this viewer and why not. The + // row's own lead actions (server-judged delegate, approve) are trusted + // first; the rest follow the hold permission the endpoints share. + function stageTrackerHumanGateVerbState(id, item, ctx, leads) { + const lead = (leads || []).find(a => a && a.id === id); + if (lead) return { enabled: lead.enabled !== false, why: lead.enabled === false ? String(lead.why || '') : '' }; + return typeof stageTrackerActionAllowed === 'function' ? stageTrackerActionAllowed(id, ctx) : { enabled: true, why: '' }; + } + // more: a menu item. inline: this menu item doubles a verb that is also + // drawn inline on the strip tier (the phone tier hides the inline copy + // and shows this one). rest: an inline verb after the first (the phone + // tier folds it into the … menu). + function stageTrackerHumanGateVerbHtml(item, v, state, more, inline, rest) { + const ref = typeof stageTrackerRefOf === 'function' ? stageTrackerRefOf(item) : ''; + const tip = state.enabled ? v.posts : state.why; + const attrs = `data-ham-act="${esc(v.id)}"${state.enabled ? '' : ' aria-disabled="true"'}${tip ? ` title="${esc(tip)}"` : ''} aria-label="${esc(v.label + (ref ? ' — ' + ref : ''))}"`; + if (more) return ``; + return ``; + } + // Pure: the pill. '' when the row has no gate. The status segment is + // the decision popover's trigger when the row carries a decision, else + // a plain segment with the reasons as its hover. + function stageTrackerHumanGateHtml(item, shown, nowMs, subRows, opts) { + shown = shown || item; + if (!item) return ''; + const reasons = stageTrackerHumanGateReasons(shown); + if (!reasons.length) return ''; + // A secondary row of a shared PR (drawn under another issue's row, + // hivecommons/hive#17333) never carries the gate: the primary row + // does, and this row's only control is the chip that links to it. + if (opts && opts.sharedUnder) { + if (typeof stageTrackerItemKey !== 'function') return ''; + const under = Number(opts.sharedUnder); + const lp = (Array.isArray(item.linked_prs) ? item.linked_prs : []).find(x => x && Number(x.drawn_under) === under) || (shown.via_pr ? { number: shown.number } : null); + const prNum = Number(lp && lp.number) || 0; + const row = stageTrackerItemKey({ repo: item.repo, kind: 'issue', number: under }); + const to = prNum ? stageTrackerItemKey({ repo: item.repo, kind: 'pr', number: prNum }) : row; + return ``; + } + const ctx = typeof stageTrackerActionCtx === 'function' ? stageTrackerActionCtx(item.repo) : null; + if (ctx) { ctx.nowMs = typeof nowMs === 'number' ? nowMs : Date.now(); ctx.rows = typeof _stageTrackerRows !== 'undefined' ? _stageTrackerRows : null; } + const leads = ctx && typeof stageTrackerLeadActionsOnRow === 'function' ? stageTrackerLeadActionsOnRow(item, ctx, subRows) : []; + // The decision lives on another listed row: that row carries the + // gate; this one only points at it. + const passive = leads.find(a => a && a.passive); + if (passive) return typeof stageTrackerLeadPillHtml === 'function' ? stageTrackerLeadPillHtml(item, passive) : ''; + // A gate owed on a PR drawn under this issue row renders on that sub-row. + if (Array.isArray(subRows) && subRows.length && item.kind === 'issue' && !item.via_pr && !leads.length && subRows.some(s => stageTrackerHumanGateReasons(s).length)) return ''; + const verbs = stageTrackerHumanGateVerbs(reasons, shown); + const text = stageTrackerHumanGateStatusText(reasons); + const tip = stageTrackerHumanGateTip(reasons); + const ico = typeof stageTrackerIcon === 'function' ? stageTrackerIcon('human', 'ham-ico ham-mod-ico') : ''; + const inner = `${ico}${esc(text)}`; + const decision = typeof stageTrackerDecisionOf === 'function' ? stageTrackerDecisionOf(item) : null; + const status = decision && typeof stageTrackerDecisionTriggerHtml === 'function' + ? stageTrackerDecisionTriggerHtml(decision, inner, tip, 'ham-gate-status ham-mod-ask') + : `${inner}`; + const shownVerbs = verbs.slice(0, STAGE_TRACKER_GATE_VISIBLE); + const moreVerbs = verbs.slice(STAGE_TRACKER_GATE_VISIBLE); + const acts = shownVerbs.map((v, i) => stageTrackerHumanGateVerbHtml(item, v, stageTrackerHumanGateVerbState(v.id, shown, ctx, leads), false, false, i > 0)).join(''); + // The … menu holds every verb after the first: on the strip tier CSS + // shows only the ones past STAGE_TRACKER_GATE_VISIBLE (and hides the + // button when there are none); the phone tier shows the first verb + // inline and the rest here, so the pill stays one line (#17161). + const menuVerbs = verbs.slice(1); + const more = menuVerbs.length ? `` : ''; + const key = typeof stageTrackerItemKey === 'function' ? stageTrackerItemKey(item) : ''; + return `${status}${acts}${more}`; + } + // The pill's optimistic state after one of its verbs ran: the status + // reads "settling…" until the next snapshot re-renders the row. + function stageTrackerHumanGateSettling(button) { + const gate = button && button.closest ? button.closest('.ham-human-gate') : null; + if (!gate) return; + gate.classList.add('ham-gate-settling'); + const word = gate.querySelector('.ham-gate-status .ham-mod-word'); + if (word) word.textContent = STAGE_TRACKER_GATE_SETTLING; + gate.querySelectorAll('.ham-gate-act').forEach(b => b.setAttribute('aria-disabled', 'true')); + } + // The `…` menu: open / close on its button, close on outside click or + // Escape, the same popover pattern the row's ⋯ menu uses. + function stageTrackerWireHumanGate(el) { + if (!el || el._hamGateWired) return; + el._hamGateWired = true; + const closeAll = () => el.querySelectorAll('.ham-gate-menu:not([hidden])').forEach(m => { m.hidden = true; const b = m.previousElementSibling; if (b) b.setAttribute('aria-expanded', 'false'); }); + el.addEventListener('click', e => { + const b = e.target.closest ? e.target.closest('[data-ham-gate-more]') : null; + if (!b) { if (!(e.target.closest && e.target.closest('.ham-gate-menu'))) closeAll(); return; } + e.preventDefault(); e.stopPropagation(); + const menu = b.nextElementSibling; + const open = menu && menu.hidden; + closeAll(); + if (menu && open) { menu.hidden = false; b.setAttribute('aria-expanded', 'true'); const first = menu.querySelector('[role="menuitem"]'); if (first) first.focus(); } + }); + el.addEventListener('keydown', e => { if (e.key === 'Escape') closeAll(); }); + } diff --git a/src/pkg/dashboard/static-src/js/tracker-row-layout.js b/src/pkg/dashboard/static-src/js/tracker-row-layout.js index b373f9add8..72485206b8 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-layout.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-layout.js @@ -271,10 +271,11 @@ const subKey = stageTrackerItemKey(pr); const humanNote = typeof stageTrackerHumanContextHtml === 'function' ? stageTrackerHumanContextHtml(pr, stages, nowMs, undefined, ctx, subKey) : ''; const noteCtx = humanNote && typeof stageTrackerNoteTakenCtx === 'function' ? stageTrackerNoteTakenCtx(ctx, subKey) : ctx; + const prGate = typeof stageTrackerHumanGateHtml === 'function' ? stageTrackerHumanGateHtml(pr, pr, nowMs) : ''; return `
    ${typeof stageTrackerRowToolsHtml === 'function' ? stageTrackerRowToolsHtml(pr) : ''}
    - ${stageTrackerHeadColsHtml([ref], '', stageTrackerActedBadgeHtml(pr, nowMs) + stageTrackerChipsHtml(pr) + (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(pr, nowMs) : '') + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(pr, hamNotesCtx(pr)) : ''))} + ${stageTrackerHeadColsHtml([ref], '', stageTrackerActedBadgeHtml(pr, nowMs) + stageTrackerChipsHtml(pr, { gate: !!prGate }) + (prGate || (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(pr, nowMs) : '')) + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(pr, hamNotesCtx(pr)) : ''))}
    ${typeof stageTrackerPreparationNodeHtml === 'function' ? stageTrackerPreparationNodeHtml(pr, stages, ctx) : ''} diff --git a/src/pkg/dashboard/static-src/js/tracker-row-render.js b/src/pkg/dashboard/static-src/js/tracker-row-render.js index 1148d03d86..63c8f4f4b3 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-render.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-render.js @@ -196,14 +196,19 @@ const rowKey = stageTrackerItemKey(item); const humanNote = typeof stageTrackerHumanContextHtml === 'function' ? stageTrackerHumanContextHtml(item, stages, nowMs, subRows, ctx, rowKey) : ''; const noteCtx = humanNote && typeof stageTrackerNoteTakenCtx === 'function' ? stageTrackerNoteTakenCtx(ctx, rowKey) : ctx; + // One human-gate pill per gated row (hivecommons/hive#17470): it + // absorbs the sentinel / hold / needs-human chips and the lead verbs; + // a secondary row of a shared PR gets only the chip that links to its + // primary. Guarded: the harnesses load helpers by name. + const gate = typeof stageTrackerHumanGateHtml === 'function' ? stageTrackerHumanGateHtml(item, shown, nowMs, subRows, { sharedUnder }) : ''; return `
    ${stageTrackerRowToolsHtml(item)}
    - ${stageTrackerHeadColsHtml(prRefs, leadHtml, stageTrackerActedBadgeHtml(item, nowMs) + stageTrackerChipsHtml(shown) + (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(item, nowMs, subRows) : '') + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(item, hamNotesCtx(item)) : ''), prTargetKey)} + ${stageTrackerHeadColsHtml(prRefs, leadHtml, stageTrackerActedBadgeHtml(item, nowMs) + stageTrackerChipsHtml(shown, { gate: !!gate }) + (gate || (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(item, nowMs, subRows) : '')) + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(item, hamNotesCtx(item)) : ''), prTargetKey)}
    ${typeof stageTrackerPreparationNodeHtml === 'function' ? stageTrackerPreparationNodeHtml(item, stages, ctx) : ''} -
      ${stageTrackerStripItems(shown, stages, range, nowMs, ctx)}
    +
      ${stageTrackerStripItems(shown, stages, range, nowMs, sharedUnder ? Object.assign({}, ctx, { gateElsewhere: true }) : ctx)}
    ${stageTrackerSinceHtml(shown, nowMs)}${typeof stageTrackerPillHtml === 'function' ? stageTrackerPillHtml(shown, stages, range, nowMs, ctx) : ''}
    ${humanNote}${stageTrackerCurrentStageHtml(shown, stages, range, nowMs)}${typeof stageTrackerPreparationCommentHtml === 'function' ? stageTrackerPreparationCommentHtml(shown, noteCtx, rowKey) : typeof stageTrackerEventHtml === 'function' ? stageTrackerEventHtml(rowKey, noteCtx) : ''}${typeof stageTrackerExecutionHtml === 'function' ? stageTrackerExecutionHtml(shown) : ''}${typeof stageTrackerReviewNotesHtml === 'function' ? stageTrackerReviewNotesHtml(item, ctx) : ''}${typeof stageTrackerNotesPanelHtml === 'function' ? stageTrackerNotesPanelHtml(item, hamNotesCtx(item)) : ''}${subs}
    `; diff --git a/src/pkg/dashboard/static-src/js/tracker-row-strip.js b/src/pkg/dashboard/static-src/js/tracker-row-strip.js index 549bf9083e..4a18403d08 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-strip.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-strip.js @@ -393,7 +393,7 @@ // The lit track of a 085 PR a person acts on wears an amber marker // (ham-human-gated): the chevron is the real stage, the gate is the // needs-human pill beside it (hivecommons/hive#17453). - const humanGated = lit && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item); + const humanGated = lit && !(opts && opts.gateElsewhere) && ((typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) || (typeof stageTrackerHumanGateReasons === 'function' && stageTrackerHumanGateReasons(item).length > 0)); const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') + (humanGated ? ' ham-human-gated' : '') : (finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo') + (queued ? ' ham-track-queued' : ''); const approvalPending = kind === 'ci' && matches ? stageTrackerWorkflowApprovalPending(a) : 0; const humanAction = approvalPending > 0 ? STAGE_TRACKER_WORKFLOW_APPROVAL_TIP : kind === 'review' && state === 'human_decision' ? 'Needs a person\'s decision' : ''; @@ -541,14 +541,15 @@ const col50 = segs.find(sg => sg.number === 50); const leadTrack = col50 && typeof stageTrackerLeadTrack === 'function' ? stageTrackerLeadTrack(item, col50.state === 'active', stalledTrack) : ''; return segs.map(sg => { - if (sg.number === 50) return ['ci', 'review'].map(kind => stageTrackerActivityTrackHtml(item, kind, sg, sg.number < from || sg.number > to, nowMs, { stalled: stalledTrack === kind, lead: leadTrack })).join(''); + if (sg.number === 50) return ['ci', 'review'].map(kind => stageTrackerActivityTrackHtml(item, kind, sg, sg.number < from || sg.number > to, nowMs, { stalled: stalledTrack === kind, lead: leadTrack, gateElsewhere: !!(ctx && ctx.gateElsewhere) })).join(''); if (sg.number < from || sg.number > to) return `
  • `; - const sentinel = !!(sg.detour && sg.detour.sentinel); - const sentinelSuffix = !!(sg.detour && sg.detour.sentinelSuffix); - const heldGate = !!(sg.detour && sg.detour.held); + // The one bar-level sign of a human gate: the lit chevron's amber + // outline. The reasons and verbs live in the human-gate pill; a + // secondary row of a shared PR (ctx.gateElsewhere) wears neither. + const gateHere = sg.state === 'active' && !sg.cap && !(ctx && ctx.gateElsewhere) && typeof stageTrackerHumanGateReasons === 'function' && stageTrackerHumanGateReasons(item).length > 0; const fixPushed = sg.number === 30 && sg.state === 'done' && remediation === 'fix_pushed'; const blockerNote = sg.state === 'done' && sg.blockerNote ? String(sg.blockerNote) : ''; - const cls = ['ham-seg', sg.state, sg.cap ? 'cap' : '', sg.state === 'active' && !sg.cap && waitingOnTracks ? 'ham-settled-current' : '', fixPushed ? 'ham-fix-pushed' : '', blockerNote ? 'ham-blocker-note' : '', sg.state === 'active' && sg.number === 30 && remediation ? 'ham-remediation-' + remediation : '', sg.cap && sg.terminal ? 'merged' : '', sg.detour ? 'detoured' : '', sg.hold ? 'ham-open-hold' : '', sg.blocked ? 'ham-open-blocked' : '', sg.draft ? 'ham-open-draft' : '', sg.isNew ? 'ham-open-new' : '', sg.advisory ? 'ham-open-advisory' : '', sg.openSince && sg.openSince.stale ? 'ham-open-stale' : '', sentinel || sentinelSuffix ? 'ham-sentinel' : '', heldGate ? 'ham-held' : ''].filter(Boolean).join(' '); + const cls = ['ham-seg', sg.state, sg.cap ? 'cap' : '', sg.state === 'active' && !sg.cap && waitingOnTracks ? 'ham-settled-current' : '', fixPushed ? 'ham-fix-pushed' : '', blockerNote ? 'ham-blocker-note' : '', sg.state === 'active' && sg.number === 30 && remediation ? 'ham-remediation-' + remediation : '', sg.cap && sg.terminal ? 'merged' : '', sg.detour ? 'detoured' : '', sg.hold ? 'ham-open-hold' : '', sg.blocked ? 'ham-open-blocked' : '', sg.draft ? 'ham-open-draft' : '', sg.isNew ? 'ham-open-new' : '', sg.advisory ? 'ham-open-advisory' : '', sg.openSince && sg.openSince.stale ? 'ham-open-stale' : '', gateHere ? 'ham-human-gated' : ''].filter(Boolean).join(' '); const active = sg.state === 'active'; let tip = ''; let gateCaption = ''; @@ -572,7 +573,6 @@ else if (curStage === 100) tip = sg.label + ' — admitted, merging'; // Why a person merges a 090 PR leads its tooltip (hivecommons/hive#14658). // The reason is the whole story; the stage description would only repeat it (hivecommons/hive#15394). - else if (heldGate && typeof stageTrackerHeldTip === 'function') tip = stageTrackerHeldTip(item, nowMs); else if (curStage === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.human_merge_reason_text) tip = ((sg.detour && sg.detour.text) || sg.label) + ' — ' + String(item.human_merge_reason_text).trim(); // A refusal on an earlier head is history, not the word: the // chevron reads the live stage and the hover keeps "merge attempt @@ -581,10 +581,6 @@ if (priorNote) tip += ' — ' + priorNote; if (actorTip && !sg.cap) tip += actorTip; if (claimant && !sg.cap) tip += ' · ' + stageTrackerClaimantLine(claimant, nowMs); - // The sentinel's reason leads the lane tooltip so the security - // implication is read before the stage mechanics. - if (sentinel) tip = stageTrackerSentinelTip(item) + ' — ' + tip; - else if (sentinelSuffix) tip = tip + ' — ' + stageTrackerSentinelTip(item); // Working or waiting leads: what happens now, or what it waits on. if (!sg.cap && typeof stageTrackerCueLead === 'function') tip = stageTrackerCueLead(item, worker, nowMs) + tip; if (sg.number === 30 && item.code_activity && Number(item.display_column) === 30) { @@ -643,9 +639,11 @@ const tipID = 'ham-chevron-tip-' + [item.repo || '', item.kind || '', item.number || 0, sg.number].map(x => encodeURIComponent(String(x))).join('-'); const caption = gateWord || word; const text = decision ? stageTrackerDecisionTriggerHtml(decision, caption, fullTip) : caption; - // Deferred to a running track: the icon alone (a decision trigger - // keeps its button, since the popover lives in the word). - const content = waitingOnTracks && !sg.cap && !decision ? stageTrackerIcon(sg.number, 'ham-ico') : `${gateCue}${workIco}${text}${actorIco || holderIco || progressIco}`; + // Deferred to a running track: the icon alone. A decision's + // popover rides the human-gate pill's status segment then, so no + // dim "Needs human …" words sit in the PR-in-progress slot + // (hivecommons/hive#17470). + const content = waitingOnTracks && !sg.cap ? stageTrackerIcon(sg.number, 'ham-ico') : `${gateCue}${workIco}${text}${actorIco || holderIco || progressIco}`; // A decision's dialog is its sole hover/focus detail surface. inner = decision ? `${content}` : `${content}${esc(fullTip)}`; } else if (fixPushed) { @@ -663,7 +661,7 @@ const tipID = 'ham-chevron-tip-' + [item.repo || '', item.kind || '', item.number || 0, sg.number].map(x => encodeURIComponent(String(x))).join('-'); inner = `${stageTrackerIcon(sg.number, 'ham-ico')}${esc(blockerNote)}${stageTrackerIcon('human', 'ham-ico ham-actor-ico', 'Next move: human')}${esc(noteTip)}`; } else inner = stageTrackerIcon(sg.number, 'ham-ico'); - return `
  • ${inner}
  • `; + return `
  • ${inner}
  • `; }).join(''); } @@ -786,6 +784,8 @@ // carries none of these and sits on a hive-driven stage is the hive's // to work through, so the dashboard must not dress it as a human call. const STAGE_TRACKER_HUMAN_MODS = ['hold', 'unauthorized', 'needs-human', 'needs-decision', 'needs-rebase', 'blocked', 'stalled']; + // The modifiers the one human-gate pill absorbs when a row renders it. + const STAGE_TRACKER_GATE_MODS = ['hold', 'needs-human', 'needs-decision']; // The pill says what happened in words ("stage ↓" read as a sort glyph, // hivecommons/hive#17335); after a push it says what caused the fall. const STAGE_TRACKER_HANDLED_TEXT = 'stage reset', STAGE_TRACKER_HANDLED_PUSH_TEXT = 'stage reset by push'; @@ -925,7 +925,7 @@ return `${esc(text)}`; } function stageTrackerSentinelChipHtml(item) { - if (!item || !item.sentinel_alert || stageTrackerSentinelInLane(item) || stageTrackerSentinelAsSuffix(item) || stageTrackerDeferredMods(item).indexOf(STAGE_TRACKER_SENTINEL_CHIP) >= 0) return ''; + if (!item || !item.sentinel_alert || stageTrackerDeferredMods(item).indexOf(STAGE_TRACKER_SENTINEL_CHIP) >= 0) return ''; const label = item.sentinel_notice ? 'Informational security notice' : 'Sentinel alert'; return `${esc(STAGE_TRACKER_SENTINEL_CHIP)}`; } @@ -967,9 +967,14 @@ const parked = Number(lp.stage) === STAGE_TRACKER_NEEDS_DECISION || (Array.isArray(lp.modifiers) && lp.modifiers.indexOf('needs-decision') >= 0) || !!(lp.decision_needed && lp.decision_needed.question); return parked ? lp : null; } - function stageTrackerChipsHtml(item) { - const sentinel = stageTrackerSentinelChipHtml(item) + (typeof stageTrackerPreparationChipHtml === 'function' ? stageTrackerPreparationChipHtml(item) : '') + (typeof stageTrackerAdoptionChipHtml === 'function' ? stageTrackerAdoptionChipHtml(item) : '') + (typeof stageTrackerPresenceChipHtml === 'function' ? stageTrackerPresenceChipHtml(item) : '') + (typeof stageTrackerPushChipHtml === 'function' ? stageTrackerPushChipHtml(item, Date.now()) : '') + (typeof stageTrackerReroutePillHtml === 'function' ? stageTrackerReroutePillHtml(item) : '') + (typeof stageTrackerSupersedesChipHtml === 'function' ? stageTrackerSupersedesChipHtml(item, Date.now()) : '') + (typeof stageTrackerOverlapBadgeHtml === 'function' ? stageTrackerOverlapBadgeHtml(item) : ''); + function stageTrackerChipsHtml(item, opts) { + // opts.gate: the row renders the one human-gate pill, which carries the + // sentinel / hold / needs-human reasons itself — those chips step aside. + const gated = !!(opts && opts.gate); + // The informational notice is not a gate reason, so its chip stays. + const sentinel = (gated && !item.sentinel_notice ? '' : stageTrackerSentinelChipHtml(item)) + (typeof stageTrackerPreparationChipHtml === 'function' ? stageTrackerPreparationChipHtml(item) : '') + (typeof stageTrackerAdoptionChipHtml === 'function' ? stageTrackerAdoptionChipHtml(item) : '') + (typeof stageTrackerPresenceChipHtml === 'function' ? stageTrackerPresenceChipHtml(item) : '') + (typeof stageTrackerPushChipHtml === 'function' ? stageTrackerPushChipHtml(item, Date.now()) : '') + (typeof stageTrackerReroutePillHtml === 'function' ? stageTrackerReroutePillHtml(item) : '') + (typeof stageTrackerSupersedesChipHtml === 'function' ? stageTrackerSupersedesChipHtml(item, Date.now()) : '') + (typeof stageTrackerOverlapBadgeHtml === 'function' ? stageTrackerOverlapBadgeHtml(item) : ''); const mods = (Array.isArray(item.modifiers) ? item.modifiers.slice() : []) + .filter(m => !gated || STAGE_TRACKER_GATE_MODS.indexOf(m) < 0) .sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); // A 085 PR a person acts on lights its real stage (CI / Review), so // the chevron no longer says "Needs human decision": the ask rides @@ -977,7 +982,7 @@ // re-adds the modifier (stageTrackerApplyPersonActsOnPRPill); this // covers a payload that predates it. Any pill that already names the // person owed (unauthorized, hold …) stands in for it. - if (item.kind === 'pr' && !mods.some(m => STAGE_TRACKER_HUMAN_MODS.indexOf(m) >= 0) && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) { + if (!gated && item.kind === 'pr' && !mods.some(m => STAGE_TRACKER_HUMAN_MODS.indexOf(m) >= 0) && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) { mods.push('needs-decision'); mods.sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); } @@ -1065,7 +1070,7 @@ approve: 'Approve', 'give-direction': 'Give direction', 'close-superseded': 'Close as superseded', wontfix: "Close as won't-fix", 'close-read': 'Closed', 'close-issue': 'Close issue', 'let-hive-decide': 'Let hive decide', hold: 'Hold', release: 'Release hold', 'accept-triage': 'Accept triage', 'mark-needs-human': 'Mark needs-human', 'queue-merge': 'Approve and let hive merge', 'merge-now': 'Merge now as maintainer', - adopt: 'Adopt', 'adopt-now': 'Adopt now', reroute: 'Reroute to another clanker', + adopt: 'Adopt', 'adopt-now': 'Adopt now', reroute: 'Reroute to another clanker', 'confirm-sentinel': 'Confirm safe', // Historical ledger entries only: the hive now re-authors its own // exhausted PRs itself and a person's rewrite of a contributor PR is adopt. 're-author': 'Re-author (now: adopt)', diff --git a/src/pkg/dashboard/static-src/js/tracker-row.js b/src/pkg/dashboard/static-src/js/tracker-row.js index 61eaa4500d..6f72f8dfda 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row.js +++ b/src/pkg/dashboard/static-src/js/tracker-row.js @@ -11,33 +11,26 @@ const curStage = byNum[cur] || {}; const anchor = stageTrackerAnchor(cur, stages, item.via_pr ? 'pr' : item.kind, item); const terminal = anchor >= STAGE_TRACKER_TERMINAL; - const sentinelLane = stageTrackerSentinelInLane(item); // A 071 / 072 row whose author has pushed is back with the hive: the // chevron reads the column's own word ("CI / Review"), not "Needs // @author" (hivecommons/hive#15784). Guarded: the harnesses load by name. const pushedBack = (cur === 71 || cur === 72) && typeof stageTrackerPushedBack === 'function' && stageTrackerPushedBack(item); const detour = (!terminal && !pushedBack && STAGE_TRACKER_PATH.indexOf(cur) < 0 && cur !== STAGE_TRACKER_TRIAGE_NEEDED && cur !== STAGE_TRACKER_POSSIBLY_EXISTS && cur !== STAGE_TRACKER_OPEN_FOR_DISCUSSION && cur !== 40 && cur !== 60 && cur !== STAGE_TRACKER_PRE_MERGE_SOAK && cur !== 100) - ? { text: sentinelLane ? STAGE_TRACKER_SENTINEL_WORD : (cur === STAGE_TRACKER_HUMAN_GATED && typeof stageTrackerTrainWord === 'function' && stageTrackerTrainWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.manual_merge ? stageTrackerManualMergeWord(item) : (cur === STAGE_TRACKER_HUMAN_GATED && stageTrackerUnauthorizedWord(item)) || (typeof stageTrackerBlockerWord === 'function' && cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION && stageTrackerBlockerWord(item)) || ((cur === STAGE_TRACKER_ADOPTED_BY_HIVE || (cur === STAGE_TRACKER_HUMAN_GATED && item.adopted_by_state)) && stageTrackerAdoptedWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && stageTrackerReadyForHumanWord(item, STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))) || (STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))), sentinel: sentinelLane } : null; - if (detour && cur === 70 && !detour.sentinel && typeof stageTrackerFixingWord === 'function') detour.text = stageTrackerFixingWord(item, detour.text); - // A 090 row a sentinel alert or hold label gates: the Merge queue - // cell reads "Held · …" (amber), never "Queued" — the gate is a pill - // on the real stage, not a stage (hivecommons/hive#17327). - if (detour && cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && typeof stageTrackerHeldWord === 'function') { - const held = stageTrackerHeldWord(item); - if (held) { detour.text = held; detour.held = true; detour.sentinel = false; } - } - // A bare "Needs human decision" (045 / 085) says why in the chevron - // itself — "Needs human · edits CI workflows" — when a short reason - // is known (rationguard#480: "what does 'needs human' mean?"). A - // word already carrying its why (Blocked · …, Waiting for @x · …, - // the train, the sentinel) stands. - if (detour && (cur === STAGE_TRACKER_NEEDS_DECISION || cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION) && !detour.sentinel && detour.text === STAGE_TRACKER_ACTIVE_WORD[cur] && typeof stageTrackerNeedsHumanWord === 'function') { - const nh = stageTrackerNeedsHumanWord(item); - if (nh) detour.text = nh; + ? { text: (cur === STAGE_TRACKER_HUMAN_GATED && typeof stageTrackerTrainWord === 'function' && stageTrackerTrainWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.manual_merge ? stageTrackerManualMergeWord(item) : (cur === STAGE_TRACKER_HUMAN_GATED && stageTrackerUnauthorizedWord(item)) || (typeof stageTrackerBlockerWord === 'function' && cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION && stageTrackerBlockerWord(item)) || ((cur === STAGE_TRACKER_ADOPTED_BY_HIVE || (cur === STAGE_TRACKER_HUMAN_GATED && item.adopted_by_state)) && stageTrackerAdoptedWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && stageTrackerReadyForHumanWord(item, STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))) || (STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))) } : null; + if (detour && cur === 70 && typeof stageTrackerFixingWord === 'function') detour.text = stageTrackerFixingWord(item, detour.text); + // A human gate (sentinel alert, hold label, a reviewer's question, a + // needs-decision park) is never a chevron word: the bar lights the + // real stage with the amber ham-human-gated outline and the one + // human-gate pill beside it names the reasons and carries the verbs + // (hivecommons/hive#17470: "needs human, approve, let hive decide all + // in the same line"). A 085 PR that is merge-ready still anchors at + // the Merge queue column and reads that column's own word there. + if (detour && cur === STAGE_TRACKER_NEEDS_DECISION && (item.kind === 'pr' || item.via_pr) && detour.text === STAGE_TRACKER_ACTIVE_WORD[cur]) { + detour.text = String((byNum[anchor] || {}).short || (byNum[anchor] || {}).label || detour.text); + detour.gate = true; } if (detour && (cur === 71 || cur === 72) && typeof stageTrackerReturnedWord === 'function') { detour.text = stageTrackerReturnedWord(item, detour.text); - detour.sentinelSuffix = stageTrackerSentinelAsSuffix(item); } const code = item.code_activity; const codeMatches = code && String(code.head || '') === String(item.head || ''); @@ -46,7 +39,7 @@ const clock = Number(nowMs) || Date.now(); const codeWorking = codeMatches && code.source === 'fix-dispatch+successful-edit+verified-git-worktree' && code.active && Number.isFinite(codeObserved) && codeObserved <= clock && clock - codeObserved <= activityFreshMS; const codeCaption = codeMatches ? (!codeWorking && code.state === 'fixing' ? 'Fix task assigned · activity unknown' : (code.state === 'fixing' ? String(code.caption || '').replace(/^Fixing\b/, 'Remediating') : code.caption)) : 'Code activity unknown'; - if (detour && !code && cur === 70 && !detour.sentinel) detour.text = 'Waiting for fixer · activity unknown'; + if (detour && !code && cur === 70) detour.text = 'Waiting for fixer · activity unknown'; if (detour && code && [70, 71, 72].includes(cur)) detour.text = codeCaption || detour.text; if (detour && code && cur === 74 && codeWorking) detour.text += ' · ' + codeCaption; if (detour && code && cur === 74 && !codeWorking) { diff --git a/src/pkg/dashboard/static-src/js/tracker-words-stage.js b/src/pkg/dashboard/static-src/js/tracker-words-stage.js index b139ee477a..d4beb03f76 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words-stage.js +++ b/src/pkg/dashboard/static-src/js/tracker-words-stage.js @@ -18,7 +18,6 @@ // words come from the hive's sentinel (possible security override, // privilege escalation or codebase damage), so a maintainer reads the // security reason before the row's "needs human". - const STAGE_TRACKER_SENTINEL_WORD = 'Sentinel alert · needs human'; const STAGE_TRACKER_SENTINEL_CHIP = 'sentinel'; const STAGE_TRACKER_SENTINEL_TIP = 'Sentinel flagged security-relevant changes'; const STAGE_TRACKER_SENTINEL_TIP_FALLBACK = 'possible security override, privilege escalation or codebase damage — a maintainer must review before merge'; diff --git a/src/pkg/dashboard/static-src/js/tracker-words.js b/src/pkg/dashboard/static-src/js/tracker-words.js index 8105f4de56..b0e95b991e 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words.js +++ b/src/pkg/dashboard/static-src/js/tracker-words.js @@ -512,48 +512,6 @@ const lines = stageTrackerSentinelPathLines(item); return lines.length ? tip + lines.map(l => '\n · ' + l).join('') : tip; } - // Whether the item's lit chevron word carries the alert itself (a PR - // parked at 085, an issue riding one, or a 090 row the gate holds — - // see stageTrackerHeldWord): the chip then adds nothing. - function stageTrackerSentinelInLane(item) { - const st = Number(item && item.stage) || 0; - return !!(item && item.sentinel_alert && !item.sentinel_notice) && (st === STAGE_TRACKER_NEEDS_DECISION || st === STAGE_TRACKER_READY_FOR_HUMAN_MERGE) && (item.kind === 'pr' || !!item.via_pr); - } - // A sentinel alert or a hold label is a gate on the PR's real stage, - // not a stage of its own (hivecommons/hive#17327): a green, reviewed - // PR stands in the Merge queue column at 090 and the column word says - // the gate — "Held · sentinel · confirm intent" / "Held · hold" — - // never "Queued for merge". '' when the row is not a held 090 PR. - const STAGE_TRACKER_HELD_SENTINEL_WORD = 'Held · sentinel · confirm intent'; - const STAGE_TRACKER_HELD_HOLD_WORD = 'Held · hold'; - const STAGE_TRACKER_HELD_NEVER_MERGES = 'Hive never merges this head while the gate stands.'; - function stageTrackerHeldWord(item) { - if (!item || (Number(item.stage) || 0) !== STAGE_TRACKER_READY_FOR_HUMAN_MERGE || !(item.kind === 'pr' || item.via_pr)) return ''; - if (item.sentinel_alert && !item.sentinel_notice) return STAGE_TRACKER_HELD_SENTINEL_WORD; - if ((Array.isArray(item.modifiers) && item.modifiers.indexOf('hold') >= 0) || (item.hold && item.hold.by)) return STAGE_TRACKER_HELD_HOLD_WORD; - return ''; - } - // Pure: the held cell's hover — the gate's own reason (the sentinel - // tip, or who holds it and why), then the route reason and the rule. - function stageTrackerHeldTip(item, nowMs) { - const word = stageTrackerHeldWord(item); - if (!word) return ''; - const lines = [word]; - if (word === STAGE_TRACKER_HELD_SENTINEL_WORD) lines.push(stageTrackerSentinelTip(item)); - else if (typeof stageTrackerHoldTip === 'function') { const ht = stageTrackerHoldTip(item, nowMs); if (ht) lines.push(ht); } - const reason = String(item.human_merge_reason_text || item.reason || '').trim(); - if (reason && lines.indexOf(reason) < 0) lines.push(reason); - lines.push(STAGE_TRACKER_HELD_NEVER_MERGES); - return lines.filter(Boolean).join('\n'); - } - // A returned PR (071/072) keeps its routing word — the human already - // acted, nothing is owed by the maintainer — and carries the alert as - // a " · sentinel" suffix instead (hivecommons/hive#15159); the chip - // then adds nothing. - function stageTrackerSentinelAsSuffix(item) { - const st = Number(item && item.stage) || 0; - return !!(item && item.sentinel_alert && !item.sentinel_notice) && (st === 71 || st === 72) && (item.kind === 'pr' || !!item.via_pr); - } // Pure: whose PR a 071/072 row waits on — the row's own author, or, for // an issue row drawn through its one covering PR (via_pr), that PR's // author. The issue's author is whoever filed it (on hive's hive the @@ -588,5 +546,5 @@ if (sup) text = 'Superseded by #' + sup + ' · decide'; else if (who.author && st === 71) text = 'Needs @' + who.author; else if (who.author && st === 72) text = 'Returned to @' + who.author + stageTrackerToolingSuffix(who.kind); - return text + (stageTrackerSentinelAsSuffix(item) ? ' · ' + STAGE_TRACKER_SENTINEL_CHIP : ''); + return text; } diff --git a/src/pkg/dashboard/static-src/manifest.txt b/src/pkg/dashboard/static-src/manifest.txt index 648feda4ea..2ba70649aa 100644 --- a/src/pkg/dashboard/static-src/manifest.txt +++ b/src/pkg/dashboard/static-src/manifest.txt @@ -90,6 +90,7 @@ js/tracker-integration-execution.js js/tracker-filter-render.js js/tracker-filter-fetch.js js/tracker-actions.js +js/tracker-human-gate.js js/tracker-merged.js js/tracker-queue.js js/tracker-sound.js diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index f393a0937c..aed52bebf8 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1659,7 +1659,6 @@ status token the sentinel pill on the repo card already uses. */ .ham-badge-sentinel { color: var(--status-error); border-color: color-mix(in srgb, var(--status-error) 55%, transparent); font-weight: var(--fw-medium); } .ham-badge-sentinel.ham-sentinel-notice { color: var(--status-info); border-color: color-mix(in srgb, var(--status-info) 55%, transparent); } - .ham-seg.active.ham-sentinel { background: var(--status-error); color: var(--surface-0); } /* 072 adoption chip (maintainer-policy, hive PR 14524): "waiting on @author (maintainer, offline 26h) — adopt?" */ .ham-badge-adoption { color: var(--status-warn); border-color: color-mix(in srgb, var(--status-warn) 55%, transparent); font-weight: var(--fw-medium); } /* "supersedes N": the closed original a live PR replaced (hive PR 15135 follow-up). Muted — a trace, not a call to act. */ @@ -1819,12 +1818,10 @@ .ham-seg.active.ham-open-hold { background: var(--yellow); color: var(--surface-0); } /* A 090 row a sentinel alert or hold label gates (hivecommons/hive#17327): the Merge queue cell wears the pill amber — held, not queued, not red. */ - .ham-seg.active.ham-held { background: var(--amber); color: var(--surface-0); } - .ham-seg.active.ham-held .ham-detour::before { content: '⏸'; margin-right: var(--sp-1); } /* A 085 PR a person acts on lights its real stage — the CI / Review track — and that track wears an amber marker; the gate itself is the needs-human pill beside the row (hivecommons/hive#17453). */ - .ham-seg.ham-activity-track.active.ham-human-gated { outline: var(--focus-ring-width) solid var(--amber); outline-offset: calc(-1 * var(--focus-ring-width)); } + .ham-seg.active.ham-human-gated { outline: var(--focus-ring-width) solid var(--amber); outline-offset: calc(-1 * var(--focus-ring-width)); } .ham-seg.active.ham-open-hold .ham-seg-t::before { content: '⏸'; margin-right: var(--sp-1); } .ham-seg.active.ham-open-blocked { background: var(--yellow); color: var(--surface-0); } .ham-seg.active.ham-open-blocked .ham-seg-t::before { content: '⛔'; margin-right: var(--sp-1); } @@ -2324,6 +2321,30 @@ /* Busy (Let hive decide gathering its preview) also sets aria-disabled, so this compound rule sits after the disabled one and wins: the working colour, not faint/dashed. */ .ham-lead-act[aria-busy="true"][aria-disabled="true"] { cursor: progress; opacity: 1; border-style: solid; border-color: var(--cue-work); background: color-mix(in srgb, var(--cue-work) 10%, transparent); color: var(--cue-work); } + /* One human-gate control per gated row: a segmented pill whose left + segment names the reasons (👤 Needs human · review, sentinel) and whose + right segments are the verbs those reasons determine. Replaces the + scattered sentinel chip + Approve + Let hive decide + needs-human pill. */ + .ham-human-gate { display: inline-flex; align-items: stretch; max-width: 100%; overflow: hidden; border: var(--line-width) solid color-mix(in srgb, var(--amber) 60%, var(--line-subtle)); border-radius: var(--r-pill); background: color-mix(in srgb, var(--amber) 8%, var(--panel)); font-size: var(--fs-xs); line-height: 1.5; vertical-align: middle; } + .ham-human-gate > .ham-gate-status { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; padding: 0 var(--sp-2) 0 var(--sp-3); border: 0; background: transparent; color: var(--amber); font: inherit; font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + .ham-human-gate > .ham-gate-status > .ham-mod-word { overflow: hidden; text-overflow: ellipsis; } + .ham-human-gate > button.ham-gate-status { cursor: pointer; } + .ham-human-gate > button.ham-gate-status:hover, .ham-human-gate > button.ham-gate-status:focus-visible { text-decoration: underline; outline: none; } + .ham-human-gate > .ham-gate-act { --ham-gate-seg-radius: 0; border-radius: var(--ham-gate-seg-radius); border-top: 0; border-bottom: 0; border-right: 0; border-left-color: color-mix(in srgb, var(--amber) 35%, transparent); margin: 0; } + .ham-human-gate > .ham-gate-act.ham-act-secondary, .ham-human-gate > .ham-gate-more { --ham-act-fill: transparent; --ham-act-ink: var(--text); } + .ham-human-gate > .ham-gate-act:hover, .ham-human-gate > .ham-gate-act:focus-visible { box-shadow: none; background: color-mix(in srgb, var(--amber) 22%, transparent); filter: none; } + .ham-human-gate > .ham-gate-act.ham-act-primary:hover, .ham-human-gate > .ham-gate-act.ham-act-primary:focus-visible { filter: brightness(1.12); } + .ham-human-gate > .ham-gate-more { padding-inline: var(--sp-2); } + .ham-human-gate > .ham-gate-more::after { content: none; } + .ham-human-gate > .ham-gate-more[aria-expanded="true"] { background: color-mix(in srgb, var(--amber) 22%, transparent); } + .ham-human-gate.ham-gate-settling { opacity: 0.75; border-style: dashed; } + .ham-human-gate.ham-gate-settling > .ham-gate-status { color: var(--cue-work); } + /* Strip tier: the … button only when a verb overflows; menu copies of + the inline verbs stay hidden. The phone tier flips both. */ + .ham-gate-more-wrap[data-ham-gate-overflow="0"], .ham-gate-menu > [data-ham-gate-inline] { display: none; } + .ham-gate-menu[hidden] { display: none; } + /* The passive "decision pending on #N" chip is a link to the primary row. */ + .ham-decision-pending[data-ham-scroll-to] { text-decoration: underline dotted; text-underline-offset: var(--sp-1); } /* The technical background folds behind one collapsed Details. */ .ham-decision-details { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); color: var(--text-muted); } .ham-decision-details > summary { cursor: pointer; color: var(--text-faint); } @@ -2351,6 +2372,13 @@ /* Stacked head: the ask pill is its person icon alone (#17453). */ .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-ask > .ham-mod-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .ham-head-cols .ham-badges > .ham-badge-mod.ham-mod-ask > .ham-mod-ico { margin-right: 0; } + .ham-head-cols .ham-human-gate > .ham-gate-status > .ham-mod-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } + .ham-head-cols .ham-human-gate > .ham-gate-status { position: relative; padding-right: var(--sp-2); } + /* Stacked head: the first verb inline, the rest behind …, so the pill + leaves the title its line and no verb is squeezed into a fragment. */ + .ham-head-cols .ham-human-gate > .ham-gate-act-rest { display: none; } + .ham-head-cols .ham-human-gate .ham-gate-more-wrap[data-ham-gate-overflow="0"] { display: inline; } + .ham-head-cols .ham-human-gate .ham-gate-menu > [data-ham-gate-inline] { display: flex; } .ham-row .ham-seg { padding: 0 var(--sp-2) 0 var(--sp-3); } .ham-row .ham-seg.cap { flex-basis: 2em; } .ham-since { width: 3em; } @@ -2583,6 +2611,13 @@ one-line box so a card row stays under the #17161 height budget; the hit area is padded out to the tap target like .ham-pill (#17453). */ #activity-monitor-section .ham-badge-mod.ham-decision-trigger { position: relative; } + /* Gate segments keep the one-line pill; each segment pads its hit area + out to the tap target so the phone harness sees ≥44×44. */ + #activity-monitor-section .ham-human-gate { display: inline-flex; line-height: inherit; vertical-align: baseline; } + #activity-monitor-section .ham-human-gate > .ham-gate-act, #activity-monitor-section .ham-human-gate > .ham-gate-more, #activity-monitor-section .ham-human-gate > button.ham-gate-status { position: relative; display: inline-flex; min-width: var(--tap-target); min-height: 0; height: auto; padding-block: 0; line-height: inherit; } + #activity-monitor-section .ham-human-gate > .ham-gate-act-rest { display: none; } + + #activity-monitor-section .ham-human-gate > .ham-gate-act::before, #activity-monitor-section .ham-human-gate > .ham-gate-more::before, #activity-monitor-section .ham-human-gate > button.ham-gate-status::before { content: ""; position: absolute; inset: calc((1lh - var(--tap-target)) / 2) 0; } #activity-monitor-section .ham-badge-mod.ham-decision-trigger::before { content: ""; position: absolute; inset: calc((1lh - var(--tap-target)) / 2) calc((100% - var(--tap-target)) / 2); } /* A card keeps its two-line head and its density (#17161): the 🗒 shows on a phone only once the item has notes; the row's ⋯ menu @@ -16682,7 +16717,6 @@

    Where to get help

    // words come from the hive's sentinel (possible security override, // privilege escalation or codebase damage), so a maintainer reads the // security reason before the row's "needs human". - const STAGE_TRACKER_SENTINEL_WORD = 'Sentinel alert · needs human'; const STAGE_TRACKER_SENTINEL_CHIP = 'sentinel'; const STAGE_TRACKER_SENTINEL_TIP = 'Sentinel flagged security-relevant changes'; const STAGE_TRACKER_SENTINEL_TIP_FALLBACK = 'possible security override, privilege escalation or codebase damage — a maintainer must review before merge'; @@ -17910,48 +17944,6 @@

    Where to get help

    const lines = stageTrackerSentinelPathLines(item); return lines.length ? tip + lines.map(l => '\n · ' + l).join('') : tip; } - // Whether the item's lit chevron word carries the alert itself (a PR - // parked at 085, an issue riding one, or a 090 row the gate holds — - // see stageTrackerHeldWord): the chip then adds nothing. - function stageTrackerSentinelInLane(item) { - const st = Number(item && item.stage) || 0; - return !!(item && item.sentinel_alert && !item.sentinel_notice) && (st === STAGE_TRACKER_NEEDS_DECISION || st === STAGE_TRACKER_READY_FOR_HUMAN_MERGE) && (item.kind === 'pr' || !!item.via_pr); - } - // A sentinel alert or a hold label is a gate on the PR's real stage, - // not a stage of its own (hivecommons/hive#17327): a green, reviewed - // PR stands in the Merge queue column at 090 and the column word says - // the gate — "Held · sentinel · confirm intent" / "Held · hold" — - // never "Queued for merge". '' when the row is not a held 090 PR. - const STAGE_TRACKER_HELD_SENTINEL_WORD = 'Held · sentinel · confirm intent'; - const STAGE_TRACKER_HELD_HOLD_WORD = 'Held · hold'; - const STAGE_TRACKER_HELD_NEVER_MERGES = 'Hive never merges this head while the gate stands.'; - function stageTrackerHeldWord(item) { - if (!item || (Number(item.stage) || 0) !== STAGE_TRACKER_READY_FOR_HUMAN_MERGE || !(item.kind === 'pr' || item.via_pr)) return ''; - if (item.sentinel_alert && !item.sentinel_notice) return STAGE_TRACKER_HELD_SENTINEL_WORD; - if ((Array.isArray(item.modifiers) && item.modifiers.indexOf('hold') >= 0) || (item.hold && item.hold.by)) return STAGE_TRACKER_HELD_HOLD_WORD; - return ''; - } - // Pure: the held cell's hover — the gate's own reason (the sentinel - // tip, or who holds it and why), then the route reason and the rule. - function stageTrackerHeldTip(item, nowMs) { - const word = stageTrackerHeldWord(item); - if (!word) return ''; - const lines = [word]; - if (word === STAGE_TRACKER_HELD_SENTINEL_WORD) lines.push(stageTrackerSentinelTip(item)); - else if (typeof stageTrackerHoldTip === 'function') { const ht = stageTrackerHoldTip(item, nowMs); if (ht) lines.push(ht); } - const reason = String(item.human_merge_reason_text || item.reason || '').trim(); - if (reason && lines.indexOf(reason) < 0) lines.push(reason); - lines.push(STAGE_TRACKER_HELD_NEVER_MERGES); - return lines.filter(Boolean).join('\n'); - } - // A returned PR (071/072) keeps its routing word — the human already - // acted, nothing is owed by the maintainer — and carries the alert as - // a " · sentinel" suffix instead (hivecommons/hive#15159); the chip - // then adds nothing. - function stageTrackerSentinelAsSuffix(item) { - const st = Number(item && item.stage) || 0; - return !!(item && item.sentinel_alert && !item.sentinel_notice) && (st === 71 || st === 72) && (item.kind === 'pr' || !!item.via_pr); - } // Pure: whose PR a 071/072 row waits on — the row's own author, or, for // an issue row drawn through its one covering PR (via_pr), that PR's // author. The issue's author is whoever filed it (on hive's hive the @@ -17986,7 +17978,7 @@

    Where to get help

    if (sup) text = 'Superseded by #' + sup + ' · decide'; else if (who.author && st === 71) text = 'Needs @' + who.author; else if (who.author && st === 72) text = 'Returned to @' + who.author + stageTrackerToolingSuffix(who.kind); - return text + (stageTrackerSentinelAsSuffix(item) ? ' · ' + STAGE_TRACKER_SENTINEL_CHIP : ''); + return text; } // Which strip segment a stage lights: main stages light themselves, // 040 shares the PR in progress column with 030, 060 shares CI / Review @@ -18067,33 +18059,26 @@

    Where to get help

    const curStage = byNum[cur] || {}; const anchor = stageTrackerAnchor(cur, stages, item.via_pr ? 'pr' : item.kind, item); const terminal = anchor >= STAGE_TRACKER_TERMINAL; - const sentinelLane = stageTrackerSentinelInLane(item); // A 071 / 072 row whose author has pushed is back with the hive: the // chevron reads the column's own word ("CI / Review"), not "Needs // @author" (hivecommons/hive#15784). Guarded: the harnesses load by name. const pushedBack = (cur === 71 || cur === 72) && typeof stageTrackerPushedBack === 'function' && stageTrackerPushedBack(item); const detour = (!terminal && !pushedBack && STAGE_TRACKER_PATH.indexOf(cur) < 0 && cur !== STAGE_TRACKER_TRIAGE_NEEDED && cur !== STAGE_TRACKER_POSSIBLY_EXISTS && cur !== STAGE_TRACKER_OPEN_FOR_DISCUSSION && cur !== 40 && cur !== 60 && cur !== STAGE_TRACKER_PRE_MERGE_SOAK && cur !== 100) - ? { text: sentinelLane ? STAGE_TRACKER_SENTINEL_WORD : (cur === STAGE_TRACKER_HUMAN_GATED && typeof stageTrackerTrainWord === 'function' && stageTrackerTrainWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.manual_merge ? stageTrackerManualMergeWord(item) : (cur === STAGE_TRACKER_HUMAN_GATED && stageTrackerUnauthorizedWord(item)) || (typeof stageTrackerBlockerWord === 'function' && cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION && stageTrackerBlockerWord(item)) || ((cur === STAGE_TRACKER_ADOPTED_BY_HIVE || (cur === STAGE_TRACKER_HUMAN_GATED && item.adopted_by_state)) && stageTrackerAdoptedWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && stageTrackerReadyForHumanWord(item, STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))) || (STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))), sentinel: sentinelLane } : null; - if (detour && cur === 70 && !detour.sentinel && typeof stageTrackerFixingWord === 'function') detour.text = stageTrackerFixingWord(item, detour.text); - // A 090 row a sentinel alert or hold label gates: the Merge queue - // cell reads "Held · …" (amber), never "Queued" — the gate is a pill - // on the real stage, not a stage (hivecommons/hive#17327). - if (detour && cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && typeof stageTrackerHeldWord === 'function') { - const held = stageTrackerHeldWord(item); - if (held) { detour.text = held; detour.held = true; detour.sentinel = false; } - } - // A bare "Needs human decision" (045 / 085) says why in the chevron - // itself — "Needs human · edits CI workflows" — when a short reason - // is known (rationguard#480: "what does 'needs human' mean?"). A - // word already carrying its why (Blocked · …, Waiting for @x · …, - // the train, the sentinel) stands. - if (detour && (cur === STAGE_TRACKER_NEEDS_DECISION || cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION) && !detour.sentinel && detour.text === STAGE_TRACKER_ACTIVE_WORD[cur] && typeof stageTrackerNeedsHumanWord === 'function') { - const nh = stageTrackerNeedsHumanWord(item); - if (nh) detour.text = nh; + ? { text: (cur === STAGE_TRACKER_HUMAN_GATED && typeof stageTrackerTrainWord === 'function' && stageTrackerTrainWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.manual_merge ? stageTrackerManualMergeWord(item) : (cur === STAGE_TRACKER_HUMAN_GATED && stageTrackerUnauthorizedWord(item)) || (typeof stageTrackerBlockerWord === 'function' && cur === STAGE_TRACKER_ISSUE_NEEDS_DECISION && stageTrackerBlockerWord(item)) || ((cur === STAGE_TRACKER_ADOPTED_BY_HIVE || (cur === STAGE_TRACKER_HUMAN_GATED && item.adopted_by_state)) && stageTrackerAdoptedWord(item)) || (cur === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && stageTrackerReadyForHumanWord(item, STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))) || (STAGE_TRACKER_ACTIVE_WORD[cur] || curStage.short || curStage.label || String(cur))) } : null; + if (detour && cur === 70 && typeof stageTrackerFixingWord === 'function') detour.text = stageTrackerFixingWord(item, detour.text); + // A human gate (sentinel alert, hold label, a reviewer's question, a + // needs-decision park) is never a chevron word: the bar lights the + // real stage with the amber ham-human-gated outline and the one + // human-gate pill beside it names the reasons and carries the verbs + // (hivecommons/hive#17470: "needs human, approve, let hive decide all + // in the same line"). A 085 PR that is merge-ready still anchors at + // the Merge queue column and reads that column's own word there. + if (detour && cur === STAGE_TRACKER_NEEDS_DECISION && (item.kind === 'pr' || item.via_pr) && detour.text === STAGE_TRACKER_ACTIVE_WORD[cur]) { + detour.text = String((byNum[anchor] || {}).short || (byNum[anchor] || {}).label || detour.text); + detour.gate = true; } if (detour && (cur === 71 || cur === 72) && typeof stageTrackerReturnedWord === 'function') { detour.text = stageTrackerReturnedWord(item, detour.text); - detour.sentinelSuffix = stageTrackerSentinelAsSuffix(item); } const code = item.code_activity; const codeMatches = code && String(code.head || '') === String(item.head || ''); @@ -18102,7 +18087,7 @@

    Where to get help

    const clock = Number(nowMs) || Date.now(); const codeWorking = codeMatches && code.source === 'fix-dispatch+successful-edit+verified-git-worktree' && code.active && Number.isFinite(codeObserved) && codeObserved <= clock && clock - codeObserved <= activityFreshMS; const codeCaption = codeMatches ? (!codeWorking && code.state === 'fixing' ? 'Fix task assigned · activity unknown' : (code.state === 'fixing' ? String(code.caption || '').replace(/^Fixing\b/, 'Remediating') : code.caption)) : 'Code activity unknown'; - if (detour && !code && cur === 70 && !detour.sentinel) detour.text = 'Waiting for fixer · activity unknown'; + if (detour && !code && cur === 70) detour.text = 'Waiting for fixer · activity unknown'; if (detour && code && [70, 71, 72].includes(cur)) detour.text = codeCaption || detour.text; if (detour && code && cur === 74 && codeWorking) detour.text += ' · ' + codeCaption; if (detour && code && cur === 74 && !codeWorking) { @@ -18857,7 +18842,7 @@

    Where to get help

    // The lit track of a 085 PR a person acts on wears an amber marker // (ham-human-gated): the chevron is the real stage, the gate is the // needs-human pill beside it (hivecommons/hive#17453). - const humanGated = lit && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item); + const humanGated = lit && !(opts && opts.gateElsewhere) && ((typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) || (typeof stageTrackerHumanGateReasons === 'function' && stageTrackerHumanGateReasons(item).length > 0)); const cls = lit ? 'active' + (stalled ? ' ham-stalled' : '') + (humanGated ? ' ham-human-gated' : '') : (finished ? 'done' : finding ? 'failing' : settled ? 'done decided' : 'todo') + (queued ? ' ham-track-queued' : ''); const approvalPending = kind === 'ci' && matches ? stageTrackerWorkflowApprovalPending(a) : 0; const humanAction = approvalPending > 0 ? STAGE_TRACKER_WORKFLOW_APPROVAL_TIP : kind === 'review' && state === 'human_decision' ? 'Needs a person\'s decision' : ''; @@ -19005,14 +18990,15 @@

    Where to get help

    const col50 = segs.find(sg => sg.number === 50); const leadTrack = col50 && typeof stageTrackerLeadTrack === 'function' ? stageTrackerLeadTrack(item, col50.state === 'active', stalledTrack) : ''; return segs.map(sg => { - if (sg.number === 50) return ['ci', 'review'].map(kind => stageTrackerActivityTrackHtml(item, kind, sg, sg.number < from || sg.number > to, nowMs, { stalled: stalledTrack === kind, lead: leadTrack })).join(''); + if (sg.number === 50) return ['ci', 'review'].map(kind => stageTrackerActivityTrackHtml(item, kind, sg, sg.number < from || sg.number > to, nowMs, { stalled: stalledTrack === kind, lead: leadTrack, gateElsewhere: !!(ctx && ctx.gateElsewhere) })).join(''); if (sg.number < from || sg.number > to) return ``; - const sentinel = !!(sg.detour && sg.detour.sentinel); - const sentinelSuffix = !!(sg.detour && sg.detour.sentinelSuffix); - const heldGate = !!(sg.detour && sg.detour.held); + // The one bar-level sign of a human gate: the lit chevron's amber + // outline. The reasons and verbs live in the human-gate pill; a + // secondary row of a shared PR (ctx.gateElsewhere) wears neither. + const gateHere = sg.state === 'active' && !sg.cap && !(ctx && ctx.gateElsewhere) && typeof stageTrackerHumanGateReasons === 'function' && stageTrackerHumanGateReasons(item).length > 0; const fixPushed = sg.number === 30 && sg.state === 'done' && remediation === 'fix_pushed'; const blockerNote = sg.state === 'done' && sg.blockerNote ? String(sg.blockerNote) : ''; - const cls = ['ham-seg', sg.state, sg.cap ? 'cap' : '', sg.state === 'active' && !sg.cap && waitingOnTracks ? 'ham-settled-current' : '', fixPushed ? 'ham-fix-pushed' : '', blockerNote ? 'ham-blocker-note' : '', sg.state === 'active' && sg.number === 30 && remediation ? 'ham-remediation-' + remediation : '', sg.cap && sg.terminal ? 'merged' : '', sg.detour ? 'detoured' : '', sg.hold ? 'ham-open-hold' : '', sg.blocked ? 'ham-open-blocked' : '', sg.draft ? 'ham-open-draft' : '', sg.isNew ? 'ham-open-new' : '', sg.advisory ? 'ham-open-advisory' : '', sg.openSince && sg.openSince.stale ? 'ham-open-stale' : '', sentinel || sentinelSuffix ? 'ham-sentinel' : '', heldGate ? 'ham-held' : ''].filter(Boolean).join(' '); + const cls = ['ham-seg', sg.state, sg.cap ? 'cap' : '', sg.state === 'active' && !sg.cap && waitingOnTracks ? 'ham-settled-current' : '', fixPushed ? 'ham-fix-pushed' : '', blockerNote ? 'ham-blocker-note' : '', sg.state === 'active' && sg.number === 30 && remediation ? 'ham-remediation-' + remediation : '', sg.cap && sg.terminal ? 'merged' : '', sg.detour ? 'detoured' : '', sg.hold ? 'ham-open-hold' : '', sg.blocked ? 'ham-open-blocked' : '', sg.draft ? 'ham-open-draft' : '', sg.isNew ? 'ham-open-new' : '', sg.advisory ? 'ham-open-advisory' : '', sg.openSince && sg.openSince.stale ? 'ham-open-stale' : '', gateHere ? 'ham-human-gated' : ''].filter(Boolean).join(' '); const active = sg.state === 'active'; let tip = ''; let gateCaption = ''; @@ -19036,7 +19022,6 @@

    Where to get help

    else if (curStage === 100) tip = sg.label + ' — admitted, merging'; // Why a person merges a 090 PR leads its tooltip (hivecommons/hive#14658). // The reason is the whole story; the stage description would only repeat it (hivecommons/hive#15394). - else if (heldGate && typeof stageTrackerHeldTip === 'function') tip = stageTrackerHeldTip(item, nowMs); else if (curStage === STAGE_TRACKER_READY_FOR_HUMAN_MERGE && item.human_merge_reason_text) tip = ((sg.detour && sg.detour.text) || sg.label) + ' — ' + String(item.human_merge_reason_text).trim(); // A refusal on an earlier head is history, not the word: the // chevron reads the live stage and the hover keeps "merge attempt @@ -19045,10 +19030,6 @@

    Where to get help

    if (priorNote) tip += ' — ' + priorNote; if (actorTip && !sg.cap) tip += actorTip; if (claimant && !sg.cap) tip += ' · ' + stageTrackerClaimantLine(claimant, nowMs); - // The sentinel's reason leads the lane tooltip so the security - // implication is read before the stage mechanics. - if (sentinel) tip = stageTrackerSentinelTip(item) + ' — ' + tip; - else if (sentinelSuffix) tip = tip + ' — ' + stageTrackerSentinelTip(item); // Working or waiting leads: what happens now, or what it waits on. if (!sg.cap && typeof stageTrackerCueLead === 'function') tip = stageTrackerCueLead(item, worker, nowMs) + tip; if (sg.number === 30 && item.code_activity && Number(item.display_column) === 30) { @@ -19107,9 +19088,11 @@

    Where to get help

    const tipID = 'ham-chevron-tip-' + [item.repo || '', item.kind || '', item.number || 0, sg.number].map(x => encodeURIComponent(String(x))).join('-'); const caption = gateWord || word; const text = decision ? stageTrackerDecisionTriggerHtml(decision, caption, fullTip) : caption; - // Deferred to a running track: the icon alone (a decision trigger - // keeps its button, since the popover lives in the word). - const content = waitingOnTracks && !sg.cap && !decision ? stageTrackerIcon(sg.number, 'ham-ico') : `${gateCue}${workIco}${text}${actorIco || holderIco || progressIco}`; + // Deferred to a running track: the icon alone. A decision's + // popover rides the human-gate pill's status segment then, so no + // dim "Needs human …" words sit in the PR-in-progress slot + // (hivecommons/hive#17470). + const content = waitingOnTracks && !sg.cap ? stageTrackerIcon(sg.number, 'ham-ico') : `${gateCue}${workIco}${text}${actorIco || holderIco || progressIco}`; // A decision's dialog is its sole hover/focus detail surface. inner = decision ? `${content}` : `${content}${esc(fullTip)}`; } else if (fixPushed) { @@ -19127,7 +19110,7 @@

    Where to get help

    const tipID = 'ham-chevron-tip-' + [item.repo || '', item.kind || '', item.number || 0, sg.number].map(x => encodeURIComponent(String(x))).join('-'); inner = `${stageTrackerIcon(sg.number, 'ham-ico')}${esc(blockerNote)}${stageTrackerIcon('human', 'ham-ico ham-actor-ico', 'Next move: human')}${esc(noteTip)}`; } else inner = stageTrackerIcon(sg.number, 'ham-ico'); - return `
  • ${inner}
  • `; + return `
  • ${inner}
  • `; }).join(''); } @@ -19250,6 +19233,8 @@

    Where to get help

    // carries none of these and sits on a hive-driven stage is the hive's // to work through, so the dashboard must not dress it as a human call. const STAGE_TRACKER_HUMAN_MODS = ['hold', 'unauthorized', 'needs-human', 'needs-decision', 'needs-rebase', 'blocked', 'stalled']; + // The modifiers the one human-gate pill absorbs when a row renders it. + const STAGE_TRACKER_GATE_MODS = ['hold', 'needs-human', 'needs-decision']; // The pill says what happened in words ("stage ↓" read as a sort glyph, // hivecommons/hive#17335); after a push it says what caused the fall. const STAGE_TRACKER_HANDLED_TEXT = 'stage reset', STAGE_TRACKER_HANDLED_PUSH_TEXT = 'stage reset by push'; @@ -19389,7 +19374,7 @@

    Where to get help

    return `${esc(text)}`; } function stageTrackerSentinelChipHtml(item) { - if (!item || !item.sentinel_alert || stageTrackerSentinelInLane(item) || stageTrackerSentinelAsSuffix(item) || stageTrackerDeferredMods(item).indexOf(STAGE_TRACKER_SENTINEL_CHIP) >= 0) return ''; + if (!item || !item.sentinel_alert || stageTrackerDeferredMods(item).indexOf(STAGE_TRACKER_SENTINEL_CHIP) >= 0) return ''; const label = item.sentinel_notice ? 'Informational security notice' : 'Sentinel alert'; return `${esc(STAGE_TRACKER_SENTINEL_CHIP)}`; } @@ -19431,9 +19416,14 @@

    Where to get help

    const parked = Number(lp.stage) === STAGE_TRACKER_NEEDS_DECISION || (Array.isArray(lp.modifiers) && lp.modifiers.indexOf('needs-decision') >= 0) || !!(lp.decision_needed && lp.decision_needed.question); return parked ? lp : null; } - function stageTrackerChipsHtml(item) { - const sentinel = stageTrackerSentinelChipHtml(item) + (typeof stageTrackerPreparationChipHtml === 'function' ? stageTrackerPreparationChipHtml(item) : '') + (typeof stageTrackerAdoptionChipHtml === 'function' ? stageTrackerAdoptionChipHtml(item) : '') + (typeof stageTrackerPresenceChipHtml === 'function' ? stageTrackerPresenceChipHtml(item) : '') + (typeof stageTrackerPushChipHtml === 'function' ? stageTrackerPushChipHtml(item, Date.now()) : '') + (typeof stageTrackerReroutePillHtml === 'function' ? stageTrackerReroutePillHtml(item) : '') + (typeof stageTrackerSupersedesChipHtml === 'function' ? stageTrackerSupersedesChipHtml(item, Date.now()) : '') + (typeof stageTrackerOverlapBadgeHtml === 'function' ? stageTrackerOverlapBadgeHtml(item) : ''); + function stageTrackerChipsHtml(item, opts) { + // opts.gate: the row renders the one human-gate pill, which carries the + // sentinel / hold / needs-human reasons itself — those chips step aside. + const gated = !!(opts && opts.gate); + // The informational notice is not a gate reason, so its chip stays. + const sentinel = (gated && !item.sentinel_notice ? '' : stageTrackerSentinelChipHtml(item)) + (typeof stageTrackerPreparationChipHtml === 'function' ? stageTrackerPreparationChipHtml(item) : '') + (typeof stageTrackerAdoptionChipHtml === 'function' ? stageTrackerAdoptionChipHtml(item) : '') + (typeof stageTrackerPresenceChipHtml === 'function' ? stageTrackerPresenceChipHtml(item) : '') + (typeof stageTrackerPushChipHtml === 'function' ? stageTrackerPushChipHtml(item, Date.now()) : '') + (typeof stageTrackerReroutePillHtml === 'function' ? stageTrackerReroutePillHtml(item) : '') + (typeof stageTrackerSupersedesChipHtml === 'function' ? stageTrackerSupersedesChipHtml(item, Date.now()) : '') + (typeof stageTrackerOverlapBadgeHtml === 'function' ? stageTrackerOverlapBadgeHtml(item) : ''); const mods = (Array.isArray(item.modifiers) ? item.modifiers.slice() : []) + .filter(m => !gated || STAGE_TRACKER_GATE_MODS.indexOf(m) < 0) .sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); // A 085 PR a person acts on lights its real stage (CI / Review), so // the chevron no longer says "Needs human decision": the ask rides @@ -19441,7 +19431,7 @@

    Where to get help

    // re-adds the modifier (stageTrackerApplyPersonActsOnPRPill); this // covers a payload that predates it. Any pill that already names the // person owed (unauthorized, hold …) stands in for it. - if (item.kind === 'pr' && !mods.some(m => STAGE_TRACKER_HUMAN_MODS.indexOf(m) >= 0) && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) { + if (!gated && item.kind === 'pr' && !mods.some(m => STAGE_TRACKER_HUMAN_MODS.indexOf(m) >= 0) && typeof stageTrackerPersonActsOnPR === 'function' && stageTrackerPersonActsOnPR(item)) { mods.push('needs-decision'); mods.sort((x, y) => STAGE_TRACKER_MOD_PRIORITY.indexOf(x) - STAGE_TRACKER_MOD_PRIORITY.indexOf(y)); } @@ -19529,7 +19519,7 @@

    Where to get help

    approve: 'Approve', 'give-direction': 'Give direction', 'close-superseded': 'Close as superseded', wontfix: "Close as won't-fix", 'close-read': 'Closed', 'close-issue': 'Close issue', 'let-hive-decide': 'Let hive decide', hold: 'Hold', release: 'Release hold', 'accept-triage': 'Accept triage', 'mark-needs-human': 'Mark needs-human', 'queue-merge': 'Approve and let hive merge', 'merge-now': 'Merge now as maintainer', - adopt: 'Adopt', 'adopt-now': 'Adopt now', reroute: 'Reroute to another clanker', + adopt: 'Adopt', 'adopt-now': 'Adopt now', reroute: 'Reroute to another clanker', 'confirm-sentinel': 'Confirm safe', // Historical ledger entries only: the hive now re-authors its own // exhausted PRs itself and a person's rewrite of a contributor PR is adopt. 're-author': 'Re-author (now: adopt)', @@ -20269,10 +20259,11 @@

    Where to get help

    const subKey = stageTrackerItemKey(pr); const humanNote = typeof stageTrackerHumanContextHtml === 'function' ? stageTrackerHumanContextHtml(pr, stages, nowMs, undefined, ctx, subKey) : ''; const noteCtx = humanNote && typeof stageTrackerNoteTakenCtx === 'function' ? stageTrackerNoteTakenCtx(ctx, subKey) : ctx; + const prGate = typeof stageTrackerHumanGateHtml === 'function' ? stageTrackerHumanGateHtml(pr, pr, nowMs) : ''; return `
    ${typeof stageTrackerRowToolsHtml === 'function' ? stageTrackerRowToolsHtml(pr) : ''}
    - ${stageTrackerHeadColsHtml([ref], '', stageTrackerActedBadgeHtml(pr, nowMs) + stageTrackerChipsHtml(pr) + (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(pr, nowMs) : '') + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(pr, hamNotesCtx(pr)) : ''))} + ${stageTrackerHeadColsHtml([ref], '', stageTrackerActedBadgeHtml(pr, nowMs) + stageTrackerChipsHtml(pr, { gate: !!prGate }) + (prGate || (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(pr, nowMs) : '')) + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(pr, hamNotesCtx(pr)) : ''))}
    ${typeof stageTrackerPreparationNodeHtml === 'function' ? stageTrackerPreparationNodeHtml(pr, stages, ctx) : ''} @@ -20628,14 +20619,19 @@

    Where to get help

    const rowKey = stageTrackerItemKey(item); const humanNote = typeof stageTrackerHumanContextHtml === 'function' ? stageTrackerHumanContextHtml(item, stages, nowMs, subRows, ctx, rowKey) : ''; const noteCtx = humanNote && typeof stageTrackerNoteTakenCtx === 'function' ? stageTrackerNoteTakenCtx(ctx, rowKey) : ctx; + // One human-gate pill per gated row (hivecommons/hive#17470): it + // absorbs the sentinel / hold / needs-human chips and the lead verbs; + // a secondary row of a shared PR gets only the chip that links to its + // primary. Guarded: the harnesses load helpers by name. + const gate = typeof stageTrackerHumanGateHtml === 'function' ? stageTrackerHumanGateHtml(item, shown, nowMs, subRows, { sharedUnder }) : ''; return `
    ${stageTrackerRowToolsHtml(item)}
    - ${stageTrackerHeadColsHtml(prRefs, leadHtml, stageTrackerActedBadgeHtml(item, nowMs) + stageTrackerChipsHtml(shown) + (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(item, nowMs, subRows) : '') + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(item, hamNotesCtx(item)) : ''), prTargetKey)} + ${stageTrackerHeadColsHtml(prRefs, leadHtml, stageTrackerActedBadgeHtml(item, nowMs) + stageTrackerChipsHtml(shown, { gate: !!gate }) + (gate || (typeof stageTrackerLeadButtonHtml === 'function' ? stageTrackerLeadButtonHtml(item, nowMs, subRows) : '')) + (typeof stageTrackerNotesButtonHtml === 'function' ? stageTrackerNotesButtonHtml(item, hamNotesCtx(item)) : ''), prTargetKey)}
    ${typeof stageTrackerPreparationNodeHtml === 'function' ? stageTrackerPreparationNodeHtml(item, stages, ctx) : ''} -
      ${stageTrackerStripItems(shown, stages, range, nowMs, ctx)}
    +
      ${stageTrackerStripItems(shown, stages, range, nowMs, sharedUnder ? Object.assign({}, ctx, { gateElsewhere: true }) : ctx)}
    ${stageTrackerSinceHtml(shown, nowMs)}${typeof stageTrackerPillHtml === 'function' ? stageTrackerPillHtml(shown, stages, range, nowMs, ctx) : ''}
    ${humanNote}${stageTrackerCurrentStageHtml(shown, stages, range, nowMs)}${typeof stageTrackerPreparationCommentHtml === 'function' ? stageTrackerPreparationCommentHtml(shown, noteCtx, rowKey) : typeof stageTrackerEventHtml === 'function' ? stageTrackerEventHtml(rowKey, noteCtx) : ''}${typeof stageTrackerExecutionHtml === 'function' ? stageTrackerExecutionHtml(shown) : ''}${typeof stageTrackerReviewNotesHtml === 'function' ? stageTrackerReviewNotesHtml(item, ctx) : ''}${typeof stageTrackerNotesPanelHtml === 'function' ? stageTrackerNotesPanelHtml(item, hamNotesCtx(item)) : ''}${subs}
    `; @@ -23472,6 +23468,8 @@

    All labels

    open: 'Open on GitHub', copy: 'Copy link', 'open:app-settings': 'Grant the App permission', 'blocker:recheck': 'Re-check permissions', 'blocker:patch': 'Prepare the patch for a person to push', 'blocker:close-partial': 'Mark partially-addressed and close', 'blocker:wait': 'Keep waiting', + // The human-gate pill's reason-bound verbs (hivecommons/hive#17470). + 'gate:decide': 'Decide', 'gate:request-changes': 'Request changes', 'gate:confirm-sentinel': 'Confirm safe', }; // Actions that end with a commit on the base branch — the lead // "Approve and let hive merge" (the hive's sweep merges on its next @@ -24412,8 +24410,14 @@

    All labels

    const key = sub ? sub.dataset.hamSubKey : (row ? row.dataset.hamKey : ''); const item = key ? stageTrackerItemByKey(_stageTracker, key) : null; if (!item) return; - stageTrackerDecisionRun(item, b.dataset.hamAct); + const run = stageTrackerDecisionRun(item, b.dataset.hamAct); + // A human-gate verb that went through reads "settling…" on its pill + // until the next snapshot re-renders the row (hivecommons/hive#17470). + if (b.classList.contains('ham-gate-act') && run && typeof run.then === 'function' && typeof stageTrackerHumanGateSettling === 'function') { + run.then(r => { if (r && !r.cancelled && Array.isArray(r.results) && r.results.length && r.results.every(x => x && x.ok)) stageTrackerHumanGateSettling(b); }, () => {}); + } }); + if (typeof stageTrackerWireHumanGate === 'function') stageTrackerWireHumanGate(el); // Cmd/Ctrl- or Shift-click anywhere on a row (not on its links or // buttons) selects it too. el.addEventListener('click', e => { @@ -24789,6 +24793,14 @@

    All labels

    const to = payload.to || stageTrackerRerouteTargetOf(id) || STAGE_TRACKER_REROUTE_ANY; return { url: '/api/repos/' + seg + '/items/' + n + '/decision', body: { decision: 'reroute', to, comment: payload.comment || '', type } }; } + // The human-gate verbs: Decide… and Request changes… are directions + // (the "/hive decision …" carrier); Confirm safe clears the sentinel. + if (id === 'gate:decide' || id === 'gate:request-changes') { + return { url: '/api/repos/' + seg + '/items/' + n + '/decision', body: { decision: 'direction', comment: payload.comment || '', type } }; + } + if (id === 'gate:confirm-sentinel') { + return { url: '/api/repos/' + seg + '/items/' + n + '/sentinel-confirm', body: { comment: payload.comment || '', type } }; + } if (id.indexOf('decide:') === 0) { const body = { decision: id.slice('decide:'.length), comment: payload.comment || '', type }; if (payload.supersededBy) body.superseded_by = payload.supersededBy; @@ -25533,6 +25545,21 @@

    All labels

    return (await stageTrackerAsk(id, 'confirm', { title: 'Approve pull request' + (items.length > 1 ? 's' : ''), message: preface + 'Post "/lgtm" and "/approve" on ' + refs + ' as ' + who + '? The merge queue takes it from there — the dashboard does not merge.', confirmLabel: 'Post /lgtm + /approve', danger: !!sentinel })) ? {} : null; } return (await stageTrackerAsk(id, 'confirm', { title: 'Approve direction', message: 'Record "/hive approve" on ' + refs + ' as ' + who + '? The hive un-parks the issue' + (items.length > 1 ? 's' : '') + ' and carries on; nothing is merged.', confirmLabel: 'Approve' })) ? {} : null; + case 'gate:decide': { + // The reviewer's question leads the modal, pre-filled; the answer is required. + const dec = typeof stageTrackerDecisionOf === 'function' ? stageTrackerDecisionOf(items[0]) : null; + const q = (dec && dec.item && dec.item.decision_needed && dec.item.decision_needed.question) || (items[0] && items[0].human_attention && items[0].human_attention.reason) || ''; + const v = await hivePrompt({ title: 'Decide — ' + refs, label: preface + (q ? 'Question: ' + q + '\n\n' : '') + 'Your decision (posted as "/hive decision …"; the hive carries on with it)', placeholder: 'e.g. take option B and keep the API as is', validate: s => s ? true : 'A decision is required', confirmLabel: 'Send' }); + return v == null ? null : { comment: v }; + } + case 'gate:request-changes': { + const v = await hivePrompt({ title: 'Request changes — ' + refs, label: preface + 'What should change on ' + refs + '? (posted as "/hive decision …"; ' + stageTrackerDirectionCarrier(items) + ' pushes a new head)', placeholder: 'e.g. drop the retry loop and keep the flag', validate: s => s ? true : 'The requested change is required', confirmLabel: 'Send' }); + return v == null ? null : { comment: v }; + } + case 'gate:confirm-sentinel': { + const v = await stageTrackerAsk(id, 'prompt', { title: 'Confirm safe — ' + refs, label: preface + 'Confirm the sentinel finding is intended: this comments your confirmation on ' + refs + ' and removes the sentinel label so the lane may continue. Note (optional)', placeholder: 'e.g. the workflow edit is the point of this PR', confirmLabel: 'Confirm safe', danger: true }); + return v == null ? null : { comment: v }; + } case 'decide:direction': { // The direction is required, so this prompt is never skipped. const v = await hivePrompt(prs @@ -25682,11 +25709,12 @@

    All labels

    'decide:delegate': 'Hive deciding…', 'decide:delegate:preview': 'Asking the hive…', 'decide:delegate-all': 'Hive deciding each PR…', 'decide:delegate:rerun': 'Hive deciding again…', 'decide:approve': 'Approving…', 'decide:direction': 'Recording direction…', 'decide:close-superseded': 'Closing…', 'decide:close-wontfix': 'Closing…', 'decide:close-read': 'Closing…', 'decide:close-deferred': 'Closing…', 'decide:close-issue': 'Closing…', 'decide:merge-now': 'Merging…', 'decide:queue-merge': 'Recording approval…', 'decide:adopt': 'Adopting…', 'decide:adopt-now': 'Adopting now…', 'decide:reroute': 'Rerouting…', + 'gate:decide': 'Sending your decision…', 'gate:request-changes': 'Requesting changes…', 'gate:confirm-sentinel': 'Confirming safe…', }; const STAGE_TRACKER_ACTION_WORDS = { adopted: 'adopted', approved: 'approved', recommended: 'recommendation only', closed: 'closed', directed: 'direction recorded', refused: 'refused', 'decided-each': 'decided per PR', merged: 'merged', 'queued-for-merge': 'queued for merge — hive merges it on its next pass once CI is green', [STAGE_TRACKER_ACTION_REBASE_QUEUED]: 'rebase queued, merge to follow', - held: 'held', released: 'hold released', rescanned: 'rescanned', 'triage-accepted': 'triage accepted', 'needs-human': 'marked needs-human', rerouted: 'rerouted', [STAGE_TRACKER_ACTION_NOOP]: 'no change', + held: 'held', released: 'hold released', 'sentinel-confirmed': 'sentinel confirmed safe', rescanned: 'rescanned', 'triage-accepted': 'triage accepted', 'needs-human': 'marked needs-human', rerouted: 'rerouted', [STAGE_TRACKER_ACTION_NOOP]: 'no change', [STAGE_TRACKER_ACTION_NO_EFFECT]: 'no effect yet', }; // Once the server has answered, a terminal action's caption says so @@ -25699,7 +25727,7 @@

    All labels

    } // The ledger name of a row action id (the inverse of the badge's // STAGE_TRACKER_ACTED_OPTION_ID), for a failure noted on the client. - const STAGE_TRACKER_ACTION_LEDGER_NAME = { 'decide:delegate': 'let-hive-decide', 'decide:approve': 'approve', 'decide:direction': 'give-direction', 'decide:close-superseded': 'close-superseded', 'decide:close-wontfix': 'wontfix', 'decide:close-deferred': 'wontfix', 'decide:close-read': 'close-read', 'decide:close-issue': 'close-issue', 'accept-triage': 'accept-triage', hold: 'hold', release: 'release', 'needs-human': 'mark-needs-human', 'decide:merge-now': 'merge-now', 'decide:queue-merge': 'queue-merge', 'decide:adopt': 'adopt', 'decide:adopt-now': 'adopt-now', 'decide:reroute': 'reroute' }; + const STAGE_TRACKER_ACTION_LEDGER_NAME = { 'decide:delegate': 'let-hive-decide', 'decide:approve': 'approve', 'decide:direction': 'give-direction', 'decide:close-superseded': 'close-superseded', 'decide:close-wontfix': 'wontfix', 'decide:close-deferred': 'wontfix', 'decide:close-read': 'close-read', 'decide:close-issue': 'close-issue', 'accept-triage': 'accept-triage', hold: 'hold', release: 'release', 'needs-human': 'mark-needs-human', 'decide:merge-now': 'merge-now', 'decide:queue-merge': 'queue-merge', 'decide:adopt': 'adopt', 'decide:adopt-now': 'adopt-now', 'decide:reroute': 'reroute', 'gate:decide': 'give-direction', 'gate:request-changes': 'give-direction', 'gate:confirm-sentinel': 'confirm-sentinel' }; // A failed or refused action is noted on the row at once, so the // history badge turns red and its hover's first line names the reason // — the server's ledger only sees 5xx and refused answers, and a @@ -26254,6 +26282,230 @@

    All labels

    // kind → { name, bytes (ArrayBuffer), buffer (AudioBuffer|null), failed } var _stageTrackerClips = { open: null, merge: null }; var _stageTrackerSettingsReturnFocus = null; + /* ---- The human gate: one control per gated row ---------------------- + A row a person must settle used to say so three or four ways at once + — a "Needs human · review" chevron word, a `sentinel` chip, a + needs-decision pill, `Approve ▸` and `Let hive decide ▸` — and still + offered no verb for some gates (a sentinel alert had nothing that + confirmed it; a "needs decision" had nothing that decided). The + maintainer on hivecommons/hive (2026-11-10): "I don't see a consistent + way to settle each of these using the UI. Some are confusing, others + have no controls to take action, others have too many." + + Now every gated row carries exactly ONE segmented pill: + [👤 Needs human · ] [verb] [verb] [verb] [… more] + The status segment names why (review / decision / sentinel / hold, + comma-separated when they stack) and carries the reviewer's question + or the sentinel rule as its hover and popover; the verb segments are + the fixed set for those reasons (STAGE_TRACKER_GATE_VERBS), unioned + and de-duplicated, at most STAGE_TRACKER_GATE_VISIBLE visible with the + rest behind a `…` menu. "Needs human" is never a chevron word: the lit + chevron is the row's real stage with the amber ham-human-gated outline + as the bar's only cue. A secondary row of a shared PR renders no gate + of its own; its "decision pending on #N" chip is the link to the row + that does. Every verb runs the row menu's path (runRowAction: in-app + modal, result toast, acting row); the pill reads "settling…" until the + next snapshot. */ + const STAGE_TRACKER_GATE_WORD = 'Needs human'; + const STAGE_TRACKER_GATE_SETTLING = 'settling…'; + const STAGE_TRACKER_GATE_VISIBLE = 3; + // Reason → verbs, in the order they stand on the pill. The same reason + // always offers the same verbs (the maintainer's "consistent way"). + const STAGE_TRACKER_GATE_VERBS = { + review: ['decide:approve', 'gate:request-changes', 'decide:delegate'], + decision: ['gate:decide', 'decide:approve', 'decide:delegate'], + sentinel: ['gate:confirm-sentinel', 'decide:delegate'], + hold: ['release', 'decide:delegate'], + }; + const STAGE_TRACKER_GATE_ORDER = ['review', 'decision', 'sentinel', 'hold']; + const STAGE_TRACKER_GATE_PR_ONLY = ['decide:approve', 'gate:request-changes']; + // The verb's label on the pill; "Approve" reads "Approve as-is" when the + // gate is a decision (a GitHub approval of the head as it stands). + const STAGE_TRACKER_GATE_LABELS = { + 'decide:approve': 'Approve', 'gate:request-changes': 'Request changes…', 'decide:delegate': 'Let hive decide', + 'gate:decide': 'Decide…', 'gate:confirm-sentinel': 'Confirm safe', release: 'Release hold', + }; + const STAGE_TRACKER_GATE_APPROVE_AS_IS = 'Approve as-is'; + // What each verb posts, for the pill hover and the docs table. + const STAGE_TRACKER_GATE_POSTS = { + 'decide:approve': 'Posts a GitHub approval (/lgtm + /approve) on the current head.', + 'gate:request-changes': 'Posts your text as "/hive decision …" — the hive pushes a new head.', + 'decide:delegate': 'The hive decides for you under its policy and rails; recorded as your decision.', + 'gate:decide': 'Answers the question as "/hive decision …" — the hive carries on with your answer.', + 'gate:confirm-sentinel': 'Comments your confirmation and removes the sentinel label.', + release: 'Removes the hold label; the lane may merge.', + }; + + // Pure: whether the row is a PR (its own, or an issue drawn through its + // one covering PR) — the gate is a PR matter except for a parked issue. + function stageTrackerGateIsPR(item) { + return !!item && (item.via_pr ? 'pr' : item.kind) === 'pr'; + } + // Pure: the reasons a person is owed on the row, each with the text the + // status segment explains itself with. [] when nobody is owed anything. + // review — the reviewer's verdict requires a human (review_activity + // human_decision on this head); tip = the reviewer's question + // decision — stage/085 (PR) or 045 (issue), or a needs-decision / + // needs-human modifier; tip = the decision question + // sentinel — a blocking sentinel alert; tip = the rule and paths + // hold — a hold label; tip = who held it and why + function stageTrackerHumanGateReasons(item) { + if (!item || item.state === 'closed' || item.superseded || item.superseded_by || item.adopted_by) return []; + if (Number(item.stage) >= (typeof STAGE_TRACKER_TERMINAL === 'number' ? STAGE_TRACKER_TERMINAL : 110)) return []; + const mods = Array.isArray(item.modifiers) ? item.modifiers : []; + if (mods.indexOf('merged') >= 0 || mods.indexOf('draft') >= 0) return []; + const out = []; + const pr = stageTrackerGateIsPR(item); + const onHead = a => !!a && (!a.head || !item.head || String(a.head) === String(item.head)); + const review = pr && onHead(item.review_activity) ? item.review_activity : null; + if (review && review.state === 'human_decision') { + out.push({ key: 'review', tip: String(review.blocker || review.detail || review.caption || '').trim() || 'A reviewer asked for a person\'s sign-off.' }); + } + const stage = Number(item.stage) || 0; + const prDecision = typeof STAGE_TRACKER_NEEDS_DECISION === 'number' ? STAGE_TRACKER_NEEDS_DECISION : 85; + const issueDecision = typeof STAGE_TRACKER_ISSUE_NEEDS_DECISION === 'number' ? STAGE_TRACKER_ISSUE_NEEDS_DECISION : 45; + // A pre-045 issue still wearing 085 is parked on a person all the same. + const decisionStage = pr ? stage === prDecision : (stage === issueDecision || stage === prDecision); + const flagged = decisionStage || mods.indexOf('needs-decision') >= 0 || mods.indexOf('needs-human') >= 0 || item.needs_human === true; + // An unauthorized step and a structured blocker name the person owed + // in their own pills (hive-bot-lacks-permission, Blocked · …); they + // are not a decision anyone is asked for. + if (flagged && !String(item.unauthorized_step || '').trim() && !(item.blocker && String(item.blocker.short || '').trim())) { + const d = item.decision_needed || {}; + const attention = typeof stageTrackerHumanAttentionOf === 'function' ? stageTrackerHumanAttentionOf(item) : null; + const ask = typeof stageTrackerNeedsHumanAsk === 'function' ? stageTrackerNeedsHumanAsk(item) : null; + const short = typeof stageTrackerNeedsHumanShort === 'function' ? stageTrackerNeedsHumanShort(item) : ''; + const tip = String(d.question || (attention && (attention.question || attention.reason)) || (ask && (ask.question || ask.reason)) || short || '').trim(); + // The review gate already carries the reviewer's question; the same + // question is not a second reason. + if (!(review && review.state === 'human_decision' && out.length && (!tip || out[0].tip === tip))) out.push({ key: 'decision', tip: tip || 'A person\'s decision is owed.' }); + } + if (item.sentinel_alert && !item.sentinel_notice) { + out.push({ key: 'sentinel', tip: typeof stageTrackerSentinelTipWithPaths === 'function' ? stageTrackerSentinelTipWithPaths(item) : (typeof stageTrackerSentinelTip === 'function' ? stageTrackerSentinelTip(item) : 'Sentinel alert') }); + } + if (item.hold || mods.indexOf('hold') >= 0) { + const tip = typeof stageTrackerHoldTip === 'function' ? stageTrackerHoldTip(item, Date.now()) : ''; + out.push({ key: 'hold', tip: tip || 'A hold label keeps the hive off this item until a person releases it.' }); + } + out.sort((x, y) => STAGE_TRACKER_GATE_ORDER.indexOf(x.key) - STAGE_TRACKER_GATE_ORDER.indexOf(y.key)); + return out; + } + // Pure: the verbs for a set of reasons — the union in reason order, + // de-duplicated, first label wins (so "Approve" on review + decision + // reads "Approve", and "Approve as-is" when the decision stands alone). + function stageTrackerHumanGateVerbs(reasons, item) { + const ids = []; + // A row with no PR has no head to approve or send back; those verbs + // belong to PR rows (or an issue drawn through its covering PR). + const onPR = item == null || stageTrackerGateIsPR(item); + (reasons || []).forEach(r => (STAGE_TRACKER_GATE_VERBS[r.key] || []).forEach(id => { if (ids.indexOf(id) < 0 && (onPR || STAGE_TRACKER_GATE_PR_ONLY.indexOf(id) < 0)) ids.push(id); })); + const onlyDecision = (reasons || []).length && reasons.every(r => r.key === 'decision'); + return ids.map(id => ({ id, label: id === 'decide:approve' && onlyDecision ? STAGE_TRACKER_GATE_APPROVE_AS_IS : STAGE_TRACKER_GATE_LABELS[id] || id, posts: STAGE_TRACKER_GATE_POSTS[id] || '' })); + } + // Pure: the status segment's words — "Needs human · review, sentinel". + function stageTrackerHumanGateStatusText(reasons) { + return STAGE_TRACKER_GATE_WORD + (reasons && reasons.length ? ' · ' + reasons.map(r => r.key).join(', ') : ''); + } + // Pure: the status segment's hover — one line per reason. + function stageTrackerHumanGateTip(reasons) { + return (reasons || []).map(r => r.key + ': ' + r.tip).join('\n'); + } + // Pure: whether a verb is enabled for this viewer and why not. The + // row's own lead actions (server-judged delegate, approve) are trusted + // first; the rest follow the hold permission the endpoints share. + function stageTrackerHumanGateVerbState(id, item, ctx, leads) { + const lead = (leads || []).find(a => a && a.id === id); + if (lead) return { enabled: lead.enabled !== false, why: lead.enabled === false ? String(lead.why || '') : '' }; + return typeof stageTrackerActionAllowed === 'function' ? stageTrackerActionAllowed(id, ctx) : { enabled: true, why: '' }; + } + // more: a menu item. inline: this menu item doubles a verb that is also + // drawn inline on the strip tier (the phone tier hides the inline copy + // and shows this one). rest: an inline verb after the first (the phone + // tier folds it into the … menu). + function stageTrackerHumanGateVerbHtml(item, v, state, more, inline, rest) { + const ref = typeof stageTrackerRefOf === 'function' ? stageTrackerRefOf(item) : ''; + const tip = state.enabled ? v.posts : state.why; + const attrs = `data-ham-act="${esc(v.id)}"${state.enabled ? '' : ' aria-disabled="true"'}${tip ? ` title="${esc(tip)}"` : ''} aria-label="${esc(v.label + (ref ? ' — ' + ref : ''))}"`; + if (more) return ``; + return ``; + } + // Pure: the pill. '' when the row has no gate. The status segment is + // the decision popover's trigger when the row carries a decision, else + // a plain segment with the reasons as its hover. + function stageTrackerHumanGateHtml(item, shown, nowMs, subRows, opts) { + shown = shown || item; + if (!item) return ''; + const reasons = stageTrackerHumanGateReasons(shown); + if (!reasons.length) return ''; + // A secondary row of a shared PR (drawn under another issue's row, + // hivecommons/hive#17333) never carries the gate: the primary row + // does, and this row's only control is the chip that links to it. + if (opts && opts.sharedUnder) { + if (typeof stageTrackerItemKey !== 'function') return ''; + const under = Number(opts.sharedUnder); + const lp = (Array.isArray(item.linked_prs) ? item.linked_prs : []).find(x => x && Number(x.drawn_under) === under) || (shown.via_pr ? { number: shown.number } : null); + const prNum = Number(lp && lp.number) || 0; + const row = stageTrackerItemKey({ repo: item.repo, kind: 'issue', number: under }); + const to = prNum ? stageTrackerItemKey({ repo: item.repo, kind: 'pr', number: prNum }) : row; + return ``; + } + const ctx = typeof stageTrackerActionCtx === 'function' ? stageTrackerActionCtx(item.repo) : null; + if (ctx) { ctx.nowMs = typeof nowMs === 'number' ? nowMs : Date.now(); ctx.rows = typeof _stageTrackerRows !== 'undefined' ? _stageTrackerRows : null; } + const leads = ctx && typeof stageTrackerLeadActionsOnRow === 'function' ? stageTrackerLeadActionsOnRow(item, ctx, subRows) : []; + // The decision lives on another listed row: that row carries the + // gate; this one only points at it. + const passive = leads.find(a => a && a.passive); + if (passive) return typeof stageTrackerLeadPillHtml === 'function' ? stageTrackerLeadPillHtml(item, passive) : ''; + // A gate owed on a PR drawn under this issue row renders on that sub-row. + if (Array.isArray(subRows) && subRows.length && item.kind === 'issue' && !item.via_pr && !leads.length && subRows.some(s => stageTrackerHumanGateReasons(s).length)) return ''; + const verbs = stageTrackerHumanGateVerbs(reasons, shown); + const text = stageTrackerHumanGateStatusText(reasons); + const tip = stageTrackerHumanGateTip(reasons); + const ico = typeof stageTrackerIcon === 'function' ? stageTrackerIcon('human', 'ham-ico ham-mod-ico') : ''; + const inner = `${ico}${esc(text)}`; + const decision = typeof stageTrackerDecisionOf === 'function' ? stageTrackerDecisionOf(item) : null; + const status = decision && typeof stageTrackerDecisionTriggerHtml === 'function' + ? stageTrackerDecisionTriggerHtml(decision, inner, tip, 'ham-gate-status ham-mod-ask') + : `${inner}`; + const shownVerbs = verbs.slice(0, STAGE_TRACKER_GATE_VISIBLE); + const moreVerbs = verbs.slice(STAGE_TRACKER_GATE_VISIBLE); + const acts = shownVerbs.map((v, i) => stageTrackerHumanGateVerbHtml(item, v, stageTrackerHumanGateVerbState(v.id, shown, ctx, leads), false, false, i > 0)).join(''); + // The … menu holds every verb after the first: on the strip tier CSS + // shows only the ones past STAGE_TRACKER_GATE_VISIBLE (and hides the + // button when there are none); the phone tier shows the first verb + // inline and the rest here, so the pill stays one line (#17161). + const menuVerbs = verbs.slice(1); + const more = menuVerbs.length ? `` : ''; + const key = typeof stageTrackerItemKey === 'function' ? stageTrackerItemKey(item) : ''; + return `${status}${acts}${more}`; + } + // The pill's optimistic state after one of its verbs ran: the status + // reads "settling…" until the next snapshot re-renders the row. + function stageTrackerHumanGateSettling(button) { + const gate = button && button.closest ? button.closest('.ham-human-gate') : null; + if (!gate) return; + gate.classList.add('ham-gate-settling'); + const word = gate.querySelector('.ham-gate-status .ham-mod-word'); + if (word) word.textContent = STAGE_TRACKER_GATE_SETTLING; + gate.querySelectorAll('.ham-gate-act').forEach(b => b.setAttribute('aria-disabled', 'true')); + } + // The `…` menu: open / close on its button, close on outside click or + // Escape, the same popover pattern the row's ⋯ menu uses. + function stageTrackerWireHumanGate(el) { + if (!el || el._hamGateWired) return; + el._hamGateWired = true; + const closeAll = () => el.querySelectorAll('.ham-gate-menu:not([hidden])').forEach(m => { m.hidden = true; const b = m.previousElementSibling; if (b) b.setAttribute('aria-expanded', 'false'); }); + el.addEventListener('click', e => { + const b = e.target.closest ? e.target.closest('[data-ham-gate-more]') : null; + if (!b) { if (!(e.target.closest && e.target.closest('.ham-gate-menu'))) closeAll(); return; } + e.preventDefault(); e.stopPropagation(); + const menu = b.nextElementSibling; + const open = menu && menu.hidden; + closeAll(); + if (menu && open) { menu.hidden = false; b.setAttribute('aria-expanded', 'true'); const first = menu.querySelector('[role="menuitem"]'); if (first) first.focus(); } + }); + el.addEventListener('keydown', e => { if (e.key === 'Escape') closeAll(); }); + } function stageTrackerPRKey(repo, number) { return (repo || '') + '/pr#' + (Number(number) || 0); } function stageTrackerItemKey(it) { return (it.repo || '') + '/' + (it.kind || '') + '#' + (Number(it.number) || 0); } diff --git a/src/pkg/github/notification_write_sites.go b/src/pkg/github/notification_write_sites.go index c53e6d5dfe..8f95e3f079 100644 --- a/src/pkg/github/notification_write_sites.go +++ b/src/pkg/github/notification_write_sites.go @@ -42,6 +42,7 @@ var notificationWriteSites = map[string]NotificationWriteSite{ "dashboard.(*Server).handleRepoItemAdoptNow": {Class: NotificationClassStatus}, "dashboard.(*Server).handleRepoItemBlockerClosePartial": {Class: NotificationClassStatus}, "dashboard.(*Server).handleRepoItemDecision": {Class: NotificationClassStatus}, + "dashboard.(*Server).handleRepoItemSentinelConfirm": {Class: NotificationClassStatus}, "dashboard.(*Server).handleReviewQueueSupersededClose": {Class: NotificationClassStatus}, "dashboard.(*Server).mirrorPlanWith": {Class: NotificationClassStatus}, "github.(*Client).CloseIssueForConfiguredLinePR": {Class: NotificationClassStatus}, From 4f80a29051c441ad5d36d7631215b9e9260aa32c Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Tue, 10 Nov 2026 04:08:51 +0000 Subject: [PATCH 096/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.9 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/fixed-ci-chevron-stale-after-completion.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/fixed-ci-chevron-stale-after-completion.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a939275e9..0b42eaacce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-10 (v5.211.9) + +### Fixed + +- Dashboard: the Activity Monitor's CI chevron no longer stays lit as running after every check on the head has concluded. A required check that never produced a run is a settled word (*hasn't reported*), never inferred motion from a part-filled tally; at `060 reviewed` with all reported checks concluded, Review is the lit chevron and CI is its blocker only when red. A CI snapshot that still claims a check running or queued after `dashboard.stage_tracker.ci_activity_stale_m` (default 10 minutes) is re-listed from GitHub on the next tracker build regardless of the batch cache, ETag or stage. ([#17508](https://github.com/hivecommons/hive/issues/17508)) + ## 2026-11-10 (v5.211.8) ### Fixed diff --git a/changelog.d/fixed-ci-chevron-stale-after-completion.md b/changelog.d/fixed-ci-chevron-stale-after-completion.md deleted file mode 100644 index 2b38634152..0000000000 --- a/changelog.d/fixed-ci-chevron-stale-after-completion.md +++ /dev/null @@ -1 +0,0 @@ -- Dashboard: the Activity Monitor's CI chevron no longer stays lit as running after every check on the head has concluded. A required check that never produced a run is a settled word (*hasn't reported*), never inferred motion from a part-filled tally; at `060 reviewed` with all reported checks concluded, Review is the lit chevron and CI is its blocker only when red. A CI snapshot that still claims a check running or queued after `dashboard.stage_tracker.ci_activity_stale_m` (default 10 minutes) is re-listed from GitHub on the next tracker build regardless of the batch cache, ETag or stage. ([#17508](https://github.com/hivecommons/hive/issues/17508)) From f52d84fa57c403381ff26ff2ce7683c62ebf34ea Mon Sep 17 00:00:00 2001 From: hive-release-bot Date: Tue, 10 Nov 2026 04:36:03 +0000 Subject: [PATCH 097/123] =?UTF-8?q?=F0=9F=94=96=20release:=20v5.211.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated release commit. Compiles changelog.d/ fragments and moves the CHANGELOG.md Unreleased section into a dated v5.211.10 entry. See src/docs/releases.md. Signed-off-by: hive-release-bot --- CHANGELOG.md | 6 ++++++ changelog.d/changed-needs-human-gate-pill.md | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/changed-needs-human-gate-pill.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b42eaacce..82481ccda6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Hive did not historically maintain a complete changelog. This file starts a prag ## Unreleased +## 2026-11-10 (v5.211.10) + +### Changed + +- Activity Monitor: every row a person must settle now carries exactly one human-gate control — a segmented `👤 Needs human · ` pill whose verbs are fixed per reason (review: Approve · Request changes… · Let hive decide; decision: Decide… · Approve as-is · Let hive decide; sentinel: Confirm safe · Let hive decide; hold: Release hold · Let hive decide; stacked reasons union, ≤ 3 visible + `…`). "Needs human", "Held · sentinel" and "Sentinel alert · needs human" never ride a chevron any more — the lit chevron is the real stage with the amber outline — the scattered `sentinel` chip / `Approve ▸` / `Let hive decide ▸` are folded into the pill, secondary rows of a shared PR render no gate (their *decision pending on #N* chip links to the primary row), and a new `POST /api/repos/{owner}/{repo}/items/{number}/sentinel-confirm` endpoint gives a sentinel alert its own answer (hivecommons/hive#17470). + ## 2026-11-10 (v5.211.9) ### Fixed diff --git a/changelog.d/changed-needs-human-gate-pill.md b/changelog.d/changed-needs-human-gate-pill.md deleted file mode 100644 index 0e5d03d09d..0000000000 --- a/changelog.d/changed-needs-human-gate-pill.md +++ /dev/null @@ -1 +0,0 @@ -- Activity Monitor: every row a person must settle now carries exactly one human-gate control — a segmented `👤 Needs human · ` pill whose verbs are fixed per reason (review: Approve · Request changes… · Let hive decide; decision: Decide… · Approve as-is · Let hive decide; sentinel: Confirm safe · Let hive decide; hold: Release hold · Let hive decide; stacked reasons union, ≤ 3 visible + `…`). "Needs human", "Held · sentinel" and "Sentinel alert · needs human" never ride a chevron any more — the lit chevron is the real stage with the amber outline — the scattered `sentinel` chip / `Approve ▸` / `Let hive decide ▸` are folded into the pill, secondary rows of a shared PR render no gate (their *decision pending on #N* chip links to the primary row), and a new `POST /api/repos/{owner}/{repo}/items/{number}/sentinel-confirm` endpoint gives a sentinel alert its own answer (hivecommons/hive#17470). From 6f78f44b5342d04b4a147df10352a808af412ce8 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 04:57:59 +0000 Subject: [PATCH 098/123] =?UTF-8?q?=F0=9F=8C=B1=20test(config):=20pin=20th?= =?UTF-8?q?e=20entrypoint's=20linked-config-path=20boot=20arm=20from=20#17?= =?UTF-8?q?471=20(#17517)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #17471 added an -ef guard to entrypoint.sh so a hosted spoke whose config path is a symlink to the PVC runtime config boots from it instead of falling into the read-only branch when cp refuses the same-file copy. The merged PR tested the init container that creates the link and Config.Save writing through it, but no prelude test seeded a symlinked config path, so the new arm was never executed by the suite that runs the real entrypoint prelude. runBootPreludeLinked extends the existing harness with root-relative symlinks; TestK8sLinkedConfigPathBootsFromRuntimeConfig asserts the links-to-it message, the absence of the read-only message, and that the link and runtime contents survive boot. With the -ef guard replaced by 'if false' the prelude logs 'config path read-only' and the test fails. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- src/pkg/config/entrypoint_boot_test.go | 54 ++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/pkg/config/entrypoint_boot_test.go b/src/pkg/config/entrypoint_boot_test.go index a4b2227535..7536b63d96 100644 --- a/src/pkg/config/entrypoint_boot_test.go +++ b/src/pkg/config/entrypoint_boot_test.go @@ -41,6 +41,16 @@ func runBootPreludeRO(t *testing.T, env map[string]string, files map[string]stri // test can inspect the FILES the prelude left behind (permissions, contents) // and not just what it logged. func runBootPreludeRoot(t *testing.T, env map[string]string, files map[string]string, readOnly []string) (string, string) { + t.Helper() + return runBootPreludeLinked(t, env, files, readOnly, nil) +} + +// runBootPreludeLinked is runBootPreludeRoot that also creates symlinks under +// the temp root before the prelude runs: links maps a root-relative link path +// to a root-relative target. It exists for the hosted-spoke layout (#17468), +// where the copy-config init container links the config path to the PVC +// runtime config and the two are one file. +func runBootPreludeLinked(t *testing.T, env map[string]string, files map[string]string, readOnly []string, links map[string]string) (string, string) { t.Helper() src, err := os.ReadFile(entrypointPath) if err != nil { @@ -70,6 +80,15 @@ func runBootPreludeRoot(t *testing.T, env map[string]string, files map[string]st t.Fatal(err) } } + for rel, target := range links { + p := filepath.Join(root, rel) + if err := os.MkdirAll(filepath.Dir(p), 0o755); err != nil { + t.Fatal(err) + } + if err := os.Symlink(filepath.Join(root, target), p); err != nil { + t.Fatal(err) + } + } // Rewrite the absolute paths onto the temp root. body := text[:end] body = strings.ReplaceAll(body, `"/data/`, `"`+root+`/data/`) @@ -209,6 +228,41 @@ func TestK8sBootsFromRuntimeConfigNotTheSeed(t *testing.T) { } } +// TestK8sLinkedConfigPathBootsFromRuntimeConfig pins the hosted-spoke steady +// state from #17468: the copy-config init container links the config path to +// the PVC runtime config, so the two are one file. Before the `-ef` guard, +// `cp` refused ("are the same file") and the boot fell into the read-only +// branch — exporting HIVE_CONFIG and logging "config path read-only" on a +// spoke whose config path was perfectly writable, which is the misleading +// message #17468 set out to remove. +func TestK8sLinkedConfigPathBootsFromRuntimeConfig(t *testing.T) { + out, root := runBootPreludeLinked(t, + map[string]string{"KUBERNETES_SERVICE_HOST": "10.0.0.1"}, + map[string]string{"data/hive.yaml.runtime": "acmm_level: 5\n"}, + nil, + map[string]string{"etc/hive/hive.yaml": "data/hive.yaml.runtime"}) + if !strings.Contains(out, "links to it") { + t.Fatalf("a config path linked to the runtime config was not recognised as the same file:\n%s", out) + } + if strings.Contains(out, "config path read-only") { + t.Fatalf("the linked config path was treated as read-only — cp refused the same-file copy and the -ef guard did not catch it (#17468):\n%s", out) + } + // The link is what makes operator edits to the config path durable, so + // the prelude must leave it in place, pointing at the persisted file. + cfgPath := filepath.Join(root, "etc/hive/hive.yaml") + runtimePath := filepath.Join(root, "data/hive.yaml.runtime") + target, err := os.Readlink(cfgPath) + if err != nil { + t.Fatalf("the prelude replaced the config-path symlink with a regular file; edits to it are lost on restart (#17468): %v\n%s", err, out) + } + if target != runtimePath { + t.Fatalf("config path links to %q after boot, want %q", target, runtimePath) + } + if b, _ := os.ReadFile(runtimePath); string(b) != "acmm_level: 5\n" { + t.Fatalf("runtime config was rewritten during boot; got %q", b) + } +} + // TestK8sLegacyBakStillBoots: ~48 of 51 live spokes still carry only the old // hive.yaml.bak name. They must keep booting while the rename rolls out. func TestK8sLegacyBakStillBoots(t *testing.T) { From 22cbe102f54e30d48e79f242b6c9dcc489787d43 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Tue, 10 Nov 2026 00:09:04 -0500 Subject: [PATCH 099/123] =?UTF-8?q?=F0=9F=90=9B=20dashboard:=20fold=20the?= =?UTF-8?q?=20human-gate=20verbs=20at=20render=20time;=20=E2=80=A6=20keeps?= =?UTF-8?q?=20its=2044px=20tap=20target=20(#17515)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 dashboard: fold the human-gate verbs at render time; … keeps its 44px tap target The merged pill (#17505) folded its verbs with CSS — display:none on the trailing verbs and an always-rendered hidden menu — which the mobile-shots acceptance rejects: tracker-header-geometry hit-tests every button in .ham-badges, and tracker-phone-ergonomics measured the … button at 28px because its tap-target rule used a child selector while the button sits inside .ham-gate-more-wrap. Now the row renders only the visible verbs (three on the strip tier, one plus … at ≤1100px via matchMedia, re-rendered on change); the overflow items wait in a