lnk_pipeline_run: produce streams_access regardless of mapping_code#219
Merged
NewGraphEnvironment merged 4 commits intoJun 9, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
lnk_pipeline_run() now builds and persists streams_access regardless of mapping_code. lnk_presence, the pre-persist, lnk_barriers_views, and lnk_pipeline_access move out of the `if (isTRUE(mapping_code))` block; only lnk_mapping_code (token assembly) stays gated. Access is foundational — mapping_code depends on it — so habitat-only callers (mapping_code = FALSE) now also emit <persist_schema>.streams_access. No persist change needed: lnk_pipeline_persist already probes for streams_access and streams_mapping_code independently. Tests: rewrite the composition test for the new call order (presence -> pre-persist -> barriers_views -> access -> final persist); add a test asserting access builds for both mapping_code values while lnk_mapping_code is gated; add access-path mocks to the dams + cleanup tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
NEWS entry + version bump for #218 (streams_access built regardless of mapping_code. Minor bump: output behavior changes for habitat-only callers (new streams_access emitted) though the signature is unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> EOF )
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
lnk_pipeline_run()now builds and persists<persist_schema>.streams_access(+access_<sp>) regardless of themapping_codeflag. The access build (lnk_presence-> pre-persist ->lnk_barriers_views->lnk_pipeline_access) moves out of theif (isTRUE(mapping_code))block to run unconditionally; only the mapping_code token assembly (lnk_mapping_code) stays gated.mapping_code = FALSE:data-raw/wsg_pipeline_run.R,lnk_compare_wsg(mapping_code = FALSE)) now also emitstreams_access.lnk_pipeline_persist()already probesinformation_schemaforstreams_accessandstreams_mapping_codeindependently and copies whichever working tables exist.Related Issues
Test plan
devtools::test()green —test-lnk_pipeline_run.R20 PASS (rewritten composition test for the new call order + new gating test asserting access builds for bothmapping_codevalues whilelnk_mapping_codeis gated)/code-checkclean (3 rounds, 0 findings)tools::buildVignettes(dir = ".", tangle = FALSE, clean = TRUE)exits 0lintrintroduces no new lint classNotes
The
mapping_code = TRUEexecution order (pre-persist -> barriers_views -> access -> mapping_code -> final persist) is byte-identical to v0.42.0, so the cached vignette parity (99.04% BT) is unchanged. The pre-persist (step 0) moves out alongside access becauselnk_barriers_views()defaults to reading<persist_schema>.barriers(cross-WSG dam visibility, #196), so the current WSG's barriers must be persisted before the views are built. Version bump 0.42.0 -> 0.43.0 (minor — output behavior changes for existing habitat-only callers; signature unchanged).Generated with Claude Code