feat(verifier): report the registered extractor count

the web path needs it to check the page sent one reading per extractor.
This commit is contained in:
pj committed 2026-08-15 12:45:31 +05:30
1 parent 45b7624280
commit 4b7a9e2fe2
2 files changed
+60

No files matched your search

+9
View File
@@ -398,6 +398,15 @@ func (v *Verifier) ChangedExtractors() map[string]ExtractorChange {
return changes
}
// ExtractorCount reports how many extractors the spec registered. The web path
// compares it against the number of readings the page sent: a page reporting
// fewer leaves the rest holding goja's dump-derived value while the others hold
// the page's, and a property comparing previous to current across that split
// fires on a healthy app.
func (v *Verifier) ExtractorCount() int {
return len(v.extractors)
}
// OverrideExtractorValues replaces each extractor's `current` slot with a
// caller-supplied value, keyed by registration index. Used by the web tick
// path so extractor bodies that ran in V8 (against the real DOM) drive the