Define typed application service boundaries #19
No reviewers
Labels
No labels
area/cli
area/core
area/database
area/indexing
area/query
type/epic
type/feature
type/foundation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
JayKobe6k/ClariTree!19
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-2-application-services"
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?
Summary
Tests
nix develop --command cargo fmt --all -- --checknix develop --command cargo lintnix develop --command cargo test --all-targets --all-featuresnix develop --command cargo doc --no-deps --all-featuresCloses #2
Found two actionable issues in the application service boundary.
@ -0,0 +989,4 @@&self,request: CreateIndexRequest,) -> Result<IndexResult, ApplicationError> {self.create.create_index(request)[P1] This facade only delegates to an injected
CreateIndexUseCase, but the application module provides no concrete service that orchestrates the source, compilation, parser, analysis, repository, and catalog ports; the tests substitute a fake for the entire use case instead of exercising application behavior through fake ports. As a result, none of the documented indexing, refresh, or query workflows is executable through the shared application layer. Please implement the application-owned services over the port traits and test those services with in-memory port fakes.@ -0,0 +1231,4 @@////// Returns the adapter's typed error when the catalog cannot be updated/// atomically.fn register_index(&self, index: &ResolvedIndex) -> Result<(), Self::Error>;[P1] The catalog port can read the active revision but cannot activate a newly built revision or perform the required compare-and-swap. Any concrete index or refresh service would have to bypass this boundary to publish atomically, which breaks the application-port architecture and permits lost updates. Please add a typed activation operation carrying the expected and replacement revisions, with an explicit conflict result.
Review comment #922: Fixed in
e190aef. The catalog boundary now plans immutable descriptors and activates them with a typed compare-and-swap request whose conflict is an explicit application outcome. Fake-port tests cover stale activation after persistence. Validation: full formatting, lint, all-target/all-feature tests, and rustdoc passed.Review comment #920: Fixed in
e190aef. Added concrete application-owned create/update/search/lineage services that orchestrate typed ports, plus fake-port sequencing and failure tests. Validation:nix develop --command cargo fmt --all -- --check,cargo lint,cargo test --all-targets --all-features, andcargo doc --no-deps --all-features.