Skip to content

ORB-229: Deprecate AI memory API (part 1, deprecation) - #771

Merged
thomasluizon merged 1 commit into
mainfrom
thomasluizon/ticket-235-ai-memory-deprecation
Oct 19, 2026
Merged

thomasluizon merged 1 commit into
mainfrom
thomasluizon/ticket-235-ai-memory-deprecation

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Part of thomasluizon/orbit-tickets#235 (ORB-229).

Marks the AI memory HTTP contract deprecated while keeping the handlers, payloads, tools, extraction pipeline, jobs and persistence working. This is part 1; removal belongs to part 2 after this merges and its fleet prerequisites are satisfied.

Approach

  • UserFactsController.cs and ProfileController.cs use action-level [Obsolete], matching Fix Google sign-in on MCP authorization page #660 and Deprecate legacy Google auth routes (#1528, part 1) #753 and the existing operation transformer.
  • GetProfileQuery.cs marks the ProfileResponse.AiMemoryEnabled property obsolete. ServiceCollectionExtensions.Infrastructure.cs adds a schema transformer that maps obsolete property metadata to deprecated: true for both API versions.
  • openapi.json and openapi_v2.json were regenerated with dotnet build Orbit.slnx. A structural comparison against the parent commit found exactly five additions per document: four operation deprecation flags and the profile property deprecation flag. Every other document value is unchanged.
  • AiMemoryDeprecationTests.cs uses the same reflection and generated-document assertions as Deprecate legacy Google auth routes (#1528, part 1) #753. Existing controller behavior tests remain and carry the same obsolete annotations as that precedent.

Deprecated routes

  • GET /api/user-facts
  • DELETE /api/user-facts/{id}
  • DELETE /api/user-facts/bulk
  • PUT /api/Profile/ai-memory

All four operations have deprecated: true in both generated documents.

Schema removal review

The pinned action Dockerfile uses tufin/oasdiff:v1.33.0. Its own rule registry establishes these levels:

Property or shape removed in part 2 Current OpenAPI representation Applicable check and level Part 1 treatment
ProfileResponse.aiMemoryEnabled Required boolean response property response-required-property-removed: ERR Deprecated; boolean type and required membership preserved
SetAiMemoryRequest.enabled Required request property on the deprecated PUT request-property-removed: WARN for a property removal; api-schema-removed: INFO for the whole component Operation deprecated; request unchanged
BulkDeleteUserFactsRequest.factIds Required request property on the deprecated bulk DELETE request-property-removed: WARN for a property removal; api-schema-removed: INFO for the whole component Operation deprecated; request unchanged
Export facts, its factText, category, extractedAtUtc members, and settings.aiMemoryEnabled Export success response has no content schema; UserDataExport, ExportedUserFact and ExportedSettings are absent from components No property check can inspect these undocumented fields Export serialization unchanged
Config limits.MaxUserFacts limits is a dictionary with string additionalProperties; this key is not a schema property No property check applies to this dictionary key Config unchanged
User-fact GET payload and bulk DELETE deleted payload Success responses have no content schema No property check can inspect these undocumented fields Responses unchanged

Deprecating a required response property does not waive its eventual removal error: the pinned required-property checker still reports that removal. Part 2 must account for that compatibility constraint. This PR adds no ignore file or severity override.

External interface evidence

Confirmed OpenApiSchemaTransformerContext.JsonPropertyInfo in the installed Microsoft.AspNetCore.OpenApi 10.0.13 XML API metadata, JsonPropertyInfo.AttributeProvider in the installed .NET reference metadata, and OpenApiSchema.Deprecated in Microsoft.OpenApi 2.12.2 metadata. The real build then produced components.schemas.ProfileResponse.properties.aiMemoryEnabled as {"type":"boolean","deprecated":true} in both documents. The generated-document tests read that actual output rather than an invented fixture.

Test evidence

  • Before implementation, dotnet test tests/Orbit.Infrastructure.Tests --filter 'FullyQualifiedName~UserFactsControllerTests|FullyQualifiedName~ProfileControllerTests' --nologo: 39 passed, zero failed or skipped. These unchanged tests did not check deprecation metadata.
  • Before implementation, after adding AiMemoryDeprecationTests, dotnet test tests/Orbit.Infrastructure.Tests --filter FullyQualifiedName~AiMemoryDeprecationTests --nologo: 14 failed, zero passed or skipped. RouteRemainsAvailableAndDeprecated failed for the missing obsolete attributes; GeneratedOpenApiMarksRouteDeprecated and GeneratedOpenApiKeepsMemorySettingRequiredAndMarksItDeprecated failed for missing deprecation flags.
  • After implementation and commit, dotnet build Orbit.slnx --nologo: zero errors. Existing package, versioning and obsolete-member warnings remain; no suppression was added.
  • After implementation and commit, dotnet test tests/Orbit.Infrastructure.Tests --no-build --filter 'FullyQualifiedName~AiMemoryDeprecationTests|FullyQualifiedName~UserFactsControllerTests|FullyQualifiedName~ProfileControllerTests' --nologo: 53 passed, zero failed or skipped.
  • dotnet test tests/Orbit.Domain.Tests --no-build --nologo: 736 passed, zero failed or skipped, exit 0.
  • dotnet test tests/Orbit.Application.Tests --no-build --nologo: 5,556 passed, zero failed or skipped, exit 0.
  • dotnet test tests/Orbit.Infrastructure.Tests --no-build --nologo: 3,693 passed, zero failed or skipped, exit 0.
  • dotnet test tests/Orbit.Analyzers.Tests --no-build --nologo: 32 passed, zero failed or skipped, exit 0.
  • Pre-commit format, dash, timeless, root-allowlist and suppression-allowlist hooks passed. Regenerated OpenAPI documents match the committed files.

Assumptions

  • Applied the final part 1 instruction as the active scope rather than executing the earlier destructive-removal specification; the fleet gate, database snapshot and migration belong to part 2.
  • Put the contract cases in AiMemoryDeprecationTests beside the controller tests rather than extending authentication tests with unrelated AI memory cases.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes across all nine files, including compatibility with the sibling mobile consumer.

  • Route deprecation: Marks the four AI-memory operations obsolete while preserving their routes, authorization, handlers, and payloads.
  • Schema deprecation: Marks ProfileResponse.aiMemoryEnabled deprecated in both OpenAPI versions while retaining the required boolean expected by existing clients.
  • Metadata generation: Adds the shared obsolete-property schema transformer and updates both generated documents without other contract changes.
  • Verification: All 66 focused deprecation, controller-behavior, and API-versioning tests passed; regenerating the OpenAPI documents left the worktree clean. The full solution test suite was not rerun locally.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@sonarqubecloud

sonarqubecloud Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

@thomasluizon
thomasluizon merged commit f8abd02 into main Oct 19, 2026
23 checks passed
@thomasluizon
thomasluizon deleted the thomasluizon/ticket-235-ai-memory-deprecation branch October 19, 2026 06:46
thomasluizon added a commit that referenced this pull request Oct 19, 2026
…d cancellations and the Play renewal notice (#746) (#778)

* Deprecate AI memory HTTP contracts for ORB-229 (part 1) (#771)

(cherry picked from commit f8abd02)

* Deprecate challenge and accountability routes for ORB-212 (#772)

(cherry picked from commit 572b8de)

* Deprecate social API routes and required profile fields (ORB-233 part 1) (#773)

(cherry picked from commit 9c414c7)

* fix: exclude retired notifications from inbox counts (#774)

(cherry picked from commit f5df366)

* fix: retain owed cancellations after account erasure (#775)

* fix: retain provider cancellation obligations after account erasure

* fix: preserve erasure for accounts without billing obligations

* fix: claim owed cancellations before provider calls

* fix: alert owed cancellation exhaustion only after a failed attempt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit c369535)

* fix: notify returning Play subscribers about renewal (#776)

* fix: explain Play renewal recovery on account reactivation

* test: register reactivation service in sign-in retry fixture

* fix: verify Play renewal before reactivation notice

(cherry picked from commit 96023f9)

---------

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant