Skip to content

Add spreadsheet completeness stop guard - #1220

Closed
EdbertChan wants to merge 2 commits into
mainfrom
pr/spreadsheet-completeness-guard-20260929
Closed

EdbertChan wants to merge 2 commits into
mainfrom
pr/spreadsheet-completeness-guard-20260929

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Summary\n\nSpreadsheet work now has a completion guard that stops the workflow when source-backed entity coverage has not passed. It asks for bounded retries instead of allowing an incomplete workbook to be reported as finished.\n\n## Review Claim\n\nThe engine hook blocks spreadsheet completion claims without an explicit coverage receipt and supports at most three retry attempts.\n\n## Review Lane\n\nbehavior\n\n## Review Unit\n\nengine-runtime\n\n## Safety Invariant\n\nA spreadsheet completion claim cannot pass without the exact coverage receipt; incomplete coverage remains blocked after the retry limit.\n\n## Slice Rationale\n\nThis PR contains the engine hook and harness manifests. The separate product-skill PR contains schema and derived-estimate validation.\n\n## Non-goals\n\n- No changes to Google Sheet contents.\n- No automatic invention of competitor values.\n- No merge or deployment.\n\n
\nTest Plan\n\n- [x] python3 -m unittest discover -s engine/hooks/spreadsheet-completeness-guard/tests -p test_*.py\n- [x] positive and negative hook fixtures are included\n\n
\n\n
\nRevert Plan\n\n- Safe to revert? Yes.\n- Revert command: git revert \n- Post-revert steps: Remove the hook registration if a partial revert leaves it enabled.\n- Data migration? No.\n\n


Note

Medium Risk
New stop-hook enforcement can block agent turns on regex-matched completion language; behavior is bounded by the PASS receipt and tests, but false positives would affect workflow, not security or data.

Overview
Adds a new stop hook spreadsheet-completeness-guard (registered in hooks.toml) with Claude, Codex, and Cursor Stop manifests. On stop, it blocks assistant messages that claim spreadsheet/workbook completion unless the text includes SPREADSHEET_COVERAGE: PASS. Missing coverage prompts up to three source-collection retries via spreadsheet_retry_count; SPREADSHEET_COVERAGE: FAIL after that limit keeps the stop with guidance to list unresolved entity/period keys instead of declaring done.

Also introduces the spreadsheet-authoring product skill: raw→aggregation→chart conventions, typed period columns vs observation points, and validate_schema.py for CSV fixtures (required columns, no qualifiers in period fields, unique observation keys), plus skill fire/silent fixtures and unit tests for the hook and validator.

Reviewed by Cursor Bugbot for commit ff69415. Bugbot is set up for automated code reviews on this repo. Configure here.

Change-Id: I4e2f319839830f71c7f873c0f4560bee194eaa86
Change-Id: I913b91811835219351c9267075e078ccbe5795d1
@cursor

cursor Bot commented Sep 29, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_2dc0206e-e9d9-4b17-8086-b57e5b572456)

@mergify

mergify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@EdbertChan

Copy link
Copy Markdown
Owner Author

Replaced by #1221. This branch also carried the spreadsheet-authoring skill, so the engine-runtime review unit could not pass. #1221 is only the stop hook.

@EdbertChan EdbertChan closed this Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant