Commit Graph
689 Commits
Author SHA1 Message Date
cflmy b43f104984 feat(impact): recursive candidate impact analysis over the union graph
ci/woodpecker/push/eco Pipeline failed
ci/woodpecker/pr/eco Pipeline failed
Implement the ECO-02 impact contract: compare the recursively expanded
(global_id, parent, remote, SHA, state) identities of an accepted root commit
and a candidate, expand domain gitlink changes to child identities, close over
the reverse requires graph built from the union of both revisions, add parent
domains, then reach a fixed point over checks_with. An unexpandable domain is
reported UNVERIFIED and widens the affected set to the full candidate instead of
skipping (--fail-on-unverified makes it fatal).

integration.sh runs it against the accepted root ref (PR target branch or
origin/main) and records changed/affected/checks_with/fallback in the candidate
evidence JSON. Five contract tests build real temporary Git repositories,
including a domain gitlink change and the conservative fallback.

Refs cflmy/marqdo#7
2026-11-27 01:55:03 +08:00
cflmy f4e292e7b0 fix(integration): scope the CLI target directory to the CLI build
ci/woodpecker/pr/eco Pipeline was successful
ci/woodpecker/push/eco Pipeline was canceled
The exported CARGO_TARGET_DIR leaked into the consumer repositories, so View's
package script built into the CLI target directory and then failed to find its
own release binary. Only the pinned CLI build names that target directory.
2026-11-27 01:40:57 +08:00
cflmy e7324edc0f candidate: pin the merged CLI Phase B commit
ci/woodpecker/push/eco Pipeline is pending
ci/woodpecker/pr/eco Pipeline failed
CLI PR #17 was fast-forward merged; the root candidate now pins the accepted
CLI Phase B commit (the earlier candidate commit plus the CI-only contract-lane
and Bundle-materialization fixes). Evidence updated with the merged identity.

Refs cflmy/marqdo#9, cflmy/marqdo-cli#11
2026-11-27 01:32:53 +08:00
cflmy c190ffb184 fix(integration): build the pinned CLI into its own target directory
ci/woodpecker/push/eco Pipeline failed
ci/woodpecker/pr/eco Pipeline was canceled
The release packager resolves both binaries from the CLI checkout's target
directory, so the candidate build must happen there; the previous external
CARGO_TARGET_DIR left the package step with no release binary. Keeps one build
and one artifact identity.
2026-11-27 01:22:13 +08:00
cflmy 380d4f95a3 candidate: pin CLI Phase B and derive every artifact from the root candidate
ci/woodpecker/push/eco Pipeline failed
ci/woodpecker/pr/eco Pipeline failed
M3 candidate for cflmy/marqdo#9: the root cli gitlink now points at the CLI
Phase B commit that removed the in-repo stdlib sources and pinned the accepted
ecosystem Bundle.

scripts/integration.sh no longer takes a CLI artifact from View's frozen RC.4
script. One candidate derives every input: the root-owned Bundle producer
assembles the Bundle from pinned gitlinks, the CLI and Worker are built from the
pinned cli commit, the release archive is packaged with --stdlib-dir, and
Conformance/View/Knowledge/Prove/Lint plus acceptance-stdlib all use that same
installed binary and adjacent Bundle. Evidence records the exact identities.

Composition gains the print-format equivalence fixture (moved from the CLI) and
a pure-mode Table case; the root acceptance compares stdout line pairs so the
official print/打印 aliases must produce identical formatting.

Refs cflmy/marqdo#9, cflmy/marqdo-cli#11
2026-11-27 01:07:31 +08:00
cflmy 48189243f7 fix(acceptance): pass the explicit negative-gate environment
ci/woodpecker/pr/eco Pipeline was successful
ci/woodpecker/push/eco Pipeline was successful
The fail-closed gates must run with MARQDO_STDLIB_DIR explicitly pointed at a
missing or tampered Bundle; inheriting the caller environment let a CLI with an
adjacent valid Bundle fall back and made the missing-bundle negative pass.
Reproduced with an installed CLI that has stdlib/ next to the binary.

