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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/added-19071-tracker-autoclose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- New opt-in `repos.<repo>.parent_autoclose: trackers_too` (also a fourth choice, "Also close trackers whose work is done", in Settings, Repos tab) closes tracker and umbrella issues that have no sub-issue children once everything they reference is finished. "Done" is computed from the state of the issues and PRs the tracker lists in its task list or `close_when` checklist, plus the PRs that reference it with `Refs`, never from close keywords, since v5 merges do not auto-close. Only issues that announce themselves as trackers are read, `hive/tracking` and `hold` issues never close, a person's reopen is final, and the close waits for the same finished evidence on two reads 15 minutes apart and leaves an evidence comment listing every reference and its state. Default behaviour is unchanged ([#19071](https://github.com/hivecommons/hive/issues/19071)).
5 changes: 3 additions & 2 deletions dashboard/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8320,7 +8320,7 @@
"System"
],
"summary": "Parent auto-close policy per repo",
"description": "Returns repos.<repo>.parent_autoclose for every monitored repo (effective value and whether the repo carries its own), the default, and the three options the Settings editor offers. Owner only.",
"description": "Returns repos.<repo>.parent_autoclose for every monitored repo (effective value and whether the repo carries its own), the default, and the four options the Settings editor offers. Owner only.",
"responses": {
"200": {
"description": "Current policy per monitored repo",
Expand Down Expand Up @@ -8356,7 +8356,7 @@
"System"
],
"summary": "Set a repo's parent auto-close policy",
"description": "Sets repos.<repo>.parent_autoclose for one monitored repo: true (close finished parents, the default and clears the override), epics_too (also close epic and hold parents) or false (never auto-close parents). Applies without a restart. Parents a person reopened and tracking issues are never auto-closed under any value. Audited as config_repo_parent_autoclose. Owner only.",
"description": "Sets repos.<repo>.parent_autoclose for one monitored repo: true (close finished parents, the default and clears the override), epics_too (also close epic and hold parents), trackers_too (as epics_too, and also close tracker or umbrella issues with no sub-issues once every PR and issue they reference is finished) or false (never auto-close parents). Applies without a restart. Parents a person reopened and tracking issues are never auto-closed under any value. Audited as config_repo_parent_autoclose. Owner only.",
"requestBody": {
"required": true,
"content": {
Expand All @@ -8376,6 +8376,7 @@
"enum": [
"true",
"epics_too",
"trackers_too",
"false"
]
}
Expand Down
4 changes: 2 additions & 2 deletions src/docs/api-reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f
| `GET` | `/api/config/reference-repos` | Owner only | `project.reference_repos` ([#18136](https://github.com/hivecommons/hive/issues/18136)): `reference_repos` (`{repo, write, write_token_file}` plus `derived_from` on a derived entry and, on every write entry, `credential_state`, `credential_reason` and `credential_login`, the GitHub account the writes appear under ([#18197](https://github.com/hivecommons/hive/issues/18197)), plus `credential_identity` (`bot`, `owner` or `token_file`) and `credential_note`, the one-line why ([#18516](https://github.com/hivecommons/hive/issues/18516)); always an array), `write_kinds`, `write_identity` (`project.remote_write_identity` with the default applied), `write_identities` and `bot_login` (the App bot login, when known) | `pkg/dashboard/api.go:557` |
| `PUT` | `/api/config/reference-repos` | Owner only | Replace `project.reference_repos`; `{"reference_repos": []}` clears it. Refused with a 400 and nothing changed when the config loader would reject the list (bare name, repo also in `project.repos`, duplicate, unknown write kind, token file without write) or when a write entry has no credential boot would accept — the same message boot exits 22 with — or when an entry carries a `write_token_file` the config file does not already hold for that repo (the path is operator-only; a dashboard write opt-in writes as the hive owner's connected GitHub account). Entries with `derived_from` ([#18139](https://github.com/hivecommons/hive/issues/18139)) are the request issue's grant: echo them back as served; changing one's write set, leaving one out, sending one the hive did not derive or adding a hand-written entry for the same repo is a 409 naming the issue to change instead ([#18161](https://github.com/hivecommons/hive/issues/18161)). They are never stored: the saved list holds the hand-written entries and the derived set is merged back in memory after the save. 500 when the file could not be written (proxy restored, nothing changed). On success the GitHub proxy's reference policies are replaced without a restart; audited as `config_reference_repos` | `pkg/dashboard/api.go:558` |
| `PUT` | `/api/config/reference-repos/write-identity` | Owner only | Set `project.remote_write_identity` ([#18516](https://github.com/hivecommons/hive/issues/18516)): body `{"write_identity": "bot"}`, one of `bot`, `bot_only`, `owner`. 400 on an unknown value, or when a hand-written write entry would have no credential under the new value (the message boot exits 22 with); nothing is stored then. 500 when the file could not be written. On success the reference repos are re-resolved before the response, which is the same body as `GET /api/config/reference-repos`; audited as `config_remote_write_identity` with `previous` and `write_identity` | `pkg/dashboard/api.go:563` |
| `GET` | `/api/config/repos/parent-autoclose` | Owner only | `repos.<repo>.parent_autoclose` for every monitored repo: the effective value (`true`, `epics_too` or `false`), whether the repo carries its own, the default and the three options the Settings editor offers ([#19070](https://github.com/hivecommons/hive/issues/19070)) | `pkg/dashboard/api.go:560` |
| `PUT` | `/api/config/repos/parent-autoclose` | Owner only | Set one monitored repo's parent auto-close policy: `{"repo": "owner/name", "value": "true" \| "epics_too" \| "false"}`. `true` is the default and clears the override. 400 for a missing repo or an invalid value, 404 for a repo that is not monitored, 500 when the file could not be written (previous value restored). Applies without a restart; audited as `config_repo_parent_autoclose`. Parents a person reopened and tracking issues are never auto-closed under any value | `pkg/dashboard/api.go:561` |
| `GET` | `/api/config/repos/parent-autoclose` | Owner only | `repos.<repo>.parent_autoclose` for every monitored repo: the effective value (`true`, `epics_too`, `trackers_too` or `false`), whether the repo carries its own, the default and the four options the Settings editor offers ([#19070](https://github.com/hivecommons/hive/issues/19070)) | `pkg/dashboard/api.go:560` |
| `PUT` | `/api/config/repos/parent-autoclose` | Owner only | Set one monitored repo's parent auto-close policy: `{"repo": "owner/name", "value": "true" \| "epics_too" \| "trackers_too" \| "false"}`. `true` is the default and clears the override. 400 for a missing repo or an invalid value, 404 for a repo that is not monitored, 500 when the file could not be written (previous value restored). Applies without a restart; audited as `config_repo_parent_autoclose`. Parents a person reopened and tracking issues are never auto-closed under any value | `pkg/dashboard/api.go:561` |
| `GET` | `/api/config/prompt-sources` | Owner only | Repo-sourced prompt and definition gate ([#18490](https://github.com/hivecommons/hive/issues/18490)): `repos` (one row per managed repo, then any owner approval whose repo is no longer managed, each `{repo, managed, owner_approved, seed_allowed, allowed, approved_by, approved_at}`), `seed_enabled`, `seed_allowlist`, `trust_notice`, `seed_only_note` | `pkg/dashboard/api.go:572` |
| `PUT` | `/api/config/prompt-sources/owner-repos` | Owner only | `{"repo": "org/name", "allowed": true, "acknowledge_trust": true}` approves one of the hive's managed repos as a `prompt_source` / `definition_source` repo; `"allowed": false` revokes. 400 with nothing changed for a repo outside `project.repos` (still needs the seed edit), a malformed slug, or an approval without `acknowledge_trust: true`. Persisted to `variables.security.owner_github_prompt_repos` in the running config; audited as `config_prompt_source_repo`. Responds with the GET body | `pkg/dashboard/api.go:573` |
| `GET` | `/api/config/review` | Dashboard auth/session | Review Config Get | `pkg/dashboard/api.go:218` |
Expand Down
38 changes: 37 additions & 1 deletion src/docs/labels-and-control-signals/stage-labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ Per repo, `repos.<repo>.parent_autoclose` chooses the policy:
|---|---|
| `true` (default) | close a decomposed parent when all children are closed, except `epic`/`hold`-labelled issues |
| `epics_too` | also close `epic`/`hold`-labelled parents |
| `trackers_too` | `epics_too`, and also close tracker/umbrella issues that have no sub-issue children once everything they reference is finished (below) |
| `false` | never auto-close a parent in this repo |

```yaml
Expand All @@ -724,14 +725,49 @@ repos:

You can also set it without editing YAML: Settings, Repos tab, "Parent auto-close"
(owner only). Each monitored repo has a choice of "Close finished parents
(default)", "Also close epics and holds" and "Never auto-close parents"; saving
(default)", "Also close epics and holds", "Also close trackers whose work is done" and "Never auto-close parents"; saving
applies it without a restart and is recorded in the audit log. Issues marked as
tracking issues (`hive/tracking`, the `<!-- hive:tracking -->` marker, or "Keep
this issue open") are never auto-closed under any value.

The dashboard does not yet show a "kept open: reopened by <login>" pill; the
kept-open decision is logged (`decomposed parent kept open`).

**Trackers and umbrellas with no sub-issues (`trackers_too`).** Many umbrella and
audit trackers are not decomposed parents: they have no sub-issue children and
are referenced by `Refs`-only PRs. Under v5 a merge never closes an issue, so
with `repos.<repo>.parent_autoclose: trackers_too` the sweep computes "done"
from the state of what the tracker references, never from close keywords. It is
off unless you choose it, and nothing changes for any other value.

- *Which issues are read.* Only an issue that announces itself as a tracker: one
the shared umbrella classifier recognises (`umbrella`, `tracker`, `epic` or
`meta-tracker` label, the `<!-- hive:umbrella -->` marker, a `[Tracker]`-style
title prefix, or a task list of two or more issue references; see
`hub.contribute_umbrella`), an `audit` or `roadmap` label, or a `close_when`
checklist. A design or feature issue that merely has `Refs` PRs is never
closed this way, because a `Refs` PR is partial work by definition.
- *The reference set.* With a `close_when` heading (or `close_when:` line) in the
body, the checklist under it is the whole set: the tracker is done when every
item is ticked or, for an item naming an issue or PR, closed. Otherwise the set
is every task-list item that names an issue or PR plus every PR that
references the tracker with `Refs`, a closing keyword or `Part of`. The tracker
is done when that set is non-empty, every PR in it is merged or closed and
every issue in it is closed.
- *Safety.* `hive/tracking` issues (label, `<!-- hive:tracking -->` marker, "Keep
this issue open") and `hold`-labelled issues are never closed, even though
`trackers_too` implies `epics_too`. A tracker a person reopened after a hive
auto-close is never closed again. An unreadable reference or timeline, or more
than 50 references, means no close. Reads are cached per tracker, and the close
needs the same finished evidence on two fresh reads 15 minutes apart, so a
tracker is not closed between two PRs landing.
- *Audit.* Before closing, the hive posts one comment (carrying
`<!-- hive:parent-autoclose -->`) listing every referenced issue and PR with
its state, then closes the tracker as completed. Reopening it is final.

Closing done-but-open issues that sit in `stage/040-covered-by-pr` when the
covering PR merges is not part of this rule.

### `stage/stalled` — "nobody is working this"

On a PR, `stage/stalled` means **no activity by anyone but the hive for the
Expand Down
1 change: 1 addition & 0 deletions src/docs/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ without a class. Review submissions and review requests are always counted as
| `github.(*Client).PostIssueNote` | `status` | passthrough wrapper (issue status card, `attention_pilot`); attributed to its caller |
| `github.(*Client).PostInformationalIssueNote` | `status` | passthrough wrapper (issue status card in quiet mode or under `attention_pilot`, for notes nobody acts on); attributed to its caller |
| `github.(*Client).closeDecomposedParent` | `status` | |
| `github.(*Client).closeDoneTracker` | `status` | |
| `github.(*Client).closeIssueForMergedPRClaimWithIssue` | `status` | |
| `github.(*Client).closeSupersededPRDecision` | `status` | |
| `github.(*Client).fileReviewBacklog` | `status` | |
Expand Down
2 changes: 1 addition & 1 deletion src/docs/operator-reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Go callers keep reading `cfg.Agents`, `cfg.Governor.Gateways` and so on through
| `governor.trajectory.enabled` | Defaults to enabled. | The lane no-ops until a reviewer endpoint and model resolve from `governor.trajectory` or `governor.litellm`. |
| `governor.kick_limits.max_issues` / `max_prs` | `100` / `50` | Caps on every issue list and every PR list (actionable, stale drafts, merge-eligible, CI-failing) rendered into a kick prompt; a cut list ends with an explicit "… and N more" line. An absent key or a negative value means the default; an explicit `0` opts out of the cap entirely (`KickListUnlimited` — every item is listed), and anything above `500` is pinned to `500`. Editable without touching this file under **Settings → Repos → Kick prompt list caps**. Truncation drops the *newest, lowest-priority* items: issues are listed oldest first, and PRs in review-priority order (fixes, then refactors/docs, then tests, oldest first within each class), so lowering a cap never hides the most urgent work. Raise `max_prs` only if your agents actually work more than 50 PRs per turn; the tail of a long list costs tokens and delivery time on every kick without changing behaviour (#7368). |
| `project.agents_md_max_bytes` | `32768` (or env `HIVE_AGENTS_MD_MAX_BYTES`); clamped to `2048`..`262144`. `repos.<repo>.agents_md_max_bytes` overrides it per repo. | Caps the repo `AGENTS.md` block prepended to a kick. Whole sections (split at `#`/`##` headings; each resolved skill is its own unit) are kept or dropped, never clipped mid-rule; when any are dropped the kick carries a one-line `⚠️ AGENTS.md exceeded N bytes; … — read AGENTS.md …` warning naming them and the scheduler logs it. See [agents-md.md](../agents-md.md#size-cap-whole-sections-visible-warning). |
| `repos.<repo>.parent_autoclose` | `true` (default), `epics_too` or `false` | Decomposed-parent auto-close policy for the repo: `true` closes a parent when every child is closed except `epic`/`hold`-labelled issues; `epics_too` also closes those; `false` never closes a parent. A parent a person reopened after a hive auto-close is never re-closed under any value. Editable in Settings, Repos tab, Parent auto-close (owner only; applies without a restart). See [stage-labels.md](../labels-and-control-signals/stage-labels.md#decomposed-parents--closed-by-their-children-never-stalled). |
| `repos.<repo>.parent_autoclose` | `true` (default), `epics_too`, `trackers_too` or `false` | Decomposed-parent auto-close policy for the repo: `true` closes a parent when every child is closed except `epic`/`hold`-labelled issues; `epics_too` also closes those; `trackers_too` does that and also closes tracker/umbrella issues with no sub-issues once everything they reference is finished; `false` never closes a parent. A parent a person reopened after a hive auto-close is never re-closed under any value. Editable in Settings, Repos tab, Parent auto-close (owner only; applies without a restart). See [stage-labels.md](../labels-and-control-signals/stage-labels.md#decomposed-parents--closed-by-their-children-never-stalled). |
| `project.style` | unset (built-in text applies) | Hive-wide **house style**: a short how-to-change rule list prepended to every kick on every backend, directly under the header. A managed repo's root `HIVE_STYLE.md` (read from `project.checkouts_dir`) overrides it; precedence repo > hive > built-in. Inline text wins over `project.style_file`. See [house-style.md](../house-style.md). |
| `project.style_file` | unset | Path on the hive host holding the hive-wide house style; used when `project.style` is empty. |
| `project.style_max_bytes` | `4096`; values under `512` are raised to `512`. | Caps each house-style candidate. An oversize candidate is skipped whole (not clipped) and the next source applies; the skip is audited as `house_style_skip`. The repo file is also run through ioscan at the issue-body policy and refused whole on a block. |
Expand Down
2 changes: 1 addition & 1 deletion src/docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Which labels hold, require, or route work, the label the merger queue applies to

The repos the hive manages and the caps on how many issues and PRs are listed in one kick (`governor.kick_limits`). See the `governor.kick_limits` row of the [notable fields](operator-reference.md#notable-fields).

The same tab has a **Parent auto-close** card (owner only, `repos.<key>.parent_autoclose`): per monitored repo, choose "Close finished parents (default)", "Also close epics and holds" or "Never auto-close parents". It shows the effective value for each repo, applies on save without a restart, and is audited. A parent a person reopened is never re-closed, and issues marked as tracking issues are never auto-closed. See [stage-labels](labels-and-control-signals/stage-labels.md#decomposed-parents--closed-by-their-children-never-stalled).
The same tab has a **Parent auto-close** card (owner only, `repos.<key>.parent_autoclose`): per monitored repo, choose "Close finished parents (default)", "Also close epics and holds", "Also close trackers whose work is done" or "Never auto-close parents". It shows the effective value for each repo, applies on save without a restart, and is audited. A parent a person reopened is never re-closed, and issues marked as tracking issues are never auto-closed. See [stage-labels](labels-and-control-signals/stage-labels.md#decomposed-parents--closed-by-their-children-never-stalled).

## Budget

Expand Down
Loading
Loading