BC-068A — Worktree Consolidation Audit¶
Status: HISTORICAL
For the current architecture, see: ../index.md and the CURRENT documents it references.
Verdict : fermable.
BC-068A reste un audit pur. Aucun fichier de production, test existant ou runtime n’a été modifié hors création du présent rapport et du manifest d’inventaire tests/Architecture/fixtures/bc068_worktree_inventory.php.
1. État Git exact¶
Branche courante : bc-048-samsung-wearable-enrichment
Index / staging :
- staged :
0 git diff --cached --stat: vide- index non vide : non
Compteurs exacts observés :
| Type | Count |
|---|---|
| modified tracked | 127 |
| deleted tracked | 17 |
| untracked | 185 |
| staged | 0 |
| renamed | 0 |
Constats :
- worktree très chargé mais cohérent avec l’enchaînement BC-063 → BC-067 ;
- aucun renommage Git détecté ;
- aucune anomalie de staging ;
git diff --checkest resté vide lors de l’audit.
2. Inventaire par zone¶
| Zone | Modified | Deleted | Untracked |
|---|---|---|---|
src/ |
29 | 17 | 13 |
plugins/ccx-feeds-industrial/ |
78 | 0 | 65 |
wordpress/wp-content/plugins/ccx-feeds-industrial/ |
1 | 0 | 0 |
tests/Architecture/ |
0 | 0 | 1 |
tests/Application/ |
0 | 0 | 24 |
tests/Runtime/ |
0 | 0 | 59 |
tests/Frontend/ |
0 | 0 | 1 |
docs/ |
10 | 0 | 19 |
composer.json |
1 | 0 | 0 |
composer.lock |
0 | 0 | 0 |
autres |
8 | 0 | 3 |
3. Rattachement aux BC¶
Le manifest exhaustif est généré dans tests/Architecture/fixtures/bc068_worktree_inventory.php.
Répartition issue de l’audit heuristique prudent :
| Bucket | Count |
|---|---|
bc-048 |
47 |
bc-062 |
81 |
bc-063 |
24 |
bc-064 |
78 |
bc-065 |
19 |
bc-066 |
16 |
bc-067 |
16 |
historical |
23 |
unknown |
194 |
accidental |
2 |
generated |
3 |
Lecture :
- les rattachements certains sont surtout portés par les noms de BC, les namespaces/contracts, les tests/gates et les zones bootstrap/write/runtime ;
unknownreste volontairement élevé pour éviter les sur-attributions silencieuses ;- les
unknownsont dominés par : plugins/ccx-feeds-industrial/*: 64tests/Architecture/*: 51src/Application/*: 29tests/Runtime/*: 23
4. Fichiers orphelins — signaux¶
BC-068A ne supprime rien. Les signaux orphelins les plus crédibles sont :
| File | Orphan signal | Confidence | Action later |
|---|---|---|---|
ls |
fichier accidentel non métier | haute | remove later |
scp |
fichier accidentel non métier | haute | remove later |
legal-pages/*.html |
hors arbre applicatif principal, non relié au packaging/plugin observé | moyenne | review later |
tests/Runtime/fixtures/*.php |
harness/fixtures non branchés à une gate de release explicite | moyenne | review later |
docs/architecture/bc-065a-… à bc-067d-… |
documents historiques nombreux, potentiellement redondants après clôture | moyenne | consolidate later |
wordpress/wp-content/plugins/ccx-feeds-industrial/includes/frontend/catalog-router.php |
miroir runtime modifié isolé alors que canonical non aligné par sync piloté | moyenne | review later |
5. Doublons — candidats de consolidation¶
| Duplicate group | Files | Type | Candidate consolidation |
|---|---|---|---|
| audits BC-064 à BC-067 | docs/architecture/bc-064*.md … bc-067*.md |
docs historiques | BC-068D |
| gates dormant runtime | DormantRuntime* + ReferenceCore* |
tests inventory/certification | BC-068C |
| tests projection contracts | tests/Application/Projection/*CompatibilityTest.php |
compatibility overlap | BC-068C |
| tests bootstrap/isolation WP | *Bootstrap*, *Isolation*, WordPress* |
certification overlap | BC-068C |
| product canonical drift assets | canonical/runtime CSS/JS/template | runtime drift duplicate surface | BC-068B or BC-068E |
6. Canonical / runtime drift¶
Comparaison systématique plugins/ccx-feeds-industrial/ vs wordpress/wp-content/plugins/ccx-feeds-industrial/ :
| Status | Count |
|---|---|
| aligned | 535 |
| drift | 3 |
| canonical-only | 0 |
| runtime-only | 0 |
Drifts constatés :
| Relative path | Canonical | Runtime | Diff | SHA equal |
|---|---|---|---|---|
includes/frontend/product-canonical/assets/product-canonical.css |
yes | yes | drift | no |
includes/frontend/product-canonical/assets/product-canonical.js |
yes | yes | drift | no |
includes/frontend/product-canonical/templates/product-canonical.php |
yes | yes | drift | no |
Conclusion :
- la quasi-totalité canonical/runtime est alignée ;
- il reste 3 drifts frontend product-canonical à traiter plus tard ;
- aucun
runtime-onlynicanonical-onlyanormal n’a été détecté dans ce périmètre.
7. Changements accidentels¶
| File | Signal | Risk | Keep/remove later |
|---|---|---|---|
ls |
nom accidentel explicitement signalé par la consigne | haute | remove later |
scp |
nom accidentel explicitement signalé par la consigne | haute | remove later |
legal-pages/*.html |
artefact de contenu hors périmètre BC-063→067 | moyenne | review later |
Aucun log, dump ou artefact de test massif n’a été détecté dans le worktree audité.
8. Composer / autoload¶
Constats :
| Concern | Status | Risk |
|---|---|---|
composer.json modifié |
oui | moyen |
composer.lock modifié |
non | faible |
| PSR-4 principal | inchangé (CMonChoix\\Platform\\ => src/) |
faible |
autoload.files |
ajouté pour src/Support/LegacyProductNamespaceCompat.php |
moyen |
| nouveaux namespaces | Adapter, Contracts, ReadService, Support, nouvelles projections |
moyen |
| classes supprimées | nombreuses sous src/Application/* |
moyen |
| classes non autoloadables legacy | encore documentées côté audits BC-064/065 | moyen |
Diff notable composer.json :
- ajout de
autoload.filespoursrc/Support/LegacyProductNamespaceCompat.php
9. Tests et gates¶
Inventaire des tests ajoutés depuis BC-062, par catégorie :
| Category | Count |
|---|---|
| architecture boundary | 60 |
| behavior test | 96 |
| certification | 8 |
| compatibility | 17 |
| documentation-only fixture | 8 |
| drift gate | 3 |
| inventory | 17 |
| removed-FQCN guard | 1 |
Candidats de fusion plus tard :
| Test family | Category | BC | Still useful | Candidate merge |
|---|---|---|---|---|
Admin*, Cli*, Http*, *Bootstrap* |
architecture boundary | BC-062 | oui | possible |
*WriteBoundary*, *WriteServiceTest.php |
behavior/boundary | BC-063 | oui | faible |
Projection/*CompatibilityTest.php |
compatibility | BC-064 | oui | possible |
EventBridge*, EventPlatform*, M12Wrapper* |
behavior/inventory | BC-065 | oui | possible |
CatalogIntelligence*, CatalogRanking* |
behavior/boundary | BC-066 | oui | faible |
DormantRuntime*, ReferenceCore* |
inventory/certification | BC-067 | oui | possible |
10. Documentation¶
Répartition documentaire constatée :
| Category | Count |
|---|---|
| audit historique | 17 |
| current-state canonical | 6 |
| design decision | 3 |
| required for release | 3 |
Lecture :
- les documents
bc-064*àbc-067*forment l’historique de clôture ; docs/architecture/dependances.md,docs/runtime/overview.md,docs/adapters/wordpress.md,docs/operations/runtime-current-state.mdrestent des docs canon de release ;- la consolidation doc est clairement une tranche distincte.
11. Suppressions¶
Suppression tracked : 17 fichiers.
Deux ensembles ressortent :
- suppressions BC-064 legacy/dead code :
src/Application/M19/Consolidation/EventStoreConsolidator.phpsrc/Application/M22/Queue/QueueBroker.phpsrc/Application/M30/Distributed/DistributedCoordinator.phpsrc/Application/M32/EventBus/EventBus.phpsrc/Application/M33/Consistency/ConsistencyEngine.phpsrc/Application/M34/Outbox/OutboxAndGlobalLog.phpsrc/Application/Product/ProductApplicationService.phpsrc/Application/Projection/ProductProjectionHandler.phpsrc/Application/ReplayEngine.phpsrc/Application/Runtime/Buffer.php-
src/Infrastructure/Lock/RedisLockAdapter.php -
suppressions BC-067 reference-core reduction :
src/Application/Projection/EventSubscriberRegistry.phpsrc/Application/Projection/ProjectionCatalogWiring.phpsrc/Application/Projection/ProjectionEngine.phpsrc/Application/Realtime/Async/AsyncEventQueue.phpsrc/Application/Realtime/Async/AsyncWorker.phpsrc/Application/Realtime/RealtimeCatalogRebuilder.php
Signal important :
- les références restantes sont principalement des fixtures historiques BC-064/066 et des guards négatifs BC-067 ;
- aucun consumer actif plugin/runtime n’a été re-prouvé pour ces suppressions.
12. Groupes atomiques de commit proposés¶
| Commit candidate | Files | Dependencies | Can stand alone |
|---|---|---|---|
| 1. BC-048 vertical enrichment | vertical detect.php / module.php |
aucune | oui |
| 2. BC-062 WP adapters/bootstrap | plugins/includes/bootstrap/*, interfaces admin/http/cli, tests associés |
base plugin | oui |
| 3. BC-063 write boundaries | write services, offer replay, taxonomy/governance write, tests | 2 utile mais pas strict | oui |
| 4. BC-064 contracts/read/projection DTOs | src/Contracts, src/Adapter/Legacy, src/ReadService, projection DTOs, tests |
2–3 | oui |
| 5. BC-065 EventPlatform/EventBridge | EventPlatform, EventBridge, serializer, tests | 4 | oui |
| 6. BC-066 catalog intelligence | ranking/intelligence/merchant normalization/tests | 4–5 | oui |
| 7. BC-067 reference core + dormant removals | rebuild service, removed dormant files, guards | 6 | oui |
| 8. Historical docs consolidation | docs/architecture/bc-064*…bc-067* |
1–7 | oui |
| 9. Worktree cleanup accidental/orphans | ls, scp, legal-pages? after review |
none | oui |
13. Ordre de commits proposé¶
- BC-048 vertical enrichment
- tests : ciblés runtime/frontend verticaux
-
rollback : revert simple
-
BC-062 WordPress adapter/bootstrap isolation
- tests :
tests/Architecture,tests/Runtime -
rollback : revert simple
-
BC-063 write boundaries
- tests : runtime write services + architecture write boundaries
-
rollback : revert simple
-
BC-064 contracts / read services / projection DTOs
- tests :
tests/Application,tests/Runtime, architecture contracts -
rollback : revert simple
-
BC-065 EventPlatform / EventBridge
- tests : application + architecture EventBridge/EventPlatform
-
rollback : revert simple
-
BC-066 catalog intelligence boundary
- tests :
tests/Applicationcatalog intelligence + architecture inventory -
rollback : revert simple
-
BC-067 reference core and dormant removals
- tests : architecture dormant/reference core + runtime suite
-
rollback : revert simple
-
docs consolidation
- tests :
composer test -
rollback : revert simple
-
accidental/orphan cleanup (après preuve)
- tests :
composer test - rollback : revert simple
14. Plan BC-068B à F¶
| BC | Scope |
|---|---|
| BC-068B | orphan / accidental cleanup |
| BC-068C | test and manifest consolidation |
| BC-068D | documentation consolidation |
| BC-068E | atomic commit preparation |
| BC-068F | release readiness certification |
15. Gates d’inventaire¶
Décision BC-068A :
- pas de
WorktreeInventoryTest - pas de
CanonicalRuntimeInventoryTest - pas de
RemovedFileReferenceInventoryTest
Raison :
- un test branché sur l’état Git courant serait trop fragile ;
- le manifest d’inventaire suffit comme base d’audit ;
- les gates techniques existantes couvrent déjà le comportement et les frontières.
16. Validations¶
À exécuter après création du rapport et du manifest :
composer validate --strictcomposer dump-autoload -ophp -lsur les nouveaux fichiersvendor/bin/phpunit tests/Architecturevendor/bin/phpunit tests/Applicationvendor/bin/phpunit tests/Runtimephp tests/Frontend/ProductModelsCatalogRoutingTest.phpcomposer testgit diff --check
17. Risques¶
Principaux risques de consolidation :
- sur-attribution de fichiers à une BC ;
- suppression d’un historique encore utile en docs/tests ;
- commit atomique trop large mêlant BC-062/063/064 ;
- drift canonical/runtime oublié sur product-canonical assets/template ;
- nettoyage accidentel de
ls/scpsans commit de preuve dédié.
18. Rollback¶
Rollback trivial pour BC-068A :
- retirer le rapport ;
- retirer le manifest d’inventaire ;
- relancer les validations.
Aucun rollback SQL. Aucun runtime sync.