Skip to content

Commit 7784b6b

Browse files
committed
Reduce native scalar admission allocations
1 parent 870bd17 commit 7784b6b

12 files changed

Lines changed: 1295 additions & 75 deletions

File tree

‎AGENTS.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ For changes outside existing owner authorization, obtain direction before changi
393393
## Preferences
394394

395395
### Likes
396+
- Each agent MUST follow the execution plan for its own user-assigned task and complete only that task; change its scope only when the owner explicitly redirects it (owner correction 2026-10-03).
397+
- Other chats' plans, progress, requests and concurrent changes MUST NOT expand an agent's task or redirect its implementation. Preserve their work and leave their tasks to their owners (owner correction 2026-10-03).
398+
- Repairs and verification MUST stay within the assigned task. Report an unrelated failure to the owner without taking over its implementation; direct user instructions remain authoritative (owner correction 2026-10-03).
396399
- Frequent concise Ukrainian progress stating completed work, remaining work and real blockers.
397400
- The root README MUST introduce KeyLoad as a product: its purpose, connected data models, agent use cases, getting started, and direct credits to the projects it actually uses. Keep dependency versions in their canonical manifests and link to detailed technical documentation (owner correction 2026-10-03).
398401
- Shared-checkout work that preserves unrelated changes and completes authorized delivery.

‎docs/ADR/ADR-060-native-internal-serialization.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,3 +437,36 @@ original report inputs, exact ratios/intervals/launch summaries, source diff and
437437
independent reviewer signature. Controlled arithmetic cannot authenticate GitHub.
438438
Local BDN experiments are owner-authorized development evidence with actual
439439
source/machine/settings, and cannot qualify website/cluster results.
440+
441+
442+
## NSP006 development verification and assigned scope
443+
444+
AC-IS-PERF005 measurement scheduling is explicitly isolated after the actual full
445+
v7 report measured Normalize262480B and Require262144B while the focused exact
446+
comparison passed. This demonstrates a context-dependent measurement difference;
447+
it does not prove a specific CLR cache/GC cause or extra production allocation.
448+
The two scalar allocation tests use the pinned TUnit1.72.10 no-key NotInParallel
449+
class constraint, whose actual package XML specifies exclusion from every other
450+
test. Preserve the same32 warmups,4096 iterations, synchronous current-thread
451+
windows, outside-window data/assertions, exact0B and exact equality. No tolerated
452+
bytes, min-of-retries, extra cache, GC manipulation, removed case or changed
453+
production code. This follows the existing JsonTextAllocationTests scheduling
454+
boundary; all other tests remain parallel. The scalar worker owns only the one
455+
class scheduling attribute after root acceptance; root verifies the full normal/
456+
scalar suite and retains the original failed report.
457+
458+
The latest owner instruction confines this delivery to native Orleans serialization
459+
latency and allocations: NativeWireSupported and its four scalar regression files.
460+
The R19 process-observation repair branch was cancelled; all eight exact task-owned
461+
source edits were undone, with original sources and reports retained outside the
462+
checkout. The existing process-lifetime failure remains reported as unrelated
463+
verification evidence. No weakened assertion or process-helper change is delivered.
464+
465+
The historical native diagnostic run37129441460 at3ae408fe remains authenticated.
466+
Do not dispatch its former internal mode through benchmarks.yml; that workflow
467+
owns end-to-end database comparisons. Local full24-cell BDN pairs retain exact
468+
corpora, profile, actual host, controls and original samples. A source image must
469+
retain every tracked base file and only its declared overlays. Its results prove
470+
only that image, not a green shared checkout or delivered GitHub qualification.
471+
Images containing cancelled R19 overlays remain historical evidence and cannot
472+
qualify the final five-source delivery. Required exact-source CI/RF3 gates remain.

‎docs/Features/BenchmarkComparisons/NativeSerialization.md‎

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,38 @@ reaches actual API subprocesses and waits. Pure step/deadline regression data
7070
never authenticates GitHub or qualifies results. A new exact-source job must
7171
complete all original report/corpus/generated/provenance/artifact checks.
7272

