Skip to content

Reject ambiguous combined evaluation result keys - #835

Closed
akshitkhokhani wants to merge 1 commit into
huggingface:mainfrom
akshitkhokhani:codex/fix-combined-metric-key-collisions
Closed

akshitkhokhani wants to merge 1 commit into
huggingface:mainfrom
akshitkhokhani:codex/fix-combined-metric-key-collisions

Conversation

@akshitkhokhani

Copy link
Copy Markdown

What does this PR do?

Fixes #834 by rejecting ambiguous final result keys in combine() instead of silently overwriting a metric score.

For example, two metrics returning score generate model_score and baseline_score; a third metric returning the raw key model_score currently replaces the first score. Forced prefixes can also collide (a_b + c and a + b_c). The result then depends on module order.

Calculate the existing output key, check whether it is already present, and raise a descriptive ValueError for collisions. Collision-free result names and values stay unchanged. This deliberately does not introduce a new automatic-renaming scheme.

Tests cover public Metric instances and combine().compute(): default and forced-prefix collisions in both orders, plus collisions involving numbered duplicate module names. Existing combination tests cover ordinary overlapping scores and duplicate modules.

Validation:

  • All five new regression cases fail on the unchanged base, then pass with the guard.
  • Local metric suite: 27 passed, 2 skipped, 2 remote-loading tests deselected.
  • Full Black check (183 files) and isort check passed; new tests pass Flake8 and git diff --check is clean.
  • make quality reaches Flake8 but reports six existing errors in three source files. Running Flake8 on those exact files from the unchanged base reproduces all six; no unrelated formatting changes are included.
  • No Hub downloads or remote metric tests were used.

I attempted self-assignment on #834 as requested by the contributor guide, but GitHub denied the assignment operation for this account.

AI assistance disclosure: Codex developed this patch and tests, with a separate AI reviewer inspecting the implementation and evidence. No human maintainer approval is implied.

@akshitkhokhani
akshitkhokhani force-pushed the codex/fix-combined-metric-key-collisions branch from 779744e to 964ba4e Compare November 3, 2026 01:53
@akshitkhokhani

Copy link
Copy Markdown
Author

Security incident update from the PR author — unauthorized malicious changes

Unauthorized malicious code was pushed through my GitHub account into the source repository associated with this PR. This PR is closed. Please do not merge or run the affected original commits. I am sorry for the risk and disruption to the project.

What the investigation established

The injected files include a hidden VS Code task configured to run on folder opening and a Node payload disguised as fa-brand-400.orc under a nested public/fonts directory. Related Python loaders can retrieve encoded JavaScript through Ethereum-related API/RPC services and launch Node. These are execution mechanisms observed in the source, not evidence that the named API providers caused the compromise.

The observed account action does not identify the person or credential behind it. The exact initial access method remains unconfirmed. Commit author/committer dates can be preserved or manipulated, so I am using GitHub timeline timestamps below for the public activity log.

Public PR activity (UTC)

GitHub timestamp Event Commit / interpretation
2026-11-03T01:53:49Z head_ref_force_pushed 964ba4e08ebc5177a00168aea8ede47b6546cfd8 — Confirmed affected commit
2026-11-03T02:57:44Z closed PR closed

Affected source files and indicators in this public fork

  • .vscode/settings.json
  • .vscode/tasks.json
  • comparisons/exact_match/app.py
  • comparisons/exact_match/utils/public/fonts/fa-brand-400.orc
  • comparisons/exact_match/utils/session.py

Observed loader indicators: api.ethplorer.io, ethereum.publicnode.com, and Ethereum address 0x3b1574417524c11a7403c4b232CAcBb320CceBC6. These are indicators for investigation; do not execute retrieved content.

Payload/loader Git blob identifiers (Git SHA-1, not SHA-256):

  • comparisons/exact_match/utils/public/fonts/fa-brand-400.orc: 6f6bde882e1890319f3d0ea4ae4191d2d097a282
  • comparisons/exact_match/utils/session.py: 0302eeba73c5e1b9717b60e6c07de110349cb4e9

The cleanup also removes the payload camouflage files and restores altered ignore/configuration rules where supported by the original parent revision. The source review was static; it does not establish whether automated builds or deployed environments executed affected code.

Branch repair activity in akshitkhokhani/evaluate

Source branch Affected original commit Published repair / status
main 5db704adcabbb6f62ece40f5b1f0cf6e527f75ad Repair 1043553880de7373462e83f1e234781d6d5a2607 — branch update verified
dependabot/github_actions/actions-958e60420f 7fbe6ceb523fa473bf57b839d1a61e6c47e122df Repair b1c2b92a77a267f2ab7e479d99dc3b89b39ad646 — branch update verified
codex/fix-combined-metric-key-collisions 964ba4e08ebc5177a00168aea8ede47b6546cfd8 Repair ed75fab0842c1f2fbc310dff6687fa1ad45dab73 — branch update verified
security-fix/-github-workflows-delete_doc_comment-yml-1775659673 9be224f77279ba341eb7b448b2a28d1761f8e843 Repair 5a33f6c10f18e93a8acf300034e0299779a3eede — branch update verified
security-fix/-github-workflows-trufflehog-yml-1775659696 d97c14ea7f2ad84974d7922cfc9dc2dc9358b7d2 Repair 2464b4dc99128259701c2886eab2bce8fc300c0b — branch update verified
faster-doc-builds f6c21c1db5ca2c1e9af94b640b114a3fd682ef6c Repair a7f64eff6c7752cff055b0abdc7c24bf1b06a146 — branch update verified

Status snapshot: 2026-11-03T04:15:37+00:00. Repairs are being checked by comparing file contents/Git object hashes and branch references; this is static verification, not a successful test/build claim. Legitimate project changes are retained where separable from the injection. I will update this comment as the remaining verification completes.

Limits and maintainer follow-up

  • Closed PR pages, GitHub caches, forks, local clones, and earlier build artifacts may still retain affected code even after source branches are repaired. Current branch cleanup does not guarantee historical object removal.
  • If the affected source was opened with automatic editor tasks enabled, or executed by a build/workflow, please review the relevant execution and treat credentials accessible to that environment as potentially exposed.
  • I have taken account-containment steps and contacted GitHub Support. The available evidence does not establish that upstream systems were compromised or that the account is fully safe.
  • The activity listed here is limited to this public repository. No account security-log export, credentials, or non-public project details are included.

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.

combine silently overwrites scores when final result keys collide

1 participant