Skip to content

feature(op): ReceiverFactory taxonomy and codegen unification - #216

Merged
David-Noble-at-work merged 1 commit into
developfrom
feature/shared-provider-receivers
Mar 14, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
feature/shared-provider-receivers

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Summary

  • ReceiverFactory interface: GetOrCreateProvider(ctx), ReceiverName(), ProviderType(), Register() — replaces the old Provider descriptor interface
  • Factory-owned provider lifecycle: providers are Root-scoped singletons created by the factory, eliminating InitProvider/InitActionProvider
  • Unified naming taxonomy: RegisterActions (was RegisterReflectedActions), WrapProviderInExecutingReceiver (was WrapReceiver), WrapProviderInPlanningReceiver (was WrapPlanned)
  • Codegen template unification: receiver.gen.go.template absorbs planned/immediate templates; all templates renamed to match output filenames
  • All 19 providers regenerated from new templates with gen/ directories now tracked in git
  • Platform provider moved from pkg/op/provider/platform/ to pkg/op/
  • Pointer-receiver method lookup fix in planned_reflect.go — uses reflect.PointerTo() so planned receivers discover all methods

Continues the work from #211, #212, #213.

Test plan

  • make build — all 3 binaries compile
  • make vet — clean
  • make test — all tests pass (3 starcode dependent-type tests skipped pending dedicated template)
  • Grep for old API names — zero matches in .go files

…Phases 5-6)

ReceiverFactory owns provider lifecycle via GetOrCreateProvider (Root-scoped
singleton). Unified naming: RegisterActions, WrapProviderInExecutingReceiver,
WrapProviderInPlanningReceiver. Codegen templates renamed to match outputs,
planned/immediate templates absorbed into receiver.gen.go.template. All 19
providers regenerated from new templates. Platform provider moved to pkg/op.
@David-Noble-at-work
David-Noble-at-work merged commit fdfc577 into develop Mar 14, 2026
2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the feature/shared-provider-receivers branch March 14, 2026 15:29
David-Noble-at-work added a commit that referenced this pull request Sep 28, 2026
…ero (#973)

* docs(plans): CI lints four of eleven; the gate arrives with its sweep

The plan for #964, committed before the work, and the #721 charter's retired status word with it.

ci.yaml runs make vet-all, star lint go, make lint-all and star lint shell. It never runs
star lint all, markdown, go-style or copyright, and it has no PowerShell step although install.ps1
ships to users. make check runs none of them.

The count is 51, not the 33 the issue states. Measured with Test-PowerShell.ps1, the gate CI would
actually run rather than PSScriptAnalyzer alone: 30 PSAvoidUsingWriteHost, 9 missing
[CmdletBinding()], 4 missing param(), 3 missing shebang, 2 script-level param(), and one each of
PSReviewUnusedParameter, PSUseBOMForUnicodeEncodedFile and PSUseSingularNouns. Four of those checks
are the gate's own and account for 18 of the 51.

Three pull requests, one plan, because the pieces have different blockers. The PowerShell gate and
install.ps1 go first: devlore-cli#949's lanes 11 and 21 both edit install.ps1 and are held for it.

Starlark is not buildifier's to cover. Ruled 2026-09-28: buildifier is being replaced, and #721 is
the replacement. Every defect that shipped in the docker package was syntactically valid Starlark
that buildifier parses without complaint.

Markdown is measured and the answer is that there is no policy to measure against: 36,857 findings
over 464 files, 25,318 of them line-length, against markdownlint's defaults, because no
configuration exists anywhere. Phase 3 writes one in the base layer.

lint-starlark.md restated its status in the body as `charter`, which is not one of the five and was
retired by noblefactor-ops#219. A status in two places is a second copy that drifts, so the body no
longer carries one.

* fix(ci): the PowerShell gate arrives with its sweep, 51 findings to zero

install.ps1 ships to users and was checked by nothing, while noblefactor-ops has had this gate since
its #218 and personal since its #216. Phase 2 of #964.

The gate runs as three steps of quality-gate, not as a job of its own. This repository's ruleset
requires exactly one check, quality-gate, so a separate job could not block a merge whatever it
reported -- which ci.yaml already says of the test job beside it: "A gate nobody has watched refuse
anything is a claim, not a gate." personal#216 could use a separate job because that repository's
ruleset admits one.

Test-PowerShell.ps1 and PSScriptAnalyzerSettings.psd1 are the organization's, so the script runs out
of a pinned .base checkout rather than being copied here, and the rule set cannot drift between the
three repositories.

install.ps1, 47 findings:

  - 30 Write-Host calls go to the stream PowerShell already has for each level: Write-Information
    for progress, Write-Warning for warnings, Write-Error for failures. Write-Host went to none of
    them and cannot be captured, so a user whose install failed could not pipe the run to a file or
    paste a log -- which for an installer run under irm | iex is exactly when a log matters.
    Separate streams also let a caller silence warnings and keep progress, which one stream carrying
    text prefixes cannot offer.
  - Write-Fatal keeps its exit 1 and uses -ErrorAction Continue to do so. The script sets
    $ErrorActionPreference = Stop, under which a bare Write-Error throws and the exit never runs --
    which would change how the installer terminates, and that is #965, another lane's work. This
    commit puts the message on the error stream and leaves the exit path as it found it.
  - The color is not replaced. $PSStyle is 7.2 and later and this script must run on Windows
    PowerShell 5.1, what a fresh Windows machine has (#948). Write-Warning and Write-Error label
    their own output, so info: and success: are the only prefixes left.
  - Nine functions gain [CmdletBinding()], four gain param(), and three gain [OutputType] because
    promoting a function to advanced brings PSUseOutputTypeCorrectly with it.
  - Get-ApiHeaders becomes Get-ApiHeader, with its call sites.
  - An em dash in a comment goes rather than the byte-order mark PSUseBOMForUnicodeEncodedFile would
    otherwise want, which #209 forbids.
  - Prefix is suppressed, not deleted. It is read by Main -- defaulted to ~/.local, made the bin
    directory, passed to self install -- across a dynamic-scope boundary the analyzer cannot see.
    Deleting it would silently drop a documented flag.

The two .ps1 test fixtures are fixed rather than excluded. Ruled 2026-09-28: everything is linted,
always, no exception without a compelling argument. Both keep doing their job -- the layer-journey
and migrate suites pass unchanged.

The gate reports 3 checked, 0 with findings.
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