Skip to content

Graph backend provider and cache audit

This inventory covers the provider methods implemented by netherframe.core, their uses in graph planning/execution and the caches that can carry their results. Its boundary is the provider protocol contract: arbitrary user SDK calls must declare their opaque managed read scopes, and third-party providers must honor their RPC semantics. This does not promise transactions across independent states or serialize undeclared external cloud observations; those are RFC non-goals.

The inventory and call-site review accompany the behavioral tests below. Zero observed gap or invalid-call counts alone do not establish completeness. Public concurrency controls and the remaining scale measurements have their own completion gates.

Provider RPC dispositions

Protocol-5 aliases appear beside protocol-6 names. tests/helpers/graph_rpc_inventory.py assigns exactly one disposition to every method in both generated Provider service descriptors. Adding a protocol method requires a new disposition. The native observer wraps the generated stub factories, so both direct stub calls and calls through ProviderRpcSupport.call_rpc are counted. Calling an unexposed or unclassified method fails before the wire send; the audit also fails if framework error handling catches that refusal. It records names and counts, never requests or responses.

Disposition and RPCs Graph data flow and required evidence
Schema: GetSchema / GetProviderSchema, GetMetadata, GetFunctions, GetResourceIdentitySchemas Describe provider capabilities/types. Requests do not consume a managed row value. Cached schemas belong to the client/provider version. Schema decoding, lazy loading and protocol request-shape tests cover the transport. A schema is not proof of an actual cloud namespace.
Validation: PrepareProviderConfig / ValidateProviderConfig, ValidateResourceTypeConfig / ValidateResourceConfig, ValidateDataSourceConfig / ValidateDataResourceConfig, ValidateEphemeralResourceConfig, ValidateListResourceConfig Return diagnostics; they do not publish state. Framework configurations are evaluated with tracked references before validation. The v5 prepared configuration is not substituted for the tracked one. Plan validation and deferred/configuration tests exercise acceptance and refusal.
Provider settings: Configure / ConfigureProvider _with_provider_settings records a fresh provider node. Every managed resource/data/ephemeral consumer inherits that provider's managed reads. Data reads used to configure it retain their proofs. Pending providers contribute declared scopes to initial admission, then actual reads are checked before their deferred mutations. Clients are restarted when moving from unleased planning into a new ownership period.
Planned values: PlanResourceChange Consumes the inspected prior row and evaluated configuration. The graph plan basis retains target revision/incarnation/status/provider/private identity evidence; downstream planned values carry their source reads. Apply validates that basis and its admitted actions before any send. Changed no-op configurations require replanning. Replacement halves remain one durable operation.
Managed mutation: ApplyResourceChange The gateway reserves and dispatches a durable operation before sending. The wire audit independently decodes the coerced payload and checks identity, action/sub-stage, live grant, retained footprint, inputs, overlap and duplicate send. Built-in mutations use the equivalent client boundary. A returned response retains its operation holds until durable publication.
Resource observation: ReadResource Refresh records the inspected row under the classified refresh purpose. Values in the refreshed copy keep that row's proof; changed no-op values commit before consumers. Adoption reads remain unconverged until a provider plan establishes configuration convergence. Recovery reads require termination evidence before resolving an unknown operation and cannot certify its configuration. Standalone drift inspection does not publish graph state.
State conversion: UpgradeResourceState, UpgradeResourceIdentity Convert the inspected row before its provider read, preserving the target's row/private/identity expectations. Conversions and refresh copies do not create a separate unversioned source. A successful refreshed no-op commits the converted representation before consumers; failed or incompatible upgrades cannot authorize a mutation. Private-state and identity-upgrade tests cover protocol conversion.
Import/move: ImportResourceState, MoveResourceState Planning/adoption may use read-only provider conversions without publishing state. Explicit imports/moves publish only through inspected graph admission and durable operations; imported entries are unconverged. Imports include their provider/configuration reads. Move groups retain original source/target and consumer proofs and commit atomically. Same-type renames require no provider RPC. Recovery cannot turn a read-only import into successful apply evidence.
Data observation: ReadDataSource _read_data_source combines configuration, provider and declared observes= inputs. DataSourceResults carries the captured proof to every consumer. Saved plans retain address/value-bound proofs and original broad-scope snapshots. Raw stored observations without that evidence are refused. Empty captured reads and unknown evidence remain distinct.
Ephemeral session: OpenEphemeralResource, RenewEphemeralResource, CloseEphemeralResource Open results retain configuration/provider/declared observation proofs in the session. Only write-only managed arguments consume them; values/private bytes are not persisted. Renewal changes the lifetime, not the result used to compute a managed argument; close supplies no managed configuration value. Runtime-returned references and memoized expressions retain the ephemeral marker. New sessions recompute ephemeral-derived values.
Opaque observation: ListResource The standalone listing helper does not write graph state. A call from an opaque runtime body follows its declared read scopes (default app). ListResource constructs are rejected in hybrid apps. A literal cloud filter cannot imply which managed objects it observes; explicit scopes remain necessary.
Argument function: CallFunction The request contains arguments; their tracked reads reach a runtime consumer. Provider-defined functions are specified as pure computations, with no provider configuration access. A configured client does not make its settings an additional semantic function input. See HashiCorp's function contract. Offline calls made before a graph run produce ordinary user configuration literals.
Shutdown: Stop / StopProvider Ends a client; supplies no managed value or state publication. Ownership-loss handling kills provider processes, refuses further mutations/rollback and retains unresolved operation footprints. Namespace fact caches cannot cross a new client/ownership period.
Unexposed: GenerateResourceConfig; action RPCs PlanAction, InvokeAction, ValidateActionConfig; state-store RPCs ValidateStateStoreConfig, ConfigureStateStore, ReadStateBytes, WriteStateBytes, LockState, UnlockState, GetStates, DeleteState Present in generated provider descriptors, with no call sites in the core provider client. Hybrid rejects action/state-store constructs. These methods have no graph mutation permission; the wire observer refuses an accidental invocation. Supporting them later requires a reviewed data-flow/publication contract.

