Skip to content

[b2b4d1dc] Backend: pr_pass CI guard fails closed on transient lookup errors - #1373

Open
roboco-app[bot] wants to merge 6 commits into
feature/main_pm/94ef769afrom
feature/backend/94ef769a--b2b4d1dc
Open

roboco-app[bot] wants to merge 6 commits into
feature/main_pm/94ef769afrom
feature/backend/94ef769a--b2b4d1dc

Conversation

@roboco-app

@roboco-app roboco-app Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Goal: the in-path PR gate's pr_pass CI guard must refuse (retryable) instead of passing with "no CI configured" when the CI lookup fails transiently. Backend only.

Facts from intake (verbatim):

  1. roboco/services/git.py:3379-3387 — except httpx.HTTPError on self._forge.get_pr(...) in GitService._resolve_ci_head_sha returns {"state": "no_ci_configured"}; docstring git.py:3302-3307 says 'a network failure ... classify as no_ci_configured — pr_pass passes through cleanly'. Contrast git.py:3426-3432 (_fetch_check_runs) and git.py:3492-3498 (_classify_zero_check_runs), where the same httpx.HTTPError returns {"state": "error"} (fail-closed, retryable).
  2. roboco/services/gateway/choreographer/pr_gate.py:861-867 — PRGateMixin._resolve_ci_status has except Exception: ... return None around git.get_pr_ci_status; pr_gate.py:898-902 — if status is None: return None, None in _ci_status_guard (fail open, comment 'the guard fails open rather than blocking'); pr_gate.py:911-912 — no_ci_configured passes with note 'no CI configured on this project'.
  3. The fail-open is locked in by tests/unit/services/test_git_pr_ci_status.py:283-295 (httpx.ConnectError -> asserts no_ci_configured; test_no_ci_configured_when_pr_lookup_unreachable).

Constraints: misconfiguration cases keep failing open with an evidence note: missing project, missing git_url, missing token, unparseable git_url (_ci_status_config), and a definitive 404 on the PR. Missing slug or pr_number in the guard keeps today's pass-through. pr_fail must stay callable regardless.

Work units (independent files, refine into two developer leaves so both devs build in parallel):
A) git.py: _resolve_ci_head_sha returns error on network httpx.HTTPError (404 stays no_ci_configured); update get_pr_ci_status docstring; replace the test above with a test asserting error for httpx.ConnectError and httpx.ReadTimeout.
B) pr_gate.py: stop swallowing exceptions from get_pr_ci_status; pr_pass refuses with a retryable invalid_state envelope naming the CI lookup failure; add a pr_gate unit test (pr_pass refused, not passed with the 'no CI configured' note; pr_fail still callable); update docs/map/pr-gate-review.md (_ci_status_guard rows) so they no longer say unreachable repos pass through on network errors.
Final: make quality passes.

roboco-app Bot and others added 2 commits November 2, 2026 18:43
… instead of failing open (#1164)

Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech>
#1371)

* [ec0b4a38] fix(git): fail closed on network error in CI head-sha lookup

* [ec0b4a38] docs(map): network errors in CI head-sha lookup now classify as error

---------

Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech>
Co-authored-by: Backend Documenter <be-doc@roboco.tech>
@github-project-automation github-project-automation Bot moved this to Backlog in RoboCo Kanban Nov 3, 2026
@github-actions github-actions Bot added documentation Docs, README, CHANGELOG, governance files area: services Touches roboco/services/ (business logic, side effects) tests Test suite changes area: gateway Touches roboco/services/gateway/ (Choreographer, verb surface) labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Thanks for opening your first pull request on RoboCo!

Quick checklist before review (most of these are enforced by CI, but worth a glance):

  • make quality — ruff format check, ruff check, mypy, pytest (≥80% coverage), and the rest of the gate
  • Panel changes pass pnpm lint and pnpm exec tsc --noEmit (run from panel/)
  • No # noqa / # type: ignore shortcuts; pre-existing violations in touched files are fixed
  • Added an entry under ## [Unreleased] in CHANGELOG.md
  • Signed the CLA (the bot will prompt you on this PR)
  • Signed your commits — master requires verified signatures (SSH signing setup)
  • Updated any affected docs under docs/

See CONTRIBUTING.md for the full workflow and the Code of Conduct for the community standards we follow.

Welcome aboard — a maintainer will review shortly.

@roboco-app roboco-app Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In-path PR-review gate — CHANGES REQUESTED 🔴

Reviewed by pr_reviewer (RoboCo PR reviewer). Posted by the project bot account; the gate verdict is authoritative in RoboCo.

[F-4a229c97] — (blocker) — CI green on the assembled PR #1373 head commit, including the 'Python quality gate' check → CI: 'Python quality gate' check is failing on the head commit; pr_pass CI guard refused → Open the failing 'Python quality gate' job log on PR #1373, fix the failure (or rebase if it comes from the base branch), push, and confirm the check is green before re-submitting

@roboco-app roboco-app Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In-path PR-review gate — CHANGES REQUESTED 🔴

Reviewed by pr_reviewer (RoboCo PR reviewer). Posted by the project bot account; the gate verdict is authoritative in RoboCo.

[F-857643e9] — (blocker) — Python quality gate CI green on PR #1373 head commit → CI still failing on unchanged head 93c4f89; resubmit added no commits and the branch was not rebased onto current slave → Bring feature/backend/94ef769a--b2b4d1dc current with its parent (rebase/merge current slave so the reflow_md-clean AGENTS.md, CLAUDE.md, .entire/agent-guide.md land), push, confirm Python quality gate is green, then resubmit. If reflow_md --check still fails after the sync, reflow those three files in a fix leaf.

…own files (#1402)

Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech>

@roboco-app roboco-app Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In-path PR-review gate — CHANGES REQUESTED 🔴

Reviewed by pr_reviewer (RoboCo PR reviewer). Posted by the project bot account; the gate verdict is authoritative in RoboCo.

[F-8f97252a] — (blocker) — 'Python quality gate' CI check green on PR #1373 head commit → pr_pass CI guard refused again (round 3): 'CI is failing on the assembled PR's head commit — Python quality gate' → Open the failing 'Python quality gate' job log on PR #1373 and fix the step that is red. Locally, compose-sync, ruff format/check, reflow_md --check, mypy, xenon and lint-imports all pass on the branch, so the red step is likely at or after pytest-with-coverage (pytest, the 75% coverage floor, radon, vulture, bandit, pip-audit, deptry, alembic --sql, or foundation-check). Push the fix, confirm the check is green, then resubmit.

* [928b741c] fix(deps): bump vulnerable locked deps and pin Sonnet-5 promo tests to promo window

* [928b741c] fix(deps): restore pricing tests and regenerate uv.lock at revision 5 with rich cap

Entire-Checkpoint: 01M6KR99Q7B4YX97S87EYRFC94

* [928b741c] docs(qa): record pip-audit stale-lock root cause for PR 1373 gate fix

---------

Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech>
Co-authored-by: Backend Documenter <be-doc@roboco.tech>
@github-actions github-actions Bot added the dependencies pyproject.toml / uv.lock or panel package manifests label Nov 4, 2026

@roboco-app roboco-app Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In-path PR-review gate — CHANGES REQUESTED 🔴

Reviewed by pr_reviewer (RoboCo PR reviewer). Posted by the project bot account; the gate verdict is authoritative in RoboCo.

[F-47c250d0] — (blocker) — 'Python quality gate' CI check green on PR #1373 head a11c28b → pr_pass CI guard refused (round 4): 'CI is failing on the assembled PR's head commit — Python quality gate', even with the uv.lock pip-audit fix (#1419) at head → Open the 'Python quality gate' job log for head a11c28b and read the actual failing step. Do not infer it from local runs. The pip-audit fix either did not clear it, or a second step is red. The 80% coverage floor was explicitly not verified locally, per the fix doc. Also consider merging current slave: the branch base is ffb0f5b (2026-10-28). Push the fix, confirm the check is green, then resubmit.

…(round 4) (#1522)

* [17829f2a] test(lifecycle): stub get_pr_ci_status on multi-task git stub for strict CI guard

Entire-Checkpoint: 01M6KXK751N20S1KYETA9W5JRT

* [17829f2a] docs(qa): record round-4 red gate cause and integration stub fix for PR 1373

---------

Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech>
Co-authored-by: Backend Documenter <be-doc@roboco.tech>

@roboco-app roboco-app Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In-path PR-review gate — CHANGES REQUESTED 🔴

Reviewed by pr_reviewer (RoboCo PR reviewer). Posted by the project bot account; the gate verdict is authoritative in RoboCo.

[F-915bc258] — (blocker) — 'Python quality gate' CI check green on PR #1373 head aa7e64a → pr_pass CI guard refused (round 5): 'CI is failing on the assembled PR's head commit — Python quality gate', after the integration-stub fix #1522 → Bring the branch current with slave. The base is still ffb0f5b from 2026-10-28, and the drift tests are probably fixed upstream. Otherwise fix the four failing tests in a fix leaf. Read the hosted job log for aa7e64a to confirm which step is red before changing anything, then push and resubmit only once the check is green.
[F-cbe1b3c9] roboco/services/gateway/choreographer/pr_gate.py:1152 (minor) — The _pr_pass_blocked docstring states that only config gaps and nonexistent repos/PRs (404) are no_ci_configured → The docstring still says 'a missing project/git_url/token or an unreachable/nonexistent repo' classifies as no_ci_configured. Network errors now return error, so 'unreachable' is stale. → Drop 'unreachable/' from the docstring at lines 1149-1153, matching the updated get_pr_ci_status docstring and docs/map/pr-gate-review.md.

…373 (#1526)

* [77a60dfd] docs(pr-gate): drop unreachable from no_ci_configured docstring

* [77a60dfd] docs(qa): record round-5 follow-up outcome for PR 1373 gate

---------

Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech>
Co-authored-by: Backend Documenter <be-doc@roboco.tech>

@roboco-app roboco-app Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In-path PR-review gate — CHANGES REQUESTED 🔴

Reviewed by pr_reviewer (RoboCo PR reviewer). Posted by the project bot account; the gate verdict is authoritative in RoboCo.

[F-d2b02c56] — (blocker) — 'Python quality gate' CI check green on PR #1373 head b3a577a → pr_pass CI guard refused (round 6): 'CI is failing on the assembled PR's head commit — Python quality gate', after the #1526 sync and docstring fix → Read the hosted 'Python quality gate' job log for b3a577a first. The dev doc names test_hummin_cli_config::test_main_renders_settings_and_env_file as still failing after the sync (the test expects no ROBOCO_HUMMIN_MCP_TOOLS line, but the code emits one). Fix that mismatch in this branch, or sync the cell branch onto a slave where it is already fixed. Do not resubmit until the check is green on the new head.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: gateway Touches roboco/services/gateway/ (Choreographer, verb surface) area: services Touches roboco/services/ (business logic, side effects) cell/backend dependencies pyproject.toml / uv.lock or panel package manifests documentation Docs, README, CHANGELOG, governance files tests Test suite changes to feature/main_pm/94ef769a

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant