Skip to content

Add per-stream sequence-gap detection#313

Merged
JE-Chen merged 1 commit into
devfrom
feat/sequence-gap-batch
Jun 22, 2026
Merged

Add per-stream sequence-gap detection#313
JE-Chen merged 1 commit into
devfrom
feat/sequence-gap-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 22, 2026

Copy link
Copy Markdown
Member

What

Nothing tracked per-stream monotonic sequence numbers to detect missing, out-of-order, or duplicate messages.

  • SequenceTracker.observe(stream_id, seq){status: ok|duplicate|gap|reorder, seq, missing}.
  • gaps(stream_id) / high_water(stream_id); streams tracked independently.

Complements dedup_window (seen-before) with ordering/gap classification.

Layers

  • Headless core: utils/sequence_gap/ (pure stdlib, zero PySide6).
  • Facade: SequenceTracker + __all__.
  • Executor: AC_sequence_observe (named-instance registry).
  • MCP: ac_sequence_observe.
  • Script Builder: under Flow.
  • Tests: test/unit_test/headless/test_sequence_gap_batch.py (7 tests).
  • Docs: v105_features_doc.rst (EN + Zh) + toctrees + 3 README What's-new sections.

Verification

  • pytest → 7 passed; ruff/pylint 10.00/bandit/radon clean; Qt-free.

Nothing tracked per-stream monotonic sequence numbers to detect missing,
out-of-order, or duplicate messages. Add SequenceTracker.observe which
classifies each sequence number as ok / duplicate / gap (recording the
missing numbers) / reorder (late arrivals fill gaps), plus gaps and
high_water per stream. Complements dedup_window. Wired through facade,
executor (AC_sequence_observe, named-instance registry), MCP, and the
Script Builder with a headless test batch and EN/Zh docs.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 26 complexity · 0 duplication

Metric Results
Complexity 26
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit d41b970 into dev Jun 22, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/sequence-gap-batch branch June 22, 2026 02:31
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant