Skip to main content

Week 2 — Bulk Reuser Migration Planning

Meeting

Date: June 2, 2026
Attendees:

Summary:

  1. Discussed the remaining changes in CMakeLists.txt in the CPP reuser which differed from the PHP reuser.
  2. Discussed the next steps for implementing the move of bulk reuser functionality from Decider to Reuser.
  3. Why bulk phrases reuse is wrong in Decider and what issues it is causing.
  4. Discussed an optimization when moving bulk reuser from Decider to Reuser suggested by Shaheem: let bulk phrases run first (MonkBulk, DeciderJob) and then the Reuser runs, so files already decided by bulk phrases are not processed again.
  5. Discussed some minor changes with Kaushl about copyright to skip transactions for files with no matches.

Progress

This week focused on planning the migration of Bulk Reuser from Decider to Reuser.

Requirement: Move Bulk Reuser Responsibility from Decider to Reuser

The Bulk Reuser functionality (bulk_reused) is currently implemented as part of the Decider workflow, although its purpose and behavior belong to the Reuse workflow.

This architectural mismatch causes workflow inconsistencies, including Issue #1639 where enabling Bulk Reuser prevents the Automatic Concluded License Decider from producing expected conclusions.

The Bulk Reuser feature should be fully owned by the Reuser subsystem, which is responsible for handling reused uploads and scheduling any additional processing required on reused data.

1. Move Bulk Reuser from Decider to Reuser

Move the entire implementation of Bulk Reuser from the Decider module to the Reuser module, including:

  • Configuration handling
  • Scheduler integration
  • Job creation logic
  • UI configuration
  • REST API mapping
  • Dependency management
  • Workflow execution logic

After the change, Decider must have no direct responsibility for Bulk Reuser processing.

2. Reuser Owns Bulk Phrase Scheduling

When bulk_reused is enabled, Reuser becomes responsible for scheduling all bulk phrase related processing.

3. Remove Bulk Reuser Logic from Decider

The Decider should only perform its normal license conclusion responsibilities when scheduled.

4. Configuration Model Changes

Move bulk_reused from the Decider configuration object into the Reuse configuration object.

New structure:

{
"analysis": {
"...": true
},
"decider": {
"nomos_monk": true,
"new_scanner": true
},
"reuse": {
"reuse_upload": true,
"reuse_group": true,
"reuse_main": true,
"reuse_enhanced": true,
"bulk_reused": true
}
}

5. Backward Compatibility

Existing API clients must continue to function. The system shall:

  • Accept decider.bulk_reused
  • Internally migrate it to reuse.bulk_reused
  • Prefer reuse.bulk_reused when both are present
  • Mark decider.bulk_reused as deprecated

Example — the following:

{
"decider": {
"bulk_reused": true
}
}

should be interpreted as:

{
"reuse": {
"bulk_reused": true
}
}

6. UI Changes

Move the Bulk Reuser option from the Decider section to the Reuse section. Update labels/help text to indicate:

Reuse bulk phrases from previously analyzed packages. This feature is executed as part of the Reuse workflow and may trigger Monk Bulk and Decider processing.

7. Workflow Dependency Rules

The Reuser shall automatically schedule downstream jobs when Bulk Reuser is enabled.

Required dependency chain:

Reuser
└── MonkBulk
└── DeciderJob

The DeciderJob must execute only after MonkBulk processing completes successfully. No manual scheduling should be required from Decider.

8. Tests

Add coverage for:

  • Configuration Migration:
    • Legacy payload accepted
    • New payload accepted
    • Priority rules validated
  • Scheduler:
    • Reuser schedules MonkBulk
    • MonkBulk schedules DeciderJob
    • Dependency ordering enforced

9. Implementation Plan

The bulkreuser.php should be rewritten in C++ to blend with the Reuser agent.