Report a fingerprint of the model's numbers - #100
Conversation
Why the exported function returns a constant rather than computing the digestBecause it cannot compute it. Two ways out were considered:
So Two bugs the tests caught in the digest itselfBoth were in the first version, and both would have made the fingerprint report a change that was not one:
The file names were in the digest. The first version hashed The second one is the more interesting failure: I wrote the assertion the issue asked for (rename-insensitivity) into the prose and then violated it in the code three lines below. The test is what noticed. What the fingerprint does not cover, stated because a cache key invites over-trust
The third is the one worth knowing before depending on it, and it is not a flaw in the fingerprint so much as in the grids: the same limitation the guide already records for the golden file. Verification
Note for whoever mergesThe fingerprint value is a function of #99's regenerated golden files. If #99 changes before merge — a review that moves a number, a rebase that regenerates — |
055e5dc to
0e95164
Compare
Results moved on #15, #36, #41 and four gradient PRs without the version moving, so a consumer caching computed results had no signal its cache was stale. The calibration study's workaround was to hash inst/include, R/ and src/ -- which #47's rename would have moved without moving a single number. leaf_behaviour_fingerprint() is a 12-character digest of the two recorded baselines together. They already ARE this package's definition of the numbers and are regenerated deliberately, so it inherits that discipline; test-fingerprint.R recomputes it from the files on disk, so regenerating a golden file and forgetting `Rscript tools/fingerprint.R` fails. File names are not in the digest and contents are hashed by line with the trailing \r stripped, so neither a rename nor a CRLF checkout can move it. Both asserted (#58). Also declares `tibble`, which the vignettes use: R CMD check is now clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0e95164 to
ad595cf
Compare
…angco
Four conflicts, all in leaf_model.hpp, all where this branch and master changed the
same expression for different reasons:
* three conductance conversions -- this branch replaced atm_vpd_ with vpd_leaf_,
master made H2O_CO2_stom_diff_ratio a settable member. Both changes kept.
* dprofit's early-return dE_dpsi -- this branch rewrote the derivation to state it
directly, because the coefficient master's version cancels is no longer a single
number once the deficit moves with Tleaf. This branch's version kept; it does not
reference the ratio.
R/RcppR6.R was regenerated rather than hand-resolved, and man/ + NAMESPACE were
stale after the merge and regenerated too.
Verified: 566 C++ checks / 0 failures, golden bit-identical, gradient golden
unchanged, fingerprint unchanged at 3e36d9b94fd0, 1137 R tests / 0 failures,
R CMD check --as-cran Status: OK, ctest 2/2, bench targets build, and the CI
consumer program built against an installed prefix exits 0.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Stacked on #99 — base it there, not on
master, because the fingerprint is a digest of the golden files #99 regenerates.Results moved on #15, #36, #41 and four gradient PRs without the version moving, so a consumer caching computed results had no signal its cache was stale. The calibration study's workaround was to hash
inst/include,R/andsrc/— which #47's rename would have moved without moving a single number.leaf_behaviour_fingerprint()is a 12-character digest of the two recorded baselines together. They already are this package's definition of the numbers and are regenerated deliberately, so it inherits that discipline;test-fingerprint.Rrecomputes it from the files on disk, so regenerating a golden file and forgettingRscript tools/fingerprint.Rfails. File names are not in the digest and contents are hashed by line with the trailing\rstripped, so neither a rename nor a CRLF checkout can move it. Both asserted.#58's first ask — bump the version when behaviour changes — is in #99, which is the PR that moves results.
Closes #58.