Refs cflmy/marqdo#9
2026-11-27 00:26:57 +08:00
cflmy 4fade3e981 candidate: pin the explicit-package extensions and gate their consumption
ci/woodpecker/push/eco Pipeline was canceled
ci/woodpecker/pr/eco Pipeline failed
Pin ext-http/ext-regex/ext-archive at the merged explicit-Package candidates
(they stay planned, never join the default Bundle) and extend the root
acceptance gate to run any extension checkout that publishes the current
package layout (marqdo.yaml + index.mq.md + scripts/test.sh). Record the actual
package-entry decision in the ledger and evidence: the three domain modules are
consumed through the public @alias import after marqdo lock, with the original
domain tests and baseline terminal values preserved.

Refs cflmy/marqdo#9
2026-11-27 00:10:11 +08:00
cflmy 0c7430ede0 docs: record the stdlib M2 candidate identity, gates and unverified scope
Evidence for the pinned six-component candidate: two byte-identical Bundle
builds (0.2.0, tree digest sha256:db9055...), both verified CLI identities,
component entries, cross-repository composition (including byte-equal Table
split), fail-closed negatives, adjacent offline install and deterministic CLI
packaging. The file explicitly keeps the unchanged main combination, the
existing consumer gates, CLI Phase B and the ext migrations as UNVERIFIED.

Refs cflmy/marqdo#9
2026-11-26 23:51:22 +08:00
cflmy 8fa728b302 candidate: pin the six migrated stdlib components and activate their entries
M2 candidate for cflmy/marqdo#9: pin std-text/std-system/std-io/std-fs/
std-data/std-collections at the exact receiving-repo candidate commits,
activate them in the root catalog with their own scripts/test.sh entry, and
extend integration.sh with the root acceptance-stdlib gate.

The previous requires arrays were design inputs, not real dependencies: the
migrated modules import only CLI language/host builtins and same-repository
siblings, so every active stdlib component now requires only cli (the Table
pair also declares the coordinated checks_with). core/encoding/net stay planned
and do not join the Bundle.
2026-11-26 23:47:57 +08:00
cflmy 7475c79cb2 migration: freeze the stdlib relocation ledger and add the unique Bundle producer
ci/woodpecker/pr/eco Pipeline was successful
ci/woodpecker/push/eco Pipeline was successful
M0 of cflmy/marqdo#9: the root ledger now records the verified baseline, the
151 public functions of the 20 pre-migration modules, the frozen Bundle-root
paths, the test/assertion ownership and the decisions that replace the earlier
path-plan (which would have changed public std: imports). Nine receiving-repo
sub-issues are linked.

One producer owns Bundle composition from the exact component gitlinks
(scripts/build-stdlib.py + scripts/stdlib-bundle.json): it publishes only
modules/**/*.mq.md of active stdlib components, rejects symlinks, submodules,
case/NFC collisions, tests/ and unsafe paths, generates the current
stdlib.json digest and requires an explicit version bump when content changes.

scripts/acceptance-stdlib.py is the root composition gate with explicit
--cli/--bundle inputs: it verifies the manifest independently, runs each active
component entry, runs the cross-repository composition fixtures (official
aliases, Table split, default-Bundle smoke), enforces fail-closed negatives and
optionally proves deterministic packaging with the CLI packer.

Contract tests build real temporary Git repositories and cover the gitlink
identity path, determinism, all rejection cases and the explicit version bump.

Refs cflmy/marqdo#9
2026-11-26 23:44:17 +08:00
cflmy 484cb10d66 Merge pull request '将组件占位目录替换为独立仓库的 Git 子模块' (#8) from codex/link-component-repositories into main
ci/woodpecker/push/eco Pipeline was successful
2026-11-26 19:12:51 +08:00
cflmy 8f842a7f08 ci: retry verified package indexes before ecosystem tests
ci/woodpecker/push/eco Pipeline was canceled
ci/woodpecker/pr/eco Pipeline was successful
2026-11-26 19:06:30 +08:00
cflmy 5798999691 fix: mount component directories as real Git submodules
ci/woodpecker/push/eco Pipeline is pending
ci/woodpecker/pr/eco Pipeline failed
2026-11-26 18:55:00 +08:00
cflmy 7aac052149 fix(layout): handle submodule sections whose name differs from path
ci/woodpecker/push/eco Pipeline was successful
The duplicate-settings guard compared the section field dict with a set
and could raise TypeError instead of reporting the real configuration
error. Compare sets and add a fixture accepting a section name that
differs from its path.
2026-11-26 17:28:13 +08:00
cflmy f08ec00dec feat(layout): validate domain aggregates and recursive governance
ci/woodpecker/push/eco Pipeline failed
Implement the G01/G02 governance checks of ADR 0001 section 4:

- accept the single `kind = "domain"` role (release none/base, empty
  requires, root-level extensions/<id> or stdlib path) while keeping the
  existing root-layer rules for direct components;
- with `--checkouts`, expand every active domain at its pinned gitlink,
  read that commit's own components.toml/.gitmodules, validate its
  gitlinks, remotes, HEAD/dirty state and entries, and refuse a third
  gitlink level or implementation files in aggregate layers;
- flatten the recursive tree into one in-memory global graph: unique
  ids/remotes, active-never-depends-on-planned, requires DAG acyclic,
  checks_with cycles allowed, stdlib/core/tool dependency boundaries and
  requires never targeting a domain;
- structured failures name the responsible label/path and never skip
  unverified layers silently. Existing six-component tree passes both
  modes; 44 integration tests cover positive and negative nested Git
  fixtures without network access.
2026-11-26 17:18:30 +08:00
cflmy 198b3acc86 docs: adopt hierarchical ecosystem governance and Web domain contract
Replace the flat, one-level submodule policy with the bounded tree
root -> domain aggregate -> component (at most two gitlink levels) and
introduce the single `kind = "domain"` governance role.

- Merge the approved architecture rules into ARCHITECTURE, DEVELOPMENT,
  MIGRATION, REPOSITORY-TASKS, AGENTS and components.toml; keep the full
  implementation spec as ADR 0001 (historical input, not a second
  current authority).
- Register `web` as a planned domain at extensions/web; child records
  live in marqdo-ext-web's own components.toml, never duplicated in the
  root catalog. No placeholder gitlink or fake active entry is created.
- Point the Web domain at the single authoritative contract
  marqdo-ext-web docs/WEB-DESIGN.md; Design and Preview stay planned
  until they have real entries and same-candidate evidence.
- Create the marqdo-ext-web, marqdo-web-design and marqdo-web-preview
  repositories (docs/contracts/issues only) and update the migration
  ledger, task list, extension index and issue/PR templates.
2026-11-26 17:18:14 +08:00
cflmy c5415d5bc5 Merge pull request '补齐 Marqdo 项目说明和独立仓库目录' (#5) from codex/readme-component-directory into main
ci/woodpecker/push/eco Pipeline was successful
2026-11-26 15:10:10 +08:00
cflmy 8c1ec4c91e docs: explain Marqdo and index independent component repositories
ci/woodpecker/push/eco Pipeline was canceled
ci/woodpecker/pr/eco Pipeline was successful
2026-11-26 14:54:11 +08:00
cflmy 451000e9ad Merge pull request '记录独立官网与 VS Code 仓库及维护边界' (#4) from codex/consumer-repositories into main
ci/woodpecker/push/eco Pipeline was successful
2026-11-26 14:08:33 +08:00
cflmy b4395416fd docs: route website and VS Code work to independent repositories
ci/woodpecker/push/eco Pipeline is pending
ci/woodpecker/pr/eco Pipeline was successful
2026-11-26 13:55:59 +08:00
cflmy cbbd819370 Merge pull request '重构 Marqdo 为生态集成主仓库' (#1) from codex/ecosystem-restructure into main
ci/woodpecker/push/eco Pipeline was canceled
2026-11-26 13:46:20 +08:00
cflmy ad52612355 ci: use existing runner images for ecosystem checks
ci/woodpecker/push/eco Pipeline was successful
ci/woodpecker/pr/eco Pipeline was successful
2026-11-26 13:29:02 +08:00
cflmy 024d803494 test: verify installed View execution and document migration work
ci/woodpecker/pr/eco Pipeline was canceled
ci/woodpecker/push/eco Pipeline was canceled
2026-11-26 13:25:35 +08:00
cflmy 4c5c102593 refactor: convert Marqdo into the ecosystem integration repository
ci/woodpecker/pr/eco Pipeline was canceled
ci/woodpecker/push/eco Pipeline was canceled
2026-11-26 13:19:26 +08:00
cflmy 1c55baabd5 docs: point new development at the split marqdo-cli repository
executable-knowledge / gate (push) Canceled after 0s
Marqdo functionality is developed across multiple repositories because the
language runtime/CLI, public protocols and independent tools have separate
architectures and version axes. This repository remains the historical v2 line;
the README now names cflmy/marqdo-cli as the current implementation, release
and developer entry point, states that the v2 syntax/package/plugin ABI is not
compatible with it (no legacy execution path), and links the independent
extension conformance repository.
2026-11-22 02:56:21 +08:00
cflmy ffe06d7afa release(2.9.1): keep knowledge in the core compiler
sema::ir always emits proof-index.json and proof-obligations.json through
knowledge, so gating that module on the cli feature broke library consumers
built with --no-default-features (E0433). knowledge is now part of the core
compiler; the CLI binary keeps required-features = ["cli"].

Add a feature-matrix CI gate for the no-feature, cli-only and default
configurations, retire the completed one-time v2.9.0 promotion workflow, and
record the reviewed bilingual 2.9.1 notes and version metadata.
v2.9.1
2026-11-18 18:48:47 +08:00
cflmy 180a111799 feat: Marqdo v2.9.0 Verified Knowledge Compiler (full release candidate)
Unified source-verified contracts, accurate evidence grades and independently replayable Lean certificates; version sync, bilingual notes and guarded full release CI. Preserve native AI extension updates from main.
v2.9.0
2026-11-18 17:12:07 +08:00
cflmy a3948dbe0d ci: remove temporary extension validation trigger ext-v2.8.1 2026-11-18 14:53:54 +08:00
cflmy 24959a0ba8 fix: validate Windows extension packs with 7-Zip 2026-11-18 14:40:07 +08:00
cflmyandCursor afbb9f191c ci: retrigger EK for ext-v2.8.1 release gate
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 13:41:29 +08:00
cflmy 8db699191e release(ext-2.8.1): AI durable workflow pack with Windows packaging fixes 2026-11-18 13:37:02 +08:00
cflmy e5580d9640 release(ext-2.8.3): use Windows System32 tar for pack ZIP encoding 2026-11-18 13:25:09 +08:00
cflmy 9ce2ae1037 release(ext-2.8.2): fix Windows packs.ci root and ship AI durable workflow 2026-11-18 13:08:59 +08:00
cflmy 166b01c86b release(ext-2.8.1): AI native durable workflow pack notes and VERSION 2026-11-18 12:41:57 +08:00
cflmyandCursor 87cfe05095 docs(next): add 014 knowledge-anchor compilation direction
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 12:40:41 +08:00
cflmy b37387e6da Merge native AI flow workflow into main
Integrate the v2.8.0-based native agent workflow branch:
- durable open/next/inspect/list/commit/cancel step state with resume_dir isolation
- verified small-model choices, scoped context and bounded parallel recovery
- failed-only read-only retry through the Agent ABI plugin
- offline interpreter fixtures, contract checks and focused CI gates
2026-11-18 12:33:54 +08:00
cflmy 895752a1fd Merge v2.8.0 into native AI flow branch
- take the 2.8.0 crate versions, Cargo.lock dependency graph and release workflows
- keep the native workflow inspect/list, resume_dir isolation and repeatable fixtures
- satisfy the 2.8.0 library narrative gate for workflow.tick
- resolve CHANGELOG ordering with the v2.8.0 release entry
2026-11-18 12:14:03 +08:00
cflmy 38c07d9a0e feat(agent): add workflow inspection and durable isolation
- add agent_workflow_inspect/list primitives and ext/ai wrappers
- expose host-relative resume_dir on every workflow operation
- make offline workflow fixture repeatable with a timestamped run id
- fix flow.choose branch scoping contract diagnostic
- build the agent cdylib and drop the removed run --effects flag in CI
2026-11-18 11:57:12 +08:00
cflmy a7a5554c0f ci(proof): elan 钉 v4.35.0——lean-action 已移除 lean4-version,安装改走 elan-init
proof job 在 2.8.0 HEAD 因 Unexpected input lean4-version 立刻失败;
判定流水线只需 lean 二进制(底座内嵌),与 skill-proof/lean-toolchain 对齐。
v2.8.0
2026-11-18 10:57:28 +08:00
cflmy 343504c7a8 release(2.8.0): local.bump — wasm 包版本与 debian/changelog 2.8.0 stanza,Cargo check 更新锁文件
按发版手册 cli 模式:两个 Cargo 包版本一致(marqdo/marqdo-wasm 2.8.0),
ext/VERSION 保持 2.7.0 不动;PPA stanza 保留原维护者、Asia/Shanghai 时间。
2026-11-18 10:29:26 +08:00
cflmy 3d9fa0da96 docs(public): 新增 23-prove 特性页——页面自身定理表经 Lean 全 proved
- 英文特性页(public/features/23-prove.mq.md):六段管线/状态阶梯/
  反例见证/单调性护栏/可证片段边界,示例即页面内的台账.记一笔;
- import result 模块使 result.ok 内联(轨迹语义与定理匹配:大额必经复核
  + 大额单次外呼 + 必有回执);
- 实测 marqdo prove 23-prove.mq.md → status proved,3 定理全部
  decided_by=lean;公开文档重建后 23-prove 页面入站。
2026-11-18 10:29:26 +08:00
cflmy bb8960c5eb fix(env): 重放测试可移植 shebang + dev-env 工具箱目录——全量 1105 测试零失败
- notebook_api.rs:replay 包装脚本 shebang /usr/bin/python3 →
  /usr/bin/env python3(本机 /usr/bin 只读无 python3,CI 与工具链均兼容);
- scripts/dev-env.sh:PATH 预置 target/toolchain/bin(本机 zip shim
  所在,gitignored;CI 用真实 zip),修复 release_handbook packs
  边界 cannot start zip 环境缺口;
- 全量 cargo test:1105 通过 / 0 失败(此前 2 个记录在案的环境基线
  失败——replay python 包装与 packs zip——均已消除)。
2026-11-18 10:29:26 +08:00
cflmy 9331af78e2 release(2.8.0): 合入 CHANGELOG/README/发版说明/skills prove 任务;CI 链接指向 doc/releases
- CHANGELOG.md:v2.8.0 条目(中英双语);
- README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明);
- doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制);
- skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/
  require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过);
- 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
2026-11-18 10:29:26 +08:00
cflmy 73bf574a55 ci: proof.yml Full sweep 接真任务——40 夹具单调性 + T4 一致性 + 分歧注入红线
- corpus monotonicity(offline_checked ⊆ lean_proved)与 T4 差分一致性
  进 CI(MARQDO_PROOF_REQUIRE_LEAN=1);
- Full sweep 改为分歧注入红线:--fault-inject offline-claim 必须触发
  error[proof.divergence] 且退 1,护栏失灵(静默落绿)即 CI 失败;
  本地实测 exit=1 + proof.divergence 诊断。
2026-11-18 10:28:18 +08:00
cflmy 4fae71342d prove: P3 — --all 目录模式、T4 差分一致性、库语义对齐、2.8.0 收口
- main.rs:prove --all/--max-files(递归收集,目录不带 --all 拒绝;
  聚合 JSON kind=prove-all,整体状态差者胜);--fault-inject offline-claim
  (调试分歧注入,A3 护栏验证入口)
- tests/conformance.rs:T4 差分一致性——5 例纯函数语料(算术/中文标识符/
  分支比较/字符串拼接/i64 边界)解释器求值 == Lean example(simp+try rfl);
  B4 result.ok 结构字段 access 两侧一致
- MarqdoProof.lean:mqAdd 补文本拼接与 num 混合(与解释器 eval_binary(Add)
  对齐——T4 实测抓出的真分歧);mqDisplay 显示串(标量精确,容器一层,
  有意简化并记录)
- 文档:design §12 P3 落地 + §12.4 延期理由(foreach/assume-guarantee/T3
  → 2.9)+ §12.5 权限受限待合入清单;roadmap 状态 → 已实施;
  教程 §13.8 prove 章节;skills/marqdo/reference.md 定理表;
  doc/verification/skill-proof-theory.md(库形式化说明);
  doc/roadmap/prove-release-2.8.0.md(双语发版说明 + CHANGELOG/README/
  skills/marqdo-dev prove 任务待合入原文)
- Cargo.toml/Cargo.lock:2.7.1 → 2.8.0

实测:全量 516 通过(仅 2 个已记录环境基线失败);prove 23 + prove_lean 10
+ corpus 40 夹具 + conformance 6 例全绿;biz 定理 proved、假定理反例、
--all 聚合与护栏目录模式同样生效。
2026-11-18 10:28:18 +08:00
cflmy 63d60e3ba1 prove: P2 — 离线符号执行(F1–F5)+ 单调性护栏 + 语料库
- offline.rs:SymVal 符号执行(Const/Struct/OpResult/Param/Unknown);
  If 分支克隆状态并接续后续语句(修复 Return-in-outer 编排丢结果);
  可行性检查(前提∩路径条件为空 → 空真关闭,Lean 假设矛盾同构);
  F2 轨迹包含/长度、F3 构造器结构求值、F4 自由原子二分、
  F5 区间:字面重述关闭 + 区间违反反例(区间端点见证,如 金额 = 10001);
  区间蕴含保守 unverified(当前 Lean 脚本无 Val 传递引理,先于 Lean
  关闭即触发 divergence——诚实优先)
- 判定编排:离线先行(毫秒级 checked ≠ proved)→ Lean 复核升级 proved;
  分歧护栏:checked 但 Lean 关不掉 / 反例被 Lean 证出 ⇒
  error[proof.divergence] 退 1 永不落绿;MARQDO_PROOF_INJECT_DIVERGENCE 验证
- emit:try split 按 if 嵌套深度重复(三路分支可达);simp 清单补
  mqResultError/mqValueOr/mqAnd/mqOr/mqNot(分歧护栏暴露)
- tests/prove_corpus.rs:8 类 × 5 = 40 夹具语料库,
  offline_checked ⊆ lean_proved 强制 + 无 Lean 禁 proved;
  f5_interval_closure_scope 单测锁定 F5 诚实范围
- 设计文档 §12 记录 P2 落地、修复与文法限制

实测:biz 3 定理离线 checked→Lean proved;假定理反例 金额 = 10001
指回定理表行;注入分歧 → error/divergence 退 1;全量 516 通过
(仅剩 2 个已记录环境基线失败)。
2026-11-18 10:28:18 +08:00
cflmy 44d2928c06 prove: P1 — Lean 判定接入 CLI(driver + 证书缓存 + CI)
- driver.rs:工具链发现(--lean → MARQDO_PROOF_LEAN → PATH;显式坏路径
  error[proof.lean_missing] 不回退);MarqdoProof 库内嵌进二进制,按内容
  哈希缓存、lean -o 直接构建(运行时零 lake/elan 依赖);lean 调用带超时
  (--timeout/--heartbeats);unsolved→unproved、error→error、
  sorry→unverified;-- mq: 注释 + 定理头注释 → 证据映射指回源行
- cache.rs:复合键证书(源码⊕plan⊕库sha256⊕lean版本⊕版本),
  命中跳判定(lean.cache: hit),--no-cache/MARQDO_PROOF_NO_CACHE 绕过
- mod.rs:per-claim 判定面(status/decided_by/evidence/source_line)、
  lean JSON 对象、proof.claim_failed 诊断;文件状态只聚合有定理与被拒函数
- main.rs:--lean/--timeout/--no-cache/--heartbeats 旗标;prove emit
  子命令只生成不判定;策略 none → sorry(绝不冒充 proved)
- tests/prove_lean.rs:A1/E1/E4/F2/F3/F4/G1/G2/G2b 矩阵,无工具链 SKIP、
  MARQDO_PROOF_REQUIRE_LEAN=1 硬性要求;实测抓出并修复错误行/列解析、
  逐定理记录缺失、含点函数名归因三处判定缺陷
- CI proof.yml:装 Lean 4.35.0 → 底座校验 → 判定矩阵(CI 不许静默降级)
- 设计文档 §12 记录 P1 落地与偏差(直接 lean -o,不经 lake)

实测:业务样例 3 定理 proved;假定理 unproved 退 1 指回定理表行;
缓存命中后跳判定(假 lean 计数器验证);全量 Rust 测试 508 通过
(仅剩 2 个已记录环境基线失败)。
2026-11-18 10:28:18 +08:00
cflmy fa832268b3 prove: fix issues found in Lean verification round
- p2_len fixture claim corrected: pure function's trace is always empty,
  so '长度(轨迹) = 2' was an authoring mistake -> '长度(轨迹) = 0'
  (Nat-path coverage unchanged); all 7 claim-bearing files now prove
- generated Lean headers set linter.unusedVariables/unusedSimpArgs off:
  machine-emitted artifacts should not trigger human-authoring lints
  (0 warnings now)
- verification driver script + updated results in design doc 12 and
  library README
2026-11-18 10:28:18 +08:00
cflmy 9576188a2e prove: real Lean 4.35.0 verification round
- MarqdoProof semantic base (Val + mq* helpers + branch-contradiction
  lemmas, no axiom/opaque), lake-built; sources under doc/verification/
- emitter: ASCII-only namespaces (uXXXX encoding), guillemet wrapping
  for all non-ASCII identifiers, ':' -> '_' inside op ctor names,
  ctor pattern arg binding, ASCII-safe rename forms, placeholder ctor
  via op_ctor, flipped run equation (outputs on the left), try-split
  for branchless bodies, validated proof script (simp_all + .elim
  contradiction + omega)
- business example: 3/3 theorems proved by real Lean; 5/6 claim
  fixtures proved, p2_len honestly unproved (false claim)
- design doc section 12: Lean round findings + results
2026-11-18 10:28:18 +08:00
cflmy 528a1f0dbc prove: fix 4 review defects (honesty + compilability) + business validation
Code review after the initial prove commit found and fixed:

1. Calls inside table/list literals were silently dropped — a function
   with side-effectful cells lowered to "no ops" and claimed purity in
   Lean. lower_expr's fallback now rejects with proof.unsupported
   (author must bind the call to a variable first).
2. Same-callee call sites with different arities (optional params)
   shared one Op whose ctor declared the first-seen arity, emitting
   uncompilable Lean. register_op now suffixes `/N` per arity.
3. proof.name_shadow fired once per walked function (N functions → N
   duplicates) and checked params of claim-free functions. Predicate
   check runs once per module; param check only for functions that
   carry claims.
4. 长度(轨迹) = 2 emitted mqEq (Nat) (Val) — type-mismatched Lean.
   Nat-context detection renders trace-length comparisons natively;
   untranslatable shapes become comments instead of broken Lean.

Hardening: lean_ident reserves 轨迹₀ / h_前提 (theorem binder
collision); emit_theorems dedups repeated claim ids.

Tests: +4 integration regressions (p2_a..p2_d), 23 prove tests total;
full suite green except the documented env-limited failures (one
host::foreign_session flake passes standalone).

Business validation (doc §12): e-commerce order-approval SKILL with 3
theorems cross-checked against the real interpreter — 5000 → auto
(1-step trace), 20000/60000 → manual ticket T-20000/T-60000
(需人工→创建, exactly 2 steps); corrupted claim tables hit
check --proof codes while staying default-off; double emit
byte-identical.
2026-11-18 10:28:18 +08:00