Skip to content

refactor(complexity): phase 7 — the engine core; the board reads zero - #319

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

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

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Final phase of docs/plans/complexity-refactors.md (#312): sixteen engine functions decomposed with exact order preservation — the planner's binding cascade, NewMethod's validators, the executor's retry gate and failure terminals, the recovery re-arm, and the flow combinators (including a shared subgraph resolver that preserves Gather's nil-Graph compensator nuance via an inline pre-check). One plan-table omission (lint.Go 31) surfaced and folded in. The repository's full lint output is now empty — from 2,486 findings at the charter's start to zero, every remaining suppression carrying its stated reason. The unmodified suite passes. Plan doc rides along marked complete.

Final phase of the complexity plan (#312): sixteen functions under the
thresholds with exact order preservation. ActionPlanner.Plan (69)
becomes bindParameterSlots -> bindPresentValue -> bindResourceValue;
NewMethod (59) its four labeled validators; newReceiverType (32) splits
announced/derived method building. The executor extracts waitRetryDelay
and the three-outcome gateRetry from dispatchWithPolicy (32), and
prepareResume plus failAndUnwind — the step-21 terminal selection
stated once — from Run (26). Guard validation splits into decision-node
and tree-shape passes; checkPromiseTypes into a per-slot check; rearm
into per-entry re-arming; parseParameterToken into sink/named parsers;
assembleGraph extracts its unit table build. flow gains a shared
resolveCombinatorSubgraph (Gather's nil-Graph compensator nuance
preserved by an inline pre-check), classifyGatherRuns with gatherRun
promoted from an anonymous type, bindKwargFrame, a shared
desugarLambdaBody, and layoutDecisionTree. A plan-table omission
surfaced and folded in: lint's Go (31) was in the original 61 but
assigned to no phase.

The repository's full lint output — every linter, uncapped — is now
empty. make vet and the unmodified full make test pass; gofmt clean.
Plan: docs/plans/complexity-refactors.md (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 3f3c66d into develop Aug 4, 2026
2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the refactor/complexity-engine branch August 4, 2026 01:41
David-Noble-at-work added a commit that referenced this pull request Aug 4, 2026
)

* fix(lint): the gate's verdict — file-isolated JSON, no silent pass

CI's quality-gate passed PR #319 with eleven findings because its
"Lint Go" step (./build/star lint go) could not fail: the provider
asked golangci-lint for JSON on stdout, the repo config's text format
and the v2 stats footer pollute that stream, and runGolangciLint
silently ignored the resulting parse failure — zero issues, verdict
passes, every run green regardless of reality.

runGolangciLint now writes the JSON report to a dedicated temp file so
no stdout format can pollute it, captures stderr separately, and
treats a missing or unparseable report as a hard error naming the
stderr — never a pass. Verified live: a probe package with two planted
findings fails the gate with the script's own verdict (exit 1); a
clean package passes. The .star command and the exit-code path were
correct throughout.

Two follow-on rulings noted in the plan doc: adding make lint to
quality-gate as belt-and-suspenders, and cobra's usage-block noise
under a ui.fail verdict.

Full-config lint zero; make vet and full make test green; gofmt clean.
Plan: docs/plans/lint-gate-verdict.md.

* ci(lint): the two gate riders — make lint in quality-gate; no usage noise

Both follow-on rulings from the gate incident, ruled 2026-08-04.
quality-gate gains "Lint Go (direct)" running make lint alongside the
dogfooded star path, so a future regression in star's own reporting
pipeline cannot silently re-open the gate. star's root command sets
SilenceUsage: a failing verdict (a ui.fail in a .star script, a lint
gate saying no) prints only the error — verified live, exit 1 with no
usage block — while unknown subcommands still show help, which is a
genuine usage situation.

---------

Co-authored-by: David Noble <[email protected]>
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