From 98c43c4558204a574dc09fb0e0a7a3a1f63a6096 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 18:30:11 +0000 Subject: [PATCH 1/4] fix: don't rely on request.MODULE_NAME in test harness module activation ColdBox's BaseTestCase clears/bypasses the request scope between virtual-app reinits, so request.MODULE_NAME (set only in Application.cfc's pseudo-constructor) can be gone by the time cbLoadInterceptorHelpers fires on a reinit. This threw a GLOBAL BUNDLE EXCEPTION during the LocalDiskSpec reinit in CI, leaving the cbfs module never re-registered and cascading into "Instance not found: DiskService@cbfs" across almost every remaining spec/engine. Hardcode the module name instead, matching the literal Application.cfc already uses. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk --- test-harness/config/Coldbox.cfc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test-harness/config/Coldbox.cfc b/test-harness/config/Coldbox.cfc index 5b0223c..0b0f979 100644 --- a/test-harness/config/Coldbox.cfc +++ b/test-harness/config/Coldbox.cfc @@ -87,11 +87,14 @@ /** * Load the Module you are testing + * + * Note: We can't rely on `request.MODULE_NAME` here because ColdBox's test harness + * clears/bypasses the `request` scope between virtual-app reinits (BaseTestCase's + * reset()/beforeTests()), so that key set in Application.cfc's pseudo-constructor + * may no longer exist by the time this interceptor fires on a reinit. */ function cbLoadInterceptorHelpers( event, interceptData, rc, prc ){ - controller - .getModuleService() - .registerAndActivateModule( moduleName = request.MODULE_NAME, invocationPath = "moduleroot" ); + controller.getModuleService().registerAndActivateModule( moduleName = "cbfs", invocationPath = "moduleroot" ); } } From 4504f13d7d5cf07a39e7fb1828e240adb20965f7 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 18:44:52 +0000 Subject: [PATCH 2/4] fix: use current S3Mock env var to seed the initial test bucket adobe/s3mock renamed initialBuckets to COM_ADOBE_TESTING_S3MOCK_STORE_INITIAL_BUCKETS (deprecated in S3Mock 4.5.0, removed thereafter). Pulling the image unpinned meant CI silently stopped creating the cbfs-test bucket, so every S3 disk test failed immediately with "NoSuchBucket" regardless of any application code. Pin the image and use the current env var name. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ae9c482..380b629 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-24.04 services: s3Mock: - image: adobe/s3mock + image: adobe/s3mock:4.12.2 ports: - 9090:9090 env: - initialBuckets: cbfs-test + COM_ADOBE_TESTING_S3MOCK_STORE_INITIAL_BUCKETS: cbfs-test env: DB_USER: root DB_PASSWORD: root From 6de37622b8e6db89c2b3bbd894cf5a62a956cd24 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 18:46:26 +0000 Subject: [PATCH 3/4] fix: add missing semicolon in RamProvider cleanDirectory closure Fixes the cfformat check failure introduced by the recent cleanDirectory() arrow-function refactor. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk --- models/providers/RamProvider.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/providers/RamProvider.cfc b/models/providers/RamProvider.cfc index 4ca8cde..34fcffc 100644 --- a/models/providers/RamProvider.cfc +++ b/models/providers/RamProvider.cfc @@ -889,7 +889,7 @@ component accessors="true" extends="cbfs.models.AbstractDiskProvider" { return isNull( aDeleted ) ? true : aDeleted.len() > 0 ? true : false; } else { this.files( arguments.directory ).each( ( file ) => { - this.delete( arguments.file ) + this.delete( arguments.file ); } ); intercept.announce( "cbfsOnDirectoryDelete", { "directory" : arguments.directory, "disk" : this } ); return !this.directoryExists( arguments.directory ); From a27587930b49adbd385b6cedd38d1089b775bbde Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 18:50:35 +0000 Subject: [PATCH 4/4] style: apply cfformat to RamProvider.cfc Ran the project's own cfformat tool (matching CI's format:check step) to fix the method-chain wrapping the previous semicolon fix didn't address. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk --- models/providers/RamProvider.cfc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/models/providers/RamProvider.cfc b/models/providers/RamProvider.cfc index 34fcffc..5bb13eb 100644 --- a/models/providers/RamProvider.cfc +++ b/models/providers/RamProvider.cfc @@ -888,9 +888,10 @@ component accessors="true" extends="cbfs.models.AbstractDiskProvider" { intercept.announce( "cbfsOnDirectoryDelete", { "directory" : arguments.directory, "disk" : this } ); return isNull( aDeleted ) ? true : aDeleted.len() > 0 ? true : false; } else { - this.files( arguments.directory ).each( ( file ) => { - this.delete( arguments.file ); - } ); + this.files( arguments.directory ) + .each( ( file ) => { + this.delete( arguments.file ); + } ); intercept.announce( "cbfsOnDirectoryDelete", { "directory" : arguments.directory, "disk" : this } ); return !this.directoryExists( arguments.directory ); }