feat(force_surveys): add surgical survey re-processing parameter - #31
Open
randrescastaneda wants to merge 4 commits into
Open
feat(force_surveys): add surgical survey re-processing parameter#31randrescastaneda wants to merge 4 commits into
randrescastaneda wants to merge 4 commits into
Conversation
- Add force_surveys param (survey_id and/or pip_id) to pd_process_data() and valid_dlw_load() - Add mutual-exclusivity guards (force + force_surveys -> piperr) in both entry points - Add resolve_force_surveys() internal helper with dedup'd pip_id reverse-map and uniqueness assertion - Union forced surveys into the candidate set; nothing-to-clean abort accounts for forced_inv - Add force_surveys_inf / force_surveys_unknown_inf logging - Regenerate man/ docs via devtools::document()
- Add 12+ tests for valid_dlw_load force_surveys: retention, union dedup, pip_id reverse-map, unknown warn/skip, forced-only, aux dedup, duplicate dedup, type abort, missing pip_id column, master-unavailable, load-once, no-.joyn/no-dup, direct-call guard - Add make_master_hash_pip() test helper - Add pd_process_data tests: mutual-exclusivity abort, st_opts never called via force_surveys, force=TRUE timestamp regression, positional verbose compat - Add P2.1 ambiguity and R9 out-of-filter and lookup-first precedence tests
- Add plan and brainstorm for force_surveys surgical re-processing - Add execution report and verify review records - Add data-quality solution: pip_id reverse-map dedup + uniqueness guard - Rebuild knowledge brain (BRAIN.md, brain-index.json) after compounding - Mark targeted-force-surveys roadmap feature done (via @cg-roadmap)
…essage - Build the pip_id reverse-map only for identifiers that fail survey_id lookup, so survey_id-only force calls skip the full-master scan and are not blocked by unrelated ambiguous pip_ids - Restrict ambiguity abort to requested pip_ids - Extract shared .force_exclusive_msg constant used by both guard sites - Add regression test: survey_id-only force ignores unrelated ambiguous pip_id
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.
What this PR does
Adds a
force_surveysparameter (character vector ofsurvey_idand/orpip_id) topd_process_data()andvalid_dlw_load()that re-processes the named surveys alongside the normal invalidation candidates, without the destructive global side effects offorce = TRUE(which switches stamp versioning to"timestamp"for the entire run and bypasses all invalidation logic).The forced surveys are resolved lookup-first (
survey_idmembership, thenpip_idreverse-map via the already-loaded master inventory), unioned into the candidate set (deduplicated viaunique()), and logged withforce_surveys_inf/force_surveys_unknown_infentries. Unknown and out-of-filter identifiers are warned about and skipped. Stamp versioning stays on its default"content"for the entire run.Requirements addressed
force_surveysre-processes named surveys PLUS normal invalidation candidates (additive, not replacement)inv_to_process()only; aux-change detection runs normally; overlaps dedup byunique()"content";force_surveysnever callsstamp::st_opts()force = TRUE+ non-NULLforce_surveys->cli_abort(class = "piperr")in both entry pointssurvey_idandpip_id, auto-detected lookup-firstforce_surveys_inf/force_surveys_unknown_inflog entries emittedinv_svy_fullintersectionforce = TRUEbehavior unchanged (regression-tested)Commit summary
feat(force_surveys): add surgical survey re-processing parameter— code + regenerated man/ docstest(force_surveys): cover surgical re-processing behaviors— test-valid_dlw_load.R + test-pd_process_data.Rdocs: add force_surveys plan, solution, and roadmap status— plan, brainstorm, work-report, verify review, data-quality solution, rebuilt brain, roadmap statusValidation
test-valid_dlw_load.R(102 pass),test-pd_process_data.R(9 pass)devtools::document()regenerated man/ without error