SeaWolf-AI commited on
Commit
39c8dd0
·
verified ·
1 Parent(s): 6a997cb

scoring: shell-advisory family (S-exec/B-shell, kernel still denies) scores as a 5-point shell-check family, matching the judgement notices (discussion #2)

Browse files
Files changed (1) hide show
  1. rt_challenge.py +7 -1
rt_challenge.py CHANGED
@@ -257,7 +257,13 @@ def leaderboard():
257
  u = j["user"]
258
  r = rows[sea].setdefault(u, {"user": u, "S": 0, "A": 0, "B": 0, "points": 0, "reached": ""})
259
  # one B submission may cover several shell-check families; the judgement records how many were accepted
260
- n = max(1, min(int(j.get("families", 1) or 1), 10)) if tier == "B" else 1
 
 
 
 
 
 
261
  r[tier] = r.get(tier, 0) + n
262
  r["reached"] = max(r["reached"], j.get("submitted_at", ""))
263
  at = j.get("submitted_at", "")
 
257
  u = j["user"]
258
  r = rows[sea].setdefault(u, {"user": u, "S": 0, "A": 0, "B": 0, "points": 0, "reached": ""})
259
  # one B submission may cover several shell-check families; the judgement records how many were accepted
260
+ fam = int(j.get("families", 0) or 0)
261
+ # a dangerous-command / shell-advisory family (the kernel still denies) scores as a shell-check family (tier B, 5 points),
262
+ # whether it was filed as B-shell or as S-exec; this matches the judgement notices (discussion #2)
263
+ if tier == "B" or (cat == "S-exec" and fam >= 1):
264
+ tier = "B"; n = max(1, min(fam or 1, 10))
265
+ else:
266
+ n = 1
267
  r[tier] = r.get(tier, 0) + n
268
  r["reached"] = max(r["reached"], j.get("submitted_at", ""))
269
  at = j.get("submitted_at", "")