Refactor FS access to bounded-context repositories#145
Open
danielbdyer wants to merge 1 commit into
Open
Conversation
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.
Motivation
Description
lib/application/ports.tsforIntentRepository,KnowledgeRepository,ControlRepository,ResolutionTaskRepository,ExecutionRepository, andGovernanceRepositoryand their contracts.lib/infrastructure/repositories/local-context-repositories.tsthat encapsulate path resolution and (de)serialization (YAML for knowledge, JSON for tasks/runs) while delegating I/O to the canonicallib/infrastructure/fs/local-fs.tsFS adapter.lib/composition/local-services.ts,lib/composition/layers.ts) so repositories are provided alongside theFileSystemservice.buildInterpretationSurfaceProjection/task projection now usesResolutionTaskRepository,applyDriftEventsusesKnowledgeRepository, and run persistence usesExecutionRepository.writeRunArtifacts(...)(lib/application/task.ts,lib/application/drift.ts,lib/application/run.ts).lib/infrastructure/local-fs.tssolib/infrastructure/fs/local-fs.tsis the single canonical export, and added focused repository contract tests intests/repository-contracts.spec.ts.Testing
npm run buildand confirmed the build completed successfully.npx playwright test tests/repository-contracts.spec.tsand all tests passed (3 passed).npm run typechecksurfaced pre-existing repository-wide diagnostics unrelated to this change; those are baseline issues (typecheck report at.tesseract/reports/typecheck-report.json) and did not block the targeted build/tests above.Codex Task