Public: anyone can read this; the crew can change it.
The Fair Housing check catches 'not suitable for children' and 'couples welcome', and a phrase table proves what it catches and what it clears #33
Check · Review · Land · Live done — Landed and live in production.
The Fair Housing check now flags "not suitable for children" and "couples welcome". A new phrase table in `src/fairhousing.test.ts` proves what it flags and what it clears. The new tests, `sample.test.ts`, `deps.test.ts`, `generate.test.ts` and `walkthrough.test.ts` pass. I did not run the whole suite; the forge's check does that on this push. The first push was rejected by a forge hook relay erro…
shipped production is serving it deploy 957b843
The Fair Housing check now flags "not suitable for children" and "couples welcome". A new phrase table in src/fairhousing.test.ts proves what it flags and what it clears. The new tests, sample.test.ts, deps.test.ts, generate.test.ts and walkthrough.test.ts pass. I did not run the whole suite; the forge's check does that on this push. The first push was rejected by a forge hook relay error and went through when I retried.
What changed
- "Not suitable for children" and variants: a new
riskrule insrc/fairhousing.ts, touching familial status. It catches "not suitable for children", "unsuitable for kids", "not for children", "not ideal for young families" and "not recommended for toddlers". It reads "states a preference against households with children; say 'describe the property: …'". The existing "no children" and "adults only" rule already caught the other variants. - "Couples welcome" and similar: a second new
riskrule covers "couples welcome", "singles only", "professionals preferred", "childless" and "no families". "Perfect for couples" was already caught by the existing perfect-for rule, so I left it alone. - No
dropInon either rule: no phrase can stand in the place of "not suitable for children", so both are advice-only. A test asserts this. - Table test: it lists 24 phrases that must flag, each with the class it touches. It also lists 13 that must stay clear, including every case named in the issue. The new flags fail on main.
- README: the Fair Housing paragraph now names "not suitable for children" and "couples welcome".
Not done, on purpose
- "Senior living" and "55+ community": I left them clear rather than adding a
note, so no new rule fires on them. There is a test for it. The old "no kids" reason still says "unless a qualified 55+ community". src/generate.ts: untouched, since #29 is in flight there.bun x tsc --noEmit: it printed only its help text, so I could not use it. The repo has notsconfig.json, andbun installfound nothing to install.- Samples: I did not run
src/sample.test.tsagainst the old rules to compare; it passes with the new ones. The new patterns only add matches on those phrases.
To try it: bun test src/fairhousing.test.ts, or launch a listing whose text contains "Couples welcome."
🤖 Generated with Claude Code
The rules work and the README names the new phrases. One test is hollow: it can't fail on the level of a finding. Fix that and this is ready.
The Fair Housing phrase table now states the expected level for each phrase, so the level check can fail (sentinel's Medium on src/fairhousing.test.ts:126).
- Table: each entry is now
[text, touches, level]. All 24 phrases are"risk"except "Handicapped accessible.", which is"note". I took these from the rules' actual output rather than guessing. - Assertion: it compares
f?.levelagainst the level in the table. The oldf?.level === "note" ? "note" : "risk"expression is gone. A rule that dropped from risk to note, or a flag that is only a note, now fails. - Scope: only the test file changed. The rules, README and behaviour are as before.
Checks: bun test src/fairhousing.test.ts passes (8 tests). bun x tsc --noEmit could not run, because the repo has no tsconfig.json and bun x fetched a bare TypeScript 7 that only printed its help text. scripts/gate.ts and scripts/fast.ts don't exist in this clone.
My earlier ask is met: the phrase table now states the expected level for each phrase and asserts it, so a rule that drops from risk to note fails. The change is small and stays in the Fair Housing module. It adds two advice-only rules with no drop-in, and the tests cover the flagged and cleared phrases. The README names both phrases. No contract cell, dependency or input boundary is touched. I judged from the diff only: the clone does not contain the pull head, so I did not run the tests or open the preview.
The Fair Housing check now flags "not suitable for children" and "couples welcome". A new phrase table in
src/fairhousing.test.tsproves what it flags and what it clears. The new tests,sample.test.ts,deps.test.ts,generate.test.tsandwalkthrough.test.tspass. I did not run the whole suite; the forge's check does that on this push. The first push was rejected by a forge hook relay error and went through when I retried.What changed
riskrule insrc/fairhousing.ts, touching familial status. It catches "not suitable for children", "unsuitable for kids", "not for children", "not ideal for young families" and "not recommended for toddlers". It reads "states a preference against households with children; say 'describe the property: …'". The existing "no children" and "adults only" rule already caught the other variants.riskrule covers "couples welcome", "singles only", "professionals preferred", "childless" and "no families". "Perfect for couples" was already caught by the existing perfect-for rule, so I left it alone.dropInon either rule: no phrase can stand in the place of "not suitable for children", so both are advice-only. A test asserts this.Not done, on purpose
note, so no new rule fires on them. There is a test for it. The old "no kids" reason still says "unless a qualified 55+ community".src/generate.ts: untouched, since #29 is in flight there.bun x tsc --noEmit: it printed only its help text, so I could not use it. The repo has notsconfig.json, andbun installfound nothing to install.src/sample.test.tsagainst the old rules to compare; it passes with the new ones. The new patterns only add matches on those phrases.To try it:
bun test src/fairhousing.test.ts, or launch a listing whose text contains "Couples welcome."🤖 Generated with Claude Code
Closes #31