integration.cleanup
Plán úklidu, rozhodnutý offline ze zaznamenaného pozorování: každý otevřený pull request, který by úklid zavřel — redundantní (jeho práce už je na master) nebo nahrazený (deklarovaným nástupcem, který přistál) — a každý, který nechá člověku — možná redundantní (slabé důkazy) nebo zastaralý (člověk jej označil, rozhodnutí vlastníka D3) — každý s dispozicí a důvody, které rozhodly, v pořadí podle priority; vedle toho větve, které sloučené pull requesty nechaly na origin, tak jak je `majordomus prs cleanup` naposledy četl, s tím, kdy a jak dávno. Čtení: nic nezavírá, nemaže a na nic se forge neptá — `majordomus prs cleanup` čte forge a `--apply` zavírá. `observed: false` s důvodem, když tento checkout nezaznamenal žádné pozorování.
Plán úklidu, rozhodnutý offline ze zaznamenaného pozorování: každý otevřený pull request, který by úklid zavřel — redundantní (jeho práce už je na master) nebo nahrazený (deklarovaným nástupcem, který přistál) — a každý, který nechá člověku — možná redundantní (slabé důkazy) nebo zastaralý (člověk jej označil, rozhodnutí vlastníka D3) — každý s dispozicí a důvody, které rozhodly, v pořadí podle priority; vedle toho větve, které sloučené pull requesty nechaly na origin, tak jak je `majordomus prs cleanup` naposledy četl, s tím, kdy a jak dávno. Čtení: nic nezavírá, nemaže a na nic se forge neptá — `majordomus prs cleanup` čte forge a `--apply` zavírá. `observed: false` s důvodem, když tento checkout nezaznamenal žádné pozorování.
- query
- experimentální
- module integration
- #integration
- #pull-requests
- #cleanup
Zpřístupnění
Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.
| povrch | jako |
|---|---|
| MCP | nástroj majordomus_pull_requests_cleanup |
| HTTP | GET /api/v1/pull-requests/cleanup operationId integration.cleanup |
| příkazová řádka | — |
Schémata
Kanonický vstup a výstup z typů Rustu; schéma nástroje MCP a parametry a odpovědi OpenAPI se odvozují z nich.
vstup · Prázdné
Žádné vlastnosti: schopnost nebere žádný vstup.
JSON Schema
{
"additionalProperties": false,
"description": "No input.",
"title": "Empty",
"type": "object"
}výstup · IntegrationCleanup
prs cleanup zaznamenal.| vlastnost | typ | povinné | popis |
|---|---|---|---|
| branches | jedno ze 2 | ne | Větve, které sloučené pull requesty nechaly na originu, tak jak je naposledy přečetlo prs cleanup; None, když v tomto checkoutu nikdy neběželo. Zde se nikdy nečte ze sítě. |
| branches_age_seconds | integer | null | ne | Jak je tento report starý, v sekundách, když jeho čas lze přečíst. |
| položky | array | ano | Plán v pořadí podle priority: would_close pro to, co je prokazatelně na master nebo nahrazeno nástupcem, který přistál, left_for_a_person pro slabé důkazy a pro to, co člověk označil jako zastaralé. Nic zde nic neuzavírá. |
| pozorováno | boolean | ano | Zda je pozorování forge zaznamenáno v tomto checkoutu. |
| observed_at | string | null | ne | Kdy byl forge pozorován, kdy to bylo. |
| důvod | string | null | ne | Proč plán neexistuje, když neexistuje. |
JSON Schema
{
"$defs": {
"CleanupItem": {
"description": "What cleanup would do, or did, for one pull request.",
"properties": {
"action": {
"description": "`would_close`, `closed`, `left_for_a_person`, or `close_failed: <why>`.",
"type": "string"
},
"disposition": {
"$ref": "#/$defs/PullRequestDisposition",
"description": "Its disposition when decided."
},
"pr": {
"description": "The pull request.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"reasons": {
"description": "The evidence, as reason codes.",
"items": {
"description": "A reason code, `code` or `code:payload`, one of: `stacked_on:#N`, `base_is:BRANCH`, `draft`, `label:NAME`, `auto_merge_armed`, `merge_commit_not_allowed`, `merge_settings_unread`, `superseded_by:#N`, `successor_open:#N`, `successor_not_landed:#N`, `successor_unread:#N`, `head_reachable_from_master`, `merge_changes_nothing`, `patch_ids_upstream`, `only_derived_artifacts_differ`, `relation_unknown:WHY`, `conflicts_on:COUNT`, `depends_on:#N`, `review:STATE`, `review_policy_unread`, `required_check_failed`, `behind_master:COMMITS`, `fork_head`, `version_unallocated:VERSION`, `required_checks:STATE`, `no_required_checks`, `required_checks_unread`, `contains_master`, `carries_master`, `required_checks_passed`, `required_checks_skipped`, `executor_merge_refused:HEAD`, `executor_refresh_failed:MASTER`, `label_obsolete:NAME`, `dependency_cycle:#N`, `dependency_closed_unmerged:#N`, `dependency_unread:#N`, `declarations_unread`. A code outside this list (an older trail's) is carried verbatim.",
"type": "string"
},
"type": "array"
}
},
"required": [
"pr",
"disposition",
"reasons",
"action"
],
"type": "object"
},
"LeftBranch": {
"description": "A branch a merged pull request left on origin, as cleanup reports it. Reported, never\ndeleted: the forge's `delete_branch_on_merge` decides deletion (owner decision D4), so the\nexecutor holds no branch-deleting write at all.",
"properties": {
"action": {
"description": "`left_for_a_person`, or `kept: checked out at <path>` when a worktree of this\nrepository has the branch checked out: somebody may still be standing on it.",
"type": "string"
},
"branch": {
"description": "The branch on origin.",
"type": "string"
},
"merged_at": {
"description": "When that pull request merged.",
"type": "string"
},
"next_step": {
"description": "What would clear it, in the setting's own terms.",
"type": "string"
},
"pr": {
"description": "The pull request that merged it.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"tip": {
"description": "Its tip: the head that merged.",
"type": "string"
}
},
"required": [
"branch",
"tip",
"pr",
"merged_at",
"action",
"next_step"
],
"type": "object"
},
"LeftBranchReport": {
"description": "The last report of the branches merged pull requests left on origin, as `prs cleanup`\nread it. Written by `prs cleanup` alone — the one place that asks the forge for them —\nand rendered offline, with its age, by every surface that cannot reach the network.",
"properties": {
"base": {
"description": "The base the report excludes.",
"type": "string"
},
"branches": {
"description": "The branches, or `None` when origin or the merged pull requests could not be read:\nunread is not \"nothing left behind\".",
"items": {
"$ref": "#/$defs/LeftBranch"
},
"type": [
"array",
"null"
]
},
"delete_branch_on_merge": {
"description": "The forge's `delete_branch_on_merge`, from the observation; `None` when unread.",
"type": [
"boolean",
"null"
]
},
"read_at": {
"description": "When cleanup read origin and the merged pull requests.",
"type": "string"
},
"refreshed_by": {
"description": "The command that reads it afresh.",
"type": "string"
}
},
"required": [
"read_at",
"base",
"refreshed_by"
],
"type": "object"
},
"PullRequestDisposition": {
"description": "The one classification of an open pull request. Every value carries a machine-readable\nreason in `PullRequestAssessment::reasons`; there is no `mergeable: bool`.",
"oneOf": [
{
"const": "ready",
"description": "Contains the current master, every required check passed on its head, nothing\nblocks it: the executor may merge it.",
"type": "string"
},
{
"const": "needs_refresh",
"description": "Merges cleanly but does not contain master: the executor may bring master in (a\nmerge commit on the branch, never a rewrite), after which CI must run again.",
"type": "string"
},
{
"const": "waiting_for_checks",
"description": "Contains master; a required check has not finished on this head.",
"type": "string"
},
{
"const": "waiting_for_review",
"description": "A required review is missing or changes were requested.",
"type": "string"
},
{
"const": "waiting_for_dependency",
"description": "A declared dependency has not landed.",
"type": "string"
},
{
"const": "draft",
"description": "A draft.",
"type": "string"
},
{
"const": "needs_repair",
"description": "A required check failed on this head.",
"type": "string"
},
{
"const": "conflicting",
"description": "Conflicts on authored paths: a person resolves them.",
"type": "string"
},
{
"const": "blocked",
"description": "A label whose policy is to hold holds it, or the repository allows no merge commit,\nwhich is the only way the executor merges.",
"type": "string"
},
{
"const": "unsafe",
"description": "The forge has auto-merge armed on it: the forge would merge it on its own, outside the\nexecutor and against whatever master is then. Held until a person disarms it.",
"type": "string"
},
{
"const": "redundant",
"description": "Its head already landed, its merge changes nothing, or every one of its commits is on\nmaster as an equal patch: strong evidence from git, eligible for closure under policy.\n(Before 0.13 this was the word `superseded`.)",
"type": "string"
},
{
"const": "superseded",
"description": "A successor was declared for it by someone the repository lets declare one — an owner,\nmember or collaborator, in a pull request of this repository — and that successor\nlanded: git finds its head or its merge commit in master. The successor is\n`PullRequestAssessment::superseded_by`. Eligible for closure under policy.",
"type": "string"
},
{
"const": "possibly_redundant",
"description": "Weak evidence: only derived artifacts would change, or its declared successor was merged\nsomewhere master does not contain. Surfaced for a person; never closed automatically.",
"type": "string"
},
{
"const": "other_base",
"description": "Targets a branch other than the integration base.",
"type": "string"
},
{
"const": "unknown",
"description": "Something needed to decide could not be observed.",
"type": "string"
},
{
"const": "obsolete",
"description": "A person marked it obsolete with a label the label policy declares (owner decision\nD3): the only evidence that reaches this word. Listed for a person by cleanup and\nnever closed automatically; age, shared paths or a similar title never make one.",
"type": "string"
}
]
}
},
"description": "What cleanup would do, decided offline: the pull requests it would close or leave for a\nperson, from the recorded observation, and the last branch report `prs cleanup` recorded.",
"properties": {
"branches": {
"anyOf": [
{
"$ref": "#/$defs/LeftBranchReport"
},
{
"type": "null"
}
],
"description": "The branches merged pull requests left on origin, as `prs cleanup` last read them;\n`None` when it never ran in this checkout. Never read from the network here."
},
"branches_age_seconds": {
"description": "How old that report is, in seconds, when its time reads.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"items": {
"description": "The plan, in rank order: `would_close` for what is provably on master or superseded by\na successor that landed, `left_for_a_person` for weak evidence and for what a person\nmarked obsolete. Nothing here closes anything.",
"items": {
"$ref": "#/$defs/CleanupItem"
},
"type": "array"
},
"observed": {
"description": "Whether a forge observation is recorded in this checkout.",
"type": "boolean"
},
"observed_at": {
"description": "When the forge was observed, when it was.",
"type": [
"string",
"null"
]
},
"reason": {
"description": "Why there is no plan, when there is none.",
"type": [
"string",
"null"
]
}
},
"required": [
"observed",
"items"
],
"title": "IntegrationCleanup",
"type": "object"
}Politiky
- benchmark
- povinné — cíl na každém transportu, který expozice deklaruje; případy jsou ty ze vstupního typu
- cache
- vypnuto — každé volání spustí handler
Cíle benchmarku
Odvozeno z registru pro tento repozitář: jeden požadavek na transport a případy, které poskytuje typ vstupu. Celá matice je na stránce měření výkonu.