feat(gbp): profile-completeness scorecard on the GBP summary#726
Merged
Conversation
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>
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.
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.GbpSummary/GbpSummaryInput/GbpSummaryDto(+ regenerated SDK), so it flows toGET /gbp/summary, the typed client, andcnry gbp summary.?locationNamenarrows to that one location regardless of selection).serviceArea/regularHoursare stored verbatim, so completeness is presence (!= null), not a deep-emptiness check; text fields require non-empty content.canonry_gbp_summaryMCP 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), abuildGbpSummarywiring 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