A robot log review can store complete records while ordering them by one numeric field. In Python, a key function makes that arrangement convenient, but the search and insertion interfaces do not accept the same kind of probe. Passing a whole record into a search that expects an extracted key can fail before the review reaches its intended timestamp boundary.

This article isolates that interface difference with an executed Python 3.14.7 fixture. The records and tick values are fictional, unitless examples. They do not represent robot timestamps, delivery deadlines, measured latency, or a recommended control setting. The purpose is to keep record objects and comparison keys visibly separate.

Declare the two domains

The fixture starts with three dictionaries in ascending tick order: A has tick 10, B has tick 30, and C has tick 50. Each dictionary has exactly an id and a tick field. A separate candidate dictionary X has tick 40. The ordering function accepts one record dictionary and returns its tick field.

That creates two distinct interfaces in the proposed application. The record domain contains dictionaries with identifiers and tick fields. The key domain contains the integers 10, 30, 40, and 50. A function that extracts a key from a record is meaningful for the first domain; comparing the extracted integers is meaningful for the second.

Check the documented asymmetry

The Python bisect reference says the key function is applied to sequence elements during a bisect search, but not to the search argument x. Its insort description gives a different contract: the key function is applied to the candidate for finding its position, while the original candidate is inserted.

Those rules answer a practical call-site question. A search through record dictionaries needs a probe already expressed in the key domain. An insertion through the matching insort interface needs the record that should become a new list element. Using the same variable name for both arguments can conceal the difference.

Execute a search with an extracted key

The first fixture call uses bisect_left with the original records, the integer 40, and the tick-extraction function. It returns zero-based index 2. The original list remains A, B, C because this call only finds a position.

The fixture also records which identifiers the key function receives. X does not appear in the search-call trace. That observation supports the narrower claim that the supplied integer probe was not passed through this record-extraction function during this run. The exact comparison trace is retained as evidence rather than proposed as a portable performance guarantee.

The index identifies where a tick-40 record could be inserted under the declared ordering. It does not establish that a tick-40 record already exists. The application can keep its usual separate membership or range-selection decision after resolving the argument-domain issue.

Replay the whole-record mistake

A second call passes the candidate dictionary itself as the bisect_left probe, leaving the record-extraction function unchanged. On the tested runtime, that call raises TypeError when an extracted integer is compared with the dictionary probe. No insertion is requested, and the source list stays unchanged.

This failure is specific evidence from the declared dictionary-and-integer fixture. It is not a claim that every incorrect probe type must raise the same exception. Custom objects could implement comparisons and produce a plausible position while still expressing the wrong application meaning. A successful call is therefore insufficient proof that the probe belongs to the intended key domain.

Insert the record through the insertion interface

The third call makes a shallow copy of the original list and passes candidate X to insort_left with the same extraction function. The resulting identifiers are A, B, X, C. The inserted element is the same candidate dictionary object, not the integer 40.

The recorded insertion trace begins by applying the key function to X. An identity check confirms that the list retains the original candidate at index 2. These checks distinguish computing a comparison key from replacing the stored object with that key. The original list is still A, B, C because only its copied list was modified.

Read the implementation without overstating the test

The inspected CPython 3.14 Python source makes the distinction visible. Its keyed insort_left path computes key(x), calls the search with that extracted value, and then inserts x. The keyed search compares a key extracted from a sequence element against the supplied probe.

The same source imports accelerated implementations when available. The local fixture executed the installed standard-library functions; it did not force execution of the displayed pure-Python definitions. The source inspection explains the interface design, while the saved local outputs establish what the installed runtime actually returned for these inputs.

Keep the wrapper contract visible

A proposed log-review wrapper can name its inputs record and tick_probe, instead of accepting a generic value for both operations. Its search path extracts the candidate's tick explicitly when the caller starts with a record. Its insertion path retains the complete record and delegates the ordering step to insort_left.

That naming decision does not validate the key itself. The proposed wrapper still needs a declared policy for missing tick fields, incompatible types, and records whose key changes after insertion. This fixture avoids those cases by using complete dictionaries with unchanged integer fields, so its results do not certify a broader import policy.

Preserve a useful review receipt

For this replay, the receipt retains the original record order, candidate contents, probe value and type, extraction-field name, returned index, exception class, final order, and object-identity check. Those details explain why one search succeeds and the other fails without relying on an unexplained screenshot of a sorted list.

The practical correction is small but precise: a keyed search receives the comparison key, while keyed insertion receives the record to store. Keeping that boundary explicit prevents a log-review helper from accidentally treating every API with a key parameter as though it transforms every argument in the same way.

Sources checked November 18, 2026:

Python Software Foundation, Python 3.14 bisect reference, displayed as 3.14.10 on access:

https://docs.python.org/3.14/library/bisect.html

CPython maintainers, Python 3.14 Lib/bisect.py inspected on the check date:

https://github.com/python/cpython/blob/3.14/Lib/bisect.py

The fixture, wrapper proposal, receipt design, and analysis are original T-800 editorial work. No robot software, production log, or concurrent collection was operated.

Illustration: an AI-generated concept separates a numeric search probe from a complete inserted record. It is not a screenshot of a deployed log-review application.