Repository navigation
feat(core): fix #219 contract map, #223 rollout guard, #226 abuse detection, and #240 storage schema - #304
Merged
BigDella merged 1 commit intoOct 19, 2026
Conversation
…rollout guard, Parcel-Protocol#226 abuse detection, and Parcel-Protocol#240 storage schema
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.
Closes #223
Closes #219
Closes #226
Closes #204
Issue Utix: Create cross-service contract map for domain events and integration boundaries #219: Cross-Service Contract Map for Domain Events and Integration Boundaries
telemetry.event,worker.job,export.envelope, etc.) lacked a centralized, locked contract registry defining explicit producer/consumer obligations, SemVer rules, and allowed failure behaviors.core/contract/contract-map.tslocks 10 distinct integration boundaries. Each boundary enforces required payload shapes, type validation, SemVer version negotiation, poison-event policies (halt,skip,quarantine), and idempotency requirements. Runtime payloads are validated viavalidateEventContractPayload()before consumption.Issue Utix: Implement feature-flag rollout guard with automatic rollback verification #223: Feature-Flag Rollout Guard with Automatic Rollback Verification
RolloutGuardincore/feature-flags/rollout-guard.tsmonitors canary rollouts by risk tier and error thresholds. If consecutive failures (e.g. 3) or error rate limits are breached, it automatically trips the emergency kill switch and immediately triggers post-rollback state verification (StateConsistencyCheck). Any orphaned state (such as stranded running worker jobs) is automatically remediated, verified, and audited.Issue Utix: Implement risk-scored abuse detection for suspicious high-impact operations #226: Risk-Scored Abuse Detection for Suspicious High-Impact Operations
core/security/abuse-detection.tsevaluates operations against Stellar protocol rules (AccountMerge prerequisites, forbidden self-merges, subentry checks, master key disabling, threshold hierarchy ordering) using a progressive friction model:0–39points (allow): Zero friction for legitimate read queries.40–69points (step_up): Confirmation challenge (confirm_dialog) for high-impact operations.70–89points (review): Maintainer hold for bulk exports and burst faucet usage.90–100points (block): Rate-limit backoff for velocity bursts (>20 ops) and oversized XDR payloads (>256KB).overrideAbuseAssessment().Issue utix: Create migration compatibility checks for the next storage schema version #240: Storage Schema Compatibility Checks for Next Storage Schema Version (V2)
core/migration/storage-schema.tsprovides pre-flight compatibility inspection, bidirectional transformations (upgradeV1ToV2anddowngradeV2ToV1), and SHA-256 tamper-evident integrity checksums across four distinct paths:schemaVersion: 2, partition isolation, and checksums passing all post-checks.permission_deniedand audited.Changed
core/contract/contract-map.tsregistering 10 cross-service event contracts with schema, versioning, failure, and idempotency policies.core/contract/index.tsand automated tests incore/contract/__tests__/contract-map.test.ts.docs/EVENT_CONTRACT_MAP.md.RolloutGuardincore/feature-flags/rollout-guard.tsfor automated tripping and post-rollback state remediation.core/feature-flags/index.tsand documentation indocs/ROLLOUT_GUARD_AND_ROLLBACK.md.core/security/abuse-detection.tswith progressive friction and Stellar protocol validation.core/security/index.tsand documentation indocs/ABUSE_DETECTION.md.core/migration/storage-schema.tscovering normal, failure, retry, and authorization migration paths with SHA-256 integrity checksums.core/migration/index.tsbarrel export and authored documentation indocs/STORAGE_SCHEMA_MIGRATION.md.scripts/verify-issues-219-240.mjsand registerednpm run verify:issues-219-240inpackage.json.scripts/loader.mjswith Node 18 backwards compatibility and addedscripts/shims/util.mjs.