Skip to content

Document the remaining undocumented data types#425

Draft
miharp wants to merge 1 commit into
OpenVoxProject:masterfrom
miharp:docs/lang-data-gaps-407
Draft

Document the remaining undocumented data types#425
miharp wants to merge 1 commit into
OpenVoxProject:masterfrom
miharp:docs/lang-data-gaps-407

Conversation

@miharp

@miharp miharp commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Draft: depends on #424. The Init section links to lang_typecasting.html, which only exists on that branch, so the Internal links check fails until #424 merges. Everything else is ready. Verified locally by cherry-picking this commit onto the #424 branch: the build is clean and rake test:links passes.

Closes out the smaller gaps in #407, the ones left over after the six missing data type pages.

Types that had no documentation anywhere

Added to lang_data_abstract.md, each placed with the types it belongs beside rather than in a list at the end:

  • ScalarData and RichData sit next to Scalar and Data, since the distinction between them is the JSON-compatible subset in both cases
  • Iterable and Iterator are kept adjacent so the subtype relationship between them is visible
  • Runtime, Object, and TypeSet go under unusual types, alongside Callable and Init

TypeSet is the spelling OpenVox renders when it prints the type, though the parser accepts any capitalization. The page says so, since upstream docs render it "Typeset". It also names types/init_typeset.pp as where a module publishes one, rather than implying a type set is assembled automatically from the types directory.

Index entries

lang_data_type.md listed neither the types above nor three that were already documented. Added Sensitive to core data types, and NotUndef, Init, and the seven new types to abstract data types.

Boolean parameters

lang_data_boolean.md said Boolean "accepts no parameters". That is incorrect: Boolean[true] and Boolean[false] narrow it to one of the two values. Replaced with a parameters section showing the matches and a class parameter that may only ever be true.

Corrections worth a closer look

Writing the parent type sections turned up three factual errors in the existing text. All three are corrected here, and all three were confirmed by running the cases rather than by reading.

1. Scalar was described as equivalent to Variant[Integer, Float, String, Boolean, Regexp]. It also matches SemVer, SemVerRange, Timestamp, and Timespan:

$v = Variant[Integer, Float, String, Boolean, Regexp]
notice(SemVer('1.2.3') =~ Scalar)   # true
notice(SemVer('1.2.3') =~ $v)       # false
notice(Timestamp(0) =~ Scalar)      # true
notice(Timestamp(0) =~ $v)          # false

lang_data_semver.md already contradicted this. I removed the equivalence claim rather than restating it with a longer Variant, since the lattice has grown since the 5.5 import and a fixed list will drift again.

2. Data was described as matching any value that would match Scalar. It is built on ScalarData, so a regular expression matches Scalar but not Data:

notice(/re/ =~ Scalar) # true
notice(/re/ =~ Data)   # false

3. Data's hashes were described as taking keys that match Scalar. Only string keys are accepted:

notice({'s' => 1} =~ Data) # true
notice({1 => 'a'} =~ Data) # false
notice({1 => 'a'} =~ RichData) # true

Separately, the RichData list omitted several types it matches while Data does not: URI, regular expressions, and resource and class references. Found by sweeping every candidate type for membership in both rather than spot-checking.

A note for review: Puppet's <= on types is not purely extensional, so subtype comparisons alone are misleading here. Numeric <= Variant[Integer, Float] is false while the reverse is true. Every conclusion above rests on value membership tests, not on <=.

Verification

  • Every example was run against OpenVox 8.28.1 with puppet apply, re-checked in the exact form it appears on the page.
  • All 14 candidate types swept for RichData and Data membership to confirm both lists are complete.
  • Boolean[true] confirmed to actually enforce, not just match: a class parameter declared Boolean[true] with a false default is a compile error.
  • The types/init_typeset.pp claim checked against the OpenVox loader source rather than assumed.
  • markdownlint-cli2 reports no issues on all three files.
  • bundle exec jekyll build is clean and all nine new anchors resolve in the built HTML.

Content is original prose in the existing lang_data_* house style.

Part of #407

Copilot AI review requested due to automatic review settings July 23, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR closes remaining gaps in the OpenVox 8 language reference for data types by (1) adding documentation for previously undocumented abstract/unusual types, (2) correcting/expanding Boolean parameterization docs, and (3) updating the data type index to include missing entries.

Changes:

  • Expand lang_data_abstract.md with new sections for ScalarData, RichData, Iterable/Iterator, Runtime, Object, and TypeSet, and correct Scalar’s matched-type description.
  • Update lang_data_type.md to index newly documented and previously unindexed types (e.g., Sensitive, NotUndef, Init, TypeSet, etc.).
  • Fix lang_data_boolean.md to document Boolean[true] / Boolean[false] parameterization.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs/_openvox_8x/lang_data_type.md Adds missing index entries and link refs for newly documented and previously unindexed data types.
docs/_openvox_8x/lang_data_boolean.md Corrects Boolean docs to include narrowing parameters and an enforcing example.
docs/_openvox_8x/lang_data_abstract.md Adds documentation for additional abstract/unusual types and updates Scalar/RichData/ScalarData descriptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/_openvox_8x/lang_data_abstract.md
Copilot AI review requested due to automatic review settings July 23, 2026 12:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

docs/_openvox_8x/lang_data_abstract.md:21

  • [typecasting]: ./lang_typecasting.html points to a page that doesn't exist in this PR, so it will be a broken internal link (and can fail link-check CI) unless #424 is merged first or this PR also includes the new page.
[time]: ./lang_data_time.html
[binary]: ./lang_data_binary.html
[error]: ./lang_data_error.html
[sensitive]: ./lang_data_sensitive.html
[typecasting]: ./lang_typecasting.html

Copilot AI review requested due to automatic review settings July 23, 2026 12:39
@miharp
miharp force-pushed the docs/lang-data-gaps-407 branch from d9eb48f to e7b219c Compare July 23, 2026 12:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

docs/_openvox_8x/lang_data_abstract.md:443

  • This link target ([typecasting][]) points at ./lang_typecasting.html, but that page is not present on this branch (so rake test:links / internal link checks will fail if this PR is merged before #424). Consider linking to the generated new function reference until the dedicated typecasting page exists, or otherwise ensure the referenced page is included before merge.
See [typecasting][] for the conversions `Init` tests against.

Copilot AI review requested due to automatic review settings July 23, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

docs/_openvox_8x/lang_data_abstract.md:21

  • lang_typecasting.html is referenced here, but that page isn't present in this PR (and currently doesn't exist in this branch), which will cause internal-link checks to fail when this change is merged on its own. Consider pointing this reference at an existing stable target (e.g. the new() function reference) until the dedicated typecasting page is available.
[typecasting]: ./lang_typecasting.html

The language collection described several types only in passing, or not at
all. Close the smaller gaps left over from the Puppet 5.5 import:

* Add ScalarData, RichData, Iterable, and Iterator to the abstract data
  types page, each placed beside the types it belongs with.
* Add Runtime, Object, and TypeSet under unusual types. TypeSet is the
  spelling OpenVox renders, though the parser accepts any capitalization,
  and a module publishes one from types/init_typeset.pp.
* Index Sensitive under core data types, and NotUndef, Init, and the seven
  types above under abstract data types, in lang_data_type.md. All were
  either documented but unlisted, or absent entirely.
* Document the Boolean[true] and Boolean[false] parameters. The page said
  Boolean "accepts no parameters", which is incorrect.

Documenting the parent types turned up three errors in the existing text,
corrected here:

* Scalar was described as equivalent to Variant[Integer, Float, String,
  Boolean, Regexp]. In OpenVox 8 it also matches SemVer, SemVerRange,
  Timestamp, and Timespan, none of which that Variant matches. The
  equivalence claim is removed rather than restated, since a fixed Variant
  will drift again as the lattice grows. The SemVer page already
  contradicted it.
* Data was described as matching any value that would match Scalar. It is
  built on ScalarData, so a regular expression matches Scalar but not Data.
* Data's hashes were described as taking keys that match Scalar. Only
  string keys are accepted; integer, float, and boolean keys are rejected.

RichData also omitted several types it matches while Data does not: URI,
regular expressions, and resource and class references.

Every example and type relationship is verified against OpenVox 8.28.1 with
puppet apply.

Part of OpenVoxProject#407

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Michael Harp <mike@mikeharp.com>
@miharp
miharp force-pushed the docs/lang-data-gaps-407 branch from e7b219c to 34ff616 Compare July 27, 2026 11:14
Copilot AI review requested due to automatic review settings July 27, 2026 11:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

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.

2 participants