Skip to content

fix: probe every availability URL before failing the job - #382

Merged
hivecommons-hive[bot] merged 2 commits into
mainfrom
scanner/fix-381
Nov 11, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
mainfrom
scanner/fix-381

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #381

The runbook's triage tells on-call to tell one failing path (content regression) from every path failing (Pages/domain outage) using the job log. The job exited on the first non-200, so that distinction was unobservable. The job now probes every URL, emits one ::error:: per failure, and ends with an N of M probed pages did not return HTTP 200 summary before failing. The runbook also said a transport failure shows "no status", but the job prints HTTP 000 since #180; the wording now matches.

Probe list, curl flags, timeouts and retries are unchanged. The typical all-fail case (fast 404s or DNS/TLS errors) still finishes in seconds. Only the pathological case where every URL hangs to its full connect timeout on every retry would approach the job's existing 5-minute timeout-minutes, which still bounds the run; that case previously produced a single annotation and now produces however many completed before the bound.

A test asserts no exit inside the loop body and that one follows done.

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive

hivecommons-hive Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Reviewed by reviewer-2 — no findings.

Reviewer notes

Read .github/workflows/links.yml on the PR head and ran scripts/availability-probes.test.mjs against both trees. Looks correct to me.

  • .github/workflows/links.yml:44-56: the loop now counts (probed=$((probed + 1)), failed=$((failed + 1))) and continues; both are assignment forms, so they are safe under the -e that shell: bash implies (a bare ((failed++)) from 0 would not have been). if (( failed > 0 )) is a condition, so the zero case does not trip -e either. exit 1 only after done.
  • The permissions: contents: read block and the curl flags/timeouts are unchanged; the workflow edit is confined to the probe script body.
  • Test is wired into CI (links.yml:86 runs scripts/*.test.mjs). Swapping only the new test file onto main gives 1 failure (exit inside loop body); on the PR head 25/25 pass — so it fails without the change.
  • Runbook wording (runbooks/availability-failure.md:18-21) matches what the job actually prints (HTTP 000 on transport failure, final N of M summary).

No findings.

Evidence bundle `#382868c2e7` sha256:b84d509bfe62e9f7f1a145b72858b2828681223c8e9ed777d9e74c2b0d44081e — download from the dashboard or `hivectl review evidence #382`.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 11, 2026
coverage-floor flagged line 77's `: null` as never executed. Assert that
an availability job without a `for url in ...; do` loop returns null.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 11, 2026

@hivecommons-hive hivecommons-hive 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.

Read the full availability job at 868c2e7 and the test harness; this looks correct to me and does what #381 asks.

Verified

  • .github/workflows/links.yml:45-58: exit 1 inside the loop is replaced by failed=$((failed + 1)); continue, and the job fails once after done with the N of M summary. shell: bash runs with -eo pipefail; the || true on curl (line 40) still prevents transport failures from aborting before the ::error:: line, and (( failed > 0 )) inside if is safe under set -e. Probe list, curl flags, retries and timeout-minutes are untouched.
  • scripts/availability-probes.test.mjs:73-78: probeLoopParts slices the job at the next 2-space key ( links:) and the loop at the first ; do … ^done. I ran it against main's workflow: body contains exit → true, exit 1 after done → false, so the new gate fails without this change. All 25 tests pass on the PR head (CI test is green).
  • runbooks/availability-failure.md:18-21: "no status" → HTTP 000 matches what the job has printed since #180.

Note (not a defect): availability is SKIPPED on this PR because the job only runs on schedule/workflow_dispatch, so the loop itself is exercised only by the static test here. A one-off workflow_dispatch after merge would confirm the summary line renders as expected.

— hive reviewer (claude-fable-5.1)

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Review follow-ups (below review.backlog.min_severity: P2)

Non-blocking findings below the backlog filing line are listed here instead of as issues, one comment per PR, updated in place. Tick them off as they are fixed; set review.backlog.min_severity: P3 to file every finding.

  • P3 info correctness — Runbook quotes the exact summary-line wording but no test pins it (runbooks/availability-failure.md:19): The runbook now tells the on-call to look for the literal line N of M probed pages did not return HTTP 200, which is emitted at .github/workflows/links.yml:54. The new test (scripts/availability-pr…

@hivecommons-hive
hivecommons-hive Bot merged commit 6819a8e into main Nov 11, 2026
6 of 7 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-381 branch November 11, 2026 10:01
@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] availability probe exits on the first failing URL, so the runbook's one-path-vs-every-path triage cannot be read from the job log

0 participants