the watch list, each nightthe samethe samethe samethe samethe sameone cell: 10% to 8%one new sentencethe page that changed, and only what changedfive pages ask nothing of anybody
The run in 5 steps
Fetch the watch list with the fingerprints of the night before
Every record has a fingerprint, which is a hash of its text. Send each page with the fingerprint of its last record. A batch takes 20 pages, so 60 pages are 3 calls.Request body of fetch_contents_batch, cut to 3 of 20 items
_URL with the address of a page, and each that ends in _FINGERPRINT with the fingerprint of that page’s record from the night before.
Skip what is unchanged
The response starts with a tally, and each result says how its fetch ended. This response is cut to the tally and to the outcome of each record.Part of the response
Compare the changed page with its last record
fetched on 4 Novemberfetched on 11 November41.2%41.6%1 cell changed41.2% became 41.6%
compare_contents, with the id of the record from the night before.
Request body of compare_contents
BASELINE_CONTENTS_ID with the id of the earlier record of that page.
The comparison lists what changed, block by block. This response is cut to the fields that say what changed.
Part of the response
Read the row of the changed cell
A cell alone is a number. To say which threshold it is, read the table of the new record and take the row with its headings. The table comes cell by cell, so the alert can say “the large exposure limit for unrated counterparties” and not “row 3, column 2”.Quote from the version that binds
A regulator in a country with 2 official languages publishes each rule twice. A record lists the page’s own versions in other languages, and where the page declares it, which version binds.Part of the record
authoritative is there only where the page itself declares which versions bind.
What the compliance officer can check
Know the limits
A watch runs when your code calls. No call watches a page for you. A record is stored for 48 hours after its last use and for at most 30 days. For a page that is fetched each night, the record of the night before is still stored. For a longer history, store the Markdown of each record with its fingerprint, and send both as the baseline of a later comparison. A fingerprint and a comparison work only between 2 records of one version of getclean. When a new version comes, send the earlier one aspinned_version and the watch goes on as before, for as long as that version is served. Or fetch every page once under the new version, and start from those records.
The comparison says which words changed. What the change means for the bank is for your agent and your lawyers to say.
For the calls, see Find the one cell that changed and Fetch 20 sources at once and know what came back before you read a word.