allin-governance
工作区治理中枢的公共核:可执行门禁 + 文档枢纽契约 + 仓库体检 + 机器事实采集。
单消费者(2026-11-29 定调):本包只服务 allin 一个仓。
它不是通用库,也不追求外部复用——把它装进别的仓的 venv 或共享工具环境本身就是错误用法。
判据装错地方不会报错,只会判错树(最坏的失败模式),所以 consumer.py 会在解析不出
allin 仓根时直接 exit 2 并说明边界,而不是拿一个必然错误的位置继续跑。
为什么独立成仓
理由不是「做成通用库」,是「把判定器与事实分开」:判定器只读、零机器事实;事实源、月账、 记录属于消费仓。同仓时这条边界只能靠目录约定 + 门禁事后拦,分仓后它成为结构事实—— 判定器不可能悄悄读到某个分区的值。
分仓的构建收益:跨目录 package-dir 映射全部取消,随之「包内副本是否与仓内真身一致」
这一整类对账问题从根上不存在(check_pkg_parity.py 因此可以删)。
代价与纪律(2026-11-29 补):单消费者意味着不该有「版本号舞蹈」。消费形式应取
路径/源码(-e ../allin-governance)或钉 SHA,而不是「发 PyPI + 消费仓 pin 版本号」——
后者在只有一个消费者时只会制造三类假象:pin 指向不存在的版本、发布节奏脱离真实需求、
以及「本地装了临时 wheel 而索引上没有」。
包里有什么
| 子命令 | 职责 |
|---|---|
repocheck |
仓库体检:30 条规则 + 0–10 健康分 |
init / verify |
生成 / 复核治理骨架 |
scan |
发布区扫盘:项目指纹、重复检出、迁移残留 |
deps |
依赖三方对账(声明 / 实装 / import) |
github |
建仓、推送、三端同步巡检(镜像端) |
gitee |
建仓、转公开、发发行版(权威端,与 github 配对成双核) |
publish |
PyPI 发版链路:check / build / verify / upload / release |
secrets-scan |
离线凭据扫描(21 规则 + 熵闸,零外部二进制) |
facts |
机器事实:采集本机 + 校验分区文件断言(支持无仓模式) |
ml |
文本分类骨架:TextCNN 打底 + 规则降级(torch 可选) |
pack |
PyInstaller 批量打包:GUI 自动检测 / 图标 / 附加数据 / UPX(pyinstaller 可选,pip install 'allin-governance[pack]') |
所有子命令接受 --root <目录> 与位置参数两种写法(1.1.2 起统一)。
发布链路 → PUBLISHING.md
建仓、推送、发版原本散在三处(allin 的 gitee 工具 + 包内 github + 包仓脚本),
2.1.0 因此只在 PyPI 发了 wheel、漏了 sdist —— 纪律没有统一入口就会被当作结果而不是依据。
现在统一成 gitee / github / publish 三个子命令,流程与判据见 PUBLISHING.md。
allin-governance publish release --upload # 发版的唯一入口(双产物是硬判据)
安装
pip install allin-governance
allin-governance --version
allin-governance facts measure # 换机第一件事:这台机器长什么样
当前版本 2.5.16(唯一事实源是仓根 VERSION;此行与它不一致时 scripts/release_preflight.py 判红)。
运行时零第三方依赖——治理工具要能在「一台什么都没装的机器」上跑起来。
发版前校验(维护者)
python -m build # 构建 sdist + wheel
python scripts/release_preflight.py --install # 版本对账 / dist 干净 / sdist 自包含 / 双产物各装一次
--install 是 1.0.0 事故(wheel 好、sdist 坏)的唯一鉴别实验,发版前必跑;
twine check 与 --install 在无人值守场景记为「未验证」,不等于通过。
边界
本仓只装判定器 / 采集器 / 骨架执行器 / 只读模板 / 接口契约;
实例台账、机器特化数据、记录类、运行产物一律不进这里
(判据见消费仓的 SPEC-206 公共核边界)。
许可
MIT-0
Metadata
Release files for allin-governance 2.5.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| allin_governance-2.5.16.tar.gz | 478.4 kB | Without provenance | Details for allin_governance-2.5.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| allin_governance-2.5.16-py3-none-any.whl | Python 3 | none | any | Details for allin_governance-2.5.16-py3-none-any.whl |
Total release size: 1.0 MB
Release files / allin_governance-2.5.16.tar.gz
| Download URL | allin_governance-2.5.16.tar.gz |
|---|---|
| Size | 478.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1823c848746efdb38197cb345946307494522c3877e7dcf78621f6d743e4e2e
|
|
BLAKE2b-256 checksum How to use checksums |
ef77d739b065a5139c2e229982e1c1f582e93ec5c3ac266b9898a8993eb8703f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / allin_governance-2.5.16-py3-none-any.whl
| Download URL | allin_governance-2.5.16-py3-none-any.whl |
|---|---|
| Size | 571.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1fb871e4f6dfe6e2e324052e95a4b4e0fe6ba6d04a9c51760bbc7ffb9b473a5
|
|
BLAKE2b-256 checksum How to use checksums |
c674009999dc04557dc0a4f0a2d34ff303c3c16fda5989bc1adc65e9fa0b81d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for allin-governance 2.5.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.