Summary
platform/script/executableUnit.go:19-44 exports every field — ID, CreatedAt, ScriptLoader, Compiler, Content, DataProvider — and provides matching getters (GetID, GetCompiler, GetDataProvider, …).
External callers can mutate exe.DataProvider mid-flight after construction, which breaks the invariants the engine evaluators depend on.
Proposal
Make all fields unexported (id, createdAt, scriptLoader, compiler, content, dataProvider). The public getters already exist. Construction stays via NewExecutableUnit.
Files
platform/script/executableUnit.go:19-128
- Any test code that touches the fields directly.
This is a breaking-change candidate for v1; removes mutation capability from external callers.
Summary
platform/script/executableUnit.go:19-44exports every field —ID,CreatedAt,ScriptLoader,Compiler,Content,DataProvider— and provides matching getters (GetID,GetCompiler,GetDataProvider, …).External callers can mutate
exe.DataProvidermid-flight after construction, which breaks the invariants the engine evaluators depend on.Proposal
Make all fields unexported (
id,createdAt,scriptLoader,compiler,content,dataProvider). The public getters already exist. Construction stays viaNewExecutableUnit.Files
platform/script/executableUnit.go:19-128This is a breaking-change candidate for v1; removes mutation capability from external callers.