73-
REQ/AC-IS-PERF005..007 now have the accepted exact terminal-allocation/admission and prospective quantitative/variance contract in ADR060 (NSP006). Test matrix: new NativeWireSupportedScalarTests/Fixtures prove frozen allowed terminals and generic-owner/open closures; ScalarAllocationTests prove measured0B auxiliary delta, nullable Normalize equality; ScalarDepthTests prove264/265 boundaries. Retain all existing native roundtrip/fault/resource tests. AC007 manual evidence exception: actual authenticated before/after originals, corpus/cohort checks, exact interval/ratio/launch arithmetic and independent review. Protected baseline gate remains pending R18 fresh artifact.
73+
REQ/AC-IS-PERF005..007 now have the accepted exact terminal-allocation/admission and prospective quantitative/variance contract in ADR060 (NSP006). Test matrix: new NativeWireSupportedScalarTests/Fixtures prove frozen allowed terminals and generic-owner/open closures; ScalarAllocationTests prove measured0B auxiliary delta, nullable Normalize equality; ScalarDepthTests prove264/265 boundaries. Retain all existing native roundtrip/fault/resource tests. AC007 manual evidence exception: actual authenticated before/after originals, corpus/cohort checks, exact interval/ratio/launch arithmetic and independent review. The protected R18 baseline gate is admitted by the complete original artifact from run37129441460 at3ae408fe; see the current delivery record below.
74+
75+
## Current delivery and workflow contract, 2026-10-03
76+
77+
The later explicit owner workflow correction supersedes the historical
78+
AC-IS-PERF-003/004 placement and dispatch requirements above: benchmarks.yml is
79+
reserved for end-to-end database comparisons. Internal native/raw/codec
80+
microbenchmarks cannot be its jobs, modes or dependencies. Do not repeat the old
81+
native-only dispatch. The former job and its unchanged original artifacts remain
82+
historical evidence; removing its pipeline surface must preserve the actual
83+
fixture, correctness tests and database comparison gates. Local complete paired
84+
BDN runs use these same fixtures, six corpora,24 cells and2/3/6/200ms profile,
85+
with actual source/host/children/exporters and explicit development-only status.
86+
They do not refresh website performance evidence.
87+
88+
NSP005 baseline admission is complete: exact3ae408fe CI run37129421675 passed
89+
normal/scalar2637 each, recovery194, RF3 SDK/MCP67 and analyzers118 with no
90+
skips. Protected run37129441460 retained24 cells, six corpora,48 distinct real
91+
children and matching127-case normal/scalar diagnostic suites. Artifact11276836758
92+
has verified SHA256 b3353fa730b664cb70c84dfb49ad9d4f0827849b9e15684998c37f7ce783ec83;
93+
independent source joins and credential review passed. These results qualify
94+
only the authentic3ae baseline, never a later candidate.
95+
96+
NSP006 writes are accepted under ADR060 AC-IS-PERF005/006/007. The sole runtime
97+
change fast-returns existing closed nongeneric terminal types after one unchanged
98+
Normalize call; the complete fallback and persisted/native corpus bytes remain
99+
unchanged. Root integrates only the production change and four scalar regressions;
100+
the owner cancelled the unrelated process-helper branch. The complete local24cell
101+
pair passed all12native allocation budgets, with Command NativeDecode64.62%/79.11%
102+
lower allocations at1024/16384. Only3of12JSONmean controls passed; AC007 latency
103+
qualification remains open. These per-operation allocations do not establish total
104+
RAM usage or global maximum speed. Final five-source normal/scalar/recovery and
105+
delivered-source Linux RF3 CI remain distinct from historical image evidence.
106+
Current original receipts, failures and scope limitations live in
107+
[stage004](../../implementation/native-serialization-repair-stage-004.json).

‎docs/Features/InternalSerialization.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,36 @@ diagnostic job do not qualify runtime, acceleration, RF3 or durability.
6363

6464

