Skip to content

mcp(docs[_utils]): Document CallerIdentity fields - #105

Merged
tony merged 2 commits into
mainfrom
attributes-backfill
Jul 26, 2026
Merged

mcp(docs[_utils]): Document CallerIdentity fields#105
tony merged 2 commits into
mainfrom
attributes-backfill

Conversation

@tony

@tony tony commented Jul 25, 2026

Copy link
Copy Markdown
Member

CallerIdentity carried a class docstring but no per-field descriptions, so autodoc rendered its fields bare in the API reference (a NamedTuple in the same position renders as "Alias for field number 0"), leaving readers to guess which $TMUX / $TMUX_PANE component each field holds and what its None sentinel means for the caller-on-server checks. This adds a NumPy Attributes section naming the source environment variable field and the meaning of an unset value for each. Docstrings only — no code, signature, or field-order changes.

Gates run and passing: just ruff-format, just ruff, uv run mypy ., just test, just build-docs.

The docs build now emits duplicate-object warnings for the four documented fields (duplicate object description of libtmux_mcp._utils.CallerIdentity.<field>, other instance in reference/api/utils). The NumPy preprocessor emits an .. attribute:: for each entry while autodoc also renders the field, so both register the same object. The build still succeeds. Left unsuppressed here deliberately — the fix belongs in gp-sphinx and is being handled there rather than by adding a suppress_warnings entry to docs/conf.py.

Closes #104

@codecov-commenter

codecov-commenter commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.13%. Comparing base (82e23de) to head (e862fb5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #105   +/-   ##
=======================================
  Coverage   86.13%   86.13%           
=======================================
  Files          46       46           
  Lines        3593     3593           
  Branches      516      516           
=======================================
  Hits         3095     3095           
  Misses        354      354           
  Partials      144      144           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony
tony force-pushed the attributes-backfill branch from 40886f4 to b34679e Compare July 26, 2026 00:57
tony added 2 commits July 25, 2026 20:20
why: Undocumented dataclass fields render in the API reference as
"Alias for field number 0" or bare names, leaving readers to infer
what each part of the parsed $TMUX/$TMUX_PANE identity means and
what its None sentinel implies for the socket comparisons.

what:
- Add a NumPy Attributes section to CallerIdentity covering the
  socket path, server pid, session id, and pane id
- Record which environment variable field each value comes from and
  what an unset value means for caller-on-server checks
why: The unreleased entry did not record that class fields now carry
descriptions where the API reference renders them.

what:
- Note the described fields under Documentation
@tony
tony force-pushed the attributes-backfill branch from 6809941 to e862fb5 Compare July 26, 2026 01:22
@tony
tony merged commit b4d2aef into main Jul 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Attributes for dataclass fields rendered bare by autodoc

2 participants