跳到正文
DEV Community· Aleksander Sekowski·· 55 分鐘前AI 評分34

OpenRTB 2.6 約半數一致性要求無法透過靜態檢查

OpenRTB 2.6 leaves about half of its conformance statements unlintable.

AI 導讀

OpenRTB 2.6 的一致性要求中,只有 53.5% 可由靜態檢查器驗證,另有 20.5% 須依賴執行時情境,26.0% 沒有機器可判定的標準。OpenRTB 3.0 可靜態檢查的比例更低,為 27.3%;其中 50.0% 須透過其他訊息或即時互動才能測試。

正文

OpenRTB 2.6 leaves about half of its conformance statements outside a static lint. On the instance count, 53.5 percent are statically checkable, 20.5 percent need a runtime context, and 26.0 percent have no machine-decidable criterion. The checkable share is a little over half. The unlintable half is those last two columns, and they are not the same gap.

The figures are Table 1 of my July 2026 preprint, How Machine-Checkable Is OpenRTB? Classifying the Normative Content of the Protocol That Clears Real-Time Advertising (doi:10.13140/RG.2.2.27937.57448). The PDF is public, and the research page points at the same text. The unit of analysis is the specification sentence. Production invalid rates belong to a separate study.

The vocabulary under the table is thinner than an IETF document's. Neither OpenRTB 2.6 nor OpenRTB 3.0 references RFC 2119. Outside the boilerplate legal disclaimer, neither text contains a single uppercase normative keyword, and the specification bodies contain zero occurrences of MUST, SHOULD, or MAY. Requirement strength is lowercase prose, a table annotation, or a local definition. OpenRTB 2.6 defines required attributes as the ones whose omission would technically break the protocol, and it withholds normative force from recommended attributes: they are not a suggestion to propagate any specific field.

Four classes cover the 288 conformance statements

I took every sentence that carries a normative keyword in the canonical OpenRTB 2.6-202606 text and in OpenRTB 3.0, then kept the 288 that state a real conformance constraint. Each statement receives one class. Class A is expressible in JSON Schema on a single document. Class B is decidable from that same single message by a stateless rule, past what a schema practically states. Class C needs another message, a second artifact, or a live interaction. Class D has no observable criterion. Those sentences hand their meaning to a bilateral agreement or to a fact no validator can see. Where this note quotes one figure, it is the instance-weighted figure, which is also what the preprint plots.

Spec n A: schema B: lint C: runtime D: undecidable A+B
OpenRTB 2.6-202606, instances 200 14.5% 39.0% 20.5% 26.0% 53.5%
OpenRTB 2.6-202606, deduplicated 151 15.2% 30.5% 22.5% 31.8% 45.7%
OpenRTB 3.0, instances 88 17.0% 10.2% 50.0% 22.7% 27.3%
OpenRTB 3.0, deduplicated 83 14.5% 9.6% 51.8% 24.1% 24.1%
Combined, instances 288 15.3% 30.2% 29.5% 25.0% 45.5%

OpenRTB 2.6 contributes 200 of the 288 statements, and a static linter's ceiling on that text is the 53.5 percent in the A+B column. Class C becomes testable once you can see the other message or the live exchange. Class D does not become testable by watching harder. Both sit outside a single-message lint.

The labels are my coding. A blind recode of a 60-statement sample agreed with them at Cohen's kappa 0.77 to 0.79. The runs were a language model given only the codebook, so the figure measures stability under a consistent reader, and the preprint reports that the headline conclusions survive the stricter boundary readings.

The 53.5 percent is the contract a linter can hold without watching the auction. I keep an open-source implementation of that static slice at rtblint.org. In the preprint it is a lower bound: whatever it enforces is enforceable, so classes A and B are populated in practice. The ceiling in the table is a property of the specification.

Repeated boilerplate is why deduplication moves the share

The specification repeats some clauses verbatim across objects. The keywords and kwarray exclusivity boilerplate alone appears eight times. Deduplicating on normalized text cuts the 2.6 denominator from 200 statements to 151 and lowers the statically checkable share by eight points, from 53.5 percent to 45.7 percent, because most of the repetition sits in the lint class. Lint falls from 39.0 percent to 30.5 percent. Schema only moves from 14.5 percent to 15.2 percent. Runtime moves from 20.5 percent to 22.5 percent. The undecidable share rises from 26.0 percent to 31.8 percent, just under a third.

The instance count answers how often a reader meets the sentence. The deduplicated count answers how many distinct constraints the sentences are. Every conclusion from the profile holds under either counting. Between a quarter and a third of 2.6's conformance content has no machine test: 26.0 percent of instances, 31.8 percent of unique text. Where one figure is the quote, it is the instance-weighted one.

OpenRTB 3.0 put the normative weight where a linter cannot see it

OpenRTB 3.0 is a smaller conformance text, 88 statements, and a different shape. On instances, schema is 17.0 percent and lint is 10.2 percent, so the statically checkable share is 27.3 percent. Half the conformance content is class C, 50.0 percent. The undecidable share is 22.7 percent. Deduplicated, the denominator is 83, the statically checkable share is 24.1 percent, class C is 51.8 percent, and the undecidable share is 24.1 percent. The deduplicated schema and lint shares are 14.5 percent and 9.6 percent.

The combined instance row is the same 288 statements: 15.3 percent schema, 30.2 percent lint, 29.5 percent runtime, 25.0 percent undecidable, 45.5 percent statically checkable. Pooling the generations hides the reason to keep the rows. The documents fail in different columns.

OpenRTB 3.0 moved its domain vocabulary out to AdCOM and spent its own normative budget on transport, security, and eventing. The class C mass is HTTPS and TLS 1.2+ mandates, version headers, compression negotiation, billing and loss notice semantics, and the ads.cert signing chain. Those sentences are checkable by observing a handshake, a header, a notice, or a signature. They are not checkable by reading one JSON document. The statically checkable share, 27.3 percent, is half the instance-weighted share of 2.6.

A protocol can be more rigorous and less lintable. Rigor that lives in transport and eventing stays invisible to a schema or a single-message rule. OpenRTB 2.6 leaves about half its statements unlintable because a lintable core sits beside a runtime column and an undecidable residue. OpenRTB 3.0 inverts the profile: its normative weight is runtime behavior, and 27.3 percent is statically checkable. The rows are a map of the text. They are not a rate of bad bids.

The rest of the classification, the codebook, and the scripts are in the preprint. The statement-level labels behind this table are on ResearchGate, in the PDF, and in the artifact directory at github.com/aleksUIX/rtblint/tree/main/paper/openrtb-checkability.

來源:DEV Community · dev.to