Provider functions are distinct from data sources: the framework contract defines functions as argument-only computations and reserves online/configuration-dependent lookups for data sources. The generic opaque Python runtime contract still applies when a body makes its own cloud reads.

Cache dispositions

Cache Qualification and representative behavior tests
Compiled construct configuration and dependency analysis Store symbolic configuration/references, not evaluated state values. Resource configuration versions invalidate compiled shapes. Actual evaluation and mutation admission still capture reads; static dependencies alone never authorize mutation.
Expression environment memo (values.expressions.evaluate_value) Stores each value, temporary marker and original captured reads. Every hit replays those reads into the current capture, including a runtime call whose operand another field already evaluated. A fresh environment serves each configuration evaluation. The shared-operand regression verifies actual final values, not merely presence of some source input elsewhere on the node.
HybridRuntimeToken / HybridRuntimeCall Managed-read results belong to state/lineage, recorder and evaluation epoch. Provisional, ordered-plan and apply phase changes invalidate reuse. Values cached before authoritative recording evaluate once to establish their proof; reads=[] covers body reads, not evidence about previously evaluated operands. Qualified results with no managed reads retain their cache across later phases/runs. Ephemeral-derived results are recomputed for the session.
Data source results, provider-setting data reads and saved plans Keep original configuration/provider/observation reads and address/value fingerprints. Provider-setting reads reset with client loading/ownership changes. Saved proofs include scope members; current values cannot rebase the old proof. Unknown persisted cache evidence fails before managed sends.
Planned values and outputs Carry original node proofs through PlanningValues and OutputValues. Only the same run's planned writes may be materialized to their committed revisions. State/run-bound runtime caches prevent a previous plan from borrowing that authority.
Stack/check maps and remote-state imports stack_values creates tracked mappings; lookups, absence, membership and iteration record actual entry/output/scope reads when used. A cached mapping does not cache away the lookup. Stored data values require their matching observation proof. Cross-stack imports carry source-stack enumeration, resource and output reads; cross-state transactions remain outside this RFC.
Provider schemas and ownership facts Schemas are provider-version metadata. ProviderIdentityContext.once retains actual authenticated namespace facts only for a configured client/ownership period. Saved-plan apply establishes those facts again; changed account/region refuses a send. Aliases and credential hashes do not establish object identity. Unsupported resource identities retain app X.
Tokens and literals Token registries retain symbolic expression identities, not a resolved managed value. Literal user inputs carry no managed read proof. An opaque body must declare any additional managed scope it reads; omitting a declaration conservatively records app scope.

Behavioral evidence

The following test seams exercise the actual graph evaluation and publication paths:

  • test_hybrid_construct_kinds.py: stored observation object/text/runtime/cache reads, saved proofs with resource/stack/app/empty observations, malformed/missing evidence, foreign-state and planned runtime caches, shared expression operands, metadata-warmed provider settings, qualified pure caches, independent nested recorders, and ephemeral values in persistent/write-only contexts.
  • test_hybrid_provenance.py: provider settings, remote-state imports, runtime-returned dynamic references, observed resources, runtime checks, worker threads and classified outside-node reads.
  • test_hybrid_graph_state.py: changed refreshed no-ops before consumers, saved-plan validation, canonical alias conflicts, rechecked namespace facts, drift policy, adoption convergence, uncertainty deferral and operation-backed mutations/replacements/rollback.
  • test_hybrid_private_state_and_identity.py, test_hybrid_execution_sync.py and test_provider_protocol_rpc_shapes.py: schema/identity upgrades, private data, provider function types, resource/data/ephemeral/list RPC payloads and protocol-5/6 messages.
  • test_graph_rpc_audit.py: wire coercion, mismatched/missing capability sensitivity, duplicate and overlapping sends, full service-method inventory, direct-stub calls and refusal of unexposed actions even when caught. Audit manifests exclude requests, values and diagnostics.
  • Native PostgreSQL graph suites: admission, import/move groups, crash recovery, retained footprints, upgrades, checkpoints, SQL fences and real AWS/FakeCloud reference workloads. The shared-operand AWS case checks both app and resource grants, actual cloud values, current source revisions and zero unattributed reads. Disabling only memo read replay reproduces the old value.

The wire manifest counts record transport coverage; they do not imply every method is exercised by AWS or that each attempted RPC succeeded. AWS uses protocol 5 here; protocol-6 request coverage comes from real protobuf request tests. Separate managed-call witnesses include built-in operations which do not use a provider wire stub. Subprocess crash calls are checked by their durable-history and recovery tests; a parent process's wire counter does not observe a child process.

The final schema-28 native run passed 686 tests. Its 80 AWS manifests contain 3,072 provider-wire attempts across twelve method names, 290 managed capability witnesses and zero invalid sends. Of the managed calls, 274 used ApplyResourceChange on the provider wire and 16 used the built-in provider. These are observed workloads, with the broader method dispositions supported by the protocol tests and call-site review above. Logs and manifests are /tmp/nf-memo-prewarm-native-final.log and /tmp/nf-memo-prewarm-native-final-rpc-audit.

Compatibility boundary

Capture 5, schema 28, writer 18 and queue 7 qualify older input evidence. Earlier captures could call a cached computation pure after its operand was evaluated outside the inner capture, then reuse a provisional result with a newer source revision elsewhere on the node. Pre-run cached operands could also lack evidence despite an explicit empty body-read declaration. All older resource/output rows and checkpoint images receive unknown inputs; only ready changes to unconverged. Values, revisions, fingerprints, baselines, requests, digests and immutable history remain intact. Older requests retain app X through recovery and cannot invent empty evidence; old move groups require freshly inspected moves. Migrations 1–27 remain unchanged.

Saved-plan format remains 17; its graph capture header must now be 5. Older graph plans require replanning even if they contain no observation nodes. A reviewed apply can record fresh inputs for unchanged infrastructure without another managed provider mutation.