Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: create a web page to explain the pr for prs labeled with preview#7025

Open
mihir20 wants to merge 27 commits into
masterrudderlabs/rudder-server:masterfrom
mihir/ai-previewrudderlabs/rudder-server:mihir/ai-previewCopy head branch name to clipboard
Open

feat: create a web page to explain the pr for prs labeled with preview#7025
mihir20 wants to merge 27 commits into
masterrudderlabs/rudder-server:masterfrom
mihir/ai-previewrudderlabs/rudder-server:mihir/ai-previewCopy head branch name to clipboard

Conversation

@mihir20

@mihir20 mihir20 commented May 31, 2026

Copy link
Copy Markdown
Contributor

Description

Adds an opt-in GitHub Actions workflow that generates an AI-authored, visual review site for a PR and publishes it to GitHub Pages, gated by an ai-preview label.

Why

Reviewing an unfamiliar PR in an unfamiliar area of the codebase is slow. This generates a single self-contained page — architecture/sequence/state diagrams, a file walkthrough with annotated hunks, a risk
grid, and a review checklist — so a reviewer can understand the change by scanning before reading the diff.

How it works

The site is built by a sequential pipeline of four specialised Codex subagents (Codex CLI on Azure Foundry), each a separate codex exec with a focused prompt from .github/codex/agents/ (shared
conventions in _shared.md are prepended to every stage). Stages hand off through a review-work/ scratch directory that never leaves the runner — only review-site/ is deployed.

