Repository navigation
refactor(complexity): phase 6 — the conversion surfaces - #318
Merged
Merged
Conversation
Sixth phase of the complexity plan (#312): seven functions under the thresholds by behavior-preserving decomposition. goReceiver.dispatch (65) becomes named dispatch phases over two carrier types — parameterLayout (classification) and routedArgs (argument routing) — via classifyParameters, routeArgs, unpackNamed, fillNamedSlots, fillVariadicSlot, and fillKwargsSlot, the activation/invoke tail untouched. toStarlarkReflect (31) extracts its struct arm; toGoInto (38) extracts toGoScalar behind an isScalarKind predicate plus toGoSliceTarget; toNaturalGo (16 gocyclo) its sequence/dict projections. envValue.ConvertTo (26) extracts parseScalarEnv; Convert (18 gocyclo) its steps-1-2 direct paths as convertDirect with the hot-path commentary preserved; IsTruthy (19 gocyclo) its scalar switch. Incident disclosed in the plan notes: a blind text-slice corrupted converter.go mid-phase; recovered by restoring the develop copy via the API and re-applying with bounds-verified slices. Zero complexity findings remain in the touched files; no new findings anywhere; make vet and full make test pass unmodified; gofmt clean. Plan: docs/plans/complexity-refactors.md (phase 6 complete).
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.
Phase 6 of docs/plans/complexity-refactors.md (#312): the conversion stack decomposed under the thresholds —
dispatch(65) into named phases overparameterLayout/routedArgscarriers, the converter's scalar/slice/struct/sequence arms extracted,Convert's direct paths named (convertDirect). Behavior-preserving; the suite passes unmodified. One incident disclosed in the plan notes: a blind slice corruptedconverter.gomid-phase, recovered from the develop copy and re-applied with bounds-verified slices. Plan doc rides along with phase 6 marked complete.