Conversation
…Hub-status Closes Gemini's #2 v1-hardening recommendation: convert the GitHub-status check from behavioral habit into operational tool. Companion to poll-pr-gate.ts: - poll-pr-gate.ts asks "is this PR ready to merge?" - check-github-status.ts asks "is GitHub itself healthy enough that the answer can be trusted?" ## What it does Queries `https://www.githubstatus.com/api/v2/summary.json` and classifies into a structured report: - `overall`: operational / degraded / outage / maintenance - `degradedComponents`: array of non-operational components (name + status) - `factoryRelevant`: per-component status restricted to the factory's load-bearing surfaces (Pull Requests / Actions / API Requests / Webhooks / Git Operations / Issues — per the GitHub-status reference memory file) - `decision`: proceed / proceed-with-verify / halt - `description`: human-readable status text ## Exit codes (consumable by autonomous-loop pre-flight) - 0 — operational; safe to proceed - 1 — invocation / dependency error - 2 — fetch failed (network / DNS / cloudflare) - 3 — JSON parse failed - 8 — degraded; proceed-but-verify (per the rule from poll-the-gate memory file — proceed when gate surfaces aren't impacted, verify post-mutation) - 9 — outage / major; halt mutating operations ## Fixture mode `--fixture path/to/summary.json` — for offline testing + regression fixtures. Two fixtures land with v0: - `github-status-all-operational.json` — clean state (exit 0) - `github-status-pr-degraded.json` — Pull Requests degraded (exit 8) ## Component filter `--component "Pull Requests"` — narrows the report to a single factory-relevant component. Exit code reflects that component specifically (0 if operational, 8 otherwise). ## Verification Tested against both fixtures + live API. The live API currently returns degraded (Pull Requests still impacted from this session's morning incident) — tool correctly classifies as decision=proceed-with-verify, exit 8. ## Composes with - `memory/reference_github_status_first_class_aaron_2026_04_30.md` — the canonical surface allowlist this tool reports against - `memory/feedback_amara_poll_gate_not_ending_holding_is_not_status_2026_04_30.md` — the proceed-but-verify rule whose exit code 8 mirrors - `docs/backlog/P0/B-0109-dependency-status-tracking-surface-2026-04-30.md` — the substrate-tracking row this tool operationalizes - `tools/github/poll-pr-gate.ts` — the companion query tool; together they form a Query + Gatekeeper pair ## Wiring into the autonomous loop (deferred) This commit ships the standalone tool. Wiring it into the autonomous-loop pre-flight sequence (so it executes before any state-mutating API call) is a separate change — needs harness config, not just substrate. Tracked under Otto-354 (harness-vendor resilience). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Adds a new TS/Bun automation tool under tools/github/ to query GitHub’s public status endpoint and emit a structured “is GitHub healthy?” report intended for autonomous-loop pre-flight gating (companion to poll-pr-gate.ts).
Changes:
- Introduces
tools/github/check-github-status.tsto fetch/parse the GitHub Status API summary and emit a JSON report + exit code. - Adds two JSON fixtures to support deterministic local runs (
all-operationalandpr-degraded).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tools/github/check-github-status.ts | New CLI tool that fetches/loads GitHub status summary, classifies overall/component health, emits JSON + exit code. |
| tools/github/fixtures/github-status-all-operational.json | Fixture representing fully operational GitHub status for testing. |
| tools/github/fixtures/github-status-pr-degraded.json | Fixture representing degraded PR component status for testing. |
3 tasks
1. **Component mode incorporates overall status** (Copilot zqDN) —
`--component` previously ignored `report.overall` so it could
return exit 0 with a clean component even during a major outage.
Now component decision = stricter of (component status,
overall decision); halt overrides.
2. **Default exit 0 on successful fetch + opt-in `--strict`**
(Copilot zqD8) — exit 8 was hostile to `set -e` shells (any
non-zero aborts). Default now: exit 0 if fetch+parse succeeded;
decision is in JSON. Add `--strict` to opt into non-zero exit
for degraded/outage. Friendlier for shell pre-flights;
enforcement-by-flag is the explicit choice.
3. **`requireValue` rejects single-dash flags too** (Copilot zqEF)
— was `startsWith("--")`, now `startsWith("-")` — catches the
`--component -q` case where `-q` was being silently accepted as
a component name.
4. **`fetchedAt` semantics fixed** (Copilot zqER) — was set to
`summary.page.updated_at` (status-page update time, not local
fetch time). Now `fetchedAt` is `new Date().toISOString()`
(local observation time); added `statusUpdatedAt` field for
the page-side update time. Two clearly-named fields.
Decision-classifier semantics (Copilot zqDv) — KEPT as-is:
proceed-with-verify for factory-relevant degradation, NOT halt.
This matches Aaron's explicit proceed-but-verify rule
(memory/feedback_amara_poll_gate_not_ending_holding_is_not_status_2026_04_30.md)
which has been operationally validated across 13+ PRs this session
merging during the live GitHub PR-degradation incident. Halting
on factory-relevant degradation would have prevented those merges.
The reference memory + this session's track record vs Copilot's
stricter reading: maintainer rule wins. Resolving thread with
explanation, not the suggested edit.
Verified:
- Default mode: exit 0 on all fixtures (fetch worked).
- `--strict` mode: exit 0/8/9 by decision.
- Component mode: incorporates overall (Issues operational +
overall degraded → proceed-with-verify).
- `--component -q` rejected with "--component requires a value".
- `fetchedAt` and `statusUpdatedAt` distinct; tsc clean.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack
added a commit
that referenced
this pull request
Apr 30, 2026
…(Copilot) Same in-flight-xref pattern caught earlier this session — code-span path implied existence-on-main, but the file is on PR #924's branch. Reworded to make the in-flight status explicit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack
added a commit
that referenced
this pull request
Apr 30, 2026
Final feedback packet from Deepseek post-PR #924 merge. Most findings already shipped: - submit-nuget transient → PR #923 (v1 hardening, required-vs- non-required classification) - MEMORY.md merge-conflict tax → PR #920 (merge=union driver) - Stale project-file internals cleanup → B-0112 P2 row filed New finding: 30+ dot threshold for deferred-task re-audit (not new lanes, just already-scoped tiny fixes). Composes with Ani's strict-enforcement framing. Per Otto-363 substrate-or-it-didn't-happen. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack
added a commit
that referenced
this pull request
Apr 30, 2026
* research: preserve Ani + Alexia v1 feedback packets verbatim Both peer-AI reviewers responded after PR #921 (poll-pr-gate v0) + PR #922 (memory-points-at-script) merged. Per Otto-363 substrate-or-it-didn't-happen, preserving both packets verbatim at `docs/research/2026-04-30-amara-poll-pr-gate-v1-hardening.md`. Both packets predominantly "what's working" with smaller actionable findings. Substantive items overlap with PR #923 (v1 hardening, already on main) or queued under existing tasks: - "submit-nuget non-required classification" (both reviewers) — shipped in PR #923. - "Dot-tick discipline still leaky" (Ani #1) — accepted as behavior change going forward (no code, no substrate; commitment). - "Pre-merge mechanical guards" (Ani #3) — persona-name scanner + fixture-name validator composed with task #350 (Otto-357 mechanized auditor) and task #355 (poll-the-gate matrix coverage). Defer per substrate-rate. - "MEMORY.md duplicate-link timing" (Ani #4) — audit candidate; the check fired on PR #922 but missed PR #916. Defer. - "Task list at 58 open" (Ani #5) — pending-task audit overdue; composes with task #321 recovery lane. - "Thread categorization" + "intelligent compaction" (Alexia) — research-grade, not yet operational. No Insight-block commentary added per the discipline accepted in the prior Claude.ai packet absorption: produce the work, let the diff carry the evidence. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(research): mark check-github-status path as in-flight at PR #924 (Copilot) Same in-flight-xref pattern caught earlier this session — code-span path implied existence-on-main, but the file is on PR #924's branch. Reworded to make the in-flight status explicit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * research: preserve Deepseek session-arc retrospective packet Final feedback packet from Deepseek post-PR #924 merge. Most findings already shipped: - submit-nuget transient → PR #923 (v1 hardening, required-vs- non-required classification) - MEMORY.md merge-conflict tax → PR #920 (merge=union driver) - Stale project-file internals cleanup → B-0112 P2 row filed New finding: 30+ dot threshold for deferred-task re-audit (not new lanes, just already-scoped tiny fixes). Composes with Ani's strict-enforcement framing. Per Otto-363 substrate-or-it-didn't-happen. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes Gemini's v1-hardening recommendation #2: convert the GitHub-status check from behavioral habit into an operational tool. Companion to
poll-pr-gate.ts:poll-pr-gate.tsasks "is this PR ready to merge?"check-github-status.tsasks "is GitHub itself healthy enough that the answer can be trusted?"What's load-bearing
https://www.githubstatus.com/api/v2/summary.jsonand emits a structured JSON report withoverall,degradedComponents,factoryRelevant,decision, anddescriptionfields.factoryRelevantallowlist matches the GitHub-status reference memory file (Pull Requests / Actions / API Requests / Webhooks / Git Operations / Issues).poll-pr-gate.ts's exit-code semantics so consumers canset -ereliably.github-status-all-operational.json+github-status-pr-degraded.json. Both pass; live API currently returns exit 8 (PR-degradation still ongoing).--component "Pull Requests"for narrow checks.--quietfor exit-code-only mode (suitable for shell pre-flight gates).Test plan
exactOptionalPropertyTypes+noUncheckedIndexedAccess)--componentfilter narrows correctlyComposes with
memory/reference_github_status_first_class_aaron_2026_04_30.mdmemory/feedback_amara_poll_gate_not_ending_holding_is_not_status_2026_04_30.md(the proceed-but-verify rule whose exit-8 semantic mirrors)docs/backlog/P0/B-0109-dependency-status-tracking-surface-2026-04-30.mdtools/github/poll-pr-gate.ts(companion Query + Gatekeeper pair)Wiring into autonomous-loop pre-flight (deferred)
This commit ships the standalone tool. Auto-wiring into the loop's pre-flight sequence is a separate change — needs harness config, tracked under task #354 (harness-vendor resilience + upstream feedback).
🤖 Generated with Claude Code