Public viewer
The journey of every round
Every round-trip in the corpus is public. Open one to see the prompt, the zero-point index, the baseline response, the enhanced response, and how each grader read the difference. Leave a comment if a grader's reading lands — or doesn't.
Author a pytest test module that verifies a class whose attribute lookup runs through __getattr__ for missing names. Use a @pytest.fixture to construct the instance under test and a second fixture with scope="module" for shared setup. Inside one test, use the monkeypatch fixture to replace os.environ entries for the duration of the test; inside another test, use unittest.mock.patch as a context manager to swap a method implementation. Assert behaviour with pytest.raises against a custom exception class and confirm the descriptor protocol still routes correctly through __get__ on a property.
Define a Python decorator factory called trace_calls that returns a wrapper preserving the original function via functools.wraps so the __name__ and __doc__ attributes survive. The wrapper should log every call with logging.getLogger before delegating. Stack this decorator above functools.lru_cache with maxsize=128 on a recursive Fibonacci function and confirm the cache hit path still produces the trace entry. Separately, register a functools.singledispatch generic that formats int, list, and dict arguments differently, and decorate each registered overload with trace_calls. Use typing.Callable for the parameter annotation.
Write an async function fetch_all that takes a list of URLs and concurrently fetches each one using async def coroutines and the await expression. Bound parallelism with asyncio.Semaphore set to 5 concurrent tasks. Schedule the work via asyncio.gather and collect results as a list of tuples (url, status, body). Use asyncio.wait_for to apply a per-request timeout that raises asyncio.TimeoutError on deadline. Launch the top-level coroutine with asyncio.run inside the main guard. Annotate the return type with typing.List and typing.Tuple.
Implement an iterator class RingBuffer that exposes the __iter__ and __next__ methods to walk a fixed-capacity circular buffer of integers. Store the underlying state as a @dataclass with frozen=True for the capacity field and a separate mutable list for the contents. Expose __len__ for the len builtin and __contains__ for the in operator. Raise StopIteration when iteration completes one full lap. Add type hints using typing.Iterator and typing.Optional. The class should behave correctly under isinstance checks against collections.abc.Iterator.
Write a Python script that uses pathlib.Path to walk a directory tree, calls path.glob on the pattern "*.log" recursively, reads each file with path.read_text, and extracts HTTP status codes using re.compile and re.finditer with a named capture group. Aggregate the counts into a dict keyed by status code, then emit the result via json.dumps with indent=2 to stdout. Guard the script body with an if __name__ == "__main__": block so the helper functions remain importable from other modules. Raise a clear exception if no log files match.
Owner-occupier lives in the ground-floor flat of a converted Victorian house in Bristol and lets the upper two floors on a single AST to a couple plus their adult son and one lodger of the son — four occupiers over two floors above the owner. The owner argues this is a "resident landlord" arrangement excluded from HMO definition. Does HA 2004 section 254(2) HMO definition still capture the upper-floor letting?
Landlord served Form 6A Section 21 on 3 February 2025 for a tenancy that began 5 October 2023. The gas safety certificate covering the period from 5 October 2023 was carried out on 2 October 2023 but was only handed to the tenant on 12 February 2025 alongside the s21 notice. Is the s21 valid given the Trecarrell-line authorities on late provision of the gas certificate?
Tenancy began 12 June 2023 on a 12-month fixed term; rolled periodic in June 2024; landlord served a Form 6A Section 21 on 8 April 2025 expiring 9 June 2025. The How to Rent guide given at sign-up was the January 2020 edition (current edition at service of notice was March 2023). Does the outdated How to Rent guide invalidate the Section 21?
On 14 March 2025 my landlord handed me a one-page note saying "vacate by 14 May 2025"; the AST started 1 September 2023 and rolled to a statutory periodic in September 2024, rent paid monthly on the 5th. The note is not on Form 6A. Can a court accept this as a valid Section 21 notice if the landlord later issues accelerated possession proceedings?
A small charity is being asked whether to publicly support a local council's proposed selective licensing scheme covering two wards with high private-rental turnover; the scheme would require landlords to pay a £750 five-year licence fee per property. Landlord groups in the area argue the cost will be passed to tenants as rent increases; tenant groups argue it will improve management standards. Setting aside legal validity of the scheme designation, what is the policy case for and against selective licensing on disrepair / management outcomes, and where does the evidence base sit?
Tenant pays a £1,100 deposit on a private tenancy of a flat in Belfast on 1 September 2023; landlord (based in London) holds the deposit personally and has not registered it with any scheme. Tenancy is now ending. Tenant has read English-law guidance about three-times-deposit compensation under the Housing Act 2004. What regime governs deposit protection in Northern Ireland and what remedies are available to the tenant there?
Tenant has a private residential tenancy of a flat in Glasgow that commenced 1 February 2024 at a rent of £950 pcm. The landlord (resident in Edinburgh) wrote on 2 April 2025 saying "I am serving Section 21, you have two months to leave". The tenant rents in Scotland; the letter cites English statute. Which regime governs and what notice is required to recover possession of a private residential tenancy in Scotland?
The annual gas safety check at a flat let from June 2023 was carried out on 18 May 2024 and a CP12 issued the same day. The next check was carried out on 1 June 2025 — 14 days outside the 12-month anniversary window. Landlord wants to serve a section 21 notice in July 2025. Under regulation 36 of the Gas Safety (Installation and Use) Regulations 1998 and the section 21A / Deregulation Act 2015 line of authority, does the late check defeat the s21?
The environmental health officer at a local authority assessed mould in a child's bedroom at a privately rented flat and recorded it as HHSRS Category 2 hazard band E for damp and mould growth under the Housing Health and Safety Rating System (England) Regulations 2005. Landlord says "Cat 2 means no enforcement action is required". Tenant has a four-year-old asthmatic child. Under sections 5 and 7 of the Housing Act 2004, what enforcement options does the council have on a Category 2 finding and what factors guide the choice?
The First-tier Tribunal (Property Chamber) determined the premium for a statutory lease extension at £28,500 on 14 January 2025. The freeholder applied for permission to appeal on 14 February 2025 on the basis that the FTT applied an outdated deferment rate. The leaseholder has separately incurred £6,400 in valuation and legal costs. Under section 60 LRHUDA 1993 and the relevant Upper Tribunal authorities, can the leaseholder recover any of those costs from the freeholder?
A leaseholder of a flat with 71 years unexpired is considering a statutory lease extension. Marriage value comes into play below 80 years unexpired. The freeholder has offered an informal extension of 90 years at peppercorn for £22,000, payable now, with no s42 notice required. Leaseholder is weighing the informal route against the statutory route under LRHUDA 1993. What are the substantive legal and procedural differences between the two routes and where do the binding protections sit?
Leaseholder of a one-bed flat in a converted house in Brighton acquired the leasehold on 1 March 2018 with 84 years then unexpired (current unexpired term 79 years as at the proposed claim date 1 May 2025). Leaseholder served a section 42 notice under the Leasehold Reform Housing and Urban Development Act 1993 on 1 May 2025; the freeholder has counter-noticed with a premium of £36,000. Leaseholder's valuer puts the premium at £14,500. What is the position on (a) the threshold to claim and (b) the route to challenge the premium?
A landlord charges the tenant £75 described on the contract as a "default fee for late payment of rent" each time rent is more than three days late. Rent is £950 pcm. The landlord has applied this fee five times in 2024-2025. Tenant now disputes the charges as prohibited payments under section 1 of the Tenant Fees Act 2019, arguing the contractual interest rate prescribed by schedule 1 paragraph 4 is the binding cap. What is the legal position on default fees of this shape?
Landlord took a £450 holding deposit from a prospective tenant on 14 April 2025 for a property at £1,500 pcm in Reading. The deadline for agreement was 28 April 2025. The tenant pulled out on 25 April 2025 after the landlord disclosed (on 24 April 2025) that the property has an outstanding HMO licence application not yet granted. Landlord is refusing to return the holding deposit citing "tenant default". Is the holding deposit retainable under schedule 2 of the Tenant Fees Act 2019?
Letting agent in Liverpool is requiring prospective tenants to pay £225 described on the invoice as "tenant referencing fee, including credit-check and right-to-rent verification". Tenancy commenced 1 May 2025. Tenant paid the £225 in cash on 8 April 2025. Is the £225 a prohibited payment under schedule 1 of the Tenant Fees Act 2019 and if so what is the consequence?
A landlord wants to recover possession of a property the landlord lived in before letting and intends to live in again after recovery. The Ground 1 prior-notice was given at the start of the original two-year fixed term in March 2022; the tenancy then renewed by a fresh fixed-term AST in March 2024 without a fresh Ground 1 notice. Landlord served a section 8 notice citing Ground 1 in February 2025. Does the original Ground 1 notice carry across the renewal or is fresh service required?
Landlord served a section 8 notice citing Ground 14 (nuisance / annoyance to neighbours) supported by three witness statements: a neighbour, the housing officer and a noise-abatement report from the local authority dated November 2024. The tenant has a documented mental health condition and the local authority's Adult Social Care team is engaged. The judge at first hearing made directions for medical evidence. How should the discretionary stage under section 9A Housing Act 1988 weight Equality Act 2010 reasonable-adjustment considerations against the proven nuisance?
Tenant of an AST in Coventry fell into rent arrears reaching £2,100 by 12 March 2025 (rent £700 pcm, three full months unpaid). Landlord served a section 8 notice on 14 March 2025 specifying grounds 8, 10 and 11. By the possession hearing on 25 April 2025 the tenant has paid down arrears to £1,200 (under two months at the hearing date but above two months at service). Must the court grant possession under Ground 8 or does the post-service repayment defeat the mandatory ground?
Applicant is 28 weeks pregnant with no other children, single, fleeing domestic abuse from her partner; she presented to a London borough on 11 April 2025. Council accepts she is homeless and eligible but is taking the position that priority need under section 189(1)(a) Housing Act 1996 only attaches "from the date of birth or 29 weeks gestation". Applicant relies on the gestational-stage caselaw. Is the council's interpretation of priority need defensible?