Skip to content

Latest commit

 

History

History
221 lines (195 loc) · 46.7 KB

github-status.md

File metadata and controls

221 lines (195 loc) · 46.7 KB

GitHub and GitLab status in a Workspace row

  • Code: hide-core/src/github.rs, hide-host/src/gh.rs, hide-core/src/gitlab.rs, hide-node-link/src/glab.rs, hide-core/src/runtime/github_poll.rs, web/src/githubLook.ts, web/src/prMark.ts, hide-core/src/agent_state/work/board.rs
  • Index: status-model.md

GitHub status in the Workspace row

The PR icon is independent of agent status and Workspace disclosure. It appears for a known pull request, an in-progress first lookup, or a GitHub lookup failure; a successful lookup with no matching PR leaves it absent. A pull request restored from the previous run draws as soon as its checkout row exists. Clicking opens details without selecting a pane, marking agents read, or folding the Workspace. The popover shows the PR number, title, Open/Draft/Merged/Closed state, head and base branches, and CI rollup. Its refresh action reloads one repository; its external action opens the PR URL through the existing external browser route.

The core reads GitHub for every registered local Git project from the moment a window attaches to the daemon (the reader sits in the coordinator's UI-attached block, so a daemon with no window reads nothing), whether or not Overview, the palette or any other screen was opened; a device's project and a plain folder are not read. A project's status is read once when a window first attaches, again five minutes after its last answer, or sooner when that read failed to get the project's pull requests or its issues (Runtime::reread_stale_github, with the clock passed in so a test advances it without sleeping; a project whose ask is unanswered is not asked again, so a slow pass is never overtaken by the next), and on an explicit refresh, which advances that repository's generation. When the operator looks at a project, the web shell sends github_request with look (the window gains focus or becomes visible, and a project is brought to the front; web/src/githubLook.ts), and the core reads that project again when its last answer worked and is at least 30 seconds old (Runtime::read_when_looked_at, GITHUB_LOOK_AFTER, the clock passed in), so a project the operator comes back to does not wait out the five minutes. A look is the stale re-read's ask and nothing more: it asks nothing while an ask is outstanding, for a project in failure backoff, one whose last read missed its pull requests, or one answered "no GitHub remote"; it never sets loading; it is honored only for the local Git project in front, and a look the core does not honor is silent (no error, no frame); a request that names refresh is a refresh whether or not it names look. While a window is attached, an advisory poll asks GitHub whether anything behind the marks changed, every 15 seconds for the project in front and once a minute for each other one, and only says so (crate::github_poll, Runtime::ask_polled_changes). It watches the projects whose last read worked and holds an open pull request, and the project in front even with none open, by the repository its read named, so a pull request opened elsewhere shows within the minute (PRD git-freshness D-10); the project in front first and at most eight (a count past that is written as poll.over_limit when it changes): the repository's open pull request list, and the check runs and commit status of the head commit of up to four open pull requests whose checks had not finished (PullRequestSnapshot::checks_unfinished: pending, or failed while a workflow run or check on the head still runs, the rule a mission's ci line and its CI letter wait on), each by a conditional gh api read with the entity tag it last saw; a 304 means unchanged and costs no rate limit, and a tag seen for the first time is a baseline, not a change. The check runs and the status of such a head commit are read the same way: a different tag only makes the poll read what the list adds up to (passing, pending, failed, by the rule the mark uses, GitHub Actions' runs read as Checks of a head commit says) and whether anything on it still runs, and it counts a change only when that combined result or whether something runs, over the check runs and the status together, differs from the last one. One job of many finishing asks nothing; the last one finishing, a failure, or the last run ending behind a failure asks one read within the poll's interval for that project; another app's check or a status still running behind a failure of its own list is left to the five-minute read. The open list moves its tag for a comment, a label, a review or a new updated_at as well, so a different tag there is not enough: the poll then reads one digest of the list (each pull request's number, head commit and draft flag, gh api --jq) and counts it a change only when that digest differs from the last one, which a pull request opened, merged or closed, a push, or a draft flip does. A comment, a label, a review or an updated_at alone is left to the five-minute read and to a look. A change is asked for through the look rule above without its thirty seconds, since an answer that just landed may predate the change GitHub reported and the poll's interval already bounds how often it asks; it never overtakes an ask, a failure backoff or a repository with no GitHub remote, and never sets loading; the poll writes no pull request state and never touches the five-minute clock or its backoff. A failure of the poll (no gh, no login, the network, a reply it cannot read) pauses that project alone, 60 seconds and twice as long each time up to 15 minutes, and is written once per kind as poll.failed; the reason shows nothing on screen (design principle 13). With fewer than a tenth of the account's requests left, nothing is polled until x-ratelimit-reset (poll.rate_floor). A project the poll is not watching, paused or under the floor, has its GitHub status marked stale as after a failed read (Runtime::note_poll_held), so its marks dim with GitHub 읽기 실패 · N분 전 값 until its next read answers (PRD git-freshness B23). A change in the first interval after a project's baseline is read only by the five-minute clock, because the poll has no earlier tag to compare it with. A local agent's session that prints the address of a pull request the last answer does not hold asks for its project as well, so a pull request an agent opens reaches its row when the label worker next reads that session (its turn ending, at the latest) rather than up to five minutes later (Runtime::read_sighted_pull_requests). The project is the one whose pull requests are in that repository, else the printing pane's project when none of its pull requests names another repository, so a repository's first pull request is found and a fork's checkout whose agent opens a pull request upstream is not read for it; an address no read project owns is written to the diagnostic log as read.sighted_unowned and nothing more. The sighting keeps the rule above: a project whose last read worked and has nothing asked since is asked at once and its clock waits for that answer; a project with any ask outstanding (a read in flight, its first read, a refresh, or an answer the clock has not taken yet) is not asked again, and is read once more after that answer lands only if the answer does not hold the pull request and the sighting is still under fifteen minutes old; a project whose last read failed to get its pull requests is left to its own retry, and one that got them and missed only its issues is asked as one that worked. The read is quiet: unlike a refresh from the menu or the popover, it does not set loading, so the row keeps what it shows until the answer moves it. Each address sets off this once while its sighting is under fifteen minutes old, so an address the read still does not return (another repository, or past the newest 200) is not asked for again; a sighting older than that sets off nothing, and an address an answer holds stops being remembered. At most 64 addresses that a project owns are remembered at once, and one past that is not read and is written as read.sighted_over_limit; the label worker keeps at most 32 sightings between two hand-offs, the newest, and a read that finds more writes read.sighted_capped with how many it dropped; each owned address it remembers writes read.sighted with the projects read now and those waiting for an answer, both empty when every one of them is in failure backoff. A repository with no GitHub remote is an answer, not a failure: when the remotes its node read with the catalog's path facts name no repository gh could read, the reader answers "no GitHub remote" (failure_category no_github_remote, neither stale nor an unavailable_reason) with no gh call and the screen draws no GitHub state for it; a gh that says the same for a repository whose remotes the node could not read (an older node, a config that includes another file, a remote URL in a form the node does not read such as http://) or that are not GitHub's gives the same answer. A device project whose origin its node reads as naming no GitHub repository gets the same answer (available, no unavailable_reason), so its checkout cards draw nothing for it either. When the node read its remotes, its clock (GithubClock::NoRemote) never asks again on its own: the next read comes when the catalog's remotes for that repository change, written as read.remotes_changed, or on an explicit refresh; before, each read ran gh pr list twice to learn that and was retried every five minutes forever. When the node could not, gh's answer is asked again five minutes later, since a remote can be added where the node does not look. A failed read (one that did not get the project's pull requests or its issues, whatever the reason: GithubProjectSnapshot::read_outcome) is asked again after 30 seconds, then 60, 120 and 240, and from the fifth failure in a row every five minutes; the first read that works starts the count over, and another project's clock is untouched: the reader hands back its cached entry for every project in a request, so an answer counts for a project only when that project's generation moved since its last answer. The previous answer stays drawn while a retry waits, and nothing new is shown for it: the row keeps its muted stale state (design principle 13), and each retry writes one github read.retry diagnostic with the project, the attempt and the delay. The failure count lives in the clock (GithubClock), not in a second delay, and a project is asked again only after its previous ask answered, so at most 64 projects each cost one read per 30 seconds in the worst case and an outage backs every one of them off to the five-minute pace within four retries. At most 64 local Git projects are read: the project in front first, then the ones a screen named with github_request or overview_refresh, then the rest in path order; a count past that is stated in the diagnostic log as projects.over_limit each time it changes and the ones left out show no PR icon. Every project shares GithubReader, its per-project cache, one active worker and coalesced pending requests. Each gh command runs on the core's own node (hide-host/src/gh.rs), where the operator's GitHub login is, under its 15-second limit; the core sends the command line as a gh call, the node refuses any line hide_node_link::gh::allowed does not name without running it, and the core parses what it answers. The last successful answer of every project is kept in github-snapshot.json in the state folder (hide_kit::layout::github_snapshot, written by github_store.rs) and restored when the daemon starts, so the first frame already draws it; the file also keeps what the wire leaves out of a pull request (its head commit, its repository and its closed time), because a settled pull request reconnects to its worktree only at that commit. A restored answer is stale until a read replaces it: stale is set and last_success_at_unix_ms stays the time of the read that produced it, so the icon is muted and the popover says how old it is. A file that cannot be read, decoded or is of another schema version is not used and is named in the diagnostic log as snapshot.discarded; the next answer replaces it. loading is true only for a project with no answer to show whose first read has not yet answered; a project the reader answers nothing for is not loading either, and a project with a restored or earlier answer is loading only while an explicit refresh of it is in flight. A project's pull requests are two gh pr list calls asked for at the same time, each under the 15-second limit: the 200 newest pull requests of any state without statusCheckRollup (with headRefOid, isCrossRepository, createdAt, closedAt, author, mergeStateStatus and reviewRequests), and the open ones with number,statusCheckRollup only, whose GitHub Actions jobs are judged by their workflow runs (Checks of a head commit). The rest of a project's read is asked beside that list rather than after it: the repository's name and the issues (their open and closed lists at the same time) start with the pull requests, and the review asks and the merge queue facts start together once the list has answered, so the issues no longer hold a merged pull request's state back by as long again. The same open-check rollup also supplies optional PullRequestWork.check_counts: total, passed, failed, running, waiting, skipped and unknown, each check counted once. Completed success is passed; neutral and skipped remain skipped; failure conclusions are failed; active CheckRuns are running, queued CheckRuns waiting, and an unread or unfamiliar state unknown. Legacy StatusContexts keep SUCCESS, FAILURE/ERROR, PENDING and EXPECTED distinct; an absent rollup stays unknown while an explicitly empty rollup has zero checks. This adds no GitHub read or polling clock and leaves the existing merge eligibility calculation unchanged. The PR list (below) adds three reads to the same generation: the signed-in login (gh api user --jq .login, once per read of all projects, right after auth status), the open pull requests the account was asked to review (gh pr list --search review-requested:@me, numbers only), and one GraphQL query for each open pull request's place in the merge queue, its last ten review requests with whom each named, each reviewer's latest review (latestOpinionatedReviews and latestReviews, the first 20 of each, totalCount for the rest) and the approvals its base branch's classic protection asks for (HidePrFacts). With that query, for each base branch of the open pull requests GitHub reports a review decision for (at most four, the newest pull requests' bases first; more is one pull_requests.approval_bases_capped diagnostic naming the repository and the count), one REST read of the approvals its ruleset rules ask for (gh api --jq … repos/<repo>/rules/branches/<base>, readable with read access; hide_node_link::gh::required_approvals_arguments); a failed one leaves that base's count unknown and writes one pull_requests.approvals_unread diagnostic, with nothing on screen (PRD pr-review-status B11). From those the core gives each open pull request the query covers PullRequestWork.reviewers (login or team slug, state and time, at most 20, the rest counted in reviewers_more) and required_approvals (PRD pr-review-status D-07, D-08, D-12, D-13): an approval, a change request or a dismissal stands over a later comment, a reviewer with only comments is commented, a pending review is not read, and a review still asked of someone (reviewRequests, the user's or the team's) makes them requested whatever they said before, with the time of their last ask; required_approvals is the larger of the ruleset count and the classic count, drawn only when the base's rulesets were read (a failed read or a base past the cap leaves it unknown, because the classic count alone may be the smaller), kept only while GitHub's review decision is present and the count is at least one, because a 0 while GitHub still decides by review means the rule that asks is one this account cannot read. reviewers is None (unknown, drawn as nothing) while the query has not answered for the pull request and on settled pull requests; GitHub's review decision alone says whether review still blocks, and model::PrState::of does not read the reviewers. The pull request list alone decides whether a project's read succeeds (issue #1189, which replaces PRD work-tab-pr-lens D-25's rule that any of the three failing failed the read). A gh older than hide_node_link::gh::MINIMUM_VERSION (2.72.0, the first that knows every field and flag of the allowed command lines) and gh auth status --active failing are still the machine's refusal and fail every project's read (only the account in use is asked, since a plain auth status fails when any other stored account's token has lapsed): each pass asks gh --version before auth status, and an older release is the outdated failure category, named in the reason with both versions, so it reads as one state to fix rather than as the first field it refused (gh 2.58.0 refused closingIssuesReferences and failed every pull request read of that machine). A --version that fails or prints no release (an unversioned build's DEV) is written as gh.version_unread and the pass goes on to auth status, which names a missing gh or a lapsed login as before. The rust lane runs every allowed command line against that release, offline (hide-host/src/gh.rs, every_command_line_parses_on_the_oldest_gh_hide_supports), so a field or flag a newer gh added fails there until the minimum moves with it. When the pull request list fails and the issues answered, the project keeps those issues and the repository's identity (GithubProjectSnapshot::repository, read on its own, so a failed issue read keeps it too) beside the failed status, and its previous pull requests stay as stale (keep_previous_reads): a mission admits a worker on another machine by that identity, and a refused list once took it away. An identity the pass could not read keeps the one read before only on the evidence docs/ARCHITECTURE.md, Code hosts, names. Each of the three is asked and judged on its own, and one that fails leaves the judgments derived from it unknown on every pull request, never "no": the login makes mine (Option<bool>, None when unknown), the review search with the login and the request list makes asked_of_me (ReviewAsk::Unknown), and the GraphQL query makes the queue place (MergeQueuePlace::Unknown), the time of the last review request and the reviewers (None). What the list alone settles stays settled: a request naming the login is a direct ask without the search, and a request list with nobody who could be the operator or their team (any request when the login is unknown, a team's request when it is known) was asked of neither. The read is a success with the failed questions named in the project's status (unread_queries: account, review_requests, merge_queue, and reviews beside merge_queue whenever the facts query fails), so the status is not stale and the list is current; each failure writes one github pull_requests.extra_unread diagnostic with the question and gh's words, which the operator never sees. A project that keeps its last list because a later read failed keeps the names of the unanswered questions that list was read with. The re-read clock treats the read as answered: the list is current, and a question that fails every time (a GitHub Enterprise Server without the queue fields, a token too narrow for the search) costs two calls each normal interval rather than slowing the list. Asking for the checks of every merged and closed pull request made one read take 11 - 14 seconds, so a settled pull request's checks are not asked for again: the checks read for the same number and head commit while it was open stay in the reader's cache, and without them its checks are Unknown, drawn as no mark. The one exception is a pull request that settled in the last 15 minutes with checks last read pending or failed: a rerun can pass and the pull request merge between two reads, so each read asks its head commit's check runs, workflow runs and status again (the same reads the advisory poll makes), at most four such pull requests per read, the latest settled first, and takes a passing, pending or failed answer; any other answer or a failed read keeps the remembered checks and goes to the diagnostic log (github.rs::recheck_settled). Either call failing fails the project's read, which keeps the last answer and states the failure, so half an answer is never a repository with no pull requests; pull_requests.ok, pull_requests.empty and pull_requests.failed carry the read's duration_ms. Which pull request belongs to a checkout is one rule (github::belongs_to_checkout, chosen by pull_request_for_checkout), because a branch name is used again for new work: a pull request from a fork never belongs to a local branch of the same name, an open one belongs to the checkout on its head branch, and a merged or closed one only while the checkout's commit (the worktree reader's head_sha, or, before that reader has answered, the commit Repository::head_oid read from the repository's own files with no process) is exactly the pull request's head commit on that branch; a checkout that was amended, rebased or left behind after the last push therefore loses its merged pull request. Several candidates resolve open, then merged, then closed, the most recently updated first among equals, and a checkout whose commit is not read yet takes no settled pull request. The sidebar row, the worktree catalog, the agent rows' PR mark and the link and hand-off actions all ask that rule, and a catalog read that moves a HEAD decides the connection again. The PR list and a worktree's base still list one pull request per head branch (preferred_per_branch). The same generation also reads open issues, their Project Status, and PR closing references for Project Home. A token without read:project, or a GitHub Enterprise Server with no Projects, refuses an issue read's Project Status while it answers the rest; the read is asked again without it, and it is a success: the status names no failure, and its pull_requests.ok or pull_requests.empty diagnostic carries gh's refusal as its warning. Such a refusal, recognized by gh's own words for the two (github::projects_refused), is remembered for the signed-in token as gh auth status names it, so every later read asks without the Project Status at once until the token changes (gh auth refresh -s read:project, another login), and one project_metadata.unavailable diagnostic is written when it is learned; a refusal for any other reason, such as the network, is asked again on the next read. The issue list uses sort:updated-desc and reads one sentinel beyond the 200-issue display cap so overflow is based on evidence. Issue references accept a GitHub issue URL, owner/repo#N, or #N when the repository is known; unsupported hosts and malformed references are rejected. A failed component read retains that component's last successful answer, including a successfully empty answer, while a successful PR read still advances if issue reading fails. Hide stores no new credentials and runs no subprocess or file write under the runtime mutex; the five-minute ask is a comparison on the coordinator's existing wake, and the file is written by its own thread from an owned copy. The project request event, result status and PR fields travel through revisioned rest; presentation reads that snapshot only.

GitHub checks UI
Every reported check succeeded, was neutral, or was skipped Passing, green
Any failure, error, cancellation, timeout, or required action Failing, red
At least one running, queued, waiting, pending, or requested check, with no failure Running, yellow
An explicitly empty check list No checks, gray
Absent check data, an unknown check kind, an unrecognized terminal result, or a merged or closed pull request whose checks were never read while it was open Unknown, no mark

Failure takes precedence over pending, then unknown, then passing. A failed refresh preserves the last known PR and reports the lookup failure and last successful read time. The visible stale notice qualifies both PR state and CI; old green checks are not presented as a fresh result. Missing gh, logged-out authentication, network errors and rate limits use the reader's existing categorized diagnostics and user-facing reason.

The sidebar tree projection additionally indexes physical pane ownership when forming root rows and direct-select candidates. This is linear in the visited project panes and agent projection per recomputation, with no queue or asynchronous work; repeated hover values do not trigger it.

Checks of a head commit

The checks a pull request's mark and a mission's ci line show are what its head commit's checks add up to: a failure first, then anything unfinished, then anything unrecognised, then a pass (github::runs::worse). Another app's check runs and the commit's legacy statuses count one by one, from the open list's rollup. GitHub Actions' jobs do not: GitHub lists every run's jobs on a commit under the same names, a cancelled run's closing job reads failed, and a run queued before its first job is not listed at all, so a pull request whose first run was cancelled read failed beside a replacement that passed (with-hide/hide-private#546), and one whose replacement had not made its jobs yet read passing (with-hide/hide-private#394). Each workflow is judged by its runs instead, read as check suites by one fixed GraphQL query for up to 50 head commits (HideHeadRuns, hide_node_link::gh::head_runs_query), after the open list answers and the repository's name is known: a run still queued or running keeps its workflow pending; otherwise the run that finished last (its suite's updatedAt) decides, a cancelled run is left out, and a workflow whose every run was cancelled failed. Only runs the pull request or a push started count (pull_request* and push events), which are the runs GitHub's own pull request checks list; a run started by hand or on a schedule on the same commit is someone else's. A pull_request_target run that never started (STARTUP_FAILURE) does not count either: it runs the base branch's workflow file, so what stopped it, that file or an Actions policy such as the block GitHub puts on the event in a public repository from 2026-12-02, is the repository's to change and not the pull request's, and GitHub's checks list does not show it; every open pull request read failed while with-hide/hide's contribution gate was blocked that way. A pull_request or push run that never started still fails, since the pull request's own workflow file can be what broke. A commit with more than 100 suites, or one GitHub does not know, is Unknown (the first writes checks.runs_capped with the repository and the head). When the runs cannot be read, every open pull request reads Unknown, since nothing then says no run is queued on its head, so neither a pass nor no checks is known and a mission's ci line is kept; one pull_requests.runs_unread diagnostic names the repository, the heads and the reason, and the rest of the read stands. The card counts the same runs: its check counts, its failed checks by name and its running checks take GitHub Actions' jobs only from each workflow's unfinished runs, else from the run that decides it (the last cancelled one when every run was cancelled), each job placed in its run by the run number in the address GitHub gives it (…/actions/runs/<run>/job/<job>); a job whose address names no run is not shown to be the deciding run's and is not counted. The advisory poll and the settled recheck read a head the same way: the check runs list with GitHub Actions' runs left out of its verdict, then the same query for that one commit. Two facts beside the verdict are kept on an open pull request, core only: a failure that is only a workflow whose every run was cancelled, with nothing else failing (PullRequestWork::checks_cancelled), and a workflow run or check on the head that still runs, which a failure ranking first hides (checks_running); the verdict stays as it is, and a mission's ci line and its CI letter read the head's CI as ended only once nothing runs, by one rule (PullRequestSnapshot::ci_end), the letter calling the first failure cancelled (docs/missions.md in with-hide/hide-private, its paragraph on pull request changes waking the Conductor).

A gitlab.com merge request

A gitlab.com project is read through the operator's own glab by one GraphQL query (HideGitlabMergeRequests, hide_node_link::glab::merge_requests_query): the signed-in account, the project, its newest 100 open merge requests with their head pipeline and the newest 50 of every state, scoring 180 against gitlab.com's limit of 250. Its verdicts are written in one place (hide-core/src/gitlab.rs) and held by a scene table of real gitlab.com answers (hide-core/src/gitlab/tests.rs) whose expected values come from what each scene is, not from the code. A merge request's checks are its head pipeline's status: SUCCESS passes; FAILED and CANCELED fail, a cancelled pipeline also kept as checks_cancelled; RUNNING, PENDING, CREATED, PREPARING, WAITING_FOR_RESOURCE, WAITING_FOR_CALLBACK, SCHEDULED, CANCELING and MANUAL (a manual job the pipeline waits on, with nothing running) are pending; SKIPPED and no pipeline are no checks; anything else is Unknown, and nothing but SUCCESS reads as a pass. The head pipeline is the one gitlab.com runs for the merge request's diff, which for merged results is a commit other than the source branch's head, so its commit is not compared with the head. A job allowed to fail counts as passed, never as failed; an optional manual job counts as skipped and a blocking one as waiting; a job list past its first 50 gives no counts, and the verdict stays the pipeline's. detailedMergeStatus never stands in for the checks: MERGEABLE with checks that passed or none is clean, with any other checks unstable; CONFLICT and BROKEN_STATUS are a conflict, NEED_REBASE is behind, CHECKING, UNCHECKED, PREPARING and an absent status are unknown, DRAFT_STATUS or a draft is a draft, and every other status (a pipeline that must pass, approvals, open discussions, a block) is blocked. gitlab.com keeps a merge request UNCHECKED after a push until something asks it to check, so the list read also asks mergeable, only for that effect: the same answer then carries the checked status, and the verdict still comes from detailedMergeStatus alone. A check gitlab.com has not finished by then stays unknown until it finishes and the list reads it again: a merge request whose target branch was deleted took minutes to settle, as COMMITS_STATUS, which is blocked. The review decision is GraphQL's approved and the reviewers' states, never REST's approvals.approved, which says true when no approval is required: a change asked for (a reviewer's REQUESTED_CHANGES or that merge status) is a change request, approved is approved, approvals still required is review required, and otherwise there is none. "Mine" is the author's username equal to the signed-in account's; a review is asked of the account when it is a reviewer who has not reviewed. gitlab.com has no merge queue Hide reads, so a merge request's queue place is unsupported, which the PR list does not judge as unknown, and a merge request is listed by the same groups as a pull request. The card reads its body, its changed files and its open resolvable discussions by one query (HideGitlabMergeRequestCard), and a checkout's commits by another (HideGitlabCommitChecks) whose pipeline must name the asked commit. A CI wait on a merge request the list no longer holds reads that one by its number (HideGitlabMergeRequestListed) with the fields and the head pipeline the list reads an open one with, and judges it as the list does; a merged or closed one ends the wait by its state. A merge request is merged only at the head the card showed, and its outcome is read back from gitlab.com, never from glab's text or exit code (hide-core/src/gitlab/merge_request.rs). The card offers one method, gitlab.com's merge with the merge request's own squash and delete-source-branch settings, and the core refuses any other method, a queue join from an older phone included, as unsupported with nothing sent. The merge takes its seven requests from the opened share together or answers budget_spent with nothing sent; it reads the merge request first, and a merge request already merged at that head is a success with no second write, so asking again converges, while one merged at another head, or open at another head, is head_moved, closed is not_mergeable, and locked (a merge running) is not known, unreachable, with nothing written. The write is glab mr merge <iid> --sha <head> --auto-merge=false --yes, an exact shape the node allows by its builder alone, so gitlab.com refuses a head that moved (409) and auto-merge is never set; a merge request whose pipeline must succeed and still runs is refused by gitlab.com (405). The merge request is then read again, twice when gitlab.com still holds it locked: merged at the head is the success, another head head_moved, closed not_mergeable, open with auto-merge set auto_merge, open with a conflict conflict, open while gitlab.com is still checking or mergeable after a failed write failed, and any other open status (a pipeline that must pass, approvals, discussions) not_mergeable. Once the write may have left, a read that settles nothing (no answer, one too large or unreadable, a sign-in lost, the merge request missing from the answer, or still locked after the second read) leaves the outcome not known, unreachable, never failed: it can follow a merge that landed, and the next ask reads before writing, so it writes nothing while the merge runs or after it landed. The unit's answer says when the card and the list are read again (WriteFailure::read_again), which the core follows by one rule: gitlab.com asks for it after a success, a moved head, auto-merge set and an outcome not known; GitHub where it always did, a moved head and a conflict a branch update made. A cleanup's squash or rebase proof is the branch's merged merge requests (newest 100, a full page logged as merge_proof.cut and answered as cut, so a HEAD it does not hold leaves the worktree unverified, never not merged) whose head is exactly the worktree's HEAD and whose target is the base, a commit's place in a branch is gitlab.com's merge base, and a merge request read by its number (a mission's outside node, --pr) answers open, closed or merged, locked reading as open; a mission's and a cleanup's reads take the background share, a merge request the operator opened the opened one. When a stack's lower merge request is merged and gitlab.com deletes its source branch, gitlab.com retargets the upper one to the lower one's target and it stays open; when the branch stays, or is deleted by hand, the upper one stays open on the old target, so the Conductor retargets it with glab mr update <iid> --target-branch <branch> (hided/assets/mission/help.md). A failure is named in GithubFailureCategory's classes: no glab is not installed, an older one than the minimum is outdated, a refused sign-in is not logged in, and a broken link, the network, a limit or a refused query is a network or rate-limit failure; an answer past the node's byte cap is a failed read of its own, not filed under any of these. A node that does not know the glab call holds the read (ReadHeld::Unsupported): the project keeps its previous answer and no failure clock starts. The open list past its 100 keeps the newest 100 and says it was cut to the core (pull_requests_cut and the pull_requests.list_cut diagnostic), and no verdict rests on the cut part; the card's open discussions past their page say the threads were not read whole, from the merge request's own resolvable and resolved counts. Every glab line that reaches gitlab.com takes one request from one budget for the whole core process (hide-core/src/gitlab/budget.rs): 60 a minute of the account's 100, which leaves 40 for the operator's own glab, of which background reads take at most 45 and the rest stays for reads the operator opened (a card, a checkout's commits). A background read that finds the budget spent is not made that pass (ReadHeld::BudgetSpent, the previous answer kept, no failure clock); an opened read is refused with its reason only when its share is spent too. The recent window of every state (newest 50) also says when it was cut (ListCut::settled), and a list carried over a failed read keeps its cut mark. An older node that cannot read Call::Glab (a typed unsupported, or invalid_request from a node on an older protocol) holds the read the same way. Each read status carries its host's declaration (HostDeclaration: key, name, operations, access); the store does not trust a saved one and gives a restored status its registered unit's declaration by the saved key, none for a key no unit registers. The PR list and the phone read each host on its own (web/src/prWork.ts, readingOfStatuses): the state is that of the hosts that answered, and hosts names every host refused, failed or read in part, by its declaration's name and program, so a gitlab.com failure is not hidden by a GitHub success; a host still reading its first answer draws no line, and GitHub alone draws the lines it drew before hosts.

Pull request visual states

A pull request has one state, decided in the core by one rule (model::PrState::of, from its lifecycle, draft flag, checks and review decision) and sent on the wire as state on every checkout pull request, as pr_state on a GitHub search result and as state on a link panel's pull request (contracts/snapshot-wire-enums.json: pr_state). The rule reads in this order: merged, closed, draft, failed (failed checks or a change request), mergeable (passing checks with an approved or absent review decision), and pending for the rest (checks running, none or unknown, or a review still required). A draft is draft even with failing checks, and absent or unknown checks never imply a pass. Each state has one token and one icon, drawn the same on every surface (operator approval, 2026-10-10): failed red (--pr-failed), pending amber (--pr-pending), mergeable green (--pr-mergeable), draft grey (--pr-draft), merged purple with the merge icon (--pr-merged), and closed dim (--pr-closed). A change request is red wherever its word is drawn, as failed checks are. The web turns a state into its icon, colour and word in one module (web/src/prMark.ts) and draws it with one component (web/src/components/pr-mark.tsx); no screen keeps a colour table or a classifier of its own, and the checks and review words and the stale reading live in the same module. The state word and the accessibility label keep the meaning without relying on colour. A mark dims while GitHub cannot be read again, and its tooltip says when it was last read.

Pull request groups

The PR list (docs/tasks-and-pr-list.md in with-hide/hide-private, The PR list and the PR card) lists pull requests in groups the core decides, in hide-core/src/agent_state/work/board.rs, from GitHub values the five-minute read carries and from facts only Hide holds: the link record's sessions and the agents' own state. A pull request body's headings and a repository's own scripts decide nothing, so the same rules hold in every repository, and Hide AI never changes a group or a reason. The result is the prs board of each project's agent_scope: rows (group, fold, reason, agents, the pane a reason is about, the checkouts it is the work of, its issue), the groups with their numbers in draw order, and the count of needs_you rows that are not folded.

Which pull requests are listed: the operator's own, those a session of theirs made or worked on, those a review was asked of them or of their team for, and bots'; a merged one needs the first two, a closed one that was not merged is never listed, and a teammate's pull request none of these reaches is not. "Mine" is the pull request's author.login equal to the signed-in login. A pull request is left out only when every judgment says it is not the operator's: while the login is unknown, every open or merged pull request may be theirs and is listed, and while a review ask is unknown, the open pull request it concerns is listed (issue #1189). A pull request's agents are the live agents whose session the link record names as having made or worked on its branch; sharing a folder alone ties nothing. An agent that finished and is not yet looked at moves no group, because the unread check is the 태스크 list's (읽을 것).

Each pull request stops at the first slot that fits:

# Fits when Group Reason
1 the author is a bot (GitHub's is_bot) Bots the reason its other rules give
2 its agent is asking (a question, an approval or an error) Agent is working, first, since the agent's own row is in the operator's Needs You and the pull request is no second line to answer (operator decision 2026-12-03) reply with the agent and the question's first line
3 its agent is working but has not moved for the watch's first inactivity window (INACTIVITY_MS, 20 minutes) Needs You check with the agent and the time since it moved
4 its agent is working Agent is working working
5 it is in the merge queue Merging · merged, first queued with the place
6 it is a draft Drafts draft with its age
7 it is owned (mine, a session of mine touched it, a bot's) and checks failed that GitHub's mergeStateStatus does not call UNSTABLE, or a change request stands, or the state is DIRTY Blocked · no agent failed with the first check's name and how many more, changes, or conflict with the base
8 it is mine and the state is CLEAN or HAS_HOOKS; UNSTABLE too, with the failed required-or-not check named Needs You merge
9 it is mine and the state is BEHIND Needs You update with the base
10 it is mine and the state is BLOCKED Waiting with ci while checks run, Waiting with waiting_review while a review is requested, else Needs You assign_reviewer (worded 리뷰어 지정 · 요청한 사람 없음, with 승인 0/m when the count is known) while GitHub's review decision is REVIEW_REQUIRED; assign_reviewer_optional (worded 리뷰어 지정 · 필수 리뷰 없음) otherwise (no decision, or approved and blocked by another rule), because that block is not review's and the row must not say nobody was asked (PRD pr-review-status B4)
11 a review was asked of the operator by name Needs You review with the author and the time since the ask
12 a review was asked of a team of the operator's (the search finds it, the request names no user) Needs You, folded as 팀 리뷰 요청 N team_review
13 anything else open Waiting ci while checks run, else waiting_review

A judgment that is unknown is never read as "no", and a pull request that cannot be judged is never put in a group it may not belong to. The slots that read an unknown judgment instead place the pull request in Waiting with the reason unjudged and the question that was not answered (account, review_requests, merge_queue), in the plain colour of checking, and it counts toward no Needs You:

Unknown The pull request that waits unjudged What still holds
the login any open one that no earlier slot placed and that has no session of the operator's and is not a bot's; a session's pull request still stops at slot 7 slots 1 - 6 (a bot, an agent, the queue place, a draft)
the review ask a teammate's open one the request list cannot settle (a team's request is on it) a request naming the login (slot 11), and the pull requests of slots 7 - 10
the queue place the operator's own at slot 8, 9 or 10 (merge state clean, has hooks, unstable, behind or blocked), the states a queued pull request can be in a conflicted, draft or still-computing one; a queued one when the queue is read

Slot 5 fires only on a known place. A merged pull request is Merging · merged below the queued ones, newest merge first. When GitHub has not computed mergeStateStatus (UNKNOWN) the pull request keeps the group it stood in on the previous board with the reason checking, and waits when it is new, so a pull request never jumps while GitHub thinks. The reviewers and the required count move no group and no reason (PRD pr-review-status D-02): the web adds the reviewer marks and 승인 n/m to the row the board already placed. A pull request nothing has changed on for 7 days (OLD_MS) in any group but Merging · merged is folded as 오래된 PR N inside its group. Folded lines (a team's review asks, old pull requests) are in no count: the PRs icon's number is these unfolded Needs You rows alone (PRD sidebar-task-lens B29), and the sidebar's Needs You is unchanged. Within a group the order is the reason's urgency, then the newest update (the newest merge for Merging · merged), then the larger number. Times in a reason are the instants they began, never durations, so time passing publishes nothing; the web counts them on its one clock.

<checkout> only keeps a row whose checkout_ids hold the checkout: the one on the pull request's branch, the ones its recorded sessions ran in and the ones its live agents sit in, an agent being the pull request's only when the pull request recorded its session; a checkout where only other agents work is not one of them, so a tool's cell lists no pull request merely because its own agents work beside it. A project with no GitHub remote has no board, and gh missing or signed out is a state of the project's GitHub status, not an empty board.

A task's stage

A task's four-step stage (작업 → PR → 검토 → 머지), which feeds the task's state and which no screen draws since the session record's 지금 box replaced its bar (PRD pr-card-and-session-record-redesign B14), reuses this cached PR answer through the agents' PR summaries, reading only the live ones, so a pull request merged before the operator's last request never counts (agent_state/tally/tasks.rs::stage): with any pull request the bar stands at the least advanced one that is not merged, a draft, pending, failing or closed one at two steps and a mergeable one at three, and at four once every one merged; with none it is one step while a member works in a linked worktree, and a task that is only a conversation has no bar. A failed or unrequested lookup never becomes a merged or empty stage: a member whose PR state is unread adds nothing. The workspace inspector uses the canonical representative agent and disconnected override; inspection itself never acknowledges an agent.

Task identity

Moved to a private document: docs/task-identity.md in with-hide/hide-private.