---
title: "2026-09-02 Factory worker image package"
description: "Added an isolated Factory worker package for histo preprocessing and viseg anatomy jobs."
image: "https://docs.virdx.dev/img/virdx-social-card.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.virdx.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026-09-02 Factory worker image package

## Work Done

- Added an isolated `apps/factory/worker-image` Python package on the Factory campaign prototype branch.
- Copied the current histo preprocessing and viseg anatomy runner behavior without changing batching, identifiers, publication, or inference semantics.
- Added JSON-file CLI payload handling with `params` and `inputs`, a Pixi CUDA environment and lock, and a container build.
- Verified formatting, lint, type checking, lock generation, wheel creation, entrypoint metadata, and runner AST equivalence.

## Lessons Learned: Pitfalls

- The current runner code mixes execution behavior with extensive rationale. Moving it while following the repository zero-comment rule required a syntax-preserving copy rather than a direct file copy.
- The worktree was shared with concurrent controller work. Scope checks were necessary to avoid treating sibling changes as part of this task.

## Lessons Learned: Improvements

- A documented Factory worker payload and image contract would make future controller and runner splits faster.
- Record that worker payloads use top-level `params` and `inputs`, while case selection and job grouping remain controller responsibilities.

Source: https://docs.virdx.dev/knowledge/inbox/2026-09-02-histo-factory-worker-image-package/index.mdx
