Repository navigation
pricing: Market check, our prices against a live store through FB Connect - #145
Merged
Merged
Conversation
…able Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
…ire tests Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
… walk Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
The run called fetchWithAuth with its default 10 second timeout, so a cold FB Connect run was aborted and cancelled the server's batches. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
…r tiles Falls back to the first catalogue products when the route is absent; the SKU prefix assumption is gone, and the page says which source it used. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
Without the counter tiles the pick is the six fixed length boards (all three board fields set, not random length) with the most available, then the first catalogue products when there are none. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
…r, 8 to 16 feet Engineered wood (LVL) has fixed length and large stock but is not dimensional lumber: nominal thickness 2, width 4 to 12, length 8 to 16 feet, not random length, then the six with the most available. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
…, dial guard, changed address, small ones) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
…, dial guard, a changed address clears the id, the small ones The server's 15 second write timeout cut a run that waited longer on the flow: the run now sets its own response deadline past one batch. The stored address and id are re-validated at run time, the client refuses link local, unspecified and multicast addresses (and private ones for a public name) at dial time, a changed address clears the saved id, one run at a time per caller, and the price is the counter's own expression. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
…dmin tab link, contract and docs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: colton <colton@futurebuild.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 112 c. A Market check screen under Pricing: the dealer picks SKUs and runs a check; Gable's server calls the FB Connect pricing flow by its webhook with the yard and the items, and the screen shows our price, the competitor's title and price, the difference and position (recomputed here, never the flow's), and a suggested price that keeps the margin floor.
Server (
core/internal/marketcheck)GETandPUT /api/v1/admin/market-check/settings(admin, owner; machine key scopeadmin:settings): address, sealed write only webhook id (enc:v1:with the payment vault, refused in words with no vault key), flow name, store label, id and ZIP, band and margin floor percents. The id is never answered.POST /api/v1/pricing/market-check(admin, owner; the pricing rules' walls): one to twelve distinct products, batches of three, four at once, no redirects, 1 MB answer cap, fixed failure words, untrusted rows cleaned, link allowlist, our own figures, integer cents rounding written once (compute.go). Cost is never sent or answered. Neither the id nor the address reaches a log line, an error, an audit row or a response.docs/integrations/MARKET-CHECK-FLOW.md.Desk
/pricing/market-check(link on the Pricing page) with the pick chips, search, run states, summary line and table; Tech Admin gains a Market check tab with a write only webhook id (Saved, Replace, Clear).Tests
httpteststub of the flow and a real Postgres wire test (sealed at rest, roles, pool of four with three contenders); Vitest for the screen states and the card.🤖 Generated with Claude Code