Repository navigation
feat(repositories): table repositories for the one-owner data model (XWING-2363) - #10
Merged
Merged
Conversation
…ce; park the retired traust_storage lane
…ect by a TableFactory (XWING-2363)
…rk spans every repository; retire the stub repositories and traust_storage lane (XWING-2363)
…table model against its columns
…of-work suites on SQLite and Postgres; template databases per test
…on, unit of work; drop DDL/drift checks owned by traust-contracts
…amp() on Postgres, matching contracts
… of work, and behaviour-only repository tests
…ocument; Artifact is the artifact table row
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.
Lands the repository layer for the one-owner data model (XWING-2363).
What changed
models/{inventory,dependencies,assessment,findings,operations,ledger}.py), fields = columns.repositories/traust/<section>/<table>.py,repositories/traust_ops/,repositories/traust_ledger/mirror the contracts namespaces. ATableSpecdeclares columns once;TableFactorybuilds each table per dialect (Postgres schemas, SQLiteops_/ledger_prefixes). The base givesadd/get/update; every other method is a named query on its table.SqlTraustUnitOfWorkopens all 31 repositories on one connection; services declare the narrow section protocol they need.traust_storagelane (storage/triage repositories and services). The publisher's database index now writes anartifactrow.repositories/objects/.models.artifacts.Artifactrenamed toArtifactDocument;Artifactis theartifacttable row.42a6367(traust-contracts #49): base-column timestamps usestatement_timestamp().Tests
Repository behaviour on SQLite and Postgres (
make test-repositories): save / get / update for every table, each query, unit-of-work commit and rollback, and concurrentrun_order.claimon Postgres. No tests restate the DDL; contracts owns that.Agent context (
AGENTS.md,traust-core-patternsskill) and the README describe the new layout.