24 KiB
gRPC data implementation execution ledger
Implementation authorized by the user after plan review. Work starts at 5dbdee1ea3ad1f0b98cd4ae15bcf14f9b114c21b on branch codex/grpc-data-connections in the managed isolated worktree. Unrelated AB CIP fixture edits remain in the original checkout.
The implementation plan and design define scope. Only the applicable test selectors run per phase; the unfiltered whole-solution run is reserved for P12. No throughput claim is inferred from correctness tests.
Preflight
- Host: macOS arm64; .NET SDK 10.0.403 (repository rolls forward from 10.0.100); Python 3.14.3.
- Docker context:
orbstack, local Unix socket; daemon architecture aarch64, approximately 15.7 GiB RAM. No fixture/container changes during initial inspection. - Managed worktree was clean at creation; feature branch is based on the committed design/plan/reviews.
- Source feed/mapping/protocol work cannot begin before P00 focused test isolation passes. Tests remain coordinator-controlled.
Phase status
| Phase | Scope | Status | Evidence |
|---|---|---|---|
| P00 | Unit discovery isolation and execution controls | Passed | 22 Python runner units after Astra correction; 2 C# guard units, zero failures/skips; clean phase run 20261116T020813.843515Z-2ebe0fbcb7d2 |
| P01 | Domain/protobuf contracts | Passed; Astra freeze approved | 15 domain + 36 wire tests, zero failures/skips; run 20261116T024814.318745Z-3a06bbb5af5e |
| P02 | Schema/artifact/consumer projection | Passed; Astra approved | 72 F + 31 P + 106 R, no failures/skips; final run 20261116T034337.311145Z-cd97a339f340 |
| P03 | Shared authorization and leases | Passed; Astra approved | 77 K + 89 O + 53 R + 19 H, no failures/skips; final run 20261116T034150.797719Z-8f107e03d8d5 |
| P04 | Immutable publication, hub and local ports | Passed; Astra approved | 185 R + 16 A + 16 C + 77 O + 74 ScriptWorker + 88 MTConnect + 40 OpcUaClient = 496, no failures/skips; final run 20261116T060538.590404Z-b8ef1894731e |
| P05 | Mutation tickets/outcomes | Passed; Astra approved | Complete gate 910/910 passed 20261116T084759.594405Z-42a294fc7f4f after three Astra regression corrections; source and candidate reconciliation approved |
| P06 | Streams/sharing/fair delivery | Pending | |
| P07 | TLS/provisioning/node+cluster clients | Pending | |
| P08 | Raw/UNS projection and adapter | Pending | |
| P09 | Authoring/diagnostics/docs | Pending | |
| P10 | Local Docker/CLI/probe integration | Pending | |
| P11 | Scaling/recovery measurements | Pending | |
| P12 | Full suite and final Astra review | Pending |
Requirement-to-verification ledger
| Design requirement / review finding | Implementation phases | Required evidence |
|---|---|---|
| H1 write replay/incarnation and per-item failover | P01/P05/P07 | Registry/outcome units; deterministic D08 effect ledger |
| H2 dispatch gate, rich outcomes and late observation | P05 | Queue/demotion/revocation/late-driver units; D04/D08 |
| H3 coherent served catalog without revocation rollback | P02/P03/P04 | Empty/failed apply activation units; D06 |
| H4 mapped scopes ahead of legacy ACL bypass | P03/P08 | Raw and UNS mapped policy/cache/SDK tests; D06 |
| H5 bounded metadata authority freshness | P03/P07/P08 | Request-start lease tests and quiet-mount D06 |
| H6 explicit consumer-node execution scope | P02/P07/P08 | Artifact/manager scope units and D02/D10/D12 |
| H7 pinned-cache and authorization isolation | P04/P06/P07 | Sharing/provenance units; target-mode matrix |
| H8 immutable producer ownership | P01/P04 | Reused arrays/bytes, snapshot/pool lifetime tests |
| H9 safe filter superset and writer baseline | P06 | Aggregate settings/baseline/commit tests |
| M1 snapshot/command ordering | P04/P06 | Watermark/epoch/removal-barrier units and probe |
| M2 original timestamp fidelity | P01/P04 | Codec/source-feed timestamp tests |
| M3 bounded per-parent browse readiness | P08/P10 | SDK BrowseNext and CLI projection tests |
| M4 bounded ingress/source dirty fairness | P04/P06/P11 | Overflow readiness, nonstarvation and workload evidence |
| Plan H1 concrete local/mount-free service | P04/P10 | LocalDataConnection tests and D01a caller-node probe |
| Plan H2 discovery isolation | P00 | Real counting C# probe/reaper test and sanitized runner units |
| Plan H3 run-owned local fixtures | P10/P12 | Fake-process ownership units and local context/manifest |
| Plan H4 local secret/trust lifecycle | P07/P10 | Provision/rotation/retirement units and D14 |
| Plan M1 topology/realm/operation coverage | P10 | Full scenario matrix, real caller DI and CLI/probe evidence |
| Plan M2 compile/EF prerequisites | P00/P02 | Focused baseline build/discovery; local-only migration |
Runtime artifacts belong under ignored artifacts/grpc-data/; this tracked ledger indexes redacted outcomes only. It must never contain private keys, bearer values, credential-bearing manifests or a claim that pending phases passed.
P02/P03 execution notes
P02 configuration expected missing-type RED was recorded in run 20261116T025514.238285Z-0bf94bfed2ac; the configuration class passed after implementation in 20261116T030638.024513Z-33f85cfb6582. Existing ACL-scope regressions passed 61 tests in 20261116T031441.427791Z-5bb7ca84cb53 (the runner accepts one --case; repeated arguments select only the last). The artifact facade expected missing-API RED is 20261116T030553.410191Z-8f8f4b4ccf8c. The final complete P02 gate passed 200 tests in 20261116T032931.523374Z-3193b02872a9 after cross-cluster root, null topology, null logical-ID and rollback SQL regressions. EF 10.0.7 generated migration 20261116030721_AddGrpcDataConnections using only a nonconnecting loopback design-time connection; no database update was run. The migration adds three scoped tables and widens ACL scope storage to 32 characters. Down removes the new tables but intentionally retains the additive wider ACL column: retained mapping grants have a 22-character scope name and cannot safely be narrowed to 16. Disable the feature before rolling binaries back; disposable SQL apply/reapply/backward-disable validation remains P10.
P03 Core and SDK expected missing-API RED runs are 20261116T030857.315836Z-8e4d976e1036 and 20261116T030939.707449Z-d4e6daf64857. Runtime lease/activation tests also produced missing-class compilation RED in 20261116T031033.611505Z-6b121246eb2e; this temporarily blocked P02 Runtime tests, so no artifact assertion failure is inferred from that run. Metadata leases use monotonic request-start time and an application-owned lease object, never a caller-provided expiry. Ordinary SDK subscriptions have an internally queued delivery path; P03 rejects mapped subscription admission until P08 supplies and verifies an SDK publish-time gate. This is an explicit incomplete integration requirement, not completed subscription support.
Final Astra P02/P03 review closes all five findings against the final source hashes and complete gates. P02 finished with 209 passes after JSON alias/shadow regressions (actual RED: seven failures/59 passes in 20261116T033408.997103Z-68c99377553c) and empty-array local compatibility correction. P03 finished with 238 passes. Parsed revocations now survive topology-planning and mapping/eligibility projection failures; invalid topology suppresses new data readiness. Mapped proofs require an exact active local catalog token and matching local authority generation, independently of the remote lease's exact serving identity. A new catalog Begin invalidates the token even on a same-authority no-op rebuild. Runtime actor and projection tests exercise these boundaries. P03 additionally runs the existing Stage6, off-thread/deferred actor and Host authentication classes because their credential/publication paths changed. Stage6 dedup assertions compare measured warm single-node cost with same-node/distinct-node passes, preserving required credential-expiry checks.
P10 harness preparation
Independent Python helpers for local-context validation, fixture endpoint/manifest isolation, ownership-only cleanup, atomic secret files, bounded/redacted processes, deployment outcome polling and CLI result validation have test-first preparation evidence: initial discovery failed on missing modules; the focused combined run subsequently passed 44 tests. This is not the P10 gate. Concrete Compose, SQL/device/seeder, TLS/provisioning, runtime observation, CLI/probe scenarios and actual Docker integration remain pending. No containers or databases have been modified.
P05 execution notes
Runtime and SDK missing-API RED evidence is 20261116T062437.578601Z-6e2b4f1b2274 and 20261116T062507.986231Z-c09214fa8087. The real DI composition test failed on the missing shared fence in 20261116T064939.908320Z-4dd869b001d4; runtime registration now supplies one singleton without replacing an explicit registration. Rich actor creation initially failed all 19 startup checks because Akka constructor-based Props could not use the private rich constructor. An explicit indirect producer fixed creation, verified by one narrowly filtered positive test in 20261116T071454.486118Z-e187323e8fe5; this was a diagnostic selection through the same discovery/TRX/source-identity guards, not a complete phase gate.
| Boundary | Observed RED | Correction / focused evidence |
|---|---|---|
| Original credential, authority, route and role admission | Missing API above | First 12 admission checks passed 20261116T065544.493707Z-3eb41ed1767c; actual composed catalog/policy/actor checks are included in the driver cases |
| Stop/restart retirement, injected-clock gateway deadline, snapshot-role callback order | 15 passed / 4 failed 20261116T071731.988476Z-ab7eaaea4c9b |
All original 19 cases subsequently passed inside the physical-overlap RED run below |
| Rich physical same-target exclusion | 19 passed / 2 failed 20261116T072907.706321Z-c0a3b2178516 |
Shared keyed permit now survives actor replacement, ID case variation, caller timeout and observation expiry; verified in the 910-test gate |
| Principal duplicate identity | 5 passed / 1 failed 20261116T070925.834679Z-03e9d268979d |
Principal uses OrdinalIgnoreCase; operation ID remains Ordinal |
| Late confirmation retention | 3 passed / 1 failed 20261116T072347.015611Z-61960f01d936 |
Accepted definitive refinement refreshes result retention before physical release |
| Expired observer result authority | 12 passed / 1 failed 20261116T074826.305696Z-f170f189f3b8 |
Physical observer is the sole definitive publisher; the expiry case passed in the later 15-case hash RED |
| Membership-event callback ordering | 8 passed / 1 failed 20261116T080834.575675Z-a81b507a518b |
Primary publication moved ahead of independent history callbacks; verified in the 910-test gate |
| Authoritative SDK value and timestamp | 3 passed / 4 failed 20261116T065427.180129Z-23fa1d306a25 |
All 7 passed 20261116T073441.203032Z-e27a76f907e9; uncertainty restores last authoritative value/time and marks uncertain |
| Concrete Modbus rich outcome / no resend | Capability absent, 20261116T065504.810035Z-1d3c011bd4e3 |
All 20 passed 20261116T074539.497522Z-2b59ad2f16cd, including real TCP dropped reply after effect and unsupported injected transport |
| Allocation-bounded exact value fingerprint | Missing internal method, 20261116T080329.365239Z-f4c6626ad391 |
All 8 passed 20261116T081444.424298Z-0adf33e9701f; no large GetBytes/GetArray copies during hashing |
| Resolved address and exact string operation semantics | 13 passed / 2 failed 20261116T082102.902677Z-dd7a6a847714 |
Canonical catalog view and lossless UTF-16 metadata hashing verified in the 910-test gate |
The first complete P05 gate passed 906 tests in 20261116T082435.847137Z-41e436e72d95. Astra's final source review then identified three uncovered cases. Real TCP FC23 wrong-function exception fallback produced the expected failure in 20261116T083756.925253Z-ac0395f545eb (21 passed/one failed); its no-replay correction passed all 22 focused cases in 20261116T084606.160092Z-73c1868a8b65. The current-key-expiry fence-wait test failed in 20261116T084157.535508Z-509aba58e961 (22 passed/one failed), and the actual coordinator-backed source callback blocked in 20261116T084419.395301Z-6c55e8767242 (19 passed/one failed). Current immutable key expiry is now checked with original expiry under the final dispatch fence; role-wrapper cache refresh uses nonblocking fence acquisition and provisional process provenance on contention. The final complete gate passed 910 tests (195 Runtime, 70 SDK, 29 Core, 593 Modbus, 23 Abstractions), no failures/skips, in 20261116T084759.594405Z-42a294fc7f4f. Astra verified the final candidate hashes and approved P05.
The physical lifetime review requires keyed rich-to-rich exclusion for known pending raw tasks. It does not promise universal device ordering against the unchanged legacy abandonment path, fire-and-forget application, different logical references or another process. Both factory-supported Modbus modes provide an explicit no-resend transport path; legacy transport recovery is preserved. The rich SDK hook remains unbound until the complete authorized P08 mapping route exists. No Docker or database apply has run.
P04 execution notes
Hub and source-feed expected missing-API RED runs: 20261116T035138.678709Z-921224df1e45 and 20261116T035253.701549Z-3677798d45ff. The coordinated production graph then compiled while the Task10 test failed on the missing local catalog/facade APIs in 20261116T040451.917499Z-9fc5a1cf55f8. Publication review identified producer blocking, lifecycle, binding recovery and virtual freshness issues; correction candidates remain unapproved until their behavioral gate and rereview finish.
Acquisition retention is independent of served catalog activation: internal raw hub samples may carry the actual boot process identity with zero catalog/authority epochs. Public DataSample.Validate and wire codecs remain strict. A local facade must prove the active catalog/authority and current backing source, then attach current serving headers while preserving original value version/timestamps and monotonic receipt age. Charged cache-read resources remain owned until the recipient disposes ReadResult; publication guards fence retained replies after invalidation. The old SDK/actor delivery path remains separately copied and serialized and is outside the new hub's accounting; P11 must measure that overhead explicitly.
The second complete P04 attempt (20261116T051418.493232Z-1a9b4de9e45b) passed 155 Runtime, 16 Core.Abstractions, 16 Commons and 77 SDK tests. The gate then stopped because four Windows-only worker security tests explicitly skipped on macOS; this is not a completed P04 gate. Explicit, discoverable platform applicability is being added without relaxing unexpected-skip rejection. Astra additionally identified a legacy delivery regression under hub binding pressure: physical driver subscriptions must continue independently of the bounded new feed. Its correction and the production catalog activation integration remain pending. The follow-up publication review resolves H1/M2/M3 but leaves virtual retirement cleanup, legacy availability under hub pressure, source accounting across repartition, and case-insensitive origin cluster identity open. Task10 staging tests produced the expected missing-API RED in 20261116T052822.115386Z-041fa266b284; implementation is in progress. The platform-aware runner regression suite passed 28 focused Python tests; the real platform-filtered C# gate has not yet run. Task10 staging subsequently passed all eight focused tests in 20261116T053226.727293Z-11a44bee32b8 after correcting an xUnit cancellation-token analyzer error. Source regression RED 20261116T053303.727269Z-0e8faa537de7 executed 35 tests (30 passed/five expected failures: binding contention, full hub, missing shape, virtual retirement and mixed-case cluster keys). Hub regression RED 20261116T053507.573526Z-b3f1ee05f515 executed 20 tests (15 passed/five expected failures: retained source charges across repartition and old-ticket retirement). The focused correction candidates passed 35/35 source tests in 20261116T054124.390909Z-bfd4f5cc2345 and 20/20 hub tests in 20261116T054353.930760Z-80fdd94dde21, both with no skips. These do not replace the complete P04 gate. Staging follow-up RED 20261116T054026.209143Z-e6ba95281799 executed 18 tests (10 passed/eight expected failures): wrapper reuse, wrong serving-node provenance, headless/SDK same-revision retry after failed expected catalog activation, and all four cache/restore subscription-order cases. The 18 staging tests subsequently passed in 20261116T054720.800511Z-26d9fb40b300. A later source review found the bounded 128-reference initial preparation could lose quiet tail values; the real 130-source test failed exactly at source-128 in 20261116T054854.714447Z-3f6eb6203de4 (35 passed/one expected failure). The source correction then passed all 36 tests in 20261116T055309.152744Z-9dee8a78ffeb, including all 130 original initial values and prior pressure cases. Direct restore RED 20261116T055225.759147Z-001d468f9d9e passed 18 staging tests and failed the real deferred-driver regression because it opened a third database context. The artifact-reuse correction passed all 19 staging tests in 20261116T055656.284057Z-33ba66cac80e. The first complete gate then exposed nullable-timestamp comparison compilation errors in affected driver tests; explicit non-null assertions and value comparisons fixed them. Focused MTConnect 88/88 and OPC UA client 40/40 passed before the final complete P04 run passed all 496 applicable tests. Four explicitly declared Windows-only worker methods are verified during discovery and excluded on macOS; no applicable test is skipped. The final gate is 20261116T060538.590404Z-b8ef1894731e. Staging review also requires deployment confirmation/retry to reflect catalog activation failure; a clean legacy topology apply alone must not suppress repair of the same desired data revision.
The P04 selector manifest adds only affected virtual/restart, timestamp/worker/history, domain-value and wire-read regression classes. Runtime desired-catalog staging now closes before physical driver replacement, shares an exact attempt with the SDK publisher, and also supports headless application/cache/restore. Source/hub and staging review findings have been corrected; see the final checkpoint disposition. P08 must consume independent original timestamps at the mapped SDK sink; carrying them in the compatible legacy envelope does not prove the SDK import boundary already preserves them.
Later-phase integration obligations
P05 read-only preparation located the actual device invocation inside the resilience delegate, after actor dispatch and Task.Yield; final ticket validation must occur there. Capture the actual driver task for bounded late observation, because the resilience wrapper can time out first. Legacy Good acknowledgments without established device-application guarantees remain unconfirmed. The agreed rich path shares a short dispatch/publication fence across actual authority, catalog, primary-verdict, route and driver-lifetime pointer changes; permission evaluation, callbacks and arbitrary driver code remain outside it. The dispatch mark is the documented linearization point immediately before the driver call on the same delegate path. Dispatched Unknown claims and physical-call/payload permits remain pinned until the actual task ends, even after observer retention expires. Real per-item endpoint switching belongs to the P07 connection-client gate, with mapped integration in P08; P05 must prove ordered partial executor outcomes without a fabricated failover client.
The Astra P06 contract checkpoint approves additive age/readiness with explicit domain age uncertainty, successful delivery receipts, finite session expiry and real acknowledged acquisition demand. It approves no implementation yet. P06 must prove retained snapshot acquisition age survives transport/reconnect independently of optional wall-clock timestamps. Current unary ReadResult carries age, while subscription values do not yet carry an explicit age field; resolve this at the stream contract checkpoint rather than infer freshness from receipt. P07 should construct remote realm roots using the canonical cluster identity from validated capabilities, and compose source publishers with real atomic process/role provenance shared with the catalog coordinator.
P00 verification
The runner tests first failed as expected while run-unit-phase.py was absent. After initial implementation, 18 fake-subprocess Python units passed. Astra found required existing regression classes were not enforced as strictly as new classes; four added regression tests failed before the correction. The final 22 Python tests passed, with red/green logs in artifacts/grpc-data/p00-runner-regressions/. The real P00 discovery/execution runner passed both counting-probe/reaper C# tests with no skips; the starting production graph compiled successfully. No solution test run or Docker mutation occurred. Raw TRX/commands/discovery identities remain in ignored artifacts. The runner validates discovery AND executed results for every required new class, retains parameterized class filters, and sanitizes both child environments. Astra approved P00 after the required-existing-class correction; see checkpoint review.
P03 preparation obligations
Read-only security preparation confirmed that caller-supplied DataView.Subject is a claim, never an ACL authority. P03 resolves subject/provenance against the active deployed catalog before either Raw/UNS fallback or cache lookup, and strictly caller-bound facades carry authenticated principal/key/version/original expiry. Revalidate the current key principal and credential version as well as expiry even without an authority-generation change. Deep-copy mutable authority inputs before publishing security snapshots. Failed desired-authority staging must close new mapped/data access rather than retain stale permissions. These obligations supplement the planned spoofed-subject, queued expiry, same-ID credential replacement, deep-copy mutation, and failed/empty apply tests. They were subsequently implemented and verified in P03, as recorded above.
P01 verification and frozen contracts
Test-first domain/protocol changes and targeted review regressions produced recorded failures before correction. Final P01 run 20261116T024814.318745Z-3a06bbb5af5e passed 15 Core.Abstractions and 36 Commons tests, including named existing protocol regressions, with no failures or skips. No broad unit or integration suite was run. Astra checkpoint approves P01 freeze only after cluster identity, original credential identity, array metadata, receiver-owned aggregate decoding, per-value element limits, pinned stream provenance, additive negotiation and structural/descriptor corrections.
The frozen facade is caller-bound through IDataConnectionFactory and DataAuthenticatedContext; no authenticated identity comes from protobuf claims. DataWriteAdmission retains original key/version/expiry. Capabilities carry cluster identity and independently advertised array-element limits. Compact and fallback stream decoding require expected serving identity. Array/byte storage uses defensive managed copies and separate disposable leases; pooling is deferred. Post-parse budget checks do not substitute for the P07 transport parse/decompression or P11 measured-memory gates.