Class AdapterTckRunner

java.lang.Object
org.j7m.middleware.adapter.tck.AdapterTckRunner

public final class AdapterTckRunner extends Object
Deterministic runner for adapter compatibility scenarios.

The runner is immutable and thread-safe when supplied with a thread-safe Clock. It does not start external services, does not know vendor SDK types, and does not weaken J7M-native semantics. Required unsupported scenarios, security hook gaps, redaction failures, and stronger-than-proven claims all produce rejected reports.

The runner lifecycle is per compatibility run: construct a runner, execute one or more profiles, and publish immutable reports. Scenario execution is deterministic and CPU-local for the built-in fake probes; it must not block on external brokers, container runtimes, cloud services, or vendor products. Public failures are normalized as rejected TCK results rather than raw adapter exceptions, and report metadata is redacted before it leaves the runner.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Runner-owned execution limits for a TCK run.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a TCK runner using the system UTC clock.
    AdapterTckRunner(Clock clock, long deterministicSeed)
    Creates a TCK runner.
    AdapterTckRunner(Clock clock, long deterministicSeed, AdapterTckRunner.ExecutionPolicy executionPolicy)
    Creates a TCK runner with explicit execution bounds.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    referenceDigestFor(org.j7m.middleware.adapter.spi.AdapterReferenceOperation operation)
    Computes the deterministic digest expected for a reference operation.
    static String
    referenceObservedValueFor(org.j7m.middleware.adapter.spi.AdapterReferenceOperation operation)
    Computes the deterministic runner-owned observable value for a reference operation.
    org.j7m.middleware.adapter.spi.AdapterTckReport
    run(org.j7m.middleware.adapter.spi.AdapterProvider provider, org.j7m.middleware.adapter.spi.AdapterSemanticProbe probe, org.j7m.middleware.adapter.spi.AdapterTckProfile profile)
    Runs a complete profile against an adapter provider and semantic probe.
    List<org.j7m.middleware.adapter.spi.AdapterFailureModeResult>
    runFailureModes(org.j7m.middleware.adapter.spi.AdapterSemanticProbe probe, List<org.j7m.middleware.adapter.spi.AdapterFailureMode> failureModes)
    Runs failure-mode checks without executing a full semantic profile.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AdapterTckRunner

      public AdapterTckRunner()
      Creates a TCK runner using the system UTC clock.
    • AdapterTckRunner

      public AdapterTckRunner(Clock clock, long deterministicSeed)
      Creates a TCK runner.
      Parameters:
      clock - clock used for report timestamps
      deterministicSeed - deterministic seed recorded in reports
    • AdapterTckRunner

      public AdapterTckRunner(Clock clock, long deterministicSeed, AdapterTckRunner.ExecutionPolicy executionPolicy)
      Creates a TCK runner with explicit execution bounds.
      Parameters:
      clock - clock used for report timestamps
      deterministicSeed - deterministic seed recorded in reports
      executionPolicy - runner-owned deadlines and report bounds
  • Method Details

    • run

      public org.j7m.middleware.adapter.spi.AdapterTckReport run(org.j7m.middleware.adapter.spi.AdapterProvider provider, org.j7m.middleware.adapter.spi.AdapterSemanticProbe probe, org.j7m.middleware.adapter.spi.AdapterTckProfile profile)
      Runs a complete profile against an adapter provider and semantic probe.
      Parameters:
      provider - adapter provider under test
      probe - deterministic semantic probe
      profile - TCK profile to execute
      Returns:
      safe immutable TCK report
    • runFailureModes

      public List<org.j7m.middleware.adapter.spi.AdapterFailureModeResult> runFailureModes(org.j7m.middleware.adapter.spi.AdapterSemanticProbe probe, List<org.j7m.middleware.adapter.spi.AdapterFailureMode> failureModes)
      Runs failure-mode checks without executing a full semantic profile.
      Parameters:
      probe - deterministic semantic probe
      failureModes - failure modes to execute
      Returns:
      immutable failure-mode results
    • referenceObservedValueFor

      public static String referenceObservedValueFor(org.j7m.middleware.adapter.spi.AdapterReferenceOperation operation)
      Computes the deterministic runner-owned observable value for a reference operation.

      The method is public so adapter TCK fixtures and external probes can derive the same observable value from the runner-owned operation they executed. The observable value is intentionally distinct from the operation payload so a probe cannot pass by echoing runner input. A scenario pass is still accepted only when the runner invokes AdapterSemanticProbe.runReferenceOperations(AdapterTckScenario, List) and verifies the returned ordered transcript.

      Parameters:
      operation - reference operation issued by the runner
      Returns:
      stable safe observable value for the operation's effect
    • referenceDigestFor

      public static String referenceDigestFor(org.j7m.middleware.adapter.spi.AdapterReferenceOperation operation)
      Computes the deterministic digest expected for a reference operation.

      The digest is derived from referenceObservedValueFor(AdapterReferenceOperation), not from the operation payload. This keeps the compatibility decision based on a runner-observable effect instead of an echoable input value.

      Parameters:
      operation - reference operation issued by the runner
      Returns:
      stable safe digest for the operation's observable result