Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bob Debug Pipeline

AI-powered debugging and testing workflow built with IBM Bob 2.0.

The project demonstrates how an AI-assisted developer workflow can reduce the manual effort required to investigate a bug, understand its root cause, generate a regression test and fix, validate the result, and prepare the changes for a GitHub pull request.


Problem

Developers often spend significant time manually:

  • Investigating failing tests
  • Reading stack traces and unfamiliar code
  • Identifying the root cause
  • Writing regression tests
  • Implementing fixes
  • Running validation tests
  • Preparing changes for code review

This workflow can be repetitive and error-prone, especially when debugging small but recurring issues.


Solution

Bob Debug Pipeline demonstrates an AI-assisted debugging workflow using IBM Bob.

The MVP follows this pipeline:

Bug / Stack Trace
        ↓
Repository Analysis
        ↓
Root Cause Detection
        ↓
Regression Test
        ↓
Fix Generation
        ↓
Test Validation
        ↓
GitHub Pull Request

IBM Bob is used as a core part of the debugging and implementation workflow.


MVP

The MVP focuses on a small Node.js project containing a realistic Jest test failure.

Bug scenario

The application contains a getUserById() function:

function getUserById(id) {
  return users.find(user => user.id === id);
}

The test expects:

getUserById(999) → null

However, JavaScript's Array.find() returns:

undefined

when no matching element is found.

Therefore, the test fails with:

Expected: null
Received: undefined

Root cause

The implementation relies directly on Array.find() without normalizing the result.

Fix

IBM Bob identified the minimal fix:

return users.find(user => user.id === id) ?? null;

This preserves the existing behavior for valid users while returning null when the requested user does not exist.


IBM Bob Workflow

The debugging workflow was performed using IBM Bob 2.0.

1. Investigation

Bob was asked to:

  • Inspect the relevant files
  • Analyze the failing Jest test
  • Reproduce or understand the failure
  • Identify the root cause
  • Propose a minimal fix

No files were modified during the investigation phase.

2. Implementation

Bob was then instructed to:

  • Modify only test-project/src/userService.js
  • Implement the proposed minimal fix
  • Avoid unrelated changes
  • Run the focused Jest test
  • Report the final validation result

The resulting fix was:

return users.find(user => user.id === id) ?? null;

Validation

The current Jest test suite passes successfully:

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total

The tests cover:

Existing user
getUserById(1) → user

and:

Missing user
getUserById(999) → null

The backend TypeScript build also passes.

The frontend production build passes.


Application Workflow

The React frontend presents the debugging workflow as a single developer-oriented interface.

1. Bug / Stack Trace

Displays the failing Jest scenario:

Expected: null
Received: undefined

File:
tests/userService.test.js

Test:
getUserById(999)

2. Root Cause Analysis

Displays the root cause identified during the Bob debugging workflow.

3. Regression Test

Displays the regression scenario that validates the expected behavior.

4. Fix Generated by Bob

Displays the minimal code change:

- return users.find(user => user.id === id);
+ return users.find(user => user.id === id) ?? null;

5. Test Validation

Displays the successful Jest validation:

2 tests passed

6. GitHub Pull Request

The workflow includes a GitHub PR step in the demo interface.

The current MVP demonstrates the PR workflow in the UI. The actual repository pull request was created separately through GitHub during development.


Architecture

                 ┌─────────────────────┐
                 │    React Frontend   │
                 │                     │
                 │ Bug / Stack Trace   │
                 │ Root Cause         │
                 │ Regression Test    │
                 │ Fix Preview        │
                 │ Validation         │
                 │ GitHub PR Workflow │
                 └──────────┬──────────┘
                            │
                            │ HTTP
                            ▼
                 ┌─────────────────────┐
                 │  Express Backend    │
                 │                     │
                 │ POST /api/analyze   │
                 └──────────┬──────────┘
                            │
                            ▼
                 ┌─────────────────────┐
                 │   Test Project      │
                 │                     │
                 │ userService.js      │
                 │ userService.test.js │
                 └─────────────────────┘

                         IBM Bob 2.0
                              │
                              ▼
                  Investigation & Fix

Project Structure

bob-debug-pipeline/
│
├── backend/
│   ├── src/
│   │   └── server.ts
│   ├── package.json
│   └── tsconfig.json
│
├── frontend/
│   ├── src/
│   │   ├── App.tsx
│   │   └── ...
│   ├── package.json
│   └── vite.config.ts
│
├── test-project/
│   ├── src/
│   │   └── userService.js
│   ├── tests/
│   │   └── userService.test.js
│   └── package.json
│
├── bob_sessions/
│   └── Bob Task Session Summary screenshots
│
├── .gitignore
├── package-lock.json
└── README.md

Technology Stack

AI Development

  • IBM Bob 2.0

Backend

  • Node.js
  • TypeScript
  • Express
  • CORS

Frontend

  • React
  • TypeScript
  • Vite

Testing

  • Jest

Version Control

  • Git
  • GitHub

Running the Project

Backend

Navigate to the backend directory:

cd backend

Install dependencies:

npm install

Run the development server:

npm run dev

The backend runs on:

http://localhost:3000

Frontend

Open another terminal:

cd frontend

Install dependencies:

npm install

Run the development server:

npm run dev

Open the URL displayed by Vite in the terminal.


Run Tests

Navigate to the test project:

cd test-project

Install dependencies:

npm install

Run Jest:

npm test

Expected result:

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total

API

The backend exposes the analysis endpoint:

POST /api/analyze

The endpoint represents the analysis stage of the debugging pipeline and returns the structured information used by the frontend:

  • Bug information
  • Root cause
  • Regression test
  • Proposed fix
  • Validation result

Bob Session Evidence

The hackathon requires relevant IBM Bob task session evidence to be included in the repository.

The screenshots will be stored in:

bob_sessions/

Expected evidence includes the Task Session Summary for the relevant Bob investigation and implementation tasks.


Team

  • Mohamed Benkhaled (@MBen213) — Backend, debugging pipeline, Bob workflow and integration
  • Wessfago — Frontend MVP and GitHub workflow UI
  • Eséchiel — Testing and debugging validation

Hackathon

Built for the:

IBM Bob 2.0 Hackathon — 2026

The project focuses on improving the developer debugging, testing, validation, and code workflow using IBM Bob as a core development tool.


Current Status

IBM Bob investigation       ✓
Root cause analysis         ✓
Minimal fix                 ✓
Jest validation             ✓
Backend API                 ✓
React frontend              ✓
Frontend/backend connection ✓
GitHub Pull Request         ✓
Bob session evidence        In progress
Final testing               In progress

License

This project was created as a hackathon prototype.

About

AI-powered debugging and testing pipeline built with IBM Bob 2.0. Analyzes bugs, identifies root causes, generates regression tests and fixes, validates results, and streamlines GitHub pull requests.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages