Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
be8d7dd
feat(observation): implement immutable schema snapshot contract
seonghobae Sep 1, 2026
4c1cfa2
docs(observation): align source snapshot commercialization baseline
seonghobae Sep 1, 2026
7657222
test(observation): require canonical snapshot digest
seonghobae Sep 1, 2026
4e961c1
style(observation): keep snapshot digest RED rustfmt-clean
seonghobae Sep 2, 2026
47f21bf
fix(observation): enforce canonical snapshot digest identity
seonghobae Sep 2, 2026
08b6371
docs(observation): record canonical snapshot digest contract
seonghobae Sep 2, 2026
bc25e6f
docs(gap): record snapshot digest repair and verification state
seonghobae Sep 2, 2026
64f053e
test(observation): specify relational constraint evidence
seonghobae Sep 2, 2026
245b4df
feat(observation): capture key and foreign-key evidence
seonghobae Sep 2, 2026
0d51d95
docs(architecture): model relational constraint evidence
seonghobae Sep 2, 2026
8fb5fe0
docs(gap): record key and relationship observation slice
seonghobae Sep 2, 2026
56a9954
docs(changelog): record constraint observation contract
seonghobae Sep 2, 2026
e2b1742
test(observation): specify exact evidence receipts
seonghobae Sep 2, 2026
3d34255
feat(observation): bind exact source evidence receipts
seonghobae Sep 2, 2026
91f6dc5
test(observation): specify foreign-key reference behavior
seonghobae Sep 2, 2026
3f741c6
feat(observation): preserve foreign-key reference behavior
seonghobae Sep 2, 2026
950804b
style(observation): preserve rustfmt-compatible source layout
seonghobae Sep 2, 2026
6eb0078
docs(observation): record foreign-key source behavior
seonghobae Sep 2, 2026
0ac60ba
docs(observation): align architecture with FK behavior evidence
seonghobae Sep 2, 2026
484d9fc
docs(observation): update PRD source evidence contract
seonghobae Sep 2, 2026
3dae636
docs(gap): reconcile FK behavior commercialization state
seonghobae Sep 2, 2026
416d012
test(observation): specify PostgreSQL 18 CHECK evidence
seonghobae Sep 2, 2026
098972a
feat(observation): preserve PostgreSQL CHECK evidence
seonghobae Sep 2, 2026
50137f8
docs(observation): record PostgreSQL CHECK evidence
seonghobae Sep 2, 2026
c002051
docs(observation): model CHECK constraint evidence
seonghobae Sep 2, 2026
9b637b1
docs(observation): align PRD with CHECK evidence
seonghobae Sep 2, 2026
83fffd7
docs(gap): reconcile PostgreSQL 18 CHECK evidence
seonghobae Sep 2, 2026
8517b92
docs(observation): align TRD with PostgreSQL evidence contracts
seonghobae Sep 2, 2026
350b7c1
test(observation): require exact FK enforcement state
seonghobae Sep 2, 2026
4df2fd7
feat(observation): preserve FK enforcement evidence
seonghobae Sep 2, 2026
7c0e667
docs(observation): record FK enforcement evidence
seonghobae Sep 2, 2026
345a918
docs(observation): align FK constraint state boundary
seonghobae Sep 2, 2026
6c2f15f
docs(gap): track FK enforcement provenance
seonghobae Sep 2, 2026
cb41cff
docs(product): require FK enforcement provenance
seonghobae Sep 2, 2026
0dff116
chore(observation): scaffold source port crate
seonghobae Sep 2, 2026
85a0a9c
chore(observation): add source port crate shell
seonghobae Sep 2, 2026
0c1d776
chore(observation): register source port workspace member
seonghobae Sep 2, 2026
58ab505
chore(observation): lock source port workspace package
seonghobae Sep 2, 2026
7cafba2
test(observation): require bounded source port contract
seonghobae Sep 2, 2026
016b0af
feat(observation): add bounded source observation port
seonghobae Sep 2, 2026
23dedbd
docs(observation): record bounded source port gap state
seonghobae Sep 2, 2026
a366399
docs(adr): propose bounded source observation port
seonghobae Sep 2, 2026
6ff0bb7
docs(adr): index source observation port decision
seonghobae Sep 2, 2026
80c36f7
docs(changelog): record bounded source port contract
seonghobae Sep 2, 2026
e56054c
docs(architecture): map bounded source observation port
seonghobae Sep 2, 2026
2f6cd4e
test(observation): reject credential-shaped source references
seonghobae Sep 2, 2026
339222c
fix(observation): enforce opaque source registry keys
seonghobae Sep 2, 2026
7298204
test(observation): cover bounded registry key length
seonghobae Sep 2, 2026
c155ef1
docs(architecture): bind source key to registry contract
seonghobae Sep 2, 2026
01d3a53
docs(adr): harden source registry key boundary
seonghobae Sep 2, 2026
cb6edab
docs(changelog): record source registry boundary
seonghobae Sep 2, 2026
b747eb0
docs(gap): record source registry hardening
seonghobae Sep 2, 2026
3762895
docs(prd): specify source registry credential boundary
seonghobae Sep 2, 2026
9adc42d
docs(trd): bind source registry ACL contract
seonghobae Sep 2, 2026
f374476
test(observation): require explicit UTC timestamp evidence
seonghobae Sep 2, 2026
2817df6
style(observation): apply hosted rustfmt output
seonghobae Sep 2, 2026
e27ffaf
fix(observation): validate exact UTC provenance timestamp
seonghobae Sep 3, 2026
1c550c1
test(observation): cover UTC provenance edge cases
seonghobae Sep 3, 2026
3fd6557
test(observation): reject unverifiable leap-second provenance
seonghobae Sep 3, 2026
d03243d
test(observation): align leap-second syntax coverage with RFC 3339
seonghobae Sep 3, 2026
a026e23
docs(observation): record UTC provenance validation
seonghobae Sep 3, 2026
9ec15d0
docs(observation): doctor UTC provenance contract
seonghobae Sep 3, 2026
b3aac68
docs(observation): correct UTC standards citation
seonghobae Sep 3, 2026
d8ccfb6
docs(gaps): record Source Observation UTC RED and repair
seonghobae Sep 3, 2026
c9af225
test(observation): bind snapshot source to registry identity
seonghobae Sep 3, 2026
0ae2ac3
fix(observation): rustfmt registry identity RED
seonghobae Sep 4, 2026
2c146a1
fix(observation): clear rustfmt precondition for registry RED
seonghobae Sep 4, 2026
43693f1
revert(observation): restore exact pre-format source
seonghobae Sep 4, 2026
1fdfb3a
fix(observation): clear UTC rustfmt precondition
seonghobae Sep 4, 2026
f7e128e
docs(observation): adopt current foundation gap authority
seonghobae Sep 4, 2026
421ad36
merge(foundation): non-force restack source observation gap authority
seonghobae Sep 4, 2026
11bf803
merge(foundation): restack source research authority
seonghobae Sep 4, 2026
874d4dd
merge(foundation): restack source on doctoring RED
seonghobae Sep 4, 2026
7749846
chore: adopt foundation doctoring RED
seonghobae Sep 4, 2026
7edb2e0
chore: adopt foundation APA traceability contract
seonghobae Sep 4, 2026
48a0507
chore: adopt foundation live-state baseline repair
seonghobae Sep 4, 2026
67e60de
chore: adopt foundation bibliography repair
seonghobae Sep 4, 2026
a0197ba
chore: adopt foundation gap baseline refresh
seonghobae Sep 4, 2026
e72345a
chore: adopt foundation truth-state contract repair
seonghobae Sep 4, 2026
dfb00bb
chore: adopt foundation gap baseline refresh
seonghobae Sep 4, 2026
824d9a1
fix(observation): enforce source registry identity
seonghobae Sep 4, 2026
d8fec06
test(observation): use valid registry keys
seonghobae Sep 4, 2026
f791230
test(observation): repair schema snapshot registry fixtures
seonghobae Sep 4, 2026
60663d9
test(observation): cover error formatting branches
seonghobae Sep 4, 2026
0dd2528
merge: adopt Foundation queue-isolation repair
seonghobae Sep 4, 2026
8449350
test(source-port): require total observation deadline
seonghobae Sep 4, 2026
840b2d5
test(source-port): require total-deadline failure outcome
seonghobae Sep 4, 2026
760874f
fix(source-port): add end-to-end observation deadline
seonghobae Sep 4, 2026
484a987
test(source-port): require typed invalid-metadata failure
seonghobae Sep 4, 2026
b6607ed
fix(source-port): type invalid captured metadata failure
seonghobae Sep 4, 2026
2194a4e
test(observation): require targeted FK delete columns
seonghobae Sep 4, 2026
d073aed
test(observation): reject invalid targeted delete columns
seonghobae Sep 4, 2026
eb96251
fix(observation): preserve targeted FK delete columns
seonghobae Sep 4, 2026
a39fa08
test(source-port): require registry-resolved source identity
seonghobae Sep 4, 2026
cbfa38a
fix(source-port): issue registry-resolved source identity
seonghobae Sep 4, 2026
38ecdf0
test(observation): require resolved source identity
seonghobae Sep 4, 2026
17c5067
fix(observation): require registry-resolved provenance
seonghobae Sep 4, 2026
12a9cec
fix(observation): satisfy strict targeted-column lint
seonghobae Sep 4, 2026
6612d01
test(observation): cover resolved provenance branches
seonghobae Sep 4, 2026
be7b580
Merge PR #5 client coverage before observation
seonghobae Sep 4, 2026
ff8562f
docs(observation): record resolved provenance boundary
seonghobae Sep 4, 2026
5290cae
docs(client): preserve detached integrity contract
seonghobae Sep 4, 2026
14670fb
test(coverage): exercise merged client and observation edges
seonghobae Sep 4, 2026
04e1896
test(ci): require normalized source coverage
seonghobae Sep 4, 2026
ffe2592
fix(ci): aggregate owned source coverage
seonghobae Sep 4, 2026
8982559
test(coverage): close merged source conditions
seonghobae Sep 4, 2026
0d80bab
style(client): format merged coverage cases
seonghobae Sep 4, 2026
a6137e6
ci(observation): adopt draft-aware Product admission
seonghobae Sep 4, 2026
11c6bfd
ci(observation): pin draft-aware Product contract
seonghobae Sep 4, 2026
d255f5c
merge: adopt current Client stack
seonghobae Sep 4, 2026
de7af31
merge: adopt current Client and gap baseline
seonghobae Sep 5, 2026
5ee0e1e
test(observation): bind snapshot digest to observed metadata
seonghobae Sep 5, 2026
301452a
fix(observation): derive snapshot digest from canonical metadata
seonghobae Sep 5, 2026
51a7344
fix(observation): preserve locked crypto-common checksum
seonghobae Sep 5, 2026
b7e54ae
test(source-port): require explicit allowlist metadata budgets
seonghobae Sep 5, 2026
94927ec
fix(source-port): bound schema authorization metadata
seonghobae Sep 5, 2026
27df449
test(source-port): apply explicit request budgets to port fixtures
seonghobae Sep 5, 2026
2bb6bc4
test(source-port): budget registry-resolution fixtures
seonghobae Sep 5, 2026
484e43a
test(observation): budget source-capability fixtures
seonghobae Sep 5, 2026
e7e9604
test(observation): carry explicit source request budgets
seonghobae Sep 5, 2026
c626165
docs(source-port): record explicit request metadata admission
seonghobae Sep 5, 2026
2126645
docs(architecture): model request authorization budgets
seonghobae Sep 5, 2026
fb5b172
docs(trd): require bounded schema authorization metadata
seonghobae Sep 5, 2026
5d98ef6
docs(changelog): record bounded request authorization metadata
seonghobae Sep 5, 2026
8ed91af
fix(source-port): fail closed on schema-byte accumulation overflow
seonghobae Sep 5, 2026
a372d67
test(source-port): require registry-authorized execution request
seonghobae Sep 5, 2026
5caf10b
fix(source-port): require registry-authorized execution envelope
seonghobae Sep 5, 2026
eea557f
docs(source-port): bind adapter execution to registry authorization
seonghobae Sep 5, 2026
cfd7e61
docs(adr): require authorized source execution envelope
seonghobae Sep 5, 2026
591d881
docs(source-port): align authorization and operation-boundary rustdoc
seonghobae Sep 5, 2026
15e1f6a
docs(architecture): expose authorized observation envelope
seonghobae Sep 5, 2026
8ab8192
docs(changelog): record authorized observation execution seam
seonghobae Sep 5, 2026
f8e1c11
docs(prd): require registry authorization before source execution
seonghobae Sep 5, 2026
c362a73
test(observation): prove denied authorization has zero side effects
seonghobae Sep 5, 2026
b2b83c0
test(observation): require awaitable source adapter port
seonghobae Sep 5, 2026
638be09
fix(observation): make source adapter execution awaitable
seonghobae Sep 5, 2026
04c0ded
test(observation): adapt existing port fixtures to awaitable contract
seonghobae Sep 5, 2026
f82efca
test(observation): preserve authorization side-effect proof across await
seonghobae Sep 5, 2026
03b0b0d
test(observation): keep async cancellation fixtures alive
seonghobae Sep 5, 2026
ad4c7bf
docs(observation): record awaitable adapter boundary
seonghobae Sep 5, 2026
29430bd
docs(observation): align architecture with awaitable port
seonghobae Sep 5, 2026
5d88181
docs(observation): decide awaitable execution seam
seonghobae Sep 5, 2026
cf84b50
docs(observation): align TRD with awaitable execution
seonghobae Sep 5, 2026
a741278
test(observation): preserve dyn dispatch across async port repair
seonghobae Sep 5, 2026
42c94c9
test(observation): keep dynamic dispatch outside current async contract
seonghobae Sep 5, 2026
1f8f6a5
test(observation): pin remaining operation budget
seonghobae Sep 5, 2026
2a77a90
fix(observation): preserve remaining operation budget
seonghobae Sep 5, 2026
82222c1
test(observation): pin timeout precedence after registry work
seonghobae Sep 5, 2026
235a892
fix(observation): preserve timeout precedence after authorization
seonghobae Sep 5, 2026
1204b35
fix(observation): restore zero-byte limit variant
seonghobae Sep 5, 2026
db3f621
docs(observation): align TRD with remaining-budget contract
seonghobae Sep 5, 2026
cacdfa0
docs(observation): align ADR 0004 with deadline capability
seonghobae Sep 5, 2026
ebcdcc6
docs(observation): record non-resetting operation budget
seonghobae Sep 5, 2026
1f4fd1a
test(observation): reject out-of-scope snapshot schemas
seonghobae Sep 5, 2026
aa087e3
fix(observation): bind snapshots to authorized schema scope
seonghobae Sep 5, 2026
e49973f
test(observation): preserve authorization envelope in fixtures
seonghobae Sep 5, 2026
3b7e455
test(observation): bind ACL regression to exact request scope
seonghobae Sep 5, 2026
2c897ca
docs(adr): bind snapshot evidence to authorized schema scope
seonghobae Sep 5, 2026
a22684e
docs(changelog): record snapshot schema authorization binding
seonghobae Sep 5, 2026
5cca4f8
docs(architecture): enforce snapshot authorization scope
seonghobae Sep 5, 2026
fd00dab
test(source-port): require registry schema-scope authorization
seonghobae Sep 5, 2026
320ab7c
fix(source-port): authorize exact schema scope
seonghobae Sep 5, 2026
26adb62
docs(architecture): bind registry to schema scope
seonghobae Sep 5, 2026
d6200dc
docs(adr): require registry schema-scope authorization
seonghobae Sep 5, 2026
11c919e
docs(trd): require explicit schema-scope policy
seonghobae Sep 5, 2026
acd59ef
docs(changelog): record schema-scope authorization
seonghobae Sep 5, 2026
d0c848a
test(observation): specify stale connection binding rejection
seonghobae Sep 6, 2026
ca4446f
fix(observation): bind authorization to immutable source policy revision
seonghobae Sep 6, 2026
cc78ef4
test(observation): prove stale policy binding fails before source access
seonghobae Sep 6, 2026
16298a1
test(observation): require registry policy binding on source resolution
seonghobae Sep 6, 2026
4558485
test(observation): keep policy binding inside shared operation budget
seonghobae Sep 6, 2026
af51976
test(observation): bind authorization side effects to policy revision
seonghobae Sep 6, 2026
1711f21
test(observation): carry immutable binding through async source port
seonghobae Sep 6, 2026
0a4b0fd
test(observation): require policy-bound adapter admission
seonghobae Sep 6, 2026
71a17d6
test(observation): bind snapshot fixtures to stable source policy rev…
seonghobae Sep 6, 2026
e94c545
fix(observation): retain policy binding in immutable source provenance
seonghobae Sep 6, 2026
e445f86
test(observation): preserve authorized policy binding in evidence rec…
seonghobae Sep 6, 2026
ab5a8a1
test(observation): keep exact schema policy fail closed after source …
seonghobae Sep 6, 2026
44f55b7
docs(architecture): bind source authorization and receipts to policy …
seonghobae Sep 6, 2026
473e728
docs(trd): specify immutable source policy binding and provenance
seonghobae Sep 6, 2026
57e57e8
docs(adr): record immutable connection-policy binding decision
seonghobae Sep 6, 2026
f0334ce
docs(changelog): record immutable source policy binding repair
seonghobae Sep 6, 2026
a8f6b9e
test(observation): reject connection material disguised as policy bin…
seonghobae Sep 6, 2026
2138654
fix(observation): bound policy bindings to opaque identifiers
seonghobae Sep 6, 2026
9f11549
docs(gap): refresh Source Observation policy-binding baseline
seonghobae Sep 6, 2026
5ba8cd6
test(observation): specify trusted resource admission
seonghobae Sep 6, 2026
3d32a93
fix(observation): authorize trusted resource envelope
seonghobae Sep 6, 2026
5f6ac63
test(observation): admit async fixture resources
seonghobae Sep 6, 2026
2936d8a
test(observation): admit side-effect fixture resources
seonghobae Sep 6, 2026
8d68acf
test(observation): bind bounded fixtures to resource policy
seonghobae Sep 6, 2026
9007591
test(observation): bind stale-source fixtures to resource policy
seonghobae Sep 6, 2026
a88ea24
test(observation): keep resource policy inside operation budget
seonghobae Sep 6, 2026
8ed6e55
test(observation): admit snapshot fixture resources
seonghobae Sep 6, 2026
d65b08f
docs(architecture): bind source resources to trusted policy
seonghobae Sep 6, 2026
831c079
docs(trd): require trusted resource-envelope admission
seonghobae Sep 6, 2026
e5b495c
docs(adr): decide trusted source resource admission
seonghobae Sep 6, 2026
ab57a3d
docs(changelog): record trusted source resource policy
seonghobae Sep 6, 2026
74cbd53
docs(gap): make resource admission and owner blockers current
seonghobae Sep 6, 2026
92893c3
docs(prd): make trusted observation resources buyer-visible
seonghobae Sep 6, 2026
22b4751
docs(ul): name trusted observation resource admission
seonghobae Sep 6, 2026
bb80724
docs(uml): show source resource authorization flow
seonghobae Sep 6, 2026
f635f7a
docs(context-map): bind observation policy and adapter ACL
seonghobae Sep 6, 2026
ae26da7
docs(security): require trusted observation resource policy
seonghobae Sep 6, 2026
7425ef6
docs(test): make source resource admission executable policy
seonghobae Sep 6, 2026
c4a4fb3
docs(operability): carry trusted observation budgets end to end
seonghobae Sep 6, 2026
3fb340e
test(observation): stop authorization after deadline
seonghobae Sep 6, 2026
9d17ab4
fix(observation): stop policy work after deadline
seonghobae Sep 6, 2026
04a63f3
test(observation): cover binding deadline stage
seonghobae Sep 6, 2026
4b04fa7
docs(changelog): record staged deadline enforcement
seonghobae Sep 6, 2026
3b0a972
docs(adr): stop registry work after deadline
seonghobae Sep 6, 2026
cf5eda1
test(observation): bound structural request budgets
seonghobae Sep 6, 2026
dfe1216
fix(observation): cap structural request metadata
seonghobae Sep 6, 2026
d1aff33
test(observation): cover structural budget boundaries
seonghobae Sep 6, 2026
ff94d7a
docs(adr): bind structural request ceilings
seonghobae Sep 6, 2026
f32f0ad
docs(changelog): record structural request caps
seonghobae Sep 6, 2026
925fd8f
docs(gap): make structural admission code-current
seonghobae Sep 6, 2026
781be62
docs(architecture): bound pre-policy request metadata
seonghobae Sep 6, 2026
fc7469e
docs(security): cap untrusted schema request metadata
seonghobae Sep 6, 2026
3f8b7b4
docs(test): cover structural admission caps
seonghobae Sep 6, 2026
6be52e5
docs(trd): specify structural request hard caps
seonghobae Sep 6, 2026
f8e7fe9
docs(operability): bound pre-policy request retention
seonghobae Sep 6, 2026
bf364c6
test(observation): keep monotonic deadline coordinate private
seonghobae Sep 6, 2026
db209b9
fix(source-port): redact private operation start from Debug
seonghobae Sep 6, 2026
2a03a56
test(source-port): specify single-use authorized execution
seonghobae Sep 6, 2026
340ded1
fix(source-port): consume authorization capability once
seonghobae Sep 6, 2026
72deb9f
test(source-port): keep authorization side effects linear
seonghobae Sep 6, 2026
6a29cbe
test(source-port): require fresh capability per execution
seonghobae Sep 6, 2026
cd6d999
test(source-port): preserve stale-binding checks on linear capability
seonghobae Sep 6, 2026
8ef1239
test(source-port): consume remaining-budget capability once
seonghobae Sep 6, 2026
30d253f
test(source-port): preserve resource policy on single-use capability
seonghobae Sep 6, 2026
593bfee
docs(architecture): make source authorization capability single-use
seonghobae Sep 6, 2026
85e6108
docs(trd): bind one authorization to one observation execution
seonghobae Sep 6, 2026
b57f754
docs(security): prevent authorized observation replay amplification
seonghobae Sep 6, 2026
11bc70e
docs(adr): decide single-use source authorization capability
seonghobae Sep 6, 2026
81c15b4
docs(adr): index single-use source capability decision
seonghobae Sep 6, 2026
7fed592
docs(changelog): record single-use source authorization
seonghobae Sep 6, 2026
49ea507
docs(test): cover single-use source authorization
seonghobae Sep 6, 2026
6b68a23
docs(operability): reauthorize every source retry
seonghobae Sep 6, 2026
50111e7
docs(gap): record single-use Source Observation repair
seonghobae Sep 6, 2026
e3c4156
docs(doctoring): trace source authorization replay governance
seonghobae Sep 6, 2026
38efc27
docs: restore detached-artifact verification in observation baseline
seonghobae Sep 6, 2026
c50b821
test: distinguish unknown and observed unique null semantics
seonghobae Sep 6, 2026
27bf484
style: apply pinned Rust formatting to observation prerequisites
seonghobae Sep 6, 2026
bab6984
feat: retain observed null comparison in unique constraints
seonghobae Sep 6, 2026
8b5b738
test: version the extended observation digest framing
seonghobae Sep 6, 2026
6c23924
fix: bind unique null semantics into versioned snapshot identity
seonghobae Sep 6, 2026
dd2d177
test: use standard async and wake primitives in source-port fixtures
seonghobae Sep 6, 2026
7be2707
test: cover source authorization expiry and evidence rejection paths
seonghobae Sep 6, 2026
e3ac294
fix: enforce schema byte ceiling before accumulation
seonghobae Sep 6, 2026
331f8ed
docs: trace unique null semantics and executed observation verification
seonghobae Sep 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# AGENTS.md — ConceptWeave

Unique-constraint null comparison remains unknown unless observed. Preserve explicit false and true separately in v2 snapshot framing; never rewrite historical v1 receipts or treat source key semantics as business truth.

Read the organization `ContextualWisdomLab/.github` master context and product goal directive before material work. Live GitHub state and this repository's accepted ADRs override remembered chat state.

## Product boundary
Expand Down
41 changes: 38 additions & 3 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ ConceptWeave owns the process that turns observed enterprise evidence into gover

```mermaid
flowchart LR
S[Source systems and artifacts] --> O[Source Observation]
S[Source systems and artifacts] --> R[ObservationRequest admission]
R --> A[Registry source + schema + resource authorization]
A --> SP[Authorized Source Observation port]
SP --> O[Immutable Source Observation]
O --> D[Semantic Discovery]
D --> V[Model Validation]
V --> G[Governance & Publication]
Expand All @@ -26,7 +29,7 @@ flowchart LR

| Context | Type | Owns | Does not own |
| --- | --- | --- | --- |
| Source Observation | Supporting | immutable observations, parser receipts, evidence locations | source-system business truth |
| Source Observation | Supporting | bounded request admission, registry source/schema/resource policy and immutable capability binding, source-access port policy, immutable observations, parser/extractor receipts, evidence locations | credentials, source-system business truth, semantic inference |
| Semantic Discovery | Core | candidate generation and evidence binding | publication authority |
| Model Validation | Supporting | deterministic validation reports | human review decisions |
| Governance & Publication | Core | proposal lifecycle, review receipts, releases, supersession authority | catalog/search runtime |
Expand All @@ -37,6 +40,36 @@ The generation-to-client dependency crosses only versioned public release contra

## Aggregate and value-object boundaries

### ObservationRequest / ObservationRequestBudget / ObservationLimits / ObservationResourceEnvelope / AuthorizedObservationRequest

Provider-independent Source Observation port value objects. A raw request contains only a bounded opaque source registry key (at most 128 bytes, lowercase multiword `snake_case`), an explicit non-empty exact-schema allowlist, a caller-selected authorization-metadata budget, and positive operation/statement-timeout, row, byte, and concurrency execution ceilings. `ObservationRequestBudget` itself is bounded before registry access by canonical product-level caps of 4,096 exact schema identifiers and 1,048,576 retained UTF-8 schema-name bytes. These caps prevent a caller from minting an effectively unbounded retained-metadata envelope before trusted policy runs; they are provider-independent denial-of-service guardrails, not PostgreSQL identifier semantics or source authorization. A request may choose a narrower budget but never a wider one.

Structural admission is not source authority. `ObservationResourceEnvelope` combines the structurally admitted metadata budget and runtime ceilings into one immutable policy input so trusted local policy can admit only an equal-or-narrower complete resource contract. Request count/byte validation occurs before registry or database access and deliberately does not reuse PostgreSQL's build-time identifier-length default as a security constant.

A well-formed key, caller-selected schema list, structurally valid metadata budget, and positive runtime envelope are not authority. `ObservationRequest::authorize` resolves the key through the caller's `SourceConnectionRegistry`, requires a nonblank opaque immutable connection-policy binding for that exact mapping, asks the same registry to authorize the exact schema scope against the resulting `ResolvedSourceConnection`, then asks it to admit the complete `ObservationResourceEnvelope` against that same binding. Schema and resource policy methods default to fail closed. A key-only registry therefore cannot silently turn caller-selected schemas or timeout/row/byte/concurrency/schema-metadata ceilings into application grants. Successful authorization produces one non-`Clone` `AuthorizedObservationRequest`; `SourceObservationPort::observe` consumes that envelope by value. One authorization therefore cannot be replayed to multiply the policy-admitted row, byte, concurrency, deadline, or source-access budget. Retry after cancellation or failure requires a fresh `ObservationRequest::authorize` call. Raw DSNs, URLs, shell-style connection parameters, one-word/generic keys, malformed registry identifiers, over-cap structural budgets, over-budget allowlists, blank schema names, exact duplicates and raw credentials do not cross the canonical execution seam.

`ResolvedSourceConnection` carries only the opaque source key and opaque connection-policy binding. The binding is provider-independent provenance, not connection material. A concrete adapter ACL may resolve credentials only for that exact key-and-binding pair. If a registry key is retargeted from policy/source revision A to B after authorization, an A capability must fail before source access rather than silently inherit B. Exact schema identifiers retain source spelling throughout the policy decision; case or Unicode normalization must not broaden access. Resource admission is likewise bound to the same source-policy revision rather than to a mutable key or caller-selected defaults.

Caller cancellation and source-disappearance/resource-limit outcomes are part of the typed port seam. Request admission and source/schema/resource registry authorization remain deterministic pre-adapter steps; live adapter execution is awaitable and returns a `Send` future without making an async runtime part of the port contract. The end-to-end operation budget starts before source lookup, policy-binding resolution, schema authorization and resource-envelope authorization, then continues through the single authorized connection/catalog execution. Runtime integration must account for pre-adapter elapsed time rather than restarting the deadline at `observe`, and must re-authorize rather than replay a consumed envelope for a retry. Concrete PostgreSQL drivers, credentials, catalog SQL and scheduling remain adapter responsibilities outside the domain and observation-fact crates. ADR 0004 remains Proposed until a concrete adapter and conformance evidence prove these invariants.

### PostgresSchemaSnapshot

Immutable Source Observation aggregate for one bounded relational metadata capture. It owns source-connection reference, the opaque connection-policy binding authorized for that observation, snapshot digest identity, extractor revision, observation time, and exact qualified table observations. The public constructor accepts the complete `AuthorizedObservationRequest`, not a source-only capability, and rejects every locally observed table whose exact schema identifier is absent from the request allowlist before the owner-computed digest or any evidence receipt can exist. Exact matching is case-sensitive and normalization-free. Foreign-key target schema names remain relationship evidence and do not imply that the referenced schema itself was locally observed. Duplicate table coordinates also fail closed. A concrete adapter may construct this aggregate only after a complete bounded capture; cancellation, stale binding, source disappearance, authorization-scope mismatch, or resource exhaustion must not produce a partial snapshot.

The source-content digest deliberately excludes source identity and policy revision, which remain separate provenance coordinates. `SourceObservationReceipt` therefore carries the stable source key and the exact opaque connection-policy binding alongside the source-content digest, extractor revision, observation time, and verified location. This keeps content identity deterministic without losing which immutable authorization mapping produced the evidence.

### TableObservation / ColumnObservation

Immutable Source Observation value objects. Table observations keep exact schema/table identity. Column observations keep exact source name, one-based ordinal, source type, nullability, and optional source comment. Duplicate names or ordinals within a table fail closed, and read APIs return deterministic source order.

### PrimaryKeyObservation / UniqueConstraintObservation / ForeignKeyObservation / CheckConstraintObservation

Unique constraints retain null-comparison evidence as unknown, observed distinct, or observed not-distinct. The existing constructor leaves this evidence unknown; observing it produces a new value without changing the original. The Source Observation aggregate binds all three states into v2 snapshot content identity and derived receipts. This is source fact preservation, not a rule for promoting a relational key to semantic authority.

Immutable Source Observation value objects for deterministic constraint evidence. Composite key order is preserved exactly. Foreign keys retain ordered local and referenced coordinates, including cross-schema targets. When the source adapter observes foreign-key reference behavior, `ForeignKeyReferenceBehavior` preserves exact `ON UPDATE` and `ON DELETE` actions, any PostgreSQL column subset targeted by `ON DELETE SET NULL (...)` or `SET DEFAULT`, match type, and deferrability/initial timing; when it observes PostgreSQL 18 constraint state, `ForeignKeyObservation` also preserves exact `convalidated` and `conenforced` booleans. Either metadata family remains explicitly absent when not observed rather than deriving PostgreSQL defaults.

`CheckConstraintObservation` retains the reconstructed PostgreSQL definition together with validation, enforcement, and `NO INHERIT` status. PostgreSQL stores a CHECK expression internally and recommends `pg_get_constraintdef()` for reconstruction, so ConceptWeave preserves that adapter-supplied definition as source evidence rather than parsing it into guessed ordered column coordinates. Constraint names remain unique within a table observation, while explicit PK/unique/FK coordinate lists must bind to observed local columns. These contracts preserve source metadata only and do not infer join semantics, CHECK dependencies, or business meaning.

### SemanticCandidate

Smallest consistency boundary for a single proposed semantic artifact and its evidence-bound publication state. It cannot jump directly from Draft to Published.
Expand Down Expand Up @@ -81,14 +114,16 @@ Truth status and publication workflow are distinct. A source observation can be
- Keyverse: future identity/tenant authentication boundary.
- Consuming products: retain tenant/purpose authorization, business-domain truth, and physical data/query execution behind their own ACLs.

No direct cross-service application-table SQL is permitted.
No direct cross-service application-table SQL is permitted. A PostgreSQL Source Observation adapter may access only explicitly authorized read-only metadata through the port contract and must not become a hidden foreign-product repository.

## Current directory structure

```text
crates/
conceptweave-domain/ # Core candidate/evidence lifecycle contracts
conceptweave-client/ # Offline release admission, compatibility, integrity and supersession validation
conceptweave-observation/ # Provider-independent immutable source-observation facts
conceptweave-source-port/ # Request admission, registry authorization and source-access execution seam
contracts/ # Versioned public JSON Schemas and fixtures
docs/
adr/ # Proposed/accepted architecture decisions
Expand Down
Loading