Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
016192d
feat: add ai backend
PraneshASP Jul 3, 2025
6b59cda
feat: add frontend conponents for AI Assist
PraneshASP Jul 3, 2025
9785762
feat: add gemini integration
PraneshASP Jul 15, 2025
0cab49f
refactor: update frontend to use rust-backend for ai service
PraneshASP Jul 15, 2025
0f06196
chore: remove ts-backend for ai service
PraneshASP Jul 15, 2025
245aacc
chore: fmt
PraneshASP Jul 15, 2025
0c2a6b5
chore: fix linter issues
PraneshASP Jul 15, 2025
0088e99
chore: fix linter issues
PraneshASP Jul 15, 2025
a85505f
chore: fmt
PraneshASP Jul 15, 2025
d30e2a7
feat: add rate limiter
PraneshASP Jul 16, 2025
bb7b924
feat: add rate limit checks
PraneshASP Jul 16, 2025
8ce8610
chore: fmt and linting
PraneshASP Jul 16, 2025
895beb8
chore: fmt and linting
PraneshASP Jul 16, 2025
d607711
feat: add e2e tests
PraneshASP Jul 16, 2025
4b4afc3
ci: enable e2e tests
PraneshASP Jul 16, 2025
9e4d48c
ci: update rust version
PraneshASP Jul 16, 2025
1e0eed7
fix: update markdown renderer component
PraneshASP Jul 16, 2025
deb4b74
chore: remove unused deps from swaypad
PraneshASP Jul 16, 2025
fd9f1ed
fix: update examples and config to use latest versions
PraneshASP Jul 16, 2025
c8acf32
ci: remove rendundant tests
PraneshASP Jul 16, 2025
6e9d0f5
chore: fix ci
PraneshASP Jul 16, 2025
291e364
chore: update prompt
PraneshASP Jul 16, 2025
315aedd
Merge branch 'master' into feat/ai-code-generation
PraneshASP Jul 31, 2025
a25aafd
feat: add config map (#127)
vigneshv-eng Jul 31, 2025
69c08ee
Merge branch 'master' into feat/ai-code-generation
PraneshASP Jul 31, 2025
f5d5b1d
Merge branch 'master' into feat/ai-code-generation
PraneshASP Aug 7, 2025
7233b76
ci: bump chart version to 0.1.5
PraneshASP Aug 7, 2025
ea72178
Merge branch 'master' into feat/ai-code-generation
PraneshASP Aug 7, 2025
3c408cd
ci: bump chart version to 0.1.6
PraneshASP Aug 7, 2025
0baff6b
Merge branch 'feat/ai-code-generation' of https://github.com/FuelLabs…
PraneshASP Aug 7, 2025
b8dd279
Merge branch 'master' into feat/ai-code-generation
PraneshASP Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@
npm run format-check

frontend-build-and-test:
if: github.ref != 'refs/heads/master'
needs: cancel-previous-runs
runs-on: ubuntu-latest
# Local docker image registry
Expand Down Expand Up @@ -220,7 +219,10 @@

- name: Run the service in docker
run: |
docker run -d -p 8080:8080 ${{ env.LOCAL_REGISTRY }}/${{ env.LOCAL_TAG }}
docker run -d -p 8080:8080 \
-e GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }} \
-e RATE_LIMIT_REQUESTS_PER_DAY=10 \
${{ env.LOCAL_REGISTRY }}/${{ env.LOCAL_TAG }}

- name: NPM build and test
env:
Expand All @@ -230,3 +232,37 @@
npm ci
npm run build
npm run test

- name: Wait for service to be ready
run: |
timeout 60 bash -c 'until curl -f http://localhost:8080/health; do sleep 2; done'

- name: Run E2E Tests
if: github.ref == 'refs/heads/master' || github.event_name == 'pull_request'
env:
REACT_APP_LOCAL_SERVER: true
run: |
cd app
npm run test:ai

deploy:
if: github.ref == 'refs/heads/master'
needs:
- build-and-publish-image

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy job doesn't depend on frontend E2E tests

High Severity

The deploy job only depends on build-and-publish-image but not on frontend-build-and-test. Since the if: github.ref != 'refs/heads/master' guard was removed from frontend-build-and-test, this job now runs on master — but the deploy job can proceed without waiting for it. This means production deployment can happen even if the new AI E2E tests (or existing frontend tests) fail.

Additional Locations (1)

Fix in Cursor Fix in Web

runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: Set Environment Variables
run: |
tag=(`echo $GITHUB_SHA | cut -c1-7`)
echo "IMAGE_TAG=`echo $tag`" >> $GITHUB_ENV

- name: Deploy Sway Playground Backend Environment
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Deploy Sway Playground on k8s
repo: FuelLabs/fuel-deployment
ref: refs/heads/master
token: ${{ secrets.REPO_TOKEN }}
inputs: '{ "cluster": "${{ env.CONFIG }}", "deployment-version": "${{ github.sha }}", "image-version": "${{ env.IMAGE_TAG }}" }'
env:
CONFIG: 'fuel-prod-1'
Comment on lines +249 to +268

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 5 months ago

In general, the problem is fixed by explicitly setting a permissions block either at the workflow level (top‑level, applying to all jobs that don’t override it) or at the individual job level, specifying the minimum required permissions for GITHUB_TOKEN (often contents: read or even permissions: {} if no access is required). This prevents the workflow from inheriting potentially over‑permissive defaults.

For this workflow, the simplest, least‑disruptive fix is to add a top‑level permissions block near the top of .github/workflows/ci.yml, right after the name: (or after on:) definition, with contents: read as a safe minimal default. None of the shown jobs require write access via GITHUB_TOKEN; the deploy job already uses secrets.REPO_TOKEN to interact with another repository. Setting permissions: contents: read (or even permissions: {}) will constrain GITHUB_TOKEN for all jobs, including deploy, without changing any existing step functionality.

Concretely:

  • Edit .github/workflows/ci.yml.
  • Insert a new top‑level block:
    permissions:
      contents: read
    after the name: CI line (line 1) and before the on: block (line 2).
  • No imports, methods, or other definitions are needed; this is purely a YAML configuration change within the workflow.
Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,6 @@
 name: CI
+permissions:
+  contents: read
 on:
   push:
     branches:
EOF
@@ -1,4 +1,6 @@
name: CI
permissions:
contents: read
on:
push:
branches:
Copilot is powered by AI and may make mistakes. Always verify output.
Loading
Loading