mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 12:39:28 +00:00
feat(propose-adjudicate-prove): overlay adjudicates inventory before prove
Regex inventory stays the proposer. MAP attaches promote/demote/unadjudicated/coverage from intra-file taint (tree-sitter when a grammar parses, Python ast as last resort). Deep sandboxes promotions only, ordered by the existing heuristic ranker plus optional OpenRouter mechanism recall. The SAST pair slice scores overlay outcomes; the stage-1 detection gate and local pair gate stay inventory-only.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Provenance: SVEN train CWE-89 function pair from
|
||||
# https://github.com/russ-lewis/ttt_-_python_cgi/commit/6096f43fd4b2d91211eec4614b7960c0816900da
|
||||
# file cgi/common.py function build_board
|
||||
|
||||
|
||||
def build_board(conn, game, size):
|
||||
board = []
|
||||
for i in range(size):
|
||||
board.append([""] * size)
|
||||
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("SELECT x,y,letter FROM moves WHERE gameID = %d;", (game,))
|
||||
|
||||
counts = {"X": 0, "O": 0}
|
||||
for move in cursor.fetchall():
|
||||
(x, y, letter) = move
|
||||
x = int(x)
|
||||
y = int(y)
|
||||
board[x][y] = letter
|
||||
counts[letter] += 1
|
||||
cursor.close()
|
||||
return (board, counts)
|
||||
Reference in New Issue
Block a user