| event_payload |
{"action":"synchronized","numb {"action":"synchronized","number":17,"pull_request":{"id":234,"url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system/pulls/17","number":17,"user":{"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"},"title":"feat(contracts): P1 前置片——CHG-061 三条 HR 事实的载荷与信封 Schema,V-04 放宽来源域(PKG-004)","body":"\u003e **叠在 #13 之上,请先合 #13。** 本 PR 自身只有最后 2 个提交:`7faad2a`(P1 前置片)与 `19128ad`(报告回绑);其余提交属 #13。#13 合入后这里的差异会只剩这两项。\r\n\r\n## 内容(对接蓝图 §4.15,P1 / H5)\r\n\r\n- **contracts**(`packages/contracts/src/enterprise-fact.ts`,台账 PKG-004)\r\n - 新增 `organizationCanonicalIdSchema`(`org_`)。\r\n - 新增 `EmploymentStarted`、`EmploymentTerminated`、`OrganizationUnitStatusChanged` v1 的载荷 Schema,逐字段对应 04 `contracts/schemas/facts/*.v1.json`(CHG-061)。\r\n - 新增三份信封 Schema,固定事实类型、实体(Employment / Organization)、来源域(hr / organization)与 `juhai.hr`。另加生产侧交叉约束:\r\n - 载荷里的实体 ID 必须等于 `entity_id`;\r\n - 组织事实的 `valid_from` 必须等于 `effective_at`;\r\n - `change_kind` 与 `state_after` 必须一致。\r\n - V-04:Intent 记录的 `sourceDomain` 放宽为 `hr` / `organization`,具体取值仍由注册表里的信封 Schema 收紧。\r\n- **刻意不做**:出站注册表、`facts.owns`、生效事务写 Intent。原因是 `check:app-manifest` M6 只认 pinned `@juhai/contracts` 的 Catalog,而含 CHG-061 的版本尚未发布(Registry 最新是 rc.7,Catalog 只有 11 条)。为此起草了给 04 的发版请求:`docs/domain/request-draft-04-contracts-release-chg061-2026-10-28.md`,未转交。\r\n- **另受阻断**:`OrganizationUnitMoved` 受 Catalog Q5 阻断。`unit_type` 是必填项,但 HR 组织没有类型字段,词表要等 02 定。\r\n- **文档**:蓝图 §4.15 与 H5 / P1 行、CLAUDE.md G23、CHG 草案的实现进度。\r\n\r\n## 验证(本地,报告绑定 `7faad2a`、clean)\r\n\r\n- contracts 223/223(enterprise-fact 共 20 例,其中新增 8 例)。\r\n- 4 个变异探针各使 1 例判红:分别去掉实体 ID 一致、状态一致、`valid_from` 一致三条约束,以及回退 V-04。\r\n- `check:d3` 通过;去掉 PKG-004 后判红(6 项)。\r\n- `check:app-manifest` 14/14,`check:contract-consumers`、`check:validation`、`check:naming`、lint、typecheck 通过。\r\n- `check:runtime` 470/470、`check:ui` 46/46,用一次性 PostgreSQL / Redis,跑完已删。\r\n- 静态链如实停在 O22(OS main 尚无 0.19.6),`check:governance` 只剩 O22。\r\n- 远端 CI 见本页。\r\n\r\n🤖 Generated with [Claude Code](https://claude.com/claude-code)","labels":[],"milestone":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_reviewers_teams":[],"state":"open","draft":false,"is_locked":false,"comments":0,"additions":586,"deletions":188,"changed_files":36,"html_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system/pulls/17","diff_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system/pulls/17.diff","patch_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system/pulls/17.patch","mergeable":false,"merged":false,"merged_at":null,"merge_commit_sha":null,"merged_by":null,"allow_maintainer_edit":false,"base":{"label":"main","ref":"main","sha":"66f2c92a78aa66944a048aa02fb288de2ce2a6a2","repo_id":83,"repo":{"id":83,"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":"juhai-ai-hr-system","full_name":"luoanwu/juhai-ai-hr-system","description":"巨嗨 AI 人事系统:受治理全栈基础框架","empty":false,"private":false,"fork":false,"template":false,"mirror":false,"size":19255,"language":"","languages_url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/juhai-ai-hr-system/languages","html_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system","url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/juhai-ai-hr-system","link":"","ssh_url":"git@gitea.g-hi.com:luoanwu/juhai-ai-hr-system.git","clone_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system.git","original_url":"","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"branch_count":11,"open_issues_count":0,"open_pr_counter":6,"release_counter":0,"default_branch":"main","archived":false,"created_at":"2026-08-26T09:35:18+08:00","updated_at":"2026-10-28T20:27:37+08:00","archived_at":"1970-01-01T08:00:00+08:00","permissions":{"admin":false,"push":false,"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":[]}},"head":{"label":"claude/hr-p1-fact-contracts-20261028","ref":"claude/hr-p1-fact-contracts-20261028","sha":"9b967eef931e938e222311235385d2e9844edd50","repo_id":83,"repo":{"id":83,"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":"juhai-ai-hr-system","full_name":"luoanwu/juhai-ai-hr-system","description":"巨嗨 AI 人事系统:受治理全栈基础框架","empty":false,"private":false,"fork":false,"template":false,"mirror":false,"size":19255,"language":"","languages_url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/juhai-ai-hr-system/languages","html_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system","url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/juhai-ai-hr-system","link":"","ssh_url":"git@gitea.g-hi.com:luoanwu/juhai-ai-hr-system.git","clone_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system.git","original_url":"","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"branch_count":11,"open_issues_count":0,"open_pr_counter":6,"release_counter":0,"default_branch":"main","archived":false,"created_at":"2026-08-26T09:35:18+08:00","updated_at":"2026-10-28T20:27:37+08:00","archived_at":"1970-01-01T08:00:00+08:00","permissions":{"admin":false,"push":false,"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":[]}},"merge_base":"66f2c92a78aa66944a048aa02fb288de2ce2a6a2","due_date":null,"created_at":"2026-10-28T10:14:41+08:00","updated_at":"2026-10-28T20:41:35+08:00","closed_at":null,"pin_order":0},"requested_reviewer":null,"repository":{"id":83,"owner":{"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"},"name":"juhai-ai-hr-system","full_name":"luoanwu/juhai-ai-hr-system","description":"巨嗨 AI 人事系统:受治理全栈基础框架","empty":false,"private":false,"fork":false,"template":false,"mirror":false,"size":19255,"language":"","languages_url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/juhai-ai-hr-system/languages","html_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system","url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/juhai-ai-hr-system","link":"","ssh_url":"git@gitea.g-hi.com:luoanwu/juhai-ai-hr-system.git","clone_url":"https://gitea.g-hi.com/luoanwu/juhai-ai-hr-system.git","original_url":"","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"branch_count":11,"open_issues_count":0,"open_pr_counter":6,"release_counter":0,"default_branch":"main","archived":false,"created_at":"2026-08-26T09:35:18+08:00","updated_at":"2026-10-28T20:27:37+08:00","archived_at":"1970-01-01T08:00:00+08:00","permissions":{"admin":false,"push":false,"pull":false},"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":[]},"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"},"commit_id":"","review":null}... |