Skip to content

refactor(complexity): phase 6 — the conversion surfaces - #318

Merged
David-Noble-at-work merged 1 commit into
developfrom
refactor/complexity-conversion
Aug 4, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
refactor/complexity-conversion

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Phase 6 of docs/plans/complexity-refactors.md (#312): the conversion stack decomposed under the thresholds — dispatch (65) into named phases over parameterLayout/routedArgs carriers, 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 corrupted converter.go mid-phase, recovered from the develop copy and re-applied with bounds-verified slices. Plan doc rides along with phase 6 marked complete.

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).
@David-Noble-at-work David-Noble-at-work self-assigned this Aug 4, 2026
@David-Noble-at-work
David-Noble-at-work merged commit 2dc69c5 into develop Aug 4, 2026
2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the refactor/complexity-conversion branch August 4, 2026 01:20
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.

1 participant