Repository navigation
lnk_scenario_export(): habitat per config as Parquet + manifest + fwapg load (#308) - #337
Merged
NewGraphEnvironment merged 14 commits intoOct 14, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
…308) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
…pecies only, carry-forward (#308) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
…UNBOOK §6d (#308) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
…i-schema groups and dispatches, JSON arrays, PUBLISH checks first (#308) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
…ted exports, skipped as object; access boundary documented as measured (#308, #336) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
…s and publishes, skip-mode schemas without wsgs (#308) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
…LISH (pairs and older builds), exported_by per config, skipped scoped to named groups, --replace (#308) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
…e shared judgement (missed recompute, older export with other parts); pilot rebuild evidence (#308) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
NewGraphEnvironment
deleted the
308-lnk-scenario-export-publish-habitat-per
branch
October 14, 2026 23:24
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
Closes #308's first cut. link's habitat flags export per config as Hive-partitioned Parquet with a manifest, on the pattern NewGraphEnvironment/wet#7 set for discharge.
lnk_scenario_export()writes one row per segment × config × species. Rows are keyed by FWA position(blue_line_key, downstream_route_measure, upstream_route_measure), so no link geometry is published. Each row carries:has_barriers_dnstrfrom link's access table.A write-once provenance tree sits beside the parts: one entry per finished build, one per config hash and one per recompute, plus the bundle files when today's bundle hashes the same as the build.
lnk_catalog()reads the manifest from a local path, https, or s3:// through the aws CLI (habitat/is private).lnk_db_load()loads parts intohabitat.fwa_v1_segmentin one transaction, after checking md5s.data-raw/habitat_publish.Rhas two modes: BUILD and PUBLISH (LNK_PUBLISH=1). PUBLISH was not run. Uploading tos3://fresh-bc/habitat/fwa/v1/waits on your go-ahead.Mechanics, and what each column does not mean: RUNBOOK §6d.
Decisions to confirm (they shape the published contract)
has_barriers_dnstrships besideaccessible. The pilot found they disagree in every config × species × group: 4,292 km in all. On DUNC BT, which was never recomputed, 228 of 229 disagreeing segments start exactly at a BT-blocking barrier. That is a boundary convention, filed as accessible and streams_access are built from different barrier sets (DUNC BT gradient barriers) #336.provenance/run_uid=<uid>/run_id=<id>/), not per dispatch. A dispatch's rows grow as its groups close, so a per-dispatch file could not be written once.run_uidis accepted and keyed byrun_id. Groups with no log row are refused. Gating PUBLISH onrun_uidis Gates before a floodplain item pins a habitat build: run_uid, dirty trees, versioning, public read #334.Pilot (local fwapg)
defaulton its 5 logged groups andbcfishpasson 39. 22 parts, 9.88 M rows, 219 MB, about 1 min.lnk_rollup_wsg(), 150 rows: spawning km and the barrier-based accessible km match exactly, and rearing km matches within the rollup's 0.01 km rounding.data-raw/logs/habitat_export_308/.Test plan
devtools::check(): 2,896 pass.origin/mainand environmental:lnk_db_conntunnel port, dams golden,wsg_resolveclosure./code-check branch: five rounds, ended by enumerating the 24 places the recurring mechanism reaches.Follow-ups filed
#331 discharge from wet · #332 desktop GeoPackage · #333 crate registration · #334 publish gates, versioning, public read · #335 webmap · #336 access boundary convention.
Related Issues
🤖 Generated with Claude Code
https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx