Commit graph

409 commits

Author SHA1 Message Date
aseembits93
76a81b4381 chore: switch CI Claude model to Sonnet 4.6
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 06:47:20 +05:30
aseembits93
26e4936659 keep the non foundry env vars 2026-03-03 06:03:06 +05:30
Aseem Saxena
9e5e61e53d
Apply suggestion 2026-03-02 16:27:35 -08:00
Aseem Saxena
cc76543732
Merge branch 'main' into cf-aws-bedrock-claude-workflows 2026-03-03 05:56:37 +05:30
Kevin Turcios
40ff909b03 fix: add DATABASE_URL and DJANGO_SETTINGS_MODULE to pr-review workflow
Coverage analysis in the Claude pr-review job needs these env vars
to run pytest, matching how django-unit-tests and codeflash-aiservice
workflows configure them.
2026-02-23 03:43:33 -05:00
Aseem Saxena
e336a91c93
update model id 2026-02-17 07:08:27 -08:00
aseembits93
730c01d047 feat: switch Claude workflows from Foundry to AWS Bedrock
Replace Anthropic Foundry authentication with AWS Bedrock OIDC
in both claude.yml and duplicate-code-detector.yml workflows.

Changes:
- Replace use_foundry with use_bedrock
- Add aws-actions/configure-aws-credentials@v4 OIDC step
- Remove ANTHROPIC_FOUNDRY_API_KEY/BASE_URL env vars
- Update model identifiers to Bedrock format

