tractor/tests/msg
Gud Boi e100d06732 Move ctx state into `ContextStatus`
Make `Context._status` the single store for outcome, cancellation
and handshake state. Migrate internal callers and existing test
assertions directly, without descriptors or duplicate fields.
Keep policy and live resources on `Context`.

Deats,
- Add shallow-frozen fault metadata in `ContextCancelReason`,
  delivered via Trio's public cancellation reason API. Preserve
  the first cancelling fault when the recorded error changes.
- Distinguish local transport/protocol faults from boxed remote
  failures; type-check self-cancel acknowledgements before reading
  remote-error metadata.
- Move `._final_result_is_set()` onto `ContextStatus` and migrate
  its five production callers plus the existing stream assertion.
- Retain the human's `._scope_tn` rename and add status-only reprs.

Keep public APIs, including the deprecated `.result()` wrapper.
New status regression tests follow in their own commit.

Prompt-IO: ai/prompt-io/opencode/20260919_context_fault_status.md

(this patch was generated in some part by `opencode`
using `gpt-6-astra` (`openai`))
2026-10-30 13:13:37 -04:00
..
__init__.py Add `tests/msg/` sub-pkg, audit `pformat()` filtering 2026-03-12 18:32:31 -04:00
conftest.py Add `tests/msg/` sub-pkg, audit `pformat()` filtering 2026-03-12 18:32:31 -04:00
test_ext_types_msgspec.py Use `aid.uid` over manual `(name, uuid)` tuples 2026-06-27 21:38:30 -04:00
test_namespace_path.py Move `NamespacePath` ref test into `tests.msg` 2026-08-24 23:49:09 -04:00
test_pldrx_limiting.py Move ctx state into `ContextStatus` 2026-10-30 13:13:37 -04:00
test_pretty_struct.py Drop unused import noticed by `copilot` 2026-03-13 11:52:18 -04:00