14 Commits

Author SHA1 Message Date
unkin-agent 87568da152 Run block-setter class methods and guarded raises
A class method called with a block runs when its parameters are optional
literals and its body only branches on them and stores ivars puppet never
reads. A top-level raise runs only when its if/unless condition holds, nil?
is evaluated, and a statement guarded by block_given? outside a method never
runs. Generates shellvar.
2026-11-09 23:10:27 +11:00
unkin-agent 01ecc8f421 Evaluate module features and core mixins
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
Puppet.features.<name>? autoloads the module's puppet/feature file and is true
when each of its libs loads, gems only when declared; openvox's own features
depend on the host and skip. Includes of hook-free openvox modules, private
:name in mixins and block parameters on attribute blocks are accepted.
Generates augeas and augeasprovider.
2026-11-09 22:41:54 +11:00
unkin-agent d0b6a12bc4 Continue lines after a trailing dot and join File.join arrays
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Ruby continues a statement whose line ends in a method-call dot, and File.join
joins array arguments recursively with its own separator rules. Generates the
seven openldap types.
2026-11-09 22:27:14 +11:00
unkin-agent c8fba92811 Load types through Puppet::Type.type and evaluate title_patterns locals
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Puppet::Type.type(:x) loads x's module type file with its providers, whose
classes .provider(:n) returns as a parent; a nil parent is Puppet::Provider.
title_patterns binds locals, including Regexp.new copies. Generates ceph_config,
ceph_fs and ceph_pool.
2026-11-09 22:18:00 +11:00
unkin-agent ce90a7a3a7 Load type-file classes and user attribute parents as Ruby does
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
2026-11-09 01:22:34 +11:00
unkin-agent f2d3112d60 Evaluate mixin included hooks and interpolated regexes
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
Run a module's self.included on the including provider: extend adds singleton
methods, a super-wrapping initvars resets defaults and commands where called,
and inlined define loops add property methods. Compose interpolated regex
literals and accept them only when an Onigmo subset check passes. Generates
network_config and network_route.
2026-11-09 00:53:42 +11:00
unkin-agent 60e34561e2 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
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.
2026-11-09 00:19:34 +11:00
unkin-agent f10800bd06 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
- 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
2026-11-09 00:08:09 +11:00
unkin-agent eef359dd75 Render provider docs as openvox 9.3.0 does
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
- record each provider class's own desc, @doc, defaultfor, commands and has_features
- render the commands, defaults and features dochooks into the provider param doc
- detect method-backed features from public provider methods, skipping when unprovable
- reject provider DSL calls before initvars in plain provider subclasses
- read %i word arrays as symbols
- compare comments in TestGolden's external env mode
2026-11-08 23:57:35 +11:00
unkin-agent a04351cfa1 Model the toml gem's load for declared w10k.gems
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
Generate grafana_ldap_config when r10k.yaml declares toml; a module copy of a gem path, an unmodelled gem file or a module opening a gem namespace still skips.
2026-11-08 23:09:07 +11:00
unkin-agent 92efabd123 Skip types whose provider or library loads w10k cannot prove
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
- analyse provider files and required libraries with the type-file allowlist
- resolve requires with puppet core, gems and stdlib ahead of module lib dirs
- read mixins from the file that was required; skip paths several modules provide
- resolve constants by lexical scope
- mirror resource_api schema raises, Variant flattening and float lexing
- seed .resource_types from the live worktree so skipped types keep their .pp
2026-11-08 22:15:07 +11:00
unkin-agent b31b4f6175 Skip types w10k cannot prove match puppet
- bound-check a trailing $ in the lexer and turn a per-file panic into an env error
- allowlist top-level statements: requires, literal constants, module Puppet, begin/rescue requires
- require the require that defines Puppet::ResourceApi, Boolean and File parents and included mixins
- name providers by their provide call; skip types whose provider files are not one recognised provide
- read symbol option keys only, as newparam, newproperty and register_type do
- parse Resource API types with a TypeParser-compatible grammar
- skip duplicate properties and parameters
- add a parseFile fuzz target and real-puppet golden fixtures for each case
2026-11-08 20:45:18 +11:00
unkin-agent 8435678797 Reject unparsed type-body statements and render literals as Ruby does
- error on stray closers, deep nesting and runaway parses
- allow only inert statements in type and attribute bodies, resolving included mixins
- add the implicit ensure puppet gives types defining exists?, create and destroy
- accept behavior: as the Resource API alias of behaviour:
- normalise Ruby integer, float, string escape and regex literals, failing on forms that cannot be reproduced
- unlink stale symlinks in .resource_types
- verify fixtures, with real providers, against real puppet output
2026-11-08 18:50:46 +11:00
unkin-agent dfb5fa021f Generate Puppet resource types natively before the env swap
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline failed
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/lint Pipeline was successful
- add gentypes: a static Go port of `puppet generate types` for classic and Resource API types
- run it in prepare when w10k.generate_types is set; a failure fails the env and keeps the old link
- confine reads to the worktree and module cache, refuse a committed .resource_types symlink
- test against real puppet output for a vendored Apache-2.0 type set
2026-11-08 17:59:12 +11:00