Skip to content

feat(gbp): profile-completeness scorecard on the GBP summary#726

Merged
arberx merged 2 commits into
mainfrom
feat/gbp-profile-completeness
Jun 21, 2026
Merged

feat(gbp): profile-completeness scorecard on the GBP summary#726
arberx merged 2 commits into
mainfrom
feat/gbp-profile-completeness

Conversation

@arberx

@arberx arberx commented Jun 21, 2026

Copy link
Copy Markdown
Member

Supersedes #725, which GitHub auto-closed when its base branch (#724) was merged + deleted. Same change, rebased onto main.

Why

#724 captures the owner Location content (secondary categories, description, service area, hours, phone, open state) but only exposes it per-location. This rolls it up into a completeness scorecard on the GBP summary so an operator (or Aero) can see at a glance how representative the tracked profiles are.

What

  • summarizeProfileCompleteness() (pure): over the project's selected locations, counts how many populate each owner-content field, plus secondary-category totals and permanently/temporarily-closed counts.
  • Wired into GbpSummary / GbpSummaryInput / GbpSummaryDto (+ regenerated SDK), so it flows to GET /gbp/summary, the typed client, and cnry gbp summary.
  • The route gathers the owner-content columns for the same selected-location scope as every other aggregate (an explicit ?locationName narrows to that one location regardless of selection).
  • Presence semantics: serviceArea / regularHours are stored verbatim, so completeness is presence (!= null), not a deep-emptiness check; text fields require non-empty content.
  • The canonry_gbp_summary MCP tool description and the CLI reference now mention the scorecard.

Scope

Surfacing only. The proactive insights (description-missing / category-thin) remain a separate follow-up.

Tests (TDD + review)

Red→green on summarizeProfileCompleteness (mixed / empty / null-legacy-row / empty-string-description / empty-object-presence), a buildGbpSummary wiring assertion, and two route integration tests (selected-only scope, and the explicit-?locationName= deselected branch). 88 GBP tests pass; contracts/api-routes/canonry/api-client typecheck clean; codegen drift gate green. Version 4.90.0 → 4.91.0.

🤖 Generated with Claude Code

arberx and others added 2 commits June 21, 2026 23:01
Surfaces the owner-content fields #724 now captures as a completeness rollup
over the project's selected locations: how many populate secondary
categories, a description, a service area, hours, and a phone, plus
permanently/temporarily-closed counts. An operator (or Aero) can see at a
glance how representative the tracked profiles are.

- summarizeProfileCompleteness() pure fn + a profileCompleteness block on
  GbpSummary / GbpSummaryInput / GbpSummaryDto (+ regenerated SDK).
- The /gbp/summary route gathers the owner-content columns for the in-scope
  locations (selected-only, the same scope discipline as the rest of the
  summary) and `cnry gbp summary` prints the scorecard.

Stacked on #724 (the owner-content capture it consumes). Insights
(description-missing / category-thin) remain a separate follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…leteness

CI was red: the gbp summary CLI now reads s.profileCompleteness, but
gbp-jsonl-degrade.test.ts mocked the pre-scorecard payload, which crashed
the CLI render (TypeError reading 'locationCount'). Add profileCompleteness
to the mock so it matches the DTO contract. The field is required and the
CLI reads lodging/placeActions the same direct way, so a per-field guard
would be inconsistent and would mask future fixture drift.

Also surface the new scorecard where it was still missing: the
canonry_gbp_summary MCP tool description and both gbp-summary entries in the
CLI reference doc.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@arberx arberx merged commit b03e864 into main Jun 21, 2026
12 checks passed
@arberx arberx deleted the feat/gbp-profile-completeness branch June 21, 2026 23:07
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.

1 participant