Job submission resolves the club via Club.selectBySlug and never consults managed_club (JobRoutes.scala:428-435; recruitment at :143-144). No route outside ManagedClubRoutes references managed status.
Consequence: any club row CCAS has ever ingested — including thousands of opponent and scouted clubs — is a submittable job target, and an unmanaged club runs exactly like a managed one.
This was previously framed as future abuse control (central-DB storage cost). The stale-current_club case in #174 makes it a correctness issue today: after ccas club remove <slug>, the bare/current_club path still runs jobs against the removed club while --all correctly excludes it. Same club, two sibling targeting modes, opposite results.
Proposal: in JobRoutes.submitClubJob, after Club.selectBySlug succeeds, check ManagedClub.selectByClubId and return Club <slug> is not managed; add it with 'ccas club add <slug>' when absent. Apply to the recruitment handler too.
Collapses the --all vs current_club divergence to one enforcement point with no extra round-trip.
Biggest behavioural change of the club-CLI batch — filed separately from #174 so the CLI-side auto-clear can land first. Needs a decision on whether scouting an unmanaged club should stay possible.
Job submission resolves the club via
Club.selectBySlugand never consultsmanaged_club(JobRoutes.scala:428-435; recruitment at:143-144). No route outsideManagedClubRoutesreferences managed status.Consequence: any club row CCAS has ever ingested — including thousands of opponent and scouted clubs — is a submittable job target, and an unmanaged club runs exactly like a managed one.
This was previously framed as future abuse control (central-DB storage cost). The stale-
current_clubcase in #174 makes it a correctness issue today: afterccas club remove <slug>, the bare/current_clubpath still runs jobs against the removed club while--allcorrectly excludes it. Same club, two sibling targeting modes, opposite results.Proposal: in
JobRoutes.submitClubJob, afterClub.selectBySlugsucceeds, checkManagedClub.selectByClubIdand returnClub <slug> is not managed; add it with 'ccas club add <slug>'when absent. Apply to the recruitment handler too.Collapses the
--allvscurrent_clubdivergence to one enforcement point with no extra round-trip.Biggest behavioural change of the club-CLI batch — filed separately from #174 so the CLI-side auto-clear can land first. Needs a decision on whether scouting an unmanaged club should stay possible.