Skip to content

Conversation

@acharneski
Copy link
Member

@acharneski acharneski commented Oct 22, 2025

This pull request introduces a new mechanism for registering and describing subtypes in type describers, adds object validation support, and includes several improvements and fixes across the codebase. The most significant changes are the addition of subtype registration and description in TypeDescriber implementations, a new ValidatedObject utility, and enhancements to YAML output for type descriptions.

Subtype Registration and Description

  • Added subTypeRegistry and methods (registerSubType, registerSubTypes, clearSubTypes) to JsonDescriber, YamlDescriber, and TypeScriptDescriber, enabling dynamic registration and management of sub-implementations for parent classes. ([[1]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-49ff95267abdd5b2baa5ed8111824601f9c78a1c09ad82b093248435e4e07156L22-R48), [[2]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-3ddfe8e062ab5c3c59271b131c9fd105ba915255fdb477b3c005e4ee8ea4fbb9R29-R55), [[3]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-3906635f35ba4021ed5d23c0abe3a2910430c62c54fbee1df707b1958abde669R25-R66))
  • Updated TypeDescriber abstract class to require subtype registration methods, standardizing the interface for all describers. ([core/src/main/kotlin/com/simiacryptus/cognotik/describe/TypeDescriber.ktR21-R23](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-91cc167a61bb733988b01a4462e71d004f425ee096e06642fab8bbcb901ae531R21-R23))
  • Enhanced YamlDescriber to include registered subtypes in its YAML output, improving documentation and introspection of type hierarchies. ([[1]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-3906635f35ba4021ed5d23c0abe3a2910430c62c54fbee1df707b1958abde669R84-R125), [[2]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-3906635f35ba4021ed5d23c0abe3a2910430c62c54fbee1df707b1958abde669L192-R278), [[3]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-3906635f35ba4021ed5d23c0abe3a2910430c62c54fbee1df707b1958abde669L209-R299), [[4]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-3906635f35ba4021ed5d23c0abe3a2910430c62c54fbee1df707b1958abde669R315-R352), [[5]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-3906635f35ba4021ed5d23c0abe3a2910430c62c54fbee1df707b1958abde669R386-R417))

Object Validation Support

  • Introduced the ValidatedObject interface, which provides recursive validation for objects and their fields/properties, including support for nested lists and custom error reporting. ([core/src/main/kotlin/com/simiacryptus/cognotik/util/ValidatedObject.ktR1-R65](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-edaf080fb4549318f42d0ea0d3c2b944722e3ee96d1676d1636cc2e93a06a1fbR1-R65))
  • Updated JsonUtil to automatically validate objects implementing ValidatedObject during deserialization, logging warnings for validation failures. ([[1]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-cc53906c3e5387532c42dc65c60a5ff5bd3a7f4fad4094ba0d82aff636ceecb1R71-R76), [[2]](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-cc53906c3e5387532c42dc65c60a5ff5bd3a7f4fad4094ba0d82aff636ceecb1R85))

Patch Processor Extension

  • Added a new Thermodynamic mode to PatchProcessors, offering a DNA-like binding energy approach for patch matching. ([core/src/main/kotlin/com/simiacryptus/cognotik/diff/PatchProcessors.ktR10-R19](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-107fd4a583d359db057d92c15cf1a74f2cd27bfa10163fad05b381ca03d2eff9R10-R19))

Miscellaneous Improvements

  • Added feedback tracking fields (feedbackRequested, feedbackOptOut) to AppSettingsState for improved user feedback management. ([intellij/src/main/kotlin/com/simiacryptus/cognotik/config/AppSettingsState.ktR85-R86](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-6fdc153a3cb3fbedb7c9c86db53c880a6f2200c30b1ab0ee81f11e0d649c9b37R85-R86))
  • Improved imports and notification handling in UsageTable, and minor refactoring for better code clarity. ([intellij/src/main/kotlin/com/simiacryptus/cognotik/config/UsageTable.ktR3-R25](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-535ad217a39573db644c1a7b5eea339a9b9224733bb8b7e3d2bee07c91f27598R3-R25))
  • Updated version number in gradle.properties to 2.0.17. ([gradle.propertiesL4-R4](https://github.com/SimiaCryptus/Cognotik/pull/21/files#diff-3d103fc7c312a3e136f88e81cef592424b8af2464c468116545c4d22d6edcf19L4-R4))

These changes collectively enhance the flexibility, introspection, and reliability of the type description and object handling infrastructure.

@acharneski acharneski merged commit e20f811 into main Oct 22, 2025
7 checks passed
@acharneski acharneski deleted the 2.0.17 branch October 22, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants