Split requirements into focused docs, add ops/runbooks, tighten init ordering, and expand Core test matrix (with tuned JaCoCo gates) #834
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 change elevates Chronicle Core’s documentation, operational guidance, and test coverage while making a handful of targeted correctness and determinism fixes. It replaces the monolithic
project-requirements.adocwith focused specs (functional, data, operational, interface control, and system architecture), wires the docs intoAGENTS.md, introduces an executable test-batch plan, and nudges quality gates to realistic, enforceable levels.Why
CORE-FN-*,CORE-DATA-*,CORE-OPS-*) that tests, ADRs, and runbooks can reference.ChronicleInithooks can set properties beforeJvmconsumes them.What changed (highlights)
Documentation & developer UX
AGENTS.md: Replace single “Project Requirements” link with a navigable suite: Functional, Data, Operational, Interface Control (ICD), and System Architecture.New specs:
functional-requirements.adoc:CORE-FN-001..055catalogue.data-requirements.adoc:CORE-DATA-*identifiers for on-wire and telemetry shape.operational-requirements.adoc:CORE-OPS-*guarantees operators can rely on.interface-control.adoc: API contracts tied back toCORE-FN-*.system-architecture.adoc: capability map and component interactions.Runbooks & scenarios:
runbooks/system-properties.adoc,runbooks/resource-tracing.adoc,runbooks/releaser-drain.adoc,runbooks/native-affinity.adoc.ops-scenarios.adoc: common failure modes → resolution breadcrumb trail.Security & pooling docs:
object-pooling-and-caching.adoc: expand withScopedThreadLocalsemantics and guard rails.security-review.adoc: cross-link to thread-safety guarantees.Decision log maintenance
project-requirements.adocto the new functional spec; adjust notes forCORE-OPS-*entries.Build & quality gates
0.77and branch0.67as project defaults and in thesonarprofile to reflect current, stable coverage while keeping pressure on critical paths.defaultGoaltoverifyunder thesonarprofile to drive report generation consistently.surefire-buildagent/**,**/*.deferred, andsystem-properties-precedence*.propertiesto avoid false positives.Core behaviour fixes
Boot ordering: call
ChronicleInit.init()at the top ofJvmstatic init so pre-init runnables can prepare or override properties beforeJvmreads them.Resource tracing noise: gate the “resource tracing enabled” WARN behind
notJUnitTestto keep CI logs clean.Thread-local cleanup race: synchronise
CleaningThreadLocal.cleanupNonCleaningThreads()internal list manipulation; make the method robust under concurrent callers.Scoped pools: validate
ScopedThreadLocalcapacity (maxInstances > 0) early to prevent misconfiguration.I/O helpers:
IOTools.createTempDirectory(...): actually create the directory (and mark for delete-on-exit); surface IO errors.IOTools.createTempFile(...): materialise a unique, target-scoped file path and ensure parent prep is safe/idempotent.Tests & utilities
Test batch plan: new
TESTS_TODO.mdwith 11 reproducible command batches to exercise the most sensitive areas pre-publish.New/expanded tests (selected):
ChronicleInitPrecedenceTest,SystemPropertiesProbeMain,SystemPropertiesPrecedenceTest.CleaningThreadLocalIntegrationTest,ScopedThreadLocalLifecycleTest.ReferenceCountingFuzzTest,ReferenceTracingIntegrationTest,BackgroundResourceReleaserTestadditions.OSPageAlignmentTest.IOToolsCreateDirectoriesTest,IOToolsTempDirectoryTest.Slf4jExceptionHandlerTestfallback path,ThreadLocalisedExceptionHandlerTest,ChainedExceptionHandlerTest.InternalPomPropertiesMatrixTest.SetTimeProviderTestconcurrency, parsing, and unit conversions.Test resources:
custom-system.propertiesfor classpath precedence checks.Backwards compatibility
APIs: no public API signature changes.
Behavioural notes:
Jvmnow guarantees init runnables execute before property hydration. Expect earlier failures for misconfigured hooks (desirable).ScopedThreadLocalwill now throw ifmaxInstances <= 0(fast-fail).IORuntimeExceptionon env issues.Operational impact
CORE-OPS-*requirements documented; runbooks added and linked fromAGENTS.md.