watchdog job-log fetch: capture the #174 lesson (GOTCHAS 25) (#174) #183

Open
matou-build-agent wants to merge 1 commit from agent/issue-174 into main

closes #174

What this lands

The documentation residue for #174, whose code fix already landed on main.

Background — the fix is already live

In watchdog mode the healer's job-log.txt was always job log not fetched: no run URL for this incident (mode=watchdog) — nothing was probed.
.sandcastle/heal-lib.sh's watchdog_run_url keyed on .html_url, but the
live /actions/tasks payload heal.sh fetches carries the run's web URL as
.url and no html_url at all (0 of 50 rows, probed live). So #188's
cross-host fault-fetch — the only fault text an off-host bundle can carry —
echoed empty, and a 15-day host outage (#172) arrived four sweeps running as an
empty watchdog: streak () with zero fault text.

Because the fix is machinery (.sandcastle/), the ticket's own Notes
required it to land via re-vendor, not a worker PR. It did: fixed factory-side
as dev-factory #304 and vendored back to coa main by the FACTORY_REF bump
a2dc353 → afc0303 in PR #179 (merged 2026-11-02). watchdog_run_url now
reads (.html_url // .url // ""); heal-lib-test.sh carries a url-only
fixture matching the real rows; heal-test.sh carries the watchdog honesty case
and the matrix-gap case. Both vendored suites are green here:
heal-lib: 26 groups passed, heal.sh: 32 scenarios passed.

What is in THIS PR

The one thing the vendor bump cannot carry — the coa-local docs the ticket
flagged:

  • docs/GOTCHAS.md 25 — the ticket's requested lesson: a unit-test fixture
    invented from an API's documented shape, not captured live, keeps the test
    green while the production path is dead
    — and here the dead fallback branch
    was even asserted as correct behaviour. Cross-references GOTCHAS 3 (this
    Forgejo's partial Actions API) and records that the job log is reachable
    with the repo token at the run's web route <run-url>/jobs/<n>/attempt/1/logs.
  • STATUS.md — header note + newest-first milestone-log entry.

Acceptance (all satisfied on main via #179)

  • watchdog_run_url returns the URL from a url-only fixture (real
    /actions/tasks shape); keeps the neither-key → empty assertion. ✓
    (heal-lib-test.sh, #304 fixtures)
  • heal-test.sh exercises watchdog mode (no RUN_URL) and the job-log path. ✓
  • A watchdog incident on a cross-host leg now produces a job-log.txt with real
    log text — the four sweeps that recurred on this ticket stopped after #179
    merged. ✓

Screenshots: none — healer/harness + docs change, no visible UI surface; the
proof is the two green vendored test suites quoted above.

closes #174 ## What this lands The documentation residue for #174, whose **code fix already landed on `main`**. ### Background — the fix is already live In watchdog mode the healer's `job-log.txt` was *always* `job log not fetched: no run URL for this incident (mode=watchdog) — nothing was probed`. `.sandcastle/heal-lib.sh`'s `watchdog_run_url` keyed on `.html_url`, but the live `/actions/tasks` payload `heal.sh` fetches carries the run's web URL as `.url` and **no `html_url` at all** (0 of 50 rows, probed live). So #188's cross-host fault-fetch — the only fault text an off-host bundle can carry — echoed empty, and a 15-day host outage (#172) arrived four sweeps running as an empty `watchdog: streak ()` with zero fault text. Because the fix is **machinery** (`.sandcastle/`), the ticket's own Notes required it to land via re-vendor, *not* a worker PR. It did: fixed factory-side as **dev-factory #304** and vendored back to coa `main` by the FACTORY_REF bump `a2dc353` → `afc0303` in **PR #179** (merged 2026-11-02). `watchdog_run_url` now reads `(.html_url // .url // "")`; `heal-lib-test.sh` carries a `url`-only fixture matching the real rows; `heal-test.sh` carries the watchdog honesty case and the matrix-gap case. Both vendored suites are green here: `heal-lib: 26 groups passed`, `heal.sh: 32 scenarios passed`. ### What is in THIS PR The one thing the vendor bump cannot carry — the coa-local docs the ticket flagged: - **`docs/GOTCHAS.md` 25** — the ticket's requested lesson: *a unit-test fixture invented from an API's documented shape, not captured live, keeps the test green while the production path is dead* — and here the dead fallback branch was even asserted as correct behaviour. Cross-references GOTCHAS 3 (this Forgejo's partial Actions API) and records that the job log *is* reachable with the repo token at the run's web route `<run-url>/jobs/<n>/attempt/1/logs`. - **`STATUS.md`** — header note + newest-first milestone-log entry. ### Acceptance (all satisfied on `main` via #179) - `watchdog_run_url` returns the URL from a `url`-only fixture (real `/actions/tasks` shape); keeps the neither-key → empty assertion. ✓ (`heal-lib-test.sh`, #304 fixtures) - `heal-test.sh` exercises watchdog mode (no `RUN_URL`) and the job-log path. ✓ - A watchdog incident on a cross-host leg now produces a `job-log.txt` with real log text — the four sweeps that recurred on this ticket stopped after #179 merged. ✓ **Screenshots:** none — healer/harness + docs change, no visible UI surface; the proof is the two green vendored test suites quoted above.
docs: capture the #174 watchdog job-log lesson (GOTCHAS 25)
All checks were successful
ci / seam (pull_request) Successful in 38s
de8299121d
The watchdog's cross-host job-log fetch (#188) was dead in production:
`watchdog_run_url` in `.sandcastle/heal-lib.sh` keyed on `.html_url`, but
the live `/actions/tasks` payload carries the run's web URL as `.url` and
no `html_url` at all — so every off-host bundle read "job log not fetched"
while a 15-day host outage (#172) arrived as an empty `watchdog: streak ()`.
The unit test stayed green because its fixture was invented from the
endpoint's documented shape, not captured live, and the dead production
branch was even asserted as the acceptable fallback.

The code fix (`(.html_url // .url // "")` + a live-shaped fixture) is
machinery, so it landed factory-side (dev-factory #304) and was vendored
back to main by the FACTORY_REF bump a2dc353 -> afc0303 (PR #179); both
vendored heal suites are green (26 groups / 32 scenarios).

This commit adds the coa-side residue the vendor bump cannot carry: the
GOTCHAS 25 lesson the ticket flagged — a fixture from an API's assumed
shape keeps a test green while the real path is dead — plus the STATUS
header + milestone-log record. Advances #174.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Factory-Account: d631bd58e1e9
All checks were successful
ci / seam (pull_request) Successful in 38s
This pull request has changes conflicting with the target branch.
  • STATUS.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin agent/issue-174:agent/issue-174
git switch agent/issue-174

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff agent/issue-174
git switch agent/issue-174
git rebase main
git switch main
git merge --ff-only agent/issue-174
git switch agent/issue-174
git rebase main
git switch main
git merge --no-ff agent/issue-174
git switch main
git merge --squash agent/issue-174
git switch main
git merge --ff-only agent/issue-174
git switch main
git merge agent/issue-174
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/coa!183
No description provided.