diff --git a/adapters/seen.py b/adapters/seen.py index 29992bf5d..823cbbb6e 100644 --- a/adapters/seen.py +++ b/adapters/seen.py @@ -13,7 +13,8 @@ out, but a merge by anyone, which reconciliation reads for an Override. A dismissed review was an approval or a change request, and is read as an approval: the machine user's that no Effect recorded alarms either way. The timeline's events that change a pull request's state are read too, though no Factory write makes them yet, so that one made by a -Factory identity alarms. A thread GitHub names no resolver for, as when an App resolved it, is `unattributed`. A list +Factory identity alarms. A thread's resolver is told by its account id alone, since GitHub types it a User whoever +resolved it (decision 0067); a thread GitHub names no resolver for is `unattributed`. A list that cannot be read whole, or a write whose time or key cannot be read, leaves what was read `whole` false, so that reconciliation is short, never silent; nothing is guessed. Ids and codes alone: no body or title is kept. @@ -224,7 +225,10 @@ def add(by, kind, key, at): ident = _object(resolver).get("databaseId") # A resolver GitHub names but whose account cannot be read cannot be told from a Factory identity. whole &= resolver is None or (isinstance(ident, int) and not isinstance(ident, bool) and ident > 0) - by = "unattributed" if resolver is None else _who({"id": ident, "type": "User"}, identities) + # GraphQL types resolvedBy a User whoever resolved it, an App among them (trials/P-49.json): it is told by its + # account id alone, which names one account whatever its type (decision 0067). + by = "unattributed" if resolver is None else next( + (code for (told, _), code in identities.items() if told == ident and _positive(ident)), None) if by is None: continue whole &= _key(t.get("id")) is not None diff --git a/adapters/threads.py b/adapters/threads.py index 651280b37..4400f7b80 100644 --- a/adapters/threads.py +++ b/adapters/threads.py @@ -3,9 +3,13 @@ One GraphQL read of the threads, page by page. Who opened a thread is its first comment's author, and when, that comment's time: a first comment that replies to another is not the opener's, and the thread is refused. Who resolved -it is GitHub's `resolvedBy`, which is typed a User: a resolved thread GitHub names no resolver for, as it is taken to -when an App resolved it or the account is gone, has `resolved_by` null, and the Kernel defers on that thread alone -(`unreadable_thread`). No trial has recorded either yet. Each actor is told by its account id and type, +it is GitHub's `resolvedBy`, by its account id alone: GraphQL types it a User whoever resolved it, an App among them +(trials/P-49.json), so its type is never read. The id is matched to the thread's comment author, whose type GraphQL +gives, or else to the repo's permission read of its login, which answers the account's id and type +(trials/P-53.json), once a login a pass. A resolver neither answers, or that GitHub names none for, has `resolved_by` +null, and the Kernel defers on that thread alone (`unreadable_thread`). A thread whose first comment was deleted reads +its reply as its opener, since GitHub keeps no link to the comment (trials/P-53.json); holding it to the Lens's own +record waits on the collector. Each actor is told by its account id and type, never by a name's spelling (decision 0005, L-57), and its write access read once a login, as `adapters/timeline.py` does. No comment's text is read. A thread whose opener GitHub no longer names, a deleted account's, is refused with the snapshot, as an unreadable actor is anywhere: the known cost is that such a pull request is never read whole. A thread @@ -61,6 +65,32 @@ def _account(author, kind=None): return {"login": author.get("login"), "id": author.get("databaseId"), "type": kind} +def _resolver(by, author, accounts: timeline.Accounts): + """Who resolved a thread, as `facts/1` holds an actor, or None where it cannot be told (decision 0067, issue 331). + + GraphQL's `resolvedBy` is typed a User whoever resolved it, an App among them (trials/P-49.json), so its type is + never read. Its account id is matched to the thread's own comment author, whose type GraphQL gives; failing that, + to the repo's permission read of its login, which answers the account's id and type (trials/P-53.json), held to + the id. An id neither answers, or a read that fails, leaves the resolver unread, and the Kernel defers on the thread + (`kernel/derive.py`'s `unreadable_thread`).""" + if not isinstance(by, dict): + return None + ident = by.get("databaseId") + if not isinstance(ident, int) or isinstance(ident, bool) or ident < 1: + return None + if isinstance(author, dict) and author.get("databaseId") == ident and author.get("__typename") in ("User", "Bot") \ + and not isinstance(author.get("databaseId"), bool): + return accounts.actor(_account(author)) + kind = accounts.typed(by.get("login"), ident) + if kind is None: + return None + try: + return accounts.actor({"login": by["login"], "id": ident, "type": kind}) + except Unanswered: + # An account typed but not read whole, its access among it: the resolver alone is unread. + return None + + def thread(node: dict, accounts: timeline.Accounts) -> dict: """One thread as `facts/1` holds it; refused when any part GitHub gives cannot be read.""" ident, resolved = node.get("id"), node.get("isResolved") @@ -78,7 +108,7 @@ def thread(node: dict, accounts: timeline.Accounts) -> dict: by = node.get("resolvedBy") if not resolved and by is not None: raise Unanswered("an open review thread that names who resolved it") - resolved_by = accounts.actor(_account(by, "User")) if by is not None else None + resolved_by = _resolver(by, first[0].get("author"), accounts) if by is not None else None human = opened_by["kind"] == "human" return {"id": ident, "resolved": resolved, "opened_by": opened_by, "category": "human" if human else None, "severity": None, "resolved_by": resolved_by, "opened_at": opened_at} diff --git a/adapters/timeline.py b/adapters/timeline.py index c28cb24c1..53abd6194 100644 --- a/adapters/timeline.py +++ b/adapters/timeline.py @@ -7,7 +7,8 @@ `lens` is a Bot the caller names as a Lens's App, read as that Lens's name; any other Bot is `app`; any other User is `human`. A User's write access is read from the repository's collaborator permission, `admin`, `maintain` or `write`, never `triage`, once a login for the snapshot and never from an association (the Maintainer's ruling on #222); the -machine user's too, since its approval stands only while it can write. An App's is never asked. A User whose login +machine user's too, since its approval stands only while it can write. An App's write access is never asked; the same +read types a thread's resolver by its id where its comments cannot (decision 0067). A User whose login ends `[bot]`, or is no login GitHub gives, is refused: the read was wrong. The timeline and the reviews are read page by page, following the `link` header's next page, and are whole only when @@ -64,19 +65,45 @@ class Accounts: def __init__(self, transport, repo: str, approver: tuple, lenses: dict, factory=()): self.transport, self.repo, self.approver = transport, repo, tuple(approver) - self.lenses, self.factory, self.access = dict(lenses), set(factory), {} + self.lenses, self.factory, self.answers = dict(lenses), set(factory), {} - def _can_write(self, login: str) -> bool: - if login not in self.access: + def _permission(self, login: str) -> dict: + """The repo's permission answer for `login`, read once a login for all the reader serves.""" + if login not in self.answers: path = "/repos/%s/collaborators/%s/permission" % (self.repo, urllib.parse.quote(login, safe="")) - answer = self.transport.send(request("GET", path)) - if answer["status"] != 200 or not isinstance(answer["body"], dict): - raise Unanswered("the permission of %s answered %d" % (login, answer["status"])) - level = answer["body"].get("permission") - if level not in PERMISSIONS: - raise Unanswered("a permission GitHub does not give: %r" % (level,)) - self.access[login] = level in WRITE - return self.access[login] + # An answer that failed is kept too, one that never came among them, so a login is asked once however + # often it appears. + try: + answer = self.transport.send(request("GET", path)) + except Unanswered: + answer = {"status": "no answer", "body": None} + ok = answer["status"] == 200 and isinstance(answer["body"], dict) + self.answers[login] = answer["body"] if ok else answer["status"] + if not isinstance(self.answers[login], dict): + raise Unanswered("the permission of %s answered %s" % (login, self.answers[login])) + return self.answers[login] + + def _can_write(self, login: str) -> bool: + level = self._permission(login).get("permission") + if level not in PERMISSIONS: + raise Unanswered("a permission GitHub does not give: %r" % (level,)) + return level in WRITE + + def typed(self, login, ident): + """The type, a User or a Bot, of the account `ident` by the repo's permission read of `login`, which answers + the account with its id and type (trials/P-53.json); None where that read fails, or answers another id, or no + type GitHub gives. The login only asks: what answers is held to the id.""" + if not (isinstance(login, str) and login and isinstance(ident, int) and not isinstance(ident, bool) + and ident >= 1): + return None + try: + user = self._permission(login).get("user") + except Unanswered: + return None + if not isinstance(user, dict) or user.get("id") != ident or isinstance(user.get("id"), bool) \ + or user.get("type") not in ("User", "Bot"): + return None + return user["type"] @staticmethod def account(raw_actor) -> tuple: diff --git a/controller/reconcile.py b/controller/reconcile.py index c7e739484..d3856523d 100644 --- a/controller/reconcile.py +++ b/controller/reconcile.py @@ -29,12 +29,13 @@ MATCHES = { "approver": {"approval": (APPLIED, "approve")}, "role": {"review": (APPLIED, "submit_review"), "comment": (APPLIED, "comment"), - "check_run": (APPLIED, "create_check_run")}, + "check_run": (APPLIED, "create_check_run"), "resolution": (APPLIED, "resolve_thread")}, "controller": {"check_run": (WRITTEN, "status_on_item"), "dequeue": (WRITTEN, "dequeue")}, } # A write GitHub gives no key for, an event of the timeline, is matched by its item: each recorded once. BY_ITEM = ("dequeue",) DISPATCHES = ("dispatch_run", "dispatch_approval") +RESOLVE = "resolve_thread" # A Decision that says the item had what a merge needs: an approval of its content standing, read by the Kernel. MERGEABLE = ("converged", "queued") LANDED = ("applied", "already_applied") @@ -54,14 +55,21 @@ def _identities(accounts) -> tuple: return found, known -def _keys(effects: dict) -> tuple: - """`(keys, items)`: the key of every Effect recorded as landed, by where it was recorded and its type; and of a - write matched by its item, how many were recorded on each.""" +def _keys(effects: dict, runs) -> tuple: + """`(keys, items)`: the key of every Effect recorded as landed, by where it was recorded and its type, and a + thread's resolution by the Role whose Run recorded it too; and of a write matched by its item, how many were + recorded on each.""" keys, items = {}, {} + # A thread's id outlives its reopening, so one Role's recorded resolution must not cover another's: it is bound to + # the Role of the Run that recorded it, by the run records; one whose Run is not among them binds to none. + role_of = {r["run"]: r["role"] for r in runs} if isinstance(runs, list) else {} for done in effects["applied"]: for e in done["effects"]: if e["state"] in LANDED and e["key"] is not None: - keys.setdefault((APPLIED, e["type"]), set()).add(e["key"]) + if e["type"] == RESOLVE: + keys.setdefault((APPLIED, RESOLVE, role_of.get(done["run"])), set()).add(e["key"]) + else: + keys.setdefault((APPLIED, e["type"]), set()).add(e["key"]) for done in effects["written"]: for w in done["writes"]: if w["state"] not in LANDED: @@ -91,7 +99,7 @@ def reconcile(seen, effects, runs, before, accounts) -> dict: readable = seen is not None and not errors(seen, "seen") recorded = _readable(effects) short = not (readable and seen["whole"] is True and recorded and effects.get("whole") is True and known) - keys, items = _keys(effects) if recorded else ({}, {}) + keys, items = _keys(effects, runs) if recorded else ({}, {}) unmatched, override = [], [] for w in seen["writes"] if readable else []: kind = identities.get(w["by"]) @@ -104,6 +112,12 @@ def reconcile(seen, effects, runs, before, accounts) -> dict: slot = (where[1], key(w["item"]) if w["item"] else None) landed = items.get(slot, 0) > 0 items[slot] = items.get(slot, 0) - 1 + elif where == (APPLIED, RESOLVE) and not isinstance(runs, list): + # Run records not read whole bind no recorded resolution to its Role: what was seen is short, and the + # resolution is not called unmatched for it. + short, landed = True, True + elif where == (APPLIED, RESOLVE): + landed = w["key"] is not None and w["key"] in keys.get((APPLIED, RESOLVE, w["by"]), set()) else: landed = where is not None and w["key"] is not None and w["key"] in keys.get(where, set()) if not landed: diff --git a/docs/architecture/software-factory-design.md b/docs/architecture/software-factory-design.md index 8f5a6ed9f..71a22b96f 100644 --- a/docs/architecture/software-factory-design.md +++ b/docs/architecture/software-factory-design.md @@ -2174,9 +2174,10 @@ it observed as a recorded fixture, which is what the simulator's fake GitHub is | P-45 | When a dependency bot updates an Action's pin in a workflow file, does it open the pull request and push its head under its own `[bot]` identity, so that the port's class for it is `dependency`? | Yes, with the bot as author and last pusher. If a person's push follows, the class is read as any other change's (decision 0026). **Passed** on 2026-10-21 (`trials/P-45.json`): Dependabot opened canary pull request 50, moving actions/checkout from v7.0.0 to v7.0.1, and pushed its head, both as `dependabot[bot]`, a Bot, id 49699333; GraphQL names the same account `dependabot`, so the port reads it by id and type | | P-46 | Does a merged pull request's closing reference change when its description is edited after the merge, or when an issue is linked to it by hand? | No: the reference stands as it was at the merge. **Failed** on 2026-10-21 (`trials/P-46.json`): an edit after the merge added issue 47 to canary pull request 38's references, and undoing it took the issue out; a link by hand was not tried. So the issue Lifecycle reads the join as it stood at the merge, never the live field: by the issue's close the timeline names the merge the closer of (`trials/P-33.json`), which the edit did not write, since it raised only the cross-reference a bare mention raises, and the undo left that standing (issue 267) | | P-47 | Can the reader App read a login's repository permission from `GET /repos/{repo}/collaborators/{login}/permission`, for an owner, a collaborator with write, one with triage and an outsider, and does the answer tell write access apart? And which of its grants does each read need, and the read of a branch's activity (`GET /repos/{repo}/activity`), which P-28 made as a person? Run by `tools/trial_reader_reads.sh` at the Maintainer's terminal with the reader's key, each read made twice, narrowed once to `metadata: read` and once to `contents: read` | Yes: `admin` or `maintain` for the owner, `write` for the collaborator, `triage` for the triage role and `read` or `none` for the outsider; and the least grant each read needs is the one `config/apps.json` names for it (decision 0035). **Passed** on 2026-10-21 (`trials/P-47.json`): with each grant, `metadata: read` and `contents: read`, the reader read `admin` for the owner, `write` for the collaborator and for the machine user, whose `role_name` is `maintain`, and `read` for an outsider; and the activity of `trial/p-9`. GitHub's `x-accepted-github-permissions` names `metadata=read` for the permission read and `contents=read` for the activity read, and `config/apps.json` names each so: the canary is public, so the token with `metadata` alone read the activity all the same. GitHub's `permission` folds `maintain` into `write`; write access reads the same from it. The triage role was not tried: the canary has none, and the Maintainer chose to run without one | -| P-49 | What does GraphQL `resolvedBy` say when an App resolves a review thread, read as the App and as a person; and does a thread keep its replies when its first comment is deleted, and what is its first comment then? | Each is recorded, so the threads port (§3.3) reads them as GitHub gives them. **Recorded** on 2026-10-23 (`trials/P-49.json`), in the canary, by the trial-author App's installation token at the Maintainer's terminal, and read again by the port's own query on 2026-10-26, the pull request closed. `resolvedBy` is not null: read as the App and as the Maintainer it names `combsmith-sf-trial-author[bot]`, its type the schema's `User`, which says nothing of who resolved it; the port's read gives it the database id the App's comments carry, whose author is a `Bot`. The port reads every resolver as a User, finds no User of that login, and refuses the whole threads read: a pull request whose Lens resolved its own thread is never read whole until #331 reads the resolver from the timeline. The thread whose first comment was deleted keeps its reply, now its first comment and a reply to nothing, so the port's refusal of a first comment that replies does not fire; the port would read the thread's opener and time from the reply, 2 seconds after the thread was opened, which #331 also mends | +| P-49 | What does GraphQL `resolvedBy` say when an App resolves a review thread, read as the App and as a person; and does a thread keep its replies when its first comment is deleted, and what is its first comment then? | Each is recorded, so the threads port (§3.3) reads them as GitHub gives them. **Recorded** on 2026-10-23 (`trials/P-49.json`), in the canary, by the trial-author App's installation token at the Maintainer's terminal, and read again by the port's own query on 2026-10-26, the pull request closed. `resolvedBy` is not null: read as the App and as the Maintainer it names `combsmith-sf-trial-author[bot]`, its type the schema's `User`, which says nothing of who resolved it; the port's read gives it the database id the App's comments carry, whose author is a `Bot`. The port reads every resolver as a User, finds no User of that login, and refuses the whole threads read: a pull request whose Lens resolved its own thread is never read whole until #331 types the resolver by its account (P-53). The thread whose first comment was deleted keeps its reply, now its first comment and a reply to nothing, so the port's refusal of a first comment that replies does not fire; the port would read the thread's opener and time from the reply, 2 seconds after the thread was opened, which #331 also mends | | P-50 | On a GitHub-hosted Linux runner, can a tool that the pinned model CLI runs in its sandbox read a parent process's environment, its own or through `/proc/PID/environ` of a process above it? | No, in one configuration a Run can be given, or §4.9's first and third layers carry the weight on Linux too. **Failed** on 2026-10-22 (`trials/P-50.json`), at 2.1.306, in the canary, the CLI's API a stub on the runner that answered one scripted tool call, with no secret. As the runner stands the tool's result came back an error and the probe never ran, though the CLI exited 0 with `failIfUnavailable` set. With `kernel.apparmor_restrict_unprivileged_userns=0` the tool ran in a PID namespace of its own, the CLI out of its sight, and held the parent marker in its own environment, as did the one process above it that it could read; the next refused (exit 2). The scrub took the listed marker out, the environment four lines shorter, the names not recorded. With the scrub on, the write outside the work directory landed, whichever Task ran first; with it off, it was refused | | P-51 | On a GitHub-hosted Linux runner, does the pinned model CLI's sandbox let a tool's write outside its work directory land, and is it the subprocess scrub or the order of the Tasks that decides? | No write outside the work directory lands, in every configuration a Run can be given, or a Run has no tool. **Failed** on 2026-10-22 (`trials/P-51.json`), at 2.1.306, in the canary with user namespaces allowed, the CLI's API P-50's stub, with no secret. With `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1` all four writes landed, to the home directory, a dotfile there, `/tmp` and the work directory's parent, in both orders; with the scrub unset or 0, all four were refused. The work directory's parent was under the runner's own temporary directory, apart from `/tmp`. In each Task the tool ran in a PID namespace of its own and its write inside the work directory landed. The unset configuration had `GITHUB_ACTIONS` set, the runner's other variables removed, and held every write | +| P-53 | Does a pull request's timeline, read as the REST issue timeline and as GraphQL `timelineItems` of every item type, name who resolved a review thread, by account id and type; and does it link a reply whose thread's first comment was deleted to that comment or its review? And does the repo's permission read of the login `resolvedBy` gives answer that account's id and type? | The threads port (§3.3) reads a resolver and an opener from what can say them. **Recorded** on 2026-10-26 (`trials/P-53.json`), read-only by the Maintainer on P-49's pull request. Neither read names a thread's resolution: no item of either is one. Neither links the reply to the deleted comment: the deleted comment's review is still listed, by the App, a `Bot`, with no comment left, and nothing points to it. The repo's permission read of `resolvedBy`'s login answers the account's id and type: the App's bot 344141469, `resolvedBy`'s own id, a `Bot`; the Maintainer a `User`. So #331 types a resolver by the thread's own comment authors, else by that read where its id is `resolvedBy`'s | ### 6.1 The order to run them in diff --git a/docs/decisions/0067-a-threads-resolver-is-told-by-its-account-never-by-resolvedbys-type.md b/docs/decisions/0067-a-threads-resolver-is-told-by-its-account-never-by-resolvedbys-type.md new file mode 100644 index 000000000..2e0d15af7 --- /dev/null +++ b/docs/decisions/0067-a-threads-resolver-is-told-by-its-account-never-by-resolvedbys-type.md @@ -0,0 +1,39 @@ +# 0067. A thread's resolver is told by its account, never by resolvedBy's type + +Status: accepted. The Factory Builder's rulings of 2026-10-26 on +"Threads port: a thread's resolver is read from its timeline event, by id and type (P-49)" (issue 331), from trial P-49 +("Platform trial: what GitHub gives the threads port", issue 282) and trial P-53. It extends decision 0005, that each +actor is told by its account id and type, and leaves it as it is: 0005's row on a thread's shape stays not held while +a thread whose first comment was deleted is read as before. + +## Decision + +| What | Decided | Because | +|---|---|---| +| A thread's resolver | `resolvedBy`'s account id is matched to the thread's comment author, whose type GraphQL gives; failing that, to the repo's permission read of `resolvedBy`'s login, which answers the account's id and type, held to the id. `resolvedBy`'s type is never read | GraphQL types `resolvedBy` a User whoever resolved the thread, an App among them (`trials/P-49.json`). No timeline item names a thread's resolution (`trials/P-53.json`). The permission read answers the account by id and type, a `Bot` for an App's bot, a `User` for a person (`trials/P-53.json`) | +| One that cannot be told | An id neither answers, a read that fails, an account of no type GitHub gives, or one whose access cannot be read leaves the resolver unread, and the rest of the threads read stands: the Kernel defers on the thread, never taking it for a User | Fail closed: a resolver taken for a person would close a Lens's thread | +| Another App | An App that is neither the thread's Lens nor a person is read as an App: the thread stays open under `kernel/gate.py`'s `closed`, and is not unreadable | Only a Lens's own App or a person closes a Lens's thread (L-17) | +| The cost | One permission read a login a pass, shared with the read of a person's write access, a read that failed or never answered among them | The pass reads one `Accounts` for all its pull requests | +| Reconciliation | What was seen tells a thread's resolver by its account id alone, among the Factory's identities, and a Role's resolution is matched to a `resolve_thread` Effect by the thread's id, recorded by a Run of that same Role, as the run records say; run records not read whole bind none, and leave reconciliation short rather than calling the resolution unmatched (decision 0061) | An App's resolution, typed a User, was told by no identity, and an unrecorded one went unseen. A thread's id outlives its reopening, so one Role's recorded resolution must not cover another's | +| A deleted first comment | Not held here: GitHub keeps no link from the reply to the deleted comment or its review (`trials/P-53.json`). Every Finding comment a Lens's `applied/1` records must still be in the threads read, or the read is unreadable: issue 338 ("Threads port: a Lens's recorded Finding comment missing from the threads read leaves it unreadable"), blocked by the collector | A comparison with what an earlier pass kept would keep state between passes, and miss a deletion made before any pass saw the comment | + +## Why + +P-49 found that a Lens resolving its own thread, through `apply`, made the threads port refuse the whole read: it read +the resolver as a User, and a User's login has no `[bot]`. A person resolving a Lens's thread, which is how a person +closes one, matches no comment author when the person wrote none of the thread, so a type read from comment authors +alone would hold such a pull request for good; the permission read, which the port already makes for a person's write +access, answers the account by id and type, and costs no read more for a person. + +## Boundaries + +| Boundary | Check | +|---|---| +| An App's resolution is read as that App's, from P-49's records | `tests/test_adapters.py::test_an_apps_resolution_is_read_as_the_apps_by_its_comment_author` | +| A resolver is typed by its account, never by `resolvedBy`'s type: a person's resolution, the Lens's own, another App's, and one that cannot be told | `tests/test_adapters.py::test_a_resolver_is_typed_by_its_account_never_by_resolved_bys_type` | +| A resolver is read once a login, whatever it resolved | `tests/test_adapters.py::test_a_resolver_is_read_once_a_login_whatever_it_resolved` | +| An account is typed by the permission read only for the id asked | `tests/test_adapters.py::test_an_account_is_typed_by_the_permission_read_held_to_its_id` | +| A resolution is matched only to an Effect its own Role's Run recorded | `tests/test_reconcile.py::test_a_resolution_is_matched_to_the_role_whose_run_recorded_it` | +| Reconciliation tells a resolver by its account id, and matches a Role's resolution | `tests/test_reconcile.py::test_each_identitys_writes_are_read_by_its_account_never_its_login`, `tests/test_reconcile.py::test_each_write_is_matched_to_the_effect_that_recorded_it` | +| A Lens's recorded Finding comment missing from the threads read leaves it unreadable | not held yet: `tests/test_adapters.py::test_a_thread_a_trial_recorded_is_read_as_the_port_reads_it` | +| Each of these rules has a mutant that a test kills | `tools/mutants.py` | diff --git a/tests/test_adapters.py b/tests/test_adapters.py index ba35f798b..e9c0144f0 100644 --- a/tests/test_adapters.py +++ b/tests/test_adapters.py @@ -14,6 +14,7 @@ import os import pathlib import unittest +import urllib.parse import zipfile from adapters import acceptance, artifacts, checks, effects, facts, github, heldout, items, passes, pull, records, threads, \ @@ -1250,18 +1251,27 @@ class Router: A compare not in the table is the replay's, as the snapshot's own compares of the diff and the files are (issue 284), and one the replay does not hold either answers 404. The permission's trial is #222's.""" - def __init__(self, replay, permissions=None, compares=None): + # The account each login's permission answer names, as trials/P-53.json records the answer: its id and type. + USERS = {"don-petry": (36422719, "User"), "donpetry-bot": (281750570, "User"), + "combsmith-sf-trial-author[bot]": (344141469, "Bot"), "coderabbitai[bot]": (136622811, "Bot")} + + def __init__(self, replay, permissions=None, compares=None, users=None): self.replay, self.permissions, self.compares, self.asked = replay, dict(permissions or {}), dict(compares or {}), [] + self.users = dict(self.USERS, **(users or {})) def send(self, req): path = req["path"] if "/collaborators/" in path: - login = path.split("/collaborators/")[1].split("/")[0] + login = urllib.parse.unquote(path.split("/collaborators/")[1].split("/")[0]) self.asked.append(login) level = self.permissions.get(login, "none") if level == "missing": return {"status": 404, "headers": {}, "body": {"message": "Not Found"}} - return {"status": 200, "headers": {}, "body": {"permission": level}} + body = {"permission": level} + if login in self.users: + ident, kind = self.users[login] + body["user"] = {"login": login, "id": ident, "type": kind} + return {"status": 200, "headers": {}, "body": body} if "/compare/" in path: commit = path.split("...")[1] if commit in self.compares: @@ -1988,20 +1998,98 @@ def p49(self) -> tuple: pull = {"number": 55, "base": {"repo": {"full_name": canary()}}} return found[0], lambda: threads.read(router, pull, timeline.Accounts(router, canary(), MACHINE, {})) - def test_an_apps_resolution_stops_the_threads_read_today(self): - # trials/P-49.json (issue 282): the trial-author App resolved one of its two threads, and deleted the other's - # first comment after a reply. resolvedBy names the App's bot by the id its comments carry, but typed a User; the - # port reads every resolver as a User, finds none of that login, and refuses the whole read: a pull request whose - # Lens resolved its own thread is never read whole until issue 331 reads the resolver from the timeline. + def test_an_apps_resolution_is_read_as_the_apps_by_its_comment_author(self): # issue 331, decision 0067 + # trials/P-49.json (issue 282): the trial-author App resolved one of its two threads. resolvedBy names the App's + # bot by the id its comments carry, typed a User, which says nothing; the thread's own comment author, a Bot + # of that id, says who. The read is whole, and the resolver is the App, as the thread's opener is. found, read = self.p49() - resolved, kept = found["response"]["body"]["data"]["repository"]["pullRequest"]["reviewThreads"]["nodes"] - opener = resolved["comments"]["nodes"][0]["author"] - self.assertEqual((opener["__typename"], resolved["resolvedBy"]["databaseId"]), ("Bot", opener["databaseId"])) - with self.assertRaises(github.Unanswered) as refused: - read() - self.assertIn("a User whose login is none GitHub gives", str(refused.exception)) - # The thread whose first comment was deleted keeps its reply, now its first comment and a reply to nothing. - self.assertEqual((kept["isResolved"], [c["replyTo"] for c in kept["comments"]["nodes"]]), (False, [None])) + resolved = found["response"]["body"]["data"]["repository"]["pullRequest"]["reviewThreads"]["nodes"][0] + self.assertEqual((resolved["comments"]["nodes"][0]["author"]["__typename"], + resolved["resolvedBy"]["databaseId"]), ("Bot", 344141469)) + got, whole = read() + self.assertTrue(whole) + self.assertEqual((got[0]["resolved"], got[0]["resolved_by"]), (True, got[0]["opened_by"])) + self.assertEqual(got[0]["resolved_by"]["kind"], "app") + + def resolved(self, by: tuple, opened=LENS, users=None, permissions=None) -> dict: + """One Lens thread resolved by `by`, `(login, id)` as resolvedBy gives it, read through the port.""" + router = Router(github.Replay([threads_answer("o/r", 26, [thread_node("PRRT_1", opened, resolved_by=by)])]), + permissions or {"don-petry": "admin"}, users=users) + accounts = timeline.Accounts(router, "o/r", MACHINE, {LENS[1:]: "coderabbit"}) + got, whole = threads.read(router, Threads.PULL, accounts) + self.assertTrue(whole) + return got[0], router + + def test_a_resolver_is_typed_by_its_account_never_by_resolved_bys_type(self): # issue 331, decision 0067 + from kernel import derive, gate + config = dict(json.loads((ROOT / "config" / "defaults.json").read_text()), approver=APPROVER) + facts_ = {"threads": [], "class": "maintainer", "author": "don-petry"} + # A person who resolved a Lens's thread, and opened none of it: the repo's permission read of the login + # resolvedBy gives answers the account, a User of resolvedBy's id (trials/P-53.json). The thread is closed. + th, _ = self.resolved(("don-petry", MAINTAINER)) + self.assertEqual(th["resolved_by"], {"kind": "human", "name": "don-petry", "can_write": True}) + self.assertTrue(gate.closed(th)) + self.assertFalse(derive.unreadable_thread(th, ["coderabbit"], facts_, config)) + # The Lens's own App resolving its own thread, by the id its comment carries: closed, by the Lens. + th, router = self.resolved(("coderabbitai[bot]", LENS[1])) + self.assertEqual((th["resolved_by"], router.asked), (th["opened_by"], [])) + self.assertTrue(gate.closed(th)) + # Another App, a Bot that is no Lens: neither a person nor the thread's Lens, so the thread stays open; it is + # read whole, and so is not unreadable. + th, _ = self.resolved(("github-actions[bot]", APP[1]), users={"github-actions[bot]": (APP[1], "Bot")}) + self.assertEqual(th["resolved_by"]["kind"], "app") + self.assertFalse(gate.closed(th)) + # Its Finding's category and severity, joined from the Lens's record, are all an open Lens thread needs more. + self.assertFalse(derive.unreadable_thread(dict(th, category="functional", severity="major"), ["coderabbit"], + facts_, config)) + # An id the permission read does not answer, a read that fails, an account of no type GitHub gives, or a + # resolver of no id: the resolver is unread, never taken for a User, and the Kernel defers on the thread. + for by, users, permissions in ((("don-petry", 999), None, None), + (("don-petry", MAINTAINER), None, {"don-petry": "missing"}), + (("don-petry", MAINTAINER), {"don-petry": (MAINTAINER, "Organization")}, None), + (("someone", 77), None, None), + (("don-petry", None), None, None), (("don-petry", True), None, None), + ((None, 77), None, None), + (("don-petry", MAINTAINER), None, {"don-petry": "owner"})): + th, _ = self.resolved(by, users=users, permissions=permissions) + self.assertEqual((th["resolved"], th["resolved_by"]), (True, None), by) + self.assertTrue(derive.unreadable_thread(th, ["coderabbit"], facts_, config), by) + # An id that is no account's, True among them, is never matched to an author of id 1, as True == 1 would. + th, _ = self.resolved(("someone", True), opened=("someone", 1, "User"), permissions={"someone": "admin"}) + self.assertEqual(th["resolved_by"], None) + + def test_an_account_is_typed_by_the_permission_read_held_to_its_id(self): # issue 331, decision 0067 + # The permission read answers the account, its id and type (trials/P-53.json): a type is taken only for the id + # asked, never for a read that failed, another id, or a type GitHub does not give an account. + router = Router(github.Replay([]), {"don-petry": "admin", "gone": "missing"}, + users={"odd": (5, "Organization")}) + accounts = timeline.Accounts(router, "o/r", MACHINE, {}) + self.assertEqual([accounts.typed("don-petry", MAINTAINER), accounts.typed("combsmith-sf-trial-author[bot]", 344141469)], + ["User", "Bot"]) + for login, ident in (("gone", 1), ("don-petry", MAINTAINER + 1), ("odd", 5), (None, MAINTAINER), + ("don-petry", True), ("don-petry", 0)): + self.assertIsNone(accounts.typed(login, ident), (login, ident)) + + def test_a_resolver_is_read_once_a_login_whatever_it_resolved(self): # issue 331: the cost + nodes = [thread_node("PRRT_%d" % i, LENS, resolved_by=("don-petry", MAINTAINER)) for i in range(3)] + router = Router(github.Replay([threads_answer("o/r", 26, nodes)]), {"don-petry": "admin"}) + got, whole = threads.read(router, Threads.PULL, timeline.Accounts(router, "o/r", MACHINE, {})) + self.assertEqual((whole, [t["resolved_by"]["kind"] for t in got], router.asked), (True, ["human"] * 3, ["don-petry"])) + # A read that failed, or never answered, is asked once too. + class Silent(Router): + def send(self, req): + if "/collaborators/" in req["path"]: + self.asked.append(req["path"].split("/collaborators/")[1].split("/")[0]) + raise github.Unanswered("no answer") + return super().send(req) + nodes = [thread_node("PRRT_%d" % i, LENS, resolved_by=("don-petry", MAINTAINER)) for i in range(3)] + router = Silent(github.Replay([threads_answer("o/r", 26, nodes)]), {}) + got, whole = threads.read(router, Threads.PULL, timeline.Accounts(router, "o/r", MACHINE, {})) + self.assertEqual((whole, [t["resolved_by"] for t in got], router.asked), (True, [None] * 3, ["don-petry"])) + nodes = [thread_node("PRRT_%d" % i, LENS, resolved_by=("don-petry", MAINTAINER)) for i in range(3)] + router = Router(github.Replay([threads_answer("o/r", 26, nodes)]), {"don-petry": "missing"}) + got, whole = threads.read(router, Threads.PULL, timeline.Accounts(router, "o/r", MACHINE, {})) + self.assertEqual((whole, [t["resolved_by"] for t in got], router.asked), (True, [None] * 3, ["don-petry"])) @pending def test_a_thread_a_trial_recorded_is_read_as_the_port_reads_it(self): diff --git a/tests/test_reconcile.py b/tests/test_reconcile.py index 654daeb17..88dc74c22 100644 --- a/tests/test_reconcile.py +++ b/tests/test_reconcile.py @@ -89,6 +89,24 @@ def test_each_write_is_matched_to_the_effect_that_recorded_it(self): # I-33, ru # A write whose key cannot be read is matched to nothing, whatever was recorded on its item. self.assertEqual(kinds(check(seen(dict(write, key=None)), recorded([done]))), [(write["by"], write["kind"])]) + def test_a_resolution_is_matched_to_the_role_whose_run_recorded_it(self): # decision 0067 + # A thread's id outlives its reopening, so a resolution is matched only to an Effect a Run of the resolver's own + # Role recorded, by the run records: another Role's, or one whose Run is not among them, covers nothing. + done = applied(("resolve_thread", "PRRT_t", "applied")) + mine = run(name=done["run"], role="pr-review") + # Role matching alone: with no pass job's token, the Run is no dispatch to reconcile. + accounts = dict(KNOWN, workflow_token=None, roles=dict(KNOWN["roles"], **{ + "dev-lead": {"id": 5000004, "type": "Bot", "login": "combsmith-sf-dev-lead[bot]"}})) + self.assertEqual(check(seen(wrote("pr-review", "resolution", "PRRT_t")), recorded([done]), records(mine), + accounts=accounts)["unmatched"], []) + for by, runs in (("dev-lead", records(mine)), ("pr-review", records()), + ("pr-review", records(dict(mine, role="dev-lead")))): + found = check(seen(wrote(by, "resolution", "PRRT_t")), recorded([done]), runs, accounts=accounts) + self.assertEqual(kinds(found), [(by, "resolution")], (by, runs)) + # Run records not read whole bind no resolution to its Role: reconciliation is short, and calls none unmatched. + found = check(seen(wrote("pr-review", "resolution", "PRRT_t")), recorded([done]), None, accounts=accounts) + self.assertEqual((found["unmatched"], found["short"]), ([], True)) + def test_the_controllers_writes_are_matched_to_what_the_pass_recorded(self): # decision 0051 status = written(("status_on_item", ITEM, None, "CR_s", "applied")) self.assertEqual(check(seen(wrote("controller", "check_run", "CR_s")), recorded(written_=[status]))["unmatched"], @@ -128,7 +146,7 @@ def test_a_write_no_identity_may_make_alarms_whatever_was_recorded(self): # dec ("comment", "K", "applied"), ("resolve_thread", "K", "applied"))]) for write in (wrote("approver", "push", "K"), wrote("approver", "review", "K"), wrote("approver", "comment", "K"), wrote("approver", "resolution", "K"), wrote("pr-review", "label"), wrote("pr-review", "merge"), - wrote("pr-review", "approval", "K"), wrote("pr-review", "resolution", "K"), + wrote("pr-review", "approval", "K"), wrote("approver", "dismissal"), wrote("approver", "close")): self.assertEqual(kinds(check(seen(write), everything)), [(write["by"], write["kind"])], write) @@ -331,6 +349,9 @@ def test_each_identitys_writes_are_read_by_its_account_never_its_login(self): # {"event": "labeled", "actor": PERSON, "created_at": AT}] threads_ = [{"id": "PRRT_n", "isResolved": True, "resolvedBy": None}, {"id": "PRRT_a", "isResolved": True, "resolvedBy": {"login": "donpetry-bot", "databaseId": 281750570}}, + # A Role App's resolution, which GraphQL types a User: told by its account id (decision 0067). + {"id": "PRRT_r", "isResolved": True, "resolvedBy": {"login": "combsmith-sf-pr-review[bot]", + "databaseId": 5000002}}, {"id": "PRRT_p", "isResolved": True, "resolvedBy": {"login": "don-petry", "databaseId": 36422719}}, {"id": "PRRT_o", "isResolved": False, "resolvedBy": None}] runs = [check_run(5364144, "CR_r"), check_run(5364130, "CR_c"), check_run(15368, "CR_x")] @@ -346,7 +367,7 @@ def test_each_identitys_writes_are_read_by_its_account_never_its_login(self): # ("pr-review", "close", None), ("pr-review", "review_request", None), ("controller", "assignment", None), ("controller", "other", "milestoned"), ("unattributed", "resolution", "PRRT_n"), - ("approver", "resolution", "PRRT_a"), ("pr-review", "check_run", "CR_r"), + ("approver", "resolution", "PRRT_a"), ("pr-review", "resolution", "PRRT_r"), ("pr-review", "check_run", "CR_r"), ("controller", "check_run", "CR_c")]) # A merge by anyone is read for an Override; and what was seen is seen/1. self.assertEqual(merged, [{"item": ITEM, "at": AT}]) diff --git a/tools/mutants.py b/tools/mutants.py index 9c2afccbd..785084927 100644 --- a/tools/mutants.py +++ b/tools/mutants.py @@ -1040,6 +1040,61 @@ def moved_before(rel: str, block: str, anchor: str) -> tuple: ("an applied archive is downloaded under a pass record's bound", 'adapters/artifacts.py', 'APPLIED_MEMBER, ZIPPED, APPLIED_MOST)', 'APPLIED_MEMBER, APPLIED_MOST, APPLIED_MOST)', ("tests.test_adapters",)), + # Issue 331: a thread's resolver typed by its account, never by resolvedBy's type (P-49, P-53). + ('a resolution is called unmatched when no Role can be bound', 'controller/reconcile.py', + ' short, landed = True, True\n', + ' short, landed = True, False\n', ("tests.test_reconcile",)), + ('run records not read leave a resolution whole', 'controller/reconcile.py', + ' short, landed = True, True\n', + ' landed = True\n', ("tests.test_reconcile",)), + ("a resolution is matched to any Role's record", 'controller/reconcile.py', + 'keys.get((APPLIED, RESOLVE, w["by"]), set())', + 'set().union(*[v for k, v in keys.items() if k[:2] == (APPLIED, RESOLVE)])', ("tests.test_reconcile",)), + ('a recorded resolution binds to every Role', 'controller/reconcile.py', + 'keys.setdefault((APPLIED, RESOLVE, role_of.get(done["run"])), set())', + 'keys.setdefault((APPLIED, RESOLVE, "pr-review"), set())', ("tests.test_reconcile",)), + ('a permission read that never answered is asked again', 'adapters/timeline.py', + ' except Unanswered:\n answer = {"status": "no answer", "body": None}\n', + ' except Unanswered:\n raise\n', ("tests.test_adapters",)), + ('a resolver in what was seen is told as a User', 'adapters/seen.py', + 'next(\n (code for (told, _), code in identities.items() if told == ident and _positive(ident)), None)', + '_who({"id": ident, "type": "User"}, identities)', ("tests.test_reconcile",)), + ("a Role's resolution matches nothing", 'controller/reconcile.py', + ', "resolution": (APPLIED, "resolve_thread")},', + '},', ("tests.test_reconcile",)), + ('a permission read that failed is asked again', 'adapters/timeline.py', + ' self.answers[login] = answer["body"] if ok else answer["status"]\n', + ' if not ok:\n raise Unanswered("the permission answered %s" % answer["status"])\n self.answers[login] = answer["body"]\n', ("tests.test_adapters",)), + ('a resolver whose account cannot be read refuses the read', 'adapters/threads.py', + ' try:\n return accounts.actor({"login": by["login"], "id": ident, "type": kind})\n except Unanswered:\n', + ' return accounts.actor({"login": by["login"], "id": ident, "type": kind})\n try:\n pass\n except Unanswered:\n', ("tests.test_adapters",)), + ("a resolver of no account id is matched to its thread's author", 'adapters/threads.py', + ' if not isinstance(ident, int) or isinstance(ident, bool) or ident < 1:\n return None\n if isinstance(author', + ' if isinstance(author', ("tests.test_adapters",)), + ('a resolver of no login is typed', 'adapters/timeline.py', + ' if not (isinstance(login, str) and login and isinstance(ident, int) and not isinstance(ident, bool)\n and ident >= 1):\n return None\n try:', + ' try:', ("tests.test_adapters",)), + ('a resolver is taken for a User', 'adapters/threads.py', + ' kind = accounts.typed(by.get("login"), ident)', + ' kind = "User"', ("tests.test_adapters",)), + ("a resolver is never matched to its thread's author", 'adapters/threads.py', + 'author.get("databaseId") == ident and', + 'False and', ("tests.test_adapters",)), + ("a resolver of another type than its author's is the author", 'adapters/threads.py', + ' return accounts.actor(_account(author))\n kind', + ' return accounts.actor(_account(author, "User"))\n kind', ("tests.test_adapters",)), + ('a resolver that cannot be typed is taken for a User', 'adapters/threads.py', + ' if kind is None:\n return None\n try:', + ' if kind is None:\n kind = "User"\n try:', ("tests.test_adapters",)), + ('an account of another id is typed', 'adapters/timeline.py', + ' or user.get("id") != ident', + '', ("tests.test_adapters",)), + ('a permission read that fails types its login a User', 'adapters/timeline.py', + ' except Unanswered:\n return None\n if not isinstance(user, dict)', + ' except Unanswered:\n return "User"\n if not isinstance(user, dict)', ("tests.test_adapters",)), + ('a type GitHub does not give is read', 'adapters/timeline.py', + ' \\\n or user.get("type") not in ("User", "Bot"):', + ':', ("tests.test_adapters",)), # Issue 306: every write a Factory identity made matched to a recorded Effect (I-33, decision 0061). ('a machine-user push is matched to an approval', 'controller/reconcile.py', ' "approver": {"approval": (APPLIED, "approve")},', @@ -2193,10 +2248,10 @@ def moved_before(rel: str, block: str, anchor: str) -> tuple: 'WRITE = {"admin", "maintain", "write"}\n', 'WRITE = {"admin", "maintain", "write", "triage"}\n', ('tests.test_adapters',)), ('a permission GitHub does not give is read', 'adapters/timeline.py', - ' if level not in PERMISSIONS:\n', - ' if False:\n', ('tests.test_adapters',)), + ' if level not in PERMISSIONS:\n', + ' if False:\n', ('tests.test_adapters',)), ("a login's access is read at every appearance", 'adapters/timeline.py', - ' if login not in self.access:\n', + ' if login not in self.answers:\n', ' if True:\n', ('tests.test_adapters',)), ("a Lens's App is any App", 'adapters/timeline.py', ' if (ident, kind) in self.lenses:\n', @@ -2379,14 +2434,14 @@ def moved_before(rel: str, block: str, anchor: str) -> tuple: ' if first[0].get("replyTo") is not None:\n', ' if False:\n', ('tests.test_adapters',)), ("the port never reads who resolved a thread", 'adapters/threads.py', - 'resolved_by = accounts.actor(_account(by, "User")) if by is not None else None', + 'resolved_by = _resolver(by, first[0].get("author"), accounts) if by is not None else None', 'resolved_by = None', ('tests.test_adapters',)), ('who opened a thread is told by its name', 'adapters/threads.py', ' opened_by = accounts.actor(_account(first[0].get("author")))\n', ' opened_by = {"kind": "human", "name": str((first[0].get("author") or {}).get("login")), "can_write": True}\n', ('tests.test_adapters',)), ('a resolver is read by whatever type it gives', 'adapters/threads.py', - '_account(by, "User")', - '_account(by, by.get("__typename", "Bot"))', ('tests.test_adapters',)), + ' kind = accounts.typed(by.get("login"), ident)', + ' kind = by.get("__typename", "Bot")', ('tests.test_adapters',)), ('a short page of threads is whole', 'adapters/threads.py', ' if not isinstance(listed, dict) or not isinstance(listed.get("nodes"), list) or not isinstance(page, dict):\n return found, False\n', ' if not isinstance(listed, dict) or not isinstance(listed.get("nodes"), list) or not isinstance(page, dict):\n return found, True\n', ('tests.test_adapters',)), diff --git a/trials/P-53.json b/trials/P-53.json new file mode 100644 index 000000000..6e90448a9 --- /dev/null +++ b/trials/P-53.json @@ -0,0 +1,769 @@ +{ + "schema": "trial/1", + "trial": "P-53", + "question": "Does a pull request's timeline, read as GitHub's REST issue timeline and as GraphQL timelineItems of every item type, name who resolved a review thread, by account id and type; and does it link a reply whose thread's first comment was deleted to that comment or to its review; and does the repo's permission read of the login GraphQL's resolvedBy gives answer the account's id and type, a Bot for an App's bot and a User for a person?", + "pass": "By the Factory Builder's ruling on issue 331: read-only, by the Maintainer's gh login, on the canary's pull request 55, P-49's, whose thread PRRT_kwDOVFD6786vbPoG the trial-author App resolved and whose thread PRRT_kwDOVFD6786vbPrK lost its first comment 4354811408 (of review 5622401522) under reply 4354811614 (of review 5622401749). Read the REST issue timeline, every page, and GraphQL timelineItems, every page and every item type. Pass if both are read whole and say: (1) whether any item names the first thread's resolution, and if so its actor's account id and type; and (2) whether any item links reply 4354811614, or its review, to the deleted comment or to review 5622401522. Then, by the Factory Builder's ruling on issue 331, read the canary's permission of the login resolvedBy gives the App's resolution in P-49, combsmith-sf-trial-author[bot], and of the Maintainer, don-petry, as the threads port reads a person's write access. Pass too only if each answers a user with an id and a type: (3) whether the bot's id is resolvedBy's databaseId, 344141469, and its type a Bot, and the Maintainer's a User. This trial records behaviour; it fails only if a read cannot say these things.", + "repo": "combsmith/software-factory-canary", + "ran_at": "2026-10-26T04:36:24Z", + "exchanges": [ + { + "request": { + "as": { + "kind": "person", + "name": "don-petry" + }, + "via": "rest", + "call": "GET /repos/combsmith/software-factory-canary/issues/55/timeline?per_page=100 (gh api): the issue timeline of P-49's pull request, every event, as the Maintainer", + "headers": { + "accept": "application/vnd.github+json" + }, + "body": null + }, + "response": { + "status": 200, + "headers": { + "cache-control": "private, max-age=60, s-maxage=60", + "content-type": "application/json; charset=utf-8", + "date": "Mon, 26 Oct 2026 04:36:56 GMT", + "etag": "W/\"40c812e9b4e5362161d183046edfafdf42e9b728165b35c218abbe777c5b20b8\"", + "server": "github.com", + "vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "x-accepted-oauth-scopes": "repo", + "x-github-media-type": "github.v3; format=json", + "x-github-request-id": "F3C9:3F3782:13B863C:412036A:6ADED8E8", + "x-oauth-scopes": "admin:org, admin:org_hook, delete_repo, gist, read:packages, read:project, repo, workflow", + "x-ratelimit-limit": "5000", + "x-ratelimit-remaining": "4442", + "x-ratelimit-reset": "1792990361", + "x-ratelimit-resource": "core", + "x-ratelimit-used": "558" + }, + "body": [ + { + "sha": "efa1a2b35997026ba612194ea7cdc7a5a783afb8", + "node_id": "C_kwDOVFD679oAKGVmYTFhMmIzNTk5NzAyNmJhNjEyMTk0ZWE3Y2RjN2E1YTc4M2FmYjg", + "url": "https://api.github.com/repos/combsmith/software-factory-canary/git/commits/efa1a2b35997026ba612194ea7cdc7a5a783afb8", + "html_url": "https://github.com/combsmith/software-factory-canary/commit/efa1a2b35997026ba612194ea7cdc7a5a783afb8", + "author": { + "name": "combsmith-sf-trial-author[bot]", + "email": "344141469+combsmith-sf-trial-author[bot]@users.noreply.github.com", + "date": "2026-10-23T00:05:42Z" + }, + "committer": { + "name": "GitHub", + "email": "noreply@github.com", + "date": "2026-10-23T00:05:42Z" + }, + "tree": { + "sha": "048f707026c7e4598c79b6dc6e82c3fa2c150a68", + "url": "https://api.github.com/repos/combsmith/software-factory-canary/git/trees/048f707026c7e4598c79b6dc6e82c3fa2c150a68" + }, + "message": "Trial: trial-notes/p-49.md, added by the trial-author App", + "parents": [ + { + "sha": "fc7f25958fee6339ffaf2e80eb1264ff7249f788", + "url": "https://api.github.com/repos/combsmith/software-factory-canary/git/commits/fc7f25958fee6339ffaf2e80eb1264ff7249f788", + "html_url": "https://github.com/combsmith/software-factory-canary/commit/fc7f25958fee6339ffaf2e80eb1264ff7249f788" + } + ], + "verification": { + "verified": true, + "reason": "valid", + "signature": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJq2qTXCRC1aQ7uu5UhlAAA1esQAFc2s4x+/Y1iQ4I8I87pzZQT\nqav6DeD3uMzURYQZZyAfpjJ09ts9evtskOGKGkwjRneH1E8jUlLoYcgGUl29W2DF\nrhqAm9YSwURUwavSvrQYnjlvQlV+V940WhvFVLjwSqjV6BG1hLOegJqNogidkeD+\nK+3ldG2Ivpmew+xuu4WcJvX4SZh09atlNX2ljo+OzMMqXdHBlicDWheOQKsyxTyF\nPEiyLj0vFgux3RAylVRsbEYgByRjVnLdlfREZXIzd2mJPJXoOUfN+HZOH1JkZ0v7\nZAYs0xdEwTAyXn7rtaZaAZhyPQ32ixUZSv3+CoWSHBPZtT8VsVhaF/jJPKR8cjwe\nHZ//WS9beiBOWR5Wi7nfGsROJLuVpEzpCc+4X/brLphq9e04LZBy8qRomptqmgpk\nx/Hx8g0BbkUzMgz2+5UytPjwhKB6r3/1zinD9TdfF93zd11arAdrbMIj5myopK1K\nJdE7l6KXMv3OHRPK0/jOyw1B9mOfD0Wnt4Pr4t6YjWzFPJuJtL75RfM+/krjGOEv\nCAaQeCQDOsusg+PCBnAS5lwxO8fLA97Tc3na8RV2sjgiLc1xruKGoxI6i4GlOYFs\nysh3SEbS8kBK4iE3t4toKDEnBQaUqSaVBs1I/nL5L/N9UrpvjM6cmu/gYklAVedN\nBOSLapjzmmhcQIlIR1nG\n=8qvS\n-----END PGP SIGNATURE-----\n", + "payload": "tree 048f707026c7e4598c79b6dc6e82c3fa2c150a68\nparent fc7f25958fee6339ffaf2e80eb1264ff7249f788\nauthor combsmith-sf-trial-author[bot] <344141469+combsmith-sf-trial-author[bot]@users.noreply.github.com> 1792713942 -0500\ncommitter GitHub 1792713942 -0500\n\nTrial: trial-notes/p-49.md, added by the trial-author App", + "verified_at": "2026-10-23T00:05:43Z" + }, + "event": "committed" + }, + { + "id": 34005117547, + "node_id": "RRE_lADOVFD6788AAAABZP__888AAAAH6tzqaw", + "url": "https://api.github.com/repos/combsmith/software-factory-canary/issues/events/34005117547", + "actor": { + "login": "combsmith-sf-trial-author[bot]", + "id": 344141469, + "node_id": "BOT_kgDOFIMunQ", + "avatar_url": "https://avatars.githubusercontent.com/u/258516906?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D", + "html_url": "https://github.com/apps/combsmith-sf-trial-author", + "followers_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/received_events", + "type": "Bot", + "user_view_type": "public", + "site_admin": false + }, + "event": "review_requested", + "commit_id": null, + "commit_url": null, + "created_at": "2026-10-23T00:05:45Z", + "review_requester": { + "login": "combsmith-sf-trial-author[bot]", + "id": 344141469, + "node_id": "BOT_kgDOFIMunQ", + "avatar_url": "https://avatars.githubusercontent.com/u/258516906?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D", + "html_url": "https://github.com/apps/combsmith-sf-trial-author", + "followers_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/received_events", + "type": "Bot", + "user_view_type": "public", + "site_admin": false + }, + "requested_team": { + "name": "org-leads", + "id": 17372736, + "node_id": "T_kwDOD2inqs4BCRZA", + "slug": "org-leads", + "description": "Code owners team for review enforcement across all org repos (machine user + humans)", + "privacy": "closed", + "notification_setting": "notifications_enabled", + "url": "https://api.github.com/organizations/258516906/team/17372736", + "html_url": "https://github.com/orgs/combsmith/teams/org-leads", + "members_url": "https://api.github.com/organizations/258516906/team/17372736/members{/member}", + "repositories_url": "https://api.github.com/organizations/258516906/team/17372736/repos", + "type": "organization", + "organization_id": 258516906, + "permission": "maintain", + "permissions": { + "admin": false, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "access_source": "organization", + "parent": null + }, + "performed_via_github_app": null + }, + { + "id": 5622401062, + "node_id": "PRR_kwDOVFD6788AAAABTx8IJg", + "user": { + "login": "combsmith-sf-trial-author[bot]", + "id": 344141469, + "node_id": "BOT_kgDOFIMunQ", + "avatar_url": "https://avatars.githubusercontent.com/u/258516906?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D", + "html_url": "https://github.com/apps/combsmith-sf-trial-author", + "followers_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/received_events", + "type": "Bot", + "user_view_type": "public", + "site_admin": false + }, + "body": "A platform trial (issue 282): the first review thread, which the App resolves.", + "commit_id": "efa1a2b35997026ba612194ea7cdc7a5a783afb8", + "state": "commented", + "html_url": "https://github.com/combsmith/software-factory-canary/pull/55#pullrequestreview-5622401062", + "pull_request_url": "https://api.github.com/repos/combsmith/software-factory-canary/pulls/55", + "_links": { + "html": { + "href": "https://github.com/combsmith/software-factory-canary/pull/55#pullrequestreview-5622401062" + }, + "pull_request": { + "href": "https://api.github.com/repos/combsmith/software-factory-canary/pulls/55" + } + }, + "submitted_at": "2026-10-23T00:05:47Z", + "updated_at": "2026-10-23T00:05:47Z", + "author_association": "CONTRIBUTOR", + "event": "reviewed" + }, + { + "id": 5622401522, + "node_id": "PRR_kwDOVFD6788AAAABTx8J8g", + "user": { + "login": "combsmith-sf-trial-author[bot]", + "id": 344141469, + "node_id": "BOT_kgDOFIMunQ", + "avatar_url": "https://avatars.githubusercontent.com/u/258516906?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D", + "html_url": "https://github.com/apps/combsmith-sf-trial-author", + "followers_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/received_events", + "type": "Bot", + "user_view_type": "public", + "site_admin": false + }, + "body": "A platform trial (issue 282): the second review thread, whose first comment is deleted.", + "commit_id": "efa1a2b35997026ba612194ea7cdc7a5a783afb8", + "state": "commented", + "html_url": "https://github.com/combsmith/software-factory-canary/pull/55#pullrequestreview-5622401522", + "pull_request_url": "https://api.github.com/repos/combsmith/software-factory-canary/pulls/55", + "_links": { + "html": { + "href": "https://github.com/combsmith/software-factory-canary/pull/55#pullrequestreview-5622401522" + }, + "pull_request": { + "href": "https://api.github.com/repos/combsmith/software-factory-canary/pulls/55" + } + }, + "submitted_at": "2026-10-23T00:05:51Z", + "updated_at": "2026-10-23T00:05:51Z", + "author_association": "CONTRIBUTOR", + "event": "reviewed" + }, + { + "url": "https://api.github.com/repos/combsmith/software-factory-canary/issues/comments/6354097650", + "html_url": "https://github.com/combsmith/software-factory-canary/pull/55#issuecomment-6354097650", + "issue_url": "https://api.github.com/repos/combsmith/software-factory-canary/issues/55", + "id": 6354097650, + "node_id": "IC_kwDOVFD6788AAAABervV8g", + "user": { + "login": "coderabbitai[bot]", + "id": 136622811, + "node_id": "BOT_kgDOCCSy2w", + "avatar_url": "https://avatars.githubusercontent.com/in/347564?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/coderabbitai%5Bbot%5D", + "html_url": "https://github.com/apps/coderabbitai", + "followers_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/received_events", + "type": "Bot", + "user_view_type": "public", + "site_admin": false + }, + "created_at": "2026-10-23T00:05:52Z", + "updated_at": "2026-10-23T00:05:52Z", + "body": "\n\n\n\n\n> [!IMPORTANT]\n> ## Review skipped\n> \n> Bot user detected.\n> \n> To trigger a single review, invoke the `@coderabbitai review` command.\n> \n>
\n> \u2699\ufe0f Run configuration\n>
\n>
\n> \n> - **Source mode**: Auto\n> - **Repository**: Unavailable\n> - **Branch**: Unavailable\n> - **File**: No configuration file from this repository applied\n> - **Commit**: Unavailable\n> - **Layers**: Organization UI\n> - **Review profile**: ASSERTIVE\n> - **Plan**: Advanced\n> - **Run ID**: `aa390fd8-5c70-4ff4-af8e-b16d5aa33b4d`\n> \n>
\n>
\n>
\n> \n> You can disable this status message by setting the `reviews.review_status` to `false` in the CodeRabbit configuration file.\n> \n> Use the checkbox below for a quick retry:\n> - [ ] \ud83d\udd0d Trigger review\n\n\n\n\n- [ ] Autofix \u00b7 Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts\n\n\n\n\n\nThanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=combsmith/software-factory-canary&utm_content=55)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.\n\n
\n\u2764\ufe0f Share\n
\n
\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n
\n
\n
\n\n\nComment `@coderabbitai help` to get the list of available commands.\n\n", + "author_association": "NONE", + "reactions": { + "url": "https://api.github.com/repos/combsmith/software-factory-canary/issues/comments/6354097650/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": { + "id": 347564, + "client_id": "Iv1.6aaafe4fe882736b", + "slug": "coderabbitai", + "node_id": "A_kwHOB96YWc4ABU2s", + "owner": { + "login": "coderabbitai", + "id": 132028505, + "node_id": "O_kgDOB96YWQ", + "avatar_url": "https://avatars.githubusercontent.com/u/132028505?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/coderabbitai", + "html_url": "https://github.com/coderabbitai", + "followers_url": "https://api.github.com/users/coderabbitai/followers", + "following_url": "https://api.github.com/users/coderabbitai/following{/other_user}", + "gists_url": "https://api.github.com/users/coderabbitai/gists{/gist_id}", + "starred_url": "https://api.github.com/users/coderabbitai/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/coderabbitai/subscriptions", + "organizations_url": "https://api.github.com/users/coderabbitai/orgs", + "repos_url": "https://api.github.com/users/coderabbitai/repos", + "events_url": "https://api.github.com/users/coderabbitai/events{/privacy}", + "received_events_url": "https://api.github.com/users/coderabbitai/received_events", + "type": "Organization", + "user_view_type": "public", + "site_admin": false + }, + "name": "coderabbitai", + "description": "# Transforming Code Reviews with AI\r\n\r\n## Features\r\n\r\n**Automated Reviews**: Continuous reviews of the pull requests including incremental commits. \r\n\r\n**Summarization**: Generates high-level summary and a technical walkthrough of the PR changes.\u00a0\r\n\r\n**Line-by-line review**: Provides line-by-line suggestions committable with one click.\r\n\r\n**Codebase verification**: Verifies the impact on the overall codebase and identifies missing changes.\r\n\r\n**Insights into your code**: Ask any questions on your codebase within the pull request \r\n\r\n**Chat about your code** : Chat with the bot around your code.\u00a0The more you chat, the smarter it gets.\r\n\r\n**Issue Validation**: Validates the PR against the linked issues and identifies other related issues\u00a0\r\n\r\n\r\n\r\n", + "external_url": "https://coderabbit.ai?utm_source=cr_app&utm_medium=github", + "html_url": "https://github.com/apps/coderabbitai", + "created_at": "2023-06-14T15:47:27Z", + "updated_at": "2026-10-22T09:20:52Z", + "permissions": { + "actions": "read", + "checks": "write", + "contents": "write", + "discussions": "read", + "issues": "write", + "members": "read", + "merge_queues": "read", + "metadata": "read", + "pull_requests": "write", + "statuses": "write", + "workflows": "write" + }, + "events": [ + "issues", + "issue_comment", + "label", + "membership", + "merge_group", + "organization", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "pull_request_review_thread", + "release", + "repository", + "team" + ] + }, + "minimized": null, + "event": "commented", + "actor": { + "login": "coderabbitai[bot]", + "id": 136622811, + "node_id": "BOT_kgDOCCSy2w", + "avatar_url": "https://avatars.githubusercontent.com/in/347564?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/coderabbitai%5Bbot%5D", + "html_url": "https://github.com/apps/coderabbitai", + "followers_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/coderabbitai%5Bbot%5D/received_events", + "type": "Bot", + "user_view_type": "public", + "site_admin": false + } + }, + { + "id": 5622401749, + "node_id": "PRR_kwDOVFD6788AAAABTx8K1Q", + "user": { + "login": "combsmith-sf-trial-author[bot]", + "id": 344141469, + "node_id": "BOT_kgDOFIMunQ", + "avatar_url": "https://avatars.githubusercontent.com/u/258516906?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D", + "html_url": "https://github.com/apps/combsmith-sf-trial-author", + "followers_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/received_events", + "type": "Bot", + "user_view_type": "public", + "site_admin": false + }, + "body": null, + "commit_id": "efa1a2b35997026ba612194ea7cdc7a5a783afb8", + "state": "commented", + "html_url": "https://github.com/combsmith/software-factory-canary/pull/55#pullrequestreview-5622401749", + "pull_request_url": "https://api.github.com/repos/combsmith/software-factory-canary/pulls/55", + "_links": { + "html": { + "href": "https://github.com/combsmith/software-factory-canary/pull/55#pullrequestreview-5622401749" + }, + "pull_request": { + "href": "https://api.github.com/repos/combsmith/software-factory-canary/pulls/55" + } + }, + "submitted_at": "2026-10-23T00:05:53Z", + "updated_at": "2026-10-23T00:05:53Z", + "author_association": "CONTRIBUTOR", + "event": "reviewed" + }, + { + "id": 34005294787, + "node_id": "CE_lADOVFD6788AAAABZP__888AAAAH6t-eww", + "url": "https://api.github.com/repos/combsmith/software-factory-canary/issues/events/34005294787", + "actor": { + "login": "don-petry", + "id": 36422719, + "node_id": "MDQ6VXNlcjM2NDIyNzE5", + "avatar_url": "https://avatars.githubusercontent.com/u/36422719?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/don-petry", + "html_url": "https://github.com/don-petry", + "followers_url": "https://api.github.com/users/don-petry/followers", + "following_url": "https://api.github.com/users/don-petry/following{/other_user}", + "gists_url": "https://api.github.com/users/don-petry/gists{/gist_id}", + "starred_url": "https://api.github.com/users/don-petry/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/don-petry/subscriptions", + "organizations_url": "https://api.github.com/users/don-petry/orgs", + "repos_url": "https://api.github.com/users/don-petry/repos", + "events_url": "https://api.github.com/users/don-petry/events{/privacy}", + "received_events_url": "https://api.github.com/users/don-petry/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "event": "closed", + "commit_id": null, + "commit_url": null, + "created_at": "2026-10-23T00:08:53Z", + "state_reason": null, + "intent": null, + "performed_via_github_app": null + }, + { + "id": 34005296451, + "node_id": "HRDE_lADOVFD6788AAAABZP__888AAAAH6t-lQw", + "url": "https://api.github.com/repos/combsmith/software-factory-canary/issues/events/34005296451", + "actor": { + "login": "don-petry", + "id": 36422719, + "node_id": "MDQ6VXNlcjM2NDIyNzE5", + "avatar_url": "https://avatars.githubusercontent.com/u/36422719?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/don-petry", + "html_url": "https://github.com/don-petry", + "followers_url": "https://api.github.com/users/don-petry/followers", + "following_url": "https://api.github.com/users/don-petry/following{/other_user}", + "gists_url": "https://api.github.com/users/don-petry/gists{/gist_id}", + "starred_url": "https://api.github.com/users/don-petry/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/don-petry/subscriptions", + "organizations_url": "https://api.github.com/users/don-petry/orgs", + "repos_url": "https://api.github.com/users/don-petry/repos", + "events_url": "https://api.github.com/users/don-petry/events{/privacy}", + "received_events_url": "https://api.github.com/users/don-petry/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false + }, + "event": "head_ref_deleted", + "commit_id": null, + "commit_url": null, + "created_at": "2026-10-23T00:08:55Z", + "performed_via_github_app": null + } + ] + } + }, + { + "request": { + "as": { + "kind": "person", + "name": "don-petry" + }, + "via": "graphql", + "call": "POST /graphql (gh api graphql): timelineItems of P-49's pull request, every item type, as the Maintainer", + "headers": { + "accept": "application/vnd.github+json" + }, + "body": { + "query": "query($owner: String!, $name: String!, $number: Int!, $after: String) {\n repository(owner: $owner, name: $name) {\n pullRequest(number: $number) {\n timelineItems(first: 100, after: $after) {\n totalCount\n pageInfo { hasNextPage endCursor }\n nodes {\n __typename\n ... on Node { id }\n ... on PullRequestReview {\n databaseId state createdAt\n author { __typename login ... on Bot { databaseId } ... on User { databaseId } }\n comments(first: 20) { totalCount nodes { databaseId createdAt replyTo { databaseId } author { __typename login } } }\n }\n ... on PullRequestReviewThread {\n isResolved\n resolvedBy { __typename login databaseId }\n comments(first: 20) { totalCount nodes { databaseId replyTo { databaseId } author { __typename login } } }\n }\n ... on ClosedEvent { createdAt actor { __typename login ... on Bot { databaseId } ... on User { databaseId } } }\n }\n }\n }\n }\n}\n", + "variables": { + "owner": "combsmith", + "name": "software-factory-canary", + "number": 55, + "after": null + } + } + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8", + "date": "Mon, 26 Oct 2026 04:36:57 GMT", + "server": "github.com", + "vary": "Accept-Encoding, Accept, X-Requested-With", + "x-accepted-oauth-scopes": "repo", + "x-github-media-type": "github.v4; format=json", + "x-github-request-id": "F3D0:3C9D8:1476DF7:43DA919:6ADED8E9", + "x-oauth-scopes": "admin:org, admin:org_hook, delete_repo, gist, read:packages, read:project, repo, workflow", + "x-ratelimit-limit": "5000", + "x-ratelimit-remaining": "4618", + "x-ratelimit-reset": "1792990115", + "x-ratelimit-resource": "graphql", + "x-ratelimit-used": "382" + }, + "body": { + "data": { + "repository": { + "pullRequest": { + "timelineItems": { + "totalCount": 8, + "pageInfo": { + "hasNextPage": false, + "endCursor": "Y3Vyc29yOnYyOpPPAAABoWYW1dgBqzM0MDA1Mjk2NDUx" + }, + "nodes": [ + { + "__typename": "PullRequestCommit", + "id": "PURC_lADOVFD6788AAAABKJTb7toAKGVmYTFhMmIzNTk5NzAyNmJhNjEyMTk0ZWE3Y2RjN2E1YTc4M2FmYjg" + }, + { + "__typename": "ReviewRequestedEvent", + "id": "RRE_lADOVFD6788AAAABZP__888AAAAH6tzqaw" + }, + { + "__typename": "PullRequestReview", + "id": "PRR_kwDOVFD6788AAAABTx8IJg", + "databaseId": 5622401062, + "state": "COMMENTED", + "createdAt": "2026-10-23T00:05:47Z", + "author": { + "__typename": "Bot", + "login": "combsmith-sf-trial-author", + "databaseId": 344141469 + }, + "comments": { + "totalCount": 1, + "nodes": [ + { + "databaseId": 4354811044, + "createdAt": "2026-10-23T00:05:47Z", + "replyTo": null, + "author": { + "__typename": "Bot", + "login": "combsmith-sf-trial-author" + } + } + ] + } + }, + { + "__typename": "PullRequestReview", + "id": "PRR_kwDOVFD6788AAAABTx8J8g", + "databaseId": 5622401522, + "state": "COMMENTED", + "createdAt": "2026-10-23T00:05:51Z", + "author": { + "__typename": "Bot", + "login": "combsmith-sf-trial-author", + "databaseId": 344141469 + }, + "comments": { + "totalCount": 0, + "nodes": [] + } + }, + { + "__typename": "IssueComment", + "id": "IC_kwDOVFD6788AAAABervV8g" + }, + { + "__typename": "PullRequestReview", + "id": "PRR_kwDOVFD6788AAAABTx8K1Q", + "databaseId": 5622401749, + "state": "COMMENTED", + "createdAt": "2026-10-23T00:05:53Z", + "author": { + "__typename": "Bot", + "login": "combsmith-sf-trial-author", + "databaseId": 344141469 + }, + "comments": { + "totalCount": 1, + "nodes": [ + { + "databaseId": 4354811614, + "createdAt": "2026-10-23T00:05:53Z", + "replyTo": null, + "author": { + "__typename": "Bot", + "login": "combsmith-sf-trial-author" + } + } + ] + } + }, + { + "__typename": "ClosedEvent", + "id": "CE_lADOVFD6788AAAABZP__888AAAAH6t-eww", + "createdAt": "2026-10-23T00:08:53Z", + "actor": { + "__typename": "User", + "login": "don-petry", + "databaseId": 36422719 + } + }, + { + "__typename": "HeadRefDeletedEvent", + "id": "HRDE_lADOVFD6788AAAABZP__888AAAAH6t-lQw" + } + ] + } + } + } + } + } + } + }, + { + "request": { + "as": { + "kind": "person", + "name": "don-petry" + }, + "via": "rest", + "call": "GET /repos/combsmith/software-factory-canary/collaborators/combsmith-sf-trial-author%5Bbot%5D/permission (gh api): the trial-author App's bot, by the login P-49's resolvedBy gives, as the Maintainer", + "headers": { + "accept": "application/vnd.github+json" + }, + "body": null + }, + "response": { + "status": 200, + "headers": { + "cache-control": "private, max-age=60, s-maxage=60", + "content-type": "application/json; charset=utf-8", + "date": "Mon, 26 Oct 2026 05:01:09 GMT", + "etag": "W/\"c74339608a61437cebf8b911111191dd2b87337efc9984e0c3de8f8627cc78fb\"", + "server": "github.com", + "vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "x-accepted-oauth-scopes": "", + "x-github-media-type": "github.v3; format=json", + "x-github-request-id": "F83F:3C53D7:25A4C38:7B04913:6ADEDE95", + "x-oauth-scopes": "admin:org, admin:org_hook, delete_repo, gist, read:packages, read:project, repo, workflow", + "x-ratelimit-limit": "5000", + "x-ratelimit-remaining": "4989", + "x-ratelimit-reset": "1792994201", + "x-ratelimit-resource": "core", + "x-ratelimit-used": "11" + }, + "body": { + "permission": "none", + "user": { + "login": "combsmith-sf-trial-author[bot]", + "id": 344141469, + "node_id": "BOT_kgDOFIMunQ", + "avatar_url": "https://avatars.githubusercontent.com/u/258516906?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D", + "html_url": "https://github.com/apps/combsmith-sf-trial-author", + "followers_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/combsmith-sf-trial-author%5Bbot%5D/received_events", + "type": "Bot", + "user_view_type": "public", + "site_admin": false, + "permissions": { + "admin": false, + "maintain": false, + "push": false, + "triage": false, + "pull": false + }, + "role_name": "" + }, + "role_name": "" + } + } + }, + { + "request": { + "as": { + "kind": "person", + "name": "don-petry" + }, + "via": "rest", + "call": "GET /repos/combsmith/software-factory-canary/collaborators/don-petry/permission (gh api): the Maintainer, as the Maintainer", + "headers": { + "accept": "application/vnd.github+json" + }, + "body": null + }, + "response": { + "status": 200, + "headers": { + "cache-control": "private, max-age=60, s-maxage=60", + "content-type": "application/json; charset=utf-8", + "date": "Mon, 26 Oct 2026 05:01:09 GMT", + "etag": "W/\"dddb4707225692e6cbb88a070e2956879f27a856f4db790196c9689a9426daa1\"", + "server": "github.com", + "vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", + "x-accepted-oauth-scopes": "", + "x-github-media-type": "github.v3; format=json", + "x-github-request-id": "F841:A633F:257FF54:7AAC8C1:6ADEDE95", + "x-oauth-scopes": "admin:org, admin:org_hook, delete_repo, gist, read:packages, read:project, repo, workflow", + "x-ratelimit-limit": "5000", + "x-ratelimit-remaining": "4988", + "x-ratelimit-reset": "1792994201", + "x-ratelimit-resource": "core", + "x-ratelimit-used": "12" + }, + "body": { + "permission": "admin", + "user": { + "login": "don-petry", + "id": 36422719, + "node_id": "MDQ6VXNlcjM2NDIyNzE5", + "avatar_url": "https://avatars.githubusercontent.com/u/36422719?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/don-petry", + "html_url": "https://github.com/don-petry", + "followers_url": "https://api.github.com/users/don-petry/followers", + "following_url": "https://api.github.com/users/don-petry/following{/other_user}", + "gists_url": "https://api.github.com/users/don-petry/gists{/gist_id}", + "starred_url": "https://api.github.com/users/don-petry/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/don-petry/subscriptions", + "organizations_url": "https://api.github.com/users/don-petry/orgs", + "repos_url": "https://api.github.com/users/don-petry/repos", + "events_url": "https://api.github.com/users/don-petry/events{/privacy}", + "received_events_url": "https://api.github.com/users/don-petry/received_events", + "type": "User", + "user_view_type": "public", + "site_admin": false, + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "role_name": "admin" + }, + "role_name": "admin" + } + } + } + ], + "removed": [ + "exchanges[0].request.headers.authorization", + "exchanges[1].request.headers.authorization", + "exchanges[2].request.headers.authorization", + "exchanges[3].request.headers.authorization" + ], + "verdict": "pass" +}