@@ -125,7 +125,7 @@ def test_artifact_load_relative_path_resolves_against_marin_prefix(tmp_path: Pat
125125
126126
127127def test_artifact_from_executor_status_success_untyped (tmp_path : Path ):
128- """No . artifact, but .executor_status=SUCCESS: synthesize PathMetadata."""
128+ """No artifact file , but .executor_status=SUCCESS: synthesize PathMetadata."""
129129 (tmp_path / ".executor_status" ).write_text ("SUCCESS" )
130130
131131 loaded = Artifact .from_path (tmp_path .as_posix ())
@@ -134,29 +134,37 @@ def test_artifact_from_executor_status_success_untyped(tmp_path: Path):
134134
135135
136136def test_artifact_from_executor_status_success_typed_pathmetadata (tmp_path : Path ):
137- """No . artifact, but .executor_status=SUCCESS and caller asks for PathMetadata."""
137+ """No artifact file , but .executor_status=SUCCESS and caller asks for PathMetadata."""
138138 (tmp_path / ".executor_status" ).write_text ("SUCCESS" )
139139
140140 loaded = Artifact .from_path (tmp_path .as_posix (), PathMetadata )
141141 assert loaded == PathMetadata (path = tmp_path .as_posix ())
142142
143143
144144def test_artifact_from_executor_status_success_typed_other_raises (tmp_path : Path ):
145- """No . artifact, .executor_status=SUCCESS, but caller asks for a different type."""
145+ """No artifact file , .executor_status=SUCCESS, but caller asks for a different type."""
146146 (tmp_path / ".executor_status" ).write_text ("SUCCESS" )
147147
148148 with pytest .raises (FileNotFoundError , match = "cannot synthesize" ):
149149 Artifact .from_path (tmp_path .as_posix (), TokenizeMetadata )
150150
151151
152152def test_artifact_from_executor_status_non_success_raises (tmp_path : Path ):
153- """No . artifact, .executor_status present but not SUCCESS."""
153+ """No artifact file , .executor_status present but not SUCCESS."""
154154 (tmp_path / ".executor_status" ).write_text ("RUNNING" )
155155
156156 with pytest .raises (FileNotFoundError , match = "not 'SUCCESS'" ):
157157 Artifact .from_path (tmp_path .as_posix ())
158158
159159
160+ def test_artifact_load_legacy_dotfile (tmp_path : Path ):
161+ """Historical outputs wrote `.artifact`; from_path should still load them."""
162+ (tmp_path / ".artifact" ).write_text (json .dumps ({"path" : "/legacy" }))
163+
164+ loaded = Artifact .from_path (tmp_path .as_posix (), PathMetadata )
165+ assert loaded == PathMetadata (path = "/legacy" )
166+
167+
160168def test_artifact_save_and_load_untyped (tmp_path : Path ):
161169 artifact = TokenizeMetadata (path = "/tokenized" , num_tokens = 42 )
162170 Artifact .save (artifact , tmp_path .as_posix ())
@@ -440,7 +448,7 @@ def test_runner_skips_completed_steps(tmp_path: Path):
440448 runner1 .run (steps )
441449
442450 # Record modification times
443- tokenize_artifact_path = os .path .join (steps [1 ].output_path , ". artifact" )
451+ tokenize_artifact_path = os .path .join (steps [1 ].output_path , "artifact.json " )
444452 mtime_before = os .path .getmtime (tokenize_artifact_path )
445453
446454 # Re-run — all steps should be skipped
0 commit comments