Add bucket copy integration tests in hub package (TS)
Session from pi-sessions on Hugging Face by julien-c · CC-BY-4.0 · condensed by Coders Talk
Click a segment to jump to that moment
23msession
1interventions
by library · 1d
GOAL
Port a set of Python integration tests for HfApi.copy_files bucket-to-bucket scenarios into TypeScript vitest tests for the hub package's copy-files module.
- +0Prompt · +0Write vitest tests in copy-files.spec.ts mirroring the Python integration tests for bucket-to-bucket and repo-to-bucket copy_files scenarios.
- +0mAgent did · +0mExplored existing spec files, bucket handling logic across copy-files.ts, create-repo.ts, commit.ts, file-exists.ts, paths-info.ts, download-file.ts and error.ts to understand conventions and error types before writing tests.
- +4mAgent did · +4mEdited copy-files.spec.ts multiple times over ~20 minutes to add the ported integration tests for bucket-to-same-bucket, bucket-to-different-bucket-folder, and repo-to-bucket-with-revision scenarios.
- +23mIntervention · +23mDeveloper re-sent the exact same request to write the Python-mirrored tests, word for word, suggesting the prior edits hadn't produced what was wanted or were incomplete.Why: I asked again with the same wording because the tests it wrote before weren't matching what I needed, so I wanted it to redo the work properly.
- +23mOutcome · +23mSession ends with the developer re-issuing the identical test-writing prompt; no confirmation the new tests pass.
VERDICT
Next time I'd give it the full list of Python test cases upfront instead of one at a time, so it has the complete picture before writing anything. Re-sending the same prompt verbatim was the only real correction here, and it didn't clearly resolve anything since the transcript ends without confirming the tests actually pass.