Skip to content

ADRs on basic architectural principles#167

Merged
nergal-perm merged 12 commits intomasterfrom
feature/redesign
Jun 30, 2025
Merged

ADRs on basic architectural principles#167
nergal-perm merged 12 commits intomasterfrom
feature/redesign

Conversation

@nergal-perm
Copy link
Owner

No description provided.

manual: transferred most of the ADR created in feature/rewrite branch, because it was written in a much more concise way
manual: transferred the ADR created in feature/rewrite branch, because it was written in a much more concise way
prompt: Why do you suppose that the keys for the ExecutionContext's inner map should be Objects? How does this compare to the String keys? If it is a significant decision, then create an ADR for that.

manual: transferred the ADR created in feature/rewrite branch, because it was written in a much more concise way
prompt: The thing that bothers me is that ValueProviders are meant to be implemented as generics, while the real value type cannot be known at the time of graph construction, at least for some Providers. How can this problem be solved? I don't like the idea of specifying concrete types in decision table's file, because that would couple logic to the implementation. Help me find the solution.
prompt: How should we discover the type for constant ValueProviders? Say, we have a condition written down in decision table file like this: `user.age > 40`. How do we know that `40` here is Integer, and not a String, or Double, or LocalDate?
Copilot AI review requested due to automatic review settings June 30, 2025 05:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a standard ADR template and a series of architecture decision records (ADRs) covering core principles of the decision engine’s design.

  • Add a reusable ADR template for future records
  • Create ADRs 0001 through 0008 documenting key architectural decisions
  • Include project guidelines (GEMINI.md) and an example environment file

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
doc/adr/templates/template.md New ADR template skeleton
doc/adr/0001-record-architecture-decisions.md ADR 0001: record architecture decisions
doc/adr/0002-separation-of-engine-and-connectors.md ADR 0002: separate engine core and connectors
doc/adr/0003-shared-component-management-and-evaluation-optimization.md ADR 0003: shared component graph model
doc/adr/0004-execution-context-key-strategy.md ADR 0004: execution-context keying strategy
doc/adr/0005-pure-functional-core.md ADR 0005: pure functional core
doc/adr/0006-valueprovider-design-for-remote-data-and-composability.md ADR 0006: composable ValueProvider design
doc/adr/0007-type-discovery-at-graph-construction-time.md ADR 0007: type discovery at graph build time
doc/adr/0008-type-inference-for-constants.md ADR 0008: contextual type inference for constants
doc/GEMINI.md Project ADR usage and linking guidelines
GEMINI.md High-level project overview and goals
.env.example Sample environment variable file
Comments suppressed due to low confidence (1)

doc/adr/0008-type-inference-for-constants.md:19

  • [nitpick] Wrap the literal value "40" in backticks (e.g., `"40"`) to match the inline code formatting used elsewhere and improve readability.
In decision table expressions like `user.age > 40`, the literal value "40" is parsed as a string. For the `DecisionEngine` to perform a correct, type-safe comparison, it must know the intended type of this literal (e.g., `Integer`, not `String` or `Double`). The engine needs a reliable strategy to determine the correct type for such constants without requiring explicit type declarations in the decision table, which would clutter the syntax and couple the logic to specific types. This is the logical continuation of the type-safety problem addressed in ADR-0007.

nergal-perm and others added 3 commits June 30, 2025 09:28
@nergal-perm nergal-perm merged commit f472f9d into master Jun 30, 2025
3 checks passed
@nergal-perm nergal-perm deleted the feature/redesign branch June 30, 2025 05:37
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.

1 participant