Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / EffectLaneStore

Interface: EffectLaneStore

Defined in: packages/core/dist/index.d.ts

Effect lane capability (plan 45, rfcs/effects.md section 4.5, item 3): a store carrying a restoration generation OUTSIDE the journal bytes. The restore procedure bumps it atomically BEFORE the restored data becomes reachable, so a point-in-time-restored store comes up with effect dispatch disabled by construction: the effect lane writer validates the store's generation against the one recorded in the journal's latest effect_epoch decision and refuses every lane append until an operator appends a fresh epoch citing the bumped generation. One recorded deviation from the RFC's wording, with its reason: the RFC asks the store itself to reject an UNLEASED effect lane append, but stores are dumb byte stores that never parse payloads (obligation A4) and cannot recognize lane traffic; the unleased half is therefore enforced by the writer's construction (no lane append path exists without the lease) plus the conformance kit over the writer-store composition, while the superseded-lease half is exactly the shipped fencedWrites contract.

Extends

Extended by

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
effectLanereadonlytrue--packages/core/dist/index.d.ts
fencedWrites?readonlytrueFenced writes capability (the fenced run state RFC, phase 2), optional exactly like getMeta and leaseTtlMs: a store declaring fencedWrites: true PROMISES that every mutation carrying a lease (append, putMeta, delete) verifies it is the CURRENT holder for the run the mutation targets, atomically with the mutation itself, and rejects with the typed LeaseHeldError leaving nothing mutated when it is not (stale epoch, foreign owner, expired, or a lease whose runId is not the mutation's run). The engine threads the segment's lease into every one of these writes on a leased resume, so over a declaring store a superseded worker cannot overwrite run meta or delete run state, exactly as it already cannot append. A mutation carrying NO lease keeps the single-writer semantics unchanged. Stores written before this capability are unaffected: without the marker the extra argument is ignored and hosts know the surface is advisory.LeasableStore.fencedWritespackages/core/dist/index.d.ts
leaseTtlMs?readonlynumberOptional TTL introspection (v1.35.0 review P2-4): the configured lease ttl in milliseconds. A store exposing it lets createWorker VERIFY at construction that the worker's renew cadence matches the store's expiry instead of trusting two config sources to agree; stores without it are accepted with the worker's own ttl.LeasableStore.leaseTtlMspackages/core/dist/index.d.ts

Methods

acquire()

ts
acquire(runId, owner): Promise<Lease>;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
runIdstring
ownerstring

Returns

Promise&lt;Lease&gt;

Inherited from

LeasableStore.acquire


append()

ts
append(
   runId, 
   e, 
lease?): Promise<void>;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
runIdstring
eJournalEntry
lease?Lease

Returns

Promise&lt;void&gt;

Inherited from

LeasableStore.append


delete()

ts
delete(runId, lease?): Promise<void>;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
runIdstring
lease?Lease

Returns

Promise&lt;void&gt;

Inherited from

LeasableStore.delete


listRuns()

ts
listRuns(f?): Promise<RunMeta[]>;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
f?RunFilter

Returns

Promise&lt;RunMeta[]&gt;

Inherited from

LeasableStore.listRuns


load()

ts
load(runId): Promise<JournalEntry[]>;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
runIdstring

Returns

Promise&lt;JournalEntry[]&gt;

Inherited from

LeasableStore.load


putMeta()

ts
putMeta(m, lease?): Promise<void>;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
mRunMeta
lease?Lease

Returns

Promise&lt;void&gt;

Inherited from

LeasableStore.putMeta


release()

ts
release(l): Promise<void>;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
lLease

Returns

Promise&lt;void&gt;

Inherited from

LeasableStore.release


renew()

ts
renew(l): Promise<void>;

Defined in: packages/core/dist/index.d.ts

Parameters

ParameterType
lLease

Returns

Promise&lt;void&gt;

Inherited from

LeasableStore.renew


restorationGeneration()

ts
restorationGeneration(): Promise<number>;

Defined in: packages/core/dist/index.d.ts

The current restoration generation; 0 until a restore ever ran.

Returns

Promise&lt;number&gt;