Skip to content

Fix release docs commit path and session limits - #1381

Merged
danbarr merged 2 commits into
mainfrom
fix-release-docs-commit-path
Nov 30, 2026
Merged

danbarr merged 2 commits into
mainfrom
fix-release-docs-commit-path

Conversation

@danbarr

@danbarr danbarr commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Since #1298 moved the release docs workflow to workflow_dispatch, the Claude sessions run in claude-code-action's agent mode. Tag mode, which track_progress used to trigger on PR events, granted git write tools. Agent mode doesn't, so the sessions have been leaving their edits uncommitted. That had three effects:

This PR:

  • Stages changes only under docs/, static/img/, sidebars.ts, vercel.json, and scripts/lib/crd-intros.mjs. Edits to other existing files are reverted and other new files are left out, with a warning for each, because the sessions read untrusted upstream content.
  • Counts staged files for the PR body's hand-written changes and silent-run signal, and uses the file list as the SUMMARY.md fallback.
  • Sets CLAUDE_CODE_DISABLE_BACKGROUND_TASKS on both sessions, so subagents still run in parallel but the session waits for them.
  • Passes --add-dir for the upstream clone so Read and Grep work there, as the prompt and skill already assume.
  • Points the editorial session at the uncommitted edits instead of HEAD, which was the reference refresh commit.
  • Fixes the permission-denials count, which read a field that isn't in the log and always reported 0, and logs the denied tool names as a warning.
  • Tells the release skill not to commit in unattended mode, to keep scratch files out of the working tree, and to wait for its subagents.

Type of change

  • Bug fix

Related issues/PRs

🤖 Generated with Claude Code

danbarr and others added 2 commits November 29, 2026 22:37
The generation and editorial sessions have run in agent mode since
the move to workflow_dispatch, which grants no git write tools. Their
edits stayed uncommitted, so the skill-commit count was always 0, the
PR body and Slack summary called every run silent, and the autofix
step swept everything (including scratch files) into a commit titled
as formatting fixups.

- Stage changes only under docs/, static/img/, sidebars.ts,
  vercel.json, and scripts/lib/crd-intros.mjs. Revert tracked edits
  elsewhere and skip other new files, with a warning for each.
- Count staged files for the PR body instead of skill commits, and
  list them as the SUMMARY.md fallback.
- Drop the pre-skill SHA, branch sync, and commit-count steps.
- Set CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: the action stops at the
  first result message, which killed background subagents.
- Pass --add-dir for the upstream clone so Read/Grep work there.
- Point the editorial session at the uncommitted edits.
- Count permission denials from the result's permission_denials
  array and log the denied tool names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Document that the unattended session has no git write access, should
keep scratch files out of the working tree, and must wait for its
subagents before ending its turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 30, 2026 03:39
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-website Ready Ready Preview Nov 30, 2026 3:39am UTC

Request Review

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.

🔵 Needs a closer look

A live workflow_dispatch run is needed to verify that the pinned Claude action honors the background-task flag, subagents finish before session termination, and uncommitted edits survive both sessions—behaviors not covered by staging tests.

No open issues 🎉

What changed in this PR

This PR adapts release documentation automation to the agent-mode sessions introduced by #1298, so uncommitted edits are collected and reported accurately without publishing unrelated scratch files.

Changes:

  • Restricts staging to approved paths and reports hand-written changes by file count.
  • Disables background tasks, grants upstream-clone access, and directs editorial review to uncommitted edits.
  • Corrects permission-denial reporting and adds staging regression tests.
File Description
scripts/​upstream-release/​workflow.test.mjs Tests allowed-path staging, cleanup, and zero-edit runs.
scripts/​upstream-release/​render-pr-body.mjs Uses file counts for change reporting and silent-run detection.
scripts/​upstream-release/​fixtures/​release-1181-section.txt Updates expected output to report files instead of commits.
scripts/​upstream-release/​fixtures/​release-1181-env.json Supplies the renamed file-count input.
.github/​workflows/​upstream-release-docs.yml Revises session settings, staging, publication, and reporting.
.claude/​skills/​upstream-release-docs/​SKILL.md Documents unattended editing, scratch-file, and subagent constraints.

Review effort: Balanced

@danbarr
danbarr enabled auto-merge (squash) November 30, 2026 03:52
@danbarr
danbarr merged commit 493b72c into main Nov 30, 2026
7 checks passed
@danbarr
danbarr deleted the fix-release-docs-commit-path branch November 30, 2026 08:44

This branch was successfully deployed

1 active deployment
Preview — da4c0224 Deployed Nov 30, 2026 by vercel[bot]
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.

3 participants