Files
lancedb/rust
Jonathan M HsiehandClaude Opus 5 9d26cc42cf docs(secrets): say why the code is as it is, not what it replaced
Comments that explained a decision by naming what came before it read as
changelog rather than rationale, and they age badly: a reader who never saw the
earlier shape learns nothing from being told it existed. This is a new surface,
so every comment here now states the property that holds today.

  - `RemoteCreateFunctionRequest` said a literal "is why `secret_bindings`
    silently stopped reaching the service". It now says what the struct buys:
    the compiler decides what reaches the service, and a new field on the
    registration request is a build error here until it is handled.
  - Wire-omission comments that appealed to clients predating Secrets or
    namespaces now state the rule itself -- a binding states a namespace only
    when it has one, a body carries a binding list only when there is one.
  - `BodyLogging::Allowed` described logging "as every request did before
    Secrets existed", which is really the default: a body is diagnostic unless
    the call that built it says otherwise.
  - `a_version_without_bindings_keeps_the_original_wire_shape` named a shape no
    longer worth referencing. Both the Rust and Python tests now name the
    property they check -- absent decodes as an empty list, and an empty list
    serializes back to absent.

Comments that cite the Table and Function conventions are kept. Those describe
what the code sits beside today, which is the reason a reader needs.

Tests: lancedb secret unit tests 7, `first_class_function_slice1` 9,
`first_class_function_slice2` 3, 93 Python tests across both slices.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UfmeJ533rQDnPBkMtjerV6
2026-09-15 19:29:09 +00:00
..