6565
R17 under REQ-IS002/AC-IS002 and AC-IS004/007 distinguishes persisted native queue-body corruption from caller validation, preserving bytes, ready state, counters, positions and absent outcome before successful restore with the same request identity. QueueBodyAccountingTests/QueueBodyFailureAssertions own this real-ZoneTree fixture. Unknown well-known header metadata is classified only at the official single-header/span boundary in NativeFieldHeaderReader, using the saved official Reader and registered type table; arbitrary owned/generated/session key failures remain visible. NativeUnknownWellKnownHeader* tests use genuine writer twins, extended field deltas and public/MCP controls. ADR060 owns the accepted implementation and rollback. Normal/scalar/recovery/RF3 qualification remains exact-source GitHub-only; source review and a development build cannot satisfy it.
66+
67+
## Terminal admission allocation reduction
68+
69+
REQ-IS-PERF005 / AC-IS-PERF005 requires zero auxiliary allocation for warmed,
70+
normalized terminal types and nullable admission allocation equal to the existing
71+
Normalize loop. REQ-IS-PERF006 / AC-IS-PERF006 preserves the supported domain,
72+
closed generic-owner enum fallback and exact type-depth264/265 boundary. Only
73+
NativeWireSupported's existing primitive/enum/scalar predicate receives a root
74+
shortcut; the complete iterative fallback, generated codecs, persisted bytes,
75+
resource limits and validation remain unchanged. NativeWireSupportedScalar
76+
AllocationTests, Tests, Fixtures and DepthTests own the positive, unsupported,
77+
nullable, byte-ownership and depth controls. ADR060 records rollout and rollback.
78+
79+
REQ-IS-PERF007 / AC-IS-PERF007 uses the prospective allocation/latency budgets,
80+
complete24-cell profile, six exact corpora, twelve JSON cohort controls and
81+
conservative interval decision in ADR060. Pair arithmetic requires retained
82+
originals and independent review; two local command-decode cells cannot satisfy
83+
this full criterion. Internal microbenchmarks follow the latest root policy and
84+
must not be dispatched through the end-to-end database comparison workflow.
85+
86+
The [stage004 evidence](../implementation/native-serialization-repair-stage-004.json)
87+
binds the complete successful normal/scalar/recovery/analyzer/RF3 CI and protected
88+
24-cell diagnostic baseline to delivered commit3ae408fe. The pending shortcut's
89+
full local24cell experiment preserves all six corpora and native/JSON bytes.
90+
Command NativeDecode allocation falls from128270 to45386B/op for1KiB and from
91+
1541554 to321975B/op for16KiB (64.62%/79.11%). All12native allocation budgets
92+
pass. Only3of12JSONmean controls pass, so the pair does not qualify latency or
93+
AC-IS-PERF007. These are per-operation allocations, not total server RAM.
94+
Final five-source build, normal/scalar, recovery and exact-source RF3 gates
95+
remain separate from the historical image that produced this pair.
96+
The owner cancelled the unrelated process-helper repair branch. This delivery
97+
contains only the admission shortcut and its four scalar regression files;
98+
source-image results containing cancelled helpers remain historical evidence.

‎docs/Features/InternalSerialization/Acceptance.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,11 @@ System/derived-collection native codec shapes must fail before allocation.
4242
Bounded unknown fields, known-schema references and the actual owned generated
4343
closure retain positive coverage. Full arbitrary native codec compatibility is
4444
out of scope and requires a separately accepted bounded shape contract.
45+
46+
## NSP006 criteria
47+
48+
| ID | Pass/fail contract | Automated evidence |
49+
|---|---|---|
50+
| AC-IS-PERF005 | Warm normalized terminal admission allocates0 auxiliary bytes; nullable admission equals independent unchanged Normalize allocation. No caches or changed limits. | NativeWireSupportedScalarAllocationTests use the no-key TUnit NotInParallel constraint; exact byte assertions,32 warmups/4096 iterations and outside-window data remain unchanged. |
51+
| AC-IS-PERF006 | Supported closed terminal roots pass; open/unsupported roots and unsupported generic-owner arguments fail with the original corruption error. Fixed263 array wrappers pass;264 fail. Generated nullable values/nulls, ordered collections and independent bytes survive round trips. | NativeWireSupportedScalarTests/Fixtures/DepthTests plus the complete existing native normal/scalar suite. |
52+
| AC-IS-PERF007 | All prospective budgets, six exact corpus receipts, full24-cell profile, twelve JSON controls and confidence/cohort conditions in ADR060 hold. Missing/drifted/indeterminate pairs fail qualification. | Actual complete BDN originals and strict report validation; explicit manual arithmetic exception requires source/host/profile-bound originals and independent review. Local two-cell data is insufficient. |

0 commit comments

Comments
 (0)