Skip to content

Commit 576bbbb

Browse files
committed
test(job): assert the round-trip property both engine families satisfy
The re-dispatched matrix confirmed the parser fix — adobe2023 compiles again, +5 tests on every database — but surfaced a second, more interesting problem: one new ERROR per database on Adobe. Error | reports the same metadata name however the component was instantiated | Could not find the ColdFusion component or interface wheels.tests._assets.jobs.probejob. Adobe's component resolver is CASE-SENSITIVE independently of the filesystem. A miscased path does not resolve on macOS either, where the filesystem happily would. My spec instantiated through a deliberately lowercase path to prove the engine does not echo the caller's casing back into the persisted name — an assumption that only holds where the miscased path is constructible at all. So the spec was failing on Adobe for a reason *safer* than the one it was testing. Two engine families close the same hole differently: Lucee / BoxLang a miscased path RESOLVES, but the metadata name comes back canonical Adobe a miscased path does not resolve at all — nothing can be persisted because nothing can be constructed The spec now asserts the property both satisfy: a caller's miscasing cannot reach `wheels_jobs.jobClass`. Following cross-engine invariant 11, the flag lives on a struct set in the try rather than a local set in the catch, so it survives on BoxLang. This is the answer to the open question in the issue, which is the reason these specs run on every leg instead of being assumed: the round trip is safe on all five engines, for two different reasons, neither of which was verified before. lucee7 + sqlite, full core suite: 4737 pass / 0 fail / 0 error. Refs #3351 Signed-off-by: Peter Amiri <peter@alurium.com>
1 parent 9c369c9 commit 576bbbb

10 files changed

Lines changed: 33 additions & 445 deletions

box.json

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
- A background job whose `jobClass` cannot be resolved now throws `Wheels.JobClassNotFound` naming the class, the queue row, and the likely causes, instead of the engine's bare `component not found`. `wheels_jobs.jobClass` is written from `GetMetadata(this).name` on enqueue and resolved as a component path on drain, so the failure appears as "component not found" for a class that plainly exists on disk — which sends people to look at mappings and deployment rather than at the persisted string. Component paths are case-sensitive on Linux but not on macOS or Windows, so a casing mismatch resolves in development and fails on a production redeploy, long after the row was written. A path that resolves to something without a `perform()` method now throws `Wheels.InvalidJobClass` rather than failing later inside job execution. Both processing paths (`Job.$processJob` and `JobWorker.$executeJob`) share the check (#3351)
2+
- Verified across every engine: the `jobClass` string persisted on enqueue always round-trips. Lucee and BoxLang derive the metadata name from the file, so a miscased path still yields the canonical name; Adobe's component resolver is case-sensitive independently of the filesystem, so a miscased path does not construct at all. Either way a caller's miscasing cannot reach `wheels_jobs.jobClass`. Pinned by `JobClassRoundTripSpec`, which runs on all five engines rather than assuming the invariant (#3351)

public/testbox/system/stubs/139184C0543CCDB338AEFB643110CB89.cfm

Lines changed: 0 additions & 52 deletions
This file was deleted.

public/testbox/system/stubs/16CA394252B074478BEBD2B3A9C8EA82.cfm

Lines changed: 0 additions & 52 deletions
This file was deleted.

public/testbox/system/stubs/30942F4D0BCB6139072EF27C66218715.cfm

Lines changed: 0 additions & 70 deletions
This file was deleted.

public/testbox/system/stubs/754BEF48E30B63BC11E518FA73C07785.cfm

Lines changed: 0 additions & 52 deletions
This file was deleted.

public/testbox/system/stubs/B7681C49C5125395612F24D97559A4C2.cfm

Lines changed: 0 additions & 70 deletions
This file was deleted.

public/testbox/system/stubs/C383511C024245809F1F73E0CA52E220.cfm

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)