Skip to content

fix: canonicalize provider fallback on keys#121

Merged
dylan-isaac merged 1 commit into
mainfrom
gobbler-loop-canonicalize-fallback-on
Jul 23, 2026
Merged

fix: canonicalize provider fallback on keys#121
dylan-isaac merged 1 commit into
mainfrom
gobbler-loop-canonicalize-fallback-on

Conversation

@dylan-isaac

Copy link
Copy Markdown
Contributor

Summary

  • canonicalize only the effective implicit lowercase plain providers.<category>.<provider>.fallback.on key while retaining yaml.SafeLoader
  • preserve YAML merge/duplicate precedence, quoting/tag distinctions, aliases, recursion, shared graph identity, and unrelated YAML 1.1 boolean behavior
  • use memoized copy-on-write graph repair to avoid merge-DAG or shared-payload amplification
  • synchronize the 0.2.30 release metadata and changelogs

Closes #65.

Verification

  • uv run pytest tests/unit -q (755 passed)
  • uv run ruff check src tests
  • uv run ruff format --check src tests
  • uv run --extra docs mkdocs build --strict
  • git diff --cached --check
  • isolated gobbler doctor --json smoke test returned {"on": ["ip_blocked", "rate_limited"], "provider": "transcriptapi"}
  • adversarial shared-payload benchmark stayed approximately linear through 800 target providers (~1.0–1.1x SafeLoader)
  • independent specification and adversarial review gates

E2E note

make test-all reached 797 passing tests, with six live YouTube failures caused by external account state: the free transcript API was blocked and TranscriptAPI reported no active paid plan. Unit, integration, and the remaining E2E coverage passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 647e575c29

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/gobbler_core/config.py Outdated
if provider_id in repaired_provider_ids:
continue
repaired_provider_ids.add(provider_id)
local_replacements = {provider_id: repaired_provider}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve fallback aliases when rewriting provider siblings

When a provider has another key that aliases the same fallback mapping, for example fallback: &fb ... plus fallback_copy: *fb, this provider-level rewrite only seeds the provider replacement. Because fallback ids are never added to the global replacements, that sibling alias keeps pointing at the original SafeLoader mapping with the coerced True key while fallback points at the repaired mapping with "on", breaking alias identity and exposing two different effective fallback schemas under the same provider path. Include the current fallback/repaired fallback pair in the provider rewrite replacements.

Useful? React with 👍 / 👎.

@dylan-isaac
dylan-isaac force-pushed the gobbler-loop-canonicalize-fallback-on branch 2 times, most recently from 508e0a4 to 9a2d9b8 Compare July 23, 2026 18:42
@dylan-isaac

Copy link
Copy Markdown
Contributor Author

@codex review

Please review the current head 9a2d9b8 for issue #65, including scoped YAML key canonicalization, alias/recursive graph identity, deep iterative merge behavior, and bounded compact-DAG/cycle performance.

@dylan-isaac
dylan-isaac force-pushed the gobbler-loop-canonicalize-fallback-on branch from 9a2d9b8 to 857a6a1 Compare July 23, 2026 18:47
@dylan-isaac

Copy link
Copy Markdown
Contributor Author

@codex review

Please review the current head 857a6a1. This supersedes the previous review request after restoring the exact independently reviewed graph-safe candidate.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 857a6a1635

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dylan-isaac
dylan-isaac merged commit 9af124e into main Jul 23, 2026
6 checks passed
@dylan-isaac
dylan-isaac deleted the gobbler-loop-canonicalize-fallback-on branch July 23, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autonomous maintenance: dogfood, review, releases, and repository hygiene

1 participant