Skip to content

Commit ca22b1b

Browse files
committed
Preserve strict current-job proof and full Kurrent fixture metadata
1 parent d50001d commit ca22b1b

17 files changed

Lines changed: 829 additions & 5 deletions

‎docs/ADR/ADR-065-full-sql-client-compatibility.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ the ADMIN catch-all. All command semantic contracts and qualification remain
3434
pending. This layer does not replace separate expression/type/function/operator/
3535
clause/catalog/protocol inventories or authorize provider/session choices.
3636

37+
TASK-SQLC-R12 [pinned parser research](../implementation/sql-parser-candidate-review.md)
38+
compares managed SqlParserCS and native PostgreSQL parser bindings. Tagged
39+
libpg_query18.0.0 is the strongest inspected PG18 syntax reference, a planning
40+
inference; existing wrapper/package PG18 provenance remains unverified. No parser
41+
is selected or installed. Syntax structures do not provide catalog/type binding,
42+
authorized execution or client sessions. Freeze native ABI/RIDs, ownership,
43+
resource/cancellation/drain and typed-plan contracts before implementation; every
44+
advertised family still requires real differential execution and RF3 proof.
45+
3746
Official targets: [PostgreSQL18 SQL](https://www.postgresql.org/docs/18/sql.html),
3847
[syntax](https://www.postgresql.org/docs/18/sql-syntax.html),
3948
[protocol](https://www.postgresql.org/docs/18/protocol.html),
@@ -122,6 +131,21 @@ plan. Inherited capable workers have disjoint write scopes; root alone owns
122131
contracts/config/docs/Git. No suitable cheaper route is established for the
123132
shared lexical/outcome boundary; workers must escalate contract drift.
124133

134+
TASK-SQLC-R13 / AC006/007/008 source planning confirms that
135+
[IAtomicStore](../../src/KeyLoad.Abstractions/Storage/StorageContracts.cs) exposes
136+
callback-scoped reads/commits and
137+
[the gateway](../../src/KeyLoad.Server/Features/ClientApi/CanonicalOperationGateway.cs)
138+
dispatches one signed operation through an HTTP principal. A native session must
139+
not retain a storage view, impersonate that HTTP context or treat separate CALL
140+
commits as one SQL transaction. Freeze typed binding and same-cut model operators,
141+
atomic set-DML/DDL, transport-neutral verified dispatch/original settlement, then
142+
canonical session transaction read-cut/write-set/commit authority before wire
143+
implementation. Simple-query implicit batches, explicit BEGIN and modifying CTEs
144+
require their actual semantics and fault tests. Proposed API shapes remain
145+
planning only. The70-input audit binds inspected working bytes at HEAD8071148c,
146+
including undelivered composition work; it is not committed equality or runtime
147+
proof. Packet SHA256 `10b154a3a3786152c8e821026c4919b4efea70a1e609fac8b0f33dff2ef9fb7a`.
148+
125149
## Native transport and search freezes
126150

127151
No handshake/listener/session implementation is authorized by the lexical
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# ADR-068: Native benchmark gate repair
2+
3+
Status: Accepted bounded implementation contract; qualification pending.
4+
Date: 2026-10-03. Root integration owns BenchmarkComparisons and all shared joins.
5+
Related REQ-NGR-001..004 / AC-NGR-001..004 in
6+
benchmark-native-gates-repair.acceptance.md; existing REQ-BC-006/009/050..058,
7+
ADR-056/062/064 and native ownership/ACK contracts remain mandatory.
8+
9+
## Decision and actual baseline
10+
11+
Original dbd01269 Bench37120639751 attempt1 exposes a stale current-job list
12+
record for RabbitMQn2 DocumentDelete. The executing job is returned queued; the
13+
strict existing running-state assertion rejects before any image/database/timing.
14+
The original qualification ZIP11273123955 SHA256
15+
`e95a08d07bfd7f53e22d8361b8911791032d0bf49e9010bea48d8fcd9813bace`
16+
matches provider/upload proof. Accepting queued as running is forbidden.
17+
18+
Keep bounded attempt-page discovery and all existing source/job/attempt/main/
19+
workflow and existing canonical-or-legacy URL checks. Corroborate only the discovered ID through the
20+
authenticated exact jobs/{id} endpoint. A still-queued same-identity/null-result
21+
record permits at most3 captures separated by1000ms. Any mismatch, terminal/
22+
unknown state or network/parse failure rejects immediately; final queued state
23+
rejects. Only exact in_progress/null-result authority permits native allocation.
24+
No reselection, workload retry, invented runtime evidence or queued success.
25+
26+
```mermaid
27+
flowchart LR
28+
Pages[Original bounded attempt pages] --> ID[One exact current job ID]
29+
ID --> Direct[Authenticated same ID metadata]
30+
Direct --> Validate[Identity and running state]
31+
Validate -->|queued bounded refresh| Direct
32+
Validate -->|strict running proof| Native[Selected native workload]
33+
Validate -->|invalid or exhausted| Fail[Retained failed evidence]
34+
```
35+
36+
## Implementation contract
37+
38+
1. TASK-NGR-R1/R2 root reviews immutable original RabbitMQ and Kurrent failed
39+
reports/logs/provider bindings; retain causes separately. Read-only discovery
40+
may not grant capability, rewrite measurements or qualify native behavior.
41+
2. TASK-NGR-G1 bounded gpt-6-luna/high worker first authors NEW
42+
UnitTests Features/BenchmarkComparisons/IsolatedCurrentJob-prefixed TUnit/Node
43+
regressions from real retained provider records and controlled negative data.
44+
No HTTP service/handler or native substitute. Root verifies every test/diff.
45+
3. The same worker owns only NEW scripts Features/BenchmarkComparisons/
46+
isolated-current-job.mjs and the necessary existing isolated-github-api.mjs /
47+
isolated-github-job.mjs joins. Use existing captureApi/requestNative byte,
48+
network, rate and original-child lifetime bounds. NEW private constants fix
49+
captures3/delay1000; no shared GH/transport/workflow changes. Preserve original
50+
pages and every exact request/response under current-job-refresh-NN files;
51+
final job.json and environment ID appear only after strict fresh validation.
52+
Existing validateJobIdentity remains authoritative, including optional attempt
53+
validation and its canonical-or-legacy URL forms; require same discovered ID,
54+
workflow/main and running/null-result state independently. No detached race,
55+
unbounded polling, stale successful fallback or new public evidence schema.
56+
4. TASK-NGR-K1 metadata/leader work beyond accepted stageA below remains pending
57+
a separate root-frozen source contract. Existing Kurrent1/3 run actual workloads then fail
58+
metadata0-versus76; n2 fails native setup with NotLeaderException. Determine
59+
actual caller/custom/system metadata and supported SDK leader routing first.
60+
Do not discard metadata assertions, retry measured writes, infer membership/
61+
copies/quorum, alter55,378original ownership streams or reduce16worker cleanup.
62+
5. Root joins disjoint results, reviews trust/lifetime/complexity, builds enabled
63+
full Release, canonical formatter and static governance. Deliver only scoped
64+
stable source on current main, preserving unrelated working changes.
65+
6. TASK-NGR-Q1 exact source GitHub normal/scalar/recovery/RF3 and all27preflight/
66+
270scenario native jobs plus original artifact authentication/aggregation/site
67+
must pass. Unsupported Rabbit DocumentDelete remains explicit unavailable
68+
without timing; the observed startup failure is not an unsupported measurement.
69+
TimeSeries6/30 remains separately pending. Missing coverage/fault gates stay open.
70+
71+
## Migration, rollout and rollback
72+
73+
Only private startup capture files are additive. No public request/result/data,
74+
image/package/credential/measurement change. Roll back helper and two source joins
75+
plus their focused tests coherently; preserve historical original artifacts.
76+
Full cohort publication stays blocked until every required original proof joins.
77+
Kurrent rollout/rollback must be frozen before that stage's implementation.
78+
79+
Source review covers actual transport joining and absence of doubles. First-author
80+
pure policy tests cover stale/valid/wrong-ID/source/attempt/terminal/error records;
81+
Actual source review verifies the fixed three captures, two bounded waits, immediate
82+
transport failure and absence of writes before final validation. Pure classifier
83+
tests do not execute refresh exhaustion or authenticate HTTP. Actual GitHub
84+
current-job startup must cover authenticated transport/exhaustion and original
85+
same-ID running proof. Neither source/static checks nor supplied JSON authenticate
86+
the provider. Every worker escalates contract/scope/lifecycle drift. This ADR stays
87+
Accepted until all required implementation and genuine verification exist.
88+
89+
## Accepted Kurrent metadata stage A
90+
91+
The exact pinned1.4.0 DLL (SHA2560f19cb40551bd5b7548ea1ef3afb2e4326d9b2dc05ac4b0eef7baf3ffde816c2)
92+
confirms custom metadata containing both $traceId/$spanId is preserved unchanged.
93+
Its nuspec names upstream commit e041cf8f459d6abe05f39918ecd62a71038b9ddc. The
94+
root-reviewed source correction records that canonical-volume events originally
95+
omit metadata; the distinct ownership fixture is not their source. Original76
96+
bytes remain unobserved and tracing cause is an inference, not qualified fact.
97+
98+
TASK-NGR-K1A / REQ-NGR-002 / AC-NGR-002 stageA is approved after this literal source
99+
review. A bounded gpt-6-luna/high worker owns only the two existing ComparisonTests
100+
IsolatedKurrentVolumeRegressionFixture/Native files. First strengthen the actual
101+
full-volume readback assertion to complete original EventData.Metadata byte
102+
equality; then construct canonical fixture events with nonempty owner metadata
103+
and explicit valid $traceId/$spanId values so the SDK preserving branch gives an
104+
independent exact expected value. Preserve all other ID/revision/payload/type/
105+
content/55,378streams/16workers/foreign/cleanup assertions, deadlines and lifecycle.
106+
No observed-length tolerance, property dropping, Activity disabling, target or
107+
package workaround, workload retry or changed measurement. Existing actual native
108+
preflight1/2/3 joins prove this stage; empty-caller ambient tracing and n2 routing
109+
remain separate pending qualification. Root source build/format/review joins precede
110+
stable delivery; rollback both fixture data/oracle coherently. Original failed
111+
artifacts stay immutable. This partial stage cannot close complete AC002/003/004.
112+
113+
Root additionally retained the [exact official SDK source](https://github.com/kurrent-io/KurrentDB-Client-Dotnet/blob/e041cf8f459d6abe05f39918ecd62a71038b9ddc/src/KurrentDB.Client/Core/Common/Diagnostics/EventMetadataExtensions.cs)
114+
at that nuspec commit. SHA256
115+
`f7c0764bdcb611ec7a7b969dca2e114a66e96075fb969745124734905f32decf`
116+
binds the inspected file; the both-properties preserving branch agrees with the
117+
exact distributed binary. This confirms the stageA expectation, not the original
118+
76-byte cause or any native test pass.

‎docs/ADR/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
| [ADR-065 full SQL and client protocol](ADR-065-full-sql-client-compatibility.md) | Accepted staged lexical contract; full execution/native qualification pending | QueryExecution, ClientApi, RelationalStorage, Search |
7676
| [ADR-067 composable agent database](ADR-067-composable-agent-database.md) | Accepted; bounded atomic composition source, full SQL and exact-SHA qualification pending | DatabaseComposition, QueryExecution, ClientApi |
7777

78+
| [ADR-068 native benchmark gate repair](ADR-068-native-benchmark-gate-repair.md) | Accepted bounded current-job capture; native and complete cohort qualification pending | BenchmarkComparisons |
79+
7880
## Ідентичність і пріоритет
7981

8082
Owner-directed unified AI database continuation:

‎docs/Architecture.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ Full PostgreSQL-compatible execution and native transport are pending. The
5151
adds search integration/correctness/recovery/resource/performance gates without
5252
selecting a provider or promising acceleration.
5353

54+
[ADR-068](ADR/ADR-068-native-benchmark-gate-repair.md) preserves isolated benchmark
55+
startup authority: original bounded job discovery joins authenticated metadata for
56+
the same job ID before native allocation. Still-queued metadata has three bounded
57+
captures; identity/state failures remain failures. Kurrent metadata/leader gates
58+
and complete native cohort/site qualification remain open.
59+
5460
```mermaid
5561
classDiagram
5662
SqlParser --> SqlTriviaReader : bounded token trivia

‎docs/Features/BenchmarkComparisons.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# BenchmarkComparisons
22

3+
[Native gate repair](BenchmarkComparisons/NativeGateRepair.md) / [ADR-068](../ADR/ADR-068-native-benchmark-gate-repair.md)
4+
preserves full isolated scope while repairing actual stale startup job proof and
5+
investigating Kurrent metadata/leader failures from dbd01269 original artifacts.
6+
The bounded same-ID current-job refresh and exact canonical fixture metadata
7+
contracts are frozen; native leader routing and complete cohort qualification remain open.
8+
39
## Shared parallel performance pipeline
410

511
REQ-PIPE-005/006 and AC-UB-001..006 in
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# BenchmarkComparisons native gate repair
2+
3+
Status: Accepted AC001 and AC002 stage A contracts; reviewed source implemented,
4+
exact-source GitHub qualification pending.
5+
[ADR-068](../../ADR/ADR-068-native-benchmark-gate-repair.md) owns stages, exact paths,
6+
root/worker permissions, bounds, rollback and join conditions. All parent
7+
BenchmarkComparisons guarantees,1/2/3node cells and270scenario scope remain.
8+
9+
|Requirement|Acceptance and test trace|
10+
|---|---|
11+
|REQ-NGR-001 fresh executing-job authority|AC-NGR-001 / TASK-NGR-G1: exact same-ID authenticated metadata, up to3captures/1000ms, all identity/running checks preserved. First-author real-provider-data policy regressions plus actual GitHub startup. Stale queued/exhausted/mismatched/terminal/error authority rejects before any database/timing.|
12+
|REQ-NGR-002 exact Kurrent event preservation|AC-NGR-002 / TASK-NGR-R2/K1: source-contract freeze then genuine SDK original/custom/system metadata equality and unchanged55,378owned-stream/foreign/cleanup proof on1/2/3. Implementation pending; hard-coded empty assumption is not a valid completeness oracle.|
13+
|REQ-NGR-003 actual native leader routing|AC-NGR-003 / TASK-NGR-R2/K1: pinned SDK/advertised-endpoint source freeze, actual leader/follower/native setup proof and observed members/copies/ACK. Implementation pending; no guessed leader, independent nodes or measured write retry.|
14+
|REQ-NGR-004 genuine complete publication|AC-NGR-004 / TASK-NGR-Q1: full source/normal/scalar/recovery/RF3/native preflight270/cohort/site original source/run/attempt/upload/digest/report evidence. Failed/cancelled/skipped/unavailable data remains honest.|
15+
16+
```mermaid
17+
flowchart LR
18+
Original[Retained actual failures] --> Contract[Frozen preserving repair]
19+
Contract --> Tests[First authored real policy and native cases]
20+
Tests --> GitHub[New exact source isolated jobs]
21+
GitHub --> Proof[Complete original authenticated cohort]
22+
Proof --> Site[Qualified generated metrics]
23+
```
24+
25+
Canonical slice map: scripts Features/BenchmarkComparisons current-job helper/API/
26+
job; UnitTests Features/BenchmarkComparisons new IsolatedCurrentJob files;
27+
ComparisonTests Features/BenchmarkComparisons genuine Kurrent fixtures; benchmark
28+
native Kurrent adapter only after its separate contract freeze. Root owns docs,
29+
workflow/configuration/source joins/Git; coding workers own disjoint frozen files.
30+
Abstractions/backend/frontend changes are N/A for AC001: private startup proof
31+
keeps public schemas, engine operations and site values. Kurrent stage's precise
32+
paths are pending root freeze. Native transport is real and bounded; no doubles.
33+
34+
Baseline is actual dbd01269 Bench37120639751 attempt1: RabbitMQ startup fails
35+
before native work, Kurrent1/3 post-run metadata fails and Kurrent2 setup fails.
36+
Original reports remain immutable. Pending/cancelled runs and development checks
37+
are not qualified results. Local tests/runtime are not used for this repair;
38+
canonical GitHub invocations follow root policy. Numeric coverage collector,
39+
full faults/endurance and complete TimeSeries family remain open.
40+
41+
AC-NGR-002 stageA is frozen in ADR068: strengthen the existing genuine full-volume
42+
preflight oracle to exact original custom-metadata byte equality, using nonempty
43+
caller owner metadata and valid explicit tracing fields which pinnedSDK1.4.0
44+
preserves. Only the two canonical-volume fixture/helper files change; measured
45+
target data and every existing ownership/foreign/cleanup assertion remain. Empty
46+
caller tracing characterization and n2 routing stay pending. New source is not
47+
native qualification; all1/2/3 originals must join before this stage is proven.
48+
49+
The [source-stage receipt](../../implementation/native-benchmark-gates-source-stage-001.json)
50+
binds the integrated d500 prerequisite and reviewed files to the full Release,
51+
formatter and static governance checks. All nineteen policy cases and native
52+
metadata/readback/current-job transport behavior remain GitHub-unqualified.

0 commit comments

Comments
 (0)