| event_payload |
{"ref":"refs/heads/main","befo {"ref":"refs/heads/main","before":"623a58d184232de4493761b6612202abae6561c0","after":"7021758cffa830beecc7c0af480bc1943a3e78e8","compare_url":"https://gitea.g-hi.com/luoanwu/enterprise-platform/compare/623a58d184232de4493761b6612202abae6561c0...7021758cffa830beecc7c0af480bc1943a3e78e8","commits":[{"id":"7021758cffa830beecc7c0af480bc1943a3e78e8","message":"fix(governance): 治理测试两条跑法合上——不设 GOV_REPORT_DIR 不再污染 reports/,设了也不再判红\n\n2026-09-19 实测的坑:根 `pnpm check` 第 15 环 `pnpm test` 两条路都不干净。\n- 不设 `GOV_REPORT_DIR`:449 例全过,但 `check-caddy.test.mjs` 就地重写\n `reports/caddy.latest.json`(它是 `report-clobber.test.mjs` 里唯一的具名豁免),\n 跑完整条链必然留一份脏绑报告,要靠操作者记得 `git checkout --` 它。\n- 设了 `GOV_REPORT_DIR`:12 个用例判红。它们把门禁 CLI 跑在**临时沙箱**里\n (catalog-drift 的临时检出、evidence 的临时 git 仓、fixtures 的 `--root`),\n 子进程继承了外部这个变量,报告落到沙箱外,用例按沙箱路径回读就读不到。\n\n两头都是同一件事没做:spawn 门禁时没把报告目录钉死。逐个钉:\n\n| 文件 | 钉到哪 |\n|---|---|\n| check-caddy | 临时 `gov-report-*`(解除具名豁免,与另四支 check-* 同款) |\n| check-catalog-drift | `\u003c临时检出\u003e/reports` |\n| check-evidence-freshness | `\u003c临时 git 仓\u003e/reports` |\n| fixture-integrity / platform-fixtures / cli | `\u003c沙箱 --root\u003e/reports` |\n| port-conformance | 进程内调门禁,`process.env` 上钉一次再还原 |\n\n`deployed-runtime.test.mjs` 反着来:它断言的就是「默认不落盘」,故显式 `delete`\n掉外部的 `GOV_REPORT_DIR`——否则报告被重定向走,仓里那份自然不动,断言成空转。\n它继续留在 `CLOBBER_EXEMPT`(现在是唯一一条,理由与解除条件已按这个新事实改写)。\n\n`report-clobber.test.mjs` 同时补两处扫描漏洞:原来只认字面量 `governance/check-*.mjs`\n(漏掉按相对路径与 `bin/cli.mjs` spawn 的 5 个文件),且只要提一嘴变量名就放行\n(`delete` 做的是相反的事)。现在按 `check-*.mjs|cli.mjs` 认,且要求写成赋值形式。\n扫不到的一类(进程内直接调门禁函数)在注释里写明。\n\n出口判据实测:\n- `GOV_REPORT_DIR=\u003ctmp\u003e node --test governance/test/*.test.mjs` → 471 例 470 过 0 失败;\n- 不设变量跑同一套 → 同样 0 失败,且跑前跑后 `reports/*.json` 的 md5 逐份不变、\n `git status --porcelain` 无新增(树上其余脏文件属并行会话)。\n\n无 `chore(reports)` 回绑:本次改动全在 `governance/test/` 下,46 条证据作用域没有一条覆盖它,\n`check:evidence` 的判词不因本提交改变。\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n","url":"https://gitea.g-hi.com/luoanwu/enterprise-platform/commit/7021758cffa830beecc7c0af480bc1943a3e78e8","author":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"committer":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"verification":null,"timestamp":"2026-09-19T00:26:15-07:00","added":[],"removed":[],"modified":["governance/test/check-caddy.test.mjs","governance/test/check-catalog-drift.test.mjs","governance/test/check-evidence-freshness.test.mjs","governance/test/cli.test.mjs","governance/test/deployed-runtime.test.mjs","governance/test/fixture-integrity.test.mjs","governance/test/platform-fixtures.test.mjs","governance/test/port-conformance.test.mjs","governance/test/report-clobber.test.mjs"]}],"total_commits":0,"head_commit":{"id":"7021758cffa830beecc7c0af480bc1943a3e78e8","message":"fix(governance): 治理测试两条跑法合上——不设 GOV_REPORT_DIR 不再污染 reports/,设了也不再判红\n\n2026-09-19 实测的坑:根 `pnpm check` 第 15 环 `pnpm test` 两条路都不干净。\n- 不设 `GOV_REPORT_DIR`:449 例全过,但 `check-caddy.test.mjs` 就地重写\n `reports/caddy.latest.json`(它是 `report-clobber.test.mjs` 里唯一的具名豁免),\n 跑完整条链必然留一份脏绑报告,要靠操作者记得 `git checkout --` 它。\n- 设了 `GOV_REPORT_DIR`:12 个用例判红。它们把门禁 CLI 跑在**临时沙箱**里\n (catalog-drift 的临时检出、evidence 的临时 git 仓、fixtures 的 `--root`),\n 子进程继承了外部这个变量,报告落到沙箱外,用例按沙箱路径回读就读不到。\n\n两头都是同一件事没做:spawn 门禁时没把报告目录钉死。逐个钉:\n\n| 文件 | 钉到哪 |\n|---|---|\n| check-caddy | 临时 `gov-report-*`(解除具名豁免,与另四支 check-* 同款) |\n| check-catalog-drift | `\u003c临时检出\u003e/reports` |\n| check-evidence-freshness | `\u003c临时 git 仓\u003e/reports` |\n| fixture-integrity / platform-fixtures / cli | `\u003c沙箱 --root\u003e/reports` |\n| port-conformance | 进程内调门禁,`process.env` 上钉一次再还原 |\n\n`deployed-runtime.test.mjs` 反着来:它断言的就是「默认不落盘」,故显式 `delete`\n掉外部的 `GOV_REPORT_DIR`——否则报告被重定向走,仓里那份自然不动,断言成空转。\n它继续留在 `CLOBBER_EXEMPT`(现在是唯一一条,理由与解除条件已按这个新事实改写)。\n\n`report-clobber.test.mjs` 同时补两处扫描漏洞:原来只认字面量 `governance/check-*.mjs`\n(漏掉按相对路径与 `bin/cli.mjs` spawn 的 5 个文件),且只要提一嘴变量名就放行\n(`delete` 做的是相反的事)。现在按 `check-*.mjs|cli.mjs` 认,且要求写成赋值形式。\n扫不到的一类(进程内直接调门禁函数)在注释里写明。\n\n出口判据实测:\n- `GOV_REPORT_DIR=\u003ctmp\u003e node --test governance/test/*.test.mjs` → 471 例 470 过 0 失败;\n- 不设变量跑同一套 → 同样 0 失败,且跑前跑后 `reports/*.json` 的 md5 逐份不变、\n `git status --porcelain` 无新增(树上其余脏文件属并行会话)。\n\n无 `chore(reports)` 回绑:本次改动全在 `governance/test/` 下,46 条证据作用域没有一条覆盖它,\n`check:evidence` 的判词不因本提交改变。\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n","url":"https://gitea.g-hi.com/luoanwu/enterprise-platform/commit/7021758cffa830beecc7c0af480bc1943a3e78e8","author":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"committer":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"verification":null,"timestamp":"2026-09-19T00:26:15-07:00","added":[],"removed":[],"modified":["governance/test/check-caddy.test.mjs","governance/test/check-catalog-drift.test.mjs","governance/test/check-evidence-freshness.test.mjs","governance/test/cli.test.mjs","governance/test/deployed-runtime.test.mjs","governance/test/fixture-integrity.test.mjs","governance/test/platform-fixtures.test.mjs","governance/test/port-conformance.test.mjs","governance/test/report-clobber.test.mjs"]},"repository":{"id":116,"owner":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"law@g-hi.com","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"},"name":"enterprise-platform","full_name":"luoanwu/enterprise-platform","description":"","empty":false,"private":false,"fork":false,"template":false,"mirror":false,"size":23460,"language":"","languages_url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/enterprise-platform/languages","html_url":"https://gitea.g-hi.com/luoanwu/enterprise-platform","url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/enterprise-platform","link":"","ssh_url":"git@gitea.g-hi.com:luoanwu/enterprise-platform.git","clone_url":"https://gitea.g-hi.com/luoanwu/enterprise-platform.git","original_url":"","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"branch_count":44,"open_issues_count":0,"open_pr_counter":0,"release_counter":0,"default_branch":"main","archived":false,"created_at":"2026-09-11T07:33:25+08:00","updated_at":"2026-09-19T15:08:49+08:00","archived_at":"1970-01-01T08:00:00+08:00","permissions":{"admin":true,"push":true,"pull":true},"has_code":true,"has_issues":true,"internal_tracker":{"enable_time_tracker":true,"allow_only_contributors_to_track_time":true,"enable_issue_dependencies":true},"has_wiki":true,"has_pull_requests":true,"has_projects":true,"projects_mode":"all","has_releases":true,"has_packages":true,"has_actions":true,"ignore_whitespace_conflicts":false,"allow_merge_commits":true,"allow_rebase":true,"allow_rebase_explicit":true,"allow_squash_merge":true,"allow_fast_forward_only_merge":true,"allow_rebase_update":true,"allow_manual_merge":false,"autodetect_manual_merge":false,"default_delete_branch_after_merge":false,"default_merge_style":"merge","default_allow_maintainer_edit":true,"avatar_url":"","internal":false,"mirror_interval":"","object_format_name":"sha1","mirror_updated":"0001-01-01T00:00:00Z","topics":[],"licenses":[]},"pusher":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"5+luoanwu@noreply.localhost","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"},"sender":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"5+luoanwu@noreply.localhost","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"}}... |