Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions .agents/skills/triage/comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,20 @@ If `report.md` is missing or empty, generate a minimal comment (see "Fallback" s

## Step 2: Generate Comment

Generate and return a GitHub comment following this template. Adapt it to fit the findings:
Generate and return a GitHub comment following the template below.

- Include only the sections that are relevant to what was discovered
- If the issue could NOT be reproduced, omit the fix-related sections
- If no fix was developed, omit the "How to Fix" section or replace its content with a brief note explaining why
- Add or remove subsections as needed to clearly communicate findings
### Special Cases

Keep it concise:

- Summary section: One sentence per bold field
- Use collapsible `<details>` sections for longer content
- Include exact versions, commands, and file paths where relevant

Format requirements:

- Code blocks: Use appropriate language hints (bash, typescript, diff, patch, etc.)
- Patches: Use ```diff for maintainer patches
- **If the user is on a different major version than the current monorepo, and the issue could not be reproduced in the current monorepo:** In the "Fix" section of your comment, the best guidance you can provide is to suggest that the user upgrade to that newer major version to fix their issue, even if that newer major version is a beta release. Link to the relevant upgrade guide:
- v6: https://v6.docs.astro.build/en/guides/upgrade-to/v6/
- v5: https://docs.astro.build/en/guides/upgrade-to/v5/

### Template

```markdown
**[I was able to reproduce this issue. / I was unable to reproduce this issue.]** [1-2 sentences describing the result and key observations.]

**Fix:** [If `branchName` arg is non-null, include: [Create PR](https://github.com/withastro/astro/compare/{branchName}?expand=1)] **[I was able to fix this issue. / I was unable to fix this issue.]** [1-2 sentences describing the solution and key observations. Even if no fix was created, you can still use this space to give guidance or "a best guess" at where the fix might be.]
**Fix:** [If `branchName` arg is non-null, include: [Create PR](https://github.com/withastro/astro/compare/{branchName}?expand=1)] **[I was able to fix this issue. / I was unable to fix this issue]** [1-2 sentences describing the solution and key observations. Even if no fix was created, you can still use this space to give guidance or "a best guess" at where the fix might be.]

**Cause:** [Single sentence explaining the root cause - or just the word "Unknown" if not determined.]

Expand Down
64 changes: 33 additions & 31 deletions .agents/skills/triage/reproduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,34 @@ Once you have `bugDetails`, read carefully:

Before attempting reproduction, check if this issue should be skipped due to a limitation of our sandbox reproduction environment.

If any condition below is met, skip to Step 6 and write `report.md` with the skip details.
If any early exit condition is met, skip to Step 6 and write `report.md` with the skip details.

- **Not actionable** — Issue is not a bug report (this workflow can only act to triage bugs, cannot handle feature requests, suggestions, etc.). → skip reason: `not-actionable`
- **Unsupported version** — Astro 4.x or earlier (check `astro info` output or package.json). → skip reason: `unsupported-version`
- **Unsupported runtime** — Bug is specific to Bun or Deno. → skip reason: `unsupported-runtime`
- **Host-specific** — Bug is specific to Vercel, Netlify, Cloudflare, etc. (check for runtime adapter usage). → skip reason: `host-specific`
- **Maintainer override** — A maintainer commented that this issue cannot be reproduced here. Check status: `gh api "repos/<owner>/<repo>/collaborators/<user>" --silent && echo "user is collaborator"`. → skip reason: `maintainer-override`
**Comment Handling for Early Exits:** Sometimes future comments will provide additional reproductions. An early exit is only valid if not future comments in that issue "invalidate" it. For example, if the original poster of a bug was on Astro 3.0, we would exit initially (`unsupported-version`). However, on a future run, if a commenter had later posted a similar reproduction but on the latest version of Astro, we would no longer consider that a valid early exit, and would instead continue on with the workflow.

The following are the documented early exit conditions that we support:

### Not Actionable (`not-actionable`)

Skip if the issue is not a bug report. This workflow can only triage bugs — feature requests, suggestions, and discussions are not actionable here.

### Unsupported Astro Version (`unsupported-version`)

Skip if the bug targets Astro 4.x or earlier. Look for version in `astro info` output or package.json mentions.

### Host-Specific Issues (`host-specific`)

Skip if the bug can only be reproduced on a specific hosting platform (Vercel, Netlify, Cloudflare, Deno Deploy, etc.). Signs to look for:

- Issue references a host-specific adapter (`@astrojs/vercel`, `@astrojs/netlify`, `@astrojs/cloudflare`)
- Bug only occurs "in production" or "after deployment" but specifically not reproducible in dev and local preview builds

### Runtime-Specific Issues (`unsupported-runtime`)

Skip if the bug is specific to Bun or Deno. Our sandbox only supports Node.js.

### Maintainer Override (`maintainer-override`)

Skip if a repository maintainer has commented that this issue should not be reproduced here. Check collaborator status with: `gh api "repos/<owner>/<repo>/collaborators/<user>" --silent && echo "user is collaborator"`

## Step 3: Set Up Reproduction Project

Expand All @@ -62,7 +83,7 @@ Check the issue to determine what's needed:
- MDX content → `pnpm astro add mdx`
- Specific adapter → `pnpm astro add node` (or vercel, netlify, etc.)

## Step 4: Configure the Project
## Step 4: Configure the Triage Project

Based on the issue, modify the triage project:

Expand All @@ -72,32 +93,13 @@ Based on the issue, modify the triage project:

Keep the reproduction as minimal as possible — only add what's needed to trigger the bug.

## Step 5: Attempt Reproduction

Run commands to reproduce the issue:

```bash
# For build-time issues
pnpm run build

# For dev server issues
pnpm run dev
# Then use agent-browser to test: npx agent-browser http://localhost:4321/path

# For preview issues
pnpm run build && pnpm run preview
```

Test both:

1. **The broken case** — follow the steps to trigger the bug
2. **The working case** — verify the project works normally before the breaking change
## Step 5: Attempt Reproduction in the Triage Project

Document what you observe:
Use all of the tools at your disposal — `pnpm run dev|build|preview|test`, `curl`, `agent-browser`, etc.

- Exact error messages and stack traces
- Which command triggers the issue
- Whether the issue is consistent or intermittent
1. **Trigger the bug.** Follow the reproduction steps from the issue and confirm that the bug appears.
2. **Verify the baseline.** Remove or reverse the triggering code and confirm the project works without the bug. This guards against false positives — if the project is still broken without the triggering code, the issue may be in your setup, not the reported bug.
3. **Document what you observe.** Record exact error messages and stack traces, which command triggers the issue, and whether it's consistent or intermittent.

## Step 6: Write Output

Expand Down
6 changes: 5 additions & 1 deletion .flue/workflows/issue-triage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,17 @@ Return only "yes" or "no" inside the ---RESULT_START--- / ---RESULT_END--- block
// - create a PR from that branch entirely in the GH UI
// - ignore it completely
if (fixResult.fixed) {
// Check if the fix skill left uncommitted changes in packages/
const status = await flue.shell('git status --porcelain');
// TODO: Assert flue.branch
if (status.stdout.trim()) {
await flue.shell(`git checkout -B ${flue.branch}`);
await flue.shell('git add -A');
// TODO: we should add comments to flue.shell internally, to find out why nothing happened.
await flue.shell(
`git commit -m ${JSON.stringify(fixResult.commitMessage ?? 'fix(auto-triage): automated fix')}`,
);
const pushResult = await flue.shell(`git push origin HEAD:refs/heads/${flue.branch}`);
const pushResult = await flue.shell(`git push -f origin ${flue.branch}`);
console.info('push result:', pushResult);
isPushed = pushResult.exitCode === 0;
}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
issue_comment:
types: [created]

concurrency:
# Only one triage run per issue at a time. New runs queue (not cancel)
# to avoid killing in-flight runs when the bot posts its own comment.
group: issue-triage-${{ github.event.issue.number }}
cancel-in-progress: false

jobs:
triage:
# 1. Skip old issues (only run on issues created after this workflow was created)
Expand Down Expand Up @@ -44,7 +50,7 @@ jobs:
echo "/home/runner/.opencode/bin" >> $GITHUB_PATH

- name: Install agent-browser
run: pnpm install -g agent-browser --config.onlyBuiltDependencies='*' && agent-browser install
run: npm install -g agent-browser && agent-browser install

- name: Install deps
run: pnpm install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"@biomejs/biome": "2.3.6",
"@changesets/changelog-github": "^0.5.2",
"@changesets/cli": "^2.29.8",
"@flue/cli": "^0.0.17",
"@flue/client": "^0.0.9",
"@flue/cli": "^0.0.18",
"@flue/client": "^0.0.10",
"@types/node": "^18.19.115",
"esbuild": "0.25.5",
"eslint": "^9.39.2",
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading