Skip to content

Persist verify outcomes to SQLite #3

@ionfwsrijan

Description

@ionfwsrijan

Description

The verify step's pass/fail result is a free training label — it tells us whether a proposed fix actually worked. This is the most valuable signal in the entire ML pipeline. This issue persists it.

What to implement

Add to backend/app/db.py:

CREATE TABLE IF NOT EXISTS verify_outcomes (
    id                      TEXT PRIMARY KEY,
    job_id                  TEXT NOT NULL,
    passed                  INTEGER NOT NULL,  -- 1 = passed, 0 = failed
    new_issues_introduced   INTEGER DEFAULT 0,
    verified_at             TEXT DEFAULT (datetime('now'))
);

After /verify completes, write a row to verify_outcomes with:

  • job_id from the request
  • passed: 1 if no new critical/high findings were introduced, 0 otherwise
  • new_issues_introduced: count of net-new findings vs pre-fix baseline

Acceptance criteria

  • verify_outcomes table is created on startup
  • Every /verify call writes an outcome row
  • passed is always 0 or 1, never NULL

Metadata

Metadata

Assignees

Labels

SSoC26backendBackend issueseasyEasy difficultymlML related issuestier-1TIER 1 Upgrade issues

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions