Skip to content

fix(watch): the workflow list query iterates .workflows[] - #1781

Merged
gHashTag merged 1 commit into
mainfrom
fix/red-watch-list-query
Oct 27, 2026
Merged

gHashTag merged 1 commit into
mainfrom
fix/red-watch-list-query

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

Follow-up to #1779 (issue #1778): the first live run of the red watch failed in one second — gh api .../actions/workflows -q '.[] | ...' iterated the response OBJECT, and jq met {total_count: 80, ...}'s number first: expected an object but got: number (80). The fix is one word: .workflows[]. The rules in the t27 card are untouched; dispatch will be re-run as the proof after merge.

Owner approval (foreign edit): the owner's standing instruction of 2026-10-27, verbatim: "да все три и сделай сам автономно и в конце три варианта ускорения по правилу парето и писать все на .t27".

{
  "version": 1,
  "head_sha": "8715405dcd2403ebb0980ccc77efddc7422c5da4",
  "summary": "One-word fix to the red watch's workflow-list jq query: iterate .workflows[] instead of the whole response object, which put the number 80 in jq's path and failed the first live run in one second.",
  "changes": [
    ".github/workflows/main-red-watch.yml: the workflow-list query becomes .workflows[] | [.id, .name, .path] | @tsv; nothing else moves, the card's rules are untouched."
  ],
  "tests": [
    {
      "command": "the first live dispatch of the watch (run 40448754580)",
      "result": "failed with 'expected an object but got: number (80)' -- the defect reproduced from the real endpoint's shape, not guessed",
      "status": "passed",
      "evidence": "The run's own log line, 2026-10-27T04:15:57Z; the fix targets exactly that input."
    },
    {
      "command": "python3 -c \"import yaml; yaml.safe_load(open('.github/workflows/main-red-watch.yml'))\"",
      "result": "the workflow still parses as valid YAML",
      "status": "passed",
      "evidence": "Run on this tree after the fix, 2026-10-27."
    }
  ],
  "limitations": [
    "The watch has not yet completed a green run; the dispatch after this merge is the proof, and the next scheduled run is 05:47 UTC."
  ],
  "tags": ["Ci", "Crons"],
  "blog": {
    "title": "One word in the watch's first eyeblink",
    "summary": "The red watch's first live run died in one second on a number where an object was expected; the endpoint wraps its list, and the query now unwraps it.",
    "outline": [
      "What the first dispatch measured: a one-second death with 'expected an object but got: number (80)', and why that number is the list's own total_count walked by the wrong iterator.",
      "The one-word fix and why the rules in the cron card never moved while the host learned the endpoint's shape.",
      "What the proof run owes: a green dispatch after merge, and the 05:47 UTC schedule carrying it from there."
    ]
  }
}

The first live run failed in one second: the workflows endpoint returns an
object {total_count: 80, workflows: [...]}, and .[] handed jq the number 80
first -- 'expected an object but got: number (80)'. One word; the rules in the
card are untouched.
@github-actions github-actions Bot added the status:in-progress 🔵 Agent working label Oct 27, 2026
@gHashTag gHashTag added the owner-approved-foreign Owner approved hand-written non-t27 code in this PR label Oct 27, 2026
@tri-claw

tri-claw Bot commented Oct 27, 2026

Copy link
Copy Markdown

Summary by t27-bees

The fix changes the jq query to iterate .workflows[] instead of the top-level object .[], because the GitHub API wraps the workflow list in an object with a total_count field — the old query hit that number first and crashed.

Worth a look

  • .github/workflows/main-red-watch.yml:39 — The query now correctly targets .workflows[]. If GitHub ever changes the response shape (e.g., removes the wrapper or renames the key), this will silently produce no output instead of failing loudly; the watch would then find zero workflows and report nothing.

Read: 1 files, +1 -1, the whole diff. Head 8715405. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

@github-actions

Copy link
Copy Markdown
Contributor

X Brain Health Check

Score: 100.0/100
Status: 🟢 HEALTHY
Threshold: 80/100

X Brain is above merge threshold

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Brain Stress Test Results

Tests: 261/261 passed, 0 leaked
Status: 🟢 PASS
Gate: every test in zig build test-brain-stress passes and none leaks

@gHashTag
gHashTag merged commit 82b76a0 into main Oct 27, 2026
45 checks passed
@github-actions github-actions Bot added status:completed Done and removed status:in-progress 🔵 Agent working labels Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved-foreign Owner approved hand-written non-t27 code in this PR status:completed Done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant