Repository navigation
fix(ci): exempt generated Swift from the desktop changelog gate - #10481
Git-on-my-level merged 1 commit into
Conversation
|
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 <[email protected]>
b586d41 to
b537c46
Compare
|
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 I also locally ran:
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 |
kodjima33
left a comment
There was a problem hiding this comment.
fix(ci) exempt generated Swift from changelog gate — approve only (CI/workflow change)
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…dHardware#10481) ## 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 BasedHardware#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 (BasedHardware#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: BasedHardware#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 <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/10481?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
What
check-desktop-changelog.pyexemptsBackend-Rust/andtests/from the "desktop change requires a changelog fragment" rule as never user-facing app notes — but it does not exemptdesktop/macos/Desktop/Sources/Generated/.So regenerating
Sources/Generated/OmiApi.generated.swiftafter a backend OpenAPI spec change demands a changelog fragment. Worse, exactly as thetests/exemption comment already documents (incident #10387): the post-merge push run of this gate would reddenmain, because the PR-onlyno-changelog-neededlabel can't be honored on the push lane.Fix
Add
desktop/macos/Desktop/Sources/Generated/toEXEMPT_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.swiftstill requires a changelog (the exemption must not leak).Why now
The memories baseline toggle (#8728) changed the app-client OpenAPI contract; regenerating
OmiApi.generated.swiftfrom 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 registersFC-push-gate-internal-path-scope.Verification
Failure-Class: new