feat: allow TRUE for .named/.unnamed/.extra_cols to permit unchecked extras - #329
Merged
Conversation
…extras (#281) stabilize_lst()/specify_lst()'s .named and .unnamed arguments, and stabilize_df()/specify_df()'s .extra_cols argument (which delegates to .named), now accept TRUE to allow extra named or unnamed elements through unchecked. This complements the existing NULL/FALSE (forbid) and stabilizer-function (validate) forms, mirroring JSON Schema's additionalProperties tri-state. Invalid non-function, non-logical values now raise a clear coercion error via to_lgl_scalar().
Contributor
{qcthat} Report: User AcceptanceNo issues are awaiting UAT. This report was generated by this GitHub Actions job. Last updated: 2026-08-17 12:43:45 UTC |
Contributor
{qcthat} ReportsPR-Associated Issues✅ A qcthat issue test matrix with 1 milestone, 1 issue, and 9 tests🟢 All issues have at least one test Completed Issues✅ A qcthat issue test matrix with 5 milestones, 86 issues, and 935 tests🟢 All issues have at least one test 🙈 35 issues with label "qcthat-nocov" were ignored This report was generated by this GitHub Actions job. Last updated: 2026-08-17 12:43:46 UTC |
Contributor
|
🌐 PR pkgdown deployed: https://wranglezone.github.io/stbl/pr/329/dev Generated by this GitHub Action. Updated: 2026-08-17T12:40:17Z |
jonthegeek
enabled auto-merge (squash)
August 17, 2026 12:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #281
Summary
stabilize_lst()/specify_lst()'s.namedand.unnamedarguments, andstabilize_df()/specify_df()'s.extra_colsargument (which delegates to.named), now acceptTRUEto allow extra named or unnamed elements through unchecked. This mirrors JSON Schema'sadditionalPropertiestri-state (forbid / allow unchecked / validate against a schema), while preserving the existing forbid-by-default behavior.NULLorFALSE(default): forbid extras, as before.TRUE: allow extras, unchecked (new).specify_*()function: validate extras against that spec, as before.A new internal
.resolve_extra_control()helper normalizes the argument, coercing non-function values viato_lgl_scalar()so invalid inputs (e.g..named = "yes") raise a clear coercion error instead of failing deep inside spec dispatch.Testing
test-stabilize_lst.R,test-specify_lst.R, andtest-stabilize_df.Rcovering the newTRUEbehavior, the explicitFALSEforbid path, and invalid control values.devtools::check(error_on = "warning")passes with 0 errors, warnings, and notes.Notes
Related issues #279, #291, and #292 were reviewed for design compatibility but are not implemented here.