中文版

Landlord API — Slice 2: Idempotent Sync

Slice 1 made a landlord's API key a valid identity; nothing yet stopped a nightly sync writing the same flat twice. Slice 2 makes every write repeatable through per-source external refs, an address fingerprint that refuses to guess, a single-transaction idempotency claim, and a test-mode sandbox that never touches the public marketplace. Twenty-five decisions (D12–D36), each with its rejected alternatives recorded.

  • Predecessor Slice 1 — Foundation (2026-09-19), merged in 8942b456 (PR #139)
  • ADRs 0002
  • Status Approved

View source markdown ↗ generated by claude-opus-5 · diagrams mermaid

Why this slice exists

Slice 1 made a landlord's API key a valid identity. Nothing yet stopped a sync job writing the same flat twice, so a nightly run would fill the marketplace with copies of one property. Slice 2 makes every write repeatable: the same sync, run a hundred times, leaves one property and one listing.

  • Area backend/go + panel unit field
  • Follows Slice 1 — Foundation, merged in 8942b456
  • Shape 3 new tables, 6 new columns, 7 new error codes
  • Weight 25 decisions, 21 tasks, 51 tests

The matching pipeline

One entry point decides whether an incoming property is new or already known. Each step is tried in order, and the first hit wins.

Resolution order for a property write. Both the ref lookup and the fingerprint lookup are scoped twice — same owner_user_id and same is_test — and neither scope is optional
Resolution order for a property write. Both the ref lookup and the fingerprint lookup are scoped twice — same owner_user_id and same is_test — and neither scope is optional.
StepTryResultAudit action
0Idempotency-Key seen beforereplay, stop—
1source + external_ref in the refs table200, that propertyupdate
2address fingerprint, when computable200, adoptadopt
3nothing matched201, new propertycreate

D26 · Who runs the pipeline?

Only the API, through a new PropertyUseCase.Sync. The panel always creates a new row — but still computes and stores the fingerprint.

Adoption means "this is the same flat under another name", which only makes sense when a ref explains it afterwards. A human clicking Add property means "make a new one". If the panel ran step 2 it would find the landlord's existing flat and return the old id with a 200 — the landlord believes they created a flat and has instead edited one, with nothing on screen to explain it.

Rejected: a boolean flag on Create (one function with two behaviours, and the existing tests would guard the wrong path); letting the panel adopt too (D33 stops hand-made duplicates instead).

D24 · What may a matched write overwrite?

A matched write patches — an absent key leaves the field unchanged. Only a new property takes a full replace. The panel's PUT is untouched.

PropertyUseCase.Update is PUT semantics: absent optional fields reset to zero (property.go:159). Applied to a matched write, that silently deletes the landlord's own work.

Rejected: honest PUT-replace requiring feeds to send complete records — silent data loss is then one missing field away, and most feeds send a subset.

A landlord's panel-built property has amenities, a building name and a size. Under full-replace a sync adoption blanks all three; under merge semantics the sync updates only the fields it sent and the rest survive. Full replace address · sent unit · sent amenities · wiped building · wiped size · zeroed 3 fields lost Merge on match address · sent unit · sent amenities · kept building · kept size · kept nothing lost
D24 · A sync adopts a flat the landlord built by hand, sending only type, address, postcode and unit. Left: today's PUT semantics. Right: merge on match.

What a source is (D22)

source is the namespace for refs. It decides whether two sync jobs share one ref or keep separate ones, so it has to be an identifier, not prose.

Shape
^[a-z0-9][a-z0-9_-]{0,31}$ — 1 to 32 characters
Normalize
lowercase before storing and before lookup
Pairing
all-or-nothing with external_ref; one without the other is a 400
Panel write
sends neither, writes no ref row

The normalizer (D19)

Lowercase, strip punctuation, collapse whitespace, then expand the common Malaysian road-type abbreviations. No fuzzy matching, no similarity threshold — a match is always explainable.

jln  -> jalan      lrg -> lorong
tmn  -> taman      bdr -> bandar
kg   -> kampung    psn -> persiaran
blok -> block      no. -> (dropped)

fingerprint = sha256(
    norm(building_name or address_line)
  + '|' + norm(unit_number)
  + '|' + postcode )

Unit forms normalize too: #12-3, Unit 12-3 and 12 - 3 all become 12-3. A landed property has no unit by nature, so an empty unit is legitimate there and the fingerprint is still computed. Only a high-rise missing its unit yields NULL.

Four ways the sync refuses instead of guessing

D18 states the principle — guessing is worse than missing — and four decisions apply it. Each returns a 409 that names the real problem, rather than writing something plausible.

  • ambiguous_match step 2 finds 2+ candidates for one landlord D27 409
  • unit_number_required same building + postcode, unit missing on either side D29 409
  • duplicate_address unique (owner_user_id, is_test, address_fingerprint) D33 409
  • listing_not_reopenable every listing on the property is terminal D21 409

D33 · One address per landlord, held by the database

A partial unique index on (owner_user_id, is_test, address_fingerprint), replacing the plain lookup index.

A write must recompute the fingerprint, or a property that changes address keeps hashing the old one forever. But recomputing lets one bad PUT give two rows the same fingerprint, and step 2 would then fire 409 ambiguous_match every night until a human noticed. Same owner, same building, same unit, same postcode is the same flat — a real invariant, so the database holds it rather than the application.

Rejected: an advisory fingerprint with application-side collision checks — a bad PUT then wedges a landlord's sync until someone investigates.

D21 · A sync never re-lists a flat

When every listing on a property is terminal, the API upsert returns 409 listing_not_reopenable and touches nothing.

uq_rental_listings_active_property only covers draft, pending_review and live. A rented row leaves the property with no active listing, so a naive upsert would create a fresh draft every night — re-listing an occupied flat, or undoing an admin rejection. Without a listing ref the sync cannot tell a stale replay of the old offer from a deliberate new letting.

Rejected: allowing re-creation from withdrawn only — withdrawn is no clearer than rented on that point. The panel rule is untouched: entity.AllowsNewListing (listing.go:140) still lets a human re-let.

Idempotency: one transaction, no bookkeeping

Recording the key after the work loses the race. A hung request retried with the same key runs twice: both look up the key, both miss, both create. Either two properties exist, or the unique index fires and one caller gets a 500.

D23 · The racing request blocks on the unique index until the first transaction ends. On commit it replays; on rollback its own insert succeeds and it owns the claim
D23 · The racing request blocks on the unique index until the first transaction ends. On commit it replays; on rollback its own insert succeeds and it owns the claim.
  1. Claim, then work — in one BEGIN

    INSERT INTO rental_idempotency (…) with resource_id still NULL, then the resolution pipeline, then an UPDATE filling resource_id and status_code before COMMIT.

  2. A different fingerprint is a conflict

    Same key, different canonical body → 409 idempotency_conflict, decided on the re-read after the unique violation.

  3. The body is hashed canonically, not byte-for-byte

    Decode into any, re-encode, hash that. encoding/json sorts map keys, so canonical form costs three lines. Otherwise an honest retry that reorders JSON keys would get a 409 and stop the sync.

  4. A purged resource re-runs rather than 404s

    SELECT … FOR UPDATE, delete the stale row, re-insert a fresh claim and run the pipeline — all inside the same transaction, so concurrent replays stay serialized.

What catches a blind retry on each of the ten routes
WriteWhat catches it
POST /propertiesref (step 1), fingerprint (step 2), else the unique index (D33) → 409 duplicate_address, or 409 unit_number_required (D29)
PUT /properties/:idexplicit id; merge semantics (D24) make a repeat a no-op
POST /listingsthe active-listing rule updates in place; terminal refuses (D21)
PUT /listings/:idexplicit id; identical data changes no state
POST /listings/:id/submitthe state machine — already pending_review → 409
POST /listings/:id/withdrawthe state machine

Test mode: a real sandbox, invisible to renters

Slice 1's BlockTestKeyWrites() made test keys read-only. It is removed here and replaced by row marking: is_test is taken from key_mode at creation, and a listing inherits it from its property.

Public marketplace

hidden
  • One line in publicScope adds l.is_test = FALSE
  • Protects PublicSearch, PublicGetBySlug, PublicAreas, PublicPropertyTypes
  • An integration test walks every public read path

Admin review queue

hidden
  • Humans never spend time approving fake flats
  • Which is why test submits self-approve (D32)

The landlord's own list

visible
  • Badged "test" in the panel
  • Otherwise the sandbox is useless to them

D32 · pending_review does not rest in test mode

Any transition landing in pending_review continues to live in the same transaction — covering both Submit and the rent demotion.

Two doors lead into pending_review, and listingTransitions offers no way out of either without an admin. A rent change is the door a sync walks through every night, so fixing only Submit would leave the sandbox dead at step two. The safety rail already exists: publicScope filters is_test = FALSE, so a live test listing is still invisible everywhere public.

Rejected: a separate admin queue tab for test rows (humans approving fake flats); a test-only approve route (breaks Slice 1's frozen ten-route contract); leaving the sandbox stuck (the spec would keep promising a rehearsal that does not exist).

Listing states. In test mode the approve edge fires automatically (D32); in live mode an admin must take it. Terminal states refuse an API re-list (D21) but still allow a human to create a new listing in the panel
Listing states. In test mode the approve edge fires automatically (D32); in live mode an admin must take it. Terminal states refuse an API re-list (D21) but still allow a human to create a new listing in the panel.

Purge (D28)

A sweep hard-deletes test properties after 30 days with no writes — aged by updated_at, not created_at, because a sandbox that syncs nightly for two months is in daily use.

The delete chain below a property. The two RESTRICT edges at the bottom raise an error, which in one batched statement would abort the whole sweep — that night and every night after, silently
The delete chain below a property. The two RESTRICT edges at the bottom raise an error, which in one batched statement would abort the whole sweep — that night and every night after, silently.
  1. Select candidates

    is_test, updated_at < now() - 30 days, and no tenancy reachable from any of the property's listings.

  2. Delete each one in its own transaction

    CASCADE clears photos, proofs, listings, refs and flags.

  3. A failure logs and the loop continues

    One bad row costs one row, not the whole sweep.

Cross-landlord duplicate flags

At property create or adopt, when the fingerprint matches a property owned by someone else, a flag is raised. Creation is never blocked. Test rows never raise flags — they are not real properties.

D25 · The publication hold is decided at submit time

Nothing is stored. The flag records the pair, and Submit checks every open flag where this property sits on either side, reading current verified proofs.

A boolean frozen at flag time records who happened to be verified that day. Proof verification is an admin action on its own schedule, and the flag row is directional — so a check reading only the newcomer's side would let two claimants both go live purely on ordering. Reusing ProofRepo.CountByProperty, which Submit already calls, costs one extra call of a shape already there.

Rejected: keeping the stored blocks_publication boolean — the hold would then depend on verification timing rather than on the facts at submit.

SituationOutcome
Neither side has verified proofboth publish, the flag is advisory
Only the other side has proofI wait — 409 duplicate_under_review
Only I have proofthe other side waits
Both have proofboth wait — a real dispute for an admin

An admin resolves a flag as cleared (the listing may proceed) or upheld (rejected or suspended). The review queue row gains an API badge when origin_channel = 'api' and a duplicate warning when an open flag exists on either side.

Schema

Changed columns

rental_properties gains six columns; rental_listings gains the same four origin and test columns. Every one has a default, so no existing row or caller breaks.

ColumnTypeWhy
unit_numberTEXT NOT NULL DEFAULT ''D18 — the fingerprint input that did not exist
address_fingerprintTEXT nullableNULL means not confident, never matched
is_testBOOLEAN NOT NULL DEFAULT FALSED16
origin_channelTEXT NOT NULL DEFAULT 'panel'panel | api | cli (D34)
origin_key_id, origin_key_nameTEXTwhich key created it

New · rental_property_external_refs

CREATE TABLE rental_property_external_refs (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  property_id   UUID NOT NULL REFERENCES rental_properties(id) ON DELETE CASCADE,
  owner_user_id TEXT NOT NULL,
  source        TEXT NOT NULL,
  external_ref  TEXT NOT NULL,
  is_test       BOOLEAN NOT NULL DEFAULT FALSE,
  created_at    TIMESTAMPTZ NOT NULL DEFAULT now(),
  updated_at    TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE UNIQUE INDEX uq_property_refs
  ON rental_property_external_refs (owner_user_id, source, external_ref, is_test);
CREATE INDEX idx_property_refs_property
  ON rental_property_external_refs (property_id);

owner_user_id is copied in rather than joined: lookups are always scoped to the caller, and the rule is "unique for this landlord", which a join cannot enforce. is_test is in the unique index on purpose — a landlord testing the exact payload they will later send live must be able to reuse the same external_ref in both modes.

New · rental_idempotency

CREATE TABLE rental_idempotency (
  id                   UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  api_key_id           TEXT NOT NULL,
  idempotency_key      TEXT NOT NULL,
  request_fingerprint  TEXT NOT NULL,   -- sha256(method|path|canonical(body))
  resource_type        TEXT NOT NULL,
  resource_id          TEXT,            -- filled before commit, once the outcome is known
  status_code          INT  NOT NULL,
  created_at           TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE UNIQUE INDEX uq_idempotency ON rental_idempotency (api_key_id, idempotency_key);
CREATE INDEX idx_idempotency_sweep ON rental_idempotency (created_at);

Rows are swept after 24 hours. Storing the outcome id rather than the response body (D15) means a replay never serves stale content, and no response bodies are kept. All ten v1 routes require APIKeyAuthMiddleware, so api_key_id is always present — panel writes never reach this table.

New · rental_duplicate_flags

CREATE TABLE rental_duplicate_flags (
  id                  UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  property_id         UUID NOT NULL REFERENCES rental_properties(id) ON DELETE CASCADE,
  matched_property_id UUID NOT NULL REFERENCES rental_properties(id) ON DELETE CASCADE,
  fingerprint         TEXT NOT NULL,
  status              TEXT NOT NULL DEFAULT 'open'
                      CHECK (status IN ('open','cleared','upheld')),
  created_at          TIMESTAMPTZ NOT NULL DEFAULT now(),
  resolved_at         TIMESTAMPTZ,
  resolved_by_user_id TEXT,
  resolution_note     TEXT
);
CREATE INDEX idx_dup_flags_open
  ON rental_duplicate_flags (property_id) WHERE status = 'open';
CREATE INDEX idx_dup_flags_open_matched
  ON rental_duplicate_flags (matched_property_id) WHERE status = 'open';

Indexes for matching

-- step 2, same landlord — unique, not just an index (D33)
CREATE UNIQUE INDEX uq_props_fingerprint_owner
  ON rental_properties (owner_user_id, is_test, address_fingerprint)
  WHERE address_fingerprint IS NOT NULL AND deleted_at IS NULL;

-- cross-landlord flagging
CREATE INDEX idx_props_fingerprint_global
  ON rental_properties (address_fingerprint)
  WHERE address_fingerprint IS NOT NULL AND deleted_at IS NULL;

-- keep test rows off the public path cheaply
CREATE INDEX idx_listings_public
  ON rental_listings (status) WHERE is_test = FALSE;

Contract changes

Property create and update accept three new optional fields. A panel call sends none of them and behaves exactly as today.

{ "source": "propertyguru",
  "external_ref": "PG-88213",
  "unit_number": "12-3",
  "address_line": "...", ... }

Responses add unit_number, origin_channel, is_test, and external_refs as a list of {source, external_ref}. PUT /properties/:id names the property explicitly, so it never matches — it records the ref against that id and nothing else.

The one behaviour change to document loudly

CaseBeforeNow
POST, new201201
POST, ref or fingerprint matched201, a duplicate200
POST, replayed idempotency key201, a duplicate200 with Idempotent-Replay: true

New error codes

Appended to the frozen table from Slice 1 §8.2. All are 409.

idempotency_conflict
same key, different canonical body
duplicate_under_review
an open cross-landlord flag, other side has verified proof
listing_not_reopenable
every listing on the property is terminal (D21)
ambiguous_match
step 2 found 2+ candidates (D27)
unit_number_required
weak match on a unit-less high-rise (D29)
duplicate_address
the fingerprint is taken for this landlord (D33)
duplicate_external_ref
the ref is bound to another property of this landlord

All decisions, and what each turned down

Slice 1's numbering continues. D17 is superseded by D25. D20 was dropped outright — uq_rental_listings_active_property already identifies a listing, so a listing ref would be a second name for the same thing.

D12–D36 · the full decision table
#DecisionChosen
D12Repeat POST with a known external_refUpdate in place, return 200
D13Fingerprint hit on the same landlord's propertyAlways adopt
D14Ref storageOne ref per source, in a side table
D15Idempotency recordsPostgres, store the outcome id, replay re-reads
D16Test rowsis_test column, filtered in the repository layer
D17Publication holdSuperseded by D25
D18Fingerprint inputsAdd unit_number; no fingerprint when not confident
D19NormalizerConservative plus Malaysian abbreviations
D20Listing external refsDropped. A listing's identity is its property's
D21Sync upsert when every listing is terminalRefuse: 409 listing_not_reopenable. Panel unchanged
D22Who defines sourceClient-declared, validated identifier. No enum, not key-derived
D23Idempotency write orderOne transaction. The unique INSERT itself blocks racers
D24What a matched write may overwriteMerge: absent key leaves the field unchanged
D25The publication holdEvaluated live at Submit, on both sides
D26Who runs the pipelineAPI only, via PropertyUseCase.Sync
D27Step 2 finds two or more candidates409 ambiguous_match, no mutation
D28Test-row purgeOne transaction per property, age by updated_at
D29High-rise with no unit on either sideWeak match: 409 unit_number_required, never adopt
D30Existing rowsBackfill fingerprints for landed properties only
D31Replay hashing and stale outcomesCanonical JSON; a missing resource re-runs in the same transaction
D32Test mode and pending_reviewNever a resting state; it continues to live
D33One address per landlordPartial unique index; 409 duplicate_address
D34Namingorigin_source → origin_channel
D35Audit of an adoptionA distinct adopt action. No new table, no UI
D36Idempotency-KeyOptional. It buys clean replays, not duplicate prevention
Rejected alternatives · recorded so nobody re-proposes them
#RejectedWhy
D21Allow re-creation from withdrawn onlyWithout a listing ref the API cannot tell a stale replay from a deliberate new letting
D22A fixed enum of source namesProduct policy, and none exists in the repository
D22Derive source from api_key_idKey rotation would orphan every ref and the next sync would rebuild the set as duplicates
D23Record the key after the work succeedsLoses the race: two requests both miss, both create
D23Separate reservation transaction with in_progress, expiry and takeoverA status column, an expiry rule and a sweep, for a case plain rollback already handles
D24Honest PUT-replace, requiring complete recordsSilent data loss is one missing field away, and most feeds send a subset
D25Keep the stored blocks_publication booleanThe hold would depend on who happened to be verified the day the flag was born
D26A boolean flag on CreateOne function with two behaviours; existing tests would guard the wrong path
D26Let the panel adopt tooA human clicking Add would silently edit an old row. D33 stops hand-made duplicates instead
D27Pick the oldest candidateA guess between two identical rows. D18 says guessing is worse than missing
D28One batched DELETE with a NOT EXISTS guardAn unexpected RESTRICT still aborts the whole sweep, then fails every night, silently
D29Relax D18, fingerprint high-rises on building + postcode aloneReopens the overwrite hole D18 exists to close
D30Backfill condos by parsing the unit out of address_lineFree-text parsing is the fuzzy matching this design forbids
D31Keep the byte-exact body hashAn honest retry that reorders JSON keys would get 409 and stop the sync
D31Return 410 Gone when the resource is purgedCorrect in theory, useless to an unattended sync with no human to read it
D32Show test rows to admins in a separate queue tabReal people spending time approving fake flats
D32Add a test-only approve routeBreaks Slice 1's frozen ten-route contract for one rehearsal step
D32Leave the sandbox stuck, scope it to writes onlyThe spec would keep promising a rehearsal that does not exist
D33Keep the fingerprint advisory, check collisions in app codeOne bad PUT then wedges a landlord's sync every night until someone investigates
D34Keep origin_source and document the differenceTwo fields called "source" in one JSON object stay confusing forever
D35Rely on update plus actor_type = api_keyProves a key wrote the row, not that a match happened — and the match is what can go wrong
D36Require Idempotency-Key on every writeBuys no correctness once D33 exists, and breaks casual curl use

Evidence the decisions rest on

Read from the repository on 2026-09-22. Each row is a fact a decision above depends on — several contradicted the spec's first draft.

FactEvidenceUsed by
The active-listing unique index covers draft, pending_review, live only — four statuses are unguardedmigrator_rental.go:180-182D21
AllowsNewListing lets a human re-list once only terminal rows remainlisting.go:140D21
All ten v1 routes require APIKeyAuthMiddleware, so api_key_id is always setv1_routes.go:44-72D23
PropertyUseCase.Update is full-replace, and an address change forces reviewproperty.go:159-183D24
Submit already calls CountByProperty, which counts verified, live proofslisting.go, ports.go:154-159D25
listingTransitions offers no EventSubmit out of pending_reviewlisting.goD32
Two RESTRICT edges sit below a property: payment records and handover reportsmigrator_rental.go:619, :829D28
The audit action column is plain TEXT NOT NULL, no CHECKmigrator.go:2864D35
The request context carries api_key_id, api_key_name, actor_type, key_mode — but no source conceptapi_key_auth_middleware.go:152-156D22, D34

Foundations reused, not rebuilt

One active listing per property
a unique partial index already enforces it, so listings need no ref
publicScope(ctx)
a single choke point for all public reads — a one-line test-row filter
ProofRepo.CountByProperty
already counts verified proofs; the publication hold introduces no new concept
Cross-landlord rows read as 404
application.EnsureOwner's rule; mode isolation follows it exactly
ADR-0002 audit triggers
keep their rows even after a hard test-row delete

Tasks

Tasks 4–8 are the spine. Tasks 9–12b are the sandbox and the replay path. Tasks 13–15 are the fraud guard. Task 16 is the only frontend work.

All 21 tasks with their verification method
#TaskVerify
1Re-record the rental test baselinenumbers written down
2Migration: property and listing columns, landed fingerprint backfill (D30)migration test
3Migration: refs, idempotency, flags tables, unique fingerprint index (D33)migration test
4unit_number on PropertyInput, entity, repositoryunit
5Address normalizer and ComputeAddressFingerprintunit
6Refs repository, source validation (D22) and lookupunit
7Resolution pipeline in a new PropertyUseCase.Sync (D26, D27, D29), merge on match (D24), adopt audit action (D35)unit
8Listing upsert via the active-listing rule, terminal refusal (D21)unit
9Idempotency claim in the write transaction (D23) and sweepunit, integration
9bTest-row purge, per-property transactions (D28)integration
9corigin_source → origin_channel rename, drop top-level source (D34)golden
10is_test propagation and mode isolationunit
11publicScope and admin queue filtersintegration
12Remove BlockTestKeyWrites; pending_review continues to live in test mode (D32)integration
12bCanonical-JSON fingerprint and stale-replay re-run (D31)unit, integration
13Duplicate flag creation (pair only, no stored decision)unit
14Submit live hold check on both sides (D25)integration
15Admin resolve endpoint and queue badgesintegration
16Panel: unit field with a prompt on any high-rise missing one, test badge, duplicate warningrender tests
17rental-v1.yaml and golden re-pin; document Idempotency-Key as replay ergonomics (D36)golden
18End-to-end two-source syncintegration

Testing expectations

Fifty-one tests across unit, integration, migration and golden. Integration tests follow the existing recipe: pg-test on :55432, migrations run from a directory with no .env, because backend/go/.env points at UAT.

WhatKindFails when
Normalizerunit, table-drivenJln and Jalan produce different hashes
NULL fingerprint without a unitunita high-rise with no unit gets a hash
Resolution orderunitthe fingerprint runs before the ref lookup
Concurrent same-key requests (D23)integrationtwo properties appear, or one caller gets a 500
Rolled-back write frees the key (D23)integrationa failed write blocks the same key forever
Key order does not change the fingerprint (D31)unita reordered retry returns 409
Replay after the resource is purged (D31)integrationa successful request replays as 404
Merge on match keeps panel data (D24)integrationadoption wipes amenities, building name or size
Panel create never adopts (D26)unita panel create returns an existing property id
Two candidates refuse (D27)unitone is picked, or a third row is created
Weak match refuses, never adopts (D29)unita unit-less condo is adopted or duplicated
Backfill skips colliding fingerprints (D33)migrationthe unique index fails to build on real data
Terminal listing is not re-created (D21)integrationa rented property gets a new draft from the sync
Test rent change returns to live (D32)integrationthe sandbox dead-ends after one demotion
A live test listing stays invisibleintegrationany public read path returns it
Hold works on the matched side too (D25)integrationthe older property publishes while the newcomer is held
Purge clears every dependent row (D28)integrationphotos, proofs, listings, refs or flags survive their property
One failing property does not stop the sweepintegrationa RESTRICT row wedges the whole job
Every write route is duplicate-proof without a key (D36)integrationany route creates a second row on a blind retry
Public JSON shapegoldennew fields are missing or renamed

Risks and the known limit

RiskMitigation
A bad PUT wedges a landlord's sync with permanent ambiguityThe fingerprint is unique per landlord in the database (D33), so the ambiguity cannot be created
A fingerprint false hit overwrites a real propertyNULL fingerprint when not confident (D18); per-source refs make step 2 rare; no fuzzy matching
A first sync duplicates an existing portfolioLanded rows backfilled (D30); unit-less condos refuse with 409 unit_number_required (D29)
A fingerprint miss creates a duplicatePer-source refs mean repeat syncs never reach the fingerprint; the admin flag catches cross-landlord cases
The purge wedges on one bad row and stops foreverPer-property transactions, failures logged and skipped (D28)
A test row reaches the public marketplaceSingle choke point in publicScope; an integration test walks every public read path
The publication hold stalls a real landlordApplies only when the other side has a verified proof, re-read at submit time (D25); admin can clear it
Two writers disagree about the address and fight nightlyNot solved in this slice. Merge on match (D24) stops phantom changes; a real disagreement needs field-ownership rules
A normalizer change silently re-buckets existing rowsFingerprints are recomputed only on write; a normalizer change needs a deliberate backfill, not in this slice
POST changing from 201 to 200 breaks an early integratorv1 has no external consumers yet; documented in rental-v1.yaml before any are onboarded

Out of scope

Photo and media sync of any kind, proof upload over the API, outbound webhooks, and the CLI. These are Slices 3 to 5. Landlord-visible adoption history is also excluded — the adopt audit row (D35) is enough to answer the question after the fact, and task 16 is already the only frontend work in this slice.