fix(metadata): preserve workflow-backed GitHub Pages - #1628
Conversation
|
Warning Review limit reachedNext included review available in 48 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Preserve the current protected-main explicit urllib redirect hardening and its corrected Sentinel record while retaining #1628's workflow-backed Pages reconciliation, fail-before-write, stale-run cancellation, and documentation changes. This is a normal two-parent non-force reconciliation.
|
|
Same fix as #1635: #1628 changed _repository_file_exists to parse a real gh api JSON payload on success, but this test's success-case stub still supplied empty stdout, so json.loads("") raised before the assertion was ever reached. Porting here too since this branch's own main-merge picked up the now-broken test. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4
Outcome
Repair the central repository metadata reconciler so a repository with an explicitly reviewed Actions-backed GitHub Pages deployment is never rewritten to legacy
/docspublishing.pages_mode: workflowdesired-state intent while preserving the existing legacy default;.github/workflows/pages.ymlsource contract for workflow mode instead ofdocs/index.md;build_type: workflow;type: fileobject, rejecting directory objects/listings;status, organization-owned Pages URL, and non-empty publication verification authoritative;Test-first/root-cause remediation
The first workflow-mode implementation exposed measured compatibility and branch-coverage gaps. Those were repaired rather than hidden: established legacy error wording was preserved and direct regressions were added for the workflow source probe, missing-workflow apply rejection, and missing-workflow verification rejection.
A later Devin review identified two substantive defects on the then-current head. First, missing/legacy workflow Pages was rejected only after description/topic writes. Second, the generalized source probe accepted a directory/listing as file evidence. The canonical branch received RED regressions first (
test_workflow_pages_reconcile_fails_closed_before_any_metadata_writeandtest_repository_file_probe_requires_a_regular_file), then production was changed so the workflow live-state precondition runs before every metadata write and only a plain Contents object withtype: filesatisfies the source contract. Devin subsequently marked both findings resolved.The same investigation exposed an Actions-capacity defect: PR validation already used a PR-stable
github.refconcurrency group but did not cancel predecessors. The workflow now keeps the established group and usescancel-in-progress: ${{ github.event_name == 'pull_request' }}. Live predecessor run33542147515became terminalcancelledwhen a replacement head arrived, while scheduled protected-main apply remains non-cancellable.Current exact identity
main@09090e98ca6fe34ee0ab8a0a8145d7af0a0bb9aa;78a0791339147e18afcc443ebe88213cfa83184b;HTTPErrorhardening and docs(sentinel): remove false urllib SSRF record #1633's corrected removal of the false Sentinel SSRF record;Safety boundary
This does not enroll ScopeWeave or another repository by itself, change a live Pages setting, weaken legacy
/docsverification, bypass branch protection, or claim publication. Existing boolean-only manifest records continue to mean legacy/docsPages. A workflow-backed repository must opt in explicitly through reviewed desired state after this capability is integrated. Scheduled protected-main reconciliation stays non-cancellable so a later heartbeat cannot abandon a partially updated fleet.Coordination
This is the owner-side repair for #1627 and is intentionally independent of #1622 (manifest expansion), #1625 (dedicated settings credential), and #1626 (manual reconciliation dispatch). A later workflow-backed canary must preserve its current Actions deployment and verify live publication after protected integration.
Closes #1627 only after protected integration and a workflow-backed canary reconciliation prove the live deployment is preserved.