Skip to content

Commit 891761a

Browse files
Track state artifacts in workflow outputs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 69f3fea commit 891761a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/code2skill/core.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def execute_repository(config: ScanConfig) -> ScanExecution:
201201
effective_mode=effective_mode,
202202
repo_path=repo_path,
203203
output_dir=output_dir,
204+
report_path=_resolve_report_path(config),
204205
inventory=inventory,
205206
budget=budget,
206207
changed_files=changed_files,
@@ -239,10 +240,14 @@ def execute_repository(config: ScanConfig) -> ScanExecution:
239240
)
240241
)
241242

243+
output_files = sorted({*written_files, report_path})
244+
if config.run.write_state:
245+
output_files.append(state_store.state_path)
246+
242247
return ScanExecution(
243248
repo_path=repo_path,
244249
output_dir=output_dir,
245-
output_files=sorted({*written_files, report_path}),
250+
output_files=output_files,
246251
candidate_count=len(inventory.candidates),
247252
selected_count=len(budget.selected),
248253
total_chars=budget.total_chars,
@@ -822,6 +827,7 @@ def _build_report(
822827
effective_mode: str,
823828
repo_path: Path,
824829
output_dir: Path,
830+
report_path: Path,
825831
inventory,
826832
budget,
827833
changed_files: list[str],
@@ -847,6 +853,7 @@ def _build_report(
847853
effective_mode=effective_mode,
848854
repo_path=repo_path,
849855
output_dir=output_dir,
856+
report_path=report_path,
850857
inventory=inventory,
851858
budget=budget,
852859
changed_files=changed_files,

tests/test_ci_incremental.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ def test_run_ci_repository_uses_git_diff_for_incremental_skill_patch(
190190
assert result.report.structure_only is False
191191
assert result.report.llm_provider == "openai"
192192
assert result.report.llm_model is None
193+
assert str(output_dir / "state" / "analysis-state.json") in result.report.intermediate_artifact_files
194+
assert output_dir / "state" / "analysis-state.json" in result.output_files
193195

194196

195197
def _git(repo_path: Path, *args: str) -> str:

0 commit comments

Comments
 (0)