Migrate the remaining temp path call sites to the shared scoped temp types
Table of Contents
This page is a capture in the next bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.
1. What
The shared temp types land in ores.platform::filesystem with the platform
clean-up: scoped_temp_file and scoped_temp_directory. Six files
across five top-level components still build their own temporary paths and
should migrate to them.
| Call site | Kind | Today |
|---|---|---|
ores.storage/src/net/storage_transfer.cpp |
production | a local make_temp_archive() used by two methods plus the same inline blob path repeated in two more, UUID named, removed by hand on success and in a catch block |
ores.ore/service/src/messaging/report_package_handler.cpp |
production | a staging directory created inline, UUID named, removed by hand after the upload |
ores.compute/wrapper/tests/filesystem_archiver_tests.cpp |
test | its own variant |
ores.ore/core/tests/planner_import_planner_tests.cpp |
test | its own variant |
ores.orgmode/tests/resolver_tests.cpp |
test | its own variant |
ores.utility/tests/crypto_sha256_tests.cpp |
test | its own variant |
2. Why
One behaviour had seven implementations and three naming strategies, which
is the duplicate case that B06 and H02 exist for. Cleanup is a per-site
obligation today, so it holds only where each site remembers it: the
storage_transfer.cpp paths remove their archive on success and in a
catch (...), while report_package_handler.cpp removes its staging
directory only after the upload, so a throw there between
create_directories and that remove_all leaves the directory behind.
Every test site repeats a manual std::filesystem::remove that a
destructor should own.
Each call site belongs to a component with its own clean-up story, so this is a separate pass rather than part of the platform story. The migration is mechanical at every site and changes no behaviour beyond the cleanup.
3. References
projects/ores.platform/include/ores.platform/filesystem/— the shared types.projects/ores.platform/tests/filesystem_file_tests.cpp— the migrated reference call site.
4. See also
- Bring ores.platform to the clean standard — where the shared types landed.
- Component Clean Standard — B06 and H02, the duplicate rules this serves.