Repository navigation
refactor(arch): close the Platform composition slice - #1066
Conversation
Deletes the AccountSlugLookup.ResolveAsync forwarder: the four verbs resolve farm codes through IFarmDirectory themselves, so FarmDirectoryCallerTests sees every caller, and the forwarder's adapter row goes. Loosenable is empty and no compatibility row names #858. Records the end state, its guards and its accepted limits in docs/decisions/858-platform-composition.md and src/AGENTS.md. Closes #858
|
Reviewed [P3] Distinguish namespace-owned fixtures from explicit implementation entries. The new decision rule and scoped AGENTS rule require every fixture's implementation on the ledger's The four CLI replacements are exact inlinings of the deleted forwarder. Scope, The ledger matches the intended end state: no #858 exception; one justified #859 filtered Flocks LEFT JOIN; all fixture ports on their contracts; 401 adapters, 140 nonempty rows and empty Independent verification: 73 baseline tests passed, one class at a time with
N1 independently failed on the stale The slice-scoped thermo-nuclear review found no structural regression: the changed C# files lose three lines overall, the largest is 146 lines, and no branch, wrapper, dependency or registration is added. Keeping direct resolutions makes the caller guard useful. Ponytail review: Lean already. Ship. Local logs, mutation runner and detailed review reports are retained in |
The #858 record and src/AGENTS.md said every fixture implementation goes on the ledger's implementations list. An implementation inside its module's namespaces, such as Access's AccessFixture and AccessSeedLookup, already has the own-module allowance, and listing it fails CompatibilityExceptionRealTreeTests. Refs #858
|
Astra P3 (fixture implementations on
Evidence:
|
Closes #858
#858 P8, the last slice. It closes the Platform composition slice of epic #514 Track C and records the end state.
Change map (who calls whom)
This PR's own edges: the forwarder's adapter row (
AccountSlugLookup.ResolveAsync -> Farm) is deleted.SuspendAccountCliCommand,ReactivateAccountCliCommand,RenameAccountCliCommandandSeedCliCommand.RunAsynceach declareFarmthemselves. The coupling matrix's adapters→Farm count goes 22 → 25. No module edge is added or removed. No other slice is open on these files.Change map (files)
Api/Cli/{Suspend,Reactivate,Rename}AccountCliCommand.cs,SeedCliCommand.csGetRequiredService<IFarmDirectory>().FindIdBySlugAsyncdirectlyFarmDirectoryCallerTestscannot follow a forwarderApi/Cli/SuspendAccountCliCommand.csAccountSlugLookup.ResolveAsyncdeleted;NormalizestaysApplication/Features/Accounts/IFarmDirectory.cs,FarmDirectoryCallerTests.csmodule-ledger.json,coupling-matrix.mddocs/decisions/858-platform-composition.mdsrc/AGENTS.mdProgram.csuntil #858 P7"docs/decisions/851-farm-contract.md,docs/decisions/README.mdNo root
AGENTS.mdrule. The convention is backend-only, and the root file now indexes the scoped rule files, sosrc/AGENTS.mdcarries the one paragraph.End-state checklist
compatibilityExceptionsIFarmDirectoryAdapterReachRealTreeTestsgreen: 401 adapters walked, 140 rowsLoosenablepersistenceForbiddenNamespacesCluckwork.Api.Endpoints)AccountSlugLookup.ResolveAsyncParity (base
main36a87a7f)The change inlines a one-line forwarder, so the SQL is the same call through the same scoped service.
Cluckwork.Application.Tests(includes the Documentation tests)AccountLifecycleCommandTestsAccessLifecycleDependencyTestsCliDispatcherTestsSeedCommandTests(incl.--farm-code)ListAccountsCommandTestsProcessRoleGuardTests/OneShotVerbMinimalConfigTests, with temporary polling passthrough (host inotify limit, as in #1065; not committed)ImagePin,SchemaDocsTests), run before committing the docstools/simulation/verify-harness.sh#858's other "Done when" gates: the full solution, the frontend typecheck/tests/build and the Playwright quick suite run in CI on this PR (
ci.yml,e2e-smoke.yml). They were not run locally. No boot guard or config key changed in any slice, so no harness or AppHost file changes.Mutations (each applied alone, restored)
compatibilityExceptionsrow for a converted query (SimulationDataSeeder.EnsureExpenseAsync -> Finance,#858)CompatibilityExceptionRealTreeTests, "stale compatibility exception … no member by that key reads Finance's tables any more"IFlockFixturefrom Flock Management's contractAdapterReachRealTreeTests+ matrix, "contract bypass … DemoDataSeeder.ctor / SimulationDataSeeder.ctor -> FlockManagement through IFlockFixture"suspend-accountresolvesIAccountRepository(Farm seam, not contract)AdapterReachRealTreeTests+ matrix, "contract bypass SuspendAccountCliCommand.RunAsync -> Farm through IAccountRepository"reactivate-accountAdapterReachRealTreeTests, "undeclared adapter reach AccountSlugLookup.ResolveAsync -> Farm".FarmDirectoryCallerTestsstays green, its documented limit; the record says the adapter guard catches it only while the row stays deletedThe integration suite ran one class at a time, as listed. The full integration suite was not run locally; CI runs it.
Deslop: removed one stray blank line in
src/AGENTS.md; nothing else.Review fix (Astra P3,
fc243042): the record andsrc/AGENTS.mdnow say that only fixture implementations outside their module's namespaces go onimplementations. Listing a namespace-owned one, such as Access'sAccessFixture, failsCompatibilityExceptionRealTreeTests(proven by mutation). The #859 amendment is corrected the same way.