phenotypic.sdk_.run_identity#

phenotypic.sdk_.run_identity(output_dir: Path) RunIdentity | None[source]#

Return this output’s run identity, or None when it has no state.

In P1 the tokens are read from the fields today’s writers already produce: processing_generation (still a uuid4().hex until P2), pipeline_sha256, the three finalization inputs, and work_ids. restart_epoch defaults to 0 because P2 introduces its writer. That is what makes this phase independently landable – the reader works on today’s trees, before any writer moves.

scheduler_epoch and owner_generation come from the two liveness records and are deliberately outside RunIdentity.digest(): they are facts about processes, not about configuration, and folding them in would discard the verification cache every time a job is submitted against unchanged work.

Parameters:

output_dir (Path) – Run output root. May be any directory, including one this package has never written to.

Returns:

A RunIdentity, or None when there is no readable processing state. Never raises.

Return type:

RunIdentity | None