[object Object]

← back to Homesonspec

Contrarian gate fixes: guard auto-pause recovery (manual disable stays down), defense-in-depth freshness!=INACTIVE on search+map, honest design-bundle README

ec6046b8ac43a87d6a6bd80710ccf1799a1e03aa · 2026-07-22 17:43:04 -0700 · Steve

Files touched

Diff

commit ec6046b8ac43a87d6a6bd80710ccf1799a1e03aa
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Jul 22 17:43:04 2026 -0700

    Contrarian gate fixes: guard auto-pause recovery (manual disable stays down), defense-in-depth freshness!=INACTIVE on search+map, honest design-bundle README
---
 apps/web/src/app/api/map/route.ts | 1 +
 apps/workers/src/verify.ts        | 7 +++++--
 design-system/README.md           | 8 ++++++--
 packages/search/src/index.ts      | 1 +
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/apps/web/src/app/api/map/route.ts b/apps/web/src/app/api/map/route.ts
index ea53e5f..806af79 100644
--- a/apps/web/src/app/api/map/route.ts
+++ b/apps/web/src/app/api/map/route.ts
@@ -14,6 +14,7 @@ export async function GET() {
     where: {
       status: "PUBLISHED",
       isDemo: false,
+      freshness: { not: "INACTIVE" }, // Stage-3: deduped/retired records never surface
       lat: { not: null },
       lon: { not: null },
     },
diff --git a/apps/workers/src/verify.ts b/apps/workers/src/verify.ts
index a326200..9345ecf 100644
--- a/apps/workers/src/verify.ts
+++ b/apps/workers/src/verify.ts
@@ -180,8 +180,11 @@ export async function recordSourceRun(sourceKey: string, outcome: RunOutcome, no
       lastSuccessAt: outcome.ok ? now : source.lastSuccessAt,
       consecutiveFailures: failures,
       health,
-      // Auto-pause disables the source; a successful run re-enables it.
-      active: outcome.ok ? true : tripped ? false : source.active,
+      // Auto-pause disables the source. Recovery is deliberate: only a source that
+      // was AUTO-paused (health === PAUSED) re-enables on a clean run. A source an
+      // operator manually pulled (active=false while health != PAUSED) stays down —
+      // a stray successful run must not silently resurrect it.
+      active: outcome.ok ? (source.health === "PAUSED" ? true : source.active) : tripped ? false : source.active,
     },
   });
 
diff --git a/design-system/README.md b/design-system/README.md
index 861e9e4..3d368e4 100644
--- a/design-system/README.md
+++ b/design-system/README.md
@@ -5,8 +5,12 @@ This directory is the **source bundle** for the HomesOnSpec design system on
 write_files), one component at a time.
 
 ## Contract
-- Tokens here mirror `apps/web/src/app/globals.css` `@theme` **1:1**. The live app and
-  the synced library must never drift — change a token in both, or in neither.
+- These previews are the **canonical reference** for `apps/web/src/app/globals.css`
+  `@theme`. The swatches show an illustrative subset of each ramp (not every 50–950 stop),
+  but the hex values that appear MUST match `globals.css` exactly — change a shared token in
+  both, or in neither. The component previews are reference renderings, not a byte-for-byte
+  copy of the React components (e.g. the home-card preview shows a photo slot the current
+  `SearchClient` card omits).
 - Every preview's **first line** is `<!-- @dsCard group="…" -->`. The Design System pane
   builds its card index from that marker (no explicit `register_assets` needed).
 
diff --git a/packages/search/src/index.ts b/packages/search/src/index.ts
index 5b72fa8..99a5809 100644
--- a/packages/search/src/index.ts
+++ b/packages/search/src/index.ts
@@ -80,6 +80,7 @@ export function buildWhere(params: SearchParams, bbox?: BBox): Prisma.InventoryH
   return {
     status: "PUBLISHED",
     isDemo: false, // HARD RULE: demonstration/synthetic inventory NEVER surfaces on the live site
+    freshness: { not: "INACTIVE" as const }, // Stage-3: deduped/retired records never surface (defense-in-depth over status)
     ...(bbox
       ? {
           lat: { gte: bbox.minLat, lte: bbox.maxLat },

← 3cb6635 Stage-3 verification engine: freshness decay + relabel, sour  ·  back to Homesonspec  ·  auto-save: 2026-07-22T18:15:55 (4 files) — apps/web/src/app/ 008a9de →