Scope each batch record
A synchronous configuration importer decodes leased working text and stores parsed fields in destination caches.
What needs to change
Repair importAll so each batch record completes with its own lease lifetime and every failure is reported.
Reproduce
- Use `clang++ -std=c++2c -Wall -Wextra -pedantic main.cpp -o main && ./main` with the supplied file. Run the three-record batch and compare both the per-record lines and final lease count.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file supplies the map-backed pool, BufferLease and CacheLock owners and exception-reporting operations. Change only importAll.
Each input source is one nonempty token. A valid assignment has exactly one = and nonempty key and value; the decoder stores the parsed fields and returns a cache readback.
Input uses LF/CRLF records with ordinary ASCII spaces/tabs between fields and ASCII space/tab/CR framing. Other valid UTF-8 characters, including BOM and NEL, remain part of a token.
At most 50 records and 4096 bytes per physical line keep the supplied scanner and lease serial within their supported capacity. Assignment keys and values are opaque strings: leading zeros and plus-like text keep their spelling.
Input: one assignment token per line. The report’s leased count is the number of retained working-text buffers.