Repository: carrot-foundation/methodology-rules
Pull request #215: refactor(shared): unify methodology document creation in mass-id rule processor tests
Author: login: AMarcosCastelo
Labels: name: refactoring
Created: 2025-04-25T22:00:55Z | Merged: 2025-04-28T12:18:33Z

### Summary

This change refactors the handling of actor participants and methodology document stubs in the BOLD methodology codebase. The `BoldStubsBuilder` class is updated to distinguish between mass ID and methodology actor participants, introducing new constants and methods for each group. The method for creating methodology documents is renamed from `.createMethodologyDocuments()` to `.createMethodologyDocument()`, with all related test setups and stub creation logic updated accordingly. Enum types are revised to clarify actor roles and document subtypes, and a new stub builder for methodology definition documents is added. Test files and supporting types are updated to align with these structural changes.

---

- [x] **I, the PR author, declare that this PR works as expected and does not break any service. I also declare that I gave my best to apply all of the best practices and that I'm leaving the code better than I found it.**


Diff:
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.lambda.e2e.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.lambda.e2e.spec.ts
index aa1797506..fa72b3011 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.lambda.e2e.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.lambda.e2e.spec.ts
@@ -41,7 +41,7 @@ describe('AvoidedEmissionsProcessor E2E', () => {
           },
         })
         .createMassIdAuditDocument()
-        .createMethodologyDocuments()
+        .createMethodologyDocument()
         .createParticipantHomologationDocuments(homologationDocuments)
         .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.processor.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.processor.spec.ts
index c5190f70b..e338efaa7 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.processor.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.processor.spec.ts
@@ -37,7 +37,7 @@ describe('AvoidedEmissionsProcessor', () => {
             },
           })
           .createMassIdAuditDocument()
-          .createMethodologyDocuments()
+          .createMethodologyDocument()
           .createParticipantHomologationDocuments(homologationDocuments)
           .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.test-cases.ts b/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.test-cases.ts
index 0ddae4c99..32e74c7c7 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.test-cases.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.test-cases.ts
@@ -68,7 +68,7 @@ const {
 } = new BoldStubsBuilder()
   .createMassIdDocument()
   .createMassIdAuditDocument()
-  .createMethodologyDocuments()
+  .createMethodologyDocument()
   .createParticipantHomologationDocuments()
   .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.lambda.e2e.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.lambda.e2e.spec.ts
index 59bb6b2ee..b5df09818 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.lambda.e2e.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.lambda.e2e.spec.ts
@@ -35,10 +35,10 @@ describe('GeolocationPrecisionProcessor E2E', () => {
         massIdAuditDocument,
         massIdDocument,
         participantsHomologationDocuments,
-      } = new BoldStubsBuilder({ actorParticipants })
+      } = new BoldStubsBuilder({ massIdActorParticipants: actorParticipants })
         .createMassIdDocument(massIdDocumentParameters)
         .createMassIdAuditDocument()
-        .createMethodologyDocuments()
+        .createMethodologyDocument()
         .createParticipantHomologationDocuments(homologationDocuments)
         .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.processor.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.processor.spec.ts
index c5900a81b..5f7c51420 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.processor.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.processor.spec.ts
@@ -29,10 +29,10 @@ describe('GeolocationPrecisionProcessor', () => {
         massIdAuditDocument,
         massIdDocument,
         participantsHomologationDocuments,
-      } = new BoldStubsBuilder({ actorParticipants })
+      } = new BoldStubsBuilder({ massIdActorParticipants: actorParticipants })
         .createMassIdDocument(massIdDocumentParameters)
         .createMassIdAuditDocument()
-        .createMethodologyDocuments()
+        .createMethodologyDocument()
         .createParticipantHomologationDocuments(homologationDocuments)
         .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.test-cases.ts b/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.test-cases.ts
