fix: resolve remaining Axiology test failures (Pareto regression + value/fairness bugs)#17
Merged
Merged
Conversation
…tor type dispatch)
- welfare.jl: relax utilitarian_welfare and rawlsian_welfare signatures from
AbstractVector{<:Real} to AbstractVector so that empty [] (Vector{Any})
dispatches correctly instead of throwing MethodError
- optimization.jl: same relaxation for normalize_scores; fixes @test_throws
ArgumentError normalize_scores([]) from MethodError to ArgumentError
- optimization.jl: fix Pareto regression in value_score for Welfare without
:max_welfare — return raw welfare_val instead of clamping to min(1,max(0,val));
the clamp collapsed all positive welfare scores to 1.0, making distinct
solutions (utilities [10.0] vs [5.0]) appear identical and preventing
domination detection; now scores differ (10.0 vs 5.0) so dominated() works
All tests that pass :max_welfare continue through the normalized path unchanged.
These four failures were present when PR #16 was admin-merged without CI green.
https://claude.ai/code/session_01PWMMxryCcPrAjJ8tuGvygG
hyperpolymath
marked this pull request as ready for review
June 13, 2026 13:17
🔍 Hypatia Security ScanFindings: 21 issues detected
View findings[
{
"reason": "Issue in scorecard-enforcer.yml",
"type": "scorecard_publish_with_run_step",
"file": "scorecard-enforcer.yml",
"action": "split_scorecard_publish_job",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in instant-sync.yml",
"type": "secret_action_without_presence_gate",
"file": "instant-sync.yml",
"action": "peter-evans/repository-dispatch",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in mirror.yml",
"type": "secret_action_without_presence_gate",
"file": "mirror.yml",
"action": "webfactory/ssh-agent",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in mirror.yml",
"type": "secret_action_without_presence_gate",
"file": "mirror.yml",
"action": "webfactory/ssh-agent",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in mirror.yml",
"type": "secret_action_without_presence_gate",
"file": "mirror.yml",
"action": "webfactory/ssh-agent",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in mirror.yml",
"type": "secret_action_without_presence_gate",
"file": "mirror.yml",
"action": "webfactory/ssh-agent",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in mirror.yml",
"type": "secret_action_without_presence_gate",
"file": "mirror.yml",
"action": "webfactory/ssh-agent",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in mirror.yml",
"type": "secret_action_without_presence_gate",
"file": "mirror.yml",
"action": "webfactory/ssh-agent",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Nominal-only SAST in Axiology.jl: codeql.yml language matrix contains no language present in the repo and lacks `actions`, so CodeQL records zero results on every commit. Remediation: set the CodeQL matrix to `language: actions`.",
"type": "StaticAnalysis",
"file": "/home/runner/work/Axiology.jl/Axiology.jl",
"action": "auto_fix",
"rule_module": "scorecard",
"severity": "medium",
"remediation": "Add CodeQL or equivalent SAST workflow.",
"scorecard_check": "SAST"
},
{
"reason": "Repository has 4 non-main remote branch(es). Policy: single main branch only.",
"type": "GS007",
"file": ".",
"action": "delete_remote_branches",
"rule_module": "git_state",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #16 was admin-merged while CI was still red (
201 passed, 3 failed, 1 errored). This PR fixes all 4 remaining failures.The 4 failures and their root causes
Failure 1 — Error (not counted as "failed"):
utilitarian_welfare([]) == 0.0utilitarian_welfare(utilities::AbstractVector{<:Real})does not accept[](which Julia types asVector{Any}), so dispatch fails withMethodErrorbefore the early-return guard fires.AbstractVector— the empty-vector guard (isempty(utilities) && return 0.0) then fires correctly.Failure 2 —
@test_throws ErrorException rawlsian_welfare([])rawlsian_welfare(::AbstractVector{<:Real})won't acceptVector{Any}, so aMethodErroris thrown instead of the intendedErrorExceptionfromerror(...).AbstractVector.Failure 3 —
@test_throws ArgumentError normalize_scores([])normalize_scores(scores::AbstractVector{<:Real})insrc/optimization.jlfails dispatch onVector{Any}, throwingMethodErrorinstead ofArgumentError.AbstractVector.Failure 4 —
length(frontier) == 1evaluates as2 == 1(Pareto regression)value_score(forWelfarewithout:max_welfare) addedreturn min(1.0, max(0.0, welfare_val)). This clamped both10.0and5.0to1.0, making the two solutions score identically — neither dominated the other — so both entered the frontier.:max_welfareis absent, returnwelfare_valdirectly (no clamping). This preserves meaningful differentiation (10.0 > 5.0) sodominated()correctly identifies the[5.0]solution as dominated. All existing tests that supply:max_welfarecontinue through the normalizedmin(1,max(0,val/max_welfare))path unchanged.Files changed
src/welfare.jl— relaxutilitarian_welfareandrawlsian_welfaretype signaturessrc/optimization.jl— relaxnormalize_scorestype signature; fix welfarevalue_scoreraw-return when:max_welfareabsentVerification
CI verification is pending — Julia is not available in the authoring environment. The fixes are traced by hand against each test's exact assertion from the CI log of run 27466058244 (job 81188474925).
https://claude.ai/code/session_01PWMMxryCcPrAjJ8tuGvygG
Generated by Claude Code