Skip to content

Make CI failures reach Telegram: set the watchdog secrets, alert on red E2E pushes #557

Open

Description

@HMarzban

Part of #554, change set A. Rulings: #554 rulings 1, 5, 12, 15, 16.

Status, 2026-11-11. Steps 0 and 2–8 shipped in 8f57252b6, pushed and deployed on 2026-11-03. editor-e2e.yml has the same notify step (📣 Notify editor E2E failure, added in cfb5bc8e4). Left: Step 1 (the maintainer sets the three secrets), then Verification 1 (the builder dispatches the watchdog). Close after both, and after the 7-day read in the Benchmark section.

Alert mode ruled 2026-11-12: (a) red-after-green only. The E2E notify steps alert only when a suite turns red after being green. See Step 1.0.

Status, 2026-11-16. Mode (a) is built in 07356661a and 9e3af3470. chatroom-e2e.yml and editor-e2e.yml call .github/scripts/notify-e2e-red-after-green.sh. No code is owed. Left: the maintainer sets the 3 secrets, then one watchdog dispatch, then the 7-day read.

Summary

Before 8f57252b6, the runner watchdog and chatroom E2E failed silently. A Sentry major failed CI until 7c3d7d26c (2026-10-24), two job timeouts were too long, and five CI facts were wrong. 8f57252b6 added the warnings and the alert step, cut the timeouts and fixed the facts. Both paths stay silent until the three secrets are set.

This issue sets three repo secrets, makes the watchdog warn and alerts on red chatroom E2E pushes. It cuts two timeouts to 15 min and fixes the facts. It removes no pipeline time.

Benchmark

Ops issue. Exact counts, not timings.

Field Value
Metric Silent CI failure paths, as exact counts: (a) watchdog runs that listed the runners; (b) red E2E push runs on main that sent a Telegram alert
Before (a) 0 of 35 scheduled watchdog runs, 2026-11-03 02:57Z to 2026-11-11 11:14Z. 34 logged ##[warning]Runner watchdog checked nothing. The first (run 41569262090) ran before the push and took the old silent exit. (b) 0 of 27 red pushes: chatroom 15 of 16 red, editor 12 of 16 red, 2026-11-03 to 2026-11-11. Source: gh run list and job logs, read 2026-11-11
After not measured yet
Condition GitHub-hosted ubuntu-latest. runner-watchdog.yml on its */30 schedule. One self-hosted runner, prod.docs.plus. Old production host, before the #747 move
How to run (a) gh run list --repo docs-plus/docs.plus --workflow runner-watchdog.yml --created '>=<secrets date>' --json databaseId, then gh run view <id> --log | grep -E 'All [0-9]+ self-hosted runners online|##\[warning\]' per run. (b) gh run list --workflow chatroom-e2e.yml --event push --branch main and the same for editor-e2e.yml, then one Telegram message per red run
Pass rule In the 7 days after the secrets are set: every watchdog run prints ✅ All 1 self-hosted runners online (state N). N of N red-after-green E2E pushes send one alert (mode (a), ruled 2026-11-12). 0 alerts on a pull request, a dispatch or a cancelled run. Stop rules are in Accountability
Guard No deploy-path change. Time to live does not move. A false offline alert stops the watchdog (Accountability)
Owner Maintainer: Step 1 and delivery checks. Agent in the repo: Verification 1 and the 7-day read. The agent posts the 7-day read on the secrets date plus 7 days. The maintainer rules on the chatroom gate in the same week
Claim "Silent CI failure paths: 2 -> 0. In the 7 days after , of red E2E pushes and every watchdog run reached the team." (internal)

Supporting reads, 2026-11-11:

Read Before After plan
Watchdog repo secrets set (gh secret list, names only) 0 of 3 3 of 3
Most runner time a hung gate job can use build 35 min + extension-tests 25 min = 60 min 15 + 15 = 30 min (done, 8f57252b6). Longest real jobs 164 s and 229 s (2026-11-03 Measured comment)
Stale CI facts (Acceptance grep) 5 matches 0 (done 2026-11-03)

Depends on / Blocks

Current behaviour

Shipped plan: Current behaviour, read 2026-10-20

Links are pinned to d0a53756f8676556358b6adc6c2397d2ed7c64c8.

  1. The notifier. scripts/ci/notify-telegram.sh:1-19 takes <env-file|-> and a text. With -, it reads TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID from the environment. It never fails the caller. With empty credentials it prints ::warning::Telegram credentials or message text unavailable; skipping notification and exits 0.

  2. The watchdog exits silently (runner-watchdog.yml:26-35):

    if [ -z "${GH_TOKEN}" ] || [ -z "${TELEGRAM_BOT_TOKEN}" ] || [ -z "${TELEGRAM_CHAT_ID}" ]; then exit 0; fi
    • The header at lines 1-5 says "Silent no-op until all three secrets exist."
    • RUNNER_WATCHDOG_TOKEN is a fine-grained PAT with repo Administration: read, because the workflow GITHUB_TOKEN cannot read the runners API.
    • The 100 runs from 2026-10-01 up to run 39388630259 (2026-10-20) all ended success. In run 39388630259, the step log shows GH_TOKEN, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID as empty. A set secret prints as ***. So every run took the silent exit 0.
    • On 2026-10-20, gh secret list --repo docs-plus/docs.plus lists none of the three names. The two self-hosted runners, prod.docs.plus and stage.docs.plus, were both online. The watchdog alerts on either one.
  3. Chatroom E2E has no failure alert (chatroom-e2e.yml:38-73). The last step is Retain results and failure screenshots at lines 62-73. The job runs on ubuntu-latest. It was red on 5 main pushes in a row, and all four (build): deploys among them shipped:

    Chatroom run Commit subject Deploy run of the same push
    37431580968 (build): front back 37431581531, success
    37440315062 (build): front 37440315600, success
    37904017847 refactor(supabase): deslop comments in the new migrations and scripts none
    37906965146 (build): front back 37906965365, success on attempt 2
    37976785336 (build): back front observability 37976785981, success
  4. Dependabot has no Sentry ignore (.github/dependabot.yml:39-63). The parked majors list ends with @babel/* at lines 62-63.

  5. The timeouts in prod.docs.plus.yml. Sample: the 85 runs from 2026-09-01 up to run 39414945889 (2026-10-20). That is 53 Build Verification jobs and 245 Ext jobs that were not skipped, cancelled jobs included. None hit a limit.

    • extension-tests: timeout-minutes: 25 at line 288. Median 151 s, max 289 s: run 37904018667, job 🧪 Ext (extension-hypermultimedia).
    • build: timeout-minutes: 35 at line 354. Median 191 s, max 232 s: run 37904018667.
    • deploy: timeout-minutes: 45 at line 426. Its comment at lines 423-425 explains why. It stays.
  6. The stale facts.

    • 6a. Extension suite time. prod.docs.plus.yml:117-118 says the suite takes "~14 min" (Step 5.4 quotes it). Measured: median 151 s, max 289 s per suite.
    • 6b. Webapp install cache. AGENTS.md:290 ends: "They pay from the next (build): deploy: both webapp installs should print CACHED, and next build should fall below 277 s." Measured in six deploy jobs: 0 of the 12 webapp bun install steps printed CACHED. The next build step took 185.4–262.5 s, so that half is true. Runs: 39398067267, 39297468969, 39275929831, 38392614215, 38239392350, 38068638114.
    • 6c. Deploy gap. AGENTS.md:297: "Real deploy gaps are median 2.2 h with 1 of 9 over 24 h, so a mount would be warm on roughly eight deploys in nine." The same claim is in apps/webapp/docker/Dockerfile.bun:214-218. Measured: 20 runs have a 🚀 Deploy Production job that ended success, from run 33632421079 (2026-09-02) to run 39414945889 (2026-10-20). Of the 19 gaps between them, 10 are over 24 h. The median gap is 24.6 h. To list the 20 runs, run this and ignore any run after 39414945889:
      gh run list --repo docs-plus/docs.plus --workflow prod.docs.plus.yml \
        --created 2026-09-01..2026-10-20 --limit 200 --json databaseId,createdAt \
        --jq '.[] | "\(.databaseId) \(.createdAt)"' | sort -k2 | while read -r id at; do
        c=$(gh api "repos/docs-plus/docs.plus/actions/runs/${id}/jobs?per_page=100" \
          --jq '.jobs[] | select(.name == "🚀 Deploy Production") | .conclusion')
        [ "${c}" = success ] && echo "${id} ${at}"
      done
    • 6d. Production protection. observability.docs.plus.yml:47-48 claims a required-reviewer protection (Step 6 quotes it). On 2026-10-20, gh api repos/docs-plus/docs.plus/environments/production --jq .protection_rules returns [].
    • 6e. Workflow docs. .github/WORKFLOWS.md:38-42 says the watchdog is a "No-op until the TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID repo secrets are set". It omits RUNNER_WATCHDOG_TOKEN. Line 98 lists the notifier callers without chatroom-e2e.

Target behaviour

  • Secrets. gh secret list --repo docs-plus/docs.plus shows RUNNER_WATCHDOG_TOKEN, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID.
  • Watchdog, secrets set. Every run lists the runners. It prints ✅ All 1 self-hosted runners online, or it sends the existing Telegram alert. Amended 2026-11-10: the stage runner is removed.
  • Watchdog, a secret missing. The run stays green. It shows one ::warning:: annotation that names each missing secret. It warns; it does not fail.
  • Chatroom E2E. A failed run on a push to main sends one Telegram alert with the short SHA and the run URL. It goes to the same chat as the deploy-failure alert. A pull request, a workflow_dispatch or a cancelled run sends nothing.
    • A run that hits the job's timeout-minutes: 25 sends no alert. GitHub cancels a job at its timeout, so the alert step skips. The run does not end green.
  • Timeouts. build is 15 min, extension-tests is 15 min, and deploy is still 45 min.
  • Facts. Each of 6a to 6e states the measured value with its date or source.
  • Time to live. It does not change. No step on the deploy path changes.

Implementation steps

"Comment here" means a comment on this GitHub issue, never a code comment.

Shipped plan: Step 0

Step 0. Read and check the base

  1. Read every file in Read first. Run git log --oneline -1 and git status. Work on main in the current working tree. Do not create a branch or a worktree.
  2. Confirm that the lines this issue changes still match the quotes in Current behaviour and the Before blocks in Steps 5 and 6:
    sed -n '1,5p;26,35p' .github/workflows/runner-watchdog.yml
    sed -n '38,73p' .github/workflows/chatroom-e2e.yml
    sed -n '53,63p' .github/dependabot.yml
    sed -n '117,118p;288p;354p;426p' .github/workflows/prod.docs.plus.yml
    sed -n '47,48p' .github/workflows/observability.docs.plus.yml
    grep -n -E 'should print .CACHED|eight deploys in nine' AGENTS.md
    sed -n '214,218p' apps/webapp/docker/Dockerfile.bun
    sed -n '38,42p;98p' .github/WORKFLOWS.md
    grep -n 'builder prune' .github/workflows/prod.docs.plus.yml
  3. If a sibling issue moved a line, find it with grep -n on the quoted text. If the text itself changed, or a quoted fact is already fixed, stop and comment here with the new text.
  4. Confirm the tools: actionlint -version and shellcheck --version. actionlint runs shellcheck on run: blocks when it is installed.

Step 1. Maintainer: set the three repo secrets

The maintainer does this step after the Review checkpoint push and after Verification step 0. The code is safe without the secrets: both new paths warn and exit 0. The builder does not set secrets and never sees their values.

  1. Read the red rate. Run gh run list --repo docs-plus/docs.plus --workflow chatroom-e2e.yml --event push --branch main --limit 15, and the same for editor-e2e.yml. Post both counts here. On 2026-11-11 the reads for 2026-11-03 to 2026-11-11 were: chatroom 15 of 16 red, editor 12 of 16 red. So until Make the chatroom and editor browser suites pass on main again #730 lands, most main pushes send one or two alerts.
    • Alert mode: (a), ruled 2026-11-12. (a) Alert only on a red-after-green change per suite. (b) A repo variable, for example E2E_ALERTS=off, gates the two E2E notify steps until Make the chatroom and editor browser suites pass on main again #730 lands. All three secrets are set in both options. Recommended: (a), because under (b) the Pass rule (b) metric has no sample.
    • RUNNER_WATCHDOG_TOKEN never waits, and neither do the TELEGRAM_* secrets. The watchdog needs all three: with any one empty, it prints "checked nothing" and exits 0 (runner-watchdog.yml:31-38).
  2. Run gh api repos/docs-plus/docs.plus/actions/runners --jq '.runners[] | [.name, .status] | @tsv'. Expect prod.docs.plus, online, and no other runner. Amended 2026-11-10: the stage runner is removed. If it is offline, every watchdog run will send an alert. Bring it online first, and comment here.
  3. In Settings → Secrets and variables → Actions → Repository secrets, add:
    • TELEGRAM_BOT_TOKEN: the same bot the deploy-failure alert already uses.
    • TELEGRAM_CHAT_ID: the same chat the deploy-failure alert already uses.
    • RUNNER_WATCHDOG_TOKEN: a new fine-grained PAT. Set Resource owner to docs-plus, or the token cannot see the repo. Select only the docs-plus/docs.plus repository. Grant Administration: Read-only and nothing else. Note its expiry date.
    • If the org requires approval for fine-grained PATs, approve the token in the org settings. An unapproved token fails the runner list, and the Could not list runners path only warns.
  4. Check the names, not the values:
    gh secret list --repo docs-plus/docs.plus | grep -E '^(RUNNER_WATCHDOG_TOKEN|TELEGRAM_BOT_TOKEN|TELEGRAM_CHAT_ID)\b'
    Expect three lines. Comment here with the PAT expiry date. Do not post any value.
    • Set a reminder 14 days before that expiry date.
    • If the PAT lapses once, switch to a GitHub App token (actions/create-github-app-token).
Shipped plan: Steps 2–8 and the Review checkpoint (shipped in 8f57252)

Step 2. .github/workflows/runner-watchdog.yml: warn on missing secrets

  1. Replace the header lines 1-5 with these four lines:
    # Pages Telegram when a self-hosted runner drops offline OR none is registered
    # (GitHub auto-deregisters runners dead >14 days — zero registered is terminal).
    # Needs RUNNER_WATCHDOG_TOKEN (PAT, repo Administration:read; GITHUB_TOKEN cannot
    # read runners). Without all three secrets, each run warns and checks nothing.
  2. In 🩺 Probe runner status, replace the one line that starts if [ -z "${GH_TOKEN}" ]. Indent each new line by 10 spaces, like the rest of the run: | body:
    MISSING=""
    [ -n "${GH_TOKEN}" ] || MISSING="${MISSING} RUNNER_WATCHDOG_TOKEN"
    [ -n "${TELEGRAM_BOT_TOKEN}" ] || MISSING="${MISSING} TELEGRAM_BOT_TOKEN"
    [ -n "${TELEGRAM_CHAT_ID}" ] || MISSING="${MISSING} TELEGRAM_CHAT_ID"
    if [ -n "${MISSING}" ]; then
      echo "::warning::Runner watchdog checked nothing. Missing repo secrets:${MISSING}"
      exit 0
    fi
  3. Leave the rest of the run: block as it is. The Could not list runners line already warns when the token cannot list runners.
  4. Check: actionlint -config-file .github/actionlint.yaml .github/workflows/runner-watchdog.yml. Expect no output.

Step 3. .github/workflows/chatroom-e2e.yml: notify on a failed push

Add this step after Retain results and failure screenshots (after line 73), at the same indent:

      - name: 📣 Notify chatroom E2E failure
        if: failure() && github.event_name == 'push'
        env:
          TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
          TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
        run: |
          bash scripts/ci/notify-telegram.sh - \
            "🧪 Chatroom E2E FAILED on main (${GITHUB_SHA::9}): ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
  • failure() is false for a cancelled run. The chatroom-e2e-${{ github.ref }} group cancels a superseded push, so a cancel sends nothing.
  • The workflow push trigger is main only (line 19), so the event check is enough.
  • The step runs after the artifact upload, so an alert problem never loses the screenshots.
  • Do not change permissions, triggers, the job if or timeout-minutes: 25.
  • Check: actionlint -config-file .github/actionlint.yaml .github/workflows/chatroom-e2e.yml. Expect no output.

Step 4. Skip: do not park the Sentry major

Commit 7c3d7d26c (2026-10-24) took @sentry/nextjs and @sentry/bun 11.9.0. next.config.js now loads withSentryConfig from @sentry/nextjs/config, so the major no longer fails CI. Do not add a @sentry/* ignore. Skip the Dependabot acceptance item and Verification item 3. At the Review checkpoint, expect seven files, without .github/dependabot.yml.

Step 5. .github/workflows/prod.docs.plus.yml: timeouts and the suite-time comment

Edit from the bottom up, so the line numbers below stay true. If they moved, find each line by its job id.

  1. In build, change line 354:
        # Max 232 s, median 191 s (85 runs to 2026-10-20). 15 min still kills a hang.
        timeout-minutes: 15
  2. In extension-tests, change line 288:
        # Max 289 s, median 151 s per suite (85 runs to 2026-10-20). 15 min still kills a hang.
        timeout-minutes: 15
  3. Do not change deploy (timeout-minutes: 45, line 426) or any other job's timeout.
  4. Replace lines 117-118 only. Keep the rest of that comment block:
    • Before:
        # The clean-room extension suite (~14 min) is the pipeline's long pole and is
        # a hard deploy gate. It only needs to run when something that affects an
    • After:
        # Each clean-room extension suite takes a median of 151 s (max 289 s, 2026-10-20)
        # and is a hard deploy gate. It only needs to run when something that affects an
  5. Check: actionlint -config-file .github/actionlint.yaml .github/workflows/prod.docs.plus.yml. Expect no output.

Step 6. .github/workflows/observability.docs.plus.yml: the protection comment

Replace lines 47-48 only:

  • Before:
        # No `environment: production` — it would inherit the production environment's
        # required-reviewer protection and gate every monitoring deploy on manual approval.
  • After:
        # No `environment: production`. It has no protection rules today (2026-10-20),
        # but any rule added to it later would also gate every monitoring deploy.

Check: actionlint -config-file .github/actionlint.yaml .github/workflows/observability.docs.plus.yml. Expect no output.

Step 7. AGENTS.md §Docker and Dockerfile.bun: the cache facts

Change only the clauses quoted here. Do not rewrite any other text in AGENTS.md. New text keeps to at most 25 words per sentence.

  1. AGENTS.md:290. Replace the last sentence, quoted in 6b, with:
    Measured 2026-10-20 on deploy runs `39398067267`, `39297468969`, `39275929831`, `38392614215`, `38239392350` and `38068638114`: `next build` fell to 185–262 s. But 0 of the 12 webapp `bun install` steps printed `CACHED`. #559 owns that fix.
  2. AGENTS.md:297. Replace the sentence quoted in 6c with:
    Deploy gaps were longer than that first read. Of the 19 gaps between successful deploys from 2026-09-02 to 2026-10-20, 10 were over 24 h (median 24.6 h). So under the `until=24h` prune, a mount was warm on only about half of deploys.
    Keep "Measured 2026-08-28 …" and every other sentence of that bullet unchanged.
  3. apps/webapp/docker/Dockerfile.bun:214-218. Replace the five comment lines that start # The cache mount is the only lever on this step with four lines:
    # The cache mount is the only lever on this step: the inlined git hash means the
    # layer can never be reused. Up to 2026-10-20 the deploy pruned build cache with
    # `until=24h`, and 10 of 19 deploy gaps were longer, so the mount was warm on
    # about half of deploys. The runner copies only .next/standalone and .next/static.
  4. In AGENTS.md, write #559 as a link, [#559](https://github.com/docs-plus/docs.plus/issues/559), like the #437 links in .github/WORKFLOWS.md.
  5. Check:
    bun run check:agent-docs
    bunx prettier --check AGENTS.md
    git diff -U0 -- AGENTS.md apps/webapp/docker/Dockerfile.bun
    Expect a pass. The diff must show exactly two changed lines in AGENTS.md and the comment lines in Dockerfile.bun.

Step 8. .github/WORKFLOWS.md: the workflow entries

  1. Replace line 40 with:
      - Needs three repo secrets: `RUNNER_WATCHDOG_TOKEN` (fine-grained PAT, repo Administration: read), `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID`. Without them each run warns with the missing names and checks nothing
  2. Under the workflows/chatroom-e2e.yml entry (after line 42), add:
      - A failed `push` run sends a Telegram alert through `scripts/ci/notify-telegram.sh`, with the `TELEGRAM_BOT_TOKEN` / `TELEGRAM_CHAT_ID` repo secrets. It is not a deploy gate
  3. On line 98, change "shared by prod deploy, observability, and runner-watchdog failure steps" to "shared by prod deploy, observability, runner-watchdog, and chatroom-e2e failure steps".
  4. Check: bunx prettier --check .github/WORKFLOWS.md. Expect a pass.

Review checkpoint

Do not commit, push, stash or amend inside these steps. Show the maintainer:

git status
git diff --stat
git diff -- .github AGENTS.md apps/webapp/docker/Dockerfile.bun

Expect changes in exactly these seven files: .github/workflows/runner-watchdog.yml, .github/workflows/chatroom-e2e.yml, .github/workflows/prod.docs.plus.yml, .github/workflows/observability.docs.plus.yml, .github/WORKFLOWS.md, AGENTS.md and apps/webapp/docker/Dockerfile.bun.

The maintainer commits and pushes per SP2 (#554), as its own commit, with the subject ci: alert on silent CI failures and fix stale CI facts. That subject does not deploy. Run SP1 (#554) before the push.

Acceptance criteria

  • gh secret list --repo docs-plus/docs.plus shows RUNNER_WATCHDOG_TOKEN, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID.
  • After merge, a workflow_dispatch of runner-watchdog.yml prints ✅ All 1 self-hosted runners online. Amended, maintainer ruling 2026-11-10: the stage runner is removed.
  • With a secret missing, the step log shows ##[warning]Runner watchdog checked nothing. Missing repo secrets: with each missing name, and the run is green. Run 41618604413 (Measured, 2026-11-03).
  • chatroom-e2e.yml has 📣 Notify chatroom E2E failure with if: failure() && github.event_name == 'push', after the artifact upload (Measured, 2026-11-03).
  • .github/dependabot.yml ignores @sentry/* with update-types: ['version-update:semver-major']. Waived 2026-11-03: 7c3d7d26c moved to Sentry 11.
  • In prod.docs.plus.yml, build and extension-tests have timeout-minutes: 15, and deploy still has timeout-minutes: 45 (Measured, 2026-11-03).
  • grep -rn -E '~14 min|required-reviewer|2\.2 h|eight deploys in nine|should print .CACHED' .github AGENTS.md apps/webapp/docker prints nothing (Measured, 2026-11-03).
  • actionlint -config-file .github/actionlint.yaml passes on the four changed workflows (Measured, 2026-11-03).
  • bun run check:agent-docs and bunx prettier --check on the changed Markdown and YAML files pass (Measured, 2026-11-03).
  • The first deploy after merge ends success, and its M1 is at most 1510 s, the baseline maximum. A lower M1 also passes. Run 41608014517 (Measured, 2026-11-03).
  • A Measured, <date> comment is on this issue (see Accountability).

Verification

Before the commit:

actionlint -config-file .github/actionlint.yaml \
  .github/workflows/prod.docs.plus.yml \
  .github/workflows/chatroom-e2e.yml \
  .github/workflows/runner-watchdog.yml \
  .github/workflows/observability.docs.plus.yml
bunx prettier --check .github/dependabot.yml .github/WORKFLOWS.md AGENTS.md
bun run check:agent-docs
  • Not needed: bash .github/scripts/parse-build-trigger.test.sh. Triage does not change.
  • Not needed: a workflow_dispatch with dry_run_subject. No job if, needs or gate changes. Only two timeout-minutes values change.

After the push, the maintainer or the builder runs:

  1. Watchdog, secrets missing. Before Step 1, run gh workflow run runner-watchdog.yml --repo docs-plus/docs.plus --ref main. Then run gh run view <run-id> --repo docs-plus/docs.plus --log | grep '##\[warning\]'. Expect one line that names RUNNER_WATCHDOG_TOKEN, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID, and a green run. Record the run id. Then do Step 1, then step 1 below.

  2. Watchdog, secrets set.

    gh workflow run runner-watchdog.yml --repo docs-plus/docs.plus --ref main
    gh run list --repo docs-plus/docs.plus --workflow runner-watchdog.yml --limit 1
    gh run view <run-id> --repo docs-plus/docs.plus --log | grep -E 'All [0-9]+ self-hosted runners online|##\[warning\]'

    Expect ✅ All 1 self-hosted runners online and no warning (amended 2026-11-10: the stage runner is removed). The log also prints the script text, so match ##[warning], the rendered annotation, not ::warning::.

  3. Telegram path. Do not force a failure on main to test the chatroom alert. On the next chatroom-e2e push run, run gh run view <run-id> --repo docs-plus/docs.plus --json jobs --jq '.jobs[].steps[].name'. It must list 📣 Notify chatroom E2E failure, skipped on a green run. Delivery is proven at the next real red push.

  4. Dependabot. Waived 2026-11-03: 7c3d7d26c moved to Sentry 11. After the next monthly Dependabot run, gh pr list --repo docs-plus/docs.plus --search "@sentry in:title" --state open shows no new semver-major PR. PR chore(deps): bump @sentry/nextjs from 10.76.2 to 11.8.0 #539 predates the ignore. The maintainer closes it by hand.

  5. Benchmark metrics. This issue moves no metric. Read them from the first (build): deploy run after merge. Measure CI/CD time to live after the v2.3 work: 1090 s median before #569 defines each metric.

    Metric Read from Baseline (14 deploys, 2026-09-22 to 2026-10-20) Expected
    M1 time to live that run median 1090 s, range 777–1510 s at most 1510 s, no change from this issue
    M2g that run 🚀 Deploy Production start median 417 s, which is M2g plus 2–3 s no change
    M3 that run median 546 s no change
    M5 that run 57–70 s no change
    🏗️ Build Verification and every 🧪 Ext (…) job duration that run max 232 s and 289 s under 900 s, and none cancelled at the limit

Accountability

  • The maintainer (@HMarzban) sets the three secrets in Step 1, confirms the PAT scope, and records its expiry date in a comment here. The maintainer sets them before the Move production to a new Debian 13 droplet #747 cutover starts, and no later than 2026-11-17.
  • The builder runs Verification 1 within 1 day of the secrets.
  • The builder runs the Verification steps after the first push and the first deploy after the merge. The builder records per SP3 ([Tracking] Faster, change-aware CI/CD pipeline #554), with the metric rows above. The same comment adds:
    • the watchdog run id that shows the missing-secret warning;
    • the watchdog dispatch run id and its ✅ All N self-hosted runners online line;
    • the longest 🏗️ Build Verification and 🧪 Ext (…) job durations in that run;
    • the first chatroom-e2e push run id that shows the new step.
  • At the next red chatroom-e2e push, the maintainer confirms that the Telegram alert arrived and adds the run id to the same thread.
  • On the secrets date plus 7 days, the agent in the repo posts the 7-day read. It expects 0 ##[warning] lines and the ✅ line on every watchdog run. The maintainer rules on the chatroom gate in the same week.
  • Before the PAT expires, the maintainer rotates RUNNER_WATCHDOG_TOKEN, from the reminder set in Step 1.3. An expired PAT makes the Could not list runners warning fire, not an alert.
  • Stop conditions:
    • Any 🏗️ Build Verification or 🧪 Ext (…) job is cancelled at the 15-minute limit. Revert that one timeout-minutes line, and comment here with the job id.
    • The watchdog sends a false offline alert, while gh api repos/docs-plus/docs.plus/actions/runners shows every runner online. Run gh workflow disable runner-watchdog.yml --repo docs-plus/docs.plus, and comment here. Reverting Step 2 does not help, because the alert lines below the new check are unchanged.
    • The chatroom alert fires on a pull request or a cancelled run. Revert Step 3.

Rollback

  1. Revert per SP4 ([Tracking] Faster, change-aware CI/CD pipeline #554). First run git show --stat <commit>. It must list only this issue's seven files. If it lists any other file, stop and comment here.
  2. If only one step must go, revert only that file's hunk. The steps do not depend on each other.
  3. The secrets may stay. With the code reverted, the watchdog uses them as before, and nothing else reads them. To remove them, the maintainer deletes them in Settings → Secrets and variables → Actions and revokes the PAT in their GitHub account settings.
  4. Reverting Step 4 lets Dependabot open @sentry/* majors again. Waived 2026-11-03: 7c3d7d26c moved to Sentry 11. Step 4 changed no file.

Docs to update

  • .github/WORKFLOWS.md §Active workflows, the workflows/runner-watchdog.yml and workflows/chatroom-e2e.yml entries (lines 38-42), and §Related files, the Telegram notifier line (line 98). Step 8 has the text.
  • AGENTS.md §Docker, two sentences (lines 290 and 297). Step 7 has the text.
  • No other docs. docs/self-hosting/configuration.md documents the host Telegram values for Grafana, not these repo secrets.

Out of scope

Read first

  • AGENTS.md, in full, then §Docker and §Simplified English Mandate.
  • .github/WORKFLOWS.md
  • .github/workflows/runner-watchdog.yml
  • .github/workflows/chatroom-e2e.yml
  • .github/workflows/prod.docs.plus.yml, the changes, extension-tests, build and deploy job headers.
  • .github/workflows/observability.docs.plus.yml, lines 30-60.
  • .github/dependabot.yml
  • scripts/ci/notify-telegram.sh
  • apps/webapp/docker/Dockerfile.bun, lines 195-219.
  • .github/actionlint.yaml
  • .cursor/skills/tech-writer/SKILL.md §Simplified English (house standard), for the new AGENTS.md text.

Activity

  1. added this to the v2.3.0 milestone on Oct 20, 2026
  2. HMarzban commented on Oct 25, 2026

    @HMarzban
    CollaboratorAuthor

    Built and committed on local main. Awaits the maintainer's final push.

    Remaining gate: the push. The next production pipeline run then checks the watchdog warning and the notify step.

  3. HMarzban commented on Nov 3, 2026

    @HMarzban
    CollaboratorAuthor

    Status, 2026-11-03. 8f57252b6 is pushed and deployed on 2026-11-03. Chatroom run 41608014389 lists 📣 Notify chatroom E2E failure as skipped on a green run. The repo secret list does not show the three watchdog secrets yet.

    Left:

    • Maintainer: remove or exclude the stage.docs.plus runner first, or every watchdog run alerts.
    • Maintainer: set RUNNER_WATCHDOG_TOKEN, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID, and record the PAT expiry.
    • Builder: run both watchdog dispatch checks, then post the SP3 comment.
  4. HMarzban commented on Nov 3, 2026

    @HMarzban
    CollaboratorAuthor

    Measured, 2026-11-03.

    Measured, 2026-11-03
    Run: 41608014517, attempt 1
    On main: #555, #556, #557, #558, #559, #560, #561, #562, #563, #564, #565; partial #566 (a9688f030) and #568 (d9b6222fd)
    M1 598 | M2g 496 | M2i 509 | M3 445 | M4 7 | M5 59 | W 9 | free_gb 60 | cached_installs 0
    Expected: the first deploy ends success with M1 at most 1510 s
    Verdict: keep
    

    Sources: Run Report job 125827136949. cached_installs from Build Images job 125822892492.

    • The deploy ended success, and M1 598 is at most 1510 s. Pass.

    • Longest jobs in run 41608014517:

      • 🏗️ Build Verification: 164 s (job 125824373350).
      • Longest 🧪 Ext (…): extension-hypermultimedia, 211 s (job 125822788145).
    • Support: runs 41626334830 and 41636667896 also ended success. Their longest Ext job was extension-hypermultimedia: 190 s (job 125884636825) and 229 s (job 125919621157). No job hit the 15-minute limit.

    • Missing-secret warning: watchdog run 41618604413, job 125858225895, event schedule, conclusion success. It logs ##[warning]Runner watchdog checked nothing. Missing repo secrets: RUNNER_WATCHDOG_TOKEN TELEGRAM_BOT_TOKEN TELEGRAM_CHAT_ID.

    • Chatroom E2E, first push run with the new step: run 41608014389, job 125822600160. The run is green, and 📣 Notify chatroom E2E failure is skipped.

    • Red chatroom pushes ran the notify step. Each logged Telegram credentials or message text unavailable; skipping notification. So the step is wired, but it sent nothing, because the secrets are missing.

      • Run 41626334638, job 125884513208.
      • Run 41636667720, job 125919481607.
    • Chatroom PR runs 41608343231, 41608349357, 41608350313, 41608354522, 41626691954 and 41637030665 ended skipped. No alert fired on a pull request.

    • gh secret list does not show RUNNER_WATCHDOG_TOKEN, TELEGRAM_BOT_TOKEN or TELEGRAM_CHAT_ID.

    • Runners on 2026-11-03: prod.docs.plus online and stage.docs.plus online.

    • Static items, read on HEAD:

      • The notify step has if: failure() && github.event_name == 'push'.
      • build and extension-tests have timeout-minutes: 15. deploy has timeout-minutes: 45.
      • The stale-facts grep prints nothing.
      • actionlint exits 0 on all four changed workflows.
      • prettier --check passes on the changed workflow files and WORKFLOWS.md.
      • bun run check:agent-docs passes: "536 headings, 2640 files scanned, all references resolve".
    • The Dependabot @sentry/* item was waived under the issue's Step 4. 7c3d7d26c already fixed the Sentry major.

    • Later checks, not close gates: record the PAT expiry. Confirm a Telegram alert on the next red chatroom push. Read the watchdog log two weeks after merge.

    Can close now: no — the maintainer sets the three secrets; then a watchdog dispatch must print ✅ All 2 self-hosted runners online

  5. modified the milestones: v2.3.0, v2.3.6 on Nov 9, 2026
  6. HMarzban commented on Nov 10, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-11-10

    The stage runner is removed. Answer: "let's remove the github stage runner, we do not have stage anymore."

    • stage.docs.plus (runner id 31) was deleted from the repository on 2026-11-10. One self-hosted runner is left: prod.docs.plus, online.
    • So the first item under Left is done: the stage runner can no longer make every watchdog run alert.
    • The watchdog counts runners from the API, so the workflow needs no change. Its success line now reads ✅ All 1 self-hosted runners online. The acceptance list is amended to match.

    Left:

    • Maintainer: set RUNNER_WATCHDOG_TOKEN, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID, and record the PAT expiry. The run at 02:59Z on 2026-11-10 still logged "checked nothing".
    • Builder: run both watchdog dispatch checks, then post the SP3 comment.
  7. changed the title [-]Make CI failures reach Telegram, and fix stale CI facts[/-] [+]Make CI failures reach Telegram: set the watchdog secrets, alert on red E2E pushes[/+] on Nov 11, 2026
  8. HMarzban commented on Nov 11, 2026

    @HMarzban
    CollaboratorAuthor

    Measured, 2026-11-11 (before). Read from gh secret list (names only), gh run list and the job logs.

    • Watchdog repo secrets: 0 of 3 set.
    • Watchdog runs from 2026-11-03 02:57Z to 2026-11-11 11:14Z: 35, all schedule, all green. None listed the runners.
      • 34 logged ##[warning]Runner watchdog checked nothing. Missing repo secrets: RUNNER_WATCHDOG_TOKEN TELEGRAM_BOT_TOKEN TELEGRAM_CHAT_ID.
      • The first, run 41569262090, ran before the 2026-11-03 push and took the old silent exit.
    • Gap between watchdog runs: median 6.1 h, max 10.4 h, min 3.0 h (n = 34 gaps). The cron says every 30 min. GitHub runs scheduled jobs on a best-effort basis.
    • Red E2E push runs on main, 2026-11-03 to 2026-11-11: chatroom 15 of 16, editor 12 of 16. They sent 0 alerts, because the secrets are missing.

    Body changes today:

  9. HMarzban commented on Nov 12, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-11-12

    Alert mode (a): the E2E notify steps alert only when a suite turns red after being green. All three secrets are set; none waits. This avoids a flood while #730 is open, and a new break still alerts.

  10. HMarzban commented on Nov 14, 2026

    @HMarzban
    CollaboratorAuthor

    Moved to v2.3.7 at the v2.3.6 release audit. The three watchdog secrets are not set, so no after is posted. The 7-day read is still due.

  11. modified the milestones: v2.3.6, v2.3.7 on Nov 14, 2026
  12. HMarzban commented on Nov 16, 2026

    @HMarzban
    CollaboratorAuthor

    Review, 2026-11-16 (maintainer approved).

  13. HMarzban commented on Nov 18, 2026

    @HMarzban
    CollaboratorAuthor

    Verification 1 passed, 2026-11-18

    • The maintainer set the three repo secrets: TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID at 06:47Z, and RUNNER_WATCHDOG_TOKEN at 06:53Z. The token is a fine-grained PAT with Administration read-only on this repository only, and it expires on 2027-11-19.
    • A watchdog dispatch, run 44254778127, printed ✅ All 1 self-hosted runners online at 06:54:31Z.
    • Next: the 7-day read, on or after 2026-11-25. Renew the token before 2027-11-19.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions