docs/plans/tcp-connection-validation.md (308 lines):
Plan to live-verify the RemoteTcpIntegrated and RemoteTcpCertificate
transports against an actual remote AVEVA Historian. The SDK's
HistorianWcfBindingFactory already builds all three bindings
(CreateMdasNetTcpBinding, CreateMdasNetTcpWindowsBinding,
CreateMdasNetTcpCertificateBinding) but only LocalPipe has been
exercised end-to-end. Wire format is identical across transports;
only WCF binding shape and credential negotiation differ.
Discovery workstreams A/B/C run in parallel (SPN discovery via static
IL + WCF probe; cert binding requirements via wcf-cert-probe; operator
preconditions checklist). D blocks on A. Verification tracks V1-V5 also
parallelize once V1 (ProbeAsync) confirms the transport is reachable.
Includes risks (SPN mismatch, cert chain validation, idle disconnect,
Open2 response delta, compression negotiation, time skew, false-positive
empty reads), success criteria, eight open questions, and explicit
out-of-scope items filed under the existing write-commands and
store-forward plans.
No code changes; no preconditions assumed met. Implementer must satisfy
§2 preconditions (reachable remote Historian, port 32568 open, test
account, SPN registered, etc.) before §4 discovery starts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
docs/plans/write-commands-reverse-engineering.md (425 lines):
Plan for adding WriteValueAsync (AddS2 stream values), EnsureTags2 for
analog/discrete/string tags, and DelT for sandbox cleanup. Hard safety
rules center on a dedicated sandbox tag gated by env var, time-bounded
writes, SQL ground-truth verification per session, explicit rollback.
Five-step RE workflow mirrors the read/event decode (static IL discovery
-> instrument-wcf-writemessage capture -> instrument-wcf-readmessage
capture -> byte/IL alignment -> managed serializer + golden-byte tests).
Risks call out auth-chain unknowns, parameter-name-mismatch class,
silent-success failure modes, History-vs-Storage service question.
docs/plans/store-forward-cache-reverse-engineering.md (501 lines):
Plan for replacing the synthesized GetStoreForwardStatusAsync with a
real implementation. Architecture investigation already partially
answered via IL inspection during planning: ArchestrA.HistorianAccess.
GetStoreForwardStatus (token 0x06006187) reads an in-process C struct
via calli to mdas_GetStorageStatus, kept current by server-pushed WCF
callbacks (IStatusServiceContract2.SetStoreForwardEvent). CSFConnection.
GetSFPipeName indicates a separate Named Pipe sidecar exists when SF
is configured. Five parallelizable discovery workstreams, six concrete
RE steps with cited tokens, eight risks, eight success criteria.
Both plans deliberately produce no code changes and no captures. They
exist so the next implementer can start with full context.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Full read-only SDK (src/AVEVA.Historian.Client) implementing the CLAUDE.md required
surface against AVEVA Historian's binary WCF protocol — no native AVEVA runtime
dependency. All operations live-verified against a local Historian:
- ProbeAsync, ReadRawAsync, ReadAggregateAsync, ReadAtTimeAsync, ReadEventsAsync
- BrowseTagNamesAsync, GetTagMetadataAsync (17 native data-type codes mapped)
- GetConnectionStatusAsync, GetStoreForwardStatusAsync, GetSystemParameterAsync
- 108/108 unit + integration tests pass
Includes the reverse-engineering toolkit (tools/AVEVA.Historian.ReverseEngineering)
used to decode the protocol: WCF probes, IL inspection via dnlib, and IL-rewrite
instrumentation (instrument-wcf-{write,read}message etc.) plus the .NET Framework
trace harness (tools/AVEVA.Historian.NativeTraceHarness) for parity testing.
Sanitized handoff evidence under docs/reverse-engineering/. Native AVEVA binaries
(current/, aveva-install-x64/, aveva-install-x86/) are gitignored — fetch separately
from the AVEVA installer.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>