Repository navigation
三仓根因修复第二轮:媒体 0.4.5 草稿导出/出站单点/可解释排序 + 法律审批绑定/利冲政策/跨事项 provenance + crabcopyright 3.9 CI - #26
Merged
Conversation
…ternalRelease 字符串不再自证(三仓根因修复 P-L1-c / P-L2-b / P-L2-c) RC-22 审批绑定:run-manifest 新增 append-only `reviewDecisions[]`,每条绑定一枚由磁盘字节 重算的依赖 digest(documents + sources + artifacts,排除 review-item);`validate_run.py` 对 `reviewState=lawyer-reviewed` / `externalRelease=approved` 要求存在仍有效的决定,旧 manifest 只有字符串 ⇒ 校验失败(§11.2 缺证据降为待核);`sync_run_manifest.py` 检测到文档/ 来源变化即把两字段降为 not-ready / prohibited 并登记 blockingReasons,决定历史原样保留。 RC-23 送审边界:新脚本 `finalize_run.py status | record | gate`,唯一的送审/外发入口;record 在 .writer.lock 内完成重算 → strict 校验 → 复核队列前置(决定的真人来源)→ 决定人 = 复核人 → 决定人 ∈ allowedUsers/reviewOwner/responsibleLawyer → 追加决定 → 原子写回。退出码 2/3/4/5/6/7/10。 RC-20 律师政策:随包 `conflict-policy.json`(默认三种 relation 一律 lawyer-review-required, 律所可在 store 根覆盖并签发)+ schema;bootstrap 在建目录前加载(坏政策 ⇒ 11,不建目录), 命中按政策分流 hits / informationalHits,政策 digest 绑进 conflict-check,政策变了必须重跑。 RC-21 扩大检查:来源记录 matterId 必须等于当前事项,跨事项来源必须带 `importedFrom` 且经 permissions.crossMatterAccess 授权、未过期;全部 run 载荷(含 case-comparison 列表)matterId / runId 归属一致。 闸门(主控亲跑,Windows / Python 3.11 / bun 1.3.11):`bun test ./tests/crablaw-cn/` 57 pass / 0 fail(新增 matter-release-binding 20 条 + matter-policy-provenance 9 条);篡改对照:注释掉 externalRelease 绑定检查 ⇒ T36 红;排除 review-item 置空 ⇒ 3 红;注释掉政策 digest 比对 ⇒ 用例 4 红;三处还原后全绿。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SckZkZw7wdyWSAFWNQFvLJ
…/c/d) RC-14 单人可达终态:新工具 `mediaops.delivery.export_draft`,任意 stage 的 v2 修订都能导出可打开的 HTML / Markdown / 微信片段,三份文件都带可见「未批准」提示;产物落 `<data>/draft-exports/`、记录进 `draft-exports` 集合,与 delivery-candidates / delivery-manifests 结构隔离,preview / readiness / approval / package 零改动、看不见草稿;manifest 钉 `releaseStatus=unapproved` / `qaLevel=none`, 如实列出 research / originalityScan / editorialReview / profile(manual-import 也是答案) 的绑定 状态与 Media Gate 的 blockers;素材权利 pending 放行并登记。草稿导出归服务执行体(renderer 角色, `.mcp.json` 字节不变)。`renderArticle` / `RENDER_CONTRACT` 不动。 RC-16 出站安全单点:新 `src/outbound.ts`(DNS 审查 + 钉 IP 拨号 + 连接后地址复核 + 重定向/体积/ 超时/MIME 限制 + 可注入 resolver/dialer),research.capture 与全部 feed(含内置 HackerNews)改走 它;feed 的 HTTPS allowlist 保留。篡改对照证明:改回裸 fetch 时进程真的向 127.0.0.1 发起了连接。 RC-15 热点:稳定 ID(源端键 → 规范 URL 哈希 → 位置)、publishedAt 缺失/裸数字置 null 不补造、 rawScore/scoreUnit/sourceRank 保留;跨源排序改为可解释流水线(查询匹配 → 时效桶 fresh/unknown/ aged → 源内 rank 交错),重复事件分组复用 cluster 的相似度实现,每条信号带 ranking.reasons; 中文热点源只做「未配置」披露(capabilities / doctor / trends 三处)与 `region:'cn'` + authorization 登记契约,不建抓取平台。 分发:版本 0.4.5(package / plugin.json / marketplace / README / SBOM),dist 重建,工具 38 → 39, `check:distribution` toolCount 39;restore-inventory 闸门改为「版本单调向前 + 三处版本互相一致 + `.mcp.json` 字节不变」,证据文件本身不改写。 闸门(主控亲跑,Windows / bun 1.3.11):`bun run typecheck` 0;`bun run test` 156–157 pass,红只有 Windows 既存 4 条(package EPERM fsync ×3、storage EBUSY rm)+ 偶发的 delivery-candidates rename EPERM 争用(单跑绿);`bun run validate` 零错误;`check:distribution` passed/39。插件根: presentation-completeness / validators / analysis / references / ci-trigger-policy / crablaw-cn / crabaccount 合跑 208 pass / 0 fail。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SckZkZw7wdyWSAFWNQFvLJ
…x 20251230(需 ≥3.10),0.11.8 钉 20251107 仍支持 3.9
此前 `crabcopyright-plugin` 的 3.9 × {ubuntu, macos} 两腿自 pdfminer.six 20251230 发布后恒红
(`Requires-Python: >=3.10`),main 的 CI 绿判据被这条既存漂移吃掉。改用 pip 环境标记在同一条
install 里按 python_version 选 0.11.9 / 0.11.8,两腿跑同一套强 PDF 闸门;未删任何矩阵项。
本机 3.11 下 `pip download` 实测只选中 0.11.9(标记语法有效)。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SckZkZw7wdyWSAFWNQFvLJ
…edIndexedAccess 把数组下标判为可能 undefined Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SckZkZw7wdyWSAFWNQFvLJ
acosmi-fushihua
deleted the
fix/2026-09-12-three-repo-remediation-r2
branch
September 12, 2026 14:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
「三仓根因修复统一实施方案 v2.1」(真源在私有源码仓)第二轮:媒体线 P-M1-b/c/d + P-M2(0.4.5)、法律线 P-L1-c / P-L2-b 其余 / P-L2-c,以及一项 CI 卫生修复。基线
99fa5c4(main,= 镜像 latest)。首轮为 PR #25。裁决(主控)
draft-exports/目录 +draft-exports集合),正式链 preview / readiness / approval / package 零改动,在构造上看不见草稿;三份导出文件都带可见「未批准」提示;renderArticle/RENDER_CONTRACT不动。src/outbound.ts:capture 与全部 feed(含内置 HackerNews)共用 DNS 审查 + 钉 IP 拨号 + 连接后地址复核 + 重定向/体积/超时/MIME 限制。reviewDecisions[]append-only,各绑定一枚由磁盘字节重算的依赖 digest;reviewState/externalRelease字符串不再自证;sync 检测到变化即降级、历史保留;finalize_run.py status | record | gate是唯一送审/外发入口,决定的真人来源是复核队列条目,决定人 = 复核人 ∈ allowedUsers/reviewOwner/responsibleLawyer。importedFrom且经crossMatterAccess授权。crabcopyright3.9 腿:pdfplumber 0.11.9 硬钉 pdfminer.six 20251230(需 ≥3.10),改用 pip 环境标记在 3.9 上钉 0.11.8(20251107 仍支持 3.9),两腿同一套闸门。证据(主控亲跑,Windows / bun 1.3.11 / Python 3.11)
bun run typecheck0;bun run test156–157 pass,红只有 Windows 既存 4 条(packageEPERM fsync×3、storageEBUSY rm)+ 偶发 delivery-candidates rename EPERM 争用(单跑绿);bun run validate零错误;check:distributionpassed / toolCount 39。bun test ./tests/crablaw-cn/57 pass / 0 fail(新增 29 条)。.mcp.json解析 env):见评论。未验证
test:qa(Chromium/Nu)由 CImedia-ops-pluginjob 跑。🤖 Generated with Claude Code
https://claude.ai/code/session_01SckZkZw7wdyWSAFWNQFvLJ