Retire Previous Library
Changed onRetire what is left of this document's older library, now that a read one is in force.
The counterpart of pairing an approval with the one rule it replaces. That is the right move for a handful of rules and the wrong one for a standards document with four hundred: bulk-approving a read library leaves the older one live beside it, so the same obligation is checked twice, in two wordings, and the library's counts stop meaning anything.
Older library is decided by provenance, not by dates: a requirement whose reading carried an agent_run_id belongs to the current one, and everything else — the libraries the retired per-document press wrote, and the rules written against a set by no reading at all — is the previous one. A date comparison would need to guess where the boundary between two libraries falls; provenance is the boundary.
Refused until at least one read rule is in force. Without that guard this empties a document's library whenever it is pressed with nothing approved, which is the one outcome nobody could want: no obligations checked, no error, and the only sign is a count going to zero. Approving something first is also what makes the press meaningful — there is a replacement to retire in favour of.
Archived rules are left alone, by supersede_requirements: an archive is a person saying this obligation does not apply, it is not in force either way, and overwriting it with "something replaced this" is the one fact in that table nobody may overwrite.
Request
- Base URLhttps://api.kobaltlabs.com (the document declares no server; this is the origin it was published from)
- URLhttps://api.kobaltlabs.com/marketing/guidelines/documents/{file_id}/retire-previous-library
- Authnone declared
Path parameters
Response
Successful Response
Changes
- info
endpoint added
- info