Skip to content

The ConvertFrom pairs are gone from every sealed resource, constructors return a nil interface on error, and the collision error names the kinds - #839

Merged
David-Noble-at-work merged 2 commits into
developfrom
feature/649-convertfrom-sweep
Sep 6, 2026
Merged

David-Noble-at-work merged 2 commits into
developfrom
feature/649-convertfrom-sweep

Conversation

@David-Noble-at-work

@David-Noble-at-work David-Noble-at-work commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Thread 2 (Epic:ResourceModel), phase 8 of 625-sealed-provider-resources.md. Three issues resolved in this worktree; sized first (commit 1), landed second.

#649 — the sweep

Sixteen CanConvertFrom / ConvertFrom methods in eight pairs removed from appnet, git, service, pkg, and file's base and three variants, with the two file tests that asserted them. In their place, one table-driven pin in pkg/op/provider: an env-less string converts to none of the nine sealed interfaces through the target side. The framework seam (op.TargetConverter, tryTargetConverter, targetSideAdvertises) stays for non-resource targets.

Two findings, both fixed here: the seven announcements carry the pair in their parameter tables and lose three lines each, so the generated files are not byte-identical as the sizing predicted; and the Makefile rule for file's generated files never depended on the variant files, so their announcements went stale and panicked star at startup. The rule now names them.

  • the sixteen methods and their opt-in comments removed; the two regular_test.go tests removed
  • the forgery pin generalized: TestConvert_NoSealedResourceIsReachedFromAStringOnTheTargetSide over nine interfaces
  • make generate — seven announcements regenerated; no ConvertFrom remains in any generated file
  • the file generate rule depends on resource_base.go and the four variant files
  • make check green locally

#807 — typed nil on the error path

Seven constructors (json, yaml, service, git, mem, appnet, pkg) returned return discoverResource(...), wrapping a nil struct pointer in a non-nil interface on error. Each now returns an explicit nil.

  • every exported sealed constructor returns a literal nil interface on its error path
  • TestDiscoverResource_ErrorPathReturnsANilInterface per provider

#808 — the collision error

internEntry printed *file.regular and *file.directory; it now names file.Regular and file.Directory through kindName.

  • the collision error names the kinds by their exported interface names

  • TestDiscover_CrossKindCollisionErrors asserts the exported names

  • the suite passes on all five platforms — every test leg green on this PR

Closes #649
Closes #807
Closes #808

https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW

David Noble added 2 commits September 5, 2026 17:07
…p, folding in #807 and #808

Phase 8 (#649) sized against develop at f4b3cdb: sixteen methods in eight pairs across appnet, git, service,
pkg, and file's base and three variants; two file tests assert the removed contract and are replaced by a
table-driven pin that a string does not reach any sealed resource through the target side. #807's seven typed-nil
constructors and #808's collision message fold in as steps 3 and 4. Status in-progress.

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
…rs return a nil interface on error, and the collision error names the kinds

Phase 8 of the sealed-resources plan (#649). Sixteen methods in eight pairs removed from appnet, git, service, pkg,
and file's base and three variants, with the two file tests that asserted them; one table-driven pin in
pkg/op/provider asserts that an env-less string converts to none of the nine sealed interfaces through the target
side. Seven generated announcements lose the pair's parameter entries. The Makefile's rule for file's generated
files now depends on the variant files, whose edits it never saw.

#807: the seven constructors that returned a typed nil through `return discoverResource(...)` return an explicit
nil on the error path, each pinned by a test. #808: internEntry's cross-kind collision error names the kinds by
their exported interfaces through kindName. Plan phase 8 complete; #646 is next.

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
@David-Noble-at-work David-Noble-at-work self-assigned this Sep 6, 2026
@David-Noble-at-work
David-Noble-at-work merged commit 869ca1b into develop Sep 6, 2026
12 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the feature/649-convertfrom-sweep branch September 6, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant