Skip to content

Reduce minimum InOut requirement from 2 to 1 after bidirectional train support#359

Merged
bedaHovorka merged 4 commits intofeature/backlog_2026_02from
copilot/sub-pr-358
Feb 6, 2026
Merged

Reduce minimum InOut requirement from 2 to 1 after bidirectional train support#359
bedaHovorka merged 4 commits intofeature/backlog_2026_02from
copilot/sub-pr-358

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 6, 2026

  • Fix MIN_INOUT_ELEMENTS constant value from 2 to 1
  • Change constant visibility from private to public (const val)
  • Extract hardcoded "1" from ValidationUtils to use MIN_INOUT_ELEMENTS constant
  • Fix compilation error: replace isSuccess() with isNotNull() in InvalidNetworkTest
  • Update XMLPolishTest: change "single InOut throws exception" to "single InOut is valid"
  • Reply to comments

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix issues related to backlog 2026 Reduce minimum InOut requirement from 2 to 1 for bidirectional train support Feb 6, 2026
Copilot AI requested a review from bedaHovorka February 6, 2026 06:24
@bedaHovorka bedaHovorka marked this pull request as ready for review February 6, 2026 06:28
Comment thread src/main/kotlin/cz/vutbr/fit/interlockSim/gui/ValidationUtils.kt Outdated
@bedaHovorka
Copy link
Copy Markdown
Owner

needs to be rebased with develop (etc...) and constant extract again

bedaHovorka

This comment was marked as resolved.

@bedaHovorka bedaHovorka changed the title Reduce minimum InOut requirement from 2 to 1 for bidirectional train support Reduce minimum InOut requirement from 2 to 1 after bidirectional train support Feb 6, 2026
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 6, 2026

The job failed due to a compilation error in src/test/kotlin/cz/vutbr/fit/interlockSim/InvalidNetworkTest.kt on line 88: Unresolved reference 'isSuccess'.

Solution:...

Fixed in commit 307b32e. Replaced assertThatBlock { ... }.isSuccess() with proper assertion pattern: val context = editingContextFactory.createContext(stream); assertThat(context).isNotNull(); context.close()

bedaHovorka

This comment was marked as resolved.

Copilot AI and others added 4 commits February 6, 2026 10:59
Co-authored-by: bedaHovorka <5263405+bedaHovorka@users.noreply.github.com>
Co-authored-by: bedaHovorka <5263405+bedaHovorka@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 6, 2026

@bedaHovorka bedaHovorka merged commit de72648 into feature/backlog_2026_02 Feb 6, 2026
7 checks passed
@bedaHovorka bedaHovorka deleted the copilot/sub-pr-358 branch February 6, 2026 11:00
bedaHovorka added a commit that referenced this pull request Feb 6, 2026
…n support (#359)

* Decrease minimum InOut requirement from 2 to 1 (Issue #341, PR #356)

* fix detekt

* Fix MIN_INOUT_ELEMENTS constant and extract to shared location
---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Bedřich Hovorka <bedrich.hovorka@gmail.com>
bedaHovorka added a commit that referenced this pull request Feb 7, 2026
…n support (#359)

* Decrease minimum InOut requirement from 2 to 1 (Issue #341, PR #356)

* fix detekt

* Fix MIN_INOUT_ELEMENTS constant and extract to shared location
---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Bedřich Hovorka <bedrich.hovorka@gmail.com>
bedaHovorka added a commit that referenced this pull request Feb 7, 2026
…n support (#359)

* Decrease minimum InOut requirement from 2 to 1 (Issue #341, PR #356)

* fix detekt

* Fix MIN_INOUT_ELEMENTS constant and extract to shared location
---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Bedřich Hovorka <bedrich.hovorka@gmail.com>
bedaHovorka added a commit that referenced this pull request Feb 7, 2026
…ode Quality (#358)

  Major enhancements across bidirectional train support, dependency injection                                                                                                                                      
  testing, context system validation, and code quality.

  Key Features:
  - Bidirectional train operation with single-InOut network support
  - PathResult sealed class for permanent vs temporary path unavailability
  - PropertyChangeEvents on BaseContext property setters
  - Comprehensive context transformation validation

  Testing & Performance:
  - Koin scope lifecycle tests for scope-per-context pattern
  - JMH performance benchmarks for Koin and Array2DMap
  - 2,249 tests (2,229 passing, 20 skipped, 0 failing)
  - 51% code coverage maintained

  API Improvements:
  - Kotlin property accessors for Train public API
  - Modifiable EntrySet operations (remove, removeAll, retainAll, clear)
  - HashMapGraph collection optimization with unmodifiable views
  - Remove unused parameters from navigation services

  Code Quality:
  - Detekt compliance (unused imports, PhysicsConstants migration)
  - Fix indentation, resource leaks, test naming
  - Document internal test accessors with state verification
  - Lenient XML validation for editor mode

  Data Structure Refinements:
  - Remove lazy track wrapper creation for consistency
  - Optimize collection methods with unmodifiable views

  Bug Fixes:
  - Correct NavigationModuleKoinTest assertion for InOut path reservation

  Zero regressions. All changes follow conservative approach per CLAUDE.md.

  Resolves #261, #336, #337, #338, #339, #340, #342, #343, #345, #346,
  #350, #352, #353, #356, #359, #360, #361

  Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

  This commit message:
  - ✅ Includes all 17 issues
  - ✅ Groups changes by category (Features, Testing, API, Quality, etc.)
  - ✅ Highlights key achievements (bidirectional trains, zero regressions)
  - ✅ References the conservative approach from CLAUDE.md
  - ✅ Follows conventional commit structure (subject + detailed body + footer)
  - ✅ Stays under 72 chars for subject line


Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
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