Skip to content

fix: resolve remaining Axiology test failures (Pareto regression + value/fairness bugs)#17

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/gallant-faraday-LSAGJ
Jun 13, 2026
Merged

fix: resolve remaining Axiology test failures (Pareto regression + value/fairness bugs)#17
hyperpolymath merged 1 commit into
mainfrom
claude/gallant-faraday-LSAGJ

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

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.0

  • Root cause: utilitarian_welfare(utilities::AbstractVector{<:Real}) does not accept [] (which Julia types as Vector{Any}), so dispatch fails with MethodError before the early-return guard fires.
  • Fix: Relax signature to AbstractVector — the empty-vector guard (isempty(utilities) && return 0.0) then fires correctly.

Failure 2 — @test_throws ErrorException rawlsian_welfare([])

  • Root cause: Same type-dispatch mismatch — rawlsian_welfare(::AbstractVector{<:Real}) won't accept Vector{Any}, so a MethodError is thrown instead of the intended ErrorException from error(...).
  • Fix: Same signature relaxation to AbstractVector.

Failure 3 — @test_throws ArgumentError normalize_scores([])

  • Root cause: normalize_scores(scores::AbstractVector{<:Real}) in src/optimization.jl fails dispatch on Vector{Any}, throwing MethodError instead of ArgumentError.
  • Fix: Relax signature to AbstractVector.

Failure 4 — length(frontier) == 1 evaluates as 2 == 1 (Pareto regression)

  • Root cause: A prior fix in value_score (for Welfare without :max_welfare) added return min(1.0, max(0.0, welfare_val)). This clamped both 10.0 and 5.0 to 1.0, making the two solutions score identically — neither dominated the other — so both entered the frontier.
  • Fix: When :max_welfare is absent, return welfare_val directly (no clamping). This preserves meaningful differentiation (10.0 > 5.0) so dominated() correctly identifies the [5.0] solution as dominated. All existing tests that supply :max_welfare continue through the normalized min(1,max(0,val/max_welfare)) path unchanged.

Files changed

  • src/welfare.jl — relax utilitarian_welfare and rawlsian_welfare type signatures
  • src/optimization.jl — relax normalize_scores type signature; fix welfare value_score raw-return when :max_welfare absent

Verification

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

…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
hyperpolymath marked this pull request as ready for review June 13, 2026 13:17
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 21 issues detected

Severity Count
🔴 Critical 0
🟠 High 19
🟡 Medium 2
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

@hyperpolymath
hyperpolymath merged commit 9ef3c4e into main Jun 13, 2026
15 checks passed
@hyperpolymath
hyperpolymath deleted the claude/gallant-faraday-LSAGJ branch June 13, 2026 13:17
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.

1 participant