Repository navigation
Conversation
|
Gentle ping @dfoulks1 @ppkarwasz - this has been waiting for review for a while; CI is green. A quick look would be appreciated. Drafted-by: Claude Code (Opus 5.5); reviewed by @potiuk before posting |
|
@dfoulks1 @ppkarwasz @dave2wave @raboof second ping: this has been open since 2026-09-27 with green CI and still no review. Could one of you review it this week? If you can't get to it, please say so and I'll find another reviewer. Drafted-by: Claude Code (Opus 5.5); reviewed by @potiuk before posting |
Wouldn't a PR introducing a whole new action deserve more than a 'quick look'?
I don't expect to find time to review this action. |
|
Does the |
Absolutely.
The The plugin works on two levels: a) it modlfiles generated HTML to inject the "comment" functionality in generated static HTML - this is totally independent on how the HTML is generated or which static page generator is used. It just works on any generated HTML. b) It adds support for linking the "source" of the HTML page - depending on which static page generator is used - using different plugins or custom code - but this is mostly in documentation on how to do it.
If I may suggest in general -> I generaly stopped doing line-by-line reviews except having a quick glance at a code to see if it is readable, has good structure, and if I understand what it is supposed to do) - of course except some really critical areas. Line-by-line review of everything are a bit relic of a past - instead adding some guardrails and doing adversarial reviews (several of them) serves me to check if: a) claimed functionality is there (and you can I am recently using roborev - https://www.roborev.io/docs/ -> which does adversarial reviews using different LLMs and several times in a loop and it finds all kinds of issues - until subsequent reviews do not find any more any issue (it happens automaticallly). I will re-run it now on this one and see if I can fix some of those issues - the PR has been created quite a long time ago so maybe I will find something. And I also heartily recommend this kind of review. When backed by unit tests, functionality tests - this approach greatly speeds up review time and actually increases it's quality IMHO - the number of issues I found this way and quality of code that gets as a result is rather impressive. |
Port magpie-site's switch from the Babel to a Vite Astro adapter (apache#220); the site now hands the plugin its own vite module. Bump setup-node to v7.1.0 as magpie-site did. Fix the roborev findings on apache#1332: encode branch names in ref deletes, delete stale head branches under a lease, read the zip size from the trailer only, lift the unzip listing buffer, release on website-comment pushes, re-arm over a non-writer's label, make the publisher login configurable, pick pull_request builds only, keep Jekyll stamping out of quoted attributes, skip no-newline diff markers, and inject the overlay into pages with an uppercase or omitted </body>. Generated-by: Claude Opus 5
Three composite actions that publish an armed pull request's built site to <site>-pr<N>.staged.apache.org, with a review overlay that turns a marked region into a screenshot and a link to its diff line. preview-annotate stamps source lines for Jekyll and Astro builds; preview-artifact packages any static site; preview-publish publishes, retires and cleans up. Extracted from apache/magpie-site, with generic names. Generated-by: Claude Opus 5
Ports apache/magpie-site apache#208, apache#210, apache#212 and apache#214 onto the extracted actions, keeping the generic names: - Arm with the `preview` label (a /show-preview comment or a dispatch adds it); publish on workflow_run / issue_comment, not a schedule. - Project every GitHub response so the publisher never reads PR content; the build computes the diff anchors (write-meta.mjs). - Post a new comment on each publish, and lead with the preview URL. - New preview-main-overlay action: the overlay on the published site, where a comment opens an issue. Generated-by: Claude Opus 5
The actions keep their names and tag prefixes; only the path changes, to website-comment/<action>. Generated-by: Claude Opus 5
Ports apache/magpie-site apache#211: ubuntu-slim cannot start a job container, so Ruby, Bundler and a C toolchain come from apt and gems go to a writable user gem home instead of the pinned ruby:3.3 image. Generated-by: Claude Opus 5
Port magpie-site's switch from the Babel to a Vite Astro adapter (apache#220); the site now hands the plugin its own vite module. Bump setup-node to v7.1.0 as magpie-site did. Fix the roborev findings on apache#1332: encode branch names in ref deletes, delete stale head branches under a lease, read the zip size from the trailer only, lift the unzip listing buffer, release on website-comment pushes, re-arm over a non-writer's label, make the publisher login configurable, pick pull_request builds only, keep Jekyll stamping out of quoted attributes, skip no-newline diff markers, and inject the overlay into pages with an uppercase or omitted </body>. Generated-by: Claude Opus 5
Matches the pin main adopted in apache#1407. Generated-by: Claude Opus 5
|
Ran an adversarial review of this PR (roborev, codex agent) and checked every finding against the code; all 11 held up. Fixes are in c7d0318, rebased onto current main, plus ce5623c pinning the test runner to ubuntu-26.04 as #1407 did. Review findings, fixed
Synced from apache/magpie-site Compared against magpie-site
Tests: 180 node tests and 40 script tests pass locally, and new tests cover each fix. The Jekyll suite runs in CI only: the quote-aware stamping was checked locally against stubbed Jekyll classes. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Try each successful build of a shared head commit until one is this PR's, look up preview-site by name instead of one page of artifacts, remove every extracted artifact after use, and repost a publish's comments when the push landed but they did not. The production check now flags only real data-preview-src attributes, and the Pelican example uploads the tempdir the action builds into. Generated-by: Claude Opus 5
|
Second roborev pass (codex) on the rebased branch found 7 more issues in the original preview code, not in the first round's fixes. Six are fixed in 3f29409; the seventh is deferred (below).
Deferred: html2canvas-pro's default 100-resource cache can drop images from screenshots of image-heavy pages. Not reproduced yet; it needs a test page with more than 100 images. Tests: 184 node tests and 40 script tests pass locally; new tests cover the shared head commit, comment repair, cleanup and the named-artifact lookup. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Report an archive the fetcher refuses and try older builds, instead of failing the run on every trigger; failed downloads still fail it. Keep artifact-controlled names and values out of refusal comments. Stamp Astro paths relative to the repository root, and pin setup-node to v7.1.0 everywhere. Generated-by: Claude Opus 5
|
Third roborev pass, this time with Claude, on 3f29409: 5 findings. Four are fixed in 969b650; the screenshot cache stays deferred as noted above.
Tests: 188 node tests and 40 script tests pass locally. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Trust a label from the publisher's login only next to its arming record, since github-actions[bot] is shared by every workflow in the repository. Size the screenshot cache to the page, encode source-link paths, inject the overlay into .htm pages and inside one function scope, refuse Jekyll sites on the github-pages gem, detect entry scripts by real path, and check out the PR head for annotated builds in the README example. Generated-by: Claude Opus 5
Accept a publisher-login label only with an arming record made after it, so an old arming cannot vouch for a label re-added after a disarm. Inject the overlay without lowercasing and as latin1, refuse malformed metadata per build, keep tombstoned branches for 30 minutes, skip re-screening an artifact already refused for the head, and tighten the github-pages check in prepare.sh. Generated-by: Claude Opus 5
|
Rounds 4 and 5 of roborev review (codex and Claude each time) found 15 issues between them, several in the earlier fixes themselves. All are fixed: round 4 in f7c3108, round 5 in c4d0f06. That includes the screenshot cache deferred earlier. Arming (the important one)
Publisher
Overlay
Jekyll adapter and docs
Tests: 203 node tests and 40 script tests pass locally. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Bind the publisher's arming record to the label event's id rather than
its time, recorded hidden in the explainer comment (an edit notifies
nobody), the dispatch comment, or a short comment on a bot's PR. Treat
another PR's build of a shared head as not this PR's, remember refused
build ids so a new build is still screened, skip unchanged status
writes, and match gem("github-pages") in prepare.sh.
Generated-by: Claude Opus 5
|
Round 6 of roborev review (codex and Claude, on c4d0f06): 4 findings, all edge cases in the latest fixes. Claude's verdict was Pass; all four are fixed anyway in a4b75c8.
Tests: 208 node tests and 40 script tests pass locally. Another review pass is running on a4b75c8. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
If the tree is an action, why is the full code included in the PR? |
Record an arming only when the label changed exactly once while being added, and accept the record only where the publisher writes it. Make sure a retired PR says so before its tombstone branch goes, remember passed-over artifacts by artifact id one by one, and match a split data-preview-src tag in the production check. Generated-by: Claude Opus 5
|
This is now reviewed adversarialy - with codes
Yes. This is that shared code - same as sibling actions in this repository already (see the README change in this PR) - https://github.com/apache/infrastructure-actions/blob/main/README.md#available-github-actions This repository (infra-owned) serves dual purpose: a) manages list of allowed actions that can be used in ASF This PR is adding new action to be used alongside those three already present here and used by PMCs:
|
Steps run under bash -e -o pipefail, and the per-file loop ended on a non-matching grep, so find returned non-zero and the clean-site case aborted the step. Generated-by: Claude Opus 5
Duh! Sorry, my bad. |
Replacing a non-writer's label removes it first, and a lagging events API can show that removal next to the new label event, which the strict read-back refused on every run, so such a PR never armed. Generated-by: Claude Opus 5
|
OK. I've done a series of adversarial reviews with different models, finding > 20 things to fix - moslty small edge cases, but few quite interesting bugs. Unless I hear otherwise - I will merge it in a day or two - I incorporated all the changes that I implemented in |



Composite actions that publish an armed pull request's built site to
<site>-pr<N>.staged.apache.org, with a review overlay that turns a marked region into a screenshot and a link to its diff line. Extracted from apache/magpie-site (in sync up to #219), with generic names.preview-annotatestamps source lines for Jekyll and Astro builds.preview-artifactpackages any static site, plus the diff-line anchors computed in the unprivileged build.preview-publishpublishes, retires and cleans up. A PR is armed by thepreviewlabel (added directly, by a/show-previewcomment, or by dispatch), and the publisher runs onworkflow_run/issue_comment, neverpull_request_target. Every GitHub response is projected, so it never reads PR content.preview-main-overlay(optional) puts the same overlay on the published site, where a comment opens an issue.Test plan
npm testinwebsite-comment/(163 tests, includingboundary.test.mjs: a full publisher run against baited responses and an endpoint allowlist)website-comment-test.yml: Jekyll adapter end to end (onubuntu-slim, Ruby from apt),preview-main-overlayon a small site, andpreview-publishrefusing apull_requesteventuv run pytest scripts/test_release_actions.py🤖 Generated with Claude Code