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.
Send complete op/steps/value records to the Lean decoder for every operation. Preserve companion exit status and a bounded stderr tail on transport failure. Register the smoke fixture read tool explicitly without weakening the allowlist or changing its output assertion.
Validation: 462 library tests and 312 gold tests passed. The repository regression run passed 946 tests with two existing ignored experiments; the previously passed 1000-document scale test was not repeated.
Add root/index and layout skills that force file-partitioned pages and ban
HTML/CSS injection as the default path; wire ext add, docs, and call coverage.
Co-authored-by: Cursor <cursoragent@cursor.com>
Root skills get a choose-a-path table; circuit modules spell the simulate
handoff; call_cli covers ZH bell and stepwise session probabilities.
Co-authored-by: Cursor <cursoragent@cursor.com>
Split ext/quantum into index + modules, add marqdo call --effects/--session/--toget,
narrative-ratio checks, and a same-package 量子/ tree so agents can follow a
decision path for Bell demos without inventing a second API.
Co-authored-by: Cursor <cursoragent@cursor.com>
Host exposes oracle journals as language values with refuse/copy gates; bytecode and foreign session paths get modularized; applications and verification replay-policy sources land with Lake builds ignored.
Co-authored-by: Cursor <cursoragent@cursor.com>
The same page is the document, the knowledge and the program. marqdo call runs that function with arguments, so reuse, tools and tests do not need a second skill system.
Co-authored-by: Cursor <cursoragent@cursor.com>
Env port strings must be json.parsed to int; pin main site to 18220 so
inherited MARQDO_SITE_PORT cannot steal the fixture bind.
Co-authored-by: Cursor <cursoragent@cursor.com>
Serve static application/json and text/csv previews with outline/table
limits and flip extract_formats availability for those media types.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prepare/start/commit write and execute tools with idempotent dedupe, and refuse
blind retry while ledger state is unknown or interrupted mid-flight (MA-T03).
Co-authored-by: Cursor <cursoragent@cursor.com>
Open AgentOutputV1/ContextPackV2 capability bits and add EffectLedgerRecordV1
so CheckpointV2 write auto-resume only unlocks on a safe watermark.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add ToolSpecV1 register/search/describe/prepare so CALL and native paths share one schema gate; unauthorized and invalid-arg prepares fail with zero executions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace bare resume writes with temp/fsync/rename, mark legacy loads as manual_review, and expose bounded read-only retry decisions while keeping write auto-resume closed without a ledger.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop full recompile on every knowledge preflight by writing ekc/graph/ir.json
and loading it unless --refresh or missing projections, cutting chat预检 wall time.
Co-authored-by: Cursor <cursoragent@cursor.com>
Observer SSE close no longer cancels execute by default; short/read/control
bypass parent INVOKE_LOCK via isolated admission, with read_lane=1 and gold samples.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hold analysis locks across compile for concurrent same-snapshot reads,
emit SnapshotManifestV1 for app retention, and add Go drainForward tests.
Co-authored-by: Cursor <cursoragent@cursor.com>