| 1 | # GitHub connector probe, 2026-11-23 |
| 2 | |
| 3 | Gate 1 evidence for the [approved connector spec](2026-11-22-equipo-github-connector.md). |
| 4 | Controller ran the probes against scratch organisation `oficina-equipo-test`, |
| 5 | repositories `probe` and `probe-other`, private App `oficina-equipo-probe-acbafc` |
| 6 | (id `5891080`). This document records the supplied sanitized reports; the seam |
| 7 | implementation did not rerun the probes or read their credentials. |
| 8 | |
| 9 | Scripts outside this repository: `agent-tools/github-probe/probe.py` and |
| 10 | `agent-tools/github-probe/probe_actions.py`. The full probe report below is the |
| 11 | fresh run saved at 2026-11-23 17:16:51 UTC. The Actions report was saved at |
| 12 | 17:16:21 UTC. Credentials, JWTs and installation tokens are deliberately absent. |
| 13 | |
| 14 | ## Organisation manifest flow: confirmed |
| 15 | |
| 16 | The controller confirms that private App `oficina-equipo-probe-acbafc`, |
| 17 | ID `5891080`, was created through the manifest flow in organisation |
| 18 | `oficina-equipo-test` and installed there on `probe` and `probe-other`. |
| 19 | The saved full report confirms the installation lookup returned `200`, |
| 20 | with exactly G4 permissions and no webhook events. It does not retain |
| 21 | creation response bodies or the conversion code. |
| 22 | |
| 23 | The reviewed external `agent-tools/github-probe/manifest_server.py` binds |
| 24 | only loopback. Its form posts the private App manifest with G4 permissions, |
| 25 | an inactive webhook and empty default events to |
| 26 | `https://github.com/organizations/oficina-equipo-test/settings/apps/new`. |
| 27 | The callback checks its random state and the one-time code before |
| 28 | `POST https://api.github.com/app-manifests/{code}/conversions`. |
| 29 | It writes the returned credentials privately with mode 0600 and redirects |
| 30 | to `https://github.com/apps/{slug}/installations/new`. Its creation response log contains only |
| 31 | the App ID and slug. Neither credentials nor conversion values were read |
| 32 | or copied for this record. |
| 33 | |
| 34 | ## Calls and checks |
| 35 | |
| 36 | All REST calls use `https://api.github.com`, API version `2022-11-28`, Accept |
| 37 | `application/vnd.github+json`, User-Agent `equipo-probe`. App authentication |
| 38 | is a short RS256 JWT. Installation-token calls use the minted token. |
| 39 | `{installation}`, `{first_sha}`, `{judged_sha}`, `{merge_sha}`, `{pr}` and |
| 40 | `{graphql_id}` below are response-derived identifiers. They are placeholders, |
| 41 | not invented captured values: the report does not retain these identifiers. |
| 42 | |
| 43 | | Call or operation | Request and exact reported answer | |
| 44 | | --- | --- | |
| 45 | | `GET /orgs/oficina-equipo-test/installation` | `200`; permissions exactly contents/write, pull_requests/write, checks/read, statuses/read, actions/read, metadata/read; events `[]`. | |
| 46 | | `POST /app/installations/{installation}/access_tokens` | Body `{"repositories":["probe"],"permissions":{"contents":"write","pull_requests":"write","checks":"read","statuses":"read","actions":"read"}}`; `201`, lifetime `3600 s`, repository list `["probe"]`. | |
| 47 | | `GET /repos/oficina-equipo-test/probe-other` | Scoped token: `404`. | |
| 48 | | `GET /repos/oficina-equipo-test/probe` | Scoped token: `200`. | |
| 49 | | `POST /app/installations/{installation}/access_tokens` | Read token body `{"repositories":["probe"],"permissions":{"contents":"read","pull_requests":"read"}}`. Its response status was not separately retained. | |
| 50 | | `GET /repos/oficina-equipo-test/probe/git/ref/heads/main` | Fetch the SHA used by the read-token branch attempt; response status not separately retained. | |
| 51 | | `POST /repos/oficina-equipo-test/probe/git/refs` | Read token body `{"ref":"refs/heads/equipo/readonly-should-fail","sha":"{main_sha}"}`; `403`. | |
| 52 | | `git clone -q https://github.com/oficina-equipo-test/probe.git` | Installation token through a private askpass file, username `x-access-token`; exit 0. Helpers disabled. | |
| 53 | | First branch push | `git checkout -q -b equipo/probe-1795454216`; write `probe.txt` containing `first\n`; commit `Probe: first change`; `git push -q origin equipo/probe-1795454216`: exit 0. Git's PR-link answer is preserved below. | |
| 54 | | Workflow push | Add `.github/workflows/equipo-{unix_time}.yml`, contents `on: push\njobs: {}\n`; commit `Probe: workflow change should be refused`; same push: nonzero, exact last stderr line below. Reset to `{first_sha}` afterward. The refreshed script uses an existing-directory-safe mkdir and a fresh filename because the repository now contains a real workflow. | |
| 55 | | `POST /repos/oficina-equipo-test/probe/pulls` | Body `{"title":"Probe: draft PR","head":"equipo/probe-1795454216","base":"main","body":"Equipo connector probe.","draft":true}`; `201 draft=True`. | |
| 56 | | Second push | `probe.txt` becomes `first\nsecond\n`; commit `Probe: second change`; push the same branch, obtain `{judged_sha}`. | |
| 57 | | `PATCH /repos/oficina-equipo-test/probe/pulls/{pr}` | Body `{"draft":false}`; attempted by script but status not retained and not the proof of readiness. | |
| 58 | | `POST /graphql` | Query `mutation($id:ID!){markPullRequestReadyForReview(input:{pullRequestId:$id}){pullRequest{isDraft}}}`, variables `{"id":"{graphql_id}"}`; `graphql status 200`. The script checks HTTP success, not the GraphQL errors field or returned isDraft. Controller reports the PR was marked ready. | |
| 59 | | `PUT /repos/oficina-equipo-test/probe/pulls/{pr}/merge` | Body `{"sha":"{first_sha}","merge_method":"merge"}`; `409 Head branch was modified. Review and try the merge again.` | |
| 60 | | `GET /repos/oficina-equipo-test/probe/commits/{judged_sha}/check-runs` | `200`. | |
| 61 | | `GET /repos/oficina-equipo-test/probe/commits/{judged_sha}/status` | `200`. | |
| 62 | | `GET /repos/oficina-equipo-test/probe/actions/runs?per_page=1` | `200`. | |
| 63 | | `PUT /repos/oficina-equipo-test/probe/pulls/{pr}/merge` | Body `{"sha":"{judged_sha}","merge_method":"merge"}`; `200`, script also checks `merged == true`. | |
| 64 | | `GET /repos/oficina-equipo-test/probe/commits/{merge_sha}` | `parents=2`. | |
| 65 | | `DELETE /installation/token` | `204`. | |
| 66 | | `GET /repos/oficina-equipo-test/probe` after revocation | `401` immediately. Read token also revoked; scratch directory removed. | |
| 67 | |
| 68 | ## Actions on an App push: confirmed |
| 69 | |
| 70 | Paul installed `.github/workflows/probe.yml` through `gh`, since the App has |
| 71 | no workflow write permission. It runs on pushes to non-main branches and on |
| 72 | pull requests. The Actions script looks up the installation, then mints a |
| 73 | one-repository token with contents/write, actions/read and checks/read. It |
| 74 | clones, creates `equipo/actions-{unix_time}`, writes `a.txt` containing `x\n`, |
| 75 | commits `Probe: does Actions run?`, and pushes with that token. It polls |
| 76 | `GET /repos/oficina-equipo-test/probe/actions/runs?head_sha={sha}` every 10 |
| 77 | seconds, up to 30 times, then reads |
| 78 | `GET /repos/oficina-equipo-test/probe/commits/{sha}/check-runs` with the same |
| 79 | token. Observed event `push`, completed/success; check `check`, completed/success. |
| 80 | Finally it revokes the token and removes scratch. |
| 81 | |
| 82 | ## Exact sanitized reports |
| 83 | |
| 84 | `probe-20261123T171651Z.txt`: |
| 85 | |
| 86 | ```text |
| 87 | { |
| 88 | "installation_found": { |
| 89 | "ok": true, |
| 90 | "detail": "status 200" |
| 91 | }, |
| 92 | "installation_permissions_match_G4": { |
| 93 | "ok": true, |
| 94 | "detail": "{\"checks\": \"read\", \"actions\": \"read\", \"contents\": \"write\", \"metadata\": \"read\", \"statuses\": \"read\", \"pull_requests\": \"write\"}" |
| 95 | }, |
| 96 | "no_webhook_events": { |
| 97 | "ok": true, |
| 98 | "detail": "[]" |
| 99 | }, |
| 100 | "scoped_token_minted": { |
| 101 | "ok": true, |
| 102 | "detail": "status 201" |
| 103 | }, |
| 104 | "token_lifetime_about_one_hour": { |
| 105 | "ok": true, |
| 106 | "detail": "3600 s" |
| 107 | }, |
| 108 | "token_scoped_to_one_repo": { |
| 109 | "ok": true, |
| 110 | "detail": "[\"probe\"]" |
| 111 | }, |
| 112 | "other_repo_unreachable": { |
| 113 | "ok": true, |
| 114 | "detail": "status 404" |
| 115 | }, |
| 116 | "own_repo_reachable": { |
| 117 | "ok": true, |
| 118 | "detail": "status 200" |
| 119 | }, |
| 120 | "read_token_cannot_create_branch": { |
| 121 | "ok": true, |
| 122 | "detail": "status 403" |
| 123 | }, |
| 124 | "clone_with_installation_token": { |
| 125 | "ok": true, |
| 126 | "detail": "" |
| 127 | }, |
| 128 | "push_branch_with_token": { |
| 129 | "ok": true, |
| 130 | "detail": "\nremote: Create a pull request for 'equipo/probe-1795454216' on GitHub by visiting: \nremote: https://github.com/oficina-equipo-test/probe/pull/new/equipo/probe-1795454216 \nremote: \n" |
| 131 | }, |
| 132 | "workflow_file_push_refused": { |
| 133 | "ok": true, |
| 134 | "detail": "error: failed to push some refs to 'https://github.com/oficina-equipo-test/probe.git'" |
| 135 | }, |
| 136 | "draft_pr_opened": { |
| 137 | "ok": true, |
| 138 | "detail": "status 201 draft=True" |
| 139 | }, |
| 140 | "draft_marked_ready": { |
| 141 | "ok": true, |
| 142 | "detail": "graphql status 200" |
| 143 | }, |
| 144 | "merge_refused_for_stale_sha": { |
| 145 | "ok": true, |
| 146 | "detail": "status 409 Head branch was modified. Review and try the merge again." |
| 147 | }, |
| 148 | "check_runs_readable": { |
| 149 | "ok": true, |
| 150 | "detail": "status 200" |
| 151 | }, |
| 152 | "commit_status_readable": { |
| 153 | "ok": true, |
| 154 | "detail": "status 200" |
| 155 | }, |
| 156 | "actions_runs_readable": { |
| 157 | "ok": true, |
| 158 | "detail": "status 200" |
| 159 | }, |
| 160 | "merge_pinned_to_judged_sha": { |
| 161 | "ok": true, |
| 162 | "detail": "status 200" |
| 163 | }, |
| 164 | "merge_commit_has_two_parents": { |
| 165 | "ok": true, |
| 166 | "detail": "parents=2" |
| 167 | }, |
| 168 | "token_revoked": { |
| 169 | "ok": true, |
| 170 | "detail": "status 204" |
| 171 | }, |
| 172 | "revoked_token_refused": { |
| 173 | "ok": true, |
| 174 | "detail": "status 401" |
| 175 | } |
| 176 | } |
| 177 | PASS |
| 178 | ``` |
| 179 | |
| 180 | `probe-actions-20261123T171621Z.txt`: |
| 181 | |
| 182 | ```text |
| 183 | pushed True |
| 184 | { |
| 185 | "actions_run_triggered_by_app_push": true, |
| 186 | "status": "completed", |
| 187 | "conclusion": "success", |
| 188 | "event": "push" |
| 189 | } |
| 190 | check_runs_on_commit: 200 [('check', 'completed', 'success')] |
| 191 | ``` |
| 192 | |
| 193 | ## CARLOS egress: PASS |
| 194 | |
| 195 | The controller confirmed this gate at about 19:12 UTC on 2026-11-23, using a |
| 196 | throwaway CARLOS app with default capabilities, as Equipo has, on the bds |
| 197 | fleet in Dublin, host `annie-welding`. It made the same unauthenticated |
| 198 | request to `https://api.github.com/meta`. The app was deleted afterward. |
| 199 | The two observed answers supplied by the controller were: |
| 200 | |
| 201 | ```text |
| 202 | https://api.github.com/meta reachable: true; status: 200; latency: 38ms; TLS peer: 4.208.26.200:443 |
| 203 | https://api.github.com/meta reachable: true; status: 200; latency: 11ms; TLS peer: 4.208.26.200:443 |
| 204 | ``` |
| 205 | |
| 206 | The control, `www.google.com/generate_204`, returned 204. No GitHub credential |
| 207 | was used. This establishes CARLOS egress with Equipo's default capabilities |
| 208 | and meets the entry gate for implementing Connect GitHub. |
| 209 | |
| 210 | The diagnostic command landed on main as `33fd8660`. It has not yet run in |
| 211 | the Equipo production instance. Running `check-github` there after the next |
| 212 | production upgrade remains confirmation. The temporary-app method was used |
| 213 | because staging restaging was blocked by an unrelated corrupt platform |
| 214 | replica of equipo-staging's database, tree `chat_events`, dating from |
| 215 | 2026-11-23 12:00 to 12:30 UTC. Staging stayed on `474c4f61`; the controller |
| 216 | reported the production replica clean and did not bypass the release's |
| 217 | in-flight or backup checks. |
| 218 | |
| 219 | ## Gate 1 items still open |
| 220 | |
| 221 | - Exercise every row of the merge response table, including review, branch |
| 222 | protection, CI and merge queue cases, in the later merge implementation. |
| 223 | - Capture the workflow-push refusal cause line, as detailed below. |
| 224 | |
| 225 | The completed checks above do not claim these remaining gates passed. |
| 226 | |
| 227 | ### Workflow refusal cause still to capture |
| 228 | |
| 229 | The saved report retains only: |
| 230 | |
| 231 | ```text |
| 232 | error: failed to push some refs to 'https://github.com/oficina-equipo-test/probe.git' |
| 233 | ``` |
| 234 | |
| 235 | It proves a nonzero push exit, but does not retain GitHub's cause line. |
| 236 | Capturing that exact remote refusal, specifically the missing workflows |
| 237 | permission, remains open. The complete merge table remains open as recorded |
| 238 | above. The organisation manifest flow, Actions on an App push and CARLOS |
| 239 | egress are confirmed, with the CARLOS method and production confirmation |
| 240 | remaining explicitly distinguished above. |
| 241 | |
| 242 | ## Branch A inventory-token gate, 2026-11-23 20:15 UTC |
| 243 | |
| 244 | The controller ran `agent-tools/github-probe/probe_inventory.py` against the |
| 245 | probe GitHub App installed on `oficina-equipo-test`. It minted two tokens with |
| 246 | exactly metadata read, listed repositories, compared conditional requests with |
| 247 | the same token and a fresh token, attempted a contents read, and revoked both. |
| 248 | The script uses the controller's credentials outside the repository. Branch A |
| 249 | uses generated keys only. No token, key or ETag value is copied here; ETags in |
| 250 | this saved report are eight-character SHA-256 prefixes. |
| 251 | |
| 252 | The token response may omit `repositories`, as it did for this all-repositories |
| 253 | installation. Item permission booleans are all false and do not establish reach. |
| 254 | A token change invalidates cached ETags. The metadata-only token remains in |
| 255 | instance memory until 30 seconds before its one-hour expiry or invalidation. |
| 256 | |
| 257 | Verbatim sanitized report `probe-inventory-20261123T201513Z.txt`: |
| 258 | |
| 259 | ```json |
| 260 | { |
| 261 | "calls": [ |
| 262 | { |
| 263 | "call": "POST /app/installations/{id}/access_tokens {permissions:{metadata:read}} (token A)", |
| 264 | "status": 201, |
| 265 | "permissions": { |
| 266 | "metadata": "read" |
| 267 | }, |
| 268 | "repository_selection": "all", |
| 269 | "repositories_field_present": false, |
| 270 | "lifetime_s": 3600, |
| 271 | "token_prefix": "ghs_" |
| 272 | }, |
| 273 | { |
| 274 | "call": "GET /installation/repositories?per_page=100 (token A, first)", |
| 275 | "status": 200, |
| 276 | "if_none_match_sent": false, |
| 277 | "etag_hash": "20ff57d5", |
| 278 | "etag_weak": false, |
| 279 | "vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", |
| 280 | "cache_control": "private, max-age=60, s-maxage=60", |
| 281 | "x_ratelimit_used_present": true, |
| 282 | "total_count": 2, |
| 283 | "repositories": [ |
| 284 | "probe", |
| 285 | "probe-other" |
| 286 | ], |
| 287 | "repo_ids_present": true, |
| 288 | "permissions_in_items": [ |
| 289 | "{\"admin\": false, \"maintain\": false, \"push\": false, \"triage\": false, \"pull\": false}" |
| 290 | ] |
| 291 | }, |
| 292 | { |
| 293 | "call": "GET /installation/repositories?per_page=100 (token A, If-None-Match from token A)", |
| 294 | "status": 304, |
| 295 | "if_none_match_sent": true, |
| 296 | "etag_hash": "20ff57d5", |
| 297 | "etag_weak": false, |
| 298 | "vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", |
| 299 | "cache_control": "private, max-age=60, s-maxage=60", |
| 300 | "x_ratelimit_used_present": true, |
| 301 | "total_count": null, |
| 302 | "repositories": null, |
| 303 | "repo_ids_present": null, |
| 304 | "permissions_in_items": null |
| 305 | }, |
| 306 | { |
| 307 | "call": "POST /app/installations/{id}/access_tokens {permissions:{metadata:read}} (token B, fresh)", |
| 308 | "status": 201, |
| 309 | "permissions": { |
| 310 | "metadata": "read" |
| 311 | }, |
| 312 | "repository_selection": "all", |
| 313 | "repositories_field_present": false, |
| 314 | "lifetime_s": 3600, |
| 315 | "token_prefix": "ghs_" |
| 316 | }, |
| 317 | { |
| 318 | "call": "GET /installation/repositories?per_page=100 (token B, If-None-Match from token A)", |
| 319 | "status": 200, |
| 320 | "if_none_match_sent": true, |
| 321 | "etag_hash": "ce4399ed", |
| 322 | "etag_weak": false, |
| 323 | "vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", |
| 324 | "cache_control": "private, max-age=60, s-maxage=60", |
| 325 | "x_ratelimit_used_present": true, |
| 326 | "total_count": 2, |
| 327 | "repositories": [ |
| 328 | "probe", |
| 329 | "probe-other" |
| 330 | ], |
| 331 | "repo_ids_present": true, |
| 332 | "permissions_in_items": [ |
| 333 | "{\"admin\": false, \"maintain\": false, \"push\": false, \"triage\": false, \"pull\": false}" |
| 334 | ] |
| 335 | }, |
| 336 | { |
| 337 | "call": "GET /installation/repositories?per_page=100 (token B, unconditional)", |
| 338 | "status": 200, |
| 339 | "if_none_match_sent": false, |
| 340 | "etag_hash": "ce4399ed", |
| 341 | "etag_weak": false, |
| 342 | "vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", |
| 343 | "cache_control": "private, max-age=60, s-maxage=60", |
| 344 | "x_ratelimit_used_present": true, |
| 345 | "total_count": 2, |
| 346 | "repositories": [ |
| 347 | "probe", |
| 348 | "probe-other" |
| 349 | ], |
| 350 | "repo_ids_present": true, |
| 351 | "permissions_in_items": [ |
| 352 | "{\"admin\": false, \"maintain\": false, \"push\": false, \"triage\": false, \"pull\": false}" |
| 353 | ] |
| 354 | }, |
| 355 | { |
| 356 | "call": "GET /installation/repositories?per_page=100 (token B, If-None-Match from token B)", |
| 357 | "status": 304, |
| 358 | "if_none_match_sent": true, |
| 359 | "etag_hash": "ce4399ed", |
| 360 | "etag_weak": false, |
| 361 | "vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With", |
| 362 | "cache_control": "private, max-age=60, s-maxage=60", |
| 363 | "x_ratelimit_used_present": true, |
| 364 | "total_count": null, |
| 365 | "repositories": null, |
| 366 | "repo_ids_present": null, |
| 367 | "permissions_in_items": null |
| 368 | }, |
| 369 | { |
| 370 | "call": "GET /repos/{org}/probe/contents/README.md (token A)", |
| 371 | "status": 403 |
| 372 | }, |
| 373 | { |
| 374 | "call": "DELETE /installation/token (A)", |
| 375 | "status": 204 |
| 376 | }, |
| 377 | { |
| 378 | "call": "DELETE /installation/token (B)", |
| 379 | "status": 204 |
| 380 | }, |
| 381 | { |
| 382 | "call": "GET /installation/repositories after revoke (token A)", |
| 383 | "status": 401 |
| 384 | } |
| 385 | ], |
| 386 | "installation": { |
| 387 | "status": 200, |
| 388 | "repository_selection": "all", |
| 389 | "suspended_at": null |
| 390 | }, |
| 391 | "etag_same_across_tokens": false |
| 392 | } |
| 393 | ``` |
| 394 | |