Skip to content

[v1][breaking] Hide internal fields on ExecutableUnit #91

@robbyt

Description

@robbyt

Summary

platform/script/executableUnit.go:19-44 exports every field — ID, CreatedAt, ScriptLoader, Compiler, Content, DataProviderand 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions