Skip to content

Commit ee4a064

Browse files
Authorize CK-08R3A schema and publication transition
Squash merge of the narrowly scoped CK-08R3A schema/publication/accounting authority transition. Implementation remains permitted_not_accepted and Conditional Ready.
1 parent 3391244 commit ee4a064

18 files changed

Lines changed: 1085 additions & 15 deletions

docs/INDEX.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Retained CK-08R3 `a28e9cdbff8e48d334712a449fdcee111c725673` then stopped
2121
before scale on first/deep EvidenceService EXPLAIN. CK-08R3A owns that separate
2222
fix; CK-08R3 awaits its accepted merge/exact-main verification. Independent
2323
truth now consumes [`answer-semantics.v1`](../config/agent-kernel/answer-semantics-v1.json);
24+
The linked [CK-08R3A schema/publication requalification authority](decisions/evidence/ck08r3a/schema-publication-requalification-authority.json)
25+
binds only the resulting 57-index schema digest, synthetic publication fixture
26+
manifests, and compatible tiny-accounting EXPLAIN expectation; R3A remains
27+
Conditional Ready and implementation remains unaccepted.
2428
R1C is accepted at exact main `fb0c57886097a6b985d2f321b2de858cbdfc0a97`;
2529
R1B remains held on shared query/evidence/grading integration before final R1
2630
requalification.

docs/architecture/AGENT_KERNEL_DATABASE_V1_SCHEMA_CONTRACT.md

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,172 @@ inventory is unchanged. `active_rate_card` remains the publication-selected
2828
head; publication validation must reproduce its complete predecessor chain
2929
before promotion.
3030

31+
## CK-08R3A schema/publication transition authority
32+
33+
The canonical database-v1 contract above remains the predecessor contract
34+
until the CK-08R3A implementation is accepted. The selected EvidenceService
35+
candidate is permitted to requalify only with the exact transition below. It
36+
adds 13 evidence-order indexes, changes the resulting digest to
37+
`e3b8509774987fb4fd9cd09aeee1ab9ee32642932ea6a07726315154409b1e35`, and
38+
does not authorize any other schema, publication, selector, cursor, or query
39+
semantic change. The transition is a contract fixture, not an active DDL
40+
replacement on this authority branch.
41+
42+
<!-- ck08r3a-evidence-indexes-ddl:start -->
43+
```sql
44+
-- CK-08R3A EvidenceService branch order. These indexes mirror the
45+
-- seven-part keyset tuple exactly, including the normalized NULL-time
46+
-- expression and the transition tie-breaker. The turn constants are part
47+
-- of the persisted stream contract for turn boundary rows.
48+
CREATE INDEX evidence_model_calls_by_session_order
49+
ON model_calls(
50+
session_id ASC,
51+
(event_at_us IS NULL) ASC,
52+
COALESCE(event_at_us, 0) ASC,
53+
source_rank ASC,
54+
source_order ASC,
55+
event_kind_order ASC,
56+
call_id ASC,
57+
transition_rank ASC
58+
);
59+
CREATE INDEX evidence_model_call_tail_by_session_order
60+
ON model_call_tail(
61+
session_id ASC,
62+
(event_at_us IS NULL) ASC,
63+
COALESCE(event_at_us, 0) ASC,
64+
source_rank ASC,
65+
source_order ASC,
66+
event_kind_order ASC,
67+
call_id ASC,
68+
transition_rank ASC
69+
);
70+
CREATE INDEX evidence_tools_by_session_order
71+
ON tool_invocations(
72+
session_id ASC,
73+
(start_at_us IS NULL) ASC,
74+
COALESCE(start_at_us, 0) ASC,
75+
start_source_rank ASC,
76+
start_source_order ASC,
77+
start_event_kind_order ASC,
78+
tool_id ASC,
79+
start_transition_rank ASC
80+
);
81+
CREATE INDEX evidence_activities_by_session_order
82+
ON activities(
83+
session_id ASC,
84+
(event_at_us IS NULL) ASC,
85+
COALESCE(event_at_us, 0) ASC,
86+
source_rank ASC,
87+
source_order ASC,
88+
event_kind_order ASC,
89+
activity_id ASC,
90+
transition_rank ASC
91+
);
92+
CREATE INDEX evidence_state_changes_by_session_order
93+
ON state_changes(
94+
session_id ASC,
95+
(event_at_us IS NULL) ASC,
96+
COALESCE(event_at_us, 0) ASC,
97+
source_rank ASC,
98+
source_order ASC,
99+
event_kind_order ASC,
100+
change_id ASC,
101+
transition_rank ASC
102+
);
103+
CREATE INDEX evidence_compactions_by_session_order
104+
ON compaction_boundaries(
105+
session_id ASC,
106+
(event_at_us IS NULL) ASC,
107+
COALESCE(event_at_us, 0) ASC,
108+
source_rank ASC,
109+
source_order ASC,
110+
event_kind_order ASC,
111+
compaction_id ASC,
112+
transition_rank ASC
113+
);
114+
CREATE INDEX evidence_context_components_by_session_order
115+
ON context_components(
116+
session_id ASC,
117+
(event_at_us IS NULL) ASC,
118+
COALESCE(event_at_us, 0) ASC,
119+
source_rank ASC,
120+
source_order ASC,
121+
event_kind_order ASC,
122+
component_id ASC,
123+
transition_rank ASC
124+
);
125+
CREATE INDEX evidence_turns_by_session_order
126+
ON turns(
127+
session_id ASC,
128+
(start_at_us IS NULL) ASC,
129+
COALESCE(start_at_us, 0) ASC,
130+
0 ASC,
131+
COALESCE(start_source_order, 0) ASC,
132+
20 ASC,
133+
turn_id ASC,
134+
0 ASC
135+
);
136+
CREATE INDEX evidence_lifecycle_timeline_order
137+
ON lifecycle_transitions(
138+
(transition_at_us IS NULL) ASC,
139+
COALESCE(transition_at_us, 0) ASC,
140+
source_rank ASC,
141+
source_order ASC,
142+
event_kind_order ASC,
143+
transition_id ASC,
144+
transition_rank ASC
145+
);
146+
CREATE INDEX evidence_source_occurrences_by_logical_order
147+
ON source_occurrences(
148+
semantic_logical_id ASC,
149+
record_ordinal ASC,
150+
byte_start ASC,
151+
byte_end ASC,
152+
occurrence_id ASC
153+
);
154+
CREATE INDEX evidence_tools_by_resource_order
155+
ON tool_invocations(
156+
primary_resource_id ASC,
157+
(start_at_us IS NULL) ASC,
158+
COALESCE(start_at_us, 0) ASC,
159+
start_source_rank ASC,
160+
start_source_order ASC,
161+
start_event_kind_order ASC,
162+
tool_id ASC,
163+
start_transition_rank ASC
164+
)
165+
WHERE primary_resource_id IS NOT NULL;
166+
CREATE INDEX evidence_state_changes_by_resource_order
167+
ON state_changes(
168+
resource_id ASC,
169+
(event_at_us IS NULL) ASC,
170+
COALESCE(event_at_us, 0) ASC,
171+
source_rank ASC,
172+
source_order ASC,
173+
event_kind_order ASC,
174+
change_id ASC,
175+
transition_rank ASC
176+
);
177+
CREATE INDEX evidence_allowance_observations_order
178+
ON allowance_observations(
179+
(observed_at_us IS NULL) ASC,
180+
COALESCE(observed_at_us, 0) ASC,
181+
source_rank ASC,
182+
source_order ASC,
183+
event_kind_order ASC,
184+
observation_id ASC,
185+
transition_rank ASC
186+
);
187+
```
188+
<!-- ck08r3a-evidence-indexes-ddl:end -->
189+
190+
The selected block is composed after the canonical `analytical-ddl` payload
191+
and before the unchanged operational payload only when the linked
192+
schema/publication authority is accepted. Its exact 57-index inventory,
193+
publication manifest bindings, frozen synthetic fixture digests, and the
194+
tiny-accounting covering-index expectation are recorded in
195+
`docs/decisions/evidence/ck08r3a/schema-publication-requalification-authority.json`.
196+
31197
## Contract boundaries
32198

33199
The analytical artifact and operational sidecar are separate SQLite databases.

docs/decisions/evidence/ck08r3a/evidence-service-supersession-authority.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
"status": "must_be_regenerated_by_implementation_worker"
5656
}
5757
},
58+
"schema_publication_transition_authority": {
59+
"path": "docs/decisions/evidence/ck08r3a/schema-publication-requalification-authority.json",
60+
"status": "permitted_not_accepted",
61+
"authority_base_sha": "3391244ca07287e90fe5eba296d4a2d11e4f8918",
62+
"scope": "exact selected 13-index DDL/schema identities, linked synthetic publication fixtures, and tiny-accounting EXPLAIN transition"
63+
},
5864
"physical_decision": {
5965
"strategy": "branch_pruned_union_all_with_exact_evidence_order_indexes",
6066
"source_only_candidate": "insufficient_under_strict_no_temp_sort_gate",

0 commit comments

Comments
 (0)