The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.
Follows the import procedure in README.md.
source/ the originating repository verbatim — 78 documents, 28 SVGs,
8 manifests, plus .source-revision recording the commit
final/ the SSOT
document.md 729 lines written from the 29 experiment documents, not
concatenated: what was predicted, what was measured, and
where the measurement itself was wrong
evidence/raw 125 outputs, flattened to <experiment>__<file> because
the originals collided (01-baseline.txt appeared three
times) and the audit only globs the top level
evidence/meta one per raw file; command and exitCode are null and the
README says why rather than inventing them
evidence/browser 22 captures
assets/ three diagrams through techviz
.techviz/ their VizSpecs
A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.
Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.
verify-pipeline.py passes. audit-records.py reports no issues.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
102 lines
7.3 KiB
Plaintext
102 lines
7.3 KiB
Plaintext
# revision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
|
|
|
## A. who calls the format-independent compatibility engine?
|
|
(every hit below is either its own declaration or its own test)
|
|
src/messaging/messaging-schema-api/src/main/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidator.java:20:public final class SchemaCompatibilityValidator {
|
|
src/messaging/messaging-schema-api/src/main/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidator.java:29: public SchemaCompatibilityValidator(SchemaRegistry registry) {
|
|
src/messaging/messaging-schema-api/src/main/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidator.java:42: public List<SchemaVersion> versionsToCheck(String subject) {
|
|
src/messaging/messaging-schema-api/src/main/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidator.java:62: public void requireProductionMode(String subject, String destination) {
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:13:class SchemaCompatibilityValidatorTest {
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:39: private static SchemaCompatibilityValidator validator(SchemaCompatibility mode) {
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:40: return new SchemaCompatibilityValidator(new FixedRegistry(List.of(V1, V2, V3), mode));
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:45: assertThat(validator(SchemaCompatibility.BACKWARD).versionsToCheck("order.created"))
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:51: assertThat(validator(SchemaCompatibility.BACKWARD_TRANSITIVE).versionsToCheck("order.created"))
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:59: assertThat(validator(SchemaCompatibility.NONE_EXPERIMENTAL).versionsToCheck("order.created"))
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:65: SchemaCompatibilityValidator validator =
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:66: new SchemaCompatibilityValidator(
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:69: assertThat(validator.versionsToCheck("order.created")).isEmpty();
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:77: .requireProductionMode("order.created", "orders.v1"))
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:87: .requireProductionMode("order.created", "orders.v1"))
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:93: assertThat(SchemaCompatibilityValidator.checksBackward(SchemaCompatibility.FULL)).isTrue();
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:94: assertThat(SchemaCompatibilityValidator.checksForward(SchemaCompatibility.FULL)).isTrue();
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:99: assertThat(SchemaCompatibilityValidator.checksForward(SchemaCompatibility.BACKWARD)).isFalse();
|
|
src/messaging/messaging-schema-api/src/test/java/dev/caskeleton/messaging/schema/SchemaCompatibilityValidatorTest.java:100: assertThat(SchemaCompatibilityValidator.checksBackward(SchemaCompatibility.FORWARD)).isFalse();
|
|
|
|
## B. the duplication that engine's javadoc exists to prevent
|
|
--- schema-api: allowlist form
|
|
public static boolean checksBackward(SchemaCompatibility mode) {
|
|
Objects.requireNonNull(mode, "mode must not be null");
|
|
return mode == SchemaCompatibility.BACKWARD
|
|
|| mode == SchemaCompatibility.BACKWARD_TRANSITIVE
|
|
|| mode == SchemaCompatibility.FULL
|
|
|| mode == SchemaCompatibility.FULL_TRANSITIVE;
|
|
}
|
|
|
|
/**
|
|
* Reports whether older readers must be able to read data written by the candidate.
|
|
*
|
|
* @param mode the compatibility mode
|
|
* @return true when the forward direction is enforced
|
|
*/
|
|
public static boolean checksForward(SchemaCompatibility mode) {
|
|
Objects.requireNonNull(mode, "mode must not be null");
|
|
return mode == SchemaCompatibility.FORWARD
|
|
|| mode == SchemaCompatibility.FORWARD_TRANSITIVE
|
|
|| mode == SchemaCompatibility.FULL
|
|
|| mode == SchemaCompatibility.FULL_TRANSITIVE;
|
|
}
|
|
|
|
/**
|
|
* Reports whether a mode compares against the whole history.
|
|
*
|
|
* @param mode the compatibility mode
|
|
* @return true for the transitive modes
|
|
*/
|
|
public static boolean isTransitive(SchemaCompatibility mode) {
|
|
Objects.requireNonNull(mode, "mode must not be null");
|
|
return mode == SchemaCompatibility.BACKWARD_TRANSITIVE
|
|
|| mode == SchemaCompatibility.FORWARD_TRANSITIVE
|
|
|| mode == SchemaCompatibility.FULL_TRANSITIVE;
|
|
}
|
|
--- schema-avro: private denylist form
|
|
private static boolean isTransitive(SchemaCompatibility mode) {
|
|
return mode == SchemaCompatibility.BACKWARD_TRANSITIVE
|
|
|| mode == SchemaCompatibility.FORWARD_TRANSITIVE
|
|
|| mode == SchemaCompatibility.FULL_TRANSITIVE;
|
|
}
|
|
|
|
private static boolean readsBackward(SchemaCompatibility mode) {
|
|
return mode != SchemaCompatibility.FORWARD && mode != SchemaCompatibility.FORWARD_TRANSITIVE;
|
|
}
|
|
|
|
private static boolean readsForward(SchemaCompatibility mode) {
|
|
return mode != SchemaCompatibility.BACKWARD && mode != SchemaCompatibility.BACKWARD_TRANSITIVE;
|
|
}
|
|
|
|
## C. the platform's own SchemaRegistry port: any importer?
|
|
exit=1 (1 = no importer anywhere)
|
|
--- the SchemaRegistry name that IS imported elsewhere is a different type:
|
|
src/adapter/outbound/messaging/src/main/java/dev/caskeleton/adapter/outbound/messaging/envelope/LocalJsonSchemaRegistry.java:6:import com.networknt.schema.SchemaRegistry;
|
|
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/template/JsonSchemaVariableValidator.java:5:import com.networknt.schema.SchemaRegistry;
|
|
|
|
## D. codec consumers outside their owning leaf
|
|
JacksonMessageCodec src/messaging/messaging-spring-boot-starter/src/main/java/dev/caskeleton/messaging/autoconfigure/MessagingCoreAutoConfiguration.java
|
|
AvroMessageCodec NONE
|
|
AvroCompatibilityGate NONE
|
|
ProtobufMessageCodec NONE
|
|
ProtobufMessageContract NONE
|
|
RawBytesMessageCodec NONE
|
|
CloudEventMapper NONE
|
|
DefaultCloudEventMapper NONE
|
|
CloudEventExtensions NONE
|
|
|
|
## E. registry membership of the codec leaves (does shipping match usage?)
|
|
messaging-schema-api runtime_memberships=['app-bootstrap']
|
|
messaging-schema-json runtime_memberships=['app-bootstrap']
|
|
messaging-schema-avro runtime_memberships=[]
|
|
messaging-schema-protobuf runtime_memberships=[]
|
|
messaging-cloudevents runtime_memberships=['app-bootstrap']
|
|
|
|
## F. the raw-bytes default rule is enforced by content type, not by class
|
|
52: if (ContentType.OCTET_STREAM.equals(defaultCodec.contentType())) {
|