Skip to content

feat: implement M2 — CI failure parsing and AI review generation#9

Merged
shenxianpeng merged 3 commits into
mainfrom
feature/m2-ci-review
May 25, 2026
Merged

feat: implement M2 — CI failure parsing and AI review generation#9
shenxianpeng merged 3 commits into
mainfrom
feature/m2-ci-review

Conversation

@shenxianpeng
Copy link
Copy Markdown
Contributor

Summary

Implement M2 (Q4 2026): CI Failure & AI Review — demonstrating the AI-native value proposition.

Changes

Module 04 — AI Change Review (Draft → Candidate)

  • ods review generate: Full L1/L2/L3 record generation
    • --level L1|L2|L3 flag with auto-detection from AI percentage
    • Correct checklist per level (L1: correctness/quality, L2: +security/ai_specific, L3: +architecture/documentation/compliance)
    • L3 includes second_reviewer requirement
  • ods review validate: Validates against ODS AI Change Review schema
  • ods review ai-percentage: Estimates AI contribution from commit log footers via stdin

Module 05 — CI Failure (Draft → Candidate)

  • ods ci parse: Full CI log parser with AI hallucination detection
    • Detects 6 hallucination categories: non-existent symbols, wrong imports, deprecated APIs, fake URLs, incorrect defaults, hallucinated function calls
    • Produces structured JSON reports with confidence levels
    • Suggests closest valid symbols via Levenshtein distance
  • ods ci explain: Human-readable failure analysis highlighting AI-related issues
  • ods ci fix-suggestions: Prioritized fix list with auto-fix availability

New: internal/ciparser package

  • Complete CI log parsing with stage detection, failure classification, duration tracking
  • AI hallucination detection engine with regex patterns for each category
  • Fix suggestion generation with deduplication

Testing

# Review generation
go run ./cmd/ods review generate --pr 42 --level L2 --ai-pct 45
go run ./cmd/ods review generate --pr 99 --level L3 --ai-pct 92

# CI parsing with hallucination detection
echo 'FAIL TestBuildQuery — hallucinated function call: buildQuery() does not exist
FAIL compile error: undefined symbol refreshTokenV2 in auth/token.go' |   go run ./cmd/ods ci parse --stdin --pipeline build-42 --repo org/svc

Type

  • Feature

Module 04 (AI Change Review) — promoted to Candidate:
- review generate: L1/L2/L3 record generation with correct checklist per level
- review validate: validates records against ODS AI Change Review schema
- review ai-percentage: estimates AI contribution from commit log footers
- L3 records include second_reviewer requirement

Module 05 (CI Failure) — promoted to Candidate:
- ci parse: parses CI failure logs with AI hallucination detection
  - Detects: non-existent symbols, wrong imports, deprecated APIs,
    fake URLs, incorrect defaults, hallucinated function calls
  - Produces structured JSON report with fix suggestions
- ci explain: human-readable failure analysis with AI highlights
- ci fix-suggestions: prioritized fix list with auto-fix detection
- New internal/ciparser package for CI log parsing

CLI README updated to reflect M2 Candidate status
@shenxianpeng shenxianpeng added the enhancement New feature or request label May 25, 2026
@shenxianpeng shenxianpeng merged commit 2db92b0 into main May 25, 2026
4 checks passed
@shenxianpeng shenxianpeng deleted the feature/m2-ci-review branch May 25, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant