Skip to content

feat(workflows): migrate Jules call sites to pm-dispatch dispatch actions (#2672 part 3) - #2678

Merged
dezren39 merged 1 commit into
mainfrom
feat/2672-p3-code-workflows
Oct 30, 2026
Merged

dezren39 merged 1 commit into
mainfrom
feat/2672-p3-code-workflows

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Part of #2672

Part 3 (code repo itself): migrate this repo's workflow call sites from Jules / direct issue creation to the pm-dispatch reusable actions merged in #2676 (pm-dispatch-start / pm-dispatch-queue @main). Every migrated job grants permissions: id-token: write (job-level blocks also restate the scopes the job already had, since job permissions replace workflow permissions).

Per-file summary of what was replaced:

  • .github/workflows/flake-inputs-update.yml — the "Record the failure" step no longer creates the tracking issue with gh issue create (it still edits an existing tracker in place and now outputs the attempt count). The old "Escalate the failure" step — JULES_API_KEY env, the jules.googleapis.com session POST, and the attempt-1 / attempt-3 Jules-vs-Claude-tasks routing comments — is replaced by: a prompt-preparation step (carries the old Jules fix prompt, enriched with the failed step, run URL, attempted revs, and the latest failure entry the issue body carried), the starter when no tracker is open (title = FAILURE_ISSUE_TITLE, so exactly one issue per incident, created by the starter), and the queuer with issue_number when a tracker already exists (fresh task attached, no second issue). Header comments describing the old escalation chain were rewritten. Update/validation/publish logic and the tracker-title lookup are unchanged.
  • .github/workflows/main-broken.yml — mechanism only. The single filing step was split into an identify step (same Breakage-ID computation, dedup search, and dry-run behaviour, now emitting outputs) plus dispatch steps: creation goes through the queuer with issue: true, then a follow-up gh issue edit step applies this workflow's own label set (kind/ci, priority/critical, main-broken, queue/queued, status/needs-triage) from the queuer's issue_number output, because dispatch only applies queue/queued + source/dispatch. Label coining was kept (moved to its own step before the label apply). The append path (existing Breakage-ID issue) now uses the queuer with issue_number to enqueue a fresh fix task alongside the existing recurrence comment. Holder bookkeeping is preserved verbatim in substance: agent-note:v1 — holder: chain (filing), the jules-budget step (<3 open jules-labelled main-broken issues, same holder notes) and the daily release-check job are unchanged in logic — the jules label name, its budget, and its holder notes stay; the label now triggers an OpenCode session via the migrated jules.yml. Comments/agent-notes that described Jules-the-service now say "remediation (via pm-dispatch)".
  • .github/workflows/jules.yml — all four google-labs-code/jules-action steps (weekly cleanup, issues:labeled jules trigger, workflow_run ci-failure-fix, manual dispatch) replaced with the starter. Prompts carried over faithfully: the issue-labeled prompt references the labeled issue's number/title/body and instructs fixing it (title = issue title); the workflow_run prompt references the failed workflow/branch/run URL from github.event.workflow_run (title names both). jules-action-only inputs (jules_api_key, starting_branch, include_last_commit) are gone. Triggers, conditions, concurrency, and job structure unchanged. Header comments rewritten for the dispatch/OIDC flow. The display name was renamed Jules → pm-dispatch after grepping the repo's workflows: no workflow_run trigger references this workflow by the name "Jules". The filename jules.yml is kept (other files reference that path).
  • .github/workflows/jules-daily-codebase-ideation.yml — the single jules-action step replaced with the starter (prompt carried verbatim, title "Daily codebase innovation & maintenance"); display name and header comment updated; id-token: write added.
  • .github/workflows/jules-daily-flake-sync.yml — same treatment (prompt verbatim, title "Daily flake sync & config optimization"); display name and header comment updated; id-token: write added.
  • .github/workflows/repo-sweeper.yml — not a call site: one comment line corrected ("waits for Jules to start work" → "waits for the dispatched OpenCode session to start"), since the old wording became wrong after the jules.yml migration. No behaviour change.

Validation: all six files parse with a YAML parser; every embedded run: script passes bash -n; actionlint 1.7.7 reports no new findings versus the same files on main (only the pre-existing concurrency.queue schema notes and pre-existing shellcheck info/style notes, plus one additional info-level SC2016 for an intentional single-quoted printf format string in the same style as the original). No remaining references to jules.googleapis.com, JULES_API_KEY, or jules-action in these files; remaining "jules" mentions are the jules label name, the jules.yml filename, pkgs/jules* paths inside a verbatim prompt, and historical header context.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 10:11
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7b8c628e-b5c1-4a18-a6a9-596dd9545bb9
Commits

Reviewing files that changed from the base of the PR and between 9d91d38 and 575c79b.

Files selected for processing: 6
  • .github/workflows/flake-inputs-update.yml
  • .github/workflows/jules-daily-codebase-ideation.yml
  • .github/workflows/jules-daily-flake-sync.yml
  • .github/workflows/jules.yml
  • .github/workflows/main-broken.yml
  • .github/workflows/repo-sweeper.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T10:15:38.766475Z 575c79b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 65d87df into main Oct 30, 2026
1 check passed
@dezren39
dezren39 deleted the feat/2672-p3-code-workflows branch October 30, 2026 10:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 575c79bafc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +322 to +326
if [ -f "$RUNNER_TEMP/entry.md" ]; then
echo "Latest failure entry (the tracking issue body carries the full failure history and error excerpts):"
echo
cat "$RUNNER_TEMP/entry.md"
elif [ -f "$RUNNER_TEMP/issue-body.md" ]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the tracking header and history on the first failure

For a new incident, the starter creates the issue from this prompt, but this branch includes only entry.md, not the assembled issue-body.md. The resulting issue lacks Attempts:, First failure:, and ## Failure history, which the existing record-failure step parses on subsequent runs. Consequently, the second failed run resets the count to 1, replaces the first-failure timestamp, and discards the first error excerpt. Include the complete assembled tracking body when creating the initial issue so later updates preserve the incident history.

Useful? React with 👍 / 👎.

Comment on lines +247 to +251
uses: developing-today/code/.github/actions/pm-dispatch-queue@main
with:
title: ${{ steps.identify.outputs.title }}
prompt: ${{ steps.identify.outputs.prompt }}
issue_number: ${{ steps.identify.outputs.existing_number }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Ensure recurrence dispatch produces a runnable task

When a breakage recurs while its issue remains open, this call does not reliably create the advertised fresh fix task. Both the create and append calls default to triage, so pm-stack/dispatch/src/server.ts derives the same canonical kind/repo/issue dedupe key. pm-stack/dispatch/src/queue.ts explicitly documents that enqueue deduplicates against all tasks, including completed ones, and returns the old row unchanged. If the previous task completed, exhausted its attempts, or was cancelled without resolving the breakage, this step reports success but leaves no runnable remediation task and does not update its run evidence. Provide recurrence-specific deduplication or explicitly requeue the terminal task; the existing-issue path in flake-inputs-update.yml has the same problem after its first queued retry.

Useful? React with 👍 / 👎.

Comment on lines +193 to +196
- name: Apply the chain label set to the created issue
if: steps.identify.outputs.action == 'create'
env:
INUM: ${{ steps.dispatch-create.outputs.issue_number }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the tracker when queue submission fails

If GitHub issue creation succeeds but queue submission fails, pm-stack/dispatch/src/server.ts returns HTTP 502 with the newly created issue_number, and the composite action exits before publishing that output. This subsequent label step therefore never runs, leaving the issue without main-broken. Later watcher runs cannot discover it because their deduplication search requires that label, so repeated failures or retries create duplicate orphan trackers instead of updating the existing incident. Previously, issue creation applied the chain labels atomically. Preserve and reconcile the created issue on dispatch failure so subsequent runs can still find it.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant