View source: R/coverage_rules_path.R
| coverage_rules_path | R Documentation |
coverage_rules_path() expands observed filesystem paths into recursive structural components and evaluates whether those components are covered by contextual path rules.
The function provides a diagnostic view of contextual coverage. It identifies which observed filesystem structures are recognised by a rulebook and which remain unmatched.
This makes it useful for:
contextual reconstruction;
semantic stabilisation workflows;
rulebook development and refinement;
coverage diagnostics;
filesystem archaeology;
exploratory analysis of operational structures.
coverage_rules_path(snapshot, contexts)
snapshot |
A filesystem snapshot data.frame containing at least:
|
contexts |
A contextual reconstruction object containing contextual roots and path rules. |
Evaluates how filesystem observations align with a contextual path-rule model.
Structural matching is recursive.
For example:
"R/import/helpers.R" expands to:
"R"
"R/import"
"tests/testthat/test-import.R" expands to:
"tests"
"tests/testthat"
Expanded structural paths are evaluated against contextual path rules associated with the matching contextual root.
The function operates on filesystem observations and explicit contextual rules. It does not infer:
Activities;
Events;
Record Sets;
provenance relationships.
Instead, it evaluates whether observed filesystem structures are covered by an existing contextual model.
Unmatched structures may indicate:
missing contextual rules;
evolving workflows;
operational noise;
areas requiring further semantic stabilisation.
A tibble describing structural path-rule coverage.
The returned tibble includes:
Contextual environment associated with the matched rule.
Contextual root used for evaluation.
Recursively expanded structural path.
Path rule evaluated against the structural path.
Rule outcome associated with the matched rule.
Logical indicator showing whether the structural path is covered by the rule.
construct_structural_paths(),
refine_by_rulebook(),
compile_rulebook()
small_snapshot <- tibble::tibble(
full_path = c(
"D:/packages/fscontext/R/import/helpers.R",
"D:/packages/fscontext/tests/testthat/test-import.R",
"D:/packages/fscontext/data-raw/input.csv"
),
rel_path = c(
"R/import/helpers.R",
"tests/testthat/test-import.R",
"data-raw/input.csv"
)
)
small_context <- list(
contexts = list(
fscontext = list(
roots = "D:/packages/fscontext",
rules = list(
path = c(
"R" = "software_development",
"tests/testthat" = "unit_testing",
"data-raw" = "etl"
)
)
)
)
)
coverage_rules_path(
snapshot = small_snapshot,
contexts = small_context
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.