Skip to content

AGENTS.md: proposed units policy - #2939

Open
veprbl wants to merge 3 commits into
mainfrom
pr/agent_units
Open

AGENTS.md: proposed units policy#2939
veprbl wants to merge 3 commits into
mainfrom
pr/agent_units

Conversation

@veprbl

@veprbl veprbl commented Sep 2, 2026

Copy link
Copy Markdown
Member

Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.

What is the urgency of this PR?

  • High (please describe reason below)
  • Medium
  • Low

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Optimization (issue #__)
  • Updated parameters, constants (issue #__)
  • Updated documentation
  • other: __

Please check if any of the following apply

  • This PR requires changes to geometry (epic PR: __)
  • This PR requires changes to EDM4eic (EDM PR: __)
  • This PR introduces breaking changes. Please describe changes users need to make below.
  • This PR changes default behavior. Please describe changes below.
  • AI was used in preparing this PR. Please describe usage below.

Copilot AI lite review requested due to automatic review settings September 2, 2026 19:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new policy text includes a specific code reference (PrimaryVertices.cc snippet) that does not match the actual code, which could mislead readers trying to verify the guidance.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a proposed “Unit System Policy” section to AGENTS.md to document how contributors should handle conversions between edm4eic::unit, dd4hep, and Acts::UnitConstants and what anti-patterns to flag in review.

Changes:

  • Documented a three-unit-system policy and explicit conversion rules for EDM fields, geometry-derived values, and Acts interfaces.
  • Added a short list of anti-pattern examples to help reviewers detect incorrect unit usage.
File summaries
File Description
AGENTS.md Adds unit-system rules and conversion guidance intended to prevent subtle unit-mismatch bugs.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread AGENTS.md
Comment thread AGENTS.md Outdated
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Copilot AI review requested due to automatic review settings September 3, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is documentation-only and the added policy aligns with existing in-repo usage patterns, with only a minor clarification suggested.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread AGENTS.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The new documentation includes an inaccurate concrete reference and one ambiguous phrase that should be corrected to avoid misleading future reviewers/contributors.

Review details

Suppressed comments (2)

Previously missed (1) — in code that hasn't changed since the last review.

AGENTS.md:195

  • The phrase "Acts EDM" is unclear here (Acts isn't the project's event data model); this reads like a specific concept rather than "values passed to/from Acts". Clarifying the wording would make the policy easier to follow.

AGENTS.md:206

  • The reference to PrimaryVertices.cc is inaccurate: the code uses ... / edm4eic::unit::mm on transverse radius and z (not v.x / edm4eic::unit::mm). This may mislead reviewers trying to find a concrete example.
These should use `edm4eic::unit::mm` / `edm4eic::unit::GeV` / `edm4eic::unit::MeV` instead. Correct reference: `PrimaryVertices.cc` (`v.x / edm4eic::unit::mm`) and `SimCalorimeterHitProcessor.cc` (`constant<double>(...) * edm4eic::unit::mm / dd4hep::mm`).
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@DraTeots DraTeots left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested on an agent. Works.

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