Public proof

SQLAlchemy migration proof on public files

Public SQLAlchemy migration proof for the supported cleanup subset, including supported static rewrites and fail-closed manual-review examples.

3 supported public-file passes

Copied public inputs landed inside the documented SQLAlchemy automation subset.

2 blocked manual-review cases

Risky execution and query-shape patterns were reported instead of guessed through.

0 broad migration promises

The proof covers the narrow legacy query and syntax subset, not every SQLAlchemy 2.0 change.

Trust boundary

Scope and validation

  • Run on a branch and review the documented scope before applying changes.
  • The public repo is scanner-first and does not expose the full paid apply engine.
  • Examples establish only the cases shown. Run your own application tests before merging.

Supported examples

Public files that matched the automation subset

Bogdanp/flask_dramatiq_example

Query.get plus declarative import cleanup

supported static rewrite on copied public input; application validation not established

dunossauro/live-de-python

select([table]) list syntax cleanup

supported static rewrite on copied public input; application validation not established

nylas/sync-engine

Query.get plus string loader cleanup

supported static rewrite on copied public input; application validation not established

Fail-closed examples

Public files that stayed in manual review

Artifact trail

One public-proof run, shown end to end

Sample repo before

from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()
job = session.query(Job).get(job_id)
stmt = select([Job.id, Job.name])

Scan JSON

{
  "status": "preview_only",
  "transform_count": 3,
  "supported_candidates": {
    "declarative_imports": 1,
    "query_get": 1,
    "select_list_syntax": 1
  },
  "manual_todos": []
}

Preview diff

-from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy.orm import declarative_base
-job = session.query(Job).get(job_id)
+job = session.get(Job, job_id)
-stmt = select([Job.id, Job.name])
+stmt = select(Job.id, Job.name)

Validation result

validation:
  python -m compileall copied_public_input ... passed
  scanner report generated ... passed
  unsupported findings ... 0

Apply output

apply output:
  files changed: 1
  transforms applied: 3
  report written: migration-report.json
  mode: preview/apply branch workflow

Final manager summary

manager summary:
  supported cleanup findings: 3
  manual-review findings: 0
  next step: run the same workflow on a branch, then validate with repo tests
  boundary: no broad SQLAlchemy migration guarantee

Final report shape

final report:
  files scanned: 1
  files changed: 1
  transforms applied: declarative_imports, query_get, select_list_syntax
  confidence: supported subset, validation required before merge

This is the visible evidence shape buyers should expect: before input, scanner JSON, preview diff, apply output, validation status, and final manager summary. The paid pack still has to be run on a branch and validated in the buyer's repo.

What this proves

  • Direct Query.get, select list, declarative import, and simple loader cleanup can be classified on real public input.
  • Unsafe execution and query-shape patterns stay visible as manual-review findings.
  • The free scanner is the qualification step before any paid cleanup workflow.