Evaluate provider load-time code in a bounded subset #13

Merged
benvin merged 2 commits from benvin/gentypes-evaluator into main 2026-11-09 22:49:46 +11:00
Member

yumrepo, patroni_dcs_config and zfs providers compute constants and generated methods at load time (validproperties loops, inherited singleton helpers, unless defined? constants), so w10k skipped them and puppetserver fell back to their Ruby types.

  • add a load-time evaluator: locals, lexical constants, defined?, ==/!=, String#+, to_s/to_sym, Array#reject, define loops, inlined singleton methods, own-type validproperties
  • skip everything outside it; cap inline depth, world steps and allocation
  • model puppet/util/inifile classes and %i symbols; bump the types version
  • vendor patroni and zfs_core fixtures and the full yumrepo provider
yumrepo, patroni_dcs_config and zfs providers compute constants and generated methods at load time (validproperties loops, inherited singleton helpers, `unless defined?` constants), so w10k skipped them and puppetserver fell back to their Ruby types. - add a load-time evaluator: locals, lexical constants, `defined?`, `==`/`!=`, `String#+`, `to_s`/`to_sym`, `Array#reject`, define loops, inlined singleton methods, own-type `validproperties` - skip everything outside it; cap inline depth, world steps and allocation - model `puppet/util/inifile` classes and `%i` symbols; bump the types version - vendor patroni and zfs_core fixtures and the full yumrepo provider
unkin-agent changed target branch from benvin/gentypes-grafana-ldap to benvin/gentypes-provider-docs 2026-11-09 00:19:50 +11:00
benvin changed target branch from benvin/gentypes-provider-docs to main 2026-11-09 22:42:39 +11:00
benvin added 2 commits 2026-11-09 22:42:39 +11:00
Evaluate provider load-time code in a bounded subset
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
f10800bd06
- add an evaluator for constants, locals, define loops, inlined singleton methods and own-type validproperties
- cap inline depth, world steps and allocation
- model puppet/util/inifile's classes and %i symbols
- vendor patroni and zfs_core fixtures and the full yumrepo provider
Merge benvin/gentypes-provider-docs into benvin/gentypes-evaluator
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
60e34561e2
Provider classes keep #12's desc, defaultfor, commands and features alongside the
evaluator's singleton methods, constants and provide-block bindings in one classCtx.
Goldens for yumrepo, patroni_dcs_config and zfs are regenerated with openvox 9.3.0,
and gentypes.Version is 7.
benvin merged commit 41dcfba0c7 into main 2026-11-09 22:49:46 +11:00
benvin deleted branch benvin/gentypes-evaluator 2026-11-09 22:49:47 +11:00
This repo is archived. You cannot comment on pull requests.