| Filename | Latest commit message | Latest commit date |
|---|---|---|
Written from extensions/opportunity-report.md and sharing no code with wai-rs: it reads every report, check, SCTE 35 section and reported statement itself, verifies contracts, runs and signed statements with revenue_share_verify.py and rooms with live_ads_verify.py, recomputes every break, attribution, line, citation and flag, requires every mutated copy of the corpus to fail and drops each of its own checks in turn. The corpus gains the vectors those checks need: a run of another channel, runs overlapping, an overlapping contract, a report of the first hour alone, and the first hour split across two windows that both air its ad slot. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
| .. | ||
| README.md | ||
| vectors.json | ||
live-conformance/opportunity — the opportunity report and the statement check
The corpus of extensions/opportunity-report.md §14, in
one file, vectors.json:
contracts: share contracts (revenue-share §3), by name, each hexadecimal;runs: the channel's program-as-run windows, by name, each in its carriage (revenue-share §4.1);rooms: rooms, by name, each as a report's document holds one (§8.1): itsdescriptor,grants,key_log,chainsandpolicy;ledgers: ledger documents (receipt-ledger §7.1), by name, each whole, for the signed statements;reported: reported statements (§9), by name, each itsformandtext;vectors: verification documents, each ofkindreport(§8.1: the names of itscontract, othercontracts,runs(ornull) androoms, and itsreportin hexadecimal) orcheck(§11.1: such areport, the name of itsreportedstatement, its signedstatement(the name of its contract, the statement in hexadecimal, the names of its runs and ledgers) ornull, and itscheckin hexadecimal), with theoutcome§8.3 or §11.3 gives it;keys: the operator's, the two owners', the channel signer's, the auditor's, the room producer's and the ad decider's public keys.
Equivalence. For each vector, a conforming verifier given its parts, resolved by name, reaches the outcome the vector states:
refuse: thereasonand where,at:[]for the document;["contract"]and the places revenue-share §8.2 gives;["report"];["run", k];["room", k], followed by live-ads' own place for a room live-ads refuses;["room", k, "break", i]for a cued break (its index in its room's schedule);["run", k, "entry", e]for a scheduled break; for a check,["report", …],["reported"],["statement", …]and["check"];accept, for a report: its digest, the contract's, theissuer, thepartyand itsrole,startandend, theroomsandruns, each break in the period (its class, its room and index or the run and entry it was taken in, its openingcue, itsstart,duration_ms, whether it isopen, itsslotsand where they came from, what itssectionstates, its run, entry, asset and split, and the records itcites), each line (split, class, breaks,break_ms, slots, unslotted,ppm,cites), and thetotals;accept, for a check: its digest, theissuer, the report's digest,party,startandend, the reported statement's digest,formandbasis, the signedstatement's digest ornull, the bounds, and each line with its figures, itssignedfigures ornull, and the names of itsflags.
The channel, fast-9, airs two windows of 2026-10-16: the first hour (owner A's a/ep-1, the ad
slot slate-90, owner B's b/doc-1) and the second (A's a/ep-2, the ad slot mid-60, B's
b/doc-2). Its contract maps each owner's programmes to a split of its own (a third to A and two
thirds to the operator; three fifths to B and two fifths to the operator), names a between split
of halves to the two owners, and the rule preceding. The room's producer cues eight breaks: an out
and its in carrying a splice_insert() with a break duration (slots from the room's policy, two),
breaks of type 4 carrying time_signal()s with provider and distributor placement opportunities
stating three or four slots, one of them inside slate-90, an out and its in with such a section,
a splice_insert() carrying a placement opportunity of three slots, a provider advertisement
start (a type that states no slots), and a cue of form 0. No cue covers mid-60, which is a
scheduled break, unslotted. The ledger document bills three viewers' receipts for every break,
two impressions each; the signed statements are the operator's, of the same day.
The accepted vectors:
owner_a_day,owner_b_day,operator_day: the day's reports, each signed by the party it is for;owner_a_runs_alone: A's day from the runs alone, both ad slots scheduled;owner_b_two_rooms: B's day under a contract naming a second room, whose break overlaps none;check_owner_b_under_reported: B's platform reports twelve impressions forb/doc-1and two forb/doc-2, which holds as many slots:b/doc-2isbelowthe day's rate, and the day is below the signed statement's twenty-four impressions and B's signed part;check_owner_a_csv: A's reported statement in CSV, per day, as the signed statement states it: nothing flagged;check_owner_b_without_statement,check_owner_b_reports_a_programme: B's report alone beside the same figures, and beside figures listing A's episode, which isunproved(no break of B's aired in it).
Every other vector is refused, a control of one defect: each reason of §13, each code it reuses, and a refusal at a contract, a run, a room and a signed statement, at its place.
Provenance. Generated here: wai_opportunity_vectors gen writes vectors.json from fixed
seeds (the operator, the owners, the channel signer, the auditor, the buyer, and the room's
authority, clock, producer and decider). Nothing here was fetched from outside the repository.
Regenerate and check:
cd wai/wai-rs
cargo run -q --no-default-features --features opportunity_report --bin wai_opportunity_vectors -- gen ../live-conformance/opportunity
cargo run -q --no-default-features --features opportunity_report --bin wai_opportunity_vectors -- verify ../live-conformance/opportunity
cargo test -q --no-default-features --features opportunity_report --test opportunity_report
python3 -I ../live-conformance/opportunity_report_verify.py ../live-conformance/opportunity
The second implementation, opportunity_report_verify.py, shares no code with wai-rs. It reads
every report, check, section and reported statement itself, verifies contracts, runs and signed
statements with revenue_share_verify.py and rooms with live_ads_verify.py, recomputes every
break, attribution, line, citation and flag, requires every mutated copy of the corpus to fail, and
requires the corpus to catch it with each of its own checks dropped.