Skip to content

feat(reflexion): implement issue-driven cloud runner#78

Merged
bronz3beard merged 1 commit into
mainfrom
feature/ws7-reflexion-issue-runner-4741346364888340434
Jul 14, 2026
Merged

feat(reflexion): implement issue-driven cloud runner#78
bronz3beard merged 1 commit into
mainfrom
feature/ws7-reflexion-issue-runner-4741346364888340434

Conversation

@bronz3beard

Copy link
Copy Markdown
Owner

This PR implements WS-7: Issue-driven cloud runner per the loop-engineering playbook. The core requirement is that the Reflexion Loop can be interacted with exclusively through GitHub issues without the Action ever pushing code to the repository.

Changes

  1. GitHub Workflow (.github/workflows/reflexion-issue-runner.yml):

    • Triggers on issues (labeled reflexion:run), issue_comment (starting with /reflexion), and workflow_dispatch.
    • Permissions are restricted to issues: write, actions: read, contents: read.
    • Idempotency enforced via concurrency grouping by issue number.
  2. Runner Script (scripts/reflexion-issue-runner.js):

    • Implements both the START path (running the loop initially and uploading state artifacts) and RESUME path (downloading the previous artifact, accepting YAML input, and resuming the loop).
    • Utilizes GitHub API (via fetch) internally since the gh CLI does not run on Node natively.
    • Extracts zips safely via adm-zip.
    • Parses incoming YAML securely using js-yaml and strict zod schema definitions.
    • Strict idempotency handled by looking back at processed-comment-id invisible HTML markers in bot responses.
    • 10-turn cap hard limits.
  3. Pure Logic Scripts (scripts/reflexion-issue-runner-utils.js):

    • Handles text parsing, extraction of run markers, comment format generation, and Zod answer validation in a pure, testable environment.
  4. Docs (docs/reflexion-issue-runner.md):

    • Covers secrets layout, phone workflow behavior, state isolation security models.
  5. Dependencies:

    • Adds adm-zip and js-yaml.

Evidence

> @bronz3beard/tech-lead-stack@1.0.0 check-types
> tsc --noEmit --pretty --skipLibCheck

> @bronz3beard/tech-lead-stack@1.0.0 test
> jest

 PASS  scripts/__tests__/reflexion-issue-runner-utils.test.js
  reflexion-issue-runner-utils
    extractRunIdMarker
      ✓ should extract a valid marker
    extractProcessedCommentIdMarker
      ✓ should extract a valid marker
    formatRunnerComment
      ✓ should format a diagnostic error message
      ✓ should include processed-comment-id marker
    extractYamlBlock
      ✓ should extract a standard yaml block
    validateAnswers
      ✓ validates correct answers structure
      ✓ validates directive only
      ✓ fails on missing runId

PR created automatically by Jules for task 4741346364888340434 started by @bronz3beard

Implements the WS-7 issue-driven cloud runner for the Reflexion loop.
The runner allows developers to start and interact with the AI
engineering loop entirely through GitHub issues and comments.

- Adds `.github/workflows/reflexion-issue-runner.yml` to trigger on
  labeled issues, specific comments, and manual workflow dispatch.
- Introduces `scripts/reflexion-issue-runner.js` to process START
  and RESUME paths without ever pushing code directly.
- Handles artifact zip extraction using `adm-zip` and inputs using
  Zod schema validation (`js-yaml`).
- Enforces a 10-turn cap per issue loop.
- Uses `<!-- processed-comment-id:XXX -->` markers to ensure strict
  idempotency of webhook re-deliveries.
- Adds `docs/reflexion-issue-runner.md` for workflow setup.
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-tech-lead-stack Ready Ready Preview, Comment Jul 14, 2026 2:33pm

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@bronz3beard bronz3beard merged commit 6d07ef7 into main Jul 14, 2026
2 checks passed
@bronz3beard bronz3beard deleted the feature/ws7-reflexion-issue-runner-4741346364888340434 branch July 14, 2026 14:37
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