Skip to content

C8 slice 1: route the action-items list onto typed ApiResult (clean ancestry) - #14615

Merged
Git-on-my-level merged 6 commits into
mainfrom
task/msd-core-c3-action-items-v2
Sep 18, 2026
Merged

Git-on-my-level merged 6 commits into
mainfrom
task/msd-core-c3-action-items-v2

Conversation

@Git-on-my-level

Copy link
Copy Markdown
Member

Summary

  • Second C3 slice, stacked on the typed-result branch: migrate action-items list GET only. Same safety property as PR1 — today's tryGetActionItems / empty-list coalescing makes a 503 render the Tasks empty hero (Create Action Item). An injected 503 against the real ActionItemsProvider and ActionItemsPage (not a typed-result unit test alone) now shows omi.action_items.error and never that hero; retry recovers to valid empty.
  • Old and new still coexist. getActionItems / tryGetActionItems stay on makeApiCall. ActionItemsApi.list is the typed path. Production ActionItemsProvider() is not flipped; tests use composeTypedActionItemsProvider. Parser keeps valid rows around a malformed one and counts rejectedRows.
  • 402/422 on this list have no Processing poller. executeApi already maps 402 → locked and 422 → terminal with retryable: false. I did not migrate create / update / delete / bulk / loadMoreActionItems / Home today-window fetch: those are not the empty-hero path, and changing their null-as-failure retry would be a behaviour change. Name them for a later slice rather than quietly retargeting.
  • Left pendingContract('C3') on the Dart Record.== / Map identity projection test. No workaround.
  • Null-swallow ratchet: action_items.dart stays unadopted (partial large file; baseline 11 makeApiCall / 17 null-swallow after the independent-row catch). Brand-new action_items_api_contract.dart is adopted for legacy-nullable-http (the only rule that applies at app/lib/backend/http/, not under api/). The scanner is changed-file-only: it constrains adopted files and brand-new files (prior_source is None); untouched legacy files may grow and are never taxed. False-positive shape: after comments/strings are stripped, unrelated catch (, return null, or ?? [] in an adopted file fire; aliases/wrappers evade it. Behavioral contracts remain authoritative.

Test plan

  • TZ=UTC flutter test test/spine/c3_action_items_test.dart — 3/3 (outage→error on provider + real page, parser keeps valid rows, retry recovers to empty)
  • TZ=UTC bash app/test.sh — exit 0
  • python3 scripts/check_spine_contracts.py — C3 projection marker still pending; new spine file registered
  • make preflight — 21 checks passed vs origin/main
  • dart format --line-length 120 on touched Dart files
  • make mobile-verify ARGS="fast --paths …action_items…" — 9/9 passed
  • scripts/pr-preflight --suggest — no locked invariants; no fix: commit so no failure class required. Ask before defining one.

Failure-Class: none

🤖 Generated with Claude Code

Review in cubic

Line-Count-Exception: app/lib/pages/action_items/action_items_page.dart | 2170 -> 2201 | action-items typed ApiResult migration: the Home-today/load-more/retry wiring through ActionItemsApi and its null-swallow guards net +31 lines at the final base; split deferred until the C3 chain completes.

Product invariants affected

INV-DATA-1 — the action-items list migration keeps production-family routing continuity: Home-today/load-more/retry resolve through the same production data plane via ActionItemsApi, now with explicit typed error and retry states.

(Rehomed from #14613 onto a clean ancestry; same owned content, spine revision-chain gate satisfied.)

Rehomes the C3.5 action-items migration onto a clean ancestry: real
CaptureSessionOwner-aware action items provider factory, typed list/
load-more/retry wiring in the production Home path, boundary-baseline
adoption, API_RESULTS.md documentation, and the C3 action-items spine
oracle with its registry entry. Ancestry rebuilt from origin/main so the
squash-era blobs that predate the merged C3 oracle revisions do not ride
along.
const the two ApiFailure authTransient/decode returns; lift the
@VisibleForTesting annotation off sendUncaughtApiCall (executeApi is a
production entry, not test-only); key the action-items retry TextButton
with OmiKeys.actionItemsRetry and register it in the addressability
catalog.
The merge-forward left both the retired ActionItemsProvider() registration and a duplicate device_provider import; keep the factory-based registration only.
The fixture pinned a UTC due_at and a UTC now; the provider's Home-today
window is local-midnight based, so UTC+14 runners excluded the fixture.
Drive the fixture and both assertions from the runtime clock instead,
matching how the app itself computes the window.
…on-items

Restores backend files that a concurrent main merge touched; unowned drift restored to origin/main bytes.
…on-items

Restores backend files that a concurrent main merge touched; unowned drift restored to origin/main bytes.
@Git-on-my-level
Git-on-my-level merged commit b38c545 into main Sep 18, 2026
40 checks passed
@Git-on-my-level
Git-on-my-level deleted the task/msd-core-c3-action-items-v2 branch September 18, 2026 22:13
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