Repository navigation
feat: sync SDK to OnePin API v0.41.137 - #119
Merged
kj-podonos merged 8 commits intoSep 22, 2026
Merged
Conversation
The run-input body was inlined upstream (script_text/source_language are now
OMIT-defaulted kwargs on start/preview/estimate instead of a wrapped request
object). An override-free call therefore serializes to `{}` rather than no body
at all. The endpoint's Body(default_factory=WorkflowRunStartIn) treats `{}` and
an absent body identically, so this is wire-compatible — update the assertion
(and the test name) to match the regenerated client.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
@claude review |
Contributor
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e39f42e5c6
ℹ️ 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".
kj-podonos
previously approved these changes
Sep 21, 2026
…a1de4a317c43929df1fe44a7c7697e
kj-podonos
self-requested a review
September 22, 2026 01:42
kj-podonos
approved these changes
Sep 22, 2026
kj-podonos
deleted the
fern-regen/52e9ae2174a1de4a317c43929df1fe44a7c7697e
branch
September 22, 2026 01:57
podonos-eunseo
added a commit
that referenced
this pull request
Oct 1, 2026
… drift (#126) ## Problem `.github/workflows/regen.yml` has been failing on every dev run since 9/28 — 18 of the last 20 runs. The two that passed were prod runs, which skip the failing step entirely. It was never flaky: **success and failure were two different code paths, not two outcomes of one check.** ``` dev (runs the guards) 18 runs → failure 18 prod (skips the guards) 2 runs → success 2 ``` Underneath that, a second and larger hole: **`ci.yml` never ran `tests/build` at all.** pytest's default `norecursedirs` carries the bare pattern `build`, which matches by basename, so recursing from `testpaths = ["tests"]` skipped the directory whole. `uv run pytest -q` collected 515 tests and not one came from there. So every guard on the Fern regen pipeline — the `.fernignore` check, the README sync, the CLI↔SDK contract — has never gated a PR. Guards ran where no PR existed (dev), and PRs existed where no guards ran (prod). The comment in `regen.yml` justifying the skip ("ci.yml runs the very same `tests/build` on the regen PR") was simply not true. That let a red guard merge. #119 added `test_run_input_reference_matches_flattened_signatures` **and** was red on it, with all 22 checks green. The defect it caught is real: `reference.md` documents a `request` parameter on methods whose generated clients take flattened kwargs, so following the docs raises `TypeError`. ```python client.workflows.estimate_workflow(workflow_id=..., script_text="hi") # works client.workflows.estimate_workflow(workflow_id=..., request=WorkflowRunStartIn()) # TypeError ``` `reference.md` ships in the PyPI wheel, so that lands in `site-packages` for every installer. ## Solution **Make the guards actually run** (`656a655`). Drop `build` from `norecursedirs`, keep the `./build/` artifact tree out by path with `--ignore=build`. Collection goes **515 → 937**. `tests/unit/test_collection.py` asserts the behaviour from a separate pytest process, because the whole failure was one word in a config file going unnoticed. **Generalize the contract check.** The three hand-named assertions become a parse of all 90 documented methods, compared against `inspect.signature` in both directions. It finds **six** mismatches, not three — `workspace_members.update_member_role`, `update_invite_role`, and `workflows.runs_summary` (`from` documented, `from_` generated, so the documented call isn't even syntactically valid) were wrong the same way and nothing said so. Known generator defects go in `_REFERENCE_DEFECTS` with reasons, same contract as `_INTENTIONALLY_UNEXPOSED`: the regen that fixes the generator deletes the excuse. **Stop blocking, start reporting** (`77c1b2e`). Guards run on both paths and fail neither. The verdict is posted onto the PR as a comment — including when clean, since "ran" being indistinguishable from "skipped" is what hid all of this. The hard gate stays the shell guard (clobbered `_cli/`, bare client); the merge gate is `ci.yml`. **Autofix the one mechanical class.** SDK→CLI drift — a generated param no CLI flag reaches — is fully specified by the failing test, so `claude-code-action` adds the `Opt(...)`, regenerates the README block and manifest snapshot, adds a test, and pushes to the PR branch. Explicitly barred from allowlisting a guard, weakening a test, or touching generated files; raises the `Cmd(gate=)` question for a human instead of deciding it. Reference mismatches and renamed methods are out of scope — the former is unfixable in-repo anyway. Authenticates with the org-level `CLAUDE_CODE_OAUTH_TOKEN` (already visible to this repo, so no secret to add; subscription billing rather than API). **Close superseded regen PRs.** Each regen is a whole-SDK snapshot of one spec commit, not an increment, so #123/#124/#125 open at once is three ways to merge the SDK backwards. Scoped to the label, the `fern-regen/` prefix, and a number below the PR just opened. ## Verification - `pytest -q` → **935 passed, 2 skipped** (937 collected, up from 515); `ruff` clean; `mypy` clean; coverage 95.39% - Mutation-checked the new contract test: emptying `_REFERENCE_DEFECTS` reds exactly the 6 known defects with actionable messages; simulating a generator fix reds the stale-allowlist guard - Ran the new guards against the real open regen PRs in throwaway worktrees — **#123: 421 passed; #125: 421 passed, 1 failed** (`voices.list` gained `provider_voice_id`, which is the drift alarm working as designed) - Verified `./build/` artifacts stay uncollected, and `pytest tests/build` still works as an explicit path - All 14 shell blocks in `regen.yml` pass `bash -n`; dry-ran the supersede and comment logic against live PR data with `gh pr close` stubbed — new PR #126 closes #123/#124/#125 and leaves #122 (release-please) alone; a PR-update scenario (#124) closes only #123 and never the newer #125 ## Follow-ups, not in this PR - **Report the generator defect to Fern.** `fern/generators.yml` pins the generator to `latest`, so this moved without a PR — worth pinning - **`provider_voice_id` is a product decision**: expose `--provider-voice-id`, or record it as intentionally unexposed. It can't be allowlisted on main today — the param isn't in main's SDK yet, so the entry would be stale on arrival. It belongs in #125 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Auto-regenerated from the shaped Onepin API OpenAPI spec.
6e8f07d1484ca4c4b976609f61c1d88b8288b3a30.41.137prodThe hand-rolled CLI under
src/onepin/_cli/is preserved viasrc/onepin/.fernignore.Review the diff, let CI run, then merge to ship the new SDK surface.