Skip to content

feature: add COBOL-to-Python migration plan (MBA-1423) - #261

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1786399518-python-migration-plan
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1786399518-python-migration-plan

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 10, 2026

Copy link
Copy Markdown

Summary

Documentation-only. Adds documentation/technical/python-migration-plan.md and makes Python a first-class translation target in the README, closing MBA-1423.

The plan is built from a measured inventory of the tree rather than generic advice — 38 programs / 20 copybooks, with 8 programs issuing EXEC CICS, 14 issuing EXEC SQL, 16 declaring KSDS files, and 4 copybooks carrying COMP-3 fields. Those counts drive a 4-tier scope split (no-dependency / KSDS / DB2 / CICS) and a 6-wave sequence where each wave has an explicit exit criterion.

Two decisions worth flagging for review:

  • Fixed-point is treated as the primary correctness risk, not CICS/VSAM. PIC S9(13)V9(2) COMP-3 has no Python analogue, so the plan mandates Decimal with an explicit quantize() on every store, and puts the pilot on numeric validation before any volume translation.
  • Translations are paragraph-preserving, not idiomatic. 1000-VALIDATE-ID becomes _1000_validate_id so a reviewer can diff Python against COBOL paragraph-by-paragraph. Readability is deliberately traded for traceability, since this is benchmark reference material.

Wave 0 (the "first migration step" acceptance criterion) is specified down to the file list: the Picture/record-codec runtime, PORTVAL.cpy + PORTVALD translated, and a differential pytest that runs both the GnuCOBOL-compiled module and the Python function over one input corpus and asserts equal LS-RETURN-CODE / LS-ERROR-MSG. PORTVALD was chosen because an executable oracle exists today — verified locally:

cobc -m -I src/copybook/common -o build/PORTVALD.so src/programs/portfolio/PORTVALD.cbl   # compiles clean

No COBOL source is touched; the plan explicitly prohibits editing it to ease translation, which would invalidate the benchmark.

Related: PR #94 added a ticket stub for this work and also edits the README Future Plans line, so the two will conflict on that line if both land.

Link to Devin session: https://app.devin.ai/sessions/273b91ab7f46499c8b1e5b652145b733


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Open in Devin Review (Staging)

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants