ouroboros/scripts
Anton Razzhigaev 4ec638b170 Move size-gate enforcement to official CI; local surfaces warn
Retire the first-parent manifest history replay and re-anchor the size
ratchet on the official repository line (owner decisions Q7-C, Q18-A,
Q19-A of the update-flow redesign sprint). A locally evolved fork can now
take a managed update without being trapped by inherited structural debt,
while the official line keeps ratcheting pairwise.

- ouroboros/review.py: validate_size_ratchet loses
  _audit_committed_manifest_history and the BASELINE==HEAD bootstrap trap.
  The previous manifest resolves merge-aware (HEAD's tree, else ANY parent
  whose tree carries it, else bootstrap accepted from the current tree with
  tree-seeded immutable baselines). New entry points:
  validate_size_ratchet_candidate (in-memory candidate validation for the
  generator) and validate_size_ratchet_transition_against_base (pairwise
  base-vs-tip shrink-only check for CI: an all-zeros or missing/unresolvable
  base degrades to the tip's parent manifest, verified against the parent's
  own tree - never a skip; a resolvable base without the manifest fails
  closed, so genuine first adoption re-runs with a post-adoption base; only
  a checkout with no parent manifest at all bootstraps with the transition
  skipped). Manifest-vs-live-tree
  exactness, validate_manifest_transition shrink-only semantics,
  staged-tree checks, and MAX_TOTAL_FUNCTIONS are unchanged.
- scripts/regenerate_size_ratchet.py: typed refusal on an unmerged index
  ("merge in progress: resolve conflicts first") before any inventory
  work, merge-aware previous resolution, and candidate validation BEFORE
  the manifest is written - a red regeneration no longer clobbers the
  checked-in file (it also creates the manifest directory on a fresh
  bootstrap).
- New pytest marker `size_ratchet` carries the live-repo size gates:
  test_no_oversized_modules, test_size_ratchet_manifest_matches_live_tree,
  test_no_extremely_oversized_functions, the generator --check half of the
  render-determinism test (split in two), and the new pairwise transition
  test reading OURO_SIZE_RATCHET_BASE_REF. The three pinned exclusion
  surfaces gain " and not size_ratchet" synchronously
  (preflight_runner.LANE_EXCLUSION_EXPR, pyproject addopts, all four
  ci.yml markexprs; the preflight pin tests stay green through their
  SSOT). quick-test and full-test run a dedicated blocking
  `python -m pytest tests/ -m size_ratchet` step with the event base
  (PR base SHA / push event.before) in the env, and marker-guards gains
  the lane's non-empty canary. fetch-depth stays 0.
- Local warning surfaces: check_worktree_readiness appends the validator's
  findings as "official CI will enforce: ..." warnings (try/except, never
  blocking); codebase_health reports the same findings in a dedicated
  section.
- check_worktree_version_sync moves to ouroboros/tools/release_sync.py
  (version-sync logic lives with its authority) with a compatibility
  re-export in review_helpers.py: the module hard gate caught
  review_helpers.py crossing 1600 lines with the new warning check, and
  the extraction pays the debt instead of grandfathering it.
- Docs (frozen-file edits owner-sanctioned): CHECKLISTS.md row 7 and
  reviewer item 2(c); DEVELOPMENT.md "Module Size & Complexity",
  compliance checklist, and "Pytest marker lanes"; ARCHITECTURE.md
  structural smoke gates and the CI paragraph in section 8.
- tests/test_repo_health_smoke.py: the history-replay pins are retired or
  rewritten as contract tests for the new semantics (merge-aware previous
  through a merge parent for validator and generator, pairwise transition
  with explicit/degraded/all-zeros/pre-bootstrap bases, bootstrap-from-tree
  acceptance, bootstrap-baseline tree match, unmerged-index refusal,
  candidate-mode write-nothing-on-red and write-validated-on-green).
  Accepted tradeoff (Q18-A): intra-interval archaeology (transient states,
  same-interval retire+re-enter) is no longer detected anywhere.
- Manifest regenerated: tests/test_repo_health_smoke.py enters the
  1001-1500 band with its rationale.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 04:46:25 +00:00
..
bench_delegated_snapshot.py release 6.100.0: delegated runs execute in private snapshots — capture, disposition, and GC carry one honest truth (sprint phase C) 2026-08-12 17:54:10 +03:00
betterleaks_platform_smoke.py feat: add secret-safe skill publishing 2026-08-21 03:46:17 +03:00
build_appimage.sh fix(packaging): harden AppImage runtime lifecycle 2026-08-11 04:21:16 +03:00
build_linux_packages.sh fix(release): bind the systemd unit to package proof 2026-08-13 01:19:14 +03:00
build_repo_bundle.py fix: harden cross-platform release packaging 2026-08-11 17:18:31 +03:00
claudexor_platform_smoke.py fix(ci): tolerate only the Windows Git atomic-object poll race 2026-08-07 06:05:26 +03:00
cleanup_test_pollution.py v5.15.0-rc.8: quality dx closed-loop skills wave on top of rc.7 2026-05-11 03:32:41 +03:00
contributor_review_evidence.py Make contributor reviews agent-first and route-neutral 2026-08-14 10:00:05 +03:00
download_node_standalone.ps1 rc(reliability): close subagent crash/ghost/spinner classes; provider-agnostic review; bundled node 2026-05-29 22:48:13 +03:00
download_node_standalone.sh rc(reliability): close subagent crash/ghost/spinner classes; provider-agnostic review; bundled node 2026-05-29 22:48:13 +03:00
download_python_standalone.ps1 fix(deps): complete uv migration contracts 2026-08-11 06:34:54 +03:00
download_python_standalone.sh build(deps): manage Python dependencies with uv 2026-08-11 05:28:21 +03:00
download_ripgrep_standalone.ps1 fix(ci): release-lane smoke paths and ripgrep pin parsing 2026-08-05 00:13:49 +03:00
download_ripgrep_standalone.sh feat(code-intelligence): add query_code and clearer evolution settings 2026-06-09 07:46:59 +03:00
fetch_claudexor_runtime.py Managed Claudexor runtime delivery: exact pin, single Connect, staged updates 2026-08-06 15:15:09 +03:00
pyi_rth_pythonnet.py chore(build): import build artifacts from main + adapt spec for Phase 5 skills 2026-04-22 14:31:53 +03:00
regenerate_size_ratchet.py Move size-gate enforcement to official CI; local surfaces warn 2026-08-21 04:46:25 +00:00
release_proof.py feat: add secret-safe skill publishing 2026-08-21 03:46:17 +03:00
run_external_review.py Generalize fresh-install model and review defaults 2026-08-17 23:16:27 +03:00
run_plan_review.py plan review becomes a domain-neutral spec gate 2026-08-17 11:37:32 +00:00
smoke_linux_packages.sh feat: add secret-safe skill publishing 2026-08-21 03:46:17 +03:00