Skip to content

perf: reuse extract's file list when writing the traces README#24

Merged
armand0e merged 1 commit into
TeichAI:mainfrom
CompactAIOfficial:perf/readme-no-rescan
Jul 10, 2026
Merged

perf: reuse extract's file list when writing the traces README#24
armand0e merged 1 commit into
TeichAI:mainfrom
CompactAIOfficial:perf/readme-no-rescan

Conversation

@CompactAIOfficial

Copy link
Copy Markdown
Contributor

write_traces_readme re-walks the entire traces directory with rglob to rebuild a file list that the extract flow already holds — it just wrote those exact files (result.copied_files).

This adds an optional trace_files parameter; when provided, the directory rescan is skipped. The partials/failures/excluded-dir filters and sorting still apply to the passed list, so the README content is identical. Both the CLI extract command and the studio extraction runner now pass their known list; callers without one (the Hugging Face upload flow, studio server, generation) keep the rescan behavior unchanged.

Testing

  • pytest tests/test_extract_anonymize_cli.py tests/test_trace_readme.py tests/test_studio.py — 87 passed

🤖 Generated with Claude Code

write_traces_readme re-walked the whole traces directory with rglob
even though the extract flow just wrote the files and already holds the
exact list. Accept an optional trace_files argument (exclusion filters
still apply) and pass extract's copied_files from both the CLI and
studio extraction paths. Callers without a known list, like the upload
flow, keep the rescan.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@armand0e
armand0e merged commit 01fa2ce into TeichAI:main Jul 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants