Use Linear and GitHub to Ship AI Fixes¶
| Category | AI Solutions Engineering |
| Status | ๐ก Partially completed |
| Repo | nextwork-use-linear-and-github-to-ship-ai-fixes |
| Original NextWork guide | nextwork.ai |
Learning project
Practice work following a NextWork guide, separate from my production projects.
๐ NextWork learning project. This is a practice project I built while working through NextWork's Use Linear and GitHub to Ship AI Fixes guide. It is part of my Learning portfolio and is fully separate from my production projects.
Category: Learning โบ AI Solutions Engineering
Status: ๐ก Partially completed
Overview¶
A model's fix is only a suggestion until the tests agree. My pipeline lets the tests decide, pushes only passing fixes to a review branch, never merges anything, and sends anything it can't fix back to a person with the attempts attached.
Summary¶
I built my own issue-to-fix pipeline in Python. For each issue it runs the issue's failing test, asks a local model (qwen2.5:3b) for a corrected version of only the named function, and splices the fix in through Python's ast module, dropping anything else the model adds. The tests are the gate: up to three attempts, each one shown the previous failure. A passing fix is committed to a fix/
The checks behind this are in docs/verification.txt.
Skills & tools¶
Python, git, pytest, ast, Ollama, Code review workflow
What I built¶
shipfix.py:func_sourceandapply(ast-based splice of just the target function),propose(local model, with retry feedback),ship(test gate, branch, commit, push, review note, issue status) andsetup(a fresh app repo with a local bare remote).sample_app/: a small module with two real bugs and their tests.issues.jsonholds the two issues.docs/run.jsonanddocs/review-APP-2.md: the real run, with attempts, rejected patches, issue statuses and remote branches.tests/test_shipfix.py: splice safety (wrong or extra functions, syntax errors) and the full pipeline with a stub model (one pushed, one handed back, main untouched).
How to run¶
ollama pull qwen2.5:3b
FIX_ATTEMPTS=3 python shipfix.py /tmp/shipfix-work
python -m pytest -q tests
Verification¶
I ran the verification command on 2026-12-03. The full output is in docs/verification.txt.
PATH=/workspace/nextwork-portfolio/.venv/bin:$PATH python -m pytest -q -p no:cacheprovider tests 2>&1 | tail -1 | grep -q '2 passed' && grep -q 'In Review' docs/run.json && echo SHIPFIX OK
Notes¶
The 3B model never fixed slugify: all three attempts stripped some punctuation by hand and never collapsed the separators. In an earlier run under heavy load it also missed the easy word_count fix, so results vary from run to run. That's why the tests, not the model, decide what gets pushed.
What isn't done, and why¶
No Linear workspace or GitHub pull requests: the issue statuses live in a dict and the 'remote' is a local bare git repo, so no PR is opened. The fixer is a local qwen2.5:3b model, not Claude or Claude Code.
Original project: https://nextwork.ai/projects/526c4380-2b6d-4a0e-ae72-0aa18af3388c ยท Part of my NextWork Learning portfolio (hub).
Verification output¶
From docs/verification.txt:
$ PATH=/workspace/nextwork-portfolio/.venv/bin:$PATH python -m pytest -q -p no:cacheprovider tests 2>&1 | tail -1 | grep -q '2 passed' && grep -q 'In Review' docs/run.json && echo SHIPFIX OK
SHIPFIX OK
[exit code 0]