diff --git a/ai/prompt-io/opencode/20260825T021319Z_ce430fca_prompt_io.md b/ai/prompt-io/opencode/20260825T021319Z_ce430fca_prompt_io.md new file mode 100644 index 00000000..3516e5c2 --- /dev/null +++ b/ai/prompt-io/opencode/20260825T021319Z_ce430fca_prompt_io.md @@ -0,0 +1,32 @@ +--- +model: openai/gpt-5.6-sol +service: opencode +session: d9d7df2c-7044-463f-8768-ec024718eac9 +timestamp: 2026-08-25T02:13:19Z +git_ref: ce430fca +scope: code +substantive: true +raw_file: 20260825T021319Z_ce430fca_prompt_io.raw.md +--- + +## Prompt + +Continue PR #481 review remediation after committing provisional child +registration clarifications. The human selected "keep" for inlining the +guarded `functools.Placeholder` lookup with a walrus assignment. + +## Response summary + +Remove the standalone placeholder assignment and bind the optional +Python 3.14 sentinel directly in the existing conditional while +preserving compatibility behavior. + +## Files changed + +- `tractor/to_actor/_api.py` - inline placeholder feature detection. + +## Human edits + +The human explicitly selected "keep" after receiving keep/defer/drop +options for this isolated cleanup. No direct source-line edits were made +by the human. diff --git a/ai/prompt-io/opencode/20260825T021319Z_ce430fca_prompt_io.raw.md b/ai/prompt-io/opencode/20260825T021319Z_ce430fca_prompt_io.raw.md new file mode 100644 index 00000000..dca3b452 --- /dev/null +++ b/ai/prompt-io/opencode/20260825T021319Z_ce430fca_prompt_io.raw.md @@ -0,0 +1,19 @@ +--- +model: openai/gpt-5.6-sol +service: opencode +timestamp: 2026-08-25T02:13:19Z +git_ref: ce430fca +diff_cmd: git diff HEAD~1..HEAD +--- + +Implement the approved PR #481 review cleanup for Python 3.14 partial +placeholder detection. + +> `git diff HEAD~1..HEAD -- tractor/to_actor/_api.py` + +Inline the guarded `functools.Placeholder` lookup into the existing +condition with a walrus assignment, preserving fallback behavior when +the attribute is unavailable. + +Run partial/placeholder normalization tests and the full `to_actor` +suite. diff --git a/tractor/to_actor/_api.py b/tractor/to_actor/_api.py index d26a163b..b145f3a0 100644 --- a/tractor/to_actor/_api.py +++ b/tractor/to_actor/_api.py @@ -116,13 +116,14 @@ def _normalize_call( # `functools.Placeholder` was added in Python 3.14. Drop # this `getattr()` guard once 3.14 is the minimum version. - placeholder = getattr( - functools, - 'Placeholder', - None, - ) if ( - placeholder is not None + ( + placeholder := getattr( + functools, + 'Placeholder', + None, + ) + ) is not None and any( arg is placeholder