Library / Code module
Operational log completeness and order audit
record_log_auditor
Audit an operational log for missing required fields, unreadable or out-of-order timestamps, repeated ids, sequence gaps and repeats, and missing days or hours per group against a period, with coverage shares.
ATTRIBUTION.md4.8 KBLICENSE1.0 KBONET-ATTRIBUTION.md11.2 KBPROCEDURE.md2.4 KBREADME.md4.8 KBTOOLS.md2.0 KBcomponent.json12.8 KBexamples/known_good.json3.3 KBexamples/known_wrong.json333 byteskit_schema.py11.4 KBrecord_log_auditor.py9.8 KBtest_package.py6.8 KB
Full files in your harness.
What it takes and gives
- Runs with
- Python 3.10 or later
- Command
python3 record_log_auditor.py < input.json- Function
record_log_auditor.run- Required input
- records, timestamp_field
Cases it covers
- Known wrong example: The log is grouped by a field named site, which no record has, so every record would fall into one empty group. Refused as field absent.
- input invalid: refused with exit code 2
- input not json: refused with exit code 2
- field absent: refused with exit code 2
- invalid period: refused with exit code 2
Limits and scope
- Limits
- Timestamps are YYYY-MM-DD dates or ISO 8601 date-times; offsets are converted to UTC before slots are counted, so local midnight can shift a record to another day. One record per slot counts as covered; the helper does not check how many records a slot should have. Sequence values must be integers; other values are skipped.
- Work activities
- Maintain operational records; Document operational activities; Maintain operational records or records systems.
Details
- Kind
- Code module
- Licence
- MIT
- Declared effects
- runs commands
- Source
- github.com/alisonjieli-png/loop-engine/tools/creative_originals/occupation_task_kits/items/record_log_auditor
- Size
- 12 files, 70.6 KB
- Identity
library.supply.creative_originals.4914c21de05db2cd3852c41e.6e5ed7747e9b3a1c- Version
6e5ed7747e9b3a1cd89d81f5a5d43d2433c905dc851bfa81092eb78a51c95396
The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.
Where it is shown
- Dates, times and time zonesCorner cases
Related components
Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.