thedotmack/claude-mem · warning

SHADOW_HOUSE

SHADOW_HOUSE

Error message

SHADOW_HOUSE

What it means

A conflict record emitted by CcsAlignRulesWalker.walkRules with code SHADOW_HOUSE: a leaf (seat-level) rule line duplicates, nearly verbatim, an existing house line or starts with 'House rule', shadowing the cascade. It is redundant at best and dangerous at worst — if the house line changes, the stale leaf copy keeps overriding it.

Source

Thrown at src/services/integrations/CcsAlignRulesWalker.ts:519

          detail: 'Top-of-prompt clock or "current time is" in a profile (house rule: no clock in prefix)',
        });
      }
    }
  }

  // Seat-layer specific conflict detection (against house)
  const shadowPatchesByFile = new Map<string, Set<string>>();

  for (const entry of seat.entries) {
    for (const line of entry.lines) {
      const trimmed = line.trim();
      if (trimmed.length === 0) continue;

      // SHADOW_HOUSE: leaf line also at house (or starts with "House rule")
      const shadow = detectShadowHouse(trimmed, houseLineSet);
      if (shadow.isShadow) {
        conflicts.push({
          code: 'SHADOW_HOUSE',
          layer: 'seat',
          file: entry.file,
          line: trimmed,
          detail: shadow.matchedHouseLine
            ? `Leaf duplicates house line: "${shadow.matchedHouseLine}"`
            : 'Leaf starts with "House rule" — shadows the cascade',
          houseMatch: shadow.matchedHouseLine,
        });

        if (!shadowPatchesByFile.has(entry.file)) {
          shadowPatchesByFile.set(entry.file, new Set());
        }
        shadowPatchesByFile.get(entry.file)!.add(trimmed);
      }

      // DRIFT: leaf line is close-but-not-exact to a house line
      if (!shadow.isShadow) {
        const drift = detectDrift(trimmed, allHouseLines);

View on GitHub (pinned to 8bc631a71a)

Solutions

  1. Delete the duplicated line from the seat-level file — the house layer already provides it
  2. If the seat needs a genuine exception, rewrite it as a delta rather than a copy of the house text
  3. Re-run walkRules after editing to confirm SHADOW_HOUSE is cleared
  4. Check git history of the flagged file to find which house line it was copied from

Example fix

// before (seat file)
House rule: always run lint before commit
// after
(line removed — inherited from house layer)
Defensive patterns

Strategy: validation

Validate before calling

const houseSet = new Set(houseLines.map(l => l.trim()));
const shadows = seatLines.filter(l => {
  const t = l.trim();
  return houseSet.has(t) || t.startsWith('House rule');
});
if (shadows.length) console.warn('seat lines shadow house:', shadows);

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: walkRules finds a seat-layer line that detectShadowHouse matches against the house line set (exact duplicate) or that begins with the literal 'House rule'.

Common situations: A developer copied a house rule into their personal seat rules file 'just to be sure'; auto-merged configs reintroduced a line the house already covers; an old house line was demoted to seat level and now shadows its successor.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of thedotmack/claude-mem@8bc631a71a (2026-09-09). Data as JSON: /api/errors/d13673dede6debcd. Report an issue: GitHub.