ADR-0004 — get_session() transparent local/SiS resolution
Status: accepted Date: 2026-05-31
Context
SiS apps run in Snowflake and use get_active_session(). Local dev requires a
connections.toml-backed session. App code should not contain environment branches.
Decision
get_session(config?) resolves transparently:
- SiS (default): get_active_session()
- Local (PINKY_LOCAL=1): LocalSessionConfig backed by the connection in connections.toml
App code never changes — only the resolution layer switches via the env var.
Local data is populated by pinky dump (from pinky-tools).
Consequences
Identical app code runs locally and in SiS. Local dev requires no mock session or
fake Snowflake connection — a real connection via connections.toml is used.