Price Tracking Service
Design price history and threshold alerts for products collected from merchant pages or feeds.
Clarify this prompt before choosing components
Ask the highest-impact questions first, agree on priorities, and record the interviewer’s answers. If a detail is unspecified, state an assumption and explain which decision depends on it. The numbers in this worked lesson are exercise assumptions, not company facts.
| Ask the interviewer | Why the answer changes the design |
|---|---|
| Current price, history or threshold alerts? | They need distinct observation and notification contracts. |
| Currency, shipping, variants and retailer rate limits? | An offer identity and comparable normalized price must be defined. |
| Out-of-order observations and repeated threshold crossings? | Revision/event ordering and alert identities prevent false or duplicate alerts. |
Use the Interview Playbook for the shared 45-minute sequence and fresher, intermediate, senior and staff evidence. Start with one complete operation. Extend the answer with the failure/recovery traces below, then defend a workload-specific alternative and a measurable rollout. Scope and evidence matter more than a large component list.
Price Tracking Service: Understand the building blocks
Choose a mechanism because it satisfies a requirement. These explanations describe the exercise design, not undisclosed implementation choices at the named company.
Price Tracking Service: Quick vocabulary
| Term | Meaning and role in this exercise |
|---|---|
| API: Application Programming Interface | The contract for requests, responses and errors between components. An API route does not itself enforce every business invariant. |
| PK: Primary Key | The declared row identity in a database schema; it does not automatically enforce every cross-row business rule. |
Price Tracking Service: Durable work queue and backpressure
What it means: A queue separates accepted work from execution. Backpressure limits admission or consumption when downstream capacity is finite.
Why this problem needs it: Repeated merchant fetches need bounded work and host budgets.
How to use it: Persist a stable job identity, consume with bounded concurrency, acknowledge after the required durable transition, and cap retries/backlog according to policy.
Example in this design: Delay excess due polls rather than allowing a scheduler burst to overwhelm a merchant.
When it fits: Useful for asynchronous work that must survive worker failure or absorb a finite burst.
Alternative and limits: A synchronous call is simpler for short bounded work. A queue does not create capacity, strict global ordering or exactly-once external effects.
Price Tracking Service: Event time, watermark and windows
What it means: Event time is when an event happened; arrival time is when it reached this processor. A window defines the interval grouped for computation, and a watermark expresses progress under a lateness policy.
Why this problem needs it: Price observations need a time/order meaning independent of late arrival.
How to use it: Bind each event to its window identity, deduplicate under a declared horizon, and emit allowed revisions or reject/quarantine events past the finality boundary.
Example in this design: An older 95 observation arriving after a valid 75 does not falsely rearm an 80 threshold.
When it fits: Useful when delayed delivery should not silently move activity into the wrong reporting period.
Alternative and limits: Processing-time windows are simpler if arrival time is the intended business meaning. A watermark is not proof no older event can ever arrive.
Price Tracking Service: Idempotency key and stored operation result
What it means: Idempotency means replaying the same logical operation produces no additional business effect. A key identifies that operation under a defined scope.
Why this problem needs it: Threshold notification retries must not create repeated business crossings.
How to use it: Atomically associate a request key and payload fingerprint with its effect and result. Return the stored result on replay; reject incompatible payload reuse.
Example in this design: Replay crossing T7 once; delivery attempts retain their own effect identity.
When it fits: Needed when a timeout can hide a successful commit or a queue can redeliver.
Alternative and limits: Unique business identities can enforce selected effects. A cache of recent requests alone may expire too early or race; local keys cannot control an uncooperative external provider.
Price Tracking Service: Server-Side Request Forgery (SSRF)
What it means: SSRF occurs when an attacker causes a server to fetch a destination it should not reach, such as internal or metadata services.
Why this problem needs it: Imported product URLs are untrusted fetch targets.
How to use it: Validate normalized destinations and resolved addresses, enforce outbound network restrictions, and recheck redirects/resolution under the chosen policy. Bound bytes, time and decompression.
Example in this design: A redirect to an internal address fails the fetch policy rather than becoming a price sample.
When it fits: Required for crawlers, imported URLs or any untrusted server-side fetch target.
Alternative and limits: Fetching only a trusted allowlist is simpler. Blocking one URL string does not protect against redirects, alternative address forms or resolution changes.
Interview scope and guarantees
Track selected products across merchants, retain observations, let users set alert thresholds, and notify when a qualifying change occurs. A scraped price is an observation, not a guarantee that checkout will honor it. Currency, shipping and availability need explicit treatment.
Capacity worksheet
Assume 10 million product offers refreshed every 6 hours: 40 million fetches/day, about 463/s. At 2 KB per observation, full retention adds 80 GB/day. If 1% of offers change and each has 100 watchers, one round can generate 10 million evaluations; fanout requires batching and deduplication.
Concrete API contract
POST /watches {offerId,targetPrice,currency}
GET /offers/{id}/history?from=...
DELETE /watches/{id}
Internal observation {offerId,fetchId,price,currency,observedAt}Data model and access paths
offers(id PK,merchant_id,variant_key,url,currency,shipping_minor,current_observation)
observations(offer_id,observed_at,fetch_id,amount_minor,currency,shipping_minor,availability,parser_version); UNIQUE(offer_id,fetch_id)
watches(id PK,user_id,offer_id,threshold_minor,rule_version,armed,cooldown_until,enabled)
alert_keys(watch_id,rule_version,transition_id); UNIQUE(watch_id,rule_version,transition_id)Evolve a solution and explain each change
Read the diagram
Save watches / Store a canonical product/variant and an explicit threshold rule. / A page title alone can identify the wrong size or seller.; Collect observations / Schedule bounded source fetches and normalize currency, availability, and price components. / Cached pages and parser changes can look like genuine price drops.; Emit threshold transitions / Version observations and create unique alert intent on eligible crossings. / Repeated below-threshold polls can spam the user.
Step 1: Save watches
Store a canonical product/variant and an explicit threshold rule. A page title alone can identify the wrong size or seller.
Step 2: Collect observations
Schedule bounded source fetches and normalize currency, availability, and price components. Cached pages and parser changes can look like genuine price drops.
Step 3: Emit threshold transitions
Version observations and create unique alert intent on eligible crossings. Repeated below-threshold polls can spam the user.
Responsibility overview
Read the diagram
Watcher to Watch API: define watch rule; Watch API to Observation DB: persist watch; Fetch worker to Merchant: fetch exact variant; Fetch worker to Observation DB: validated observation; Observation DB to Alert queue: unique threshold intent; Alert queue to Watcher: notification dispatch
Worked end-to-end scenario
A user watches a blue size-M item below 50 dollars. A fetched page advertises a 40-dollar price for size S, while size M remains 70. The observation must identify the variant before evaluating the rule. A valid later observation is 45 with shipping excluded under the user’s stated contract. Transition the watch from above to below threshold and record one alert intent for that observation/rule version. Retries reuse the alert identity. If the price stays below 50 for an hour, do not send a new alert at every poll. Define when recovery above the threshold re-arms the watch.
Why these access paths matter
Use canonical product, merchant, variant, currency, and observation time as explicit dimensions. Index watches by product for batch evaluation and schedules by next eligible fetch. Keep raw parser evidence and parser version for debugging false drops. Alerts are keyed by watch, rule version, and qualifying transition; a notification provider needs its own retry identity.
Build the baseline first
Read the diagram
Merchant fetch → parser validation → price observation; Price transition → watch evaluation → notification intent; History query → time-ordered observations
- Merchant fetch → parser validation → price observation.
- Price transition → watch evaluation → notification intent.
- History query → time-ordered observations.
Evolve the design under load
Read the diagram
Merchant queues → adaptive refresh priority; Offer-key events → batched watcher evaluation; Cold history → compressed time partitions
- Merchant queues → adaptive refresh priority.
- Offer-key events → batched watcher evaluation.
- Cold history → compressed time partitions.
Defend the hardest decision
Compare normalized offer identity, currency and total-price definition before declaring a drop. A parser accidentally reading installment price instead of total price can trigger a mass false alert. Validate plausible bounds, markup changes and missing fields. Trigger on a defined state transition such as above-to-below threshold, with hysteresis or cooldown to avoid repeated alerts around one boundary.
Failure and recovery analysis
A fetch completes twice after retry and emits two low-price events. Deduplicate by fetch ID and use a unique watch/transition alert key. Out-of-order observations should remain in history without replacing a newer current price. A merchant outage must not become a zero price; represent unknown separately from available and unavailable.
Security and privacy boundary
Respect merchant access policies, validate URLs against SSRF, and avoid storing user contact information in scraping jobs.
Interview follow-ups with reasoning
Question: How do you choose refresh frequency?
Show answer and explanation
Answer: Prioritize watched volatile offers within merchant rate budgets.
Question: How do you handle currency conversion?
Show answer and explanation
Answer: Preserve source currency and conversion timestamp, and distinguish converted estimates.
Question: How do you repair bad observations?
Show answer and explanation
Answer: Version corrections and suppress or explain affected alerts.
Operate and verify the design
Fetch freshness, parser anomaly rate, alert dedup hits and unknown-price fraction.
Replay a low-price observation and then an older high-price observation; verify current state and alert count.
A second scenario to test transfer
A product is observed at $49 at 10:00 and $39 at 10:10. A rule at $40 triggers once for the 10:10 observation. If the event is replayed, the unique rule/observation pair suppresses another alert. A delayed 10:05 observation arriving at 10:12 may add history but cannot replace the 10:10 latest projection.
A late $45 observation arrives after a $39 observation. What updates, and should the $40 alert fire again?
Show answer and explanation
Answer: Persist the late observation with its actual timestamp if valid, but keep $39 as latest because its observation time is newer. Do not trigger the same threshold alert again for the older record. Key alert delivery on rule and observation identity and define whether a later price rise and fall creates a new alert cycle.
Compare alternatives
| Decision | Reason | Failure to handle |
|---|---|---|
| Offer identity | Comparable variants and currency | False price comparisons |
| Append observations | Auditable history | Duplicate/reordered samples |
| Adaptive scheduling | Spend fetch budget usefully | Stale long-tail products |
| Alert idempotency | Avoid repeat messages | Rule edit during delivery |
A design-changing exercise
A merchant parser suddenly reports zero. Should every watcher be alerted?
Show answer and explanation
Answer: No. Validate extraction and availability, quarantine implausible observations, and preserve evidence. Missing or failed parsing is not a zero-price sale.
Design workshop: threshold transitions, not every cheap poll
Core scope is exact-variant offers, price history and user threshold alerts. Purchasing is excluded. Choose high-priority refresh within 15 minutes under a bounded fetch budget, retain observation provenance and send one alert per eligible crossing. A title match does not establish the same size, seller, currency or shipping policy.
Offer identity includes merchant, canonical product/variant key, seller and currency. An observation stores item amount, shipping, tax inclusion policy, availability, observedAt, fetchedAt, fetch ID and parser version. Compare a user's chosen comparable total; do not silently compare item-only dollars with shipping-inclusive euros. Missing/unavailable price is not zero.
The public API is GET /products/{id}/history?from=…&to=…, PUT /subscriptions/{productId} and authenticated POST /observations for collectors. Thresholds are integer minor units in the offer currency. A subscription cannot quietly compare USD with EUR; any conversion needs a separately versioned FX observation and timestamp. A collector identity comes from service authentication, not a caller-provided trusted=true field.
Refresh intervals are allocated from watcher count, recent volatility and merchant request budgets. For a planning assumption, one million offers polled hourly needs about 278 fetches/s; polling all of them every 15 minutes needs 1,111/s. If a merchant budget allows 80 requests/s, that budget can refresh at most 80×900 = 72,000 offers per 15-minute interval, or 7.2% of this catalog. It cannot safely promise that freshness for every offer. Reserve capacity for watched and volatile offers, shard by merchant then offer, and let low-interest items age while keeping their staleness visible.
Model Offer(id, merchant, variant, seller, currency, taxPolicy), PriceObservation(id, offer, source, eventTime, fetchTime, confidence, amount, shipping, availability, parserVersion), Subscription(id, user, offer, threshold, currency, ruleVersion, armed, cooldownUntil), and AlertIntent(subscription, ruleVersion, transitionId, state). UNIQUE(offer,fetchId) deduplicates collection retries; UNIQUE(subscription,ruleVersion,transitionId) deduplicates alert creation. Keep raw evidence separate from the latest-price pointer, threshold index, and chart buckets so all three projections can be rebuilt.
Read the diagram
Serve permitted product/variant response under merchant request budget; Verify collector identity, parser version and exact offer mapping; Check currency, tax/shipping policy, availability and plausible price bounds; Quarantine anomalous sample or append immutable validated evidence; Advance current-price pointer only by event-time ordering rule
A watch has rule_version, threshold, armed and cooldown_until. Choose this policy: alert when an armed valid latest price crosses below the threshold; disarm on that alert; rearm only after a subsequent valid latest price is strictly above the threshold and cooldown expires. At exactly threshold, <= fires while descending, but equality never rearms. A newly created watch arms only when its current comparable price is already above its threshold; without a known above-threshold baseline it waits for one before it can alert. Rule edits increment version and initialize armed from the chosen edit policy.
BEGIN;
SELECT * FROM watches WHERE id=:watch FOR UPDATE;
-- Verify enabled, current rule version, comparable latest observation,
-- armed=true, price<=threshold, and cooldown elapsed.
INSERT INTO alert_keys(watch_id,rule_version,transition_id)
VALUES (:watch,:version,:crossing) ON CONFLICT DO NOTHING;
-- Only if newly inserted: disarm watch, set cooldown, insert outbox.
COMMIT;Observation insertion deduplicates unique(offer,fetch_id). Update latest only when event time/tie policy is newer; delayed history must not roll the latest pointer back. The threshold transaction uses a locked current latest identity. A delayed old $39 cannot trigger after a newer $45 merely because its fetch finished later.
Read the diagram
Observation order / Watch state / Alert; 10:00 $49 / Armed / None; 10:10 $39 / Disarm; cooldown until 11:10 / One crossing alert; 10:20 $38 / Still disarmed / No repeat alert; 11:20 $45 / Rearm after cooldown / None; 11:30 $39 / Disarm again / New crossing identity; second alert
Read the diagram
Insert validated $39 observation and crossing under rule v3; Queue alert key watch/v3/crossing7; User disables watch or edits to rule v4; Deliver old v3 task; Recheck enabled and applicable rule policy; Suppress stale task or disclose its original rule; no silent reinterpretation
Corrections preserve the original observation and add a referenced correction version. If a sent alert was based on a parse error, mark the evidence corrected and send a correction only under an explicit notification policy; it cannot be unsent. Do not rearm solely because a stale corrected record changes history.
Schedule by volatility, watchers and desired freshness under merchant-specific request budgets. Persist parser failures separately from genuine price changes; repeated selector failures back off and mark the offer stale. A merchant health monitor samples known variants and flags abnormal price/availability shifts before spamming users. History stores raw observations for a defined horizon and daily min/max/last summaries afterward; a daily average alone loses threshold evidence.
The polling budget is separate from notification throughput: cap alert-intent evaluation and provider sends independently, then measure each queue's lag. These workloads and parser limits are exercise assumptions, not observed merchant rates.
Use a per-offer ordered threshold index keyed by (threshold_minor, watch_id). For a current total moving from 49 dollars to 39 dollars, query only thresholds in [39,49): a 40-dollar watch is eligible, while 39 dollars fires at equality and 49 dollars is excluded because it was already at the boundary. Page matching watch IDs in bounded batches and key each transition by (watch_id, rule_version, observation_id). A worker retry therefore repeats the same durable intent instead of generating another message. Partition evaluation by offer ID so changes for one offer stay ordered while unrelated offers proceed.
Read the diagram
Range-scan thresholds in [new_total, previous_total); Return at most 500 watch IDs and a continuation cursor; Lock each watch; recheck enabled, rule version, armed and cooldown; Insert unique watch/rule/observation intent with state change; Continue bounded batches until the indexed range is drained
Chart reads should not scan and return an unbounded observation history. Keep raw points for the detailed retention window; for wider ranges aggregate by the requested time bucket and return min, max, last and availability counts. A daily average can hide a short-lived threshold crossing, so keep daily min/max/last even after raw samples expire. Reject or coarsen requests whose bucket count exceeds the response point limit; never silently truncate the time range.
Read the diagram
Query range / Representation / What it preserves; Recent narrow range / Raw time-ordered observations / Fetch provenance and every price point; Multi-day chart / Hourly min/max/last buckets / Intraday threshold crossings within the bucket; Long history / Daily min/max/last plus count / Daily extremes and latest known price; Oversized chart request / Reject or choose coarser buckets / Explicit bounds; no silent range truncation
Final topology and invariants
The offer key and validated append-only observations are authoritative. The latest-price pointer, threshold index and chart buckets are derived and rebuildable. An observation with a newer event time advances the pointer and drives one ordered watch evaluation; an older observation stays in history only. Alert intent creation and watch disarm/cooldown update share one transaction. Delivery retries carry the same intent key and recheck the current watch rule before sending.
Read the diagram
Path / Responsibility and bound / Edge / Invariant; Collector intake / Authenticate, validate, append one fetch identity / Sync append; return accepted ID / Exact offer and price policy match; Latest projection / Advance event-time pointer per offer / Async ordered worker / Delayed samples stay history only; Watch evaluation / Indexed threshold scan in batches of 500 / Async transaction and outbox / One intent per watch/rule/transition; History API / Raw points or bounded min/max/last buckets / Sync capped query / Currency and availability remain explicit
Failure trace: anomalous sample, replay and threshold oscillation
Assume a 40-dollar watch is armed after a valid 49-dollar observation. A parser suddenly reads 3.90 dollars: quarantine it and leave the current pointer and watch untouched. After an operator reviews and approves the evidence, append it once and create one crossing intent. Replaying the same fetch ID creates no second alert. A later 45-dollar observation rearms only after cooldown; another 39-dollar observation creates a new transition ID. Values equal to 40 trigger when descending, but equality alone never rearms. A delayed older 49-dollar sample cannot rearm or replace the current 39-dollar point.
Read the diagram
Submit anomalous $3.90 with a new fetch identity; Quarantine evidence; keep valid $49 latest and watch armed; Corrected valid $39 arrives; append once and advance latest; Create one alert key for watch/rule/observation and disarm atomically; Replay the same fetch; dedupe by offer/fetch identity; Retry same intent; provider delivery key prevents a second send; Late $49 event has older observedAt; retain history only, no rearm
Operations and practice
Measure collector fetch freshness by priority tier, parser quarantine rate by parser version, observation-to-latest lag, anomalous-price review age, threshold-evaluation backlog, indexed watches scanned per transition, alert-intent creation lag, provider delivery lag, duplicate suppression rate, and unknown/unavailable-price share. Overload controls include per-merchant fetch budgets, adaptive refresh tiers, bounded parser workers, threshold batches, capped notification throughput and chart point limits. Recovery pauses a faulty parser version, retains raw permitted evidence, replays validated observations in event-time order, rebuilds latest pointers and chart buckets, then resumes threshold evaluation from a checkpoint without resending existing intent keys. Restrict collector registration, parser rollout, anomaly approval and watch access to audited roles. The dominant variable costs are merchant requests, retained observation storage and notification fan-out; raw-history horizon and refresh tier must fit those budgets.
Practice prompt: Design price history and threshold alerts for one million offers and a 15-minute priority freshness target. Explain exact offer identity, an authenticated collector, an anomalous scrape, a large watcher fan-out and a multi-year chart query.
Failure follow-up: A delayed $49 observation arrives after a $39 observation triggered a $40 watch, while the same low-price message is retried. What changes?
Rubric: Strong answers keep the $39 event-time latest pointer, retain the delayed $49 sample as history only, deduplicate by offer/fetch ID and watch/rule/transition ID, and leave the watch disarmed. They state that $40 fires on descent but does not rearm; a newer valid price strictly above $40 after cooldown is required. They quarantine the parser anomaly, distinguish unknown from zero, batch indexed thresholds, and bound chart resolution.
The executable reference model is examples/system-design/price_tracking.py; focused edge cases are in tests/test_price_tracking_model.py. It models exact offer matching, authenticated or corroborated source evidence, anomaly review, event-time latest state, threshold batches, cooldown/rule edits, delivery checks, and chart aggregation. It uses an in-memory lock to make the state transitions readable; a deployed service needs transactional storage and an outbox.
Exercise: $39 at 10:10 triggers, then a late $45 from 10:05 arrives. Should the watch rearm?
Show answer and explanation
Answer: No. Append valid history but keep the newer latest $39 and disarmed state. Rearming requires a newer qualifying latest observation under the cooldown rule.
Requirement trace and verification
| Requirement | Implementing design block | Verification link |
|---|---|---|
| R1 — Complete the primary user journey within the stated scope. | P01–P04; P09–P10. | V1 — Exercise the successful journey and the excluded/boundary case stated in the scope. |
| R2 — Preserve the problem's authoritative data invariant under concurrency. | P05–P06; P11–P12; DD1. | V2 — Run the race/replay case below and assert the invariant at the durable authority. |
| R3 — Meet the declared scale and API behavior without unbounded work. | P05–P08; P13–P14; relevant overload deep dives. | V3 — Exercise the API errors/retry identity and recompute the workload assumption that drives partition or capacity. |
| R4 — Recover from the named failure without losing or duplicating the user-visible outcome. | P15–P16; deep dives; Operations contract. | V4 — Inject an anomalous report, replay a price change, and oscillate around the threshold; alert behavior follows the documented transition rule. |
Operational contract
| Area | Decision and signals |
|---|---|
| SLIs | Observation freshness/confidence; threshold-transition lag; duplicate alert intent rate; anomalous-source rate. |
| Overload limits | Cap collector polling, observation storage, subscription fanout batches, and alert provider queues. |
| Recovery | Recompute affected product windows from append-only observations; dedupe transition intents and reconcile provider outcomes. |
| Access controls | Authenticate collectors, distinguish trusted sources, and protect user subscription/notification preferences. |
| Dominant cost | Merchant polling/provider calls and historical price retention. |
Senior-level interviewer follow-ups
Question: A merchant changes markup and the parser reports a price ten times lower. Should an alert fire?
Show answer and explanation
Answer: Validate parser version and price plausibility before changing the canonical observation. Quarantine anomalous samples, retain raw evidence, and expose the parser failure rather than treating it as a real crossing.
Question: A price crosses a threshold, rises, then crosses again while delivery retries are pending. How do you deduplicate?
Show answer and explanation
Answer: Persist an alert transition with rule version and crossing identity in the same transaction as its outbox record. Rearm and cooldown policy determine whether a later crossing is a new alert.
A 60-second design answer
I would identify a comparable product variant and currency, store versioned observations with source and parser provenance, and evaluate threshold crossings as state transitions. An alert transition and outbox insert are atomic; provider retries use a stable delivery identity. Parser anomalies are quarantined. I would monitor scrape freshness, parse failure, false crossings, alert lag, and duplicate delivery.
Related concepts to revisit
Technical references
PostgreSQL transaction isolation and concurrent updates.
Compare trustworthy observations before notifying
For SKU s7 in one currency, observed prices are 50 at time 1, 40 at time 2 and 45 at time 3. A delayed 55 from time 0 does not become the current price simply because it arrived last. Subscription q7 has threshold 42; the valid time-2 drop creates one alert identity, and a replay does not send it twice.
observations: t1=50, t2=40, t3=45; late t0=55
current by applicable event order: 45
threshold 42: crossing at t2 -> alert q7/observation2
replay observation2 -> same alertRead the diagram
observations: t1=50, t2=40, t3=45; late t0=55; current by applicable event order: 45; threshold 42: crossing at t2 -> alert q7/observation2; replay observation2 -> same alert
Verify SKU/variant/currency and provenance. An untrusted extension report can be a candidate for verification, not automatic commercial truth. Hysteresis/cooldown controls repeated noisy crossings; define whether returning above threshold rearms an alert. Time-series storage/rollups retain suitable extrema so chart aggregation does not hide the meaningful drop.
Show answer and explanation
Answer: A current 45 does not erase the historical valid drop to 40. Current-value projection and alerting history need distinct identities and ordering semantics.
Decision review: Price Tracking Service
Price Tracking Service: What it is
A price tracker records qualified observations for a product variant and notifies a watch on declared threshold transitions.
Price Tracking Service: Why it is needed
Localized currencies, parser failures, duplicate fetches and older observations can create false or repeated alerts.
Price Tracking Service: When to use it
Use validation and quarantine when scraped data is uncertain; define product, seller, variant, currency and timestamp scope before comparing values.
Price Tracking Service: How to use it
Persist observation identity and ordering policy, qualify suspicious changes, update the latest applicable observation without regression and emit an idempotent alert for an eligible watch transition.
Price Tracking Service: Compare an alternative
Periodic polling is simple but limits freshness and consumes retailer budget. Push/change feeds can improve timing where supported but still require qualification and identity.
Price Tracking Service: Worked decision exercise
The following inputs and policies are original exercise assumptions; they are not measurements or undisclosed company behavior.
A watch threshold is 80. Price moves from 100 to a validated 75, generating transition T7. Replaying that observation should not create T8. A delayed price of 95 predating the 75 observation cannot rearm the watch as if it were a current rise.
Read the diagram
Watch threshold 80; qualified price drops 100 to 75; Create one transition T7; Replay of the same observation does not notify twice; Older price 95 cannot rearm the latest watch state
What should happen when a markup change produces a parsed price of zero?
Show answer and explanation
Answer: Quarantine it under the source-validation policy instead of sending an automatic sale alert. A real zero-price offer is possible but needs qualified evidence. Define rearm/hysteresis rules so threshold oscillation has the intended notification behavior.
Price Tracking Service: Check the design
Monitor qualified versus quarantined observations, source parser changes, stale-update rejection and alert identity. Test duplicate low prices and delayed high prices.