Skip to content

Epic A: Workflow & CI Governance (Sprint 1)#9708

Open
arii wants to merge 6 commits into
leaderfrom
epic-a-workflow-ci-governance-6406265858478681059
Open

Epic A: Workflow & CI Governance (Sprint 1)#9708
arii wants to merge 6 commits into
leaderfrom
epic-a-workflow-ci-governance-6406265858478681059

Conversation

@arii
Copy link
Copy Markdown
Owner

@arii arii commented Apr 22, 2026

This PR implements the full set of requirements for Epic A — Workflow & CI Governance (Sprint 1).

Key changes:

  1. Deterministic Gating: .github/workflows/pr-quality.yml now enforces ESLint, TypeScript, and Knip as a mandatory pass before any AI review. Failing checks post a diagnostic PR comment with truncated logs.
  2. AI Gate Decision: Implemented logic to skip Gemini for low-risk PRs, drafts, and synchronize events. AI is only invoked for risk files (e.g., server.ts), explicit labels (ai:required), or manual force.
  3. Jules Direct Mode: Updated jules_ops.py to support --mode direct which skips debt-issue creation. Safety gates block direct mode on deterministic failure or risk path touches.
  4. Architectural Linting: Added no-restricted-imports to eslint.config.mjs to prevent leaking transport logic (ws) or server-only modules into the frontend component tree.
  5. Workflow Governance: Removed 4 legacy/broken workflows and added ownership headers to all remaining files. Updated references in conflict-resolver.yml and comment-ops.yml.
  6. Telemetry: Added telemetry fields to the AI gate summary.

Verified via local linting, type-checking, unit tests, and CLI dry-runs.

Fixes #9707


PR created automatically by Jules for task 6406265858478681059 started by @arii

- Consolidate CI orchestration into pr-quality.yml with deterministic gates.
- Implement ai_gate_decision to reduce Gemini AI usage.
- Add Jules --mode direct with safety gates for risk paths.
- Enforce architectural boundary lint rules for transport and server-only modules.
- Clean up legacy workflows (pr-orchestrator, auto-fix, etc.) and add ownership metadata.
- Update PR template with new Sprint 1 checklist.

Co-authored-by: arii <342438+arii@users.noreply.github.com>
@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.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Welcome to HRM!

Thanks for your contribution. This repository uses Gemini AI for automated triage, code review, and generation.

🤖 Gemini Manual Trigger Quick Reference

Command Action
@gemini-bot Run AI Code Review (PR only)

For more details, see the Manual Trigger Guide.

@github-actions
Copy link
Copy Markdown
Contributor

AI Gate Decision

  • run_ai: false
  • reason: draft_skip

Telemetry

  • deterministic_fail: false
  • ai_skipped: true
  • ai_invoked: false
  • tokens_used: N/A

Copy link
Copy Markdown
Owner Author

@arii arii left a comment

Choose a reason for hiding this comment

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

update jules session manager to go through bot command orchestrator so we dont have duplicate sessions

also remove the gemini-coder workflow since it doesnt work

@arii
Copy link
Copy Markdown
Owner Author

arii commented Apr 22, 2026

@codex

Copy link
Copy Markdown

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

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: 8036e0acee

ℹ️ 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 thread .github/scripts/jules_ops.py Outdated
Comment on lines +92 to +93
parser.add_argument("--deterministic-passed", default="true", help="Whether deterministic checks passed.")
parser.add_argument("--changed-files", help="Comma-separated list of changed files.")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fail closed for direct-mode safety inputs

Direct mode safety checks currently fail open: --deterministic-passed defaults to "true", and risk-path blocking only runs when --changed-files is explicitly provided. In the new @jules-new --direct path, callers can omit both inputs, so direct mode is allowed even when deterministic checks failed or high-risk files changed, which bypasses the guardrails this change is meant to enforce.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/pr-quality.yml Outdated
Comment on lines +283 to +284
pr_number: ${{ github.event.pull_request.number }}
last_non_empty_commit: ${{ github.event.pull_request.head.sha }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pass PR context when invoking reusable Gemini review

This workflow is now triggered by workflow_dispatch, but it always forwards github.event.pull_request.* to the reusable review job. On dispatch runs (including the new conflict-resolver trigger), those fields are empty, so downstream review logic cannot resolve PR/SHAs and forced AI review does not execute correctly. This needs dispatch-safe inputs (or PR lookup) before calling reusable-gemini-review.yml.

Useful? React with 👍 / 👎.

Comment on lines +151 to +153
# Find the most recent successful run of 'PR Quality' (pr-quality.yml) for this branch.
# This workflow produces the 'review-result' artifact.
RUN_ID=$(gh run list --workflow pr-orchestrator.yml --branch "$BRANCH" --status success --limit 1 --json databaseId -q '.[0].databaseId')
RUN_ID=$(gh run list --workflow pr-quality.yml --branch "$BRANCH" --status success --limit 1 --json databaseId -q '.[0].databaseId')
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 Choose a run with review artifacts for issue creation

Manual @create-review-issues now selects the latest successful pr-quality.yml run, but successful PR Quality runs can skip Gemini (run_ai=false) and therefore produce no review-result artifact. Because RUN_ID is already set, the fallback to Bot Command Orchestrator is skipped, so issue creation often targets a run that has nothing to convert into issues.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown
Contributor

AI Gate Decision

  • run_ai: false
  • reason: draft_skip

Telemetry

  • deterministic_fail: false
  • ai_skipped: true
  • ai_invoked: false
  • tokens_used: N/A

- Consolidate CI orchestration into pr-quality.yml with deterministic gates (ESLint, TSC, Knip).
- Implement ai_gate_decision logic to reduce Gemini AI usage based on risk, labels, and event types.
- Add invocation capping for Gemini (1 default, 2 with ai:required label).
- Enhance Jules CLI (jules_ops.py) with --mode audit|direct and safety gates for sensitive paths.
- Update jules-session-manager.yml to enforce safety gates and alignment with direct mode.
- Implement architectural boundary lint rules to block forbidden transport and server-only imports.
- Create docs/IMPORT_GUIDELINES.md for architectural compliance.
- Cleanup legacy workflows and add mandatory ownership (@arii) and metrics metadata.
- Update pull_request_template.md with Sprint 1 checklist.

Co-authored-by: arii <342438+arii@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@arii arii added the not reviewed The review could not be performed or completed successfully. label Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

AI Gate Decision

  • run_ai: true
  • reason: risk_file_changed

Telemetry

  • deterministic_fail: false
  • ai_skipped: false
  • ai_invoked: true
  • tokens_used: N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Gemini Review Skipped

Review was skipped for the following reason: Gemini review is globally disabled

🤖 Gemini Manual Trigger Guide

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

Labels

not reviewed The review could not be performed or completed successfully.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Epic A — Workflow & CI Governance (Sprint 1)

2 participants