|
| 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. |
0 commit comments