Remove obsolete enrichment snapshot contract#221
Merged
texture-fleet-agent[bot] merged 1 commit intomainfrom May 8, 2026
Merged
Remove obsolete enrichment snapshot contract#221texture-fleet-agent[bot] merged 1 commit intomainfrom
texture-fleet-agent[bot] merged 1 commit intomainfrom
Conversation
Drops the short-lived commongrid enrichment snapshot objects that were introduced before the architecture pivot to direct REST consumption. Consumers should call CommonGrid's public APIs directly with caching; CommonGrid should not mirror its utility facts through a database view for private downstream systems. This migration idempotently removes: - commongrid.v_crm_org_enrichment - commongrid.v_utility_enrichment - commongrid.v_utilities_enriched - commongrid.enrichment_schema It intentionally keeps the commongrid schema and internal_api_consumer role, which remain useful as the generic server-to-server contract namespace for utility-name resolution and lifecycle signals. Also scrubs obsolete private-spec references from public SQL/test comments. Validation: - Applied migration against Neon successfully; commongrid has no tables, views, or functions after cleanup - npm run build passes - npm run openapi:check passes
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
LGTM — corrective cleanup is the right shape.
- 0008/0009 comment scrubs remove the private-spec URL references while keeping the generic
fn_resolve_utility_by_name/utility_resolver_cache/utility_name_manual_overridesfunctionality — good public/private separation. - 0010 rename
v_crm_org_enrichment→v_utility_enrichmentin case any intermediate env still has the old name. - 0011 drops the whole snapshot contract idempotently (
IF EXISTSon DROP,REVOKE ALLfirst). Leavescommongridschema +internal_api_consumerrole intact for M3/M4 resolver work. Matches Victor's no-replication ruling.
Approving.
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
Removes the short-lived utility-enrichment snapshot contract that landed before the architecture pivot to direct REST API consumption.
Consumers should call CommonGrid's public APIs directly with caching. CommonGrid should not mirror its utility facts through a database view for downstream private systems.
What this does
Adds migration
0011_drop_enrichment_snapshot_contract.sql, which idempotently removes:commongrid.v_crm_org_enrichmentcommongrid.v_utility_enrichmentcommongrid.v_utilities_enrichedcommongrid.enrichment_schemaIt intentionally keeps:
commongridschema — generic namespace for server-to-server contract objectsinternal_api_consumerrole — scoped role for those contract objectsAlso scrubs obsolete private-spec references from public SQL/test comments.
Verification
Applied the migration to Neon successfully:
Local gates:
npm run build✅npm run openapi:check✅Follow-up
Next PRs add public REST/API capabilities instead of database snapshots:
/api/v1/utilities/by-eia-id/{eia_id}/api/v1/utilities