Skip to content

chore: regenerate stale generated artifacts from the memories baseline toggle#10482

Closed
aryanorastar wants to merge 1 commit into
BasedHardware:mainfrom
aryanorastar:chore/regen-baseline-artifacts
Closed

chore: regenerate stale generated artifacts from the memories baseline toggle#10482
aryanorastar wants to merge 1 commit into
BasedHardware:mainfrom
aryanorastar:chore/regen-baseline-artifacts

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

The memories baseline toggle added is_baseline and
PATCH /v3/memories/{memory_id}/baseline, but the committed artifacts derived
from those contracts were stale.

This PR now contains only reproducible generated output:

Artifact Change
app-client-openapi.json Adds the baseline-memory PATCH route
integration-public-openapi.json Adds the is_baseline field
Dart memories_wire.g.dart Adds isBaseline
Swift OmiApi.generated.swift Adds isBaseline and the baseline route
TypeScript clients ×4 Add is_baseline and the baseline route

The former stacked #10481 CI/failure-class changes are no longer part of this
branch; this PR is independently based on current main.

Verification

  • PATH=/opt/homebrew/share/flutter/bin:$PATH dart run build_runner build --delete-conflicting-outputs — wrote 0 outputs on the committed tree
  • flutter gen-l10n followed by git diff --exit-code -- lib/l10n — clean
  • scripts/openapi_runner.sh scripts/export_openapi.py --check ../docs/api-reference/openapi.json — up to date
  • scripts/openapi_runner.sh scripts/export_openapi.py --surface app-client --check ../docs/api-reference/app-client-openapi.json — up to date
  • scripts/openapi_runner.sh scripts/export_openapi.py --surface integration-public --check ../docs/api-reference/integration-public-openapi.json — up to date
  • .openapi-venv/bin/python scripts/generate_dart_models.py --all --check — all outputs up to date
  • .openapi-venv/bin/python scripts/generate_swift_openapi_types.py --check — clean
  • .openapi-venv/bin/python scripts/generate_ts_openapi_types.py --check — clean
  • backend/.venv/bin/python -m pytest backend/tests/unit/test_app_client_*_generator.py backend/tests/unit/test_integration_public_contract.py — 54 passed
  • bash app/test.sh — 944 passed
  • bash scripts/analyze_ratchet.sh — passed (11 unnecessary_import findings versus baseline 12)
  • PRE_PUSH_SKIP_DESKTOP_CHANGELOG=1 make preflight — all 17 selected checks passed; the skip corresponds to the no-changelog-needed label for generated Swift

No product behavior or hand-written source changes.

@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.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

The OpenAPI Contract workflow (the one this PR exists to satisfy) passes — every check in it regenerates from the same generators used here (export_openapi.py, generate_{dart,swift,ts}) and matches.

The two red checks are not from this diff:

  • Generated Files — build_runner reports app/lib/l10n/app_localizations_*.dart stale. This diff touches zero l10n files; it's pre-existing drift on main (needs a dart run build_runner build from someone with the Flutter toolchain — I don't have it locally to include here).
  • PR Metadata Preflight — stacked-PR artifact; the one-line guard commit from fix(ci): exempt generated Swift from the desktop changelog gate #10481 shows here until that merges, then this rebases to just the regeneration.

Stacked on #10481 (exempts Sources/Generated/ from the desktop changelog gate). Happy to split the l10n regen out to its own PR if a maintainer can confirm the build_runner output.

@Git-on-my-level Git-on-my-level added needs-maintainer-review Needs a human maintainer to sign off before merge workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior labels Jul 24, 2026

@Git-on-my-level Git-on-my-level 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.

Thanks for chasing the generated-artifact drift here. The OpenAPI/client regeneration itself looks directionally right from the diff: the is_baseline field and PATCH /v3/memories/{memory_id}/baseline route are being threaded through the app-client docs and generated Dart/Swift/TS clients consistently.

I’m going to request changes for the current head because there are still merge-blocking contract failures:

  • Generated Files is still red. The CI diff shows app/lib/l10n/app_localizations_*.dart are stale for the baseline-memory strings (pinAsBaseline, unpinAsBaseline, baselineMemory, alwaysInContext). Since this PR is specifically regenerating stale artifacts from the baseline toggle, those generated l10n files should either be included here or the PR should wait on a separate main-fix PR and then rebase onto it.
  • PR Metadata Preflight is red from the stacked #10481 commit: the fix(ci): ... commit is missing the required Failure-Class: declaration, and the failure-class registry edit is rejected as an instance-fix mutation. This probably goes away after #10481 lands and this branch rebases to only the OpenAPI/client regeneration; otherwise the stacked commit needs to satisfy that protocol.
  • This is stacked on a workflow-sensitive PR and checks are not green, so it needs maintainer review after the stack/check status is cleaned up. I did not see evidence of a supply-chain/security attempt in the diff.

Once the generated-file failure and stacked preflight issue are resolved, this looks like a useful cleanup to re-review.


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

@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.

chore regenerate generated artifacts — approve only (workflow-review, CHANGES_REQUESTED)

@aryanorastar

Copy link
Copy Markdown
Contributor Author

On the Generated Files l10n blocker: I tried to include the regenerated l10n but hit a toolchain-version wall I can't clear from a contributor env, so I'm flagging it rather than committing a mismatched diff.

What I found (precise, so whoever has CI's Flutter can finish it in one command):

  • The drift is real and pre-existing on main: app_en.arb has pinAsBaseline/unpinAsBaseline/baselineMemory/alwaysInContext, but app_localizations*.dart don't — feat(frontend): implement baseline memories toggle and UI badges in mobile app #8728 added the strings without running gen-l10n. Generated Files is red on main independent of this PR.
  • The committed l10n is gen-l10n output then dart format --line-length 120 (the repo's hook convention). Running just flutter gen-l10n reformats 44k lines at Dart's default 80 cols; adding dart format --line-length 120 app/lib/l10n/ collapses that to ~the 4 new keys.
  • The residual after that is a Dart formatter style-version gap (tall-style trailing commas / plural wrapping): latest-stable Flutter (3.44.7/3.44.8) bundles a newer Dart than whatever generated the committed files, so ~300 lines of existing content still reformat. I can't reproduce CI's exact (older, cached channel: stable) toolchain to avoid that.

So the clean fix is one command in CI's toolchain:

cd app && flutter gen-l10n && dart format --line-length 120 lib/l10n/

Happy to have a maintainer push that onto this branch, or split l10n to its own PR and rebase this onto it. The OpenAPI specs + Dart/Swift/TS client regen in this PR are verified and unaffected; the PR Metadata Preflight red clears once #10481 lands and this rebases to just the regen.

@Git-on-my-level Git-on-my-level added the no-changelog-needed Skip desktop changelog enforcement for internal-only changes label Jul 24, 2026
@Git-on-my-level
Git-on-my-level force-pushed the chore/regen-baseline-artifacts branch 2 times, most recently from 37675af to a60c55a Compare July 24, 2026 20:00
@Git-on-my-level

Copy link
Copy Markdown
Collaborator

Re-review evidence for a60c55a1bc:

  • Removed the stacked fix(ci): exempt generated Swift from the desktop changelog gate #10481 commit; this branch is now one generated-artifact commit on d7667b4568.
  • The stale Flutter l10n outputs from the prior review landed independently on main, and the rebase dropped the redundant l10n commit.
  • Generated Files, Public Developer API contract, Dart Analyze & Tests, Android compile, web checks, Windows typecheck/tests/build, repo formatting, and hygiene are green.
  • Exact-head local generation checks are clean; app tests passed 944/944, generator-contract tests passed 54/54, analyzer ratchet passed, and local preflight passed all 17 selected checks.

Two desktop checks remain externally blocked:

  1. Desktop Swift Static Contracts rejects generated OmiApi.generated.swift despite the no-changelog-needed label. Approved fix(ci): exempt generated Swift from the desktop changelog gate #10481 is the narrowly scoped fix and must land first; stacking it here was the preflight problem called out in the prior review.
  2. Desktop Swift Test Suites built successfully, then four isolated suites timed out waiting on the shared SwiftPM .build lock (Another instance of SwiftPM is already running); no assertion or generated-client failure was reported.

There are no unresolved inline review threads. The original generated-file and stacked-preflight blockers are cleared; this PR should be re-reviewed after #10481 lands and the desktop workflow is rerun.

…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 force-pushed the chore/regen-baseline-artifacts branch from a60c55a to f3e66d8 Compare July 24, 2026 20:38

@Git-on-my-level Git-on-my-level 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.

Maintainer re-review of exact head f3e66d8: the prior generated-file and stacked-preflight requests are addressed. The branch is one generated-artifact commit directly on b7e1f0d; the diff remains exactly eight reproducible artifacts. Generated Files, OpenAPI, repo, app, web, Windows, and Desktop Swift Static Contracts are green. The Desktop Swift suite built successfully but twice hit the same four 120s shared SwiftPM .build-lock waits, with no assertion failure; the one authorized same-SHA rerun was exhausted. Approving the code/diff while that infrastructure-only required check remains blocking.

@Git-on-my-level Git-on-my-level removed needs-maintainer-review Needs a human maintainer to sign off before merge workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior labels Jul 24, 2026
@Git-on-my-level

Copy link
Copy Markdown
Collaborator

Closing as already included in merged #10501. The sole eight-file generated-artifact patch is byte-for-byte identical to main commit c9a5206 (stable patch-id 8c67a5365d09e7ea79b892e6640faafd0d3cd19c), so rebasing would correctly become empty. Thank you for the regeneration work.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @aryanorastar 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Skip desktop changelog enforcement for internal-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants