Skip to content

Commit cb5ce1f

Browse files
committed
Join native request work before node shutdown
Commit all current KeyLoad changes, consume published Communication 10.2.11 and retain the owning release and original development evidence. Full Release build, formatter and governance pass. Native owner/kernel cases pass 7/7; full normal unit is 3247/3248 with the original process-identity failure retained. RF3, scalar, Linux and endurance acceptance remain open.
1 parent 483a76a commit cb5ce1f

39 files changed

Lines changed: 2112 additions & 139 deletions

‎Directory.Packages.props‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<PackageVersion Include="Cartograph.Catalog" Version="0.1.0-alpha" />
99
<PackageVersion Include="ZoneTree" Version="1.9.8" />
1010
<PackageVersion Include="ZoneTree.FullTextSearch" Version="1.0.9" />
11-
<PackageVersion Include="ManagedCode.Communication" Version="10.2.9" />
12-
<PackageVersion Include="ManagedCode.Communication.AspNetCore" Version="10.2.9" />
13-
<PackageVersion Include="ManagedCode.Communication.Orleans" Version="10.2.9" />
11+
<PackageVersion Include="ManagedCode.Communication" Version="10.2.11" />
12+
<PackageVersion Include="ManagedCode.Communication.AspNetCore" Version="10.2.11" />
13+
<PackageVersion Include="ManagedCode.Communication.Orleans" Version="10.2.11" />
1414
<PackageVersion Include="ManagedCode.TimeSeries" Version="10.0.3" />
1515
<PackageVersion Include="ManagedCode.Storage.FileSystem" Version="10.0.13" />
1616
<PackageVersion Include="ManagedCode.Orleans.Graph" Version="10.0.10" />

‎docs/ADR/ADR-002-command-idempotency.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,38 @@ Persisting command identity with effects resolves lost responses across process
2424

2525
Dependencies: [ADR-001](ADR-001-partition-identity-affinity.md), [ADR-003](ADR-003-durability-ack-barrier.md), [ADR-004](ADR-004-committed-read-views.md), [ADR-005](ADR-005-canonical-keyspace-codec.md), [ADR-011](ADR-011-format-upgrades.md), and [ADR-016](ADR-016-atomic-physical-placement.md). Stop if canonical fingerprint or dedup expiry behavior is not specified. Do not infer exactly-once handler execution or include an external API call in the database transaction.
2626

27+
## TASK-DSTORE-COMMAND-100-RESTART implementation contract
28+
29+
Current command outcomes have no automatic TTL or purge implementation. A
30+
matching authorized retry resolves its retained canonical outcome in the same
31+
store incarnation. This does not promise a finite minimum retention period,
32+
eternal replay after explicit store/record removal, or replay across a changed
33+
incarnation; an existing outcome from another incarnation is TokenInvalidated.
34+
Adding expiry, purge, a minimum temporal horizon or an outcome-format change
35+
requires its own accepted policy and migration contract before implementation.
36+
37+
REQ-DSTORE-006 / AC-DSTORE-006 and original KL-012 require two actual CrashHost
38+
processes over one owned native ZoneTree store. The first commits one authorized
39+
document/event/queue batch, verifies exactly one hundred matching retries and
40+
changed-content Conflict, captures the original complete receipt as bounded test
41+
evidence, and waits at the existing real process-kill handshake. The parent kills
42+
and joins that child. A distinct second process opens the same store and verifies
43+
one hundred more matching retries, the retained authorized outcome, unchanged
44+
receipt and single effects, changed-content Conflict and healthy follow-up.
45+
Evidence sidecars are never canonical recovery authority. Physical commit/log
46+
position may advance on replay; the original receipt, domain effects and outbox
47+
cut must remain exact. A runner-only close/reopen is not process-restart proof,
48+
and process kill is not power-loss qualification.
49+
50+
Ordered ownership: root freezes this contract and owns the minimal mode dispatch
51+
join in `tests/KeyLoad.CrashHost/Features/StorageRecovery/Helpers/CrashHostApplication.cs`.
52+
The query worker owns new scenario/helper files only under CrashHost and
53+
RecoveryTests `Features/DocumentStorage/`; one canonical DocumentStorage slice
54+
applies on both surfaces. Root reviews, joins, runs the actual Aspire recovery
55+
entry, retains original artifacts and updates KL-012. No new project, public API,
56+
serializer/fingerprint change, TTL path or copied database implementation is in
57+
scope. Root retains the required exact-source Linux recovery and RF3 gates.
58+
2759
```mermaid
2860
flowchart LR
2961
Request[Authenticated command ID and payload] --> Canonical[Resolve scope and fingerprint]

‎docs/ADR/ADR-018-global-rank-fusion.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,27 @@ Related: `REQ-SEARCH-001/AC-SEARCH-001`, `REQ-SEARCH-002/AC-SEARCH-002`, `REQ-SE
3333
5. Run TUnit and RF3 Search through .NET and official MCP SDK in GitHub Actions; publish quality evidence with source SHA before claiming qualification.
3434

