Skip to content

Phase 6 (#1075): Route fleet / launcher / CLI callers through Gremlin #1095

@xbrianh

Description

@xbrianh

Part of #1075. Depends on #1093 (Phase 4). Can be worked in parallel with #1094 (Phase 5).

What

The remaining external callers don't run stages; they read or write state for orchestration purposes (listing, landing, resuming). They should hold a Gremlin and access gremlin.state.* directly rather than calling StateData.load, build_state, etc.

File Currently uses Route to
fleet/land.py landable_shape, resolve_artifact_dir, StateData, build_state Gremlin.load(gremlin_id)gremlin.state.*
fleet/views.py StateData for status reads Gremlin.load(gremlin_id).state.*
executor/run.py StateData.load, resolve_artifact_dir, resolve_state_file Already uses Gremlin; remove residual direct calls, access via gremlin.state.*
launcher.py StateData, validate_gremlin_id Gremlin constructor + gremlin.state.*
cli/resume.py validate_gremlin_id Gremlin.validate_id() or launcher.resume()
utils/proc.py State under TYPE_CHECKING only Change type annotation to Gremlin

Add a Gremlin.load(gremlin_id) classmethod so callers that only need to inspect persisted state don't have to call StateData.load directly — they get a Gremlin with gremlin.state pre-populated from disk. Remove state.py imports from each file.

Files

  • gremlins/fleet/land.py
  • gremlins/fleet/views.py
  • gremlins/executor/run.py
  • gremlins/launcher.py
  • gremlins/cli/resume.py
  • gremlins/utils/proc.py
  • gremlins/executor/gremlin.py (new load classmethod)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions