Skip to content

refactor(architecture): count Kernel files only Core uses to Core (X95, part 1) - #10992

Merged
rubenvdlinde merged 3 commits into
mainfrom
cloud/mod-X95-core-rows
Nov 21, 2026
Merged

rubenvdlinde merged 3 commits into
mainfrom
cloud/mod-X95-core-rows

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Package X95 (K-rows), part 1 of 3: kernel.md K5-01, Appendix A "To Core".

What moved and why

Kernel files that only Core dispatches, throws, catches or builds now count to Core, by their row in scripts/component-map.csv (no file moves, no code change). These are Core's own events (custom scope, action evaluation, reference validation, registry subscription, relation decision, user profile, matrix rows, identity claims, object activation), the bulk-save outcome types, ObjectEventSubscription, OasValidationReportInterface and Core's write, schema and RBAC refusals. The organisation events and their base AbstractOrganisationEvent move too: Core dispatches them, so they are Core's work; the three concrete events stay exposed from Core because Integrations and Processes listen, which is the allowed direction. Four Dto/ files that fell under the directory row got a file row.

  • Core: Dto/BulkRowCount.php, Dto/BulkSaveOutcome.php, Dto/BulkSaveOutcomeInterface.php, Dto/BulkSaveOutcomes.php, Dto/StreamedRowCount.php, Event/AbstractOrganisationEvent.php, Event/AbstractReferenceValidationEvent.php, Event/AbstractRegistrySubscriptionEvent.php, Event/ActionEvaluatedEvent.php, Event/CustomScopeAccessors.php, Event/CustomScopeEvaluatedEvent.php, Event/CustomScopeEvaluatingEvent.php, Event/EntityRelationDecisionUpdatedEvent.php, Event/EvaluatedSchemaActionAccessors.php, Event/IdentityClaimsCollectingEvent.php, Event/MatrixRowsRequestedEvent.php, Event/ObjectActivatedEvent.php, Event/ObjectEventSubscription.php, Event/OrganisationCreatedEvent.php, Event/OrganisationDeletedEvent.php, Event/OrganisationUpdatedEvent.php, Event/ReferenceValidatedEvent.php, Event/ReferenceValidationFailedEvent.php, Event/RegistrySubscriptionEndedEvent.php, Event/RegistrySubscriptionRequestedEvent.php, Event/UserProfileUpdatedEvent.php, Exception/AppendOnlyException.php, Exception/ArchiveNotOfferedException.php, Exception/AuthorizationBlockException.php, Exception/BreakingSchemaChangeException.php, Exception/BrokenReference.php, Exception/CircularReferenceException.php, Exception/CodedValueException.php, Exception/DatabaseConstraintException.php, Exception/DatabaseConstraintMessages.php, Exception/DraftActivationRefusedException.php, Exception/EncryptedFieldSortException.php, Exception/FieldDecryptionException.php, Exception/GrantExceedsGranterException.php, Exception/InvalidAuthorizationRuleException.php, Exception/OasValidationException.php, Exception/ObjectLookupFailedException.php, Exception/OrganisationSlugConflictException.php, Exception/ReadOnlyTypeException.php, Exception/ReferenceCycle.php, Exception/ReferenceValidationException.php, Exception/SchemaImportException.php, Exception/SchemaNotFoundException.php, Exception/SchemaRunConcurrencyException.php, Exception/SearchTermSyntaxException.php, Exception/SharedMasterDataWriteException.php, Exception/SlugBackfillWriteException.php, Exception/SystemContextUnavailableException.php, Exception/TranslationTargetConflictException.php, Exception/ViewAlertRecipientException.php, Service/Oas/OasValidationReportInterface.php

Re-measured on main b85c154e

  • Not moved, finding: Exception/FolderAccessDeniedException (now also named by Files), Exception/LockedException (also Compliance) and Exception/UniqueHintException (also Search). They are shared by several areas since the Kernel plan was written, so they stay in Kernel; moving them would only shift the exposure to Core.
  • Already done: the 5 references against the order kernel.md expected this step to remove (organisation 3, relation decision 1, event subscription 1) are gone on main already; this step removes none and adds none.

Exposed lines per area (main → this PR)

Area Before After Difference
Kernel 8,464 7,382 -1,082
Core 57,319 57,351 +32
Notifications 1,760 1,760 +0
Search 1,344 1,344 +0
Compliance 14,300 14,300 +0
Files 1,263 1,263 +0
Integrations 17,733 17,733 +0
Processes 27,040 27,040 +0
Configuration 874 874 +0
Platform 61 61 +0
Total 130,158 129,108 -1,050

Expected in the package file for all three parts together: Kernel 8,571 → 5,984 (−2,587). Measured for this part: Kernel −1,082, Core +32, total −1,050.

References against the order

38 before, 38 after. No newly exposed file, no new Kernel file.

Modularity baseline

Re-recorded with --write-baseline: 46 entries of exposed_files and 56 of kernel_files gone (the moved files), exposed_loc Kernel 8,464 → 7,382 and Core 57,319 → 57,351, kernel_loc 10,402 → 9,044. against_order and the violation degree (0.0049) are unchanged.

What ran

  • php -l, phpcs, psalm: no PHP file changed (the diff is the csv, the two files generated from it and the modularity baseline), so nothing to lint.
  • phpstan on lib: lib/ is byte-identical to main b85c154e; vendor/bin/phpstan analyse --no-progress reports the same 37 errors main has, none new.
  • python3 scripts/component-patterns.py and deptrac_areas.py regenerated the two generated files; component-patterns.py --check passes (only the stale-row notices main already prints).
  • The modularity check --check: passed against main's baseline before re-recording (gone entries only, no newly exposed file, no new Kernel file, no new reference against the order); passes after --write-baseline.
  • The deptrac areas check --check: passed, 39 class pairs in violation as recorded (its "851 gone" notice is the same on main; the deptrac baseline is left to the coordinator).
  • vendor/bin/phpunit --no-coverage tests/Unit/Architecture (all of it, run in two halves): OK, 2,371 tests, 8,057 assertions.
  • Full tests/Unit is run once per package, on its last PR (part 3).

Land first; parts 2 and 3 stack on this branch.

Written with Claude Code (claude-opus-5-5)


Generated by Claude Code

The events, bulk-save outcomes and refusals that only Core dispatches,
throws or catches are Core's work: their csv rows move from Kernel to
Core (kernel.md K5-01, Appendix A "To Core"). The organisation events
and their abstract base move with them; the three concrete events stay
exposed from Core, since Integrations and Processes listen.

FolderAccessDeniedException, LockedException and UniqueHintException
stay in Kernel: Files, Compliance and Search now name them too.

Assisted-by: ClaudeCode:claude-opus-5-5
…re's Kernel files to Core

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde requested a review from a team as a code owner November 21, 2026 16:07
@rubenvdlinde
rubenvdlinde merged commit 1e32ce0 into main Nov 21, 2026
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