3535
Current source: `src/KeyLoad.Query/Features/Search/Queries/SearchEngine.cs`, `src/KeyLoad.Core/GraphAndSeries.cs`; current tests: `tests/KeyLoad.UnitTests/GraphAndSearchTests.cs`. Planned external/provider files are owned by Search, not this ADR. Dependencies: ADR-009, ADR-019, ADR-020, ADR-022. Owner: Search lead; global quality/review join: root.
36+
37+
## Controlled prototype stage,2026-10-05
38+
39+
TASK-SEARCH-QUALITY-CORPUS implements REQ/AC-SEARCH-007 in
40+
[Search](../Features/Search.md#task-search-quality-corpus-controlled-relevance-and-window-sensitivity).
41+
Root freezes32 fixed documents, four-dimensional vectors, six independent query
42+
and graded-qrel definitions, Recall@5/10, MRR@10, nDCG@5/10 and test-only
43+
per-branch widths1/4/8/32. Independent eligibility and metric goldens accompany
44+
real ZoneTree/ZoneTree.FullTextSearch and production three-way ranking. There is
45+
no production per-branch window control in SearchRequest; this stage therefore
46+
measures sensitivity over complete real branch observations using the existing
47+
fusion and merger kernels, with explicit truncation. It cannot qualify an absent
48+
request-time feature or a distributed scorer/statistics epoch.
49+
50+
Ordered delivery: root freezes the linked REQ/AC contract; Luna cluster_wave adds
51+
only new HybridQuality-prefixed Search unit cases/helpers/pure data; root reviews
52+
the qrels, independent oracles, actual-provider ownership and numeric limits,
53+
integrates and runs Aspire normal/scalar tests with original source inventories,
54+
then commits. Existing production source and BenchmarkComparisons ownership stay
55+
with their current owners. No dependency, persisted format, wire or runtime
56+
ranking change occurs; removal of the controlled tests is the rollback. Actual
57+
native RF3 clients, scorer-variant and masking/freshness/performance comparisons,
58+
preselected primary target and authenticated gain/no-gain publication remain later
59+
join points. This ADR remains Proposed for the broader global-ranking contract.

‎docs/ADR/ADR-082-native-cqrs-streams.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ AC-CRS-003 also hardens the existing canonical offline verifier/upgrade process
7070

7171
TASK-CRS-C1-FATAL uses published Communication10.2.9's native CqrsRuntimeFailures.FindFatal for direct and deeply nested AggregateException failures. New test-owned RequestCqrsFatalSettlement controls exercise native creation, pulls, disposal and activation cleanup, preserve exact preconstructed fatal identity with primary/disposal/activation precedence, and join every admitted cleanup before a healthy following stream. Ordinary failure and cancellation controls remain required. Owning publication and local mechanism tests alone do not qualify C1 or mark this ADR Implemented.
7272

73+
Checkpoint2026-10-05: TASK-CRS-CANCEL-FAILURE-JOIN is delivered through actual
74+
published Communication10.2.11, successful Release37250149897 and verified official
75+
NuGet restoration/DLL bytes. Owning native TUnit passed1363/1363. TASK-CRS-NODE-WORK-JOIN
76+
is integrated with actual node drain preceding native silo stop and physical
77+
cleanup. Aspire-selected owner/kernel tests passed7/7; full normal unit passed
78+
3247/3248 and remains a failed gate because the actual Node process identity test
79+
failed. Both source/runtime input inventories are unchanged. See the linked
80+
feature's original development and delivery receipts. RF3, migration and complete
81+
scalar/Linux/resource/endurance qualification remain open; this ADR is not marked
82+
Implemented by a source checkpoint or an owning package release.
83+
7384
Rollback of C0 removes unused test infrastructure; it cannot establish product stream readiness. Later product rollout, rollback, long-work checkpoint authority, terminal cancellation and fault qualification require their concrete accepted contracts. Frontend N/A: no UI. Required real SDK/MCP Docker/Aspire RF3, recovery, resource and exact-source Linux gates remain mandatory.
7485

7586
TASK-CRS-C1-IMAGE/RF3 follow the accepted same-epoch image/AppHost contract in NativeCqrsRequestV2. The immutable prior executable is377886f35928866f083806062b446056d64539e3, data epoch6/RPC1/peer2, independently inventoried against all native Git blobs. A distinct ClusterRouting producer/proof binds that source separately from the actual current Linux docker-rf3 job. Root adds only an explicitly enabled ephemeral fixed-three-voter test image seam and preserves homogeneous current and native5 proofs. Genuine cold seed, mixed rejection, homogeneous current rollout/receipt preservation, homogeneous rollback, and two-survivor/rejoin waves use SDK/official MCP through owned Aspire resources; live HTTP/cache/shutdown controls remain separate. Per-voter admission, exact image/reference metadata, typed public rejection, finite bounds, cleanup/join ownership, files, worker roles and evidence are frozen in that feature contract before writes.

‎docs/Features/ClusterRouting/NativeCqrsRequestV2.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,24 @@ No public stream, binary alias/field ID, database format or dependency replaceme
131131
is introduced. Rollback retains the previous published package and its explicit
132132
failed-join evidence; no local package or project reference qualifies delivery.
133133

134+
Delivery checkpoint2026-10-05: the owning repair is published as10.2.11 from
135+
Communication commit7777c90761f04b4bcffec1b5846fb74f96b8c072 through successful
136+
Release37250149897. Owning full native TUnit passed1363/1363. KeyLoad's three
137+
central references were restored from the official NuGet v3 feed; signed package
138+
repository commits and restored runner DLL bytes match the actual published
139+
payloads. The [delivery receipt](../../implementation/native-cqrs-cancel-join-delivery-2026-10-05.json)
140+
retains original evidence. Earlier10.2.9/10.2.10 records below remain history.
141+
142+
NodeWork development checkpoint75g: full Release build passed with0 warnings and
143+
0 errors; actual Aspire selected owner/kernel tests passed7/7, including the real
144+
held-finally and throwing-callback join. Full normal unit passed3247/3248; its one
145+
failure was an actual process StartTime observation in the comparison process-tree
146+
test, with its cleanup cancellation retained. The full gate is failed. Both
147+
cohorts' HEAD, all source and executable/runtime input inventories stayed unchanged;
148+
only explicitly identified native TestCluster output logs are excluded from inputs.
149+
The [development receipt](../../implementation/node-work-development-2026-10-05.json)
150+
does not close the RF3 phase, migration, scalar/Linux, resource or endurance gates.
151+
134152
TASK-CRS-C1-PRIOR-CHECKPOINT, accepted 2026-10-05, retains AC-CRS-002 and
135153
ADR-077/091's actual cold native6-to-native7 migration evidence after original
136154
run37242346547. One ten-document command does not produce the required native

‎docs/Features/DocumentStorage.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ The current root-level files are documented migration debt under ADR-032, not th
3939
| REQ-DSTORE-003: enforce row/field policy at every document boundary | AC-DSTORE-003 passes when unauthorized row writes/reads and protected field use fail or project according to policy; tenant or row ownership cannot be supplied to gain access. | Existing `NestedSensitiveFieldsAreOmittedAndAliasedPredicateAndSortAreDenied`, `RowScopeAndTenantCannotBeForged`; actual field/row/tenant matrix plus isolated replacement-write and Delete-index-use controls. Local full-suite evidence below; exact-source CI qualification pending. |
4040
| REQ-DSTORE-004: share an atomic transaction domain with eligible events and queues | AC-DSTORE-004 passes when document + event + local enqueue commit together or all remain absent, same command retry returns the stored outcome, and identical partition-key text in unrelated domains stays isolated. | Existing `DocumentEventAndQueueCommitTogetherAndCommandRetryDoesNotRepeatEffects`, `UniqueConflictRollsBackDocumentIndexEventAndEnqueue`, `SameLiteralPartitionKeyCannotCrossTransactionDomains`. CI qualification pending. |
4141
| REQ-DSTORE-005: reuse transaction-scoped document images | AC-DSTORE-005 passes when one before-record lookup supplies CRUD and outbox; no final staged lookup/decode is required; exact bytes, revisions, tombstones, indexes, authorization, quotas and sequential same-ID mutations remain intact. | TASK-MP-007I in ADR-035; new real-store paired-size/counter and before/after/failure cases plus existing transaction/change-feed/recovery/RF3 regressions; GitHub evidence pending. |
42+
| REQ-DSTORE-006: retain command identity and outcome atomically across real process restart | AC-DSTORE-006 passes when two distinct actual CrashHost processes execute one hundred same-ID/same-content retries each around a real first-process kill; every result matches the original complete receipt, while one document revision, one event, one Ready queue message and the exact batch outbox cut remain. Same-ID/changed-content returns Conflict without changing effects or the original outcome; a fresh authorized command succeeds afterward. | TASK-DSTORE-COMMAND-100-RESTART in ADR-002; new `CommandIdempotencyProcessRecoveryTests` and actual CrashHost scenario under `Features/DocumentStorage/`. This remains planned until original Aspire/native reports exist. |
43+
44+
The current command-outcome retention contract has no automatic TTL/purge path.
45+
Retries are supported while the original outcome remains in the canonical store
46+
with the same incarnation and current persisted authorization. No finite minimum
47+
time window or retry guarantee after explicit outcome/store removal or changed
48+
incarnation is advertised. This is documented current behavior, not an implemented
49+
expiry policy. A new policy needs an accepted ADR and its own qualification.
4250

4351
The accepted [ADR-035 document image contract](../ADR/ADR-035-memory-performance.md)
4452
assigns CRUD handlers and new matching tests to one worker, and shared

‎docs/Features/ResourceExecution.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,3 +477,32 @@ measurement claim follows from authored counters or local static validation.
477477
Рішення: [ADR-010](../ADR/ADR-010-query-budgets-security.md), [ADR-028 scheduling time](../ADR/ADR-028-persisted-scheduling-time.md), [ADR-031 modular resource isolation](../ADR/ADR-031-modular-all-in-one-resource-isolation.md), ADR-035. TimeProvider.System залишається host/Orleans clock; operation clock не заморожує cluster runtime. Mixed query/search/graph/event/queue workloads потребують real correctness+liveness tests, а не окремих synthetic doubles.
478478

479479
Shared primitive/config/telemetry composition мають одного integration owner; бізнес-work і matching tests залишаються в owning `Features/<SliceName>/`. Configuration validation, invalid bounds, zero/empty work, overflow, cancellation/deadline і healthy follow-up входять до AC. Freeze shared limits → real regression source → feature fixes → integrated GitHub gates → actual measurements. Local doc review не доводить numeric coverage, memory ceilings чи performance gain; metrics публікуються тільки з successful GitHub JSON.
480+
481+
### TASK-CACHE-EXPIRY-ORACLE: real prepare-origin expiry measurement
482+
483+
REQ-CACHE-EXPIRY-ORACLE-001 preserves REQ-CACHE-004/005 and the existing
484+
15-second prepare-origin lease and 10-second acceptance ceiling. A real-clock
485+
test must distinguish prepare age from receipt age while observing the actual
486+
permit and native ZoneTree cache. Source clocks, production bounds and persisted
487+
authority are unchanged. ADR-058 already specifies this contract; no new boundary
488+
or timing semantics are introduced.
489+
490+
AC-CACHE-EXPIRY-ORACLE-001 maps to
491+
`CacheReadPermitExpiryTests.LeaseExpiresAtFifteenSecondsFromItsPrepareTimestamp`
492+
and `ZoneTreeCoordinatedPointCacheReadTests.ExpiredWarmReceiptFallsBackToOneNativeReadWithIdenticalBytes`.
493+
Only these two methods are isolated with TUnit `NotInParallel`. Accept at a
494+
measured prepare age of at least six seconds and below the unchanged ten-second
495+
ceiling; use monotonic elapsed-time polling with a one-millisecond minimum delay.
496+
Observe after prepare age reaches fifteen seconds plus the existing fifty-
497+
millisecond boundary margin, and still require receipt age below fifteen seconds.
498+
Keep the original thirty-second caller bound, stale capture/revision rejection,
499+
renewal proof, identical bytes and exactly one native fallback lookup. Open, seed
500+
and compose the real ZoneTree store before starting its lease measurement.
501+
Neither a fake clock nor an increased lease/deadline or removed assertion is an
502+
acceptable correction. Preserve the two failed original Linux reports from
503+
run 37249197752 before recording any new local or exact-source Linux result.
504+
505+
The lead freezes and reviews this scope, joins the source and owns Aspire tests,
506+
receipts and commits. The query worker owns a private patch for only the two
507+
existing Cases files and, if required, one cohesive real-clock Helpers file.
508+
Other test methods, cache admission and production code are outside this stage.

0 commit comments

Comments
 (0)