Skip to content

Never cache init: it reads the spread-fit ledger - #71

Merged
eliotmcintire merged 1 commit into
developmentfrom
nevercache
Oct 15, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
nevercache

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

A cached start-up step could remember an out-of-date answer about whether a study area has already been fitted, and then skip or repeat the fit preparation wrongly. That step is now never served from the cache.

Affects: runs that put init in .useCache (module or .globals) now always re-read the ledger; the usual .useCache settings are unchanged.

Technical details

Defect: fireSense_dataPrepFit.R:347-351 (init, Init() at line ~409 calls readSpreadFitLedger()) decides from the Google Drive ledger, which is not in the event's cache key, so a cached init replays a stale 'fit exists' / 'no fit yet' decision. The module now declares .neverCache, which SpaDES.core >= 3.2.1.9037 reads (.eventIsCached()) and which wins over .useCache in every form, including .globals; the SpaDES.core floor in reqdPkgs is raised to 3.2.1.9037. The new tests/testthat/test-neverCache.R checks the declaration and that .eventIsCached() refuses to cache the listed events even with .useCache naming them or TRUE; it fails on development (parameter not declared) and passes here. Full module suite: 315 tests, 0 failures/errors on this branch; development has 311, 0 failures/errors.

🤖 Generated with Claude Code

…r files)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliotmcintire eliotmcintire added bug Something isn't working backwards compatible Existing code and results keep working unchanged labels Oct 14, 2026
@eliotmcintire
eliotmcintire merged commit f463149 into development Oct 15, 2026
6 checks passed
@eliotmcintire
eliotmcintire deleted the nevercache branch October 15, 2026 02:28
eliotmcintire added a commit that referenced this pull request Oct 15, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatible Existing code and results keep working unchanged bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant