Add spreadsheet completeness stop guard - #1220
Closed
EdbertChan wants to merge 2 commits into
Closed
EdbertChan wants to merge 2 commits into
EdbertChan wants to merge 2 commits into
Conversation
Change-Id: I4e2f319839830f71c7f873c0f4560bee194eaa86
Change-Id: I913b91811835219351c9267075e078ccbe5795d1
Bugbot couldn't run - usage limit reachedBugbot 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) |
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. |
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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\n \n\n\n
Test 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\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\nNote
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 inhooks.toml) with Claude, Codex, and Cursor Stop manifests. On stop, it blocks assistant messages that claim spreadsheet/workbook completion unless the text includesSPREADSHEET_COVERAGE: PASS. Missing coverage prompts up to three source-collection retries viaspreadsheet_retry_count;SPREADSHEET_COVERAGE: FAILafter that limit keeps the stop with guidance to list unresolved entity/period keys instead of declaring done.Also introduces the
spreadsheet-authoringproduct skill: raw→aggregation→chart conventions, typed period columns vs observation points, andvalidate_schema.pyfor 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.