Repository navigation
Implement Layer 2 runtime validation (RFC-0001, COTS schema v1.1.0) - #3
Merged
Merged
Conversation
…he v0.2 contract; add .gitignore Co-authored-by: emmanuel-a-otchere <emmanuel-a-otchere@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/layer2/layer2.tsper RFC-0001 and the v0.2 contract (layer-contracts/layer-2-runtime-validation.md): takes a Layer 1 COTS plus operator-provided CalibrationData, evaluates drift, segment-signal divergence, and parameter-set ranges, and attaches avalidationrecord to every DecisionRecordValidationRecord/ValidationFlag/DecisionOnValidationtypes tosrc/cots.ts(COTS schema v1.1.0; field optional, so v1.0.0 producers are unaffected)tests/layer2.test.ts: 8 tests mirroring TC-L2-01..06 plus the contract's failure modes (calibration-data-missing,context-missing) and the no-silent-rejection guarantee.gitignore(node_modules, dist, build output) - the repo had noneVerification
npx vitest run: 18/18 tests pass (10 existing Layer 1 + 8 new Layer 2)npx tsc --noEmit: cleanContract compliance
calibration-data-missingandcontext-missingerrors per the contract