Building an acceptance harness for AI spreadsheet edits: allowlists, recalc checks, idempotency

ukdicha-modakkk · reddit · 2026-10-16

The author argues "only update the forecast inputs" is an incomplete acceptance test: an agent can overwrite formulas with constants, change chart source ranges, or edit neighboring assumptions while totals still look plausible.

Define the contract before editing:

Univer CLI provides the inspection primitives—it distinguishes stored values, types, formulas, and display text, plus worktree comparisons and structured diffs—but that's an ingredient for a harness, not a built-in audit. Workflow: compare draft vs baseline, inspect references, explicitly trigger recalculation, wait for completion, read resulting values, and tie changes back to input evidence. A matching total cannot substitute for cell-level accounting.

Idempotency matters too: running the same update twice must not append a second adjustment or shift a range again—that invariant belongs to the workflow you build, not the tools.

Original post →

More from coding & agent

coding & agent channel →