Stage Prompt Output
1. Analyze analyze.md review-work/analysis.json — structured facts (tl;dr, components, flows, data shapes, per-file summaries). Only stage that explores the repo broadly.
2. Diagrams diagrams.md review-work/diagrams/*.svg + diagrams.json manifest — hand-authored SVGs, changed elements in accent color.
3. Risks risks.md review-work/risks.json — adversarial pass: risks with severity, review checklist, testing assessment.
4. Assemble assemble.md review-site/index.html — single self-contained page; presentation only, no fresh analysis.

Required configuration

  • Repo variable: RELEASE_APP_ID
  • Repo secrets: RELEASE_PRIVATE_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY
  • Label: ai-preview must exist on the repo
  • gh-pages branch is auto-initialized on first deploy

How to use

Add the ai-preview label to a PR. Re-add it to refresh the preview after new commits (pushes alone don't rebuild). Close/merge the PR to tear the preview down.

Linear Ticket

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Comment thread .github/workflows/ai-preview.yaml Fixed
Comment thread .github/workflows/ai-preview.yaml Fixed
Comment thread .github/workflows/ai-preview.yaml Fixed
Comment thread .github/workflows/ai-preview.yaml Fixed
Comment thread .github/workflows/ai-preview.yaml Fixed
Comment thread .github/workflows/ai-preview.yaml Fixed
Comment thread .github/workflows/ai-preview.yaml Fixed
@codecov

codecov Bot commented May 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.69%. Comparing base (2882af4) to head (4804c6d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7025      +/-   ##
==========================================
- Coverage   80.07%   79.69%   -0.39%     
==========================================
  Files         596      596              
  Lines       66444    66444              
==========================================
- Hits        53206    52953     -253     
- Misses      10096    10365     +269     
+ Partials     3142     3126      -16     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mihir20
mihir20 force-pushed the mihir/ai-preview branch from d3bf36a to a86e3eb Compare May 31, 2026 11:37
@mihir20 mihir20 added the ai-preview runs a workflow to generate a preview webpage for the code changes in the pr label Jun 1, 2026
rudderstack-github-actions Bot pushed a commit that referenced this pull request Jun 1, 2026
@rudderstack-github-actions

rudderstack-github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

PR preview

View the preview

Updated for commit 4804c6d.

@mihir20 mihir20 added ai-preview runs a workflow to generate a preview webpage for the code changes in the pr and removed ai-preview runs a workflow to generate a preview webpage for the code changes in the pr labels Jun 1, 2026
rudderstack-github-actions Bot pushed a commit that referenced this pull request Jun 1, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR is considered to be stale. It has been open 20 days with no further activity thus it is going to be closed in 7 days. To avoid such a case please consider removing the stale label manually or add a comment to the PR.

@github-actions github-actions Bot added the Stale label Jun 22, 2026
@github-actions github-actions Bot closed this Jun 30, 2026
@mihir20 mihir20 reopened this Jul 21, 2026
@mihir20 mihir20 removed the Stale label Jul 21, 2026
mihir20 added 10 commits July 21, 2026 10:09
…ent steps

🔒 Scanned for secrets using gitleaks 8.28.0
… section

🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
…review.yaml

🔒 Scanned for secrets using gitleaks 8.28.0
…yment in ai-preview.yaml

🔒 Scanned for secrets using gitleaks 8.28.0
…ut guidelines

🔒 Scanned for secrets using gitleaks 8.28.0
…itions for PR previews

🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20
mihir20 force-pushed the mihir/ai-preview branch from a86e3eb to 7d2db22 Compare July 21, 2026 04:39
@mihir20 mihir20 removed the ai-preview runs a workflow to generate a preview webpage for the code changes in the pr label Jul 21, 2026
🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20 mihir20 added the ai-preview runs a workflow to generate a preview webpage for the code changes in the pr label Jul 21, 2026
rudderstack-github-actions Bot pushed a commit that referenced this pull request Jul 21, 2026
Comment thread .github/workflows/ai-preview.yaml Outdated
run: |
set -euo pipefail
mkdir -p review-work
codex exec --dangerously-bypass-approvals-and-sandbox \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems a bit dangerous, why do we need to bypass network restrictions?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

GitHub-hosted runners block bubblewrap's network. So we had to bypass the sandbox.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Using this, this prevents network access and also adds other restrictions, like removing superuser privileges.

mihir20 added 4 commits July 21, 2026 14:02
🔒 Scanned for secrets using gitleaks 8.28.0
…ndboxing

🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
…preview

🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20 mihir20 added ai-preview runs a workflow to generate a preview webpage for the code changes in the pr and removed ai-preview runs a workflow to generate a preview webpage for the code changes in the pr labels Jul 21, 2026
@mihir20 mihir20 added ai-preview runs a workflow to generate a preview webpage for the code changes in the pr and removed ai-preview runs a workflow to generate a preview webpage for the code changes in the pr labels Jul 21, 2026
🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20 mihir20 added ai-preview runs a workflow to generate a preview webpage for the code changes in the pr and removed ai-preview runs a workflow to generate a preview webpage for the code changes in the pr labels Jul 21, 2026
rudderstack-github-actions Bot pushed a commit that referenced this pull request Jul 21, 2026
… validation steps

🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20 mihir20 added ai-preview runs a workflow to generate a preview webpage for the code changes in the pr and removed ai-preview runs a workflow to generate a preview webpage for the code changes in the pr labels Jul 21, 2026
…and improve job execution

🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20 mihir20 added ai-preview runs a workflow to generate a preview webpage for the code changes in the pr and removed ai-preview runs a workflow to generate a preview webpage for the code changes in the pr labels Jul 21, 2026
…cate TOML keys

🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20 mihir20 added ai-preview runs a workflow to generate a preview webpage for the code changes in the pr and removed ai-preview runs a workflow to generate a preview webpage for the code changes in the pr labels Jul 21, 2026
…event duplicate keys and streamline subagent execution

🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20 mihir20 added ai-preview runs a workflow to generate a preview webpage for the code changes in the pr and removed ai-preview runs a workflow to generate a preview webpage for the code changes in the pr labels Jul 21, 2026
rudderstack-github-actions Bot pushed a commit that referenced this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-preview runs a workflow to generate a preview webpage for the code changes in the pr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.