Skip to content

OpenPVA 2.4.0: Ergonomic Authoring Front-End, Static Formula Compiler & Cookbook - #7

Merged
BWBrook merged 3 commits into
mainfrom
openpva-2.4.0
Dec 4, 2026
Merged

BWBrook merged 3 commits into
mainfrom
openpva-2.4.0

Conversation

@BWBrook

@BWBrook BWBrook commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Summary

Delivers OpenPVA 2.4.0 (Track B, Cycle 4 — designed and stress-tested across Claude Fable 5.2, OpenAI Codex GPT-6.2 Astra, and Google Gemini 4 Carbon under Gemini 4 Neon adviser verification):

  • Separated inputs & piped blueprint authoring (R/model.R, R/formula.R, R/model_audit.R, R/rates.R):
    • Pure value-semantic pva_model() separating parameter-evidence tables (unit, source, explicit type), tabular vital-rate schedules ("0", "1-2", "2+", sex = "All", optional by strata, all-female CSV "F" -> FALSE handling), initial cohort tables (cohort_population()), and centralised custom fields defaults from an ordered, copy-on-modify step_*() pipeline (15 explicit native-aligned step verbs including step_process() escape hatch, GAPPS-style when/enabled modifiers, and uses = tracking for opaque user callbacks).
    • Static compile-time ~ formula AST compiler (codetools) generating plain OpenPVA-scoped closures with zero runtime eval()/list2env(), zero .GlobalEnv capture on --vanilla PSOCK workers, automatic requires inference, runtime logical-to-numeric probability coercion, and fail-fast compile-time diagnostics.
  • Closure-free & structural ensembles (R/ensemble.R, R/scenario.R):
    • run_pva_ensemble() accepts build = <pva_model> or a named structural model list (design$model) with seed_by = TRUE, upfront row-by-row validation, per-member PSOCK dispatch (avoiding O(N^2) payload resending), and per-member cache_dir fingerprinting.
    • compile_scenario(validation = c("strict", "fast")) propagates the execution default cleanly while always running compile-time preflight.
  • Visual & parameter-provenance audits (R/model_audit.R, R/lifecycle.R, R/process.R):
    • describe_model() (with optional life_table_metrics() check) and describe_parameters() (S3method(print, pva_parameters)) report base vs overridden parameter values, consuming steps, unused parameters, and disambiguated evidence.* columns.
    • Built-in constructors store explicit roles while preserving 11/11 byte-identical v2.3.0 native lifecycle & grizzly parity (autumn_harvest remains management).
  • Non-programmer cookbook & documentation (vignettes/cookbook.Rmd, README.md, site/, docs/, man/):
    • New litedown::vignette model-building cookbook (all 3 vignettes fuse in ~18 s), clear devtools/remotes/pak GitHub installation instructions in README.md, fixed rosetta.Rmd requires, honest uncertainty wording in workflow.Rmd, updated docs/for-agents.md, docs/vision_and_scope.md, docs/reference/public_api.md, site/_litedown.yml, and regenerated man/*.Rd (82 exports, 18 S3 methods).

Independent Verification

  • Rscript --vanilla scripts/build_rd.R: ZERO DIFF (22 Rd files, 82 exports)
  • Rscript --vanilla scripts/run_tests.R: 3,640 passed, 0 failed/skipped/warnings/errors (woodhen/model.R, grizzly/model.R, and all 23 baseline tests untouched)
  • Rscript --vanilla scripts/check_r_floor.R: PASS on both R 4.6.2 and live R 4.1.0 (--vanilla PSOCK + fork parity)
  • Rscript --vanilla scripts/build_site.R: PASS (8 HTML pages including doc/cookbook.html)
  • Cross-version native v2.3.0 parity: 11/11 BYTE-IDENTICAL
  • R CMD check --as-cran --no-manual OpenPVA_2.4.0.tar.gz: 0 errors, 0 warnings, 1 NOTE (New submission only)

(CRAN upload remains intentionally held pending human review of OpenPVA 2.1.1.)

@BWBrook
BWBrook merged commit 18a19de into main Dec 4, 2026
5 checks passed
@BWBrook
BWBrook deleted the openpva-2.4.0 branch December 4, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant