Skip to content

Carry main fixes into redesign main (#746) - #614

Merged
thomasluizon merged 2 commits into
redesign/mainfrom
fix/ticket-746-carry-soft-delete
Sep 27, 2026
Merged

thomasluizon merged 2 commits into
redesign/mainfrom
fix/ticket-746-carry-soft-delete

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Change

Carries the next two main fixes into redesign/main for thomasluizon/orbit-tickets#746, using git cherry-pick -x in the specified order.

  • Soft delete Astra habits through the habit command #611 (b953e5d3): DeleteHabitTool now sends DeleteHabitCommand, so Astra deletion uses the same soft delete and subtree behavior as the habit API. BulkCreateHabitsCommand validates children before persisting any part of an item. The accompanying metadata, command, tool, and scheduler tests are carried in tests/Orbit.Application.Tests and tests/Orbit.Infrastructure.Tests.
  • Fix atomic habit reminder probe increments #612 (43d847ec): OrbitDbContext increments the habit reminder probe in the database within the save transaction, preserving increments from stale concurrent writers. The persistence and scheduler tests cover the probe and candidate refresh.

No commit was skipped. Neither picked diff includes an EF migration. The EF model check found no pending model changes. A build regenerated src/Orbit.Api/openapi.json without changing it.

Conflict resolution

Neither cherry-pick produced a conflict. Git automatically merged src/Orbit.Infrastructure/Persistence/OrbitDbContext.cs and mapped both commits' scheduler tests into the redesign branch's tests/Orbit.Infrastructure.Tests/Services/ReminderSchedulerCacheTests.cs. The resulting file retains the existing redesign cache tests and adds both main regression cases. No redesign contract or tool-step behavior was removed.

Assumptions

  • Kept the redesign branch's ReminderSchedulerCacheTests.cs name for the carried scheduler tests; rejected adding a second SchedulerProjectionTests.cs file because Git mapped the changed test content into the existing suite.

External interface evidence

The installed EF Core 10.0.12 XML API metadata confirms that DatabaseFacade.CurrentTransaction returns the context transaction or null, PropertyEntry.IsModified controls whether the property is updated on save, and IsRelational reports whether the current provider is relational. The focused SQLite tests exercised those members through real EF Core calls. The scheduler test interceptor observed SQL through DbCommand.CommandText during the same run.

Test evidence

  • Focused test filter for DeleteHabitToolTests, BulkCreateHabitsCommandHandlerTests, ReminderSchedulerCacheTests, and OrbitDbContextTests: exit 0, 161 passed.
  • dotnet ef migrations has-pending-model-changes --project src/Orbit.Infrastructure --startup-project src/Orbit.Api --no-build: exit 0, no pending model changes.
  • env -u LANG -u LC_ALL dotnet build Orbit.slnx --nologo -v quiet: exit 0, zero errors.
  • env -u LANG -u LC_ALL dotnet test --nologo -v quiet: exit 0, 7,844 passed.
  • env -u LANG LC_ALL=en_US.UTF-8 dotnet build Orbit.slnx --nologo -v quiet: exit 0, zero errors.
  • env -u LANG LC_ALL=en_US.UTF-8 dotnet test --nologo -v quiet: exit 0, 7,844 passed.

The red phase of the upstream regression tests was not run in this carry; the source and tests arrived together as existing main commits.

* Route Astra habit deletion through soft delete command

* Avoid direct habit removal during bulk create validation

(cherry picked from commit b953e5d)

@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 in the two commits carried from main into redesign/main:

  • Astra habit deletion: The tool delegates to the existing delete command for subtree soft deletion, authorization and cache invalidation.
  • Bulk habit creation: Child validation completes before any part of an item is staged for persistence.
  • Reminder probe persistence: Relational saves increment the probe in the database alongside habit updates, with regression tests for stale writers and scheduler refresh.

Pullfrog  | View workflow run | Using GPT Sol | 𝕏

@thomasluizon
thomasluizon merged commit fc60e2c into redesign/main Sep 27, 2026
21 checks passed
@thomasluizon
thomasluizon deleted the fix/ticket-746-carry-soft-delete branch September 27, 2026 06:58
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