45 lines
1.6 KiB
Markdown
45 lines
1.6 KiB
Markdown
# Task A3 Report: Cache key and version resolution
|
|
|
|
## Status
|
|
COMPLETE
|
|
|
|
## TDD Evidence
|
|
|
|
### RED (failing)
|
|
After appending the three new test blocks to `tests/testthat/test-patches.R` and running before adding implementation:
|
|
|
|
```
|
|
ERROR: 'test-patches.R:88:3' ----------------------
|
|
Error in `patch_cache_key(e1, "1.0", "alpine-324", "amd64", "4.5")`: could not find function "patch_cache_key"
|
|
|
|
ERROR: 'test-patches.R:101:3' ---------------------
|
|
Error in `resolve_patch_version(...)`: could not find function "resolve_patch_version"
|
|
|
|
ERROR: 'test-patches.R:112:3' ---------------------
|
|
Error in `describe_patch(...)`: could not find function "describe_patch"
|
|
|
|
[ FAIL 3 | WARN 0 | SKIP 0 | PASS 19 ]
|
|
```
|
|
|
|
### GREEN (passing)
|
|
After appending the three helpers to `R/patches.R`:
|
|
|
|
```
|
|
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 26 ]
|
|
```
|
|
|
|
All 26 tests pass (19 pre-existing + 7 new assertions across 3 new test blocks).
|
|
|
|
## Commit
|
|
SHA: `e51f06c`
|
|
Subject: `feat(patches): cache key, version resolution, and patch description`
|
|
Branch: `feat/package-patching`
|
|
|
|
## Files Modified
|
|
- `/Users/pjs/git/codefloe.com/rpkgs/bincraftr/R/patches.R` — appended `patch_cache_key`, `resolve_patch_version`, `describe_patch`
|
|
- `/Users/pjs/git/codefloe.com/rpkgs/bincraftr/tests/testthat/test-patches.R` — appended 3 test blocks verbatim from brief
|
|
|
|
## Concerns
|
|
None.
|
|
The `local_mocked_bindings(.package = "pkgsearch")` approach works correctly under `devtools::load_all` as noted in the brief.
|
|
The `resolve_patch_version` mock intercepts `pkgsearch::cran_package` at the namespace level, so the wildcard and unsatisfied-constraint branches both exercise the correct code path without any network calls.
|