Skip to content

add compatible field to configs#1812

Open
dhower-qc wants to merge 5 commits intoriscv:mainfrom
dhower-qc:profile-compat
Open

add compatible field to configs#1812
dhower-qc wants to merge 5 commits intoriscv:mainfrom
dhower-qc:profile-compat

Conversation

@dhower-qc
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 29, 2026 16:02
@dhower-qc dhower-qc requested a review from ThinkOpenly as a code owner April 29, 2026 16:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.48%. Comparing base (7053f31) to head (d2a49b1).

Files with missing lines Patch % Lines
tools/ruby-gems/udb/lib/udb/cfg_arch.rb 92.85% 2 Missing ⚠️
tools/ruby-gems/udb/lib/udb/resolver.rb 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1812      +/-   ##
==========================================
+ Coverage   72.18%   72.48%   +0.29%     
==========================================
  Files          52       52              
  Lines       27744    27782      +38     
  Branches     6002     6002              
==========================================
+ Hits        20028    20138     +110     
+ Misses       7716     7644      -72     
Flag Coverage Δ
idlc 76.11% <ø> (ø)
udb 67.01% <90.00%> (+0.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
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

Adds a new compatible field to architecture configuration YAMLs to express (and validate) mutual satisfiability with other configs, including transitive compatibility chains.

Changes:

  • Extend the config JSON schema to allow compatible as a string or list of strings.
  • Add compatible accessor on Udb::Config and implement compatibility validation in ConfiguredArchitecture#valid?.
  • Add unit tests covering basic compatible/incompatible and transitive compatible scenarios.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/ruby-gems/udb/test/test_cfg_arch.rb Adds tests for compatibility validation behavior.
tools/ruby-gems/udb/lib/udb/resolver.rb Introduces pointer resolution helper for config-name vs file-path references.
tools/ruby-gems/udb/lib/udb/config.rb Exposes compatible field from parsed config data.
tools/ruby-gems/udb/lib/udb/cfg_arch.rb Validates compatible pointers (including transitive) during config validation.
spec/schemas/config_schema.json Allows compatible in config schema (string or array of strings).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/ruby-gems/udb/lib/udb/cfg_arch.rb
Comment thread tools/ruby-gems/udb/test/test_cfg_arch.rb
Comment thread tools/ruby-gems/udb/lib/udb/resolver.rb
Copy link
Copy Markdown
Collaborator

@ThinkOpenly ThinkOpenly left a comment

Choose a reason for hiding this comment

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

Looks like Copilot has a point or two for consideration.

I'd love to see a few more words in the PR description. :-)

Otherwise, LGTM.

Copilot AI review requested due to automatic review settings May 1, 2026 20:01
Copy link
Copy Markdown
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/ruby-gems/udb/lib/udb/resolver.rb
Comment thread tools/ruby-gems/udb/test/test_cfg_arch.rb Outdated
Copilot AI review requested due to automatic review settings May 7, 2026 19:33
@dhower-qc dhower-qc enabled auto-merge May 7, 2026 19:33
Copy link
Copy Markdown
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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

def resolve_compatible_pointer(pointer)
@config.info.resolver.cfg_arch_for_pointer(
pointer,
relative_dir: Pathname.new(@config.info.path).dirname
Comment on lines +1785 to +1791
# Use dup per top-level pointer so sibling pointers each get a fresh visited set —
# each branch independently validates against any shared transitive targets. Cycle
# detection within a single chain is still enforced because visited mutates in-place
# during the recursive descent.
visited = T.let(Set.new([name]), T::Set[String])
Array(@config.compatible).each do |pointer|
begin
assert result.valid,
"Expected valid when compatible pointer is the known config name 'rv64', got: #{result.reasons}"
end

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.

4 participants