Skip to content

Commit f01a9d1

Browse files
authored
fix(design-decision-gate): add git ls-remote permission, raise turn limit to 20, add MCP fallback (#28353)
1 parent f216a16 commit f01a9d1

2 files changed

Lines changed: 29 additions & 22 deletions

File tree

.github/workflows/design-decision-gate.lock.yml

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/design-decision-gate.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515
issues: read
1616
engine:
1717
id: claude
18-
max-turns: 15
18+
max-turns: 20
1919
safe-outputs:
2020
add-comment:
2121
max: 2
@@ -44,6 +44,7 @@ tools:
4444
bash:
4545
- "git diff:*"
4646
- "git log:*"
47+
- "git ls-remote:*"
4748
- "git show:*"
4849
- "cat:*"
4950
- "grep:*"
@@ -112,7 +113,7 @@ You are the Design Decision Gate, an AI agent that enforces a culture of "decide
112113
- **Pull Request**: #${{ github.event.pull_request.number || github.event.inputs.pr_number }}
113114
- **Event**: ${{ github.event_name }}
114115
- **Actor**: ${{ github.actor }}
115-
- **Hard Turn Budget**: 15 turns maximum (stop early when done)
116+
- **Hard Turn Budget**: 20 turns maximum (stop early when done)
116117

117118
### Mandatory Efficiency Rules
118119

@@ -122,9 +123,14 @@ You are the Design Decision Gate, an AI agent that enforces a culture of "decide
122123
- `pr.diff`
123124
- `design-gate-config.yml`
124125
- `adr-prefetch-summary.json`
125-
2. Do **not** perform broad exploration. Only fetch extra data if a required field is missing from pre-fetched files.
126-
3. Call exactly one final safe output action (`add-comment`, `push-to-pull-request-branch`, or `noop`) and then stop.
127-
4. If you have enough evidence to decide, stop immediately. Do not gather optional data.
126+
2. If a pre-fetched file is missing or returns a permission error, fall back to the equivalent GitHub MCP tool immediately (do not retry the file read):
127+
- Missing `pr.json``mcp__github__get_pull_request`
128+
- Missing `pr-files.json``mcp__github__get_pull_request_files`
129+
- Missing `pr.diff``mcp__github__get_pull_request_diff`
130+
- Missing `adr-prefetch-summary.json` → compute manually from PR files and labels
131+
3. Do **not** perform broad exploration. Only fetch extra data if a required field is missing from pre-fetched files.
132+
4. Call exactly one final safe output action (`add-comment`, `push-to-pull-request-branch`, or `noop`) and then stop.
133+
5. If you have enough evidence to decide, stop immediately. Do not gather optional data.
128134

129135
## Step 1: Determine if This PR Requires an ADR
130136

0 commit comments

Comments
 (0)