Skip to content

[docs] docs: unbloat engines.md (507 → 398 lines, 21% reduction)#35263

Merged
pelikhan merged 1 commit into
mainfrom
docs/unbloat-engines-3a9d319ca572f9a6
May 27, 2026
Merged

[docs] docs: unbloat engines.md (507 → 398 lines, 21% reduction)#35263
pelikhan merged 1 commit into
mainfrom
docs/unbloat-engines-3a9d319ca572f9a6

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 27, 2026

Summary

Documentation-only cleanup that reduces engines.md from 507 to 398 lines (21% reduction) by consolidating redundant examples, replacing verbose bullet lists with inline prose, and merging duplicate tables.

Changes

File Change Impact
docs/src/content/docs/reference/engines.md Condensed verbose sections (feature notes, GHEC examples, BYOK examples, timeout tables, permission-mode subsections) into compact inline prose and consolidated tables low

Impact Assessment

  • Breaking changes: None
  • Behavioral changes: None
  • Risk: Minimal — content-only edit with no functional impact

Testing

No testing required — documentation only.

Generated by PR Description Updater for issue #35263 · opus46 3.1M ·

- Condense feature-comparison notes from 8 bullets to one paragraph
- Merge GHEC/GHES api-target examples (near-identical config)
- Consolidate BYOK examples and overlapping NOTE admonitions
- Replace per-engine timeout subsections + duplicate summary table
  with a single capability table
- Drop redundant acceptEdits/bypassPermissions prose subsections
  (info already in the permission-mode lookup table)
@github-actions github-actions Bot added automation doc-unbloat documentation Improvements or additions to documentation labels May 27, 2026
@pelikhan pelikhan marked this pull request as ready for review May 27, 2026 17:51
Copilot AI review requested due to automatic review settings May 27, 2026 17:51
@pelikhan pelikhan merged commit 1d1fe21 into main May 27, 2026
4 checks passed
@pelikhan pelikhan deleted the docs/unbloat-engines-3a9d319ca572f9a6 branch May 27, 2026 17:52
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 27, 2026

PR Code Quality Reviewer completed the code quality review.

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 27, 2026

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 27, 2026

🧪 Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. PR #35263 is a documentation-only change ('[docs] docs: unbloat engines.md (507 → 398 lines, 21% reduction)'). Test Quality Sentinel skipped.

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 27, 2026

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #35263 does not have the 'implementation' label and has 0 new lines of code in default business logic directories (threshold: 100).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Streamlines the “Engines” reference documentation by condensing several explanatory sections, examples, and tables into shorter paragraphs and consolidated tables.

Changes:

  • Collapsed multiple “Notes” / examples sections into single-paragraph summaries.
  • Simplified endpoint and BYOK provider examples by removing alternate variants.
  • Replaced/merged multiple timeout and permission-mode explanations into compact tables plus short guidance.
Show a summary per file
File Description
docs/src/content/docs/reference/engines.md Refactors engine reference docs for brevity by consolidating notes, examples, and tables.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

docs/src/content/docs/reference/engines.md:143

  • The heading says the example covers both GHEC and GHES, but the YAML shown is specifically a tenant-style hostname (api.acme.ghe.com). To avoid readers copying the wrong value for GHES, consider either (a) using a placeholder like api-target: <copilot-endpoint-hostname> plus explicit bullets for GHEC vs GHES, or (b) restoring a minimal second GHES variant.
**Example** — specify a GHEC or GHES Copilot endpoint (use `api.enterprise.githubcopilot.com` for GHES):

```yaml wrap
engine:
  id: copilot
  api-target: api.acme.ghe.com
  • Files reviewed: 1/1 changed files
  • Comments generated: 8

- `engine.agent` references a `.github/agents/` file for custom Copilot agent behavior. See [Copilot Custom Configuration](#copilot-custom-configuration).
- `engine.bare` disables automatic context loading (memory files, custom instructions). See [Bare Mode](#bare-mode-bare) below.
- `engine.harness` allows replacing the built-in Copilot harness script. See [Custom Harness Script](#custom-harness-script-harness) below.
`max-runs` (default `500`) and `max-effective-tokens` (default `25000000`) are top-level frontmatter fields supported by all engines. `max-turns` limits Claude iterations per run; `max-continuations` enables Copilot autopilot mode. Codex `web-search` is opt-in via `tools: web-search:`; other engines use a third-party MCP server — see [Using Web Search](/gh-aw/reference/web-search/). `engine.agent`, `engine.bare`, and `engine.harness` are described below.
| Crush | not enforced by gh-aw (engine-managed) |

See [Tool Timeout Configuration](/gh-aw/reference/tools/#tool-timeout-configuration) for full documentation including `tools.startup-timeout`.
Defaults: Claude `60s`, Codex `120s`. Other engines (Copilot, Gemini, Crush) are engine-managed and not enforced by gh-aw. See [Tool Timeout Configuration](/gh-aw/reference/tools/#tool-timeout-configuration) for full documentation including `tools.startup-timeout`.
Comment on lines +334 to +337
| Knob | Copilot | Claude | Codex/Gemini/Crush/OpenCode | Purpose |
|---|:---:|:---:|:---:|---|
| `timeout-minutes` | ✅ | ✅ | ✅ | Job-level wall clock |
| `tools.timeout` | ✅ | ✅ | ✅ | Per tool-call limit (seconds) |
|---|:---:|:---:|:---:|---|
| `timeout-minutes` | ✅ | ✅ | ✅ | Job-level wall clock |
| `tools.timeout` | ✅ | ✅ | ✅ | Per tool-call limit (seconds) |
| `tools.startup-timeout` | ✅ | ✅ | ✅ | MCP server startup limit |
| `max-continuations` | ✅ | ❌ | ❌ | Autopilot run budget |

Claude supports `max-turns` to cap the number of AI iterations per run. Set it together with `tools.timeout` to control both breadth (number of turns) and depth (time per tool call):
Copilot uses `max-continuations` for autopilot runs; Claude uses `max-turns` to cap iterations. Codex, Gemini, Crush, and OpenCode rely solely on `timeout-minutes` and `tools.timeout`.
Comment on lines +207 to +208
COPILOT_PROVIDER_API_KEY: ${{ secrets.PROVIDER_API_KEY }} # OPTIONAL for local providers
COPILOT_PROVIDER_TYPE: anthropic # OPTIONAL — default: openai
### Gateway-side enforcement

The **MCP gateway's `allowed:` filter is the sole effective tool boundary in `bypassPermissions` mode** (and a second layer of enforcement in `acceptEdits` mode). gh-aw compiles the `allowed:` list from each `mcp-servers:` entry into the gateway configuration before the agent starts. The gateway enforces this list server-side, regardless of what the agent requests.
The MCP gateway's `allowed:` filter is the sole effective tool boundary in `bypassPermissions` mode (and a second layer of enforcement otherwise). Always specify `allowed:` on each `mcp-servers:` entry to restrict which MCP tools are reachable:
Comment on lines +388 to +389
> [!WARNING]
> Do not rely on `tools:` or `mcp-servers: allowed:` for security guarantees in `bypassPermissions` mode. The agent can already run arbitrary shell commands when unrestricted bash is granted, so `--allowed-tools` provides no meaningful additional boundary.
@github-actions github-actions Bot mentioned this pull request May 27, 2026
Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Documentation condensation: mostly clean, a few follow-ups needed

The 21% line reduction is well-executed. Most content is preserved accurately. However, the condensation introduced a few contradictions that existing review comments have already flagged; this review adds one new concern.

Issues to address in follow-up

tools.timeout vs prose contradiction (lines 330–337): The prose states Copilot tool timeout is "engine-managed and not enforced by gh-aw", but the new table shows ✅ for Copilot under tools.timeout. These directly contradict each other. The table needs a note or the Copilot cell needs clarification (e.g., "passed through but engine-managed").

Incomplete startup-timeout coverage in prose (line 338): "Codex, Gemini, Crush, and OpenCode rely solely on timeout-minutes and tools.timeout" — the table above that sentence also marks tools.startup-timeout ✅ for those engines. Missing from the prose.

bypassPermissions warning contradicts gateway enforcement prose (line 389): The [!WARNING] says "Do not rely on mcp-servers: allowed:" but the immediately preceding paragraph establishes the gateway allowed: filter as the "sole effective tool boundary" in bypassPermissions mode. This is conflicting security guidance. The old version had this warning positioned after the --allowed-tools bypass explanation, making it clear only client-side enforcement is bypassed. Suggest rewording: "Do not rely on tools: configuration (--allowed-tools is ignored in this mode); gateway allowed: still enforces MCP tool access."

Missing legacy engine.args compatibility note (not previously flagged): The condensation removed the paragraph explaining that old workflows using engine.args: ["--permission-mode", "acceptEdits"] still work. Users upgrading from older configs have no documentation for this migration path.

🔎 Code quality review by PR Code Quality Reviewer · sonnet46 811.2K

Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /grill-with-docs — requesting changes on three accuracy issues found during condensation.

📋 Key Themes & Highlights

Issues Found

  • GHES network config loss: The merged GHEC/GHES example omits the on-prem GitHub Enterprise hostname from network.allowed, which GHES users need alongside the Copilot API hostname.
  • BYOK example accuracy: COPILOT_PROVIDER_TYPE was deliberately commented out in the original (it's optional with a default), but is now uncommented — making it look required or implying anthropic is always needed.
  • Legacy engine.args compatibility dropped: A backward-compat note explaining that engine.args: ["--permission-mode", ...] still works was removed without replacement, leaving users with existing configs in the dark.

Positive Highlights

  • ✅ Excellent use of tables to replace repetitive per-engine prose sections — much more scannable
  • ✅ Security-critical WARNING and NOTE admonitions are preserved
  • ✅ The permission-mode lookup table is now positioned before the gateway section, which improves reading flow
  • ✅ Overall 21% reduction is meaningful and the cuts are well-targeted

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · opus46 3.2M

@@ -156,19 +148,6 @@ network:
- api.acme.ghe.com
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.

[/grill-with-docs] The merged GHEC/GHES example omits the GHES-specific network.allowed entry for the on-prem GitHub hostname.

The original GHES example included github.company.com in network.allowed alongside the Copilot API hostname. GHES workflows typically need both: the Copilot endpoint and the GitHub Enterprise Server hostname. The merged example only shows the Copilot API hostname, which may leave GHES users wondering why their requests are blocked.

💡 Suggested addition

Add a prose note after the example:

For GHES, also add your GitHub Enterprise Server hostname (e.g. github.company.com) to network.allowed.

Or add it as a comment in the YAML block.

COPILOT_PROVIDER_BASE_URL: ${{ secrets.PROVIDER_BASE_URL }} # REQUIRED — activates BYOK
COPILOT_MODEL: claude-sonnet-4 # REQUIRED for most providers
COPILOT_PROVIDER_API_KEY: ${{ secrets.PROVIDER_API_KEY }} # OPTIONAL for local providers
COPILOT_PROVIDER_TYPE: anthropic # OPTIONAL — default: openai
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.

[/grill-with-docs] COPILOT_PROVIDER_TYPE: anthropic is now uncommented, which may mislead readers into always setting it.

The original example had this line commented out (e.g. # COPILOT_PROVIDER_TYPE: anthropic) to convey that OpenAI-compatible is the default and this field is only needed when switching to a different provider type. The updated example uncomments it, making it look like a required field — or that anthropic is the default.

💡 Suggested fix

Restore the commented form to preserve intent:

    COPILOT_PROVIDER_TYPE: anthropic   # OPTIONAL — set to "anthropic" or "azure" if needed (default: openai)

Or use a placeholder that makes the optional nature clear:

    # COPILOT_PROVIDER_TYPE: openai   # default; use "anthropic" or "azure" if needed

gh-aw **does not** derive `bypassPermissions` from `bash: "*"`, `bash: [":*"]`, or `bash: null`. To use `bypassPermissions`, set it explicitly with `engine.permission-mode: bypassPermissions`.

### `acceptEdits` mode (default)
`engine.permission-mode` takes precedence over any `--permission-mode` flag supplied through `engine.args`. When unset, the default is `acceptEdits` (or `auto` when `tools.edit: false`). gh-aw **does not** derive `bypassPermissions` implicitly from unrestricted bash — set it explicitly.
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.

[/grill-with-docs] The legacy engine.args compatibility note was removed without replacement.

The original had a dedicated subsection explaining that engine.args: ["--permission-mode", "..."] continues to work and that gh-aw strips and subsumes the flag if engine.permission-mode is also set. Users who have existing workflows using the legacy form will no longer find any documentation explaining this behavior, and may be confused about whether their configs are still supported.

💡 Suggested fix

Add a one-sentence note inline, e.g.:

Workflows that previously used engine.args: ["--permission-mode", "<value>"] continue to work; if both are set, engine.permission-mode takes precedence.

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

Labels

automation doc-unbloat documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants