Skip to content

v0.4.0 — P1 端到端交付闭环 / P1 Delivery Loop Closes End to End

Choose a tag to compare

@Schlaflied Schlaflied released this 21 Sep 16:30
· 67 commits to main since this release
897ab41

Highlights

Since v0.3.0, Excel-Ops closes the full P1 correctness loop end to end: ingest → normalize → match → confirm ambiguity → write template → reopen and verify → deliver, backed by a new excel-ops deliver CLI entry point, and adds CI + automated PR review to the project.

  • P1 end-to-end delivery pipeline (#46, #47): a new run_delivery() orchestrator in src/excel_ops/delivery.py chains strict matching, batch ambiguity confirmation with recipe reuse, safe template write-back, and independent post-write verification into one agent-callable flow (excel-ops deliver). A plan/dry-run step reports expected writes, reviews, and blockers before anything touches disk. Unresolved ambiguity, conflicts, and protected/formula cells are never silently written. 116 tests passing. The prior single-target excel-ops <input> <output> command is kept (README quick-start and existing tests still use it) as a simpler, non-templated path.
  • Batch ambiguity confirmation + Recipe memory (#26, PR #41): resolve many same-shaped ambiguities in one confirmation instead of one-by-one; decisions save to a readable, version-controllable project recipe and get reused automatically on later runs.
  • Safe enterprise template write-back (#3, PR #40): writes preserve template formatting, formulas, and merged cells; output always goes to a new file, never overwrites the source template or an existing delivery.
  • Independent delivery verification (#4, PR #42): after writing, Excel-Ops reopens the actual persisted file and checks sheets, required fields, and values — a successful write is never reported as a successful delivery on its own.
  • Formula integrity & reconciliation checks (#11, PR #43): detects overwritten formulas and broken references, and reconciles declared summary values against detail rows, flagging mismatches as blocking or warning.
  • Business-period resolution and period-aware refresh (#16/#9, PR #33/#34): explicit period parsing (week/month/quarter/custom/fiscal) with no implicit "today" guessing, plus safe date-slot refresh that only touches declared refreshable fields.
  • Safe, period-aware output naming (#17, PR #35): deterministic filenames like payroll-2026-09-21.xlsx with automatic -rN de-duplication.
  • refresh.mjs read-only update check (#44 partial, PR #45): a new, independent Node entry point (node refresh.mjs check / preview) lets an agent detect system-file changes (even under an unchanged version number) using an explicit SHA-256 manifest, without touching any file. The write side (apply/rollback/agent-check) is intentionally not in this release — issue #44 stays open for that.
  • CI + automated review: GitHub Actions now runs pytest and Node's test suite plus a manifest-staleness check on every PR and push to main; CodeRabbit is installed and auto-reviews new PRs.
  • Bilingual (EN/中文) documentation across README, capability ledger, and the new delivery-pipeline docs (#37, #39).

Known gaps carried forward

  • Full cross-run idempotency (no duplicate records on rerun with changed inputs) is deferred to #19.
  • Formula recalculation is a static check, not a real Excel recompute — treated as a warning, not proof.
  • refresh.mjs's write path (apply/rollback/agent-check) is not yet implemented — see #44.
  • The plain, non-templated CLI command and the new deliver pipeline are not yet consolidated into a single entry point.

Full changelog: v0.3.0...v0.4.0


更新亮点

自 v0.3.0 以来,Excel-Ops 把 P1 正确性闭环真正端到端打通:导入 → 归一化 → 匹配 → 歧义确认 → 模板写回 → 重新打开验证 → 交付,新增了 excel-ops deliver 这个 CLI 入口,同时给项目加上了 CI 和自动化 PR review。

  • P1 端到端交付流程(#46、#47):新增 src/excel_ops/delivery.py 里的 run_delivery() 编排器,把严格匹配、批量歧义确认(含 Recipe 复用)、安全模板写回、写入后独立验证串成一条 Agent 可直接调用的流程(excel-ops deliver)。写入前会先给出计划/dry run,报告预计写入、复核和阻断数量,不落盘。未解决的歧义、冲突、受保护/公式单元格绝不会被静默写入。116 项测试全部通过。原来的单目标 excel-ops <input> <output> 命令予以保留(README quick-start 和现有测试仍在用),作为不需要模板的简化路径。
  • 批量歧义确认 + Recipe 记忆(#26,PR #41):同类歧义可以一次性批量确认,不用逐条处理;人工决定保存为可读、可版本控制的项目 Recipe,后续运行自动复用。
  • 安全写回企业工作簿模板(#3,PR #40):写入保留模板格式、公式和合并单元格;默认另存为新文件,绝不覆盖源模板或已有交付文件。
  • 独立交付验证(#4,PR #42):写入后重新打开实际落盘文件,核对工作表、必填字段和数值——写入成功本身绝不会被单独报告为交付成功。
  • 公式完整性与对账检查(#11,PR #43):检测公式是否被覆盖、引用是否断裂,并对声明的汇总值与明细值执行对账,差异标记为阻断或警告。
  • 业务周期解析与周期感知刷新(#16/#9,PR #33/#34):显式解析周/月/季度/自定义/财年周期,不隐式猜测"今天";安全刷新只更新声明为可刷新的日期槽位。
  • 安全的周期感知文件命名(#17,PR #35):确定性文件名(如 payroll-2026-09-21.xlsx),自动用 -rN 后缀处理重名。
  • refresh.mjs 只读更新检查(#44 的一部分,PR #45):新增独立的 Node 入口(node refresh.mjs check / preview),基于显式 SHA-256 Manifest,即使版本号不变也能发现系统文件变化,且完全不修改任何文件。写操作(apply/rollback/agent-check)本次有意未包含在内,issue #44 保持打开继续跟进。
  • CI + 自动化 review:GitHub Actions 现在每次 PR 和推送到 main 都会跑 pytest、Node 内置测试和 manifest 过期检查;CodeRabbit 已接入仓库,自动 review 新 PR。
  • README、能力账本和新增的交付流程文档全部补齐中英双语(#37、#39)。

遗留的已知缺口

  • 完整的跨运行幂等(输入变化后重跑不产生重复记录)留给 #19。
  • 公式重算只是静态检查,不是真正的 Excel 重新计算,只作为警告,不是证明。
  • refresh.mjs 的写操作侧(apply/rollback/agent-check)尚未实现,见 #44。
  • 无模板的普通 CLI 命令和新的 deliver 流程尚未收敛成一个入口。

完整变更记录:v0.3.0...v0.4.0