Repository navigation
Type the remaining thread lookups and delete their constructor re-checks - #3744
Merged
Merged
Conversation
Closes plan phase id128_nominal/root_ids (RootIdsPhase). On main only one of its grep hits was left: pi_rule_gate.py:102. Thirteen more lookup annotations sit under names the phase pattern cannot see (owner_lookup, sender_lookups); they carry the same kind, so they change with it. Retyped to ThreadLookup by one codemod (14 annotations in 7 modules). None of them changes what goes on the wire: every one is a parameter, or AttemptStart (never encoded), or the NativeInputRecord parent annotation, which all three stored subclasses already override with ThreadLookup. Deleted by hand, each already a typed value at its boundary: - CurrentExecutions.__post_init__ owner_lookup checks. Field typed at coordination_tables/executions.py:231; written at participant_store.py:76 from `lookup: ThreadLookup`; stored rows decode through FieldCodec. - ExecutionRecord.__post_init__ owner_lookup loop. Field typed at coordination_tables/executions.py:346; written at execution_store.py:106 from the parameter typed here, fed by selected_participant.py:57. - AttemptRecord.__post_init__ owner_lookup entry. Field typed at coordination_tables/attempts.py:183; written at attempt_start.py:99 from ExecutionRecord.owner_lookup. - OwnerFence.__post_init__ owner_lookup entry. Field typed at owner_fence.py:33; sole constructor attempt_start.py:41, from AttemptStart.owner_lookup, whose sole constructor is selected_turn.py:125 passing participant.lookup (selected_participant.py:57). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trissim
enabled auto-merge
October 30, 2026 20:48
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: 3 phase greps 1/0/0 to 0/0/0. 14 annotations retyped in 7 modules (1 the phase pattern sees, 13 it cannot). 4 constructor re-checks deleted. 22 lines added, 33 removed. No wire, schema or stored-row change.
Plan phase:
id128_nominal/root_ids(RootIdsPhase). Earlier nominal PRs had already cleared nearly all of the plan's 127 sites, so the phase's own remainder on main was one line.Grep counts (
git grep -nE PATTERN -- src ':!src/agent_comms/skills/', base d6084cb)\b(wire_root_id|root_id|lookup|recipient_lookup): (str\b|Id128\b|Annotated\[(str|Id128)\b)pi_rule_gate.py:102)Id128Text\.decode\((self\.)?(owner\.)?(wire_root_id|root_id|lookup)\)FieldCodec\.decode\(Annotated\[str, *Id128Text\]\w*(root_id|lookup)\w*annotatedstr,Id128,Annotated[str|Id128,Optional[str,list[str],tuple[strWhat changed
Same kind under names the phase pattern cannot see, so retyped with it (one codemod, not committed):
pi_rule_gate.py:102typed_by(lookup)pi_rule_gate.py:96require_recorded().lookup, typed atregistry_provenance.py:90attempt_start.py:30AttemptStart.owner_lookupselected_turn.py:125-128participant.lookup, typed atselected_participant.py:57coordination_response.py:109resolve_retained(owner_lookup)coordination_response.py:266(recipient_lookup, typed at:205,:231),attempt_recovery.py:305(incarnation.lookup)execution_store.py:41,:54create,create_after_triageselected_participant.py:94,selected_turn.py:263,selected_triage.py:137, allparticipant.lookupnative_input_record.py:203,207,344,358native_runtime_input.py:222,261, fromtranscript_sources.py:642self.recipient.lookupnative_input_record.py:452NativeInputRecord.owner_lookupThreadLookupby all three stored subclasses:native_runtime_input.py:277,historical_native_inputs.py:54,native_prompt_binding.py:58bus.py:400,411,bus_tables.py:65,104sender_lookupsgoal_management.py:247,goal_waits.py:207,pi_rule_gate.py:106, allincarnation...lookupWire: nothing here changes what is encoded. Each retype is a parameter, or
AttemptStart(never passed to FieldCodec), or the parent annotation every stored subclass overrides. No env, stored-file or older-runtime path produces these values. No installer wire record is touched, so older workers read the same bytes.What was deleted
Each was a check on a field already declared
ThreadLookup; a value that passed the decode is 32 hex, so non-empty and bounded said nothing further.CurrentExecutions.__post_init__owner_lookupchecks, and the three imports they left unusedcoordination_tables/executions.py:231; writtenparticipant_store.py:76fromlookup: ThreadLookupExecutionRecord.__post_init__owner_lookuploopcoordination_tables/executions.py:346; writtenexecution_store.py:106from the parameter typed hereAttemptRecord.__post_init__owner_lookupentrycoordination_tables/attempts.py:183; writtenattempt_start.py:99fromExecutionRecord.owner_lookupOwnerFence.__post_init__owner_lookupentryowner_fence.py:33; sole constructorattempt_start.py:41, fromAttemptStart.owner_lookupBehaviour change, stated: a directly constructed row holding an empty or over-long plain
strlookup no longer raises in__post_init__. Only tests construct these with raw text (test_s3_legality_behavior.py:222,test_optional_awareness_projection.py:324), and neither asserts that refusal. No table DDL changes.Left alone, on purpose
acp_extension.py:643wire_root: strholds a filesystem path (thread_configuration.py:27str(self.root.resolve())), not aRootId.wake_policy.py:93,122FieldCodec.decode(ThreadLookup, lookup)arefrom_wireboundaries; the one decode stays.Callers I could not prove
native_runtime_input.py:210,229,257andexecution_store.py:67takeowner_lookupwith no annotation. I traced their callers by hand; mypy does not check these parameters, and no grep will catch one going wrong.Checks run
tests/test_s3_legality_behavior.py tests/test_coordination.py: 76 passed.ruff --select F,I: per-file counts equal main's on all 10 files.coordination_response.py:232twice,:239) are unedited code.Overlap
Open PRs #3566, #3670, #3614, #3616 and #3607 touch
bus.py,bus_tables.pyornative_input_record.py. The plan's "no phase edits files of an open PR" dates fromdfc7d8976and named #2914. None of the diffs I could read edits these annotation lines (#3566, #3670, #3616, #3607); #3614's diff is too large for the API, so it is unchecked.🤖 Generated with Claude Code