Document Chronicle-Bytes architecture, requirements and utilities; tighten agent guidance; bump BOM - #715
Open
peter-lawrey wants to merge 13 commits into
Open
Document Chronicle-Bytes architecture, requirements and utilities; tighten agent guidance; bump BOM#715peter-lawrey wants to merge 13 commits into
peter-lawrey wants to merge 13 commits into
Conversation
…view, testing strategy, functional requirements, and security review; improve clarity and structure in existing guides.
… README formatting
|
# Conflicts: # pom.xml
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.



Functional changes
Dependency alignment
net.openhft:third-party-bomfrom3.27ea5→3.27ea7to pick up the latest curated dependency versions used across the OpenHFT stack.API throws-signature clean-up (behaviour unchanged)
Narrow the declared exceptions on several public methods to reflect actual runtime behaviour:
ByteStringAppender.append(float)andappend(double)now declare onlyBufferOverflowExceptionandIllegalStateException(runtime) while still delegating toBytes.append(double)for formatting.Bytes.bytesForRead()no longer declares checked Chronicle-specific exceptions in its signature; it still callsthrowExceptionIfReleased(this)internally and will throw as before at runtime.These are source- and binary-compatible changes that do not alter logic but make the API surface more accurate.
There are no intentional behavioural changes to
Bytes/BytesStoreread/write, allocation, pooling, hashing or ring-buffer logic in this PR; all other code changes are documentation, Javadoc, or test-only improvements.Non-functional changes
1. Agent guidance and AI-specific docs
AGENTS.md(Chronicle-Bytes)Add Chronicle-Bytes–specific preamble and documentation pointers:
AGENTS.mdfor base rules; Bytes-specific durable docs live undersrc/main/docs/withREADME.adocas the landing page.Tighten language/character-set policy:
iconv, IDE inspections).Expand build and quality expectations:
mvn -q clean verifyfrom a clean checkout.-P qualityand-P sonarprofiles, and a focused Chronicle-Bytes module run (-pl :chronicle-bytes -am clean verify).Add “When to open a PR” section:
mvn -q clean verify, linkage to issues/decision records and focused changes.Clarify Javadoc and inline comments with a good/bad example to discourage noise.
New AI companion docs
CLAUDE.md: deep project overview and usage guide tailored to Claude Code, covering:GEMINI.md: high-level Chronicle Bytes analysis for Gemini:run-benchmarks,assertions,quality,sonarprofiles).2. Architecture, requirements, and security documentation
Core AsciiDoc structure and headers
Standardise all major docs (
README.adoc,FAQ.adoc,api-guide.adoc,architecture-overview.adoc,algo-overview.adoc,decimal-rendering.adoc,domestic-overview.adoc,render-overview.adoc,util-overview.adoc,wire-integration.adoc, etc.) on::toc:,:sectnums:,:lang: en-GB,:source-highlighter: rougewhere appropriate.Update
README.adoc:src/main/docs/....system-properties.adoc,project-requirements.adocanddecision-log.adoc.opts=novalidateto avoid spurious validation warnings.New high-level docs
src/main/docs/decision-log.adocIntroduces formal Nine-Box–style decision records (e.g.
CB-FN-101..CB-DOC-101) explaining:Bytes/BytesStoreAPI split and cursor model.realCapacity.BytesStore.src/main/docs/functional-requirements.adocCB-FN-*requirements fromproject-requirements.adocinto domains (core API & storage, encoding/utilities, pooling & lifecycle).src/main/docs/security-review.adocConsolidates security considerations around:
Unsafeencapsulation (CB-NF-S-001,CB-NF-S-003).CB-NF-S-002).CB-NF-S-004).src/main/docs/testing-strategy.adocCB-TEST-*and performance requirements (CB-NF-P-*).Requirements and glossary
src/main/docs/project-requirements.adoc:sectnums:and explicit anchors ([[CB-FN-001]]etc.) for all requirements.Introduces/updates system property docs:
docs/systemProperties.adoc(legacy) and replaces it withsrc/main/docs/system-properties.adocunder the main doc tree.bytes.guarded,bytes.bounds.unchecked,trace.mapped.bytes,mappedFile.retain,timestamp.*,bytes.max-array-len) in a single AsciiDoc table.Architecture and utility guides
architecture-overview.adocReworks the overview to include:
Bytes/BytesStorerelationships and container-level interactions.CB-NF-P-*.memory-management.adoccreatedHere()is used.pool-overview.adocalgo-overview.adoc,render-overview.adoc,decimal-rendering.adoc,domestic-overview.adoc,util-overview.adoc,wire-integration.adoc3. Microbenchmarks and performance docs
microbenchmarks/README.adoc:toc:and:source-highlighter: rouge.JMH and cooler benchmarks
Add detailed Javadoc to:
AppendDoubleBenchmark– purpose, usage and configuration hints (-Dbytes.append.precision).AppendLongCoolerMain,BytesCoolerMain,GenParseMain,DistributedUniqueTimeProviderBenchmark,ElasticBenchmarkRunner,ElasticByteBufferJmh,ElasticDirectJmh.Introduce package-level docs:
microbenchmarks/src/main/java/net/openhft/chronicle/bytes/microbenchmarks/package-info.javamicrobenchmarks/.../jmh/package-info.java4. Javadoc and package-level documentation
Add or expand
package-info.javafor most Chronicle-Bytes packages:net.openhft.chronicle.bytes(core API),bytes.algo,bytes.domestic,bytes.internal,bytes.pool,bytes.ref,bytes.render,bytes.util.bytes.internal.migrationpackage with an explanatorypackage-info.Enhance Javadoc on many public/internal types:
Bytes,BytesStore,BytesIn,BytesOut,StreamingDataInput,RandomDataInput,RandomDataOutput,BytesRingBuffer,RingBufferReader,RingBufferReaderStats,PageUtil,Invocation.NativeBytesStore,SingleMappedFile,NoBytesStore.AppendableUtil,ByteStringAppender,XxHash,BytesStoreHash,HashCodeEqualsUtil,ReentrantFileLock.DistributedUniqueTimeProvider, various perf harnesses.Examples and comments:
*Testclasses) and add small comment headers to clarify their purpose (e.g.NativeBytesOverflowTest,NativeBytesStoreTest,NativeBytesStoreOpsTest, JLBH runners).5. Tests and minor clean-ups
Replace platform-default charset usage with explicit
UTF_8in tests and utility code, improving determinism and avoiding encoding-sensitive failures.Simplify or modernise tests:
Use JUnit5 assertions (
assertInstanceOf,assertThrows,assertDoesNotThrow) and remove unused code/commented-out manual tests.Add or clarify tests for:
createdHere()coverage;Byteslifecycle and release behaviour;StringUtils,LZW,EscapingStopCharTester);ClassAliasPool,ClassLookup).Remove a redundant
ThreadLocal<Bytes<?>>field fromBytesPoolthat was no longer used in favour ofScopedResourcePool, reducing clutter without affecting behaviour.