Skip to content

chore(crm-agent): drop scripts/discover_fields.py (dead-weight + off-architecture)#64

Merged
carvychen merged 1 commit into
mainfrom
chore/drop-discover-fields-script
May 9, 2026
Merged

chore(crm-agent): drop scripts/discover_fields.py (dead-weight + off-architecture)#64
carvychen merged 1 commit into
mainfrom
chore/drop-discover-fields-script

Conversation

@carvychen
Copy link
Copy Markdown
Owner

Summary

Drop the legacy one-shot Dataverse field-discovery script.

  • Redundant with skills/crm-opportunity/references/FIELD_REFERENCE.md, which documents the writable Opportunity fields + OData cookbook as a stable contract.
  • Off-architecture — still uses ClientSecretCredential(AZURE_TENANT_ID/CLIENT_ID/CLIENT_SECRET) from before the OBO + WIF zero-secret refactor (ADR 0001). Keeping it implicitly endorses an env-var pattern we no longer want.
  • Unreferenced — no imports, no CI step, no doc mentions.

If a future customer needs to enumerate fields against a different Dataverse instance, rewriting a 30-line probe is faster than maintaining a drift-prone outlier.

Test plan

  • git grep discover_fields returns nothing after the deletion
  • No CI breakage (this script was never on a CI path)

🤖 Generated with Claude Code

A one-shot Dataverse exploration tool (fetch one Opportunity + entity
metadata) used during initial integration. Three reasons to drop it:

1. Redundant: skills/crm-opportunity/references/FIELD_REFERENCE.md is now
   the documented field contract — writable fields, types, OData operations,
   polymorphic customer binding. Re-discovering at script time is solving
   a problem we already solved with a documented artifact.

2. Off-architecture: the script still authenticates via
   ClientSecretCredential(AZURE_TENANT_ID/CLIENT_ID/CLIENT_SECRET), which
   pre-dates the OBO + WIF zero-secret model the rest of the project moved
   to (ADR 0001). Keeping it as-is implicitly endorses an env-var pattern
   we no longer want; rewriting it to fit current auth is just delaying its
   removal.

3. Nobody calls it. No imports, no CI step, no doc references — pure
   dead-weight after Slice 7's bundle refactor.

If a future customer needs to enumerate fields against a different
Dataverse instance, a 30-line equivalent is faster to write fresh than to
maintain a drift-prone outlier.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@carvychen carvychen merged commit 435c4f1 into main May 9, 2026
3 checks passed
@carvychen carvychen deleted the chore/drop-discover-fields-script branch May 9, 2026 18:01
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