Skip to content

feat(raw): reuse deterministic range resolution - #418

Open
BramVR wants to merge 2 commits into
mainfrom
codex/issue-404-raw-range-resolution
Open

feat(raw): reuse deterministic range resolution#418
BramVR wants to merge 2 commits into
mainfrom
codex/issue-404-raw-range-resolution

Conversation

@BramVR

@BramVR BramVR commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • raw Data Type and dataTypes.*.list aliases now share sync's canonical named-range grammar, timezone precedence, captured clock, and physical/civil/daily provider-shape resolution
  • identity range/timezone flags and non-listable Data Types fail before config, archive, clock, or Provider access
  • raw response and archive-write behavior remains unchanged; only the existing OAuth refresh path may persist token metadata
  • command registry, completion, generated reference, README, quickstart, and agent skill are aligned

Proof

  • Formatting: make fmt-check

  • Lint: pinned golangci-lint v2.12.2, 0 issues

  • Tests: go test ./... and go test -race ./...

  • Docs: make docs-check

  • Project Site: make docs-site

  • Live proof attached or explained below

  • Docs/changelog impact reviewed; docs updated, repository has no changelog

  • Public artifact confidentiality gate reviewed

  • focused fake-Provider tests: alias parity; raw/sync byte-identical filters for physical, civil, and daily shapes; DST/config/flag/clock boundaries; pre-I/O validation; no-write assertions

  • go vet ./...; native macOS build; Linux amd64 and Windows amd64 cross-builds

  • go mod verify; go mod tidy -diff; govulncheck: no vulnerabilities

  • confidentiality gate and Public Model Identifier Gate: PASS

  • exact-head Codex AutoReview: clean (0.93); exact-head Claude Opus 4.8 review: clean (0.72)

Notes

  • Issue: Closes feat(raw): reuse deterministic range resolution for raw reads #404.
  • Caveat: the exact built CLI reached the authenticated token-refresh path for a one-item raw read with stdout discarded, but the existing Google refresh grant returned HTTP 400. No payload or credential was exposed. Merge remains blocked until existing Google access is repaired or this extra live gate is explicitly waived; issue acceptance itself permits fake-Provider proof.

Copilot AI review requested due to automatic review settings July 31, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR unifies raw Data Type range/timezone resolution with sync by reusing sync’s deterministic named-range grammar, timezone precedence (flag → config → UTC), and captured clock behavior, while adding early validation so meaningless range/timezone flags on identity endpoints and non-listable Data Types fail before any config/archive/provider I/O.

Changes:

  • Added a raw-specific range resolver entrypoint (ResolveRawRange) that shares sync’s core boundary logic but preserves accurate command context in errors.
  • Reworked raw request building to accept a full RawRequestOptions contract (including flag provenance) and added a pre-setup validation pass.
  • Updated CLI surface/docs/tests (including a dedicated raw timezone/range test suite) to reflect new grammar, timezone precedence, and identity flag rejection.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
skills/gohealthcli/SKILL.md Updates raw examples to use named ranges + timezone and clarifies behavior parity with sync.
README.md Aligns README raw usage and adds notes on shared range grammar and identity flag rejection.
internal/googlehealth/range_resolver.go Factors range resolution behind resolveRange and adds ResolveRawRange for raw-context errors.
internal/googlehealth/fetch.go Introduces RawRequestOptions, early validation, and unified raw request parsing/building with captured clock.
internal/googlehealth/fetch_extra_test.go Updates internal tests to the new BuildRawRequest(RawRequestOptions) contract.
docs/quickstart.md Refreshes quickstart raw examples and documents timezone/range behavior.
docs/commands/raw.md Expands raw command docs to describe named boundary grammar, timezone precedence, and identity flag rejection; adds --timezone flag row.
cmd/gohealthcli/raw.go Adds --timezone, performs pre-setup option validation, captures clock, applies config timezone default, and threads config into setup.
cmd/gohealthcli/raw_timezone_test.go Adds comprehensive fake-provider tests for raw named ranges, timezone precedence, alias parity, early rejection, and no-write assertions.
cmd/gohealthcli/google_health_fetch_test.go Updates request-building tests for the new options-based raw request builder and resolved range semantics.
cmd/gohealthcli/completion_test.go Adds completion coverage for raw --timezone.
cmd/gohealthcli/commands.go Updates raw command registry metadata and flag surface to include --timezone and updated long help text.
cmd/gohealthcli/agent_skill_test.go Updates agent skill drift test to use the new raw request builder contract.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(raw): reuse deterministic range resolution for raw reads

2 participants