Repository navigation
ci: check manual statements against the Cacti source - #257
Open
somethingwithproof wants to merge 4 commits into
Open
somethingwithproof wants to merge 4 commits into
somethingwithproof wants to merge 4 commits into
Conversation
The Galera table list drifted from cacti.sql because nothing compared them. Add a checker that compares the manual with a Cacti develop checkout: the Galera conversions against the MEMORY tables in cacti.sql, the PHP floor against composer.json and CACTI_PHP_VERSION_MINIMUM, the extension list against composer.json, and the configuration examples against include/config.php.dist. Run it on pull requests, on develop and weekly so Cacti changes that make the manual stale are reported. The first run found data_source_stats_hourly_cache in the Galera list. The 1.3.0 upgrade converts it to InnoDB, and new installs create it as InnoDB, so it no longer needs converting. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Host builds embed the host's fonts, so a macOS build produces Arial and Andale Mono PDFs while CI embeds DejaVu. The documented macOS workaround also fails: env and uv run do not pass DYLD_FALLBACK_LIBRARY_PATH to Python, so WeasyPrint cannot load Homebrew's Pango. Add a script that runs the locked build in Ubuntu 24.04 with the CI font and library packages and a checksum-verified uv, and document it in place of the macOS workaround. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Cacti ships .htaccess files for bin, cli, contrib, log, mibs, rra, scripts, tests and the private cache directories, but none for service/, include/config.php, include/config_local.php or PHP files under include/vendor. The nginx guides deny those paths; the Apache example relied on .htaccess alone. Deny them explicitly, matching the nginx rules. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
docs/code-claims-check
branch
from
November 19, 2026 10:18
3dd1123 to
4062691
Compare
somethingwithproof
force-pushed
the
docs/manuals-release-assets
branch
from
November 19, 2026 10:18
b2c0817 to
67f1036
Compare
Use [[ for the argument test, and install coverage from a wheel only so pip cannot run a source distribution's build scripts. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
docs/code-claims-check
branch
from
November 19, 2026 10:30
4062691 to
69a4eb9
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Stacked on #256.
Follow-ups from checking #248 against the Cacti source.
Check source-derived statements in CI.
bin/check_code_claims.pycompares the manual with a Cacti develop checkout:ALTER TABLE ... ENGINE=InnoDBlist against theENGINE=MEMORYtables incacti.sql;Requirements.mdagainstcomposer.jsonandCACTI_PHP_VERSION_MINIMUM;ext-*requirements incomposer.json;config.phpexample (names and literal types) and the remote-poller$rdatabase_*names againstinclude/config.php.dist.The new
Source-derived statementsworkflow runs the checker on pull requests, ondevelopand weekly, so a Cacti change that makes these pages stale is reported. The checker uses only the standard library, and its tests reach 100% branch coverage.The first run flagged
data_source_stats_hourly_cachein the Galera list.install/upgrades/1_3_0.phpconverts it to InnoDB andcacti.sqlcreates it as InnoDB, so that line is removed.Container build matching CI. Host builds embed the host's fonts: a macOS build embeds Arial and Andale Mono, while CI embeds DejaVu. The documented macOS workaround also fails, because
envanduv rundo not passDYLD_FALLBACK_LIBRARY_PATHto Python.bin/build_manuals_in_container.shruns the locked build in Ubuntu 24.04 (image pinned by digest) with the CI font and library packages and a checksum-verified uv. It also works from a Git worktree.Apache example. Cacti ships
.htaccessfiles forbin,cli,contrib,log,mibs,rra,scripts,testsand the private cache directories, but none forservice/,include/config.php,include/config_local.phpor PHP files underinclude/vendor. The nginx guides deny those paths. The Enterprise Linux LAMP example now denies them too.Validation:
9235426, and its 10 tests pass with 100% branch coverage.service/,include/config.php,include/config_local.phpandinclude/vendor/**/*.phpreturn 403.index.php,include/jsassets and non-PHP vendor assets return 200.