Domain model, Forge interface and contract-test harness #4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Every other v1 ticket builds on lazyforge's own types and the
Forgeinterface. They have to exist, and be checked against more than one forge on paper, before adapters, core or UI are written against them.Plan
internal/domain:Repo,ChangeRequest,Issue,Comment,Run,Job,Release,CIState,State,RenovateUpdate(shape informed by the Renovate parsing spike).internal/forge: theForgeinterface, the optional capability interfaces,HostInfo(kind, display terms "PR"/"MR", current user), and the sentinel errors (ErrNotFound,ErrUnauthorized,ErrRateLimited,ErrUnsupported).internal/forge/forgetest: an in-memory fakeForgefor core/UI tests, and the skeleton of the shared adapter contract suite (a function that takes aForgeconstructor and runs behavioral tests).docs/architecture.mdto match the code. Write an ADR if the shape differs materially from the sketch there.Plan-review additions (#17)
ChangeRequest.Renovatebecomes[]RenovateUpdate(empty when not a Renovate PR, or unparseable). Each update carries its ecosystem (manager / datasource) and package identity as well as name, from, to and bump, so grouping can key on ecosystem + package + from + to. Exact fields come from #2's fixtures.RepoRef+int.MergeOptscarries the head SHA the user confirmed; the adapter passes it to the forge (Giteahead_commit_id) so a PR that changed after confirmation fails instead of merging unseen commits.Context
docs/architecture.md→ domain model andForgeinterface sketches, API mapping table.go-development→ Layering (domain imports nothing internal; forge is interfaces only) and Testing (fakes live inforgetest, never in production code).Out of scope
Any adapter implementation.
🤖 started: composer-lite. Shape decided in ADR 0006 (on
feature/4-domain-forge-interface), including the GitHub/GitLab paper check.🤖 Delivered locally on
feature/4-domain-forge-interface(cd73e55..08ffa26): domain types, Forge interface with ItemRef/MergeOpts.HeadSHA/Gate/Can, forgetest Fake + RunContract. Review passed; mutation check killed 63/64 mutants (the survivor is equivalent).make checkexit 0. MR waits on SSH :2222.