Repository navigation
booking.com: return the house rules in get_property - #142
Merged
Merged
Conversation
yummybomb
marked this pull request as ready for review
October 28, 2026 16:49
…get_property read some
…he 20 KB bound test covers
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.
Summary
get_propertyalready read Booking.com's house-rules section, but returned only the check-in and check-out times from it. It now also returnsproperty.house_rules: every section in page order, each with its title as the page shows it and its text lines. That covers pets, accepted payment methods and cash, children and extra beds, age restriction, smoking, parties, quiet hours and groups, so an agent can answer "does this hotel allow pets / take cash" without leaving the tool.no_availabilityandno_rate_for_party, which already returnproperty. A page without a house-rules section gives[]; a section the tool cannot split into rows givesnull, so a markup change is not mistaken for "no rules". Rows that include neither Check-in nor Check-out (every property lists both) also givenull.<hr>separator, so the parser doesn't depend on how deep the list sits and a separator inside a row's content is not taken for one.no_availabilityandno_rate_for_partyoutputs;property.house_rules_truncatedsays when anything was left out.check_in_timeandcheck_out_timeare unchanged.Status
get_propertyisverifiedon this source (325e0ae). Independent QA on 2026-10-29, signed out in plain Kernel browsers started on the Booking.com home page:search_staysthenget_propertyat Palacio Ramalhete returned all nine house-rules sections, including "Pets are not allowed.", the card logos as American Express, Visa and Mastercard next to "Cash is not accepted", and the crib row as one line, untruncated.booking-house-rules, 5 pairs per model, low thinking: Haiku 5.5 treatment vs control correct 5/5 vs 5/5 (1.2x faster), GPT-6 Luna 4/5 vs 2/5. Every treatment trial that gotget_propertyoutput answered correctly (9 of 9); Luna's one treatment miss never got output from the tool.nulland truncated paths are covered by fixtures only, and signed-in sessions were not tested.Tests
&in a title, an inline link, child policies, crib and extra-bed rows, card logos, and "Cash is not accepted". A second test coversno_availabilityand a page with no section. The existing property test now expectshouse_rulestoo.null).no_availabilitypage (output stays under 30 KB,house_rules_truncatedtrue). The separator test also covers rows split on a separator inside a row (null), a single-age crib row and a two-offer age row.<hr>instead of the shallowest, returning[]instead ofnull, dropping the en dash and restoring the 300-character cut each fail at least 1 test. So do dropping the Check-in/Check-out check, the multi-offer grouping, "years old", the byte bound, the section cap and the line-truncation flag.node --test "tests/*.test.mjs": 4489 pass.node scripts/validate-registry.mjs: 295 tools valid.Live check (author, not independent QA)
Run on the first revision; the follow-up commits were not invoked live as a tool. The final parser was run against house-rules sections captured from 38 live property pages (23 Lisbon, 15 Orlando): every page has Check-in and Check-out rows at one separator depth, none was truncated,
house_ruleswas 0.8–1.9 KB, and the single-age and two-offer crib rows (5 pages) came out as one line each.Registered on a Kernel browser and invoked from the Booking.com home page for six Lisbon properties, 2 adults, Dec 7–9. Every call returned
ok, and each section matched the page:house_rulesadded about 1.2–1.4 KB to each output.Follow-up
The bench intent
booking-house-rulesmoves fromgaptoinspectin this PR, sinceget_propertynow answers it. booking.com needs a new gap intent that no tool covers.