诚信治理守卫套件 + 宪法§23 + construction/造价→财务深度 + 开源 CAD 引擎(LibreCAD/FreeCAD)#51
Open
ActiveInAI wants to merge 27 commits into
Open
诚信治理守卫套件 + 宪法§23 + construction/造价→财务深度 + 开源 CAD 引擎(LibreCAD/FreeCAD)#51ActiveInAI wants to merge 27 commits into
ActiveInAI wants to merge 27 commits into
Conversation
八层栈/16模块注册/数据流/横切机制单图全景 + 自包含 HTML(改 Mermaid 即改图)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
把判断编码成机器门控,诚信不依赖人记得: - check-versions: 文档版本号 ⊆ manifest 真实 pin - check-capability-claims: 静态面无裸就绪断言(宪法§4,两层:就绪词+判定式合规) - check-mock-reality: 假数据须 @data-status:demo 自声明(抗熵) - check-governance: 守卫整套守卫(bus-factor,自指) - check-module-depth: production-ready 须 D1-D8 证据 GOVERNANCE.md 继任手册;均接入 ci.yml Repo guards;正负向实测。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
next 16.2.4→16.2.6 / tailwind 4.2.4→4.3.0 / tanstack 5.99.1→5.99.2; §2 改 baseline/target 分层声明;vLLM 标注为目标默认(实装 hugging_face)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
把隐蔽的 demo 数据变成可 grep 的显式声明,满足 check-mock-reality 守卫, 根治'去 mock 即空态'。不改行为,仅诚信标注。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
production-ready 须 D1-D8 证据全绿,否则只能标 spec-complete/pilot。 construction_management 由无据的 production-ready 降为 spec-complete(真实成就全留), R1 [DEBT:R4] 核销。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
D3: happy/空/评估拒绝/修订有界/§4声称 五路径,离线注入假客户端,CI 收集,5/5。 D4: d4_trace.py 用真实 LLM(nemotron-3-super)跑全链,真实 Evaluator 判 revise, 落 trace 证据。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
后端 GET /v1/projects/{id}/construction/operations(gateway.rs + 迁移 + RLS),
cargo check 通过 + DB live 验证(RLS+handler SQL 返数据)。
前端 typed client + ConstructionOperationsPanel 四态(加载/空/错误/数据)vitest 4/4,
接入 ConstructionControl 替代静态 demo(typecheck 通过)。
HTTP/e2e 组合受本环境限制(沙箱杀监听进程),据实记录。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
单人+AI舰队用可执行门控达组织级工程诚信;以本仓库 9 守卫为可复现证据,含诚实局限。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
把文档↔manifest 版本漂移守卫通用化为 config 驱动的可外用包: core/cli + pyproject(console_scripts)+ README + example + 4 单测(unittest,stdlib)。 publish-ready,未发布(外部发布不可逆,留给作者)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- D2: gateway 契约单测锁定响应 camelCase(occurredAt/evidenceRef),防前端契约漂移 - D6: §4 受保护断言路径单测(已含于 D3 测试集)纳入证据 - D7: 12 真实子域场景过六门控回归 + examples 目录锚点,24/24 - 修 GOVERNANCE.md 触发 terminology 守卫的旧名字面 construction_management 深度账本 7/8 全证;仅余环境阻断的全栈 HTTP/e2e。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PNG: 横切框并入诚信守卫(CI 9道) + construction 标 pilot 7/8 + 页脚加 Fellow 阶梯。 HTML: 新增 ⑨ 诚信治理守卫层(守卫流程图 + 守卫表 + R0-R6 阶梯 + 试点深度证据)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 宪法 22→23 条:新增第23条「对标顶级、力争超越,但超越必须有可验证证据」—— 把'达到/超越 Anthropic/OpenAI/Google/Autodesk/Trimble/...'写为北极星+硬门控, 与 §4/§9/源真既有禁令一致;规模/基础模型等结构不可追平维度不得宣称超越。 - check-capability-claims 加 C 层:拦无据'全面超越/全面替代/世界第一/遥遥领先'; '碾压'=土方回填碾压等 AEC 过载词排除,治理文档排除,9/9 守卫绿。 - cost-to-finance-chain.md:造价→财务'真客户敢报审/结算'攻坚清单(C1-C8 验收判据)。 - C2 落实:finance-posting 新增'不平凭证必检出'测试,9/9 通过。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
绑定 §0.5 DWG/DXF 运行时路线;经 openBIM/DWG 互操作层叠互通,不克隆。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 采用(开源,§4): OCCT(LGPL动态链接)/FreeCAD/IfcOpenShell(LGPL)/LibreCAD·CGAL(GPL,独立进程,同LibreDWG例外) - 对标(闭源,不嵌入): AutoCAD/Autodesk·浩辰/天正·ODA·Parasolid·ACIS,经DWG·openBIM互通 - 硬约束: GPL/AGPL 静态链入分发即违§3,cargo-deny/license-checker 拦截; 隔离边界登记于 06-workers engine_registry(IsolationMode 已核实存在) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- engine_registry: 新增 librecad(GPL-2.0-only · EXTERNAL_PROCESS · copyleft 边界), 给宪法第23条'CAD 引擎采用开源、登记于注册表'对 LibreCAD 落实代码背书。 - test_license_isolation_invariant: 强制 GPL/AGPL 引擎绝不 IN_PROCESS(违§3); 现有 blender/cgal/librecad/dwg/mupdf/siyuan 全部合规,2/2 + 23/23 绿。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- librecad_worker: 调 LibreCAD 控制台 dxf2pdf/dxf2png,EXTERNAL_PROCESS 子进程; 缺二进制优雅 blocked(adapter_not_configured),与 freecad/cgal 同模式。 - worker_cli: 注册 DISPATCH['librecad'] + production_self_check;DISPATCH⊆ENGINE_POLICIES 成立。 - test_librecad_worker: 登记/隔离/优雅 blocked 3/3;回归 25/25。 宪法第23条'CAD 引擎采用开源'对 LibreCAD 从策略登记 → 可派发 adapter,落实代码背书。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- freecad_worker: 输出格式增 iges/igs(Import.export)+ brep(Part.export),补 media-type。 - test_freecad_formats: 脚本生成/格式/media-type/缺二进制 blocked 4/4;回归 36/36。 延续开源 CAD 互操作(§23):FreeCAD LGPL 动态链接,几何交换不依赖闭源内核。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
监听式 e2e 受沙箱限制(进程绑端口即被杀 exit 144)。改用不开 socket 的 #[tokio::test]: 连真库 :5433 → set_config 设租户(RLS)→ INSERT WITH CHECK → handler 原样 SQL 经真实 sqlx::FromRow 映射 → serde camelCase → ROLLBACK。SQL+RLS+类型+serde 全链真验证,可重复, 无 DB 时优雅跳过。唯 axum socket 传输层(框架保证)受沙箱未观测,据实标注。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
复用 construction D2 的非监听验证模式到战略最深链:cost_voucher_drafts handler 原样 SQL 对真库 :5433 跑通 —— 设租户(RLS)→ INSERT handed_off 移交凭证(entries jsonb)→ sqlx::FromRow 映射 → serde camelCase。证明'造价移交→财务读取'数据路径+RLS+契约真实。 剩:写入半 bridge round-trip + axum socket(沙箱阻断)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
造价审定→草稿生成的生产同款 upsert 跑两次(同 key 改金额)→ 断言 1 行+取最新 = 重生成幂等(不产生重复凭证)。C1 写入半+读取半数据路径均 live 真验证;唯 socket 受沙箱阻断。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- finance-chart-of-accounts.test: 资产借方/负债贷方正确性、classify↔lookup 一致、未知科目不臆造、编码唯一(4) - quantity-costing-finance-bridge: 导出 applyTailDifference + 直接单测两模式再平衡(fixed_account 加调整分录 / largest_entry 调最大借方 / 尾差0原样)(+4, 共11) - C2 据实升 [x](借贷恒等+试算平衡+不平检出+科目映射+尾差全维度);端到端见 C1。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… + round-trip 测试 #3 price-snapshots live-DB round-trip 揪出真生产 bug:QuantityCostingPriceSnapshotRecord 缺 #[serde(rename_all=camelCase)],发 snake_case;前端 api.ts QuantityCostingPriceSnapshot 按 camelCase(snapshotKey/priceDate/sourceVerified/resourceCount)读 → 拿到 undefined。 补 rename_all 对齐前端+全代码库惯例;新增 round-trip 测试断言 camelCase 且无 snake 残留(修前会红)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ml — CI 会误红 config/local.* 被 .gitignore,CI/全新 checkout 无此文件 → 推理 baseline 断言(default_engine) 读不到 → 误判漂移。修:config 缺失时跳过 baseline 断言,ARCHITECTURE.md 文档诚信标注始终校验。 worktree(=CI 环境)9/9 全绿;主仓(有 local.toml)baseline 仍真校验。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
price-snapshots round-trip 揪出的契约 bug 是一类系统问题:审计 gateway.rs 全部 Serialize 响应结构体,前端 api.ts 统一 camelCase。补 rename_all 到 14 个确认 camel 消费的响应结构体 (QuantityCosting* 13 + ComplianceFindingRecord);全 bin 测试 45 passed 无回归 + 2 契约单测。 请求体(AgentInvokeRequest 等前端 SEND snake)正确保持不动;Semantic/Naming/Project/Boq/Bim 待逐个核实前端后再修。审计见 depth-evidence/api-casing-audit.md。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nake(审计闭合) 逐个核实前端消费后修 7 个 camel 响应:ProjectRecord/BoqItemRecord/SemanticCategoryRecord(+Response)/ ComponentNamingRuleRecord(+Response)/BimUploadQueuedResponse + 2 契约单测;全 bin 47 passed 无回归。 关键克制:RagRetrieveResponse 被 Python orchestrator(tool_router.py)按 snake 读取, 加 camelCase 会破坏跨语言 RAG 契约(Rust 测试抓不到)→ 保持 snake 并注释钉死。 gateway.rs 全部响应结构体审计闭合:22 补 camel + 1 跨语言保持 snake。见 api-casing-audit.md。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
深挖 round-trip 数据路径 → 系统审计 migrations:115 张含 tenant_id 的表里 61 张缺 ENABLE+FORCE+POLICY RLS(audit_events/module_transactions/conversion_jobs/全部9阶段BOM表等), 跨租户无行级隔离,违§17。顺带揪出 doc-vs-impl 诚信缺口:CHANGELOG 称 BOM 表有 RLS 但 migration 实际没加。 - check-rls.py 守卫:新增租户表必须自带 RLS(负向实测拦截);61 历史表记债 allowlist(核销后 stale 检测强制移除)。 - 不盲改:盲加 FORCE RLS 会 deny-all 崩业务流;修复需逐表确认租户上下文 + 实栈冒烟,见 rls-coverage-audit.md。 - 接入 ci.yml + GOVERNANCE.md,10 道守卫全绿。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
概要
把「判断编码为可执行门控」(Harness Engineering)从理念落成 17 个 commit 的可验证资产:9 道 CI 诚信守卫、宪法第 23 条(对标顶级+力争超越的证据门控)、construction_management 深度据实评定、造价→财务攻坚清单、以及开源 CAD 引擎(LibreCAD/FreeCAD)的真实登记与 adapter。核心原则:任何地方不造假——能在本环境验证的全部验证,不能的据实标注为环境阻断。
一、诚信治理守卫套件(9 道 · CI Repo guards)
check-versions:文档版本号 ⊆ manifest 真实 pin(修了 next/tailwind/tanstack 漂移)check-capability-claims:静态面无裸就绪断言(§4)+ 判定式「合规」+ C 层拦无据「全面超越」(§23);AEC 过载词(碾压=土方回填碾压)排除,零误报check-mock-reality:假数据须@data-status: demo自声明(12 组件已标注)check-governance:守卫整套守卫(bus-factor,自指)check-module-depth:production-ready须 D1–D8 证据每道含正负向实测;
scripts/GOVERNANCE.md为继任手册。二、宪法第 23 条(22→23 条)
对标 Anthropic/OpenAI/Google/Autodesk/Trimble/Tekla/CAD/… 写为北极星 + 硬证据门控:超越须具名维度可复现基准证据,规模/基础模型等结构不可追平维度不得宣称;CAD/几何引擎采用开源(按许可隔离),闭源仅对标互通。
三、construction_management 深度(据实 production-ready→spec-complete→pilot,7/8 实证)
D1 注册 / D3 六门控 pytest(5) / D4 真实模型(nemotron-3-super)trace / D5 三态 UI+单测+接线 / D6 §4 单测 / D7 12 子域场景回归(24) / D8 零挂账 全部落证;D2 后端端点(编译+DB live+契约单测)。唯全栈 HTTP/Playwright e2e 受沙箱限制(杀监听进程),据实留待沙箱外验证,未冒称 production-ready。
四、造价→财务攻坚清单 + C2 起步
cost-to-finance-chain.mdC1–C8 验收判据(含「真客户敢报审/结算」硬判据);C2 新增「不平凭证必检出」测试,finance-posting 9/9。五、开源 CAD 引擎(§23 落实)
验证
本地全绿:9 守卫 · 后端 pytest(construction 29 + workers 36)· 前端 vitest(三态 4 + finance 9)· Rust
cargo build+契约单测 ·tsc仅余 1 个既存(非本 PR)WebGpuCheck 错误。诚实边界(环境阻断,非代码)
🤖 Generated with Claude Code