Skip to content

test-frs_params: CO rear-rules length 4 vs actual 5 (pre-existing on main) #202

@NewGraphEnvironment

Description

@NewGraphEnvironment

Problem

tests/testthat/test-frs_params.R:92 asserts:

expect_length(params$CO$rules$rear, 4)

but the bundled inst/extdata/parameters_habitat_rules.yaml now has 5 rear rules under CO. Reproducible on main without any other changes:

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 136 ]
── Failure ('test-frs_params.R:92:3'): frs_params bundled rules has expected species blocks ──
Expected `params$CO$rules$rear` to have length 4.
Actual length: 5.

The bundled YAML is hand-synced from link's canonical inst/extdata/configs/default/rules.yaml (per the manual cp instruction in the file's header — automation tracked separately by #185, now migrated to link#129). A recent sync added a fifth CO rear rule but the test expectation wasn't updated.

Surfaced during R CMD check for the fresh#201 release branch. Not caused by that work — pre-existing on main.

Proposed Solution

Two paths, decide based on what the bundle should be:

  1. If 5 is correct (the link rules.yaml has 5 by design): update the test to expect_length(params$CO$rules$rear, 5L). Also re-check the comment above the assertion ("4 rear rules" — needs to read 5).
  2. If 4 is correct (the bundle drifted from link): regenerate the bundled YAML from link via the canonical cp step and confirm CO rear length = 4 again.

The link side's lnk_rules_build() is the authority. Verify against the latest link inst/extdata/configs/default/rules.yaml and update whichever side is stale.

Acceptance

  • devtools::test() on fresh main has 0 failures.
  • R CMD check STATUS no longer reports this ERROR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions