Repository navigation
fix(review): retry a failed hosted replace as a create in explain-change - #7160
Conversation
When the page id recorded in the hosted sidecar was deleted outside the skill, pages-publish --id fails (exit 6) and the rebuild failed with it. publish-hosted.mjs now retries once without --id; the new id goes into the sidecar and the old one under stale, as for any changed id. A refusal (exit 4), a failed create and a failed first publish are not retried. Closes #6749 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8KdG7fWg2YrErVYWtohmR
|
The lanes run once the PR is marked ready. That flip waits for Kyle, because it also starts the review lanes. Until then, the local runs listed under Verification in the PR body are the signal. Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 1m 35s —— View job Security review complete
No security issues found. Scope reviewed:
Test and docs changes are test-harness/prose only and introduce no production behavior. claude-lane-summary: lane=claude-security-review sha=773c4e52cb914403c9097fda1585832da66c3ed9 run=38347745775 |
|
Claude finished @kyle-sexton's task in 1m 53s —— View job Code review: no findings
Reviewed the retry-as-create fix in Checked:
No correctness, maintainability, or test-coverage issues found. The author's noted tradeoff (a transient replace failure can move the page to a new URL) and the open question about delete-of-already-deleted-id are both called out honestly in the PR body and are out of scope for this lane to second-guess — nothing here needs to block. Author-claimed, unverified (not independently run): the claude-lane-summary: lane=claude-review sha=773c4e52cb914403c9097fda1585832da66c3ed9 run=38347745660 |
|
claude-security-review has reviewed this pull request through 773c4e5; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 773c4e5; a later push is reviewed from there. |
Requested by Kyle · project thread
Closes #6749
Summary
Before: if a hosted digest page was deleted outside the skill (for example with
pages-publish --delete <id>), the sidecar still held its id. The next rebuild of the same pull request passed--id <id>, the host refused the replace, and the publish failed. The page then stayed a local file.After: a failed replace is retried once without
--id. The rebuild publishes a new page, the sidecar takes the new id, and the old id goes understaleand is deleted, the same as for any other changed id.Fix
plugins/review/skills/explain-change/scripts/publish-hosted.mjs: when the sidecar's id is passed andpages-publishexits 6, the script runspages-publishonce more without--id. The rest of the flow is unchanged (JSON check, sidecar write, stale delete, public-landing guard). Nothing is retried afterpages-publishrefuses credential-shaped content (exit 4), afterpages-publishfails to start, or after a first publish that had no--id.plugins/review/tests/explain-change.test.mjs: the fakepages-publishtakes aFAKE_REPLACE_EXITthat applies only to calls with--id. Two new tests:docs/conventions/rendered-views/README.md(sidecar bullet) and itsCHANGELOG.mdrecord the retry.review, patch.Defaults I picked where the issue was silent:
pages-publishcontract (the "Thepages-publishcommand" section of the rendered-views convention) gives a missing id no exit code of its own: a 404 is exit 6, like any other upload failure. Reading stderr would tie the lane to a message the contract does not define. After a retry that succeeds, the sidecar and stale handling leave exactly one live page whichever failure caused the retry. The cost is that a transient replace failure can move the page to a new URL.--deleteexits 0 when the page is gone". The old id is listed understale, then deleted. If the host answers a delete of an already-deleted id with an error, that stale entry is retried on every publish and reported as "delete failed". The installedpages-publishtreats any status other than 204 as exit 6, so this depends on what the host returns for a missing id. I could not check that tonight.Verification
node --test plugins/review/tests/explain-change.test.mjs: 105 tests, 104 passed, 0 failed, 1 skipped (already skipped before this change).origin/main'spublish-hosted.mjs(script stashed, tests kept): both fail. With the fix, both pass.scripts/affected-tests.sh --base origin/main --run:explain-change.test.shpasses;explain-change.test.mjsis node's lane and passed in the run above.scripts/check-changelog-fragments.sh --checkand--check-required origin/main;scripts/check-changelog-parity.sh --check,--check-bump origin/mainand--check-preserved origin/main: all pass.node_modules/.bin/markdownlint-cli2on the two convention files and the fragment: 0 issues.scripts/sync-shared-copies.sh --check: all 411 copies match.Related
digest-policy.mjs,SKILL.md). fix(review): explain-change artifact medium should look up repo visibility itself #6951 names this issue as related.🤖 Generated with Claude Code
https://claude.ai/code/session_01L8KdG7fWg2YrErVYWtohmR
Generated by Claude Code