refactor: seal remaining domain boundaries - #290
Merged
Conversation
morluto
marked this pull request as ready for review
August 11, 2026 13:48
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Continue #282 by removing the remaining loose executable and durable representations. Broad CLI, MCP, GitHub, archive, JSON, and storage inputs are now parsed once into narrow product-owned values; downstream operations receive sealed selections and state variants instead of strings, boolean combinations, or mutable bags that must be revalidated.
The change centers ownership in four places:
This also removes production dependency overrides used only by tests, splits mixed actor/job/batch hubs into operation-owned variants, and keeps arbitrary maps only at genuinely heterogeneous boundaries such as MCP error examples, GraphQL variables, measurements, and sanitized metadata.
Several correctness gaps fell out of the ownership work: malformed GH Archive event filters now fail before a run is created; incomplete pull-request feedback coverage cannot become negative evidence; contradictory workspace, snapshot, provenance, and coverage states are rejected at decode time; parsed setup JSON preserves number precision and rollback ownership; and the advertised MCP batch-item enum now includes the
partialvalue that producers can emit.Testing
make verifypassesmake test-race RACE_TEST_PARALLELISM=2passes acrossinternal/app,internal/corpus,internal/mcpserver, andinternal/workspacego run golang.org/x/tools/cmd/deadcode@latest -test ./...reports no dead functionsgitleaks git --log-opts='origin/main..HEAD'reports no leaksgit diff --check origin/main...HEADpassesmake verifycoveredgo vet, the complete uncached test suite, repository-wide lint with zero issues, module tidiness, generated-output checks, and AGENTS/documentation validation. The default four-slot local race run exhausted the 600-second package timeout under concurrent SQLite load without reporting a race; the contributing guide's documented two-slot setting completed successfully with the same package coverage.Compatibility and scope
Supported JSON and MCP response shapes remain unchanged. Inputs and stored records that encode contradictory or unknown enum states now fail closed intentionally. Missing, stale, truncated, or unavailable coverage remains unknown rather than becoming negative evidence.
Corpus reads remain offline. GitHub access, filesystem writes, process execution, setup/upgrade activation, and validation authorization remain explicit capabilities. Projection ordering, atomic child replacement, transactional multi-record writes, cancellation, and terminal job ownership are preserved.
Migration 016 removes the unused crawl-frontier table and trigger; its rollback recreates the retired schema shape. No live feature reads or writes that representation.
Diff size: 367 files, 15,696 insertions, 7,206 deletions. The change is large because private constructors and accessors propagate through callers and behavior tests, but it remains one outcome: every executable state has one authoritative parsed owner.
Suggested review order
internal/domain,internal/evidence,internal/manifest,internal/concern,internal/research, andinternal/workspace.internal/corpus.internal/app, especially setup, upgrade, jobs, sync, discovery, and PR feedback.internal/mcpcontractandinternal/mcpserver.internal/cli,internal/tui,internal/github, andinternal/discovery.