index 3793cfdf3..1e120cb8b 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.test-cases.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.test-cases.ts
@@ -1,9 +1,7 @@
-import type { MethodologyParticipant } from '@carrot-fndn/shared/types';
-
 import { calculateDistance } from '@carrot-fndn/shared/helpers';
 import {
-  ACTOR_PARTICIPANTS,
   BoldStubsBuilder,
+  MASS_ID_ACTOR_PARTICIPANTS,
   type StubBoldDocumentParameters,
   generateNearbyCoordinates,
   stubAddress,
@@ -18,6 +16,7 @@ import {
   MassIdDocumentActorType,
 } from '@carrot-fndn/shared/methodologies/bold/types';
 import { RuleOutputStatus } from '@carrot-fndn/shared/rule/types';
+import { type MethodologyParticipant } from '@carrot-fndn/shared/types';
 import { faker } from '@faker-js/faker';
 
 import { GeolocationPrecisionProcessorErrors } from './geolocation-precision.errors';
@@ -29,13 +28,16 @@ const { CAPTURED_GPS_LATITUDE, CAPTURED_GPS_LONGITUDE } =
   DocumentEventAttributeName;
 
 const actorParticipants = new Map(
-  ACTOR_PARTICIPANTS.map((subtype) => [
+  MASS_ID_ACTOR_PARTICIPANTS.map((subtype) => [
     subtype,
     stubParticipant({ id: faker.string.uuid(), type: subtype }),
   ]),
 );
 const actorsCoordinates = new Map(
-  ACTOR_PARTICIPANTS.map((subtype) => [subtype, generateNearbyCoordinates()]),
+  MASS_ID_ACTOR_PARTICIPANTS.map((subtype) => [
+    subtype,
+    generateNearbyCoordinates(),
+  ]),
 );
 
 const recyclerParticipant = actorParticipants.get(
@@ -330,7 +332,7 @@ const {
     },
   })
   .createMassIdAuditDocument()
-  .createMethodologyDocuments()
+  .createMethodologyDocument()
   .createParticipantHomologationDocuments()
   .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.spec.ts
index 419175878..9ea3301a5 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.spec.ts
@@ -1,7 +1,7 @@
 import type { Document } from '@carrot-fndn/shared/methodologies/bold/types';
 
 import { loadParentDocument } from '@carrot-fndn/shared/methodologies/bold/io-helpers';
-import { MassIdSubtype } from '@carrot-fndn/shared/methodologies/bold/types';
+import { MassIdOrganicSubtype } from '@carrot-fndn/shared/methodologies/bold/types';
 import {
   type RuleInput,
   type RuleOutput,
@@ -27,14 +27,14 @@ describe('MassDefinitionProcessor', () => {
       expect(result).toBe(false);
     });
 
-    it('should return true when subtype is in MassIdSubtype enum', () => {
-      const validSubtype = stubEnumValue(MassIdSubtype);
+    it('should return true when subtype is in MassIdOrganicSubtype enum', () => {
+      const validSubtype = stubEnumValue(MassIdOrganicSubtype);
       const result = ruleDataProcessor['isValidSubtype'](validSubtype);
 
       expect(result).toBe(true);
     });
 
-    it('should return false when subtype is not in MassIdSubtype enum', () => {
+    it('should return false when subtype is not in MassIdOrganicSubtype enum', () => {
       const result = ruleDataProcessor['isValidSubtype'](
         'THIS_IS_DEFINITELY_NOT_IN_MASS_SUBTYPE_ENUM',
       );
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.ts b/libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.ts
index fd230c18f..8bbac4f17 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.ts
@@ -6,14 +6,14 @@ import {
   type Document,
   DocumentCategory,
   DocumentType,
-  MassIdSubtype,
+  MassIdOrganicSubtype,
   MeasurementUnit,
 } from '@carrot-fndn/shared/methodologies/bold/types';
 import { RuleOutputStatus } from '@carrot-fndn/shared/rule/types';
 
 import { MassDefinitionProcessorErrors } from './mass-definition.errors';
 
-const ALLOWED_SUBTYPES: string[] = Object.values(MassIdSubtype);
+const ALLOWED_SUBTYPES: string[] = Object.values(MassIdOrganicSubtype);
 
 const { MASS_ID } = DocumentCategory;
 const { KG } = MeasurementUnit;
@@ -26,8 +26,8 @@ export const RESULT_COMMENTS = {
     `The document category must be "${MASS_ID}", but "${category}" was provided.`,
   INVALID_MEASUREMENT_UNIT: (measurementUnit: string): string =>
     `The measurement unit must be "${KG}", but "${measurementUnit}" was provided.`,
-  INVALID_SUBTYPE: (subtype: string): string =>
-    `The subtype "${subtype}" is not among the allowed values.`,
+  INVALID_SUBTYPE: (subtype: unknown): string =>
+    `The subtype "${String(subtype)}" is not among the allowed values.`,
   INVALID_TYPE: (type: string): string =>
     `The document type must be "${ORGANIC}", but "${type}" was provided.`,
   INVALID_VALUE: (value: number): string =>
@@ -102,7 +102,7 @@ export class MassDefinitionProcessor extends ParentDocumentRuleProcessor<Documen
         isValid: document.currentValue > 0,
       },
       {
-        errorMessage: this.RESULT_COMMENT.INVALID_SUBTYPE(document.subtype!),
+        errorMessage: this.RESULT_COMMENT.INVALID_SUBTYPE(document.subtype),
         isValid: this.isValidSubtype(document.subtype),
       },
     ];
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.lambda.e2e.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.lambda.e2e.spec.ts
index ab6e6367f..add12a64b 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.lambda.e2e.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.lambda.e2e.spec.ts
@@ -35,10 +35,10 @@ describe('MassSortingProcessor E2E', () => {
         massIdAuditDocument,
         massIdDocument,
         participantsHomologationDocuments,
-      } = new BoldStubsBuilder({ actorParticipants })
+      } = new BoldStubsBuilder({ massIdActorParticipants: actorParticipants })
         .createMassIdDocument({ externalEventsMap: massIdEvents })
         .createMassIdAuditDocument()
-        .createMethodologyDocuments()
+        .createMethodologyDocument()
         .createParticipantHomologationDocuments(homologationDocuments)
         .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.processor.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.processor.spec.ts
index 543389d5a..be65bca69 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.processor.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.processor.spec.ts
@@ -30,12 +30,12 @@ describe('MassSortingProcessor', () => {
           massIdAuditDocument,
           massIdDocument,
           participantsHomologationDocuments,
-        } = new BoldStubsBuilder({ actorParticipants })
+        } = new BoldStubsBuilder({ massIdActorParticipants: actorParticipants })
           .createMassIdDocument({
             externalEventsMap: massIdEvents,
           })
           .createMassIdAuditDocument()
-          .createMethodologyDocuments()
+          .createMethodologyDocument()
           .createParticipantHomologationDocuments(homologationDocuments)
           .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.test-cases.ts b/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.test-cases.ts
index b7e8a2c27..9357f3ea2 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.test-cases.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.test-cases.ts
@@ -1,6 +1,6 @@
 import {
-  ACTOR_PARTICIPANTS,
   BoldStubsBuilder,
+  MASS_ID_ACTOR_PARTICIPANTS,
   stubBoldEmissionAndCompostingMetricsEvent,
   stubBoldMassIdDropOffEvent,
   stubBoldMassIdSortingEvent,
@@ -37,7 +37,7 @@ const calculatedSortingValue = valueBeforeSorting * sortingFactor;
 const wrongSortingValue = calculatedSortingValue + 0.15;
 
 const actorParticipants = new Map(
-  ACTOR_PARTICIPANTS.map((subtype) => [
+  MASS_ID_ACTOR_PARTICIPANTS.map((subtype) => [
     subtype,
     stubParticipant({ id: faker.string.uuid(), type: subtype }),
   ]),
@@ -159,7 +159,7 @@ const {
     },
   })
   .createMassIdAuditDocument()
-  .createMethodologyDocuments()
+  .createMethodologyDocument()
   .createParticipantHomologationDocuments()
   .build();
 
@@ -174,7 +174,7 @@ const invalidSortingValue = new BoldStubsBuilder()
     },
   })
   .createMassIdAuditDocument()
-  .createMethodologyDocuments()
+  .createMethodologyDocument()
   .createParticipantHomologationDocuments()
   .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/participant-homologations/participant-homologations.test-cases.ts b/libs/methodologies/bold/rule-processors/mass-id/src/participant-homologations/participant-homologations.test-cases.ts
index 92f04c1db..1bf99b3f6 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/participant-homologations/participant-homologations.test-cases.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/participant-homologations/participant-homologations.test-cases.ts
@@ -22,14 +22,14 @@ const processorError = new ParticipantHomologationsProcessorErrors();
 const massIdAuditWithHomologations = new BoldStubsBuilder()
   .createMassIdDocument()
   .createMassIdAuditDocument()
-  .createMethodologyDocuments()
+  .createMethodologyDocument()
   .createParticipantHomologationDocuments()
   .build();
 
 const massIdWithExpiredHomologation = new BoldStubsBuilder()
   .createMassIdDocument()
   .createMassIdAuditDocument()
-  .createMethodologyDocuments()
+  .createMethodologyDocument()
   .createParticipantHomologationDocuments(
     new Map([
       [
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.lambda.e2e.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.lambda.e2e.spec.ts
index 858aa72a6..60b72d354 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.lambda.e2e.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.lambda.e2e.spec.ts
@@ -39,7 +39,7 @@ describe('WeighingProcessor E2E', () => {
           externalEventsMap: massIdDocumentEvents,
         })
         .createMassIdAuditDocument()
-        .createMethodologyDocuments()
+        .createMethodologyDocument()
         .createParticipantHomologationDocuments(homologationDocuments)
         .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.processor.spec.ts b/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.processor.spec.ts
index eb5728754..bd4184ba6 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.processor.spec.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.processor.spec.ts
@@ -34,7 +34,7 @@ describe('WeighingProcessor', () => {
             externalEventsMap: massIdDocumentEvents,
           })
           .createMassIdAuditDocument()
-          .createMethodologyDocuments()
+          .createMethodologyDocument()
           .createParticipantHomologationDocuments(homologationDocuments)
           .build();
 
diff --git a/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.test-cases.ts b/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.test-cases.ts
index e6fdda6ad..3e4ab440d 100644
--- a/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.test-cases.ts
+++ b/libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.test-cases.ts
@@ -686,7 +686,7 @@ const {
 } = new BoldStubsBuilder()
   .createMassIdDocument()
   .createMassIdAuditDocument()
-  .createMethodologyDocuments()
+  .createMethodologyDocument()
   .createParticipantHomologationDocuments()
   .build();
 
diff --git a/libs/shared/methodologies/bold/testing/src/builders/bold-mass-id.stubs.ts b/libs/shared/methodologies/bold/testing/src/builders/bold-mass-id.stubs.ts
index f6feddde4..ffb7318d2 100644
--- a/libs/shared/methodologies/bold/testing/src/builders/bold-mass-id.stubs.ts
+++ b/libs/shared/methodologies/bold/testing/src/builders/bold-mass-id.stubs.ts
@@ -11,7 +11,7 @@ import {
   DocumentEventVehicleType,
   DocumentEventWeighingCaptureMethod,
   DocumentType,
-  MassIdSubtype,
+  MassIdOrganicSubtype,
   MeasurementUnit,
   ReportType,
 } from '@carrot-fndn/shared/methodologies/bold/types';
@@ -337,6 +337,7 @@ export const stubBoldMassIdDocument = ({
   return {
     ...stubDocument(
       {
+        subtype: stubEnumValue(MassIdOrganicSubtype),
         ...partialDocument,
         category: MASS_ID,
         currentValue: isNil(partialDocument?.currentValue)
@@ -347,7 +348,6 @@ export const stubBoldMassIdDocument = ({
           ...(partialDocument?.externalEvents ?? []),
         ],
         measurementUnit: MeasurementUnit.KG,
-        subtype: stubEnumValue(MassIdSubtype),
         type: DocumentType.ORGANIC,
       },
       false,
diff --git a/libs/shared/methodologies/bold/testing/src/builders/bold-methodology-definition.stubs.ts b/libs/shared/methodologies/bold/testing/src/builders/bold-methodology-definition.stubs.ts
new file mode 100644
index 000000000..da0d62b4e
--- /dev/null
+++ b/libs/shared/methodologies/bold/testing/src/builders/bold-methodology-definition.stubs.ts
@@ -0,0 +1,36 @@
+import { isNil } from '@carrot-fndn/shared/helpers';
+import {
+  type Document,
+  DocumentCategory,
+  DocumentType,
+} from '@carrot-fndn/shared/methodologies/bold/types';
+
+import { stubDocument } from '../stubs';
+import { mergeEventsMaps } from './bold.builder.helpers';
+import { type StubBoldDocumentParameters } from './bold.stubs.types';
+
+const { METHODOLOGY } = DocumentCategory;
+
+export const stubBoldMethodologyDefinitionDocument = ({
+  externalEventsMap,
+  partialDocument,
+}: StubBoldDocumentParameters = {}): Document => {
+  const mergedEventsMap = isNil(externalEventsMap)
+    ? new Map()
+    : mergeEventsMaps(new Map(), externalEventsMap);
+
+  return {
+    ...stubDocument(
+      {
+        ...partialDocument,
+        category: METHODOLOGY,
+        externalEvents: [
+          ...mergedEventsMap.values(),
+          ...(partialDocument?.externalEvents ?? []),
+        ],
+        type: DocumentType.DEFINITION,
+      },
+      false,
+    ),
+  };
+};
diff --git a/libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts b/libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts
index c1594a8c6..c8c369319 100644
--- a/libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts
+++ b/libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts
@@ -1,9 +1,3 @@
-import type {
-  Geolocation,
-  MethodologyAddress,
-  MethodologyParticipant,
-} from '@carrot-fndn/shared/types';
-
 import { isNil } from '@carrot-fndn/shared/helpers';
 import {
   type Document,
@@ -14,8 +8,14 @@ import {
   DocumentSubtype,
   DocumentType,
   MassIdDocumentActorType,
+  MethodologyDocumentActorType,
 } from '@carrot-fndn/shared/methodologies/bold/types';
 import { stubArray } from '@carrot-fndn/shared/testing';
+import {
+  type Geolocation,
+  type MethodologyAddress,
+  type MethodologyParticipant,
+} from '@carrot-fndn/shared/types';
 import { faker } from '@faker-js/faker';
 
 import type { StubBoldDocumentParameters } from './bold.stubs.types';
@@ -25,7 +25,6 @@ import {
   stubAddress,
   stubCreditDocument,
   stubDocumentEvent,
-  stubMethodologyDefinitionDocument,
   stubParticipant,
   stubParticipantHomologationGroupDocument,
 } from '../stubs';
@@ -35,6 +34,7 @@ import {
   stubBoldMassIdPickUpEvent,
 } from './bold-mass-id.stubs';
 import { stubBoldMassIdAuditDocument } from './bold-mass-id-audit.stubs';
+import { stubBoldMethodologyDefinitionDocument } from './bold-methodology-definition.stubs';
 import { stubBoldHomologationDocument } from './bold-participant-homologation.stubs';
 
 const { ACTOR, DROP_OFF, LINK, OUTPUT, PICK_UP, RELATED } = DocumentEventName;
@@ -45,36 +45,41 @@ const { FOOD_FOOD_WASTE_AND_BEVERAGES, GROUP, PROCESS, TCC, TRC } =
   DocumentSubtype;
 
 export interface BoldStubsBuilderOptions {
-  actorParticipants?: Map<string, MethodologyParticipant>;
+  massIdActorParticipants?: Map<string, MethodologyParticipant>;
   massIdAuditDocumentId?: string;
   massIdDocumentId?: string;
 }
 
 export interface BoldStubsBuilderResult {
-  actorParticipants: Map<string, MethodologyParticipant>;
-  actorParticipantsAddresses: Map<string, MethodologyAddress>;
   creditDocuments: Document[];
   creditDocumentsStubs: Document[];
+  massIdActorParticipants: Map<string, MethodologyParticipant>;
+  massIdActorParticipantsAddresses: Map<string, MethodologyAddress>;
   massIdAuditDocument: Document;
   massIdAuditId: string;
   massIdDocument: Document;
   massIdDocumentId: string;
+  methodologyActorParticipants: Map<string, MethodologyParticipant>;
   methodologyDocument: Document | undefined;
   participantsHomologationDocuments: Map<string, Document>;
 }
 
-export const ACTOR_PARTICIPANTS = [
+export const MASS_ID_ACTOR_PARTICIPANTS = [
   MassIdDocumentActorType.HAULER,
+  MassIdDocumentActorType.INTEGRATOR,
   MassIdDocumentActorType.PROCESSOR,
   MassIdDocumentActorType.RECYCLER,
   MassIdDocumentActorType.WASTE_GENERATOR,
 ] as const;
 
-export class BoldStubsBuilder {
-  private readonly actorParticipants: Map<string, MethodologyParticipant>;
-
-  private readonly actorParticipantsAddresses: Map<string, MethodologyAddress>;
+export const METHODOLOGY_ACTOR_PARTICIPANTS = [
+  MethodologyDocumentActorType.APPOINTED_NGO,
+  MethodologyDocumentActorType.NETWORK,
+  MethodologyDocumentActorType.METHODOLOGY_AUTHOR,
+  MethodologyDocumentActorType.METHODOLOGY_DEVELOPER,
+] as const;
 
+export class BoldStubsBuilder {
   private readonly actorsCoordinates: Map<
     string,
     { base: Geolocation; nearby: Geolocation }
@@ -88,6 +93,13 @@ export class BoldStubsBuilder {
 
   private readonly massAuditReference: DocumentReference;
 
+  private readonly massIdActorParticipants: Map<string, MethodologyParticipant>;
+
+  private readonly massIdActorParticipantsAddresses: Map<
+    string,
+    MethodologyAddress
+  >;
+
   private massIdAuditDocument: Document;
 
   private readonly massIdAuditDocumentId: string;
@@ -98,6 +110,11 @@ export class BoldStubsBuilder {
 
   private readonly massIdReference: DocumentReference;
 
+  private readonly methodologyActorParticipants: Map<
+    string,
+    MethodologyParticipant
+  >;
+
   private methodologyDocument?: Document;
 
   private methodologyReference?: DocumentReference;
@@ -116,11 +133,14 @@ export class BoldStubsBuilder {
     this.massIdAuditDocumentId =
       options.massIdAuditDocumentId ?? faker.string.uuid();
 
-    this.actorParticipants = this.initializeActorParticipants(
-      options.actorParticipants,
+    this.massIdActorParticipants = this.initializeMassIdActorParticipants(
+      options.massIdActorParticipants,
     );
+
+    this.methodologyActorParticipants =
+      this.initializeMethodologyActorParticipants();
     this.actorsCoordinates = this.initializeActorsCoordinates();
-    this.actorParticipantsAddresses = this.initializeActorAddresses();
+    this.massIdActorParticipantsAddresses = this.initializeActorAddresses();
 
     this.massIdReference = this.createMassIdReference();
     this.massAuditReference = this.createMassAuditReference();
@@ -151,20 +171,6 @@ export class BoldStubsBuilder {
     };
   }
 
-  private createActorEvents(): Record<string, DocumentEvent> {
-    return Object.fromEntries(
-      Array.from(this.actorParticipants, ([actorType, participant]) => [
-        `${ACTOR}-${actorType}`,
-        stubDocumentEvent({
-          address: this.actorParticipantsAddresses.get(actorType)!,
-          label: actorType,
-          name: ACTOR,
-          participant,
-        }),
-      ]),
-    );
-  }
-
   private createCreditDocuments(references: DocumentReference[]): Document[] {
     return references.map((reference) =>
       stubCreditDocument({
@@ -197,10 +203,10 @@ export class BoldStubsBuilder {
         DROP_OFF,
         stubBoldMassIdDropOffEvent({
           partialDocumentEvent: {
-            address: this.actorParticipantsAddresses.get(
+            address: this.massIdActorParticipantsAddresses.get(
               MassIdDocumentActorType.RECYCLER,
             )!,
-            participant: this.actorParticipants.get(
+            participant: this.massIdActorParticipants.get(
               MassIdDocumentActorType.RECYCLER,
             )!,
           },
@@ -217,10 +223,10 @@ export class BoldStubsBuilder {
         PICK_UP,
         stubBoldMassIdPickUpEvent({
           partialDocumentEvent: {
-            address: this.actorParticipantsAddresses.get(
+            address: this.massIdActorParticipantsAddresses.get(
               MassIdDocumentActorType.WASTE_GENERATOR,
             )!,
-            participant: this.actorParticipants.get(
+            participant: this.massIdActorParticipants.get(
               MassIdDocumentActorType.WASTE_GENERATOR,
             )!,
           },
@@ -239,6 +245,20 @@ export class BoldStubsBuilder {
     };
   }
 
+  private createMassIdActorEvents(): Record<string, DocumentEvent> {
+    return Object.fromEntries(
+      Array.from(this.massIdActorParticipants, ([actorType, participant]) => [
+        `${ACTOR}-${actorType}`,
+        stubDocumentEvent({
+          address: this.massIdActorParticipantsAddresses.get(actorType)!,
+          label: actorType,
+          name: ACTOR,
+          participant,
+        }),
+      ]),
+    );
+  }
+
   private createMassIdReference(): DocumentReference {
     return {
       category: MASS_ID,
@@ -248,6 +268,22 @@ export class BoldStubsBuilder {
     };
   }
 
+  private createMethodologyActorEvents(): Record<string, DocumentEvent> {
+    return Object.fromEntries(
+      Array.from(
+        this.methodologyActorParticipants,
+        ([actorType, participant]) => [
+          `${ACTOR}-${actorType}`,
+          stubDocumentEvent({
+            label: actorType,
+            name: ACTOR,
+            participant,
+          }),
+        ],
+      ),
+    );
+  }
+
   private createParticipantHomologationReference(
     subtype: string,
   ): DocumentReference {
@@ -261,7 +297,7 @@ export class BoldStubsBuilder {
 
   private initializeActorAddresses(): Map<string, MethodologyAddress> {
     return new Map(
-      ACTOR_PARTICIPANTS.map((subtype) => {
+      MASS_ID_ACTOR_PARTICIPANTS.map((subtype) => {
         const coords = this.actorsCoordinates.get(subtype)!.base;
         const address = stubAddress();
 
@@ -277,8 +313,19 @@ export class BoldStubsBuilder {
     );
   }
 
-  // Private helper methods
-  private initializeActorParticipants(
+  private initializeActorsCoordinates(): Map<
+    string,
+    { base: Geolocation; nearby: Geolocation }
+  > {
+    return new Map(
+      MASS_ID_ACTOR_PARTICIPANTS.map((subtype) => [
+        subtype,
+        generateNearbyCoordinates(),
+      ]),
+    );
+  }
+
+  private initializeMassIdActorParticipants(
     providedParticipants?: Map<string, MethodologyParticipant>,
   ): Map<string, MethodologyParticipant> {
     if (providedParticipants) {
@@ -286,22 +333,23 @@ export class BoldStubsBuilder {
     }
 
     return new Map(
-      ACTOR_PARTICIPANTS.map((subtype) => [
+      MASS_ID_ACTOR_PARTICIPANTS.map((subtype) => [
         subtype,
         stubParticipant({ type: subtype }),
       ]),
     );
   }
 
-  private initializeActorsCoordinates(): Map<
+  private initializeMethodologyActorParticipants(): Map<
     string,
-    { base: Geolocation; nearby: Geolocation }
+    MethodologyParticipant
   > {
     return new Map(
-      ACTOR_PARTICIPANTS.map((subtype) => [
-        subtype,
-        generateNearbyCoordinates(),
-      ]),
+      METHODOLOGY_ACTOR_PARTICIPANTS.map((subtype) => {
+        const participant = stubParticipant({ type: subtype });
+
+        return [subtype, participant];
+      }),
     );
   }
 
@@ -347,14 +395,15 @@ export class BoldStubsBuilder {
 
   build(): BoldStubsBuilderResult {
     return {
-      actorParticipants: this.actorParticipants,
-      actorParticipantsAddresses: this.actorParticipantsAddresses,
       creditDocuments: this.creditDocuments,
       creditDocumentsStubs: this.creditDocumentsStubs,
+      massIdActorParticipants: this.massIdActorParticipants,
+      massIdActorParticipantsAddresses: this.massIdActorParticipantsAddresses,
       massIdAuditDocument: this.massIdAuditDocument,
       massIdAuditId: this.massIdAuditDocumentId,
       massIdDocument: this.massIdDocument,
       massIdDocumentId: this.massIdDocumentId,
+      methodologyActorParticipants: this.methodologyActorParticipants,
       methodologyDocument: this.methodologyDocument,
       participantsHomologationDocuments: this.participantsHomologationDocuments,
     };
@@ -390,7 +439,7 @@ export class BoldStubsBuilder {
     externalEventsMap,
     partialDocument,
   }: StubBoldDocumentParameters = {}): BoldStubsBuilder {
-    const actorEvents = this.createActorEvents();
+    const actorEvents = this.createMassIdActorEvents();
     const defaultEventsMap = this.createDefaultMassIdEventsMap(actorEvents);
     const mergedEventsMap = isNil(externalEventsMap)
       ? defaultEventsMap
@@ -407,9 +456,29 @@ export class BoldStubsBuilder {
     return this;
   }
 
-  createMethodologyDocuments(): BoldStubsBuilder {
+  createMethodologyDocument({
+    externalEventsMap,
+    partialDocument,
+  }: StubBoldDocumentParameters = {}): BoldStubsBuilder {
     this.validateMassIdDocumentsExist();
 
+    const actorEvents = this.createMethodologyActorEvents();
+
+    const defaultEventsMap = new Map([
+      ...Object.entries(actorEvents),
+      [
+        OUTPUT,
+        stubDocumentEvent({
+          name: OUTPUT,
+          relatedDocument: this.participantHomologationGroupReference,
+        }),
+      ],
+    ]);
+
+    const mergedEventsMap = isNil(externalEventsMap)
+      ? defaultEventsMap
+      : this.mergeEventsMaps(defaultEventsMap, externalEventsMap);
+
     this.methodologyReference = {
       category: METHODOLOGY,
       documentId: faker.string.uuid(),
@@ -429,14 +498,12 @@ export class BoldStubsBuilder {
         parentDocumentId: this.methodologyReference.documentId,
       });
 
-    this.methodologyDocument = stubMethodologyDefinitionDocument({
-      externalEvents: [
-        stubDocumentEvent({
-          name: OUTPUT,
-          relatedDocument: this.participantHomologationGroupReference,
-        }),
-      ],
-      id: this.methodologyReference.documentId,
+    this.methodologyDocument = stubBoldMethodologyDefinitionDocument({
+      externalEventsMap: mergedEventsMap,
+      partialDocument: {
+        ...partialDocument,
+        id: this.methodologyReference.documentId,
+      },
     });
 
     this.massIdAuditDocument = this.addExternalEventToDocument(
@@ -456,10 +523,11 @@ export class BoldStubsBuilder {
   ): BoldStubsBuilder {
     this.validateMethodologyDocumentsExist();
 
-    for (const subtype of ACTOR_PARTICIPANTS) {
+    for (const subtype of MASS_ID_ACTOR_PARTICIPANTS) {
       const reference = this.createParticipantHomologationReference(subtype);
-      const primaryAddress = this.actorParticipantsAddresses.get(subtype)!;
-      const primaryParticipant = this.actorParticipants.get(subtype)!;
+      const primaryAddress =
+        this.massIdActorParticipantsAddresses.get(subtype)!;
+      const primaryParticipant = this.massIdActorParticipants.get(subtype)!;
 
       const defaultEventsMap = new Map([
         [
diff --git a/libs/shared/methodologies/bold/testing/src/builders/index.ts b/libs/shared/methodologies/bold/testing/src/builders/index.ts
index b90599da2..592524ef8 100644
--- a/libs/shared/methodologies/bold/testing/src/builders/index.ts
+++ b/libs/shared/methodologies/bold/testing/src/builders/index.ts
@@ -4,3 +4,4 @@ export * from './bold-mass-id-audit.stubs';
 export * from './bold-participant-homologation.stubs';
 export * from './bold.builder.helpers';
 export * from './bold.stubs.types';
+export * from './bold-methodology-definition.stubs';
diff --git a/libs/shared/methodologies/bold/types/src/document.types.ts b/libs/shared/methodologies/bold/types/src/document.types.ts
index 8c8ee03ce..e9ac6bc26 100644
--- a/libs/shared/methodologies/bold/types/src/document.types.ts
+++ b/libs/shared/methodologies/bold/types/src/document.types.ts
@@ -5,12 +5,12 @@ import type {
   DocumentCategory,
   DocumentSubtype,
   DocumentType,
-  MassIdSubtype,
+  MassIdOrganicSubtype,
 } from './enum.types';
 
 export interface Document extends MethodologyDocument {
   category: DocumentCategory | string;
   externalEvents?: DocumentEvent[] | undefined;
-  subtype?: DocumentSubtype | MassIdSubtype | string | undefined;
+  subtype?: DocumentSubtype | MassIdOrganicSubtype | string | undefined;
   type?: DocumentType | string | undefined;
 }
diff --git a/libs/shared/methodologies/bold/types/src/enum.types.ts b/libs/shared/methodologies/bold/types/src/enum.types.ts
index 8cb236411..f68d46cfb 100644
--- a/libs/shared/methodologies/bold/types/src/enum.types.ts
+++ b/libs/shared/methodologies/bold/types/src/enum.types.ts
@@ -1,4 +1,7 @@
-import { MethodologyDocumentEventName } from '@carrot-fndn/shared/types';
+import {
+  MethodologyActorType,
+  MethodologyDocumentEventName,
+} from '@carrot-fndn/shared/types';
 
 export enum DocumentCategory {
   MASS_ID = 'MassID',
@@ -20,48 +23,51 @@ export enum DocumentType {
   RECYCLED_ID = 'RecycledID',
 }
 
-export enum MassIdSubtype {
+export enum MassIdOrganicSubtype {
   DOMESTIC_SLUDGE = 'Domestic Sludge',
   EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE = 'EFB similar to Garden, Yard and Park Waste',
   FOOD_FOOD_WASTE_AND_BEVERAGES = 'Food, Food Waste and Beverages',
   GARDEN_YARD_AND_PARK_WASTE = 'Garden, Yard and Park Waste',
-  GLASS_PLASTIC_METAL_OTHER_INERT_WASTE = 'Glass, Plastic, Metal, Other Inert Waste',
   INDUSTRIAL_SLUDGE = 'Industrial Sludge',
-  OTHERS = 'Others',
   PULP_PAPER_AND_CARDBOARD = 'Pulp, Paper and Cardboard',
-  TEXTILES = 'Textiles',
   TOBACCO = 'Tobacco',
   WOOD_AND_WOOD_PRODUCTS = 'Wood and Wood Products',
 }
 
 export enum DocumentSubtype {
-  DOMESTIC_SLUDGE = MassIdSubtype.DOMESTIC_SLUDGE,
-  EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE = MassIdSubtype.EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE,
-  FOOD_FOOD_WASTE_AND_BEVERAGES = MassIdSubtype.FOOD_FOOD_WASTE_AND_BEVERAGES,
-  GARDEN_YARD_AND_PARK_WASTE = MassIdSubtype.GARDEN_YARD_AND_PARK_WASTE,
-  GLASS_PLASTIC_METAL_OTHER_INERT_WASTE = MassIdSubtype.GLASS_PLASTIC_METAL_OTHER_INERT_WASTE,
+  DOMESTIC_SLUDGE = MassIdOrganicSubtype.DOMESTIC_SLUDGE,
+  EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE = MassIdOrganicSubtype.EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE,
+  FOOD_FOOD_WASTE_AND_BEVERAGES = MassIdOrganicSubtype.FOOD_FOOD_WASTE_AND_BEVERAGES,
+  GARDEN_YARD_AND_PARK_WASTE = MassIdOrganicSubtype.GARDEN_YARD_AND_PARK_WASTE,
   GROUP = 'Group',
-  HAULER = 'Hauler',
-  INDUSTRIAL_SLUDGE = MassIdSubtype.INDUSTRIAL_SLUDGE,
-  OTHERS = MassIdSubtype.OTHERS,
+  HAULER = MethodologyActorType.HAULER,
+  INDUSTRIAL_SLUDGE = MassIdOrganicSubtype.INDUSTRIAL_SLUDGE,
+  INTEGRATOR = MethodologyActorType.INTEGRATOR,
   PROCESS = 'Process',
-  PROCESSOR = 'Processor',
-  PULP_PAPER_AND_CARDBOARD = MassIdSubtype.PULP_PAPER_AND_CARDBOARD,
-  RECYCLER = 'Recycler',
+  PROCESSOR = MethodologyActorType.PROCESSOR,
+  PULP_PAPER_AND_CARDBOARD = MassIdOrganicSubtype.PULP_PAPER_AND_CARDBOARD,
+  RECYCLER = MethodologyActorType.RECYCLER,
   SOURCE = 'Source',
   TCC = 'TCC',
-  TEXTILES = MassIdSubtype.TEXTILES,
-  TOBACCO = MassIdSubtype.TOBACCO,
+  TOBACCO = MassIdOrganicSubtype.TOBACCO,
   TRC = 'TRC',
-  WASTE_GENERATOR = 'Waste Generator',
-  WOOD_AND_WOOD_PRODUCTS = MassIdSubtype.WOOD_AND_WOOD_PRODUCTS,
+  WASTE_GENERATOR = MethodologyActorType.WASTE_GENERATOR,
+  WOOD_AND_WOOD_PRODUCTS = MassIdOrganicSubtype.WOOD_AND_WOOD_PRODUCTS,
 }
 
 export enum MassIdDocumentActorType {
-  HAULER = DocumentSubtype.HAULER,
-  PROCESSOR = DocumentSubtype.PROCESSOR,
-  RECYCLER = DocumentSubtype.RECYCLER,
-  WASTE_GENERATOR = DocumentSubtype.WASTE_GENERATOR,
+  HAULER = MethodologyActorType.HAULER,
+  INTEGRATOR = MethodologyActorType.INTEGRATOR,
+  PROCESSOR = MethodologyActorType.PROCESSOR,
+  RECYCLER = MethodologyActorType.RECYCLER,
+  WASTE_GENERATOR = MethodologyActorType.WASTE_GENERATOR,
+}
+
+export enum MethodologyDocumentActorType {
+  APPOINTED_NGO = MethodologyActorType.APPOINTED_NGO,
+  METHODOLOGY_AUTHOR = MethodologyActorType.METHODOLOGY_AUTHOR,
+  METHODOLOGY_DEVELOPER = MethodologyActorType.METHODOLOGY_DEVELOPER,
+  NETWORK = MethodologyActorType.NETWORK,
 }
 
 export enum MeasurementUnit {
diff --git a/libs/shared/types/src/methodology/methodology-enum.types.ts b/libs/shared/types/src/methodology/methodology-enum.types.ts
index c27e16bbb..3256f51ca 100644
--- a/libs/shared/types/src/methodology/methodology-enum.types.ts
+++ b/libs/shared/types/src/methodology/methodology-enum.types.ts
@@ -8,13 +8,36 @@ export enum MethodologyParticipantType {
   ACTOR = 'ACTOR',
 }
 
-export enum MethodologyDocumentEventLabel {
+export enum MethodologyActorType {
+  APPOINTED_NGO = 'Appointed NGO',
+  AUDITOR = 'Auditor',
   HAULER = 'Hauler',
+  INTEGRATOR = 'Integrator',
+  METHODOLOGY_AUTHOR = 'Methodology Author',
+  METHODOLOGY_DEVELOPER = 'Methodology Developer',
+  NETWORK = 'Network',
   PROCESSOR = 'Processor',
   RECYCLER = 'Recycler',
+  REMAINDER = 'Remainder',
+  SOURCE = 'Source',
   WASTE_GENERATOR = 'Waste Generator',
 }
 
+export enum MethodologyDocumentEventLabel {
+  APPOINTED_NGO = MethodologyActorType.APPOINTED_NGO,
+  AUDITOR = MethodologyActorType.AUDITOR,
+  HAULER = MethodologyActorType.HAULER,
+  INTEGRATOR = MethodologyActorType.INTEGRATOR,
+  METHODOLOGY_AUTHOR = MethodologyActorType.METHODOLOGY_AUTHOR,
+  METHODOLOGY_DEVELOPER = MethodologyActorType.METHODOLOGY_DEVELOPER,
+  NETWORK = MethodologyActorType.NETWORK,
+  PROCESSOR = MethodologyActorType.PROCESSOR,
+  RECYCLER = MethodologyActorType.RECYCLER,
+  REMAINDER = MethodologyActorType.REMAINDER,
+  SOURCE = MethodologyActorType.SOURCE,
+  WASTE_GENERATOR = MethodologyActorType.WASTE_GENERATOR,
+}
+
 export enum MethodologyApprovedExceptionType {
   MANDATORY_ATTRIBUTE = 'Exemption for Mandatory Attribute',
 }
@@ -38,7 +61,7 @@ export enum MethodologyDocumentEventName {
   RULES_METADATA = 'RULES METADATA',
   SORTING = 'Sorting',
   TRANSPORT_MANIFEST = 'Transport Manifest',
-  WASTE_GENERATOR = 'Waste Generator',
+  WASTE_GENERATOR = MethodologyActorType.WASTE_GENERATOR,
   WEIGHING = 'Weighing',
 }
 


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary><blockquote>

`384-394`: **Out-of-date error message after method rename**

The guard still instructs users to call `createMethodologyDocuments()` but the API has been renamed to `createMethodologyDocument()` (singular). This can mislead consumers during debugging.



```diff
-        'Methodology documents must be created first. Call createMethodologyDocuments() before this method.',
+        'Methodology documents must be created first. Call createMethodologyDocument() before this method.',
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 3f2708144344e89656d5751ff6e715cb4090d20c and 573f1dfada82fd82c23deb1f48e8baa1c9a3fd53.

</details>

<details>
<summary>📒 Files selected for processing (22)</summary>

* `libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.lambda.e2e.spec.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.processor.spec.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.test-cases.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.lambda.e2e.spec.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.processor.spec.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.test-cases.ts` (4 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.spec.ts` (2 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.ts` (3 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.lambda.e2e.spec.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.processor.spec.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.test-cases.ts` (4 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/participant-homologations/participant-homologations.test-cases.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.lambda.e2e.spec.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.processor.spec.ts` (1 hunks)
* `libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.test-cases.ts` (1 hunks)
* `libs/shared/methodologies/bold/testing/src/builders/bold-mass-id.stubs.ts` (2 hunks)
* `libs/shared/methodologies/bold/testing/src/builders/bold-methodology-definition.stubs.ts` (1 hunks)
* `libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts` (17 hunks)
* `libs/shared/methodologies/bold/testing/src/builders/index.ts` (1 hunks)
* `libs/shared/methodologies/bold/types/src/document.types.ts` (1 hunks)
* `libs/shared/methodologies/bold/types/src/enum.types.ts` (2 hunks)
* `libs/shared/types/src/methodology/methodology-enum.types.ts` (2 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (9)</summary>

<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.processor.spec.ts (1)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary>

* `BoldStubsBuilder` (82-612)

</details>

</blockquote></details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.processor.spec.ts (1)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary>

* `BoldStubsBuilder` (82-612)

</details>

</blockquote></details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.test-cases.ts (1)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary>

* `MASS_ID_ACTOR_PARTICIPANTS` (67-73)

</details>

</blockquote></details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.lambda.e2e.spec.ts (1)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary>

* `BoldStubsBuilder` (82-612)

</details>

</blockquote></details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.lambda.e2e.spec.ts (1)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary>

* `BoldStubsBuilder` (82-612)

</details>

</blockquote></details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.test-cases.ts (2)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary>

* `MASS_ID_ACTOR_PARTICIPANTS` (67-73)

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/stubs/document.stubs.ts (1)</summary>

* `generateNearbyCoordinates` (77-111)

</details>

</blockquote></details>
<details>
<summary>libs/shared/methodologies/bold/types/src/document.types.ts (1)</summary><blockquote>

<details>
<summary>libs/shared/types/src/methodology/methodology-document.types.ts (1)</summary>

* `MethodologyDocument` (17-40)

</details>

</blockquote></details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-methodology-definition.stubs.ts (5)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold.stubs.types.ts (1)</summary>

* `StubBoldDocumentParameters` (20-26)

</details>
<details>
<summary>libs/shared/methodologies/bold/types/src/document.types.ts (1)</summary>

* `Document` (11-16)

</details>
<details>
<summary>libs/shared/helpers/src/common.helpers.ts (1)</summary>

* `isNil` (3-4)

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary>

* `mergeEventsMaps` (356-366)

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/stubs/document.stubs.ts (1)</summary>

* `stubDocument` (20-39)

</details>

</blockquote></details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (8)</summary><blockquote>

<details>
<summary>libs/shared/types/src/methodology/methodology-participant.types.ts (1)</summary>

* `MethodologyParticipant` (6-12)

</details>
<details>
<summary>libs/shared/types/src/methodology/methodology-address.types.ts (1)</summary>

* `MethodologyAddress` (1-14)

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/stubs/document-event.stubs.ts (1)</summary>

* `stubDocumentEvent` (27-53)

</details>
<details>
<summary>libs/shared/types/src/common.types.ts (1)</summary>

* `Geolocation` (23-26)

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/stubs/document.stubs.ts (1)</summary>

* `generateNearbyCoordinates` (77-111)

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold.stubs.types.ts (1)</summary>

* `StubBoldDocumentParameters` (20-26)

</details>
<details>
<summary>libs/shared/helpers/src/common.helpers.ts (1)</summary>

* `isNil` (3-4)

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-methodology-definition.stubs.ts (1)</summary>

* `stubBoldMethodologyDefinitionDocument` (14-36)

</details>

</blockquote></details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (3)</summary>

* GitHub Check: Backend Check / Tests
* GitHub Check: Backend Check / ESLint
* GitHub Check: Backend Check / TypeScript

</details>

<details>
<summary>🔇 Additional comments (43)</summary><blockquote>

<details>
<summary>libs/shared/types/src/methodology/methodology-enum.types.ts (3)</summary>

`11-24`: **Solid refactor: Comprehensive actor type management.**

This change introduces a more complete and coherent `MethodologyActorType` enum that centralizes all actor type definitions. The additional actor types (APPOINTED_NGO, AUDITOR, INTEGRATOR, etc.) provide better clarity and specificity for methodology participants.

---

`26-39`: **Good design pattern: Value aliasing through enum mapping.**

Creating a new `MethodologyDocumentEventLabel` that maps to `MethodologyActorType` maintains backward compatibility while providing a more semantically meaningful structure. This approach effectively separates concerns between actor types and event labels.

---

`64-64`: **Consistent reference implementation.**

Replacing the string literal with a reference to `MethodologyActorType.WASTE_GENERATOR` improves maintainability. If the waste generator label needs to change in the future, it only needs to be updated in one place.

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/index.ts (1)</summary>

`7-7`: **Appropriate export for the new stub builder.**

The export of the methodology definition stubs aligns with the refactoring effort to unify methodology document creation in mass-id rule processor tests.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.lambda.e2e.spec.ts (1)</summary>

`44-44`: **Method name alignment: Plural to singular.**

Changing from `.createMethodologyDocuments()` to `.createMethodologyDocument()` correctly implements the standardized approach for creating methodology documents. This ensures consistency across the codebase and aligns with the refactoring effort.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.test-cases.ts (1)</summary>

`689-689`: **Consistent method naming implementation.**

The change from `.createMethodologyDocuments()` to `.createMethodologyDocument()` maintains consistency with the methodology document creation standardization across test cases.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.test-cases.ts (1)</summary>

`71-71`: **Updated method name to match the unified methodology document creation pattern.**

The change from `.createMethodologyDocuments()` to `.createMethodologyDocument()` aligns with the PR's goal of unifying methodology document creation in the tests.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/participant-homologations/participant-homologations.test-cases.ts (2)</summary>

`25-25`: **Updated method name in test stub builder.**

Changed from plural `.createMethodologyDocuments()` to singular `.createMethodologyDocument()` to align with the unified methodology document creation approach.

---

`32-32`: **Updated method name in second test stub builder instance.**

Consistent with the previous change, updated from `.createMethodologyDocuments()` to `.createMethodologyDocument()`.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.lambda.e2e.spec.ts (1)</summary>

`42-42`: **Updated method name in E2E test setup.**

Changed from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to match the updated BoldStubsBuilder API.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.lambda.e2e.spec.ts (2)</summary>

`38-38`: **Updated constructor parameter name to use the new naming convention.**

Changed the parameter name from `actorParticipants` to `massIdActorParticipants` to reflect the distinction between mass ID and methodology actor participants in the updated BoldStubsBuilder class.

---

`41-41`: **Updated method name to match the unified methodology document creation pattern.**

Changed from `.createMethodologyDocuments()` to `.createMethodologyDocument()` consistent with other test files in this PR.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.processor.spec.ts (2)</summary>

`33-33`: **Parameter name updated to match refactored BoldStubsBuilder API**

The change from using a generic `actorParticipants` to the more specific `massIdActorParticipants` reflects the underlying refactoring in the BoldStubsBuilder that now clearly distinguishes between mass ID and methodology actor participants.

---

`38-38`: **Method name updated from plural to singular form**

Changed from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to align with the refactored BoldStubsBuilder API that now creates a single methodology document instead of multiple documents.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.processor.spec.ts (1)</summary>

`37-37`: **Method name updated from plural to singular form**

Changed from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to align with the refactored BoldStubsBuilder API that now creates a single methodology document instead of multiple documents.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.test-cases.ts (4)</summary>

`3-3`: **Updated import to use mass-ID specific constant**

Replaced the generic `ACTOR_PARTICIPANTS` with the more specific `MASS_ID_ACTOR_PARTICIPANTS` constant, which better reflects the separation of actor types in the refactored code.

---

`39-41`: **Updated actor participants map initialization**

Now using `MASS_ID_ACTOR_PARTICIPANTS` instead of the generic `ACTOR_PARTICIPANTS`, which aligns with the refactored builder's approach to distinguish between different types of actor participants.

---

`162-162`: **Method name updated from plural to singular form**

Changed from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to align with the refactored BoldStubsBuilder API.

---

`177-177`: **Method name updated from plural to singular form**

Changed from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to align with the refactored BoldStubsBuilder API.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.processor.spec.ts (1)</summary>

`40-40`: **Method name updated from plural to singular form**

Changed from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to align with the refactored BoldStubsBuilder API that now creates a single methodology document instead of multiple documents.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.lambda.e2e.spec.ts (2)</summary>

`38-38`: **Parameter name updated to match BoldStubsBuilder implementation**

The constructor parameter has been correctly updated from `actorParticipants` to `massIdActorParticipants`, reflecting the refactored `BoldStubsBuilder` class which now distinguishes between different types of actor participants.

---

`41-41`: **Method name updated to singular form**

The method name has been correctly updated from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to align with the refactored `BoldStubsBuilder` implementation that now uses the singular form.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.processor.spec.ts (2)</summary>

`32-32`: **Parameter name updated to match BoldStubsBuilder implementation**

The constructor parameter has been correctly updated from `actorParticipants` to `massIdActorParticipants`, reflecting the refactored `BoldStubsBuilder` class which now distinguishes between mass ID actor participants and methodology actor participants.

---

`35-35`: **Method name updated to singular form**

The method name has been correctly updated from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to align with the refactored `BoldStubsBuilder` implementation that now uses the singular form.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.spec.ts (3)</summary>

`4-4`: **Import updated to use renamed enum type**

The import has been correctly updated to use `MassIdOrganicSubtype` instead of `MassIdSubtype`, reflecting the enum rename in the codebase.

---

`30-31`: **Test description and implementation updated to use renamed enum**

The test description and implementation have been correctly updated to reference `MassIdOrganicSubtype` instead of `MassIdSubtype`, maintaining consistency with the renamed enum.

---

`37-37`: **Test description updated to use renamed enum**

The test description has been correctly updated to reference `MassIdOrganicSubtype` instead of `MassIdSubtype`, maintaining consistency with the renamed enum.

</details>
<details>
<summary>libs/shared/methodologies/bold/types/src/document.types.ts (2)</summary>

`8-8`: **Import updated to use renamed enum type**

The import has been correctly updated to use `MassIdOrganicSubtype` instead of `MassIdSubtype`, reflecting the enum rename in the codebase.

---

`14-14`: **Document interface updated to use renamed enum type**

The `Document` interface has been correctly updated to use `MassIdOrganicSubtype` instead of `MassIdSubtype` in the `subtype` property type definition, ensuring type consistency throughout the codebase.

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-mass-id.stubs.ts (2)</summary>

`14-14`: **Clean rename of MassIdSubtype to MassIdOrganicSubtype**

The import has been updated to use `MassIdOrganicSubtype` instead of `MassIdSubtype`, which aligns with the broader renaming pattern in the codebase.

---

`340-341`: **Consistent use of renamed enum**

The `stubBoldMassIdDocument` function now correctly uses `MassIdOrganicSubtype` instead of `MassIdSubtype` for generating the document's subtype value, maintaining consistency with the updated type system.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.test-cases.ts (4)</summary>

`4-4`: **Updated to use MASS_ID_ACTOR_PARTICIPANTS constant**

Correctly replaced the generic `ACTOR_PARTICIPANTS` with the more specific `MASS_ID_ACTOR_PARTICIPANTS`, which aligns with the separation of mass ID and methodology actor participants.

---

`19-19`: **Import consolidation**

Type import for `MethodologyParticipant` has been consolidated with other imports from the same package, improving code organization.

---

`31-41`: **Consistent use of MASS_ID_ACTOR_PARTICIPANTS**

Updated the map initialization to use `MASS_ID_ACTOR_PARTICIPANTS` instead of the generic `ACTOR_PARTICIPANTS`, maintaining consistency with the actor participant group separation refactoring.

---

`335-336`: **Method rename from plural to singular**

Updated the method call from `.createMethodologyDocuments()` to `.createMethodologyDocument()` to align with the refactored method name in the `BoldStubsBuilder` class.

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-methodology-definition.stubs.ts (1)</summary>

`1-36`: **New stub builder for methodology definition documents**

This new file introduces a well-structured stub builder function for methodology definition documents, following the same patterns as existing stub builders. The function handles external events maps correctly, sets appropriate document category and type, and integrates with the existing stub infrastructure.


The implementation initializes with an empty map (unlike `stubBoldMassIdDocument` which uses a predefined map), which is appropriate since methodology definition documents may not have a standard set of events.

</details>
<details>
<summary>libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.processor.ts (4)</summary>

`9-10`: **Updated import to use MassIdOrganicSubtype**

Correctly updated the import to use `MassIdOrganicSubtype` instead of `MassIdSubtype`, in line with the broader renaming effort in the codebase.

---

`16-16`: **Updated ALLOWED_SUBTYPES to use MassIdOrganicSubtype**

ALLOWED_SUBTYPES now correctly references the values from the renamed `MassIdOrganicSubtype` enum, maintaining consistent type usage throughout the codebase.

---

`29-31`: **Improved type safety in error message construction**

Changed the parameter type from `string` to `unknown` and added proper string conversion with `String(subtype)`. This is a safer approach that handles any type that might be passed to the error message function, preventing potential runtime errors.

---

`105-106`: **Removed unnecessary non-null assertion**

Removed the non-null assertion from `document.subtype` when passing it to the error message function. This is a good practice as it avoids assuming the value is definitely non-null, making the code more robust.

</details>
<details>
<summary>libs/shared/methodologies/bold/types/src/enum.types.ts (2)</summary>

`59-71`: **👍 Good abstraction of actor-specific enums**

Moving `MassIdDocumentActorType` & the new `MethodologyDocumentActorType` to reference the single source-of-truth `MethodologyActorType` cuts duplication and ensures consistency whenever new roles are added.

---

`26-35`: <details>
<summary>✅ Verification successful</summary>

**Renamed enum removes values that may still be referenced elsewhere**

`MassIdSubtype` has been replaced by `MassIdOrganicSubtype` and three members (`GLASS_PLASTIC_METAL_OTHER_INERT_WASTE`, `OTHERS`, `TEXTILES`) vanished.  
If any rule processors, DTOs or SQL scripts still expect those literals the build will break at runtime (string-based comparisons) while succeeding at compile time.


Run a quick grep to confirm nothing outside this PR still uses the removed literals:

---

🏁 Script executed:

```shell
#!/bin/bash
rg -n '"\(GLASS_PLASTIC_METAL_OTHER_INERT_WASTE\|OTHERS\|TEXTILES\)"'
```

Length of output: 71

---

🏁 Script executed:

```shell
#!/bin/bash
set -euo pipefail

# 1. Look for any references to the old enum type
rg -n 'MassIdSubtype'

# 2. Confirm references to the new enum type
rg -n 'MassIdOrganicSubtype'

# 3. Check for usage of the removed enum members as identifiers
rg -n '\.GLASS_PLASTIC_METAL_OTHER_INERT_WASTE\b'
rg -n '\.TEXTILES\b'
rg -n '\.OTHERS\b'
```

Length of output: 41

---

🏁 Script executed:

```shell
#!/bin/bash
set -euo pipefail

# Patterns to search for
patterns=(
  'MassIdSubtype'
  'MassIdOrganicSubtype'
  'GLASS_PLASTIC_METAL_OTHER_INERT_WASTE'
  'TEXTILES'
  'OTHERS'
)

for pat in "${patterns[@]}"; do
  echo "Searching for: $pat"
  rg -n "$pat" || echo "  → No matches for \"$pat\""
done
```

Length of output: 5832

---



</details>

**No references to removed enum members found**  

All checks confirm the three values are no longer used anywhere in the repo:

- `GLASS_PLASTIC_METAL_OTHER_INERT_WASTE` & `TEXTILES`: zero matches across all files  
- `OTHERS`: only appears in unrelated enums/constants (e.g. `DocumentEventVehicleType`)  
- `MassIdSubtype` → `MassIdOrganicSubtype` rename has no leftover references

</details>
<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (1)</summary>

`298-314`: **Coordinate/address initialisation assumes every `MASS_ID_ACTOR_PARTICIPANTS` value has been mapped**

`initializeActorAddresses` dereferences `this.actorsCoordinates.get(subtype)!`.  
If someone extends `MASS_ID_ACTOR_PARTICIPANTS` without updating `initializeActorsCoordinates`, this will throw at runtime.


Consider deriving `actorsCoordinates` directly from the provided participants map (or vice-versa) so the two lists cannot diverge, or add an invariant check that throws a descriptive error.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T22:04:37Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (2)</summary><blockquote>

`384-392`: **Update error message to match renamed method**

The error message mentions `createMethodologyDocuments()` but the method has been renamed to `createMethodologyDocument()` (singular form).

```diff
-        'Methodology documents must be created first. Call createMethodologyDocuments() before this method.',
+        'Methodology documents must be created first. Call createMethodologyDocument() before this method.',
```

---

`384-394`: **Consider renaming validation method to match singular form**

For consistency with the renamed `createMethodologyDocument` method, consider renaming this validation method from `validateMethodologyDocumentsExist` to `validateMethodologyDocumentExists`.

```diff
-  private validateMethodologyDocumentsExist(): void {
+  private validateMethodologyDocumentExists(): void {
```

And update the reference at line 524:
```diff
-    this.validateMethodologyDocumentsExist();
+    this.validateMethodologyDocumentExists();
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Lite**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 573f1dfada82fd82c23deb1f48e8baa1c9a3fd53 and a1b718e66a66a8bdfbcc315c55d611819ee16ffe.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts` (17 hunks)

</details>

<details>
<summary>🔇 Additional comments (6)</summary><blockquote>

<details>
<summary>libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts (6)</summary>

`67-73`: **LGTM! Expanded actor participants with INTEGRATOR**

The refactoring adds the INTEGRATOR role to the mass ID actors, providing better separation of concerns between mass ID and methodology actors.

---

`75-80`: **LGTM! Added methodology-specific actor participants**

Clear separation of methodology actors from mass ID actors improves the code organization and makes the responsibilities clearer.

---

`459-507`: **Method renaming aligns with singular document creation**

Renaming `createMethodologyDocuments` to `createMethodologyDocument` makes the method name more accurate since it creates a single methodology document rather than multiple documents. The implementation also properly uses the new methodology actor events.

---

`53-65`: **Interface updated to reflect separation of actor types**

The result interface now properly distinguishes between mass ID and methodology actor participants, which aligns with the refactoring goals.

---

`396-410`: **Build method updated to return separated actor maps**

The build method correctly returns both mass ID and methodology actor participants, maintaining consistency with the interface changes.

---

`47-51`: **Options interface updated for mass ID actors**

The options interface now correctly refers to `massIdActorParticipants` instead of the generic `actorParticipants`, reflecting the separation of actor types.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T22:09:17Z
user: login: sangalli
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-28T12:18:25Z

Review comments:
diff_hunk: @@ -20,48 +23,51 @@ export enum DocumentType {
   RECYCLED_ID = 'RecycledID',
 }
 
-export enum MassIdSubtype {
+export enum MassIdOrganicSubtype {
   DOMESTIC_SLUDGE = 'Domestic Sludge',
   EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE = 'EFB similar to Garden, Yard and Park Waste',
   FOOD_FOOD_WASTE_AND_BEVERAGES = 'Food, Food Waste and Beverages',
   GARDEN_YARD_AND_PARK_WASTE = 'Garden, Yard and Park Waste',
-  GLASS_PLASTIC_METAL_OTHER_INERT_WASTE = 'Glass, Plastic, Metal, Other Inert Waste',
   INDUSTRIAL_SLUDGE = 'Industrial Sludge',
-  OTHERS = 'Others',
   PULP_PAPER_AND_CARDBOARD = 'Pulp, Paper and Cardboard',
-  TEXTILES = 'Textiles',
   TOBACCO = 'Tobacco',
   WOOD_AND_WOOD_PRODUCTS = 'Wood and Wood Products',
 }
 
 export enum DocumentSubtype {
-  DOMESTIC_SLUDGE = MassIdSubtype.DOMESTIC_SLUDGE,
-  EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE = MassIdSubtype.EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE,
-  FOOD_FOOD_WASTE_AND_BEVERAGES = MassIdSubtype.FOOD_FOOD_WASTE_AND_BEVERAGES,
-  GARDEN_YARD_AND_PARK_WASTE = MassIdSubtype.GARDEN_YARD_AND_PARK_WASTE,
-  GLASS_PLASTIC_METAL_OTHER_INERT_WASTE = MassIdSubtype.GLASS_PLASTIC_METAL_OTHER_INERT_WASTE,
+  DOMESTIC_SLUDGE = MassIdOrganicSubtype.DOMESTIC_SLUDGE,
+  EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE = MassIdOrganicSubtype.EFB_SIMILAR_TO_GARDEN_YARD_AND_PARK_WASTE,
+  FOOD_FOOD_WASTE_AND_BEVERAGES = MassIdOrganicSubtype.FOOD_FOOD_WASTE_AND_BEVERAGES,
+  GARDEN_YARD_AND_PARK_WASTE = MassIdOrganicSubtype.GARDEN_YARD_AND_PARK_WASTE,
   GROUP = 'Group',
-  HAULER = 'Hauler',
-  INDUSTRIAL_SLUDGE = MassIdSubtype.INDUSTRIAL_SLUDGE,
-  OTHERS = MassIdSubtype.OTHERS,
+  HAULER = MethodologyActorType.HAULER,
+  INDUSTRIAL_SLUDGE = MassIdOrganicSubtype.INDUSTRIAL_SLUDGE,
+  INTEGRATOR = MethodologyActorType.INTEGRATOR,
   PROCESS = 'Process',
-  PROCESSOR = 'Processor',
-  PULP_PAPER_AND_CARDBOARD = MassIdSubtype.PULP_PAPER_AND_CARDBOARD,
-  RECYCLER = 'Recycler',
+  PROCESSOR = MethodologyActorType.PROCESSOR,
+  PULP_PAPER_AND_CARDBOARD = MassIdOrganicSubtype.PULP_PAPER_AND_CARDBOARD,
+  RECYCLER = MethodologyActorType.RECYCLER,
   SOURCE = 'Source',
   TCC = 'TCC',
-  TEXTILES = MassIdSubtype.TEXTILES,
-  TOBACCO = MassIdSubtype.TOBACCO,
+  TOBACCO = MassIdOrganicSubtype.TOBACCO,
   TRC = 'TRC',
-  WASTE_GENERATOR = 'Waste Generator',
-  WOOD_AND_WOOD_PRODUCTS = MassIdSubtype.WOOD_AND_WOOD_PRODUCTS,
+  WASTE_GENERATOR = MethodologyActorType.WASTE_GENERATOR,
+  WOOD_AND_WOOD_PRODUCTS = MassIdOrganicSubtype.WOOD_AND_WOOD_PRODUCTS,
 }
path: libs/shared/methodologies/bold/types/src/enum.types.ts
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**DocumentSubtype now mixes organic sub-types & actor roles – consider separation**

`DocumentSubtype` now aliases both `MassIdOrganicSubtype` **and** `MethodologyActorType` values.  
Although TypeScript will allow this, coupling two conceptually different taxonomies in one enum can lead to:

* Unclear semantics when persisting the value (DB column, API contract, etc.).
* Higher risk of accidental value collisions if a future actor role equals an existing organic literal.
* Harder validation logic (`isOrganicSubtype(value)` vs `isActorSubtype(value)`).


Consider introducing two dedicated enums (e.g. `OrganicDocumentSubtype`, `ActorDocumentSubtype`) and using a union type where both are allowed. This keeps each category cohesive and makes future migrations safer.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-25T22:04:36Z
author_association: NONE
diff_hunk: @@ -45,36 +45,41 @@ const { FOOD_FOOD_WASTE_AND_BEVERAGES, GROUP, PROCESS, TCC, TRC } =
   DocumentSubtype;
 
 export interface BoldStubsBuilderOptions {
-  actorParticipants?: Map<string, MethodologyParticipant>;
+  massIdActorParticipants?: Map<string, MethodologyParticipant>;
   massIdAuditDocumentId?: string;
   massIdDocumentId?: string;
 }
 
 export interface BoldStubsBuilderResult {
-  actorParticipants: Map<string, MethodologyParticipant>;
-  actorParticipantsAddresses: Map<string, MethodologyAddress>;
   creditDocuments: Document[];
   creditDocumentsStubs: Document[];
+  massIdActorParticipants: Map<string, MethodologyParticipant>;
   massIdAuditDocument: Document;
   massIdAuditId: string;
   massIdDocument: Document;
   massIdDocumentId: string;
+  massIdactorParticipantsAddresses: Map<string, MethodologyAddress>;
+  methodologyActorParticipants: Map<string, MethodologyParticipant>;
   methodologyDocument: Document | undefined;
   participantsHomologationDocuments: Map<string, Document>;
 }
path: libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Property name typo breaks type-safety**

Interface `BoldStubsBuilderResult` declares  
`massIdactorParticipantsAddresses` (lower-case “a” after “Id”),  
whereas the class property is `massIdActorParticipantsAddresses`.  
Because the builder returns the object literal with the *typoed* key, callers must also use the wrong casing or TypeScript will complain. This inconsistency is easy to miss and invites bugs.


Fix both the interface and the returned object key:

```diff
@@
-  massIdactorParticipantsAddresses: Map<string, MethodologyAddress>;
+  massIdActorParticipantsAddresses: Map<string, MethodologyAddress>;
@@
-      massIdactorParticipantsAddresses: this.massIdActorParticipantsAddresses,
+      massIdActorParticipantsAddresses: this.massIdActorParticipantsAddresses,
```


Also applies to: 400-406

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit a1b718e
created_at: 2025-04-25T22:04:36Z
author_association: NONE

PR comments:
user: login: gitstream-cm[bot]
created_at: 2025-04-25T22:00:58Z
body: 
🚨 **gitStream Monthly Automation Limit Reached** 🚨

Your organization has exceeded the number of pull requests allowed for automation with gitStream.
**Monthly PRs automated:** 680/250

To continue automating your PR workflows and unlock additional features, please [contact LinearB](https://linearb.io/book-a-demo).

author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-04-25T22:01:01Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

This change refactors the handling of actor participants and methodology document stubs in the BOLD methodology codebase. The `BoldStubsBuilder` class is updated to distinguish between mass ID and methodology actor participants, introducing new constants and methods for each group. The method for creating methodology documents is renamed from `.createMethodologyDocuments()` to `.createMethodologyDocument()`, with all related test setups and stub creation logic updated accordingly. Enum types are revised to clarify actor roles and document subtypes, and a new stub builder for methodology definition documents is added. Test files and supporting types are updated to align with these structural changes.

## Changes

| File(s)                                                                                              | Change Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| libs/shared/methodologies/bold/testing/src/builders/bold-stub.builder.ts                           | Refactored `BoldStubsBuilder` to separate mass ID and methodology actor participants, added new constants, methods, and updated internal logic; replaced `.createMethodologyDocuments()` with `.createMethodologyDocument()`; updated build result structure.                                                                                                                                                                                                                                            |
| libs/shared/methodologies/bold/testing/src/builders/bold-methodology-definition.stubs.ts           | Added new function `stubBoldMethodologyDefinitionDocument` to generate stub methodology definition documents.                                                                                                                                                                                                                                                                                                                                                              |
| libs/shared/methodologies/bold/testing/src/builders/index.ts                                       | Added export for `bold-methodology-definition.stubs`.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| libs/shared/methodologies/bold/testing/src/builders/bold-mass-id.stubs.ts                          | Updated to use `MassIdOrganicSubtype` for subtype stubs instead of `MassIdSubtype`.                                                                                                                                                                                                                                                                                                                                                                                        |
| libs/shared/methodologies/bold/types/src/document.types.ts                                         | Changed `Document` interface to use `MassIdOrganicSubtype` for the `subtype` property.                                                                                                                                                                                                                                                                                                                                                                                     |
| libs/shared/methodologies/bold/types/src/enum.types.ts                                             | Renamed `MassIdSubtype` to `MassIdOrganicSubtype`, updated and expanded enum members, revised `DocumentSubtype` and `MassIdDocumentActorType` to use new enums and actor types, and added `MethodologyDocumentActorType`.                                                                                                                             |
| libs/shared/types/src/methodology/methodology-enum.types.ts                                        | Renamed and expanded `MethodologyDocumentEventLabel` to `MethodologyActorType`, added new actor types, introduced new `MethodologyDocumentEventLabel` enum, and updated `MethodologyDocumentEventName`.                                                                                                                                                |
| libs/methodologies/bold/rule-processors/mass-id/src/avoided-emissions/avoided-emissions.*           | Updated test setups to use `.createMethodologyDocument()` instead of `.createMethodologyDocuments()`.                                                                                                                                                                                                                                                                                                                              |
| libs/methodologies/bold/rule-processors/mass-id/src/geolocation-precision/geolocation-precision.*  | Updated test setups to use `massIdActorParticipants` and `.createMethodologyDocument()`; replaced `ACTOR_PARTICIPANTS` with `MASS_ID_ACTOR_PARTICIPANTS` in test data.                                                                                                                                                                                                                                                            |
| libs/methodologies/bold/rule-processors/mass-id/src/mass-definition/mass-definition.*              | Changed subtype validation to use `MassIdOrganicSubtype` instead of `MassIdSubtype`; updated error messaging and test stubs accordingly.                                                                                                                                                                                                                                                                                            |
| libs/methodologies/bold/rule-processors/mass-id/src/mass-sorting/mass-sorting.*                   | Updated test setups to use `massIdActorParticipants` and `.createMethodologyDocument()`; replaced `ACTOR_PARTICIPANTS` with `MASS_ID_ACTOR_PARTICIPANTS` in test data.                                                                                                                                                                                                                                                            |
| libs/methodologies/bold/rule-processors/mass-id/src/participant-homologations/participant-homologations.test-cases.ts | Updated stub builder calls from `.createMethodologyDocuments()` to `.createMethodologyDocument()`.                                                                                                                                                                                                                                                                                                                                 |
| libs/methodologies/bold/rule-processors/mass-id/src/weighing/weighing.*                           | Updated test setups to use `.createMethodologyDocument()` instead of `.createMethodologyDocuments()`.                                                                                                                                                                                                                                                                                                                              |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant TestSuite
    participant BoldStubsBuilder
    participant MassIdActors
    participant MethodologyActors
    participant StubDocBuilder

    TestSuite->>BoldStubsBuilder: new BoldStubsBuilder({massIdActorParticipants})
    BoldStubsBuilder->>MassIdActors: initializeMassIdActorParticipants()
    BoldStubsBuilder->>MethodologyActors: initializeMethodologyActorParticipants()
    TestSuite->>BoldStubsBuilder: .createMethodologyDocument(params)
    BoldStubsBuilder->>StubDocBuilder: stubBoldMethodologyDefinitionDocument(params)
    StubDocBuilder-->>BoldStubsBuilder: returns stub document
    BoldStubsBuilder-->>TestSuite: returns builder with stub document
```

## Possibly related PRs

- [carrot-foundation/methodology-rules#142](https://github.com/carrot-foundation/methodology-rules/pull/142): Introduces the initial `BoldStubsBuilder` and uses it for participant homologation tests, which is directly built upon and refactored in this PR.
- [carrot-foundation/methodology-rules#140](https://github.com/carrot-foundation/methodology-rules/pull/140): Introduces the original `.createMethodologyDocuments()` method in `BoldStubsBuilder`, which is refactored and replaced in this PR.
- [carrot-foundation/methodology-rules#174](https://github.com/carrot-foundation/methodology-rules/pull/174): Refactors the `BoldStubsBuilder` helper and introduces mass sorting processor and related test setups, which are further updated in this PR.

## Suggested reviewers

- cris-santos
- sangalli

## Poem

> In the warren of code, where the stub bunnies play,  
> We split up our actors, in a most clever way.  
> No more plural documents—just one at a hop,  
> With enums and types getting a fresh carrot crop.  
> Now mass and methodology each have their own space,  
> As the tests all align in this well-organized race!  
> 🥕✨

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACJ/ADM0MXwKAApEWGc6AEoubAx4OPk2XFhFfC98InlafAZHdkZ/anh8LHgsZjRERDB4egpvD15a6URksJDEaMgAdy77bAFmdRp6OTDYD2xESkgAQQBZZyZEAGEumgr0ZFtIDEcBXYAmAEYAVhQsEo9/bnxEdTJeQMZwUfC4MBxfB5WjNVoAemKpRqFSqYAGkUQGhgm0gSkQDAo8G44laPDBEj6UVQaAmzG4XmoHhm6lKeHs3FEBXgDDxJFw2i8yBU0NC30YGQwpGQnSU2IAkqF2gwvNh8TxGQwSKUvEoKMgoXxaQ4nC4ADR8gXwSL0JgYGgAD1wFsw/RIjNWkC87QA1ogLQJ2d8dvZRKSMMgZpQPBhwZA4tabZ9se4cCVxk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jwAFPnWj0gyv1zMaqvmyJkdGzwX+5EnZs1YsE4o7JBol0GZoNjuNitJ+kUx1joGMdWOnHZkfx0D9SixNcFY4fYDJa2AfR7mKJrEqQVH9j25QHMbIO86CZxKD9bHt+QrG+S/hwHXKRT0Sk09jEUHZnt/rZ6IulajhjFx9m1ri+lpSjd0vcP4H1jcKZ4/aGcOzHKY1eyE8QYLEVgvDKAUIDbIwm/6JFk+2IzPviNz6kjUkFI+AfSOEKwDWRwo8vrzzO78jtuocR7sFPFG99pRq+eUZP2VGEY1RuOLUaKkNGbATR0hdst8P9GCTWGeFBJJJOuHmhcqqY4RBmPuhPZCxz9XHopNJ72YwQUhQcBrb4mB9XRl4ylq4OXaC2A2q41gduME71ESm7GMjIrIXAPAg6bIskGRnvkbTnIDQJccwM3HZd2qlqBlAHjok8oBAfdVEHCjsAyoaAZjO5o3qJQqAyUBqGlGagGBUz4UdQGHj6CIAw8/gUSOJDDwIRyinkSs95EgBvAAA7AAGY4gLwWgAkFhAAAOJ4HEFoBjmGATwXswuBeBxAAALCOZIAjnFwaAF4AwAACcaAfs7QDeC9mmohgVM+uYEDdmXgy5gAGwXm0AV5tAKuaHMCAYBvZ94AwDeBvBaAF5l4OeZeCbmWILwC887EPOtQoA1Z3ALWe0UNnAJYkOgGHl8iHmgAA== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=carrot-foundation/methodology-rules&utm_content=215):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: sonarqubecloud[bot]
created_at: 2025-04-25T22:08:01Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=carrot-foundation_audit-rules&pullRequest=215) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [26 New issues](https://sonarcloud.io/project/issues?id=carrot-foundation_audit-rules&pullRequest=215&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=carrot-foundation_audit-rules&pullRequest=215&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=carrot-foundation_audit-rules&pullRequest=215&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=carrot-foundation_audit-rules&pullRequest=215&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [1.5% Duplication on New Code](https://sonarcloud.io/component_measures?id=carrot-foundation_audit-rules&pullRequest=215&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=carrot-foundation_audit-rules&pullRequest=215)


author_association: NONE