Skip to content

Add TODO documenting label distinctness assumption in environment comparison sheet#133

Merged
prosenjitdhole merged 2 commits into
prosenj_cli_hq_eval_report_phase_4from
copilot/sub-pr-101-another-one
Mar 6, 2026
Merged

Add TODO documenting label distinctness assumption in environment comparison sheet#133
prosenjitdhole merged 2 commits into
prosenj_cli_hq_eval_report_phase_4from
copilot/sub-pr-101-another-one

Conversation

Copilot AI commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

_build_environment_comparison_sheet uses baseline_label and test_label as DataFrame column keys. If both labels were identical, the dict keys would collide and the baseline column would be silently overwritten.

Per reviewer confirmation, the caller enforces distinct labels — added a TODO to document this assumption and the associated risk.

Changes

  • hwqueue_excel.py: Added a TODO comment above the rows list in _build_environment_comparison_sheet noting that labels are assumed distinct and documenting the dict key collision consequence if that invariant is ever violated.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: prosenjitdhole <239307697+prosenjitdhole@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on baseline vs test label for Excel report Add TODO documenting label distinctness assumption in environment comparison sheet Mar 6, 2026
@prosenjitdhole prosenjitdhole marked this pull request as ready for review March 6, 2026 13:37
Copilot AI review requested due to automatic review settings March 6, 2026 13:37
@prosenjitdhole prosenjitdhole merged commit 581d68d into prosenj_cli_hq_eval_report_phase_4 Mar 6, 2026
1 check passed

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.

Pull request overview

Adds an in-code note documenting the assumption that baseline_label and test_label are distinct when building the environment comparison DataFrame, since identical labels would cause dict key collisions and silently lose one column.

Changes:

  • Add a TODO comment in _build_environment_comparison_sheet warning about baseline_label/test_label dict-key collision and potential overwrite.

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

Comment on lines +625 to +627
# TODO: baseline_label and test_label are assumed to be distinct (enforced by the caller);
# if they were ever equal, the dict keys would collide and the baseline column would be
# overwritten. Consider enforcing distinct labels or using stable column headers if needed.

Copilot AI Mar 6, 2026

Copy link

Choose a reason for hiding this comment

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

The new TODO says distinctness is "enforced by the caller", but in this codepath generate_comparison_excel() passes through baseline_label/test_label without checking for equality, and hwqueue_pipeline.py derives labels from config/dir names without enforcing distinctness. Please either remove/soften the "enforced by the caller" claim, or add a local guard (e.g., raise/adjust labels) to actually enforce the invariant and avoid silent column overwrites.

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.

3 participants