docs: proposal for a change gate (module boundaries, function complexity, doubled text) #339

Open
github-bot wants to merge 1 commit from github-bot/gh-339 into main AGit
Owner

@⁠huanchong-99 on GitHub · 2026-11-24 03:26 UTC · original
huanchong-99:docs/change-gate-proposal → main · +313 −0 · 1 files · 1 commits · open

Claimed in the coordination issue as: #14

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 on main:

  • a new import or include across areas (for example tools/ reaching into tests/semantic through sys.path);
  • a production function grown past the point where it can be changed safely (new functions above complexity 10, changed ones by more than 2, main by more than 5; dispatch functions judged per arm);
  • a block of text doubled by a merge.

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_*.py and tests/test_i18n_index.py (what the docs-only path of CI runs) on this branch, based on d478a92: 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

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: no translator change.)

🤖 Generated with Claude Code

**@⁠huanchong-99** on GitHub · 2026-11-24 03:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/339) `huanchong-99:docs/change-gate-proposal` → `main` · +313 −0 · 1 files · 1 commits · open Claimed in the coordination issue as: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 ### 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 on `main`: - a new import or include across areas (for example `tools/` reaching into `tests/semantic` through `sys.path`); - a production function grown past the point where it can be changed safely (new functions above complexity 10, changed ones by more than 2, `main` by more than 5; dispatch functions judged per arm); - a block of text doubled by a merge. 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_*.py` and `tests/test_i18n_index.py` (what the docs-only path of CI runs) on this branch, based on `d478a92`: 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 - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable: no translator change.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
One new page, docs/change_gate.md: a proposal for the maintainer's
decision, with measurements at dde82f2 (in this repository's history)
and a backtest on the 300 merges that end with it. No code changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:54:16 +00:00
Author
Owner

@⁠huanchong-99 on GitHub · 2026-11-24 05:54 UTC · original

@⁠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.

**@⁠huanchong-99** on GitHub · 2026-11-24 05:54 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/339#issuecomment-7123381660) @⁠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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/339/head:github-bot/gh-339'
git switch 'github-bot/gh-339'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-339'
git switch 'github-bot/gh-339'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-339'
git switch 'github-bot/gh-339'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-339'
git switch 'main'
git merge --squash 'github-bot/gh-339'
git switch 'main'
git merge --ff-only 'github-bot/gh-339'
git switch 'main'
git merge 'github-bot/gh-339'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.