--[[ verify_source.luau -- read the module SOURCE TEXT in Edit, bypassing require(). Why: require() caches a ModuleScript's return value for the whole Studio session. Both modules were pushed successfully (match=true), but an earlier require() in this same session means require() still hands back the OLD table -- so a harness that builds cars via require() measures stale code and can report a false PASS. Reading .Source is cache-proof. This only proves the SOURCE is correct on disk-in-Studio. It cannot prove runtime behaviour -- that needs a fresh datamodel (press Play), which rebuilds the require cache from this source. ]] local SSS = game:GetService("ServerScriptService") local RS = game:GetService("ReplicatedStorage") local out = {} local function log(...) local parts = {} for i = 1, select("#", ...) do parts[#parts + 1] = tostring((select(i, ...))) end table.insert(out, table.concat(parts, " ")) end local function find(name: string): ModuleScript? for _, root in ipairs({ SSS, RS }) do local hit = root:FindFirstChild(name, true) if hit and hit:IsA("ModuleScript") then return hit end end return nil end local checks = { { module = "CarManager", label = "isFront convention", want = "local isFront = zSign > 0", bad = "local isFront = zSign < 0", }, { module = "CarManager", label = "shell nose solver", want = "shellYaw = -math.atan2(-nose.X, nose.Z)", bad = "shellYaw = -math.atan2(nose.X, -nose.Z)", }, { module = "CarManager", label = "SHELL_YAW_OVERRIDE removed", want = nil, bad = "local SHELL_YAW_OVERRIDE", }, { module = "Chassis", label = "DRIVE_SIGN", want = "Chassis.DRIVE_SIGN = 1", bad = "Chassis.DRIVE_SIGN = -1", }, } local allGood = true for _, c in ipairs(checks) do local m = find(c.module) if not m then log(string.format("%-28s MODULE NOT FOUND (%s)", c.label, c.module)) allGood = false continue end local src = m.Source local hasWant = (c.want == nil) or (string.find(src, c.want, 1, true) ~= nil) local hasBad = (c.bad ~= nil) and (string.find(src, c.bad, 1, true) ~= nil) local ok = hasWant and not hasBad if not ok then allGood = false end log(string.format("%-28s %-6s [%s: %d bytes]", c.label, ok and "OK" or "STALE", m:GetFullName(), #src)) end log("") log( allGood and ">>> SOURCE IS CORRECT in Edit. require() is still caching the old" or ">>> SOURCE IS STALE -- the push did not land." ) if allGood then log(" copies this session, so only a FRESH Play session can prove runtime") log(" behaviour. Save (Ctrl+S), then press Play.") end return table.concat(out, "\n")