P4 验证执行:(a)锚点消融✅/(c)契约消融✅/(d)防漂移✅/(e)守卫演练✅;(b)盲测 deepseek-flash 完成未达标、mimo-v2.6-pro 重跑中

- perf-validation.md:五实验协议/判据/材料(2026-09-23 自设计)
- perf-validation-report-2026-09-23.md:汇总报告(判据逐项对照 + 诚实结论)
- tests/blind_experiment.rs + tests/blind/:盲测 harness(查询通道/修复回路/usage 计量)+ 冻结材料(6 任务书 + docs-bundle)
- tests/contract_ablation.rs:四边界×三情形消融(拦截 100%/误报 0%/零回归)
- tests/drift_drill.rs:9 漂移必报 + 2 负对照
- src/mlsp.rs:syntax 卡片自持化(semantics/rule/sample/doc_quote)
- three-problems.md §5.1 判据矩阵逐行判定(问题 1✅ 2✅ 3❌);three-problems-plan.md Phase 4 落地记录
- 全量干净回归零失败

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-23 05:06:30 +08:00
1 parent 00c763300e
commit 1a729eb9ec
18 files changed
+1848 -11

No files matched your search

+117
View File
@@ -0,0 +1,117 @@
<!--
P4 实验 (b) 材料 · D 臂(全文档背诵组)上下文包。
来源:commit 199b5c5^ 的 `.cursor/skills/marqdo/SKILL.md`(背诵式「压缩操作手册」)
语言部分原样冻结(Markup→meaning / 最小程序 / 函数调用 / 语句分支 / 导入与内建面)。
只读实验材料——**请勿修改**(改了就不是同一个实验)。
-->
## Markup → meaning (v0.3)
| Marker | Meaning |
|--------|---------|
| `#` | **Object / type** (constructor body). `# main` = entry object. `# Child = > Parent` = inherit (**no** implicit parent constructor; call `` `self` = > Parent … `` explicitly when needed). |
| `##` … `######` | **Function / method** (nesting by heading depth). |
| `` + `name` `` under heading | Parameter (optional `` `name`=default ``) |
| `1.` `2.` … in body | Branch arm (condition or `N. *` else). **Same-indent restart at `1.` = new branch statement** (not more arms of the previous list). |
| `- …` inside body | Loop (`while` or `` [item](coll) `` / `` [`item`](`coll`) ``) |
| Line `N. *` | Else arm |
| `> fn args` | Call (named `k=v` or positional) |
| `修饰 [fn] args` | Bracket-marked call; leading words → `名=True` |
| `` > `obj`.method args `` | Method call (`obj` must be a map with `_type`) |
| Frontmatter `import bind:path.mq.md` / `导入` | Import file (bind library name) |
| Frontmatter `import bind:lib.member` / `导入` | Short name for a library member (same keyword; no separate `use`) |
| `> lib.member …` / `> lib.Type.member …` | Call via bare dotted path (instance methods need `` `var`.m ``) |
| `**…**` | **Code** (assign / call) — closing `**` touches last token; bare ids are variables; quote text literals |
| `*…*` | **Return value** — closing `*` touches last token; bare ids are variables |
| `****` / whole-line `**` / `*None*` | Return `None` and end function body |
| Lone `---` / `***` | Markdown thematic break (skip; not function end) |
| GFM table after empty RHS bind | Collection; get with `[key](coll)` (preferred) or legacy `` `m`[^key] `` |
| `- [item](coll)` | Foreach (unchanged) |
| `` ```lang `` | Foreign code block (via `lib/foreign`) |
| `` `"text"` `` | Quoted string (`\n` `\t` `\\` `\"`; `` `var` `` inside); bare tokens unescaped |
| Unmarked prose | Comment |
Entry: load file (often `index.mq.md`) → collect defs → run `# main`.
## Minimal program
```markdown
# main
> print text=Hello World!
```
Chinese builtins (same functions, no import):
```markdown
# main
> 打印 内容=你好
```
## Functions, calls, end-body
```markdown
# main
> greet who=Marqdo
## greet
+ `who`
> print text=Hello, `who`!
*None*
```
- Call: `> name key=value` or `> name value`.
- Nested helpers use deeper `#` (`##`, `###`, …).
- After a helper with only side effects, end with `*None*` / whole-line `**` / `****` when later lines must stay in the outer function. Lone `---` is only a thematic break (skipped).
- In bold assigns, prefer bare calls: `**摘要 = 结账摘要 …**` (omit `>`).
## Statements, returns, branches
```markdown
**x = 1**
**y = x + 2**
## add_one
+ `n`
*n + 1*
```
```markdown
**n = 0**
1. `n` > 0
> print text=positive
2. `n` < 0
> print text=negative
3. *
> print text=zero
```
## Frontmatter imports + stdlib
Imports use `import bind:target` (`导入` equivalent): file (`.mq.md`) or short name (`lib.member`). Members are **not** flattened into the caller. Call with a bare dotted path:
```markdown
---
title: example
import text:lib/text.mq.md
import clock:lib/time.mq.md
---
# main
**xs = > text.str_split s="a,b,c" sep=","**
> print text=`xs`
**t = > clock.now_unix**
```
- Import **English** or **Chinese** library file; call that file's API names via `lib.member` (do not mix languages).
- Instance methods stay `` > `obj`.method `` (backticks on the receiver only).
- `lib/…` resolves via `MARQDO_LIB`, cwd `lib/`, or `lib/` next to the `marqdo` binary.
- Prefer `table.put` / `表.改` for list/map element updates; keep `json` for parse/stringify/quote.
- Builtins (no import): `print`/`打印`, `input`/`输入`, `len`/`长度`, `str`/`文本`, `int`/`整数`; literals `True`/`真`, `False`/`假`, `None`/`空`; logic `and`/`且`, `or`/`或`, `not`/`非`.
@@ -0,0 +1,36 @@
# Task: claims_reserve_settle (insurance claims reserve)
Implement an **insurance claims reserve settlement** desk.
This is a **business-policy** pipeline (deductible, coinsurance, sublimit, recovery, floor), **not** an algorithms puzzle.
Use **integer arithmetic only**. Hardcode the demo inputs below and **print one integer**: the final reserve.
## Business requirements (authoritative)
1. **After deductible:** `after_deduct = claim - deductible`. If `after_deduct < 0`, set `after_deduct = 0`.
2. **Coinsurance share (insurer):** `coinsured = after_deduct * coinsure_pct / 100` (demo coinsure_pct = 80). Apply coinsurance **before** recovery.
3. **Sublimit cap:** `capped = coinsured` if `coinsured <= sublimit`, else `capped = sublimit` (never enlarge beyond coinsured).
4. **Recovery offset:** `reserved = capped - recovery`. If `reserved < 0`, set `reserved = 0`.
5. **Reserve floor:** if `reserved < reserve_floor`, set `reserved = reserve_floor`.
## Demo inputs (hardcode)
- `claim = 50000`
- `deductible = 5000`
- `coinsure_pct = 80`
- `sublimit = 30000`
- `recovery = 2000`
- `reserve_floor = 1000`
## Requirements
- Provide named helpers (or clear stages) for deductible, coinsurance, sublimit, recovery, and floor — not one opaque expression.
- Print only the final integer (no labels).
- Align to the **business requirements above**; do not invent alternate order or comparison directions.
## Expected output (self-check)
Exactly one line: `28000`
## Deliverable
Write the program as a Marqdo `.mq.md` file. Return the complete source in a single ```markdown fence — no prose outside the fence.
@@ -0,0 +1,42 @@
# Task: contract_milestone_pay (construction milestone payable)
Implement a **contract milestone payment** desk for an EPC / construction settlement.
This is a **business-policy** pipeline (retention, late penalty, change order, tax), **not** an algorithms puzzle.
Use **integer arithmetic only**. Hardcode the demo inputs below and **print one integer**: the final payable.
## Business requirements (authoritative)
1. **Earned value:** `earned = contract_value * progress_pct / 100`.
2. **Retention withhold:** `retention = earned * retain_pct / 100` (demo uses retain_pct = 5).
3. **Net after retention:** `net = earned - retention`.
4. **Late penalty:** if `days_late > grace_days` (grace_days = 7), set `penalty = net * late_rate / 100` (late_rate = 2); otherwise `penalty = 0`. Penalty is always computed from **`net`**, never from `earned`.
5. **After penalty:** `net2 = net - penalty`.
6. **Change order:** `taxed_base = net2 + change_order`. If `taxed_base < 0`, set `taxed_base = 0`.
7. **Tax:** `tax = taxed_base * tax_rate / 100` (tax_rate = 6).
8. **Payable:** `payable = taxed_base + tax`. If `payable < min_pay` (min_pay = 500), set `payable = min_pay`.
## Demo inputs (hardcode)
- `contract_value = 100000`
- `progress_pct = 40`
- `retain_pct = 5`
- `days_late = 10`
- `grace_days = 7`
- `late_rate = 2`
- `change_order = -2000`
- `tax_rate = 6`
- `min_pay = 500`
## Requirements
- Provide named helpers (or clear stages) for earned, retention, penalty, change+tax, and floor — not one opaque expression.
- Print only the final integer (no labels).
- Align to the **business requirements above**; do not invent alternate thresholds or penalty bases.
## Expected output (self-check)
Exactly one line: `37354`
## Deliverable
Write the program as a Marqdo `.mq.md` file. Return the complete source in a single ```markdown fence — no prose outside the fence.
+30
View File
@@ -0,0 +1,30 @@
# Task: qb_gcd (easy) — Greatest Common Divisor
Implement **Greatest Common Divisor** as a function named `gcd` in a Marqdo `.mq.md` program (Euclidean algorithm).
## Requirements
1. Function name `gcd`, taking two integer parameters and returning their greatest common divisor (non-negative; `gcd(0, 5)` is `5`).
2. In `# main`, hardcode the demo calls below and print each result on its own line — exactly four lines, no labels.
## Demo calls (hardcode)
- `gcd(48, 18)`
- `gcd(1071, 462)`
- `gcd(0, 5)`
- `gcd(17, 5)`
## Expected output (self-check)
Four lines:
```
6
21
5
1
```
## Deliverable
Write the program as a Marqdo `.mq.md` file. Return the complete source in a single ```markdown fence — no prose outside the fence.
+28
View File
@@ -0,0 +1,28 @@
# Task: qb_get_factors (hard) — Prime Factorization
Implement **prime factorization** as a function named `get_factors` in a Marqdo `.mq.md` program. The function takes an integer `n ≥ 2` and returns its prime factors in ascending order.
## Requirements
1. Function name `get_factors`.
2. In `# main`, hardcode the demo inputs below and print each result on its own line — factors joined by `*` with no spaces, exactly three lines, no labels.
## Demo inputs (hardcode)
- `12`
- `13`
- `60`
## Expected output (self-check)
Three lines:
```
2*2*3
13
2*2*3*5
```
## Deliverable
Write the program as a Marqdo `.mq.md` file. Return the complete source in a single ```markdown fence — no prose outside the fence.
+28
View File
@@ -0,0 +1,28 @@
# Task: qb_max_sublist_sum (hard) — Maximum Sublist Sum
Implement the **maximum contiguous sublist sum** as a function named `max_sublist_sum` in a Marqdo `.mq.md` program. The function takes a list of integers and returns the maximum sum of any contiguous sublist (at least one element).
## Requirements
1. Function name `max_sublist_sum`.
2. In `# main`, hardcode the demo inputs below and print each result on its own line — exactly three lines, no labels.
## Demo inputs (hardcode)
- `[-2, 1, -3, 4, -1, 2, 1, -5, 4]`
- `[1, 2, 3]`
- `[-3, -1, -2]`
## Expected output (self-check)
Three lines:
```
6
6
-1
```
## Deliverable
Write the program as a Marqdo `.mq.md` file. Return the complete source in a single ```markdown fence — no prose outside the fence.
+37
View File
@@ -0,0 +1,37 @@
# Task: vendor_po_gate (complex procurement business policy)
Implement a **vendor purchase-order payable gate** for an enterprise procurement desk.
This is a **business-policy** task (multi-rule approval economics), **not** an algorithms puzzle.
Use **integer arithmetic only**. Hardcode the demo inputs below and **print one integer**: the final payable.
## Business requirements (authoritative)
1. **Base line:** `base = qty * unit_cost`.
2. **Preferred-vendor discount:** if `vendor_tier >= 2` (tier-2+ preferred suppliers), set `amount = base * 97 / 100`; otherwise `amount = base`.
3. **Rush surcharge:** if `urgency == 1`, set `amount = amount + amount * 5 / 100`; otherwise keep `amount`.
4. **Budget clamp:** if `amount > budget_cap`, set `amount = budget_cap`.
5. **Compliance fee:** if `risk_flag == 1`, `fee = 80`; else `fee = 0`.
6. **Payable floor:** `payable = amount + fee`; if `payable < 200` then `payable = 200`.
## Demo inputs (hardcode)
- `qty = 20`
- `unit_cost = 40`
- `vendor_tier = 2`
- `urgency = 1`
- `budget_cap = 900`
- `risk_flag = 0`
## Requirements
- Provide named helpers (or clear stages) for discount, rush, budget clamp, fee, and assemble — not one opaque expression.
- Print only the final integer (no labels).
- Align the program to the **business requirements above**; do not invent alternate thresholds.
## Expected output (self-check)
Exactly one line: `814`
## Deliverable
Write the program as a Marqdo `.mq.md` file. Return the complete source in a single ```markdown fence — no prose outside the fence.