Skip to content

feat: Patchbot fact schema version 2 and an exact security count (0.3.0) - #2

Merged
matthewrstone merged 2 commits into
mainfrom
feat/72.3-patchbot-fact-v2
Nov 18, 2026
Merged

matthewrstone merged 2 commits into
mainfrom
feat/72.3-patchbot-fact-v2

Conversation

@matthewrstone

@matthewrstone matthewrstone commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Patchbot fact schema version 2, released as 0.3.0.

  • security now counts distinct pending updates whose exact package name has a security advisory. Before, it counted advisory rows, so one package with several advisories was counted several times and security could be larger than available.
  • The dnf and yum paths share one security_names helper built on nevra_name, so both platforms use the same definition.
  • The fact carries schema_version: 2 and a reboot_status of required, not_required or unknown, with a reboot_status_reason code when it is unknown (for example plugin_missing).

facts.d/patchbot.sh and facts.d/patchbot.ps1 are byte-identical to the console repo's lab copies:

  • patchbot.sh sha256 daf7d4fb4ad702f2cbe55cc9d3c8dc58a6cb630dc69403a535389200633431f1

  • patchbot.ps1 sha256 fd934bbec566b876b93e9adc81c32c556e6e57688b6462ed7da291ecd593f333

  • CI housekeeping: REFERENCE.md regenerated (whitespace only, puppet-strings 4.1.2) and .bundler-audit.yml waives two dev-only gem advisories (minitar via bolt/r10k/puppet_forge, mcp via rubocop), each with its reason.

Test plan

  • CI: validate, lint, metadata_lint, rspec on the blocking legs (openvox9 is experimental)
  • After tag v0.3.0: the Release workflow publishes a GitHub Release
  • On a lab AlmaLinux 8 node: schema_version 2 and security no larger than available

🤖 Generated with Claude Code

https://claude.ai/code/session_01McuAWfE22TvftB9SGnvzTT

matthewrstone and others added 2 commits November 18, 2026 10:13
Closes the module side of G-72.3-5b: class patchbot now delivers the
version 2 patchbot fact instead of the v1 fact.

- facts.d/patchbot.sh and facts.d/patchbot.ps1 are byte-identical copies of
  the development copy in the Puppet Stagehand Console repository
  (lab source commit d6af8a8f), proved with cmp.
  sha256 patchbot.sh  daf7d4fb4ad702f2cbe55cc9d3c8dc58a6cb630dc69403a535389200633431f1
  sha256 patchbot.ps1 fd934bbec566b876b93e9adc81c32c556e6e57688b6462ed7da291ecd593f333
- Fact: schema_version 2, a three-state reboot_status with a fixed
  reboot_status_reason, dnf status/check_error, repos, package_count and
  truncated, and a security count that is exact (one per pending update,
  matched by exact package name, never above available).
- metadata.json version 0.3.0 (0.2.0 was never tagged); CHANGELOG and the
  README fact section describe the version 2 fact. The patch task is
  unchanged.

Checked locally: dnf security smoke on a real AlmaLinux 8.9 userland and the
EL7 yum smoke, both against this tree's facts.d; shellcheck; tasks/patch_test.sh;
tools/supplychain/scan.sh (0 findings); gitleaks, tree and history.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01McuAWfE22TvftB9SGnvzTT
REFERENCE.md: puppet-strings 4.1.2 drops trailing spaces and the final
blank line; content is unchanged. The lint gate failed on the drift.

.bundler-audit.yml waives GHSA-r6vf-943r-2wvw (minitar 0.12.1, held below
1.0 by bolt, r10k and puppet_forge via puppet_litmus) and
GHSA-4m5j-jjfc-97gx (mcp 0.25.0, from rubocop). Both are dev/test gems
that the module does not ship. The release workflow runs the same audit,
so without this a v* tag would publish no Release.

Verified in a ruby:3.2 container: rake validate lint metadata_lint exits
0, rake spec 241 examples 0 failures, bundler-audit check clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01McuAWfE22TvftB9SGnvzTT
@matthewrstone

Copy link
Copy Markdown
Collaborator Author

Merging with the four 9 (Ruby 4.0) unit legs red, by owner decision. That leg is new: voxpupuli/gha-puppet's beaker.yml@v4 now builds it from metadata.json, and it fails at bundle install before any test runs (no puppet 9 gem; openvox ~> 9.0 conflicts with puppet_litmus ~> 2.5, the known conflict in the Gemfile). Puppet Core 9 and OpenVox 9 are covered by this repo's own rspec-puppet jobs, which pass, as do all 28 acceptance legs, lint, REFERENCE drift, Pester, PDK build and both security scans. Follow-up: exclude or fix that leg in ci.yml.

@matthewrstone
matthewrstone merged commit 0aacb90 into main Nov 18, 2026
50 of 60 checks passed
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