Skip to content

feat(ops): infer search_path from IR schema references #439

Description

@flyingrobots

Work Type

product

Hill Supported

An operator can generate hardened ops SQL without needing to hand-specify --ops-search-path for the common schema-aware case.

Sponsor Actor

  • Operator generating ops SQL from IR/SDL
  • Maintainer hardening ops defaults without extra user ceremony

Playback

A user generates ops SQL from an IR with schema references and gets a safe default search_path automatically, while documented overrides still work for edge cases.

Problem

Wesley now emits explicit search_path when asked, but the common path still depends on manual --ops-search-path input. That leaves safe defaults underpowered for multi-schema or hardened deployments.

Proposed Change

  • infer a safe default SET search_path from IR or schema references
  • preserve documented manual override semantics
  • cover multi-schema and wrong-schema edge cases with regressions

Invariants

  • emitted ops SQL stays explicit about search-path behavior
  • manual overrides remain available and documented
  • generated defaults favor deterministic, hardened name resolution

Non-Goals

  • silently widening search paths for convenience
  • removing manual override support
  • treating ambient database defaults as sufficient

Acceptance / Tests

  • emitted ops path derives a safe default search path from IR or schema references
  • manual override semantics are documented
  • regression tests cover multi-schema and wrong-schema edge cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwork:productDirectly improves a sponsor actor outcome

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions