Skip to content

ci(spec-sync): raise AI turn cap + exploration tools - #103

Merged
yzld2002 merged 3 commits into
mainfrom
fix/spec-sync-ai-turns
Jul 8, 2026
Merged

ci(spec-sync): raise AI turn cap + exploration tools#103
yzld2002 merged 3 commits into
mainfrom
fix/spec-sync-ai-turns

Conversation

@yzld2002

@yzld2002 yzld2002 commented Jul 8, 2026

Copy link
Copy Markdown
Member

The inaugural spec-sync dispatch (run 28914895509) failed at error_max_turns — the AI wiring step ran the full 40 turns without finishing and with 2 permission denials, because it had no way to explore the codebase (only Bash(rye *)/Bash(./scripts/*) were allowed).

  • --max-turns 40 → 250 (wiring a full resource mirroring parse_jobs is large)
  • allowedTools += Glob, Grep, Bash(git diff:*) — native exploration; still no git write/push (injection hardening intact)
  • prompt now directs it to read the diff + parse_jobs.py first, then run lint/format

After merge: close #102 and re-dispatch spec-sync.yml for the inaugural extract/jobs run.

🤖 Generated with Claude Code

The inaugural dispatch hit error_max_turns at 40 turns (incomplete wiring, 2 permission
denials) because the agent could not explore the codebase (only Bash(rye *)/Bash(./scripts/*)
were allowed, no Glob/Grep/read-only shell).

- --max-turns 40 -> 250 (wiring a full resource like parse_jobs is large)
- allowedTools += Glob, Grep, Bash(git diff:*) so the agent explores natively; still no
  git write/push capability (prompt-injection hardening intact)
- prompt now tells it to read the diff + parse_jobs.py first and run lint/format

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 8, 2026 03:28

Copilot AI left a comment

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.

Pull request overview

Updates the spec-sync GitHub Actions workflow so the AI wiring phase has a larger turn budget and can explore the repository (glob/grep and git diff) to complete spec-driven SDK updates more reliably.

Changes:

  • Increased Claude Code --max-turns from 40 to 250 for the AI wiring step.
  • Expanded --allowedTools to include Glob, Grep, and Bash(git diff:*).
  • Refined the AI prompt to explicitly inspect the prior commit’s diff and mirror parse_jobs.py conventions, then run formatting and linting.

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

Comment thread .github/workflows/spec-sync.yml Outdated
Comment thread .github/workflows/spec-sync.yml
…t to 60m

Addresses Copilot review on #103:
- prompt: clarify 'git diff' (read-only) is allowed while stage/commit/push/other git is not
  (previously 'inspect git diff' + 'do NOT run git' read as contradictory)
- timeout-minutes 30 -> 60 so a long --max-turns 250 AI run isn't killed by the job timeout

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 8, 2026 03:33

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/spec-sync.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 03:35
@yzld2002
yzld2002 merged commit 8d86a78 into main Jul 8, 2026
6 checks passed

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +128 to +129
--max-turns 250
--allowedTools "Edit,Write,Read,Glob,Grep,Bash(rye *),Bash(./scripts/*),Bash(git diff:*)"
@yzld2002
yzld2002 deleted the fix/spec-sync-ai-turns branch July 8, 2026 03:36
tian-lan-landing added a commit that referenced this pull request Aug 3, 2026
…#139)

claude-sonnet-5 runs adaptive thinking when `thinking` is unset. The
thinking tokens count against max_tokens and the first content block is
a thinking block, so `.content[0].text` came back empty and the
"What changed" section was silently dropped. Same failure as the
TypeScript side (PR #102, #103); this one just hadn't tripped yet.

Turn thinking off, join all text blocks instead of indexing [0], bump
the cap 700 -> 1000, and log the response shape on empty.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants