From 4619eb8bfbff4a8379f1b3b73815ca8ef0c40900 Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 22 Aug 2026 21:11:13 +0530 Subject: [PATCH] docs: stop labelling current behaviour as legacy Three of the five comments the audit found. always() accepts a predicate or a formula and both are live: the shipped default properties pass a predicate, the six example-spec properties pass a formula. String selectors are documented first-class beside object selectors in spec-language.md. "all" is the --platform flag's default value, not an older calling convention. --- cmd/sanderling/doctor.go | 5 +++-- internal/driver/chrome/translate.go | 2 +- internal/verifier/bindings.go | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cmd/sanderling/doctor.go b/cmd/sanderling/doctor.go index e206ce5..e47a3e1 100644 --- a/cmd/sanderling/doctor.go +++ b/cmd/sanderling/doctor.go @@ -24,8 +24,9 @@ type doctorCheck struct { } // doctorChecksFor returns the host-readiness checks for a target platform. -// "all" returns the union (deduped by name) so the legacy zero-arg `doctor` -// behaviour keeps surfacing every platform's prerequisites. +// "all" returns the union (deduped by name), which is what `doctor` with no +// platform does: it is the default, so it has to surface every platform's +// prerequisites. func doctorChecksFor(platform string) []doctorCheck { switch platform { case "web": diff --git a/internal/driver/chrome/translate.go b/internal/driver/chrome/translate.go index f89fcb3..07c63c5 100644 --- a/internal/driver/chrome/translate.go +++ b/internal/driver/chrome/translate.go @@ -13,7 +13,7 @@ import ( // `foo]:has(*),body[x="..."]` that would escape the intended match. var attrNamePattern = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9_-]*$`) -// TranslateStringSelector converts a legacy string selector ("id:foo", +// TranslateStringSelector converts a string selector ("id:foo", // "descPrefix:bar") into a CSS selector or XPath expression usable from the // chrome driver's TapSelector fallback path. The boolean return is true when // the result is XPath rather than CSS. Unknown prefixes pass through to a CSS diff --git a/internal/verifier/bindings.go b/internal/verifier/bindings.go index 32ef293..97a1b42 100644 --- a/internal/verifier/bindings.go +++ b/internal/verifier/bindings.go @@ -214,9 +214,10 @@ func (v *Verifier) checkNotExtracting(slot string) { } } -// bindAlways accepts either a predicate function (legacy shape) or a formula -// handle (new shape). Both produce a formula handle tagged with -// __sanderlingFormulaSpec. +// bindAlways accepts either a predicate function or a formula handle, both +// current: the shipped default properties pass a predicate, and every property +// in the example specs passes a formula. Both produce a formula handle tagged +// with __sanderlingFormulaSpec. func (v *Verifier) bindAlways(call goja.FunctionCall) goja.Value { if len(call.Arguments) != 1 { panic(v.runtime.NewTypeError("always requires exactly one argument"))