Skip to content

Revise README for PipelineMedic project#19

Open
Aqib053 wants to merge 23 commits intohacktofuture-sjec:mainfrom
Aqib053:main
Open

Revise README for PipelineMedic project#19
Aqib053 wants to merge 23 commits intohacktofuture-sjec:mainfrom
Aqib053:main

Conversation

@Aqib053
Copy link
Copy Markdown

@Aqib053 Aqib053 commented Apr 15, 2026

Updated the README to reflect the new project name and details about PipelineMedic, including problem statement, proposed solution, features, and tech stack.

Aqib053 and others added 23 commits April 15, 2026 19:36
Updated the README to reflect the new project name and details about PipelineMedic, including problem statement, proposed solution, features, and tech stack.
…ate, demo CI pipefail, health flags

Made-with: Cursor
Replace the fire-and-forget notify pipeline with a stateful,
human-in-the-loop flow driven by Telegram inline keyboards.

- /webhook now analyzes the log, stores an incident (token), and
  sends a Telegram message with 'Auto fix' / 'Manual fix' buttons
  instead of auto-creating a PR.
- New /telegram/webhook endpoint handles callback_query updates:
  * manual  -> mark incident manual, strip buttons
  * autofix -> create branch + PR, swap buttons to Merge / Rollback
  * merge   -> PUT /pulls/:n/merge, edit message with merge commit sha
  * roll    -> close PR + delete AI branch (pre-merge rollback)
- Incident state persisted to /tmp (+ in-memory) with 200-entry cap.
- New merge_pull_request / rollback_pull_request GitHub helpers.
- New /incidents/{token} endpoint for state inspection.
- Bump version to 1.1.0 for deployment verification.

Made-with: Cursor
…afe state

- analyze_log prompt now targets SOURCE files (not test files) and is
  willing to mark one-line logic bugs as fixable (e.g. wrong operator).
- New generate_fix_content() asks Groq for the full patched file given
  the current file content + analysis. Langfuse-traced with usage.
- maybe_create_autofix_pr now fetches the current file from base, runs
  the synthesizer, validates the patch (_looks_like_safe_patch), and
  commits the real patched content. Falls back to rule-based append
  only for requirements.txt dep additions.
- Incident carries expires_at and ttl_minutes. Initial Telegram message
  shows a visible decision window. autofix/manual callbacks enforce it.
- Message-embedded pm-state: base64 state snapshot appended to every
  Telegram message so callbacks keep working across Vercel cold starts
  without Redis/KV. Re-attached on every edit through PR -> merge/rollback.
- Bump version to 1.2.1.

Made-with: Cursor
…pty; surface rejection reason in failure message
…s before asking you to merge

Every autofix PR now carries a live pytest verdict from a fresh Firecracker
microVM. Before the PR is ever created, PipelineMedic:

  1. generates the fix (Groq hacktofuture-sjec#2) and the regression test (Groq hacktofuture-sjec#3) in memory
  2. spins up a Vercel Sandbox via the official vercel==0.5.7 Python SDK
  3. writes the patched source + test + minimal requirements into the VM
  4. pip installs and runs pytest, captures stdout/exit_code/sandbox_id
  5. if the test fails, re-prompts Groq with the real pytest output and
     re-verifies — a "self-correction" loop that is surfaced as 🔁 in Telegram
  6. tears the sandbox down and moves on to branch/commit/PR

The verification is traced as a fourth Langfuse span (vercel_sandbox_verify)
alongside the three Groq generations, includes a collapsible pytest-tail
section in the PR body, and a one-line verdict badge in Telegram message 2.

Graceful degradation: no VERCEL_* / VERCEL_OIDC_TOKEN → verdict "skipped",
no exception, PR still opens. Verification is a signal, not a gate.

Bumps version 1.3.0 → 1.4.0.

Made-with: Cursor
First live run exposed the gap: the sandbox pip-installed a hardcoded
minimal list (fastapi httpx pytest pydantic) and failed with
ModuleNotFoundError: No module named 'requests' because the demo repo's
app.py imports requests at module level.

Now maybe_create_autofix_pr fetches requirements.txt from the base branch
and passes it through to verify_patch_in_vercel_sandbox. The sandbox
installs the target repo's actual pinned deps PLUS pytest/httpx as a
harness — preserving any version pins the repo cares about. Falls back
to a sane default when the repo has no requirements.txt.

This makes the sandbox a true CI mirror instead of a guess, which was
the whole premise of self-verification.

Made-with: Cursor
Restructures the README into the required sections: Problem Statement,
Proposed Solution, Features, Tech Stack, and Project Setup Instructions,
with clear clone/install/run steps and repository structure.

Made-with: Cursor
GitHub does not call /webhook on commits; add POST /github/webhook for
repository Webhooks (push event). Validates X-Hub-Signature-256 when
GITHUB_WEBHOOK_SECRET is set. Skips tag pushes and noisy branch prefixes
(pipelinemedic/autofix-, dependabot/) by default. Health reports whether
the webhook secret is configured. Version 1.4.1.

Made-with: Cursor
Improve GitHub push notifications with a merge-specific header, number
of unique authors, and total files changed across commits so the alert is
more informative for reviewers at a glance.

Made-with: Cursor
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.

1 participant