Repository navigation
feat(contracts): implement sequence-gap detection and dynamic capture profile introspection (#730) - #753
Merged
SHAURYASANYAL3 merged 1 commit intoOct 19, 2026
Conversation
… profile introspection (Shinraya-Tech-Labs#730)
Collaborator
|
Hi @Subodh-17! 👋 Thank you for submitting this draft PR for #730 well within the 72-hour progress window! 🎉 The maintainer team will review your implementation of sequence-gap detection and capture profile introspection.
Looking forward to reviewing your full PR! 🚀 |
Contributor
🧪 PR Test Results
Python 3.12 · commit c2f55ba |
Collaborator
|
Great progress @Subodh-17! 🎉 All CI quality gates are green:
Whenever you are ready, please mark this PR as Ready for Review so we can conduct final review and merge! 🚀 |
Subodh-17
marked this pull request as ready for review
October 19, 2026 19:54
SHAURYASANYAL3
approved these changes
Oct 19, 2026
SHAURYASANYAL3
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! Excellent engineering and thorough implementation of sequence-gap detection and dynamic capture profile introspection for #730.
- Clean architecture in Plane B ()
- Comprehensive tests added (+575 LOC in )
- CI Quality gates passing: Python tests, ruff lint, bandit security scan, and coverage (78.19%)
Approved! 🚀
SHAURYASANYAL3
merged commit Oct 19, 2026
e0b1ae0
into
Shinraya-Tech-Labs:main
13 of 14 checks passed
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.
📌 Description
Implements Sequence-Gap Detection & Dynamic Capture Profile Introspection under Plane B (
agentwatch/contracts/) to address Issue #730 assigned by @SHAURYASANYAL3.Key Changes
TemporalInfo.ordering_key("{sensor_id}:{seq:012d}") with fallback toevent.attributes["sensor_id"]andevent.attributes["source_seq"].(seq, timestamp)to handle network jitter without false gaps, and deduplicates consecutive identical sequence numbers.[seq_lost_start, seq_lost_end]with bounding timestampst_beforeandt_after.SequenceGapmodel and extendsCoverageSnapshotwithdrop_rate,has_gaps,sampling_rate, andsampling_policy.[target - window, target]). Safely transitions verdicts fromREFUTEDtoINCONCLUSIVEwhen sequence gaps (MissingReason.SEQUENCE_GAP) or sampling (MissingReason.SAMPLED_OUT) make evidence insufficient. Only issuesREFUTEDwhen authoritative sensors attest 100% complete, unbroken coverage throughout the window.Fixes #730
🏛️ Architectural Plane & Classification
Which architectural plane does this change target? (
docs/v3/V3_ARCHITECTURE.md)🧪 Verification & Evidence of Testing
Local Test Execution Output
tests/contracts/test_sequence_gaps.pyincluding synthetic dropped-span benchmarks at 1%, 5%, and 20%).pytest tests/contracts/). Core v3 suite passes 125 tests (5 skipped requiring external DB/credentials; optional Redis-dependent API tests were not run in the recorded validation).agentwatch.contractsis 88% (satisfies >= 70% coverage gate).🛡️ Security & Linter Quality Checklist
ModuleNotFoundError: No module named bandit). Flake8-Bandit (RuffSfamily) is active in Ruff and passed with 0 issues.bandit-baseline.jsonwas NOT created or edited.# noqa: S311 # nosec B311 — deterministic PRNG with fixed seed for synthetic test stream generation).ruff format --check agentwatch/contracts/ tests/contracts/(Clean pass).ruff check agentwatch/ tests/contracts/(Clean pass).pytest tests/v3/test_architecture_contracts.pypassed 5/5).✍️ Contributor Integrity Declaration
By submitting this pull request, I certify that:
origin/main.