Skip to content

feat(simply-aep): validate EntityDefinition eligibility for domain-process-binding SObject fields - #140

Merged
ClayChipps merged 2 commits into
mainfrom
feat/at4dx-domain-process-binding-entity-definition-eligibility
Aug 29, 2026
Merged

feat(simply-aep): validate EntityDefinition eligibility for domain-process-binding SObject fields#140
ClayChipps merged 2 commits into
mainfrom
feat/at4dx-domain-process-binding-entity-definition-eligibility

Conversation

@ClayChipps

Copy link
Copy Markdown
Contributor

Summary

  • Adds two new `simply aep at4dx domain-process-binding validate` rules that catch a class of wiring problem invisible to every existing rule: the wrong choice between `RelatedDomainBindingSObject__c` (the "primary" EntityDefinition-typed field) and `RelatedDomainBindingSObjectAlternate__c` (the plain-text "Alternate" field).
    • `unsupported-entity-definition-object` (error): the primary field is set to a standard object that can't actually go through an `EntityDefinition` metadata relationship (e.g. `ServiceResource`, `Task`) — this is a hard Setup/deploy failure with no fallback.
    • `unnecessary-entity-definition-alternate` (warning): the Alternate field is set to an object that's actually eligible (e.g. `Account`, or any custom object) — nothing's broken (AT4DX unions both fields at runtime), but it's the wrong field choice.
  • Both check against a new maintained internal allowlist (`ENTITY_DEFINITION_STANDARD_OBJECTS`), not a live org `describe` call, so `--source-dir`-only validation stays fully connection-free, consistent with every other rule in this command.
  • Full design rationale, alternatives considered (including why an org-describe-based check was rejected), and the allowlist's best-effort/non-authoritative status are in docs/design/0014.

Test plan

  • New unit tests in `simply-aep-core` covering both rules, including the two ways they interact with the existing `ambiguous-sobject-reference` rule (co-occur vs. never co-occur).
  • Fixed two `simply-aep` command test fixtures and one `simply-aep-core` write test fixture that incidentally exercised the exact misuse these new rules now (correctly) flag.
  • Full `simply-aep-core` and `simply-aep` test suites pass locally (pre-existing, unrelated `simply-data` fixture failures aside).
  • `pnpm run readme` regenerated for `simply-aep-core`, `simply-aep`, and the `simply` orchestrator (which bundles `simply-aep`); `pnpm --filter site run sync` regenerated the two affected docs-site pages.
  • `pnpm run build` passes for all three packages (lint, compile, command-snapshot).

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

https://claude.ai/code/session_014oTGUGohBiqrzETHCs25AB

ClayChipps and others added 2 commits August 28, 2026 21:38
…ocess-binding SObject fields

Adds two new domain-process-binding validate rules: unsupported-entity-definition-object
flags RelatedDomainBindingSObject__c set to a standard object that can't actually go
through an EntityDefinition metadata relationship, and unnecessary-entity-definition-alternate
flags RelatedDomainBindingSObjectAlternate__c set to an object that didn't need the
Alternate field. Both check against a maintained internal allowlist rather than an org
describe call, so --source-dir-only validation stays connection-free.

See docs/design/0014-domain-process-binding-entity-definition-eligibility.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014oTGUGohBiqrzETHCs25AB
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014oTGUGohBiqrzETHCs25AB
@ClayChipps
ClayChipps enabled auto-merge August 29, 2026 01:53
@ClayChipps
ClayChipps merged commit 6845c24 into main Aug 29, 2026
6 checks passed
@ClayChipps
ClayChipps deleted the feat/at4dx-domain-process-binding-entity-definition-eligibility branch August 29, 2026 02: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