Skip to content

Make Sources health fail closed - #158

Open
FZ2000 wants to merge 3 commits into
mainfrom
codex/sources-fail-closed-state
Open

Make Sources health fail closed#158
FZ2000 wants to merge 3 commits into
mainfrom
codex/sources-fail-closed-state

Conversation

@FZ2000

@FZ2000 FZ2000 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Effect in one sentence

Makes Sources health fail closed: a current ingestion error always outranks retained success, so old healthy rows and watcher state cannot look current.

State contract

Retained snapshot Current error Presentation
No No Loading
Yes No Connected source/watcher details
Either Yes Source health unavailable; retained rows hidden

What changes

  • SourcesPresentationState gives the current request result precedence.
  • DashboardStore.refreshIngestion() owns an independent refresh/error/freshness lane.
  • Full refresh still starts lanes concurrently; Sources retry does not refresh receipts, plan, or usage.
  • Cancellation is not published as a source-health failure.
  • The top bar shows source-specific freshness while Sources is active.
  • Four deterministic light/dark minimum/reference images cover retained-data failure without leaking local paths.

Review order

  1. Sources presentation state and semantic tests.
  2. Dashboard store/top-bar refresh ownership.
  3. Sources unavailable state, explanation, and Retry.
  4. Sources harness and canonical references.

Verification at current head 2085312

  • Refreshed onto current main (4ab2547); the only conflict combined Setup and Sources in the documented visual-suite inventory.
  • Current-head GitHub CI passes pytest on Python 3.11/3.12/3.13 and the macOS app/snapshot job.
  • swift test — 124 executed, 7 expected opt-in visual skips, 0 failures.
  • Canonical SetupVisualRegressionTests and SourcesVisualRegressionTests — all references match locally on the pinned renderer.
  • swift build -c release — passed.
  • git diff --check origin/main...HEAD — clean.

Scope

This changes source-health presentation and refresh isolation only. The pre-existing minimum-width truncation of long verifier descriptions remains out of scope.

FZ2000 added 3 commits August 28, 2026 15:09
…osed-state

# Conflicts:
#	apps/agentacct/Sources/agentacct/MainWindow.swift
…osed-state

# Conflicts:
#	apps/agentacct/Tests/README.md
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