-
Notifications
You must be signed in to change notification settings - Fork 7
Tighten JLBH encoding policy, constructor safety, and documentation traceability #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
peter-lawrey
wants to merge
14
commits into
develop
Choose a base branch
from
adv/develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
james-mcsherry
approved these changes
Nov 28, 2025
This commit introduces static analysis integration and improves development documentation for the JLBH module: * Add module-quality Maven profile (pom.xml) - Activates on JDK 11+ to avoid Java 8 compatibility issues - Configures SpotBugs Maven Plugin 4.9.8.1 with Max effort, Low threshold - Includes test sources in analysis - Tested successfully: 16 issues identified across priority levels * Enhance AGENTS.md with developer guidance - Add security checklist for PR reviews - Expand build commands to include module-quality profile - Add "When to open a PR" section - Include inline comment guidelines with examples - Add link to Oxford style guide for British English - Clarify ISO-8859-1 character set requirements * Add TODO.md for module documentation tracking - Comprehensive checklist for architecture documentation work - ISO 9001 and ISO 27001 compliance considerations - Links to parent ARCH_TODO.md roadmap Tested with: mvn -P module-quality clean verify (Java 11) All tests pass, SpotBugs analysis completes successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
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.



This PR aligns JLBH with Chronicle’s encoding and documentation conventions, strengthens harness safety around resource tracing, and improves test determinism and requirements traceability.
Functional changes
Fail fast when intrusive JVM resource tracing is enabled
JLBHnow checks thejvm.resource.tracingsystem property in the constructor and throws anIllegalStateExceptioninstead of callingSystem.exit(-1)when it is set (empty ortrue).systemProperties.adocdocuments this behaviour and the property semantics.Thread-safe tracking of sample count for watchdog logic
volatile long noResultsReturnedcounter with anAtomicLong.sample(long),checkSampleTimeout(), andendOfRun(...)now use atomic operations.Deterministic CSV output encoding
JLBHResultSerializer.runResultToCSV(...)now writes via anOutputStreamWriterwithISO_8859_1, instead of relying on platform-default encoding.BOM upgrade
net.openhft:third-party-bomfrom3.27ea5to3.27ea7to align with the latest dependency set (logging/test stack, etc.) used across Chronicle modules.Non-functional changes
Encoding & language policy and tooling
In
AGENTS.md:iconvand IDE settings) to detect non-compliant characters.Security review guidance
Added a “Security checklist” section to
AGENTS.md:Commit / PR etiquette and workflow
Tweaked examples in the “Commit-message & PR etiquette” section to avoid unnecessary quoting around the subject line.
Added a “When to open a PR” subsection, clarifying:
mvn -q clean verifypasses.Documentation structure, numbering, and traceability
Added
:lang: en-GBand:source-highlighter: rougeto key.adocfiles (README.adoc, architecture, SRS, guides).Enabled
:sectnums:and removed manual numeric prefixes from section titles in:architecture.adocbenchmark-lifecycle.adocproject-requirements.adocjlbh-cookbook.adocresults-interpretation-guide.adocTidied up minor wording and link issues:
#_7-glossaryto#_glossary.Decision log and requirements cross-references
Expanded
decision-log.adocwith a decision index and new JL-scoped decisions (FN / NF-P / OPS / DOC, Nine-Box tagging).Added detailed records for:
JLBHTasklifecycle.NanoSamplerAPI.Linked feature requirements in
project-requirements.adocback to the corresponding decisions (e.g.FN-001→JL-FN-002,FN-004→JL-OPS-004, etc.), improving traceability from requirements → design decisions → implementation.Javadoc and inline-comment hygiene
AGENTS.md, clarified the principle that Javadoc and inline comments should only explain what is not manifest from the signature or code.Sample code and examples
Updated
SimpleBenchmark,SimpleOSJitterBenchmark, andSimpleResultSerializerBenchmark:startTimeNSvsSystem.nanoTime()and the impact on what is actually measured.Simplified
ExampleJLBHMainto remove unusedMath.sinwork and useJvm.safepoint()only as a placeholder for minimal in-loop work.Encoding-stable tests and small clean-ups
Standardised test harnesses (
JLBHTest,JLBHIntegrationTest,JLBHAdditionalCoverageTest, etc.) to:PrintStreams with explicit"UTF-8"encodings.ByteArrayOutputStreamcontents using"UTF-8"and normalise line endings, making tests deterministic across platforms.Minor internal refactors:
JLBHOptions.SKIP_FIRST_RUN→JLBHOptions.SkipFirstRunand updated tests accordingly.JLBHOptions.toString()implementation.JLBH.addPrToPrint(...)for test inspection via reflection (still package-private API).Overall, the PR tightens encoding and documentation conventions, improves safety and thread-safety in the core harness, and makes both CSV output and tests more predictable across different environments.