Skip to content

chore(spec): auto-polish count-basic#5870

Merged
MarkusNeusinger merged 2 commits intomainfrom
auto-polish/count-basic/20260507-090208
May 7, 2026
Merged

chore(spec): auto-polish count-basic#5870
MarkusNeusinger merged 2 commits intomainfrom
auto-polish/count-basic/20260507-090208

Conversation

@claude
Copy link
Copy Markdown
Contributor

@claude claude Bot commented May 7, 2026

Automated spec polish from daily-regen pre-flight.

Spec: count-basic

What changed

  • Removed count tag from plot_type dimension

Why

The count tag is not in the canonical plot_type vocabulary. A count plot is fundamentally a bar chart (plot_type: bar) with automatic aggregation, which is already captured by the aggregation feature tag. The audit rules require all plot_type tags to be canonical; non-canonical tags must be moved to the correct dimension or dropped. count describes a behavioral feature (automatic counting), not the visual form, so it was removed.

Hard guarantees from the prompt

  • id, issue, created unchanged
  • No semantic changes (data shape, plot type, requirements identical)
  • updated bumped to current UTC

Awaiting human review. The skip-gate in daily-regen will prevent
additional auto-polish PRs for this spec while this one is open.

Removed 'count' from plot_type tags (not in canonical vocabulary).
The plot_type is fundamentally 'bar' with automatic aggregation captured in features.

Co-Authored-By: Claude <noreply@anthropic.com>
@MarkusNeusinger MarkusNeusinger enabled auto-merge (squash) May 7, 2026 19:55
MarkusNeusinger added a commit that referenced this pull request May 7, 2026
## Summary
- Auto-polish PRs (e.g. #5916, #5870, #5860) were sitting open with all
required checks green because the polish prompt explicitly forbade
auto-merge — they piled up waiting for a human to click merge.
- Patch the polish prompt to call \`gh pr merge --auto --squash
--delete-branch\` right after \`gh pr create\`. Auto-merge handles the
strict required-status-check rule on \`main\` by updating the branch
automatically when behind.
- Update the \"What you must NOT do\" section accordingly (remove \"do
not auto-merge\", keep the \`approved\` label restriction and the
no-\`--admin\` rule).
- Rename the workflow step from \"opens PR — no auto-merge\" to \"opens
PR with auto-merge\" so log titles match behavior.

If \`gh pr merge --auto\` fails for any reason it falls back to a
warning — the PR is still open and can be merged manually.

## Test plan
- [ ] Next \`daily-regen\` cycle produces a polish PR with auto-merge
enabled (visible via \`gh pr view <num> --json autoMergeRequest\`).
- [ ] After CI passes, the PR squash-merges into main without manual
intervention.
- [ ] If the polish step finds nothing (\`NOOP\`), no PR is created
(existing behavior).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MarkusNeusinger MarkusNeusinger merged commit 85d48bf into main May 7, 2026
6 checks passed
@MarkusNeusinger MarkusNeusinger deleted the auto-polish/count-basic/20260507-090208 branch May 7, 2026 20:20
MarkusNeusinger added a commit that referenced this pull request May 7, 2026
)

## Summary
First run of \`auto-update-pr-branches.yml\` after #5957 found 0 BEHIND
PRs even though three were stuck behind main (#5916, #5870, #5902). Two
issues:

1. **Timing.** The workflow runs ~4s after the push to main, but GitHub
recomputes \`mergeStateStatus\` and the cached PR head SHA
asynchronously. Right after the push the field is still UNKNOWN and the
cached head can be stale → \`update-branch\` returns *expected head sha
didn't match current head ref*. Add a 30s sleep at the start.
2. **Over-strict filter.** The script only iterated PRs where
\`mergeStateStatus == "BEHIND"\`, skipping UNKNOWN candidates — exactly
the ones we wanted to fix. Drop the filter: after a push to main, every
open auto-merge PR is behind, and \`update-branch\` is a no-op when the
head is already up-to-date.

Also:
- Bump permissions to \`contents: write\` (update-branch creates a merge
commit on the head ref).
- Drop \`--silent\` and capture stderr so the actual GitHub error lands
in the log.

Verified manually: calling \`PUT /pulls/{num}/update-branch\` from the
CLI on #5916 and #5870 worked and they auto-merged within seconds. The
422 on #5902 was a real history-divergence conflict (4 ahead / 58 behind
/ merge_base differs) — separate problem.

## Test plan
- [ ] After this merges, push something to main and confirm the workflow
finds N>0 PRs (where N is open auto-merge PRs).
- [ ] Confirm any genuinely stuck PR (conflict) gets a clear error in
the log instead of \`likely conflict or stale ref\`.

Co-authored-by: Claude Opus 4.7 (1M context) <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.

1 participant