Releases: interop-alliance/vh-resource-log
Releases · interop-alliance/vh-resource-log
Release list
v0.5.0
Added
isResourceLogRefusal(err), the read-side classification of the refusal
taxonomy:trueforResourceLogIntegrityErrorand for
ResourceLogContinuityErrorwith any reason butrollback. It says which
refusals a reader holding a cached copy must not fall back to it on; a
rollback is reconcilable divergence under the profile's log-pin rules and is
left to the caller's cached-copy path. Matched byerr.name, like the
conflict predicate. Moved here from@interop/wallet-core, which will
re-export it.
v0.4.2
Added
collectionLogPinId({ spaceId, collectionId })builds the pin slot key
space/<spaceId>/<collectionId>/meta/log, for a Collection's governing
history log at itsmeta/logsub-resource.
Changed
-
The sealing-sweep test suite (
sealResourceLog,
latestAssertionRemovalIndex) moved into this repo's own test run, so a seal
regression is caught here instead of only in a consumer's tests. -
The verify test suite now covers four previously untested refusal branches: a
proof outside the profile's fixed shape, a non-objectparametersmember, a
proofverificationMethodthat is not a versioned DID URL, and a pinned head
carrying no ordinal (refused as a fork with the served entries retained). -
New
entry.tsunit tests pinversionIdOrdinal's parsing table and the
builder-side guards: both entry builders refuse a state carrying the reserved
historymember, andbuildResourceLogEntryrefuses a head whoseversionId
carries no ordinal.
v0.4.1
Fixed
readResourceLognow consults the chain-head pin on an absent log: with a pin
held forlogId, astore.read()ofnullis refused as
ResourceLogContinuityError(reasonrollback, pinned head attached) instead
of reported as pre-genesis.appendResourceLogandsealResourceLogsurface
the same refusal, andcreateResourceLogchecks the pin before building or
writing anything, adopting the served log or refusing the absent one rather
than landing a fresh genesis over a hidden log. With no pin held, an absent
log still reads asnull.
Changed
resourceLogPinIdnow throws aTypeErrorfor an empty or slash-bearing
spaceId,collectionId, orresourceId, instead of silently building an
ambiguous slot key. Valid (URL-safe) ids produce the same pin id as before.confirmAppendcompares the served and sent entries with the kernel's
canonicalizeStrict; the directjson-canonicalizedependency is dropped.- Internal cleanup: one shared verify-then-pin step in the append path, one
versionIdordinal reader, and the sealing sweep resolves a controller's
assertion key sets concurrently. - The versioned verification-method DID URL is built and parsed by one codec,
buildVersionedVm/parseVersionedVm(exported). The verifier now rejects a
proofverificationMethodwhose query is anything other than a single
non-emptyversionIdparameter; previously extra parameters were ignored and
the value was percent-decoded.
v0.4.0
Changed
- BREAKING: Renamed "anchor" to "controller versionId" throughout the
library.VerifiedResourceLog.headAnchorIndexis now
headControllerVersionIndex; theadmitAppendhook input'sanchorand
anchorIndexare nowcontrollerVersionIdandcontrollerVersionIndex.
Integrity error messages that referred to an entry's "anchor" now refer to its
controller versionId. Docs use "controller versionId" in place of "anchor". - Docs and code now call the verifier's running controller version the "head
controller version" (was "version floor"); the ARCHITECTURE.md glossary entry
is renamed. No API change. - BREAKING: an entry's proofs must all carry the same controller versionId
and be by distinct signing keys. A log whose entry carries divergent
controller versionIds or a repeated signing key is now refused from genesis as
ResourceLogIntegrityError; the client's held pin stays where it was, and
there is no in-library heal for that shape (only a hand-built log can carry
it).assertionMethodmembership is checked at the entry's controller
versionId for every proof, once per entry, instead of at each proof's own. The
admitAppendhook input'scontrollerVersionIdandcontrollerVersionIndex
are now the entry's controller version for every proof, and the input gains
proofKeys: every proof's signing-key multibase, distinct, in array order. A
consumer that constructs the hook input directly (rather than receiving it
from the library) must addproofKeys, and a hook must return the same
verdict regardless ofproofKeysorder, since the proof array is not
integrity-bound. The verifier now makes oneassertionKeysAtcall per entry
instead of one per proof.
Fixed
appendResourceLognow treats an emptyetagfromstore.readas no
validator and refuses to write, instead of sending a blankIf-Match.- The entry builders now refuse a
nullorundefinedstate with the intended
misuseErrorinstead of aTypeError. The builders and the reader's entry
shape check share one state-document rule.
v0.3.0
Added
verifyResourceLogAppend: an exported pre-write verification pass. It
verifies a candidate entry as the reader would, as the next entry of a
verified head, for consumers with their own write path.
Changed
- BREAKING:
appendResourceLog(and the sealing sweep through it) now
verifies every built entry pre-write on every compare-and-swap attempt, and
createResourceLogverifies the genesis as a one-entry log before
store.create(falling through to lost-race adoption when a log already
exists). Refusals that used to surface after the write, from read-back, now
surface before it, and nothing is written. TheadmitAppendhook contract
gains an obligation: it is also consulted pre-write on the writer's candidate,
is called on entries that are never written, is called twice for a successful
append, and must be side-effect-free. A consumer with its own write path must
call the new export to be covered. No error name changes. VerifiedResourceLogis now also an input, to the new export, so adding a
required field to it is henceforth a breaking change for any consumer that
constructs one.
v0.2.0
Changed
- BREAKING: the controller port's
admitAppendhook now runs after the
entry's proofs verify. It used to run inside the kernel's authorize callback,
before the signature check. An entry with a forgedproofValueis now refused
asResourceLogIntegrityErrorwhatever the hook would have said, on the read
path, the read-back after an append, and the sealing sweep, and the hook never
receives input from an unverified proof. Consumers whose refusal predicates
match only the Integrity and Continuity names now hard-refuse such a log where
they warned and continued. No error name changes.
v0.1.2
Changed
- Update to latest
@types/*andprettier.