diff --git a/.github/ci/delivery-cutover.md b/.github/ci/delivery-cutover.md index 9d845006..3ff30489 100644 --- a/.github/ci/delivery-cutover.md +++ b/.github/ci/delivery-cutover.md @@ -1,11 +1,16 @@ -# Prepared claude-current CI cutover +# Scoped claude-current CI delivery -Status: **disabled; preparation PR only**. No migration, canary, queue command, -assembly refresh or release acceptance is performed by this change. +Status: **owner-approved activation phase; live acceptance requires dated evidence**. +This revision selects the enabled policy. Omission still requires complete +effective protection and authenticated proof; the flag alone grants nothing. +The dated service/qualification record is +[CI-ACTIVATION-11](../../features/009-manual-two-pr-queue/openspec/activation.md). +Assembly/session adoption and release acceptance remain separate and excluded. ## What is prepared -`delivery-policy.json` commits `enabled: false`. `tests.yml` retains its ordinary +`delivery-policy.json` selects `enabled: true`; explicit false remains rollback. +`tests.yml` retains its ordinary events and parameterless reusable entry. Its original thirteen expanded jobs retain their commands, environment, matrices, checkout modes and accounting. Two read-only controls add an honest `openrepotools-delivery` check. The old @@ -24,14 +29,15 @@ or uncertain proof select full. A router failure cannot silently skip full jobs. The final gate requires all four actual full results, or independently rechecks the same omitted-work proof. It never posts success under an unrun test's name. -Even a future true flag cannot omit work until complete effective branch rules +Even an enabled flag cannot omit work until complete effective branch rules require `openrepotools-delivery` from GitHub Actions (integration15368) and none of `guard-launch-mode`, `tests`, `tests-no-submodule`, `package` remains required. The ruleset GET and public branch metadata GET cover layered rulesets and classic protection, including contexts and checks arrays. Missing, malformed or changing classic evidence retains full. Existing Contents:read is sufficient for branch metadata; neither endpoint needs administrative access or settings writes. -No ruleset, branch protection, app, permission grant or bypass is applied here. +The router never writes rulesets, branch protection, permissions or bypasses. +The separately approved operator migration is recorded in CI-ACTIVATION-11. ## Initial supported scope @@ -103,16 +109,16 @@ evidence falls back to full. Lookalike/manual merges, reruns, failures, skipped jobs, changed policy or stale refs also fall back. New nested names are a conservative contract to confirm in a later authorized canary, not live evidence. -## Future owner-approved migration (NOT executed) +## Owner-approved migration and qualification -1. Merge this code/spec only after exact-head full/reuse CI and review, reconciling - Sonar PR51's wheel-only baseline amendment and coverage collectors first. -2. Approve the changed source merge floor described below. Confirm the effective +1. Source preparation and local-review PRs have landed. Preserve current main's + newer Sonar work and qualify the exact enablement head with full/reuse CI. +2. Brett approved the changed source merge floor below on 2026-11-13. Confirm the effective checks, queue config/service readiness and a qualified hosted or local review receipt path. Hosted Codex quota is not a prerequisite for the local path. -3. Separately approve/install app-bound `openrepotools-delivery` as the required - verification context and remove the four legacy required contexts. Preserve - every unrelated rule. No bypass. Keep the flag false during migration. +3. The approved migration installed app-bound `openrepotools-delivery` and removed + the four legacy required contexts on 2026-11-13, with the live flag false. + Target/effective readbacks preserved every unrelated rule and added no bypass. 4. Enable only via a separately reviewed config PR. Require failure/recovery and a user-authorized two-member live efficiency canary: fast-only source/candidate PR CI, one complete heavy caller, no duplicate full main run, exact prefix and @@ -121,6 +127,10 @@ conservative contract to confirm in a later authorized canary, not live evidence 5. Reconcile governance and later assembly pins/composed CI/session adoption under their own approvals. Preserve running lanes and active plans. +Configuration publication, local fixtures, service recognition and completed +live qualification are distinct. Consult the dated evidence; do not infer a +successful canary or wider rollout merely from this enabled source revision. + **Changed source floor:** after activation, delivery success can mean fast verification, not heavy integration. The named Mergify queue holds heavy; GitHub's new required check by itself would not prevent a collaborator from directly @@ -131,12 +141,32 @@ does not pretend otherwise or silently request a bypass/new ruleset control. Rollback: an ordinary reviewed `enabled: false` change resumes every original full job. Restoring legacy required contexts is a separate owner-approved setting -change. Neither rollback nor this preparation changes release eligibility, apps, +change. Neither rollback nor this phase changes release eligibility, apps, installed tools, live sessions or lane ownership. +## Scoped manual operation + +For an authorized current-head reviewed source, include both exact opt-in lines +above, preserve independent main-based topology and verify actual fast/delivery +success. Accept hosted review or the explicit local receipt below; a generic +summary or passing CI is not acceptance. Then a repository writer requests: + +```bash +gh pr comment PR_NUMBER --repo opensoft/openRepoTools-code \ + --body '@mergifyio queue openrepotools-claude-current' +``` + +For the authorized two-member canary, request both independently ready members +close together, verify actual two-member order and leave heads/bases unchanged. +Do not direct-merge fast-only sources or edit a live queue branch. Record the +single complete heavy run, source/candidate/main CI and tested/landed prefix and +final trees. A singleton, reset, duplicate/full fallback or uncertain result is +not efficiency acceptance. Other files, dependencies and old full-only queues +retain their original full checks; this is not an arbitrary-lane fast path. + ## Exact-head local review receipts -This is a **prepared alternative review contract**, not activation or merge +This is an **alternative review contract**, not activation or merge authority. Run `pre-pr-review`, `pr-review` or `branch-or-pr-review` locally in Codex against the exact current PR head and base; resolve findings and re-review before acceptance. Preserve the report's findings, resolution and validation. diff --git a/.github/ci/delivery-policy.json b/.github/ci/delivery-policy.json index 3c884694..5acb0d22 100644 --- a/.github/ci/delivery-policy.json +++ b/.github/ci/delivery-policy.json @@ -1,4 +1,4 @@ { "schema_version": 1, - "enabled": false + "enabled": true } diff --git a/.github/ci/task-set-delivery.md b/.github/ci/task-set-delivery.md index 923ccd5c..09bae45f 100644 --- a/.github/ci/task-set-delivery.md +++ b/.github/ci/task-set-delivery.md @@ -1,16 +1,23 @@ -# Shared Claude/Codex task-set instructions: manual full-CI delivery - -The [additive fast/candidate preparation](delivery-preparation.md) introduces -no queue activation or CI skips. Continue requiring all current full checks; -the prepared candidate entry has no existing queue consumer. The proposed +# Shared Claude/Codex task-set instructions: scoped efficiency and full fallback + +The owner-approved initial efficiency path is documented in +[the cutover runbook](delivery-cutover.md). Check the actual committed policy and +effective rules: an enabled flag alone never qualifies omission or admission. +Only the fixed opted-in claude-current scope is eligible. A fast-only source +MUST use `openrepotools-claude-current`, never direct merge; its delivery success +is not heavy integration. Live acceptance and assembly/session adoption are +separate evidence/authority gates. All other work retains full CI. + +The earlier [additive fast/candidate preparation](delivery-preparation.md) shipped +without queue activation or CI skips. Its [non-gating shadow caller](delivery-preparation.md#proposed-non-gating-caller-candidate-shadow-08) -does not exempt CI or grant admission; it requires separate merge authority -before any queue observation and does not authorize a live canary. +does not exempt CI or grant admission. The current cutover uses the separate +qualified path, not observation as a substitute for acceptance. The separate [trusted shadow observer](shadow-classifier.md) reports only conservative event observations. It never enables fast-only CI, grants queue -admission or replaces current-head review. The original pilot and all full-CI -gates remain unchanged; candidate/landing qualification is a later stage. +admission or replaces current-head review. The original full-CI pilot remains +unchanged; this observer alone supplies no candidate/landing qualification. Read the assembly's AGENTS.md and AGENTS-shape.md first. This is a code-local supplement for both agents, not replacement governance or a second specification @@ -18,7 +25,8 @@ store. Canonical feature 008 and its OpenSpec change live in openRepoTools-spec. ## Current authority -Feature 008's classifier is **advisory only**. Full tests.yml checks remain required; the +Feature 008's classifier is **advisory only**. Complete tests.yml integration +remains required except for independently proven scoped omission in the cutover runbook; the assembly's exact-pin composed run is separate acceptance. A `claude-current` shadow result does not authorize fast-only CI, a queue or a merge. No Mergify queue was activated by feature 008. Feature 009's separate @@ -87,14 +95,17 @@ member names its immediate predecessor in both the PR base and `Depends-On`. Every member retains the four full CI gates; a green advisory classifier is not a substitute. Keep the branches unchanged while the queue is testing them. -## Prepared efficiency path — disabled +## Owner-approved scoped efficiency path -Read [the cutover runbook](delivery-cutover.md) before interpreting the new -delivery/heavy checks or claude-current queue. The committed flag is false and -the current four full checks remain enforced. This preparation authorizes no -queue command, source merge, flag/settings migration, canary or session refresh. +Read [the cutover runbook](delivery-cutover.md) before interpreting delivery/heavy +checks or the claude-current queue. Brett approved its scoped service migration, +reviewed enablement and two-member canary on 2026-11-13. This source revision +enables the flag, still requiring effective app-bound delivery protection and +complete trusted proof. The dated activation record distinguishes actual +qualification from pending work. No instruction file independently authorizes +another merge, queue command, wider canary or session refresh. -After separately approved activation, an opted-in fast source must use the named +Under the approved activation, an opted-in fast source must use the named manual queue for complete heavy qualification; NEVER direct-merge it on delivery success. That check can mean fast verification, not heavy integration. Queue-only usage is operator policy unless separately approved service controls enforce it. diff --git a/features/009-manual-two-pr-queue/openspec/activation.md b/features/009-manual-two-pr-queue/openspec/activation.md new file mode 100644 index 00000000..cdafd427 --- /dev/null +++ b/features/009-manual-two-pr-queue/openspec/activation.md @@ -0,0 +1,68 @@ +# CI-ACTIVATION-11: scoped activation phase + +Disposition at this record's creation: owner-approved; required-check migration +complete; reviewed enablement and live qualification not yet performed. Later +qualification is tracked under [reconciliation issue 26](https://github.com/opensoft/openRepoTools-spec/issues/26). +Governing change: `opensoft/openRepoTools-spec`, +`openspec/changes/activate-claude-current-ci-cutover/`. +Working requirements FR-035–FR-038; sole implementation checklist T036–T041 in +`specs/009-manual-two-pr-queue/tasks.md`; reconciliation issue 26. + +## Authority and baseline + +Brett Heap, 2026-11-13: "Approve scoped activation and canary. Proceed with the +required-check migration, reviewed enablement PR, and two-PR test. Preserve lanes +1–5; no bypass, app access, paid upgrades, release or assembly-pin changes." + +This separately approves the already disclosed changed source merge floor: +delivery can mean fast verification; only the named manual queue holds heavy +integration. Queue-only usage is operator policy, not GitHub-enforced exclusivity. +No direct fast-source merge is authorized. + +Source baseline: code `22aac02ba5cfcb2777e4bf05a574e26c555bd38b`, spec +`9311051d340a64b81b94f70dff4ea66809112de6`. Preserve inherited Sonar fixes, +dependency pins, all full jobs/commands, artifact and review schemas, releases, +active plans and all running lanes. The initial scope stays unchanged. + +## Evidence boundaries + +Settings, reviewed source qualification, local failure/recovery fixtures, live +candidate/landing qualification and assembly adoption are separate gates. +Record actual readbacks and run/tree identities below as they complete. Neither +this approval record nor a passing local test is a live admission/merge receipt. +Source PRs and this phase are not archive or assembly-pin authority. + +## Required-check migration — 2026-11-13 06:27 America/La_Paz + +Guarded source main 22aac02 and successful full run 43397357900. The existing +GitHub Actions delivery check was successful and bound to app 15368. The live +flag remained false before and after the write. + +Updated only the required-context list in repository ruleset 25966308, from +guard-launch-mode/tests/tests-no-submodule/package to openrepotools-delivery +with integration_id 15368. Preserved name, active enforcement, main-only branch +condition, empty bypass actors, strictness and do-not-enforce-on-create flags. +Target/effective readbacks matched; every unrelated effective rule was unchanged. +Classic protection remains disabled with off/empty contexts/checks. No new +permission, bypass, app, release, assembly or lane act was performed. + +This is a service-migration receipt, not flag enablement or live efficiency. + +## Enablement test boundaries + +The committed-state assertion now expects the owner-approved true policy. The +existing disabled/no-network case uses an explicit false fixture and verifies +that state before calling the router. Three new default-on cases require full +fallback for absent, unbound or legacy-retaining protection. + +The old local-review and queue preparation checks also asserted a false global +default. Their phase expectations now match true; their read-only-reader and +full-entry/queue assertions are preserved. The local-review case is renamed to +describe the current approved phase. These two intentional test-identity renames +and three added protection cases are not dropped runtime/full-suite coverage. + +Red-first default-on checks failed four assertions against the old false policy, +while the explicit disabled case passed. The first broad run found the remaining +historical local-review phase assertion (483 passed/1 failed); a complete policy +reference search identified the queue assertion too. Final validation follows +the corrected phase expectations; no failure is recast as passing qualification. diff --git a/tests/test_ci_cutover.py b/tests/test_ci_cutover.py index eeb2f396..dfd3226c 100644 --- a/tests/test_ci_cutover.py +++ b/tests/test_ci_cutover.py @@ -52,8 +52,16 @@ def test_ci_cutover_effective_gate_is_app_bound_without_old_requirements(cutover assert cutover.effective_gate(lambda _repo, path: classic_clear() if path == "branches/main" else rows) is expected -def test_ci_cutover_committed_configuration_is_disabled(cutover): - assert cutover.enabled(REPO) is False +def test_ci_cutover_committed_configuration_is_enabled(cutover): + assert cutover.enabled(REPO) is True + + +@pytest.mark.parametrize("rows", [[], rules(("openrepotools-delivery", None)), + rules(("openrepotools-delivery", 15368), ("tests", None))]) +def test_ci_cutover_enabled_default_retains_full_with_unmigrated_protection(cutover, rows): + assert cutover.enabled(REPO) is True + request = lambda _repo, path: classic_clear() if path == "branches/main" else rows + assert cutover.route({}, {}, REPO, request) == {"mode": "full", "omit_full": False} @pytest.mark.parametrize("config", [None, {}, {"schema_version": 1, "enabled": 1}, @@ -67,10 +75,14 @@ def test_ci_cutover_configuration_uncertainty_is_full(cutover, tmp_path, config) assert cutover.enabled(tmp_path) is False -def test_ci_cutover_disabled_requires_no_network(cutover): +def test_ci_cutover_disabled_requires_no_network(cutover, tmp_path): + path = tmp_path / ".github/ci/delivery-policy.json" + path.parent.mkdir(parents=True) + path.write_text(json.dumps({"schema_version": 1, "enabled": False})) def forbidden(*_args): pytest.fail("disabled routing must not query GitHub") - assert cutover.route({}, {}, REPO, forbidden) == {"mode": "full", "omit_full": False} + assert cutover.enabled(tmp_path) is False + assert cutover.route({}, {}, tmp_path, forbidden) == {"mode": "full", "omit_full": False} def enable_fixture(cutover, batch): diff --git a/tests/test_ci_local_review.py b/tests/test_ci_local_review.py index 2a787791..152f156e 100644 --- a/tests/test_ci_local_review.py +++ b/tests/test_ci_local_review.py @@ -349,8 +349,9 @@ def read(number): read_review(delivery, batch, read_threads=read) -def test_ci_local_review_preparation_keeps_flag_jobs_and_queue_unchanged(): - assert json.loads((REPO / ".github/ci/delivery-policy.json").read_text())["enabled"] is False +def test_ci_local_review_contract_keeps_approved_flag_and_read_only_boundary(): + # Enablement is separately owner-approved; the review reader remains read-only. + assert json.loads((REPO / ".github/ci/delivery-policy.json").read_text())["enabled"] is True # No new write-capable workflow or custom success check accompanies the reader. text = (REPO / ".github/ci/delivery_verify.py").read_text() assert '"-X", "POST"' not in text and '"-X", "PATCH"' not in text diff --git a/tests/test_ci_pilot_queue.py b/tests/test_ci_pilot_queue.py index 57339023..d125d0e1 100644 --- a/tests/test_ci_pilot_queue.py +++ b/tests/test_ci_pilot_queue.py @@ -126,7 +126,8 @@ def test_manual_mergify_queue_uses_existing_full_ci_on_every_pr_base(reader): from test_full_ci_coverage_parity import ROOT_GUARD, AGGREGATE_GUARD assert workflow["jobs"][name].get("if") in (ROOT_GUARD, AGGREGATE_GUARD) import json - assert json.loads((REPO / ".github/ci/delivery-policy.json").read_text())["enabled"] is False + # Scoped enablement preserves this full entry; the old docs queue is out of scope. + assert json.loads((REPO / ".github/ci/delivery-policy.json").read_text())["enabled"] is True @pytest.mark.parametrize("files", [REFERENCES[:1], REFERENCES[1:], REFERENCES])