Skip to content

add compatible field to configs#1812

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

add compatible field to configs#1812
dhower-qc wants to merge 3 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 64.44444% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.51%. Comparing base (a1225d7) to head (0c54e1a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
tools/ruby-gems/udb/lib/udb/cfg_arch.rb 55.88% 15 Missing ⚠️
tools/ruby-gems/udb/lib/udb/resolver.rb 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1812      +/-   ##
==========================================
+ Coverage   72.24%   72.51%   +0.26%     
==========================================
  Files          52       52              
  Lines       27671    27779     +108     
  Branches     6009     6012       +3     
==========================================
+ Hits        19992    20145     +153     
+ Misses       7679     7634      -45     
Flag Coverage Δ
idlc 76.16% <ø> (-0.03%) ⬇️
udb 67.02% <64.44%> (+0.75%) ⬆️

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 on lines 17 to +19
#
# Raised by Resolver#cfg_info when a config name or path cannot be found.
class ConfigNotFoundError < StandardError; end
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

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

ConfigNotFoundError is documented as being raised by Resolver#cfg_info, but cfg_info still logs + exits on missing config names, and this exception class isn’t referenced anywhere. Either update cfg_info to raise ConfigNotFoundError (and stop calling exit from library code), or remove/adjust the comment and class to reflect actual behavior.

Suggested change
#
# Raised by Resolver#cfg_info when a config name or path cannot be found.
class ConfigNotFoundError < StandardError; end

Copilot uses AI. Check for mistakes.
Comment on lines +647 to +649
# rv64 is a known repo config; compatibility check should not raise
assert [true, false].include?(result.valid),
"Expected cfg_arch_for_pointer to resolve name-based pointer 'rv64' without error"
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

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

This assertion is effectively a no-op: result.valid will always be either true or false, and the test will already fail if pointer resolution raises. Consider asserting an expected outcome (e.g., that the config is compatible with rv64), or assert on the absence/presence of specific compatibility reasons so this case actually verifies name-based pointer resolution behavior.

Suggested change
# rv64 is a known repo config; compatibility check should not raise
assert [true, false].include?(result.valid),
"Expected cfg_arch_for_pointer to resolve name-based pointer 'rv64' without error"
assert result.valid,
"Expected valid when compatible pointer is the known config name 'rv64', got: #{result.reasons}"

Copilot uses AI. Check for mistakes.
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