Skip to content

Conversation

@peter-lawrey
Copy link
Member

@peter-lawrey peter-lawrey commented Nov 8, 2025

This change introduces a Wire-focused test backlog (TESTS_TODO.md), lands a first wave of high-value tests that de-risk cross-module behaviours (Queue/Network/Bytes), and adds an ops/docs scaffold (requirements, ICD, system architecture, decision log, runbooks). It also aligns the build with realistic JaCoCo thresholds (line 0.72, branch 0.66) and keeps verify as the driving goal under CI profiles.

Why

  • Close gaps discovered during peer-project reviews (Queue/Network/Bytes) where Wire invariants are relied upon but under-tested.
  • Give reviewers and operators an authoritative single place to see test intent and operational expectations.
  • Stabilise CI by ratcheting coverage to achieved levels, then grow from there.

What changed (highlights)

New planning & thresholds

  • TESTS_TODO.md: curated Wire Test Backlog (W-T1…W-T18 + Bytes batches B-T1…B-T6) with context, proposed tests, and owners.
  • JaCoCo: project & sonar profile gates set to line 0.72 / branch 0.66.

Tests added / extended (selected)

  • Document lifecycle & rollback

    • DocumentContextLifecycleTest.rollbackKeepsDocumentAvailableForNextRead
  • Wire type auto-detection

    • ReadAnyWireDetectionTest (encodes + detects Text/Binary)
  • Method writer/reader semantics

    • MethodWriterBytesTest:

      • reusedBytesRemainStableAcrossDispatches
      • producerMutationDuringCallbackDoesNotCorruptPayload
    • MethodWriterHistoryTest: verifies MessageHistory interception is emitted first in TextWire documents

  • Elastic buffers & capacity

    • ElasticByteBufferTest.directElasticBufferResizesWhenCapacityIsExceeded
    • ElasticBytesCapacityTest (heap/direct; cursor invariants preserved through growth)
  • QueryWire edge cases

    • QueryWireTest: percent-encoded tokens, NUL bytes & dangling keys, and TextWire round-trip via formatted output
  • Reference counting across owners/threads

    • BytesReferenceCountingTest (heap/direct; leak warning path exercised)
  • Historical regression guard

    • WireTextBugTest.textWireOnDirectBytesSurvivesBufferMutation (immutability/isolation on direct buffers)

Documentation & operations

  • New docs:

    • functional-requirements.adoc, data-requirements.adoc
    • interface-control.adoc (ICD)
    • system-architecture.adoc
    • operational-requirements.adoc, ops-scenarios.adoc
    • runbooks/wire-runtime-health.adoc
    • background/openhft-knowledge-pack.adoc
    • decision-log.adoc
  • Docs index wired to the new pages.

Backwards compatibility

  • No API/binary changes.
  • Tests and documentation only; runtime behaviour unchanged.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 8, 2025

@peter-lawrey peter-lawrey changed the title Adv/review2 Chronicle Wire test backlog, cross-module regression coverage, and ops/docs scaffold — with tuned JaCoCo gates Nov 9, 2025
@peter-lawrey peter-lawrey changed the base branch from develop to adv/license November 10, 2025 15:50
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.

2 participants