feat(seatpool): the seat pool and the board several drivers share
The seats of .env and the ledger, the probe, placement, settling a finished pass, the child's credentials, the OpenRouter seats, and the board every driver on the machine shares, in one shape and under one lock. A driver is alive while its lifetime lock is held; with no lock file natively its pid and start time decide, and in the sandbox it is taken for alive. :Http is the HTTP the driver needs, on FetchHTTP1: a status outside 2xx is HttpError, every other failure carries a fixed text. :Platform gains MakeDirs, with the last directory's own mode, and errno texts for its writes and locks. The tests cover the seat pool and several drivers at once, less the checks that drive the pool's Scheduler, Admission and Stacks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8ffbd6cf5d
commit
c63c898833
10 changed files with 2562 additions and 8 deletions
|
|
@ -74,6 +74,12 @@ export namespace Crafter::Review::Platform {
|
|||
// Directories are created as needed.
|
||||
void WriteAtomic(const std::filesystem::path& path, std::string_view content, std::uint32_t mode = 0644);
|
||||
|
||||
// `path` and its missing parents: the parents made as mkdir makes them,
|
||||
// the last directory with `mode`, both less the umask; a directory that is
|
||||
// there keeps its mode. Throws with the errno text ("[Errno 13] Permission
|
||||
// denied: '/x'").
|
||||
void MakeDirs(const std::filesystem::path& path, std::uint32_t mode = 0777);
|
||||
|
||||
// An exclusive flock(2) on `lockPath`, held while the object lives. flock,
|
||||
// not fcntl or OFD locks: every driver on the machine takes flock on the
|
||||
// same side files, and on Linux the two kinds do not exclude each other. A
|
||||
|
|
|
|||
Loading…
Reference in a new issue