Description
role.json defines min_final_score and max_final_score (intern role: -20 / 120), and load_role parses them into Role:
https://github.com/interviewstreet/hiring-agent/blob/70fd3ea/roles.py#L221-L232
But nothing reads them. print_evaluation_results instead caps at max_score + role.bonus_max and applies no lower bound at all:
https://github.com/interviewstreet/hiring-agent/blob/70fd3ea/score.py#L82-L90
if hasattr(evaluation, "deductions") and evaluation.deductions:
total_score -= evaluation.deductions.total # no floor
max_possible_score = max_score + role.bonus_max # not role.max_final_score
Deductions.total has no upper bound, so a large deduction produces totals below the role's configured floor, and a role author who sets max_final_score to something other than sum(categories) + bonus_max sees no effect. --init-role also scaffolds these fields, suggesting they're meant to be honored.
(#273 notes that the old MAX_FINAL_SCORE constant in evaluator.py was unused; this is the same gap carried over into the new role system.)
Expected
Final score clamped to [role.min_final_score, role.max_final_score] in the printout (and CSV), or the fields removed from the role schema if they're not intended to be used.
Description
role.jsondefinesmin_final_scoreandmax_final_score(intern role:-20/120), andload_roleparses them intoRole:https://github.com/interviewstreet/hiring-agent/blob/70fd3ea/roles.py#L221-L232
But nothing reads them.
print_evaluation_resultsinstead caps atmax_score + role.bonus_maxand applies no lower bound at all:https://github.com/interviewstreet/hiring-agent/blob/70fd3ea/score.py#L82-L90
Deductions.totalhas no upper bound, so a large deduction produces totals below the role's configured floor, and a role author who setsmax_final_scoreto something other thansum(categories) + bonus_maxsees no effect.--init-rolealso scaffolds these fields, suggesting they're meant to be honored.(#273 notes that the old
MAX_FINAL_SCOREconstant inevaluator.pywas unused; this is the same gap carried over into the new role system.)Expected
Final score clamped to
[role.min_final_score, role.max_final_score]in the printout (and CSV), or the fields removed from the role schema if they're not intended to be used.