# SPDX-License-Identifier: MPL-2.0
# Estate-wide CI Wrapper Sweep + Admin-Merge Campaign — 2026-05-26
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath)
#
# Machine-readable companion to audit-admin-merge-wrapper-sweep-2026-05-26.adoc.
# Schema follows the existing docs/audits/ a2ml convention (TOML-like
# section blocks; arrays as inline tables where structure repeats).

[manifest]
schema           = "audit/admin-merge-campaign/v1"
date             = "2026-05-26"
session_id       = "7e207ad3-2e07-4c82-821b-4100ad369e74"
campaign_kind    = "estate_ci_wrapper_sweep + admin_merge"
authoring_actor  = "claude-opus-4-7 (1M context)"
authorising_actor = "hyperpolymath (org admin)"
human_companion  = "audit-admin-merge-wrapper-sweep-2026-05-26.adoc"

[motivation]
primary       = "Estate-template propagation: 264 repos carried byte-equivalent copies of the 416-line hypatia-scan.yml. Consolidate to a single reusable + thin wrappers."
secondary     = "GitHub Actions free-tier credit pressure: holding 256 PRs open while waiting for non-arriving green CI would have burned credit indefinitely on the rotten heavy workflow."
pattern       = "estate-template-propagation-pattern"
prior_applications = ["standards#168 governance/language-policy", "standards#174 rust-ci/elixir-ci"]

[outcome]
prs_filed                   = 282
prs_landed_on_main          = 278
prs_admin_merged            = 254
prs_owner_merged_inflight   = 24
prs_held_back               = 1     # standards#189 (Python eradication; real code change)
prs_closed_in_favour        = 1     # standards#191 (superseded by parallel-session #193)
admin_merge_failures        = 0
lines_of_yaml_retired_est   = 110000

[wrapper_groups]
[wrapper_groups.hypatia_scan]
count             = 264
canonical_lines   = 416
wrapper_lines     = 29
reusable          = "standards/.github/workflows/hypatia-scan-reusable.yml"
reusable_pr       = 193
reusable_pin_sha  = "97df762107501909f50bb770e9bc200b6c415600"
notes             = "Initially pinned to standards#191 HEAD; retargeted after parallel-session #193 filed a cleaner zero-input variant."

[wrapper_groups.hypatia_scan_main_retargets]
count             = 14
purpose           = "Update wrappers that owner-merged before retarget swept their PR branches; re-pin to #193 HEAD on main."

[wrapper_groups.elixir_ci]
count             = 2
repos             = ["bofig", "tma-mark2"]
canonical_lines   = 50
wrapper_lines     = 16
reusable          = "standards/.github/workflows/elixir-ci-reusable.yml"
reusable_pr       = 174
deferred          = ["chimichanga"]
deferred_reason   = "Custom EXIT=3 coverage handler not yet supported by reusable; awaits an extra_test_args input."

[diagnosis_baseline_rot]
why_admin_merge   = "pull_request CI runs the target-branch workflow file (GitHub Actions security model). Receiving repos had pre-existing failing workflows on main; the wrapper PRs inherited that redness through no fault of their own content."
spot_check_method = "Compared statusCheckRollup of 6 random CI_FAILING wrapper PRs against gh api repos/<o>/<r>/commits/main/check-runs."
verification_sample_size = 6
all_samples_had_pre_existing_red = true

[[diagnosis_baseline_rot.samples]]
repo = "hyperpolymath/007"
pre_existing_failing_checks_on_main = 11

[[diagnosis_baseline_rot.samples]]
repo = "hyperpolymath/ipv6-only"
pre_existing_failing_checks_on_main = 22

[[diagnosis_baseline_rot.samples]]
repo = "hyperpolymath/ipv6-tools"
pre_existing_failing_checks_on_main = 6

[[diagnosis_baseline_rot.samples]]
repo = "hyperpolymath/lcb-website"
pre_existing_failing_checks_on_main = 7

[[diagnosis_baseline_rot.samples]]
repo = "hyperpolymath/explicit-trust-plane"
pre_existing_failing_checks_on_main = 9

[[diagnosis_baseline_rot.samples]]
repo = "hyperpolymath/ViableSystems.jl"
pre_existing_failing_checks_on_main = 7

[execution]
sweep_total            = 264
sweep_ok               = 262
sweep_skip             = 2
sweep_fail             = 0
sweep_duration_min     = 22
sweep_method           = "Single bash loop, ~10s/PR; sub-agent fan-out attempted and rejected by sandbox (Bash perm denied), fell back to main-session background Bash."
retarget_total         = 262
retarget_ok            = 247
retarget_skip          = 15
retarget_fail          = 0
retarget_skip_reasons  = "14 already owner-merged before retarget reached them; 1 already-retargeted via smoke-test."
main_retarget_filed    = 14
main_retarget_ok       = 14
admin_merge_total      = 254
admin_merge_ok         = 254
admin_merge_fail       = 0
admin_merge_method     = "gh pr merge <url> --admin --squash; 4 parallel chunks of ~64 from background Bash."

[follow_up_NOT_discharged]
baseline_rot_remediation = "The Hypatia / governance / scorecard alerts that the rotted workflows surfaced still exist. Wrappers reduce workflow surface, not findings. Continue under existing Hypatia remediation campaign."
canonical_reusable_193   = "standards#193 must merge for wrappers' SHA-pin to resolve cleanly. Until then, pin resolves via refs/pull/193/head (functionally OK but semantically pending)."
python_eradication_189   = "standards#189 (Python → Deno port + 13-case regression test) NOT admin-merged. Real code change; warrants normal CI verification when credit allows."
older_session_prs        = "Rust-CI sweep (82), launcher campaign (9), governance fixes, etc. Same admin-merge logic could apply to wrapper-shaped older PRs; not audited in this campaign."

[provenance]
sweep_search                  = "gh search code 'filename:hypatia-scan.yml org:hyperpolymath' (paginated)"
wrapper_template              = "/tmp/hypatia-sweep/wrapper.yml"
convert_script                = "/tmp/hypatia-sweep/convert.sh"
retarget_script               = "/tmp/hypatia-sweep/retarget.sh"
admin_merge_script            = "/tmp/hypatia-sweep/admin-merge.sh"
verification_sample_size      = 10
verification_sample_all_merged = true

[memory_references]
admin_merge          = "project_admin_merge_wrappers_2026_05_26.md"
foundational_survey  = "project_foundational_workflow_survey_2026_05_26.md"
auto_merge_policy    = "feedback_pr_set_auto_merge_immediately.md"
fanout_rule          = "feedback_fanout_needs_bash_allowlist.md"
template_pattern     = "estate-template-propagation-pattern"