Requires AWS_ROLE_TO_ASSUME secret to be configured in the repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:01:51 +05:30
Sarthak Agarwal
e22e5d1f8b
Add codeflash optimization workflow for cf-api and cf-webapp (#2411)
Co-authored-by: Kevin Turcios <106575910+KRRT7@users.noreply.github.com>
2026-02-16 19:48:15 +05:30
Kevin Turcios
a97a3cb4e5 fix: allow bots in duplicate code detector workflow 2026-02-14 19:02:16 -05:00
Kevin Turcios
ee855abd76 fix: use correct secret names for Foundry auth 2026-02-14 18:52:12 -05:00
Kevin Turcios
7c76052c65
chore: replace gh-aw duplicate detector with claude-code-action + Serena (#2420)
## Summary
- Replace gh-aw workflow (incompatible with Azure Foundry) with
claude-code-action + use_foundry
- Add Serena MCP server for semantic duplicate code analysis
- Runs on PR open/sync and manual dispatch
- Targets Python and TypeScript/JavaScript files
2026-02-14 18:50:05 -05:00
Kevin Turcios
ac9f7ad2b5
fix: configure duplicate code detector for Azure Foundry (#2419)
## Summary
- Add Foundry env vars (ANTHROPIC_FOUNDRY_API_KEY,
ANTHROPIC_FOUNDRY_BASE_URL) so the workflow authenticates via Azure
Foundry
- Fix Serena language config (javascript -> typescript)
2026-02-14 18:29:04 -05:00
Kevin Turcios
9c5ad8fe06
chore: add gh-aw duplicate code detector workflow (#2418)
## Summary
- Adds the GitHub Agentic Workflows duplicate code detector, configured
for Python and TypeScript/JavaScript with Serena semantic analysis
- Runs daily, flags patterns spanning 10+ lines or appearing in 3+
locations
- Creates up to 3 issues per run with `[duplicate-code]` prefix

## Notes
- Requires Claude API secret configured in repo Actions secrets
- `code-quality` and `automated-analysis` labels will be auto-created on
first run
2026-02-14 18:14:55 -05:00
Kevin Turcios
4c3deeb7b8
Restructure CLAUDE.md files and add path-scoped rules for monorepo (#2417)
## Summary

- Restructure CLAUDE.md hierarchy so Claude Code auto-discovers
project-specific instructions
- Delete dead `AGENTS.md` files (referenced non-existent
`.tessl/RULES.md`)
- Rename `django/aiservice/AGENTS.md` → `CLAUDE.md` for auto-discovery
- Create `js/CLAUDE.md` with package commands and gotchas
- Move PR review guidelines to `.claude/rules/pr-review.md` (auto-loaded
rule)
- Move prek workflow to `.claude/skills/fix-prek.md` (on-demand skill)
- Add path-scoped rules for Python and Next.js patterns
- Add domain glossary, service architecture diagram, and per-package
gotchas

## Test plan

- Verify `CLAUDE.md` files exist at root, `django/aiservice/`, and `js/`
- Verify no remaining references to `AGENTS.md` or `.tessl/`
- Verify `.claude/rules/` and `.claude/skills/` files are committed
2026-02-14 17:13:09 -05:00
Kevin Turcios
8baf828634
chore: sync claude workflow with CLI repo (#2392)
## Summary
- Use claude-opus-4-6 model for both pr-review and claude-mention jobs
- Add mypy checks and consolidated summary comment (Steps 1 & 4) from
CLI workflow
- Add Edit tool and extra git/gh tools to allowed tools
2026-02-12 00:33:51 -05:00
Kevin Turcios
e7cf9bf29e
feat: sync Claude workflow with CLI (#2368)
## Summary
- Add prek auto-fix step (format/lint changed files, commit & push)
- Add coverage analysis step (compare PR vs main, enforce 75% for new
code)
- Add uv setup and dependency install to pr-review job
- Change pr-review permissions to allow pushing fixes

Syncs with recent improvements made to the CLI repo.
2026-02-03 23:18:47 -05:00
Kevin Turcios
911f3e6c7b Remove wait-for-prek dependencies from CI workflows
Prek checks should not block other workflows from running. This removes
the wait-for-prek jobs entirely so unit tests, e2e tests, and codeflash
optimization can run independently of pre-commit checks.
2026-01-30 20:20:51 -05:00
Kevin Turcios
476bbc2305 for now 2026-01-30 20:10:52 -05:00
Kevin Turcios
bf8d8efd5f Update prek.yaml 2026-01-30 20:04:28 -05:00
Kevin Turcios
3fabea495f fix: install uv in fix-formatting workflow
The ty-check hook requires uv to be available. Add astral-sh/setup-uv
step before running prek.
2026-01-27 01:25:19 -05:00
Kevin Turcios
bf3890fdbf fix: use interactive mode for Claude @mentions
Remove prompt parameter from claude-mention job so Claude runs in
interactive mode and naturally receives @mention context. Move prek
formatting instructions to CLAUDE.md where Claude reads them for any
request.
2026-01-27 01:24:07 -05:00
Kevin Turcios
d80321da9f one more cc debug 2026-01-27 01:17:48 -05:00
Kevin Turcios
a741523b1f debug
- Add standalone fix-formatting.yml workflow for `/fix-formatting` command
- Uses prek's native --from-ref to only format changed files
- Properly handles prek exit codes and reports errors
- Enable show_full_output in claude-mention job for debugging
2026-01-27 01:07:55 -05:00
Kevin Turcios
f558f882bb Create fix-formatting.yml 2026-01-27 00:55:25 -05:00
Kevin Turcios
a22672d504 fix: improve Claude Code prompt for prek formatting fixes
Update the prompt to explicitly mention "pre-k" and "prek" triggers
and provide step-by-step instructions for running the formatter,
committing, and pushing changes.
2026-01-27 00:51:59 -05:00
Kevin Turcios
98b6577bc8 one more fix for CC 2026-01-27 00:43:52 -05:00
Kevin Turcios
596c07709c add prompt for pre-commit related and perms changes 2026-01-27 00:25:12 -05:00
Kevin Turcios
6e530ce081
allow claude to run pre-k (#2314)
# Pull Request Checklist

## Description
- [ ] **Description of PR**: Clear and concise description of what this
PR accomplishes
- [ ] **Breaking Changes**: Document any breaking changes (if
applicable)
- [ ] **Related Issues**: Link to any related issues or tickets

## Testing
- [ ] **Test cases Attached**: All relevant test cases have been
added/updated
- [ ] **Manual Testing**: Manual testing completed for the changes

## Monitoring & Debugging
- [ ] **Logging in place**: Appropriate logging has been added for
debugging user issues
- [ ] **Sentry will be able to catch errors**: Error handling ensures
Sentry can capture and report errors
- [ ] **Avoid Dev based/Prisma logging**: No development-only or
Prisma-specific logging in production code

## Configuration
- [ ] **Env variables newly added**: Any new environment variables are
documented in .env.example file or mentioned in description
---

## Additional Notes
<!-- Add any additional context, screenshots, or notes for reviewers
here -->
2026-01-27 00:10:58 -05:00
Kevin Turcios
0444e32f77
fix: CST tree handling and testgen pipeline improvements (#2310)
## Summary
- Fix CST tree corruption issues that caused 'NoneType' object has no
attribute 'visit' errors
- Consolidate testgen postprocessing into a single pipeline with
tuple-based pattern
- Improve markdown code extraction to prefer filepath-annotated blocks
- Add diagnostic context to optimization failure logs

## Changes
- Handle empty `SimpleStatementLine` and `StatementHandler` body to
prevent malformed CST
- Add trace_id logging to optimization and import failure paths
- Refactor testgen postprocessing into consolidated pipeline
- Fix code extraction for LLM responses with multiple code blocks

## Test plan
- [x] Added integration tests for full testgen pipeline
- [x] Added tests for markdown extraction with filepath preference
- [x] Existing tests pass

---------

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2026-01-26 23:57:55 -05:00
Kevin Turcios
a569e0b33d
fix: skip prek wait on push to main in django-unit-tests (#2274)
## Summary
- Skip `wait-for-prek` job on push to main since prek only runs on PRs
- Allow `unit-tests` to run when `wait-for-prek` is skipped
2026-01-23 05:34:39 -05:00
Kevin Turcios
c130255387
Fix aiservice deployment by including all files in zip artifact (#2272)
The previous zip command using shell glob (django/aiservice/*) was not
reliably including all files, particularly start_gunicorn.sh, causing
deployment failures with 'start_gunicorn.sh: not found'.

Changed to cd into the directory and zip all contents (.) while
excluding unnecessary files (.git, .venv, __pycache__, *.pyc).

# Pull Request Checklist

## Description
- [ ] **Description of PR**: Clear and concise description of what this
PR accomplishes
- [ ] **Breaking Changes**: Document any breaking changes (if
applicable)
- [ ] **Related Issues**: Link to any related issues or tickets

## Testing
- [ ] **Test cases Attached**: All relevant test cases have been
added/updated
- [ ] **Manual Testing**: Manual testing completed for the changes

## Monitoring & Debugging
- [ ] **Logging in place**: Appropriate logging has been added for
debugging user issues
- [ ] **Sentry will be able to catch errors**: Error handling ensures
Sentry can capture and report errors
- [ ] **Avoid Dev based/Prisma logging**: No development-only or
Prisma-specific logging in production code

## Configuration
- [ ] **Env variables newly added**: Any new environment variables are
documented in .env.example file or mentioned in description
---

## Additional Notes
<!-- Add any additional context, screenshots, or notes for reviewers
here -->
2026-01-23 01:18:39 -05:00
Kevin Turcios
3ac7eb5982
improve continuous review (#2271)
- Re-enable synchronize trigger for automatic re-reviews on each push
- Add logic to detect and resolve fixed issues automatically
- Focus reviews only on critical bugs, security, breaking changes, test
failures
- Limit to 5-7 high-signal comments per review
- Review only changed files on re-reviews (incremental approach)
- Add detailed PR review guidelines in CLAUDE.md
- Increase fetch-depth to 2 for commit comparison

This reduces review noise while maintaining continuous quality checks.

# Pull Request Checklist

## Description
- [ ] **Description of PR**: Clear and concise description of what this
PR accomplishes
- [ ] **Breaking Changes**: Document any breaking changes (if
applicable)
- [ ] **Related Issues**: Link to any related issues or tickets

## Testing
- [ ] **Test cases Attached**: All relevant test cases have been
added/updated
- [ ] **Manual Testing**: Manual testing completed for the changes

## Monitoring & Debugging
- [ ] **Logging in place**: Appropriate logging has been added for
debugging user issues
- [ ] **Sentry will be able to catch errors**: Error handling ensures
Sentry can capture and report errors
- [ ] **Avoid Dev based/Prisma logging**: No development-only or
Prisma-specific logging in production code

## Configuration
- [ ] **Env variables newly added**: Any new environment variables are
documented in .env.example file or mentioned in description
---

## Additional Notes
<!-- Add any additional context, screenshots, or notes for reviewers
here -->
2026-01-23 01:03:12 -05:00
Kevin Turcios
9fa1d22d51
fix Claude Code for backend (#2266)
# Pull Request Checklist

## Description
- [ ] **Description of PR**: Clear and concise description of what this
PR accomplishes
- [ ] **Breaking Changes**: Document any breaking changes (if
applicable)
- [ ] **Related Issues**: Link to any related issues or tickets

## Testing
- [ ] **Test cases Attached**: All relevant test cases have been
added/updated
- [ ] **Manual Testing**: Manual testing completed for the changes

## Monitoring & Debugging
- [ ] **Logging in place**: Appropriate logging has been added for
debugging user issues
- [ ] **Sentry will be able to catch errors**: Error handling ensures
Sentry can capture and report errors
- [ ] **Avoid Dev based/Prisma logging**: No development-only or
Prisma-specific logging in production code

## Configuration
- [ ] **Env variables newly added**: Any new environment variables are
documented in .env.example file or mentioned in description
---

## Additional Notes
<!-- Add any additional context, screenshots, or notes for reviewers
here -->
2026-01-20 17:35:01 -05:00
Kevin Turcios
b936d91a18 test 2026-01-20 17:18:06 -05:00
Kevin Turcios
b64776e284
use AsyncAzureOpenAI (#2253)
# Pull Request Checklist

## Description
- [ ] **Description of PR**: Clear and concise description of what this
PR accomplishes
- [ ] **Breaking Changes**: Document any breaking changes (if
applicable)
- [ ] **Related Issues**: Link to any related issues or tickets

## Testing
- [ ] **Test cases Attached**: All relevant test cases have been
added/updated
- [ ] **Manual Testing**: Manual testing completed for the changes

## Monitoring & Debugging
- [ ] **Logging in place**: Appropriate logging has been added for
debugging user issues
- [ ] **Sentry will be able to catch errors**: Error handling ensures
Sentry can capture and report errors
- [ ] **Avoid Dev based/Prisma logging**: No development-only or
Prisma-specific logging in production code

## Configuration
- [ ] **Env variables newly added**: Any new environment variables are
documented in .env.example file or mentioned in description
---

## Additional Notes
<!-- Add any additional context, screenshots, or notes for reviewers
here -->
2026-01-17 22:44:12 -05:00
Kevin Turcios
1e1820d27a
feat: add ty type checker to pre-k hooks (#2213)
Adds a local pre-commit hook for ty type checker since there's no
official pre-commit hook available yet (tracked in astral-sh/ty#269).
2026-01-09 22:36:53 -05:00
Kevin Turcios
2eecfd9dd3 check PRs 2025-12-30 01:17:05 -05:00
Kevin Turcios
d6349fed2f add pre-k GHA 2025-12-30 01:17:05 -05:00
Kevin Turcios
20cdab5245 use the right env var name 2025-12-26 22:51:55 -05:00
Kevin Turcios
1b9c5a4118 Rename secret to AZURE_ANTHROPIC_API_KEY 2025-12-26 13:38:07 -05:00
Kevin Turcios
6b756bfb14 Rename secret to AZURE_ANTHROPIC_ENDPOINT 2025-12-26 13:37:19 -05:00
Kevin Turcios
6726a5ed9e Switch Claude workflows to Azure Foundry 2025-12-26 13:35:58 -05:00
Kevin Turcios
18e8273209 Remove qodo-ai pr-agent workflow (replaced by Claude) 2025-12-26 13:22:28 -05:00
Kevin Turcios
cf704f12d0 Add Claude code review workflows with sticky comments
- claude-code-review.yml: Auto-review PRs with use_sticky_comment enabled
- claude.yml: On-demand @claude mentions in issues/PRs
2025-12-26 13:15:23 -05:00
mashraf-222
d4ddff44df
Github action setup with PR for CLI user (#2009)
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: Kevin Turcios <106575910+KRRT7@users.noreply.github.com>
2025-12-08 23:18:13 +05:30
Sarthak Agarwal
9e23a6c4ba
make sections collapsible for readbility on laptop (#2093)
<img width="1703" height="171" alt="image"
src="https://github.com/user-attachments/assets/0f77ceb6-ef7f-4bde-b24f-e4efce69889f"
/>

Making sections collapsible by default for readability of diff.
2025-12-08 11:59:11 +05:30
Kevin Turcios
ec530bb2c4 report properly 2025-11-26 04:40:54 -05:00
Kevin Turcios
513a6bb9eb final fix 2025-11-26 04:35:45 -05:00
Kevin Turcios
6bcfb8ab41 Fix E2E status jobs to accept skipped results
When there are no relevant file changes, the E2E test jobs skip correctly,
but the status jobs were failing because they only checked for success.

Changes:
- Add unit-tests-check to status job dependencies for proper tracking
- Accept 'skipped' result as success in addition to 'success'
- This allows PRs with only workflow changes to pass CI checks
2025-11-26 04:23:27 -05:00
Kevin Turcios
87241b0c2e Add checks permission to unit-tests-check jobs
The lewagon/wait-on-check-action requires checks:read permission
to query the status of check runs. This fixes the 403 error:
'Resource not accessible by integration' when waiting for unit tests.
2025-11-26 04:19:33 -05:00