Skip to content

fix(cli): apply property audience filtering to V3 imports#15847

Merged
kafkas merged 7 commits into
mainfrom
anar/fer-10214-kickoff-cli-property-level-x-fern-audiences-filtering-does-followup
May 12, 2026
Merged

fix(cli): apply property audience filtering to V3 imports#15847
kafkas merged 7 commits into
mainfrom
anar/fer-10214-kickoff-cli-property-level-x-fern-audiences-filtering-does-followup

Conversation

@kafkas
Copy link
Copy Markdown
Member

@kafkas kafkas commented May 12, 2026

Description

Linear ticket: Closes FER-10214

Follow-up to #15789. That PR fixed the shared property-level audience filtering semantics in ir-utils, but the V3 OpenAPI importer path was still missing parts of the plumbing needed for that filter to work end-to-end.

Specifically, V3 imports were not consistently registering property-level x-fern-audiences metadata for inline request bodies, query parameters, and inline webhook payloads with the shared IrGraph. They also used a narrower importer-specific audience filter and emitted V3-specific IR/example shapes (v2RequestBodies, v2Examples) that were not scrubbed by the original fix.

Changes Made

  • Replaced the V3 importer-specific audience filter with the shared filterIntermediateRepresentationForAudiences path.
  • Plumbed property-level audience metadata from the V3 OpenAPI converters into IrGraph for inline request bodies, query parameters, and inline webhook payloads.
  • Extended the shared filter to scrub V3-produced IR shapes, including v2RequestBodies and v2Examples.
  • Fixed type-property filtering for V3 imports where ir.types keys differ from the canonical type IDs used by IrGraph.
  • Added V3 OpenAPI regression coverage that verifies internal-only properties are removed from public-filtered imports while untagged properties remain present.

Testing

  • Unit tests added/updated
  • Manual testing completed

Added V3 OpenAPI importer regression tests covering public-only, internal+public, and no-filter behavior across named schema properties, inline request body properties, query parameters, webhook payloads, v2RequestBodies, and v2Examples.

Manually verified the customer repro by publishing the same docs config with and without this branch: the public audience view no longer includes internal-only OpenAPI properties such as force_verify and custom_id, while the internal audience view still includes them.

@kafkas kafkas requested a review from amckinney as a code owner May 12, 2026 13:24
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

SDK Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-05-12T05:12:12Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 68s (n=5) 98s (n=5) 63s -5s (-7.4%)
go-sdk square 129s (n=5) 275s (n=5) 129s +0s (+0.0%)
java-sdk square 212s (n=5) 271s (n=5) 198s -14s (-6.6%)
php-sdk square 56s (n=5) 77s (n=5) 48s -8s (-14.3%)
python-sdk square 132s (n=5) 230s (n=5) 136s +4s (+3.0%)
ruby-sdk-v2 square 81s (n=5) 118s (n=5) 80s -1s (-1.2%)
rust-sdk square 153s (n=5) 156s (n=5) 175s +22s (+14.4%)
swift-sdk square 53s (n=5) 745s (n=5) 52s -1s (-1.9%)
ts-sdk square 88s (n=5) 107s (n=5) 210s +122s (+138.6%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-05-12T05:12:12Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-05-12 18:41 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Docs Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-05-12T05:12:12Z).

Fixture main PR Delta
docs 287.8s (n=5) 223.5s (35 versions) -64.3s (-22.3%)

Docs generation runs fern generate --docs --preview end-to-end against the benchmark fixture with 35 API versions (each version: markdown processing + OpenAPI-to-IR + FDR upload).
Delta is computed against the nightly baseline on main.
Baseline from nightly run(s) on main (latest: 2026-05-12T05:12:12Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-05-12 18:39 UTC

@kafkas kafkas changed the title fix(cli): apply audience filtering to V3 OpenAPI properties fix(cli): apply property audience filtering to V3 imports May 12, 2026
@kafkas kafkas merged commit d98afb0 into main May 12, 2026
200 checks passed
@kafkas kafkas deleted the anar/fer-10214-kickoff-cli-property-level-x-fern-audiences-filtering-does-followup branch May 12, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants