Skip to content

fix(ci): exempt generated Swift from the desktop changelog gate#10481

Merged
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
aryanorastar:fix/desktop-changelog-exempt-generated
Jul 24, 2026
Merged

fix(ci): exempt generated Swift from the desktop changelog gate#10481
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
aryanorastar:fix/desktop-changelog-exempt-generated

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

check-desktop-changelog.py exempts Backend-Rust/ and tests/ from the "desktop change requires a changelog fragment" rule as never user-facing app notes — but it does not exempt desktop/macos/Desktop/Sources/Generated/.

So regenerating Sources/Generated/OmiApi.generated.swift after a backend OpenAPI spec change demands a changelog fragment. Worse, exactly as the tests/ exemption comment already documents (incident #10387): the post-merge push run of this gate would redden main, because the PR-only no-changelog-needed label can't be honored on the push lane.

Fix

Add desktop/macos/Desktop/Sources/Generated/ to EXEMPT_DESKTOP_PATH_PREFIXES. Generated Swift is deterministically derived from the OpenAPI contract — the same directory the swift-format linter already skips.

A test asserts the generated file is exempt while a hand-written Sources/AppDelegate.swift still requires a changelog (the exemption must not leak).

Why now

The memories baseline toggle (#8728) changed the app-client OpenAPI contract; regenerating OmiApi.generated.swift from it is blocked today purely by this gate gap. This is the second instance of the push-lane gate over-including internal paths (first: #10387, tests/), so it registers FC-push-gate-internal-path-scope.

Verification

python3 .github/scripts/test_desktop_changelog.py  →  Ran 4 tests  OK
# self-check: is_desktop_change_requiring_changelog(...)
#   Sources/Generated/OmiApi.generated.swift → False (exempt)
#   Sources/AppDelegate.swift                → True  (still gated)
scripts/failure-class validate ... → ok

Failure-Class: new

Review in cubic

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

check-desktop-changelog.py exempts Backend-Rust/ and tests/ as
"never user-facing app notes", but not Desktop/Sources/Generated/.
Regenerating Sources/Generated/OmiApi.generated.swift after a backend
OpenAPI spec change therefore demands a changelog fragment, and — exactly
as the tests/ exemption comment warns (incident BasedHardware#10387) — the post-merge
push run of the gate would redden main, since the PR-only
no-changelog-needed label cannot be honored on the push lane.

Generated Swift is deterministically derived from the OpenAPI contract
and is the same directory the swift-format linter already skips. Add it
to EXEMPT_DESKTOP_PATH_PREFIXES, with a test asserting the generated file
is exempt while a hand-written Sources/*.swift still requires a changelog
(the exemption must not leak).

This is the second instance of the push-lane gate over-including internal
paths (first: BasedHardware#10387, tests/), so it registers
FC-push-gate-internal-path-scope.

Verify: python3 .github/scripts/test_desktop_changelog.py → 4 tests OK.

Failure-Class: new

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Git-on-my-level

Copy link
Copy Markdown
Collaborator

Thanks for the tight CI fix. I reviewed the desktop changelog gate change and this looks like the right shape: the new exemption is limited to desktop/macos/Desktop/Sources/Generated/, the regression test covers both the generated Swift exemption and a hand-written Sources/ file still requiring a changelog, and the failure-class entry is consistent with the push-lane issue this is preventing.

I also locally ran:

  • python3 .github/scripts/test_desktop_changelog.py — passes (4 tests)
  • python3 scripts/failure-class validate --pr-body-file /tmp/pr10481-body.md --base origin/main --head HEAD --format text — OK

I’m not formally approving because this touches CI/workflow gating and the current automation context marks approval as disallowed for workflow-sensitive paths/check state. But from implementation review, this is a positive signal for a human maintainer to review/merge.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added candidate-clean-pr Small, safe, well-scoped, well-tested contribution; model clean PR workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior needs-maintainer-review Needs a human maintainer to sign off before merge labels Jul 24, 2026

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

fix(ci) exempt generated Swift from changelog gate — approve only (CI/workflow change)

Git-on-my-level pushed a commit to aryanorastar/omi that referenced this pull request Jul 24, 2026
…e toggle

The memories baseline toggle (BasedHardware#8728) merged without regenerating the
artifacts derived from the app-client OpenAPI contract, so several
committed files drifted from source:

  - backend specs: app-client (+PATCH /v3/memories/{memory_id}/baseline),
    integration-public (+is_baseline field)
  - app-client client types: Dart memories_wire, Swift OmiApi.generated,
    TS omiApi.generated (web app / admin / personas, windows renderer)

All add the same is_baseline field / baseline route; method counts and
every other model are unchanged. The openapi-contract and generated-type
contract checks have been red on main and on every PR based off it, and
prod-eligibility inherits the failure.

Regenerated with the repo's own generators (no hand edits):
  export_openapi.py --surface {app-client,integration-public} --write ...
  generate_dart_models.py --all
  generate_swift_openapi_types.py
  generate_ts_openapi_types.py

Verified all three OpenAPI surfaces report "up to date" and re-running
every generator reproduces the committed bytes, via the .openapi-venv
(Python 3.11.15).

Stacked on BasedHardware#10481, which exempts Sources/Generated/ from the desktop
changelog gate so the regenerated Swift needs no changelog fragment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Git-on-my-level pushed a commit to aryanorastar/omi that referenced this pull request Jul 24, 2026
…e toggle

The memories baseline toggle (BasedHardware#8728) merged without regenerating the
artifacts derived from the app-client OpenAPI contract, so several
committed files drifted from source:

  - backend specs: app-client (+PATCH /v3/memories/{memory_id}/baseline),
    integration-public (+is_baseline field)
  - app-client client types: Dart memories_wire, Swift OmiApi.generated,
    TS omiApi.generated (web app / admin / personas, windows renderer)

All add the same is_baseline field / baseline route; method counts and
every other model are unchanged. The openapi-contract and generated-type
contract checks have been red on main and on every PR based off it, and
prod-eligibility inherits the failure.

Regenerated with the repo's own generators (no hand edits):
  export_openapi.py --surface {app-client,integration-public} --write ...
  generate_dart_models.py --all
  generate_swift_openapi_types.py
  generate_ts_openapi_types.py

Verified all three OpenAPI surfaces report "up to date" and re-running
every generator reproduces the committed bytes, via the .openapi-venv
(Python 3.11.15).

Stacked on BasedHardware#10481, which exempts Sources/Generated/ from the desktop
changelog gate so the regenerated Swift needs no changelog fragment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Git-on-my-level
Git-on-my-level merged commit b7e1f0d into BasedHardware:main Jul 24, 2026
37 of 39 checks passed
Git-on-my-level pushed a commit to aryanorastar/omi that referenced this pull request Jul 24, 2026
…e toggle

The memories baseline toggle (BasedHardware#8728) merged without regenerating the
artifacts derived from the app-client OpenAPI contract, so several
committed files drifted from source:

  - backend specs: app-client (+PATCH /v3/memories/{memory_id}/baseline),
    integration-public (+is_baseline field)
  - app-client client types: Dart memories_wire, Swift OmiApi.generated,
    TS omiApi.generated (web app / admin / personas, windows renderer)

All add the same is_baseline field / baseline route; method counts and
every other model are unchanged. The openapi-contract and generated-type
contract checks have been red on main and on every PR based off it, and
prod-eligibility inherits the failure.

Regenerated with the repo's own generators (no hand edits):
  export_openapi.py --surface {app-client,integration-public} --write ...
  generate_dart_models.py --all
  generate_swift_openapi_types.py
  generate_ts_openapi_types.py

Verified all three OpenAPI surfaces report "up to date" and re-running
every generator reproduces the committed bytes, via the .openapi-venv
(Python 3.11.15).

Stacked on BasedHardware#10481, which exempts Sources/Generated/ from the desktop
changelog gate so the regenerated Swift needs no changelog fragment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

candidate-clean-pr Small, safe, well-scoped, well-tested contribution; model clean PR needs-maintainer-review Needs a human maintainer to sign off before merge workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants