Repository navigation
Conversation
…ocs-preview The receiver now treats a PR as wanting a preview only while it is open and carries the docs-preview label. Removing the label takes the preview down, and a build that finishes after the unlabel no longer deploys. The removed comment says whether the label was removed or the PR closed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Dispatch-Task: documentation-preview-label-cleanup
…sely Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Dispatch-Task: documentation-preview-label-cleanup
…reason only on removal Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Dispatch-Task: documentation-preview-label-cleanup
…ecked Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Dispatch-Task: documentation-preview-label-cleanup
Member
Author
|
HEG re-run on cb35631. The earlier run worked without the harper-engineering-guidelines skill loaded. This run loaded it and went through the applicable steps. No code changed, so the scheduled merge of cb35631 still applies.
What happened to the review's findings:
🤖 Generated by Claude Code (Claude Opus 5.5); posted via @kriszyp. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⊙ Problem
harper and harper-pro now send a docs preview only while a PR has the
docs-previewlabel (harper#4044, harper-pro#1275). This receiver still treats every open PR as wanting one. Removing the label leaves the preview up until the PR closes. A build started just before label removal can still deploy after cleanup ran.💡 Solution
A preview is wanted only while the PR is open and labeled
docs-preview. Cleanup of an open, unlabeled PR now removes the preview. A deploy for an unwanted PR is skipped. Apply re-reads the PR when it runs, so a late build sees the label removal. The removal comment says whether the label was removed or the PR closed.🔧 Changes
wantsPreviewandDOCS_PREVIEW_LABELdefine the rule.resolveSourceanddecideboth use it;decidechecks it before checking the head and build result, so a stale build cannot deploy. Look hardest at that ordering.removedBody(reason)and the ready comment name the label. The workflow passes the reason from the Decide step to the report step as an output, with no second PR read.CONTRIBUTING.mddescribes the label opt-in. Tests cover both repos, missing or malformed labels, relabeling and unlabel-then-close.✅ Verification
npm run test:workflows: 30/30. The five required cases (unlabeled cleanup removes, labeled cleanup skips, unlabeled deploy skips, labeled deploy at the current head deploys, closed with a comment removes) are covered. Againstorigin/main's script, the new tests fail (6 of 30).npm run lintandnpm run typecheckare clean. actionlint is not installed here; the npmactionlintbuild reports only the existingcache-modekey, which it does not know.⚖️ Alternatives
🤔 Cleanup is sent only on unlabel, or on close with the label
The senders skip cleanup when an unlabeled PR closes. A preview deployed before the label gate, on a PR that never got the label, would then stay up. No such preview exists: this receiver has never run (0 workflow runs). Cleanup on every close would be a harper and harper-pro change.
🤔 Eligibility is read once, at Decide
Deploy and Drop act on what Decide read. A label change after Decide is handled by the dispatch that change sends: its apply job queues behind this one in the same concurrency group and re-reads the PR. Re-reading before each step would shorten that window but add two API calls per run.
🤔 Neutral removal text
Planning review suggested one fixed sentence ("The preview has been removed") to avoid the reason output. I kept the reason because the task asked for it, and the output comes from the same PR read that chose removal.
🤖 Generated by Claude Code (Claude Opus 5.5); posted via @kriszyp.
Related PRs: none found (partial scan: one PR sharing a changed path could not be fetched; the trigger side is HarperFast/harper#4044 and HarperFast/harper-pro#1275, both merged)
Complexity: easy
Origin — the dispatch brief this PR was written from
Make the source-PR docs preview receiver (scripts/source-pr-preview.mjs and its workflow) treat a harper or harper-pro PR as wanting a preview only while it is open AND carries the 'docs-preview' label. Removing the label must take the preview down, and a late build for a PR without the label must not deploy.
Acceptance
Watch the first case fail on origin/main first.
Dispatch: task
documentation-preview-label-cleanup· queued by kris-session · ran by claude/sonnet/high · worker kris-mac-m3-fleet-18b9c6Review-Coverage: authored=claude; ran=gemini,cursor-composer,codex; adjudicated=domain; declined=cursor-grok,muse; rounds=1; full=1 @ cb35631
Review-Attention: read ~3m (decisions: remove-on-unlabel, producer-cleanup-scope, decide-time-snapshot) @ cb35631