Construct a per-source validation context (ADR-009 §1, §12.1)
Source:R/ruleset-context.R
ruleset_context.RdBundles the four independent per-source context axes into a validated
object. There is deliberately no single profile scalar (ADR-009 §1);
profile stays reserved for the XSD schema-profile sense. Each axis carries
its own exact, extensible value set (sitemapr owns them):
Usage
ruleset_context(
submission_channel = "absent",
discovery_provenance = "organic",
property_scope = NA_character_,
authority_evidence = "absent"
)Arguments
- submission_channel
One of
search_console_api,webmaster_tools,user,import, orabsent(default)."discovered"is rejected.- discovery_provenance
One of
organic(default),robots_txt_reference,supplied,guessed_path,index_child, orarchive_derived.- property_scope
The verified property/site string (a URL) or
NA(default).One of
absent(default),verified_property_set,target_host_robots_reference,same_location_default, orconflicting.
Value
An object of class sitemapr_ruleset_context: a named list of the
four axes, the shape the findings context list-column carries
(docs/findings-contract.md).
Details
submission_channel— how the artifact was submitted."discovered"is not a submission value and is rejected; a child that inherits no submission facts is"absent".discovery_provenance— how the artifact was found. A robots.txt reference used as cross-site trust is distinct from robots.txt discovery.property_scope— the verified property/site a submission is bound to (a URL/site string orNA); it does not by itself grant authority beyond that property.authority_evidence— structured, never boolean: the kind of evidence that establishes cross-site authority for this source.
These are per-source facts: a sitemap-index child inherits nothing
implicitly (§12.1). Build a child's context from its own evidence with
ruleset_context_for_child(), which takes no parent context. This
constructor is the pure data layer; it does not evaluate scope or authority.
See also
ruleset_context_for_child() for the per-source invariant helper
and sitemap_rulesets() for the engine axis.
Examples
ruleset_context()
#> $submission_channel
#> [1] "absent"
#>
#> $discovery_provenance
#> [1] "organic"
#>
#> $property_scope
#> [1] NA
#>
#> $authority_evidence
#> [1] "absent"
#>
#> attr(,"class")
#> [1] "sitemapr_ruleset_context"
ruleset_context(
submission_channel = "search_console_api",
property_scope = "https://example.com/",
authority_evidence = "verified_property_set"
)
#> $submission_channel
#> [1] "search_console_api"
#>
#> $discovery_provenance
#> [1] "organic"
#>
#> $property_scope
#> [1] "https://example.com/"
#>
#> $authority_evidence
#> [1] "verified_property_set"
#>
#> attr(,"class")
#> [1] "sitemapr_ruleset_context"