Skip to content

Preserve an unset caller IFS when loading provider facts #604

Closed

Description

@mogul

Goal

Preserve the caller's IFS state when provider facts are loaded in the current shell, including when IFS is intentionally unset under set -u.

Problem

The provider-facts wrapper merged in #603 snapshots IFS with local _acq_saved_ifs="$IFS". Under set -u, expanding an intentionally unset IFS exits before provider facts or fallback handling can run.

Scope

  • Replace manual IFS snapshot/restore with the smallest Bash 3.2-safe local scoping mechanism.
  • Preserve caller states where IFS is unset, empty, default, or custom.
  • Preserve provider assignment propagation and all loader return/fallback behavior.
  • Add focused regressions under set -u.

Acceptance criteria

  • An unset caller IFS remains unset after successful load and every handled fallback/error result.
  • Empty, default, and custom caller IFS values remain unchanged.
  • Valid provider assignments remain visible to the caller.
  • Return codes and fallback behavior remain unchanged.
  • Focused and full Bash 3.2 checks pass.

Relationships

Parent: #600.
Follow-up from the non-blocking review note on #603.
Related epic: GSA-TTS/agentic-coding-patterns#357.

AI-assisted issue drafting (OpenCode). Human review required.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions