docs: proposal for a change gate (module boundaries, function complexity, doubled text) #339
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/339"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by huanchong-99 on 2026-11-24T03:26:43Z.
Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121094134
What and why
Adds one page,
docs/change_gate.md: a proposal, for the maintainer's decision, for one deterministic check that blocks what a pull request adds and a diff does not show, and tolerates what is already onmain:tools/reaching intotests/semanticthroughsys.path);mainby more than 5; dispatch functions judged per arm);Every finding says why it matters, what exactly triggered it and how to fix it. Code duplication and new skips are reported, never blocking.
The numbers are measured at
dde82f2, which is in this repository's history, and backtested on the 300 merges that end with it: 48 of the 300 would have been stopped, 68 of the 91 blocking findings were changes that should have been fixed before merge, 2 were tool artefacts, and the check takes about 80 ms per pull request. Section 1.4 shows why it should run by the author and in the merge round and not only in CI: in the original repository 55 of 1,000 pull requests merged on 2026-11-23 had a passing CI run, and of the 40 most recently merged here, 19 had no CI run and 18 a failing CI job.I first opened this page in the original repository shortly before it went private. This is the same page with its references rewritten for this repository: commit hashes instead of the old pull request numbers.
Nothing else changes; no code. Section 5 lists five questions for the maintainer. An implementation would be its own claim and pull request.
Tested
Docs only. Ran every
tests/test_docs_*.pyandtests/test_i18n_index.py(what the docs-only path of CI runs) on this branch, based ond478a92: all pass.GPUs tested: n/a (no GPU code)
The numbers come from a standard-library prototype run offline on a local clone; it is not part of this pull request. No game files.
AI-assisted: yes. The measurements, the backtest and the page were done with a coding agent; I reviewed the result.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (Not applicable: no translator change.)🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by huanchong-99 on 2026-11-24T05:54:07Z.
@ubiquitarianism This page needs a decision from you rather than a code review. Section 5 has five questions: the module boundaries, the complexity numbers, blocking from day one, running it in the merge round, and the runtime/src ↔ runtime/shims direction. One line per question is enough, and "no" is a fine answer: I'd rather hear no than build something you don't want.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:48:12Z.
Native Windows 11 Verification (
98ac9ea777) — PASSDiff-audited
docs/change_gate.md(+313/-0) and verified merged ontoorigin/main(a9e247cd69) on Windows 11 (10.0.26200, Python3.12.10with-I).Results
PR #339merged ontoorigin/main):0PR-introduced issues across all 13 documentation test suites:tests/test_docs_repo_paths.py(rc=0— everytools/,scripts/,tests/, andruntime/file path referenced indocs/change_gate.mdresolves on currentorigin/main)tests/test_docs_adjacent_fenced_blocks.py(rc=0)tests/test_docs_design_rows.py(rc=0)tests/test_docs_encoding.py(rc=0)tests/test_docs_env_vars.py(rc=0)tests/test_docs_list_items.py(rc=0)tests/test_docs_pr_template.py(rc=0)tests/test_docs_python_deps.py(rc=0)tests/test_docs_repeated_lines.py(rc=0)tests/test_docs_table_ids.py(rc=0)tests/test_docs_table_rows.py(rc=0)tests/test_docs_links.py&tests/test_docs_cli_flags.py(0issues indocs/change_gate.md)tests/test_ci_registration.py(18/18),tests/test_text_write_line_endings.py(3/3), andscripts/check_no_game_data.py:OK.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T17:12:35Z.
Tested
98ac9ea77merged (no commit) with main0bc6e21a1: Python 3.12.4, Windows 11 10.0.26300, CPU only.docs/change_gate.md), so no test can show a red.tests/test_docs_*.pyfiles (links, CLI flags, env vars, repo paths, tables, encoding and the rest) all pass on main and on the merge.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T19:02:38Z.
Merging. Head
98ac9ea77has red/green verdicts from reviewers other than the author (above), merges cleanly withmain35390e722, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (translator-testsmesh,semantic-testsf16) are pre-existing. Merged by MoonEyes.AI-assisted (Claude Code).