Skip to content

Require provenance for spreadsheet derived estimates - #1219

Merged
mergify[bot] merged 2 commits into
mainfrom
pr/spreadsheet-synthetic-schema-20260929
Sep 29, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
pr/spreadsheet-synthetic-schema-20260929

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Each number in the sheet now has to say where it came from. A filled in average must name how it was made. A guess cannot stand in for a real source. The check fails when a needed name is missing.

Review Claim

The spreadsheet schema and validator now require provenance for derived estimates and keep them out of source-coverage claims.

Review Lane

behavior

Review Unit

product-skill

Safety Invariant

No derived value can appear without an explicit method, lineage, and derivation note; derived values cannot satisfy source-backed competitor coverage.

Slice Rationale

This PR contains the schema and validator behavior. The separate engine-runtime PR contains the completion guard.

Non-goals

  • No live Google Sheet writes.
  • No change to published source values.
  • No inference of missing competitor observations.

Test Plan

Test Plan
  • python3 -m unittest product/skills/spreadsheet-authoring/tests/test_validate_schema.py
  • python3 -m py_compile product/skills/spreadsheet-authoring/scripts/validate_schema.py

Revert Plan

Revert Plan
  • Safe to revert? Yes.
  • Revert command: git revert
  • Post-revert steps: None.
  • Data migration? No.

Note

Low Risk
Documentation and offline CSV validation for a product skill; no runtime engine, auth, or live sheet writes in this change.

Overview
Introduces the spreadsheet-authoring product skill: a workbook modeling guide that treats sheets as raw observations → aggregation table → chart, with typed Period Start/Period End, separate Observation Point qualifiers, and strict rules for derived estimates (midpoint / linear interpolation only, with method, lineage, and notes).

Adds validate_schema.py for CSV/fixture preflight: required columns, no qualifiers in date columns, unique observation keys, source URLs on numeric rows, derived-row provenance checks, and optional --expected-entities coverage where derived estimates do not count as source-backed competitor coverage. Failed coverage is meant to surface as SPREADSHEET_COVERAGE: FAIL rather than zero-fill or infer missing entities.

Includes skill invoke/skip test notes and unit tests for the validator behavior.

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

Change-Id: I4e2f319839830f71c7f873c0f4560bee194eaa86
Change-Id: If2020ac1a6062fb2376a55589408419205058a18
@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_3cb91070-39cc-45a8-97a9-924dde72a1dc)

@mergify

mergify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@EdbertChan

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 44 minutes 29 seconds in the queue, including 44 minutes 3 seconds running CI.

Required conditions to merge
  • check-success = lint
  • check-success = test
  • check-success = validate

@mergify mergify Bot added the queued label Sep 29, 2026
@mergify
mergify Bot merged commit 1c55fa5 into main Sep 29, 2026
5 of 9 checks passed
@mergify mergify Bot removed the queued label 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