Skip to content

fix(trust): ignore self-reports in ScoreAverageTrust#201

Open
owenamurray04 wants to merge 1 commit into
projnanda:mainfrom
owenamurray04:hackathon/owen-murray-self-report-guard
Open

fix(trust): ignore self-reports in ScoreAverageTrust#201
owenamurray04 wants to merge 1 commit into
projnanda:mainfrom
owenamurray04:hackathon/owen-murray-self-report-guard

Conversation

@owenamurray04

Copy link
Copy Markdown

Problem

ScoreAverageTrust.report() never checks evidence.reporter, so an agent can
file positive evidence about itself to inflate its own score, or dilute genuine
negative reports back toward neutral.

Change

  • report() ignores evidence where evidence.reporter == agent. All other
    reports behave as before. Matches bonded_trust, which already skips
    self-reports when scoring.
  • Documented in the method docstring.

Tests

  • test_self_report_is_ignored: ten positive self-reports leave the agent at
    the never-rated default. Fails on main (score=1.0, sample_count=10).
  • test_self_report_does_not_dilute_others: a self-boost cannot offset a
    genuine negative report. Fails on main (score=0.5, sample_count=2).

Verification

make ci-local passes all five gates (pytest: 1276 passed, 1 skipped).

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