Skip to content

Fix and improve docs automation scripts - #50120

Merged
morgankrey merged 6 commits into
mainfrom
fix/docs-scripts-label-issue
Feb 26, 2026
Merged

Fix and improve docs automation scripts#50120
morgankrey merged 6 commits into
mainfrom
fix/docs-scripts-label-issue

Conversation

@morgankrey

@morgankrey morgankrey commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes issues discovered while running the docs automation workflow for the first time, plus improvements based on the v0.225 run where 44 suggestions overwhelmed a single Droid invocation.

docs-suggest-publish

  • Ignore untracked files when checking for clean working directory
  • Add --auto high flag to droid exec for non-interactive use
  • Add error handling to show droid output on failure
  • Remove non-existent documentation label from PR creation
  • Use --write flag for prettier to fix formatting
  • Batch suggestions into groups of 10 (configurable with --batch-size) to prevent Droid from dropping suggestions when context is too large
  • Pre-PR docs build validation — runs generate-action-metadata + mdbook build before creating the PR to catch invalid {#action} and {#kb} references locally instead of waiting for CI (skippable with --skip-validation)
  • Prompt guardrail — instructs Droid not to invent {#kb} or {#action} references, only reusing action names already present in docs files
  • Stable release detection — at publish time, checks each queued PR's merge commit against the latest stable release tag. PRs already in stable get annotated "ALREADY IN STABLE" so Droid applies content changes without adding incorrect Preview callouts
  • Feature flag detection — parses crates/feature_flags/src/flags.rs for all feature flag struct names, then checks each PR's diff for references. PRs behind feature flags are skipped entirely since those features aren't generally available yet

docs-strip-preview-callouts

  • Remove non-existent documentation label from PR creation
  • Add Release Notes: - N/A to generated PR body (fixes Danger bot check)

Context

These scripts were run for the first time as part of the v0.225 release. Issues found:

  1. The documentation label doesn't exist in this repo
  2. Droid exec needs --auto high for non-interactive execution
  3. Prettier needs --write to actually fix files (was running in check mode)
  4. Untracked files should not block the workflow
  5. Sending all 44 suggestions in one Droid invocation only applied 2 — batching in groups of 10 fixed this
  6. Droid hallucinated action names (settings::OpenSettings, gpui::Modifiers::secondary_key) that broke the docs preprocessor build
  7. PRs that shipped in stable v0.225 incorrectly got Preview callouts because the queue doesn't distinguish preview-only from already-in-stable
  8. PRs behind feature flags (subagents, git graph) got documented despite not being generally available

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Feb 25, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Feb 25, 2026
@morgankrey morgankrey changed the title Fix docs automation scripts for non-interactive use Fix and improve docs automation scripts Feb 25, 2026
@morgankrey
morgankrey force-pushed the fix/docs-scripts-label-issue branch from 15b6add to 20e1619 Compare February 25, 2026 20:17
morgankrey and others added 6 commits February 25, 2026 15:18
The 'documentation' label doesn't exist in this repo, causing the PR creation to fail.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
…-suggest-publish

- Split suggestions into batches of 10 (configurable with --batch-size) to
  avoid Droid dropping suggestions when context is too large
- Add pre-PR docs build validation (generate-action-metadata + mdbook build)
  to catch invalid action references before CI, skippable with --skip-validation
- Add prompt rule telling Droid not to invent {#kb} or {#action} references
- Add mdbook to prerequisite checks when validation is enabled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The generated PR was missing the Release Notes section, causing the
Danger bot check to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
At publish time, check each queued PR's merge commit against the latest
stable release tag. If the PR is already in stable, annotate its
suggestion with "ALREADY IN STABLE" so Droid applies the content
changes without adding Preview/Changed-in-Preview callouts.

This prevents the situation where suggestions queued before a stable
release incorrectly add Preview callouts for features that already
shipped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
At publish time, parse crates/feature_flags/src/flags.rs to extract all
feature flag struct names, then check each queued PR's diff for
references to those flags. PRs that touch feature-flagged code are
skipped entirely — their suggestions aren't sent to Droid, and a note
is added to the apply summary.

This prevents documenting features like subagents or git graph that
are behind server-controlled feature flags and not yet generally
available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use latest model alias instead of hardcoded date version
- Capitalize PR title and commit message after scope prefix
- Add comment explaining force push of suggestions branch
- Remove leftover blank lines
- Ignore untracked files in strip-preview-callouts clean check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@morgankrey
morgankrey force-pushed the fix/docs-scripts-label-issue branch from 15af5d3 to ca72110 Compare February 25, 2026 21:21
@morgankrey
morgankrey merged commit 2ec2b4c into main Feb 26, 2026
27 checks passed
@morgankrey
morgankrey deleted the fix/docs-scripts-label-issue branch February 26, 2026 01:02
rtfeldman pushed a commit that referenced this pull request Feb 27, 2026
## Summary

Fixes issues discovered while running the docs automation workflow for
the first time, plus improvements based on the v0.225 run where 44
suggestions overwhelmed a single Droid invocation.

### docs-suggest-publish
- Ignore untracked files when checking for clean working directory
- Add `--auto high` flag to droid exec for non-interactive use
- Add error handling to show droid output on failure
- Remove non-existent `documentation` label from PR creation
- Use `--write` flag for prettier to fix formatting
- **Batch suggestions** into groups of 10 (configurable with
`--batch-size`) to prevent Droid from dropping suggestions when context
is too large
- **Pre-PR docs build validation** — runs `generate-action-metadata` +
`mdbook build` before creating the PR to catch invalid `{#action}` and
`{#kb}` references locally instead of waiting for CI (skippable with
`--skip-validation`)
- **Prompt guardrail** — instructs Droid not to invent `{#kb}` or
`{#action}` references, only reusing action names already present in
docs files
- **Stable release detection** — at publish time, checks each queued
PR's merge commit against the latest stable release tag. PRs already in
stable get annotated "ALREADY IN STABLE" so Droid applies content
changes without adding incorrect Preview callouts
- **Feature flag detection** — parses
`crates/feature_flags/src/flags.rs` for all feature flag struct names,
then checks each PR's diff for references. PRs behind feature flags are
skipped entirely since those features aren't generally available yet

### docs-strip-preview-callouts
- Remove non-existent `documentation` label from PR creation
- Add `Release Notes: - N/A` to generated PR body (fixes Danger bot
check)

## Context

These scripts were run for the first time as part of the v0.225 release.
Issues found:
1. The `documentation` label doesn't exist in this repo
2. Droid exec needs `--auto high` for non-interactive execution
3. Prettier needs `--write` to actually fix files (was running in check
mode)
4. Untracked files should not block the workflow
5. Sending all 44 suggestions in one Droid invocation only applied 2 —
batching in groups of 10 fixed this
6. Droid hallucinated action names (`settings::OpenSettings`,
`gpui::Modifiers::secondary_key`) that broke the docs preprocessor build
7. PRs that shipped in stable v0.225 incorrectly got Preview callouts
because the queue doesn't distinguish preview-only from
already-in-stable
8. PRs behind feature flags (subagents, git graph) got documented
despite not being generally available

Release Notes:

- N/A
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
## Summary

Fixes issues discovered while running the docs automation workflow for
the first time, plus improvements based on the v0.225 run where 44
suggestions overwhelmed a single Droid invocation.

### docs-suggest-publish
- Ignore untracked files when checking for clean working directory
- Add `--auto high` flag to droid exec for non-interactive use
- Add error handling to show droid output on failure
- Remove non-existent `documentation` label from PR creation
- Use `--write` flag for prettier to fix formatting
- **Batch suggestions** into groups of 10 (configurable with
`--batch-size`) to prevent Droid from dropping suggestions when context
is too large
- **Pre-PR docs build validation** — runs `generate-action-metadata` +
`mdbook build` before creating the PR to catch invalid `{#action}` and
`{#kb}` references locally instead of waiting for CI (skippable with
`--skip-validation`)
- **Prompt guardrail** — instructs Droid not to invent `{#kb}` or
`{#action}` references, only reusing action names already present in
docs files
- **Stable release detection** — at publish time, checks each queued
PR's merge commit against the latest stable release tag. PRs already in
stable get annotated "ALREADY IN STABLE" so Droid applies content
changes without adding incorrect Preview callouts
- **Feature flag detection** — parses
`crates/feature_flags/src/flags.rs` for all feature flag struct names,
then checks each PR's diff for references. PRs behind feature flags are
skipped entirely since those features aren't generally available yet

### docs-strip-preview-callouts
- Remove non-existent `documentation` label from PR creation
- Add `Release Notes: - N/A` to generated PR body (fixes Danger bot
check)

## Context

These scripts were run for the first time as part of the v0.225 release.
Issues found:
1. The `documentation` label doesn't exist in this repo
2. Droid exec needs `--auto high` for non-interactive execution
3. Prettier needs `--write` to actually fix files (was running in check
mode)
4. Untracked files should not block the workflow
5. Sending all 44 suggestions in one Droid invocation only applied 2 —
batching in groups of 10 fixed this
6. Droid hallucinated action names (`settings::OpenSettings`,
`gpui::Modifiers::secondary_key`) that broke the docs preprocessor build
7. PRs that shipped in stable v0.225 incorrectly got Preview callouts
because the queue doesn't distinguish preview-only from
already-in-stable
8. PRs behind feature flags (subagents, git graph) got documented
despite not being generally available

Release Notes:

- N/A
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
## Summary

Fixes issues discovered while running the docs automation workflow for
the first time, plus improvements based on the v0.225 run where 44
suggestions overwhelmed a single Droid invocation.

### docs-suggest-publish
- Ignore untracked files when checking for clean working directory
- Add `--auto high` flag to droid exec for non-interactive use
- Add error handling to show droid output on failure
- Remove non-existent `documentation` label from PR creation
- Use `--write` flag for prettier to fix formatting
- **Batch suggestions** into groups of 10 (configurable with
`--batch-size`) to prevent Droid from dropping suggestions when context
is too large
- **Pre-PR docs build validation** — runs `generate-action-metadata` +
`mdbook build` before creating the PR to catch invalid `{#action}` and
`{#kb}` references locally instead of waiting for CI (skippable with
`--skip-validation`)
- **Prompt guardrail** — instructs Droid not to invent `{#kb}` or
`{#action}` references, only reusing action names already present in
docs files
- **Stable release detection** — at publish time, checks each queued
PR's merge commit against the latest stable release tag. PRs already in
stable get annotated "ALREADY IN STABLE" so Droid applies content
changes without adding incorrect Preview callouts
- **Feature flag detection** — parses
`crates/feature_flags/src/flags.rs` for all feature flag struct names,
then checks each PR's diff for references. PRs behind feature flags are
skipped entirely since those features aren't generally available yet

### docs-strip-preview-callouts
- Remove non-existent `documentation` label from PR creation
- Add `Release Notes: - N/A` to generated PR body (fixes Danger bot
check)

## Context

These scripts were run for the first time as part of the v0.225 release.
Issues found:
1. The `documentation` label doesn't exist in this repo
2. Droid exec needs `--auto high` for non-interactive execution
3. Prettier needs `--write` to actually fix files (was running in check
mode)
4. Untracked files should not block the workflow
5. Sending all 44 suggestions in one Droid invocation only applied 2 —
batching in groups of 10 fixed this
6. Droid hallucinated action names (`settings::OpenSettings`,
`gpui::Modifiers::secondary_key`) that broke the docs preprocessor build
7. PRs that shipped in stable v0.225 incorrectly got Preview callouts
because the queue doesn't distinguish preview-only from
already-in-stable
8. PRs behind feature flags (subagents, git graph) got documented
despite not being generally available

Release Notes:

- N/A
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
## Summary

Fixes issues discovered while running the docs automation workflow for
the first time, plus improvements based on the v0.225 run where 44
suggestions overwhelmed a single Droid invocation.

### docs-suggest-publish
- Ignore untracked files when checking for clean working directory
- Add `--auto high` flag to droid exec for non-interactive use
- Add error handling to show droid output on failure
- Remove non-existent `documentation` label from PR creation
- Use `--write` flag for prettier to fix formatting
- **Batch suggestions** into groups of 10 (configurable with
`--batch-size`) to prevent Droid from dropping suggestions when context
is too large
- **Pre-PR docs build validation** — runs `generate-action-metadata` +
`mdbook build` before creating the PR to catch invalid `{#action}` and
`{#kb}` references locally instead of waiting for CI (skippable with
`--skip-validation`)
- **Prompt guardrail** — instructs Droid not to invent `{#kb}` or
`{#action}` references, only reusing action names already present in
docs files
- **Stable release detection** — at publish time, checks each queued
PR's merge commit against the latest stable release tag. PRs already in
stable get annotated "ALREADY IN STABLE" so Droid applies content
changes without adding incorrect Preview callouts
- **Feature flag detection** — parses
`crates/feature_flags/src/flags.rs` for all feature flag struct names,
then checks each PR's diff for references. PRs behind feature flags are
skipped entirely since those features aren't generally available yet

### docs-strip-preview-callouts
- Remove non-existent `documentation` label from PR creation
- Add `Release Notes: - N/A` to generated PR body (fixes Danger bot
check)

## Context

These scripts were run for the first time as part of the v0.225 release.
Issues found:
1. The `documentation` label doesn't exist in this repo
2. Droid exec needs `--auto high` for non-interactive execution
3. Prettier needs `--write` to actually fix files (was running in check
mode)
4. Untracked files should not block the workflow
5. Sending all 44 suggestions in one Droid invocation only applied 2 —
batching in groups of 10 fixed this
6. Droid hallucinated action names (`settings::OpenSettings`,
`gpui::Modifiers::secondary_key`) that broke the docs preprocessor build
7. PRs that shipped in stable v0.225 incorrectly got Preview callouts
because the queue doesn't distinguish preview-only from
already-in-stable
8. PRs behind feature flags (subagents, git graph) got documented
despite not being generally available

Release Notes:

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

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant