From ec7351db023b465eddbdbeca73ff34fd74e2733b Mon Sep 17 00:00:00 2001 From: Ivan Milev Date: Thu, 27 Aug 2026 00:20:23 +0200 Subject: [PATCH 1/5] Add CodeBoarding architecture analysis: add codeboarding.yml --- .github/workflows/codeboarding.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/codeboarding.yml diff --git a/.github/workflows/codeboarding.yml b/.github/workflows/codeboarding.yml new file mode 100644 index 00000000000..f8113576fbc --- /dev/null +++ b/.github/workflows/codeboarding.yml @@ -0,0 +1,41 @@ +name: CodeBoarding review + +on: + pull_request: + types: [opened, reopened, ready_for_review, closed, synchronize] + issue_comment: + types: [created] + +# No workflow-level permissions: each job requests only what it needs (least +# privilege), so the default token starts with none. +permissions: {} + +concurrency: + group: codeboarding-${{ github.event.pull_request.number || github.event.issue.number }} + cancel-in-progress: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }} + +jobs: + review: + runs-on: ubuntu-latest + timeout-minutes: 60 + permissions: + contents: read # check out the repo + read the committed baseline (no writes in review mode) + pull-requests: write # post the architecture-diff PR comment + issues: write # the /codeboarding issue_comment trigger + comment API + id-token: write # mint a GitHub OIDC token for the free hosted tier (write is the only level for id-token) + actions: read # let a repeat review download the analysis an earlier run published, instead of re-deriving the whole PR + if: > + (github.event_name == 'pull_request' && github.event.action != 'closed' && + github.event.pull_request.draft == false && + github.event.pull_request.head.repo.full_name == github.repository) || + (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && + startsWith(github.event.comment.body, '/codeboarding') && + contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) + steps: + - uses: CodeBoarding/CodeBoarding-action@v1 + with: + # Free tier needs no secret; these fall through to the hosted OIDC tier when + # unset. Add either repo secret (Settings → Secrets and variables → Actions) + # for more/unmetered usage; no YAML edit required. + llm_api_key: ${{ secrets.OPENROUTER_API_KEY }} # BYO LLM provider key (OpenRouter) + license_key: ${{ secrets.CODEBOARDING_LICENSE }} # CodeBoarding paid plan From 51c3b465ca88dbd6d8b8cf14ac88082b17c09fe3 Mon Sep 17 00:00:00 2001 From: Ivan Milev Date: Thu, 27 Aug 2026 00:20:24 +0200 Subject: [PATCH 2/5] Add CodeBoarding architecture analysis: add codeboarding-sync.yml --- .github/workflows/codeboarding-sync.yml | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/codeboarding-sync.yml diff --git a/.github/workflows/codeboarding-sync.yml b/.github/workflows/codeboarding-sync.yml new file mode 100644 index 00000000000..23115086ed7 --- /dev/null +++ b/.github/workflows/codeboarding-sync.yml @@ -0,0 +1,50 @@ +name: CodeBoarding sync + +on: + push: + branches: ['main'] + # Loop guard: don't re-trigger on the files this workflow itself commits. + # List generated files only: user-authored scope configuration must still trigger + # regeneration, while a merged sync PR must not trigger a loop. + paths-ignore: + - '.codeboarding/*.md' + - '.codeboarding/analysis.json' + - '.codeboarding/fingerprint.json' + - '.codeboarding/static_analysis.pkl' + - '.codeboarding/static_analysis.sha' + - '.codeboarding/codeboarding_version.json' + - '.codeboarding/health/health_report.json' + - 'docs/development/architecture.md' + workflow_dispatch: + inputs: + force_full: + description: 'Ignore the committed baseline and rebuild it from scratch (full analysis).' + type: boolean + required: false + default: false + +permissions: + contents: write # commit the generated baseline + docs to the branch + id-token: write # identifies this repo to CodeBoarding's hosted tier, used by the free + # tier AND a license, and as the fallback until your own key exists + +concurrency: + # Serialize against itself so a push landing mid-run can't make two commits. + group: codeboarding-sync + cancel-in-progress: false + +jobs: + sync: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: CodeBoarding/CodeBoarding-action@v1 + with: + mode: sync + force_full: ${{ inputs.force_full || false }} + target_branch: 'main' + # Free tier needs no secret; these fall through to the hosted OIDC tier when + # unset. Add either repo secret (Settings → Secrets and variables → Actions) + # for more/unmetered usage; no YAML edit required. + llm_api_key: ${{ secrets.OPENROUTER_API_KEY }} # BYO LLM provider key (OpenRouter) + license_key: ${{ secrets.CODEBOARDING_LICENSE }} # CodeBoarding paid plan From 2da2d571d91b66d74bee17c88e73ee91f36079f0 Mon Sep 17 00:00:00 2001 From: Amp Date: Wed, 26 Aug 2026 22:39:51 +0000 Subject: [PATCH 3/5] Fix CodeBoarding Java analysis runtime Amp-Thread-ID: https://ampcode.com/threads/T-01a04035-16e0-717f-8cce-97041e26e175 Co-authored-by: Ivan Milev --- .github/workflows/codeboarding.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/codeboarding.yml b/.github/workflows/codeboarding.yml index f8113576fbc..745dd89c497 100644 --- a/.github/workflows/codeboarding.yml +++ b/.github/workflows/codeboarding.yml @@ -32,6 +32,12 @@ jobs: startsWith(github.event.comment.body, '/codeboarding') && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) steps: + - name: Set up Java for CodeBoarding + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + - uses: CodeBoarding/CodeBoarding-action@v1 with: # Free tier needs no secret; these fall through to the hosted OIDC tier when From d21fc0ddb98afdeade716a1c092f1d4fb052e0de Mon Sep 17 00:00:00 2001 From: Amp Date: Wed, 26 Aug 2026 22:42:47 +0000 Subject: [PATCH 4/5] Set Java runtime for CodeBoarding sync Amp-Thread-ID: https://ampcode.com/threads/T-01a04035-16e0-717f-8cce-97041e26e175 Co-authored-by: Ivan Milev --- .github/workflows/codeboarding-sync.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/codeboarding-sync.yml b/.github/workflows/codeboarding-sync.yml index 23115086ed7..a3a57050f8b 100644 --- a/.github/workflows/codeboarding-sync.yml +++ b/.github/workflows/codeboarding-sync.yml @@ -38,6 +38,12 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: + - name: Set up Java for CodeBoarding + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + - uses: CodeBoarding/CodeBoarding-action@v1 with: mode: sync From 644df3c1ebc9f62a74fb8c44286205b1bb78ffb1 Mon Sep 17 00:00:00 2001 From: Amp Date: Wed, 26 Aug 2026 23:15:14 +0000 Subject: [PATCH 5/5] Test released CodeBoarding runtime setup Amp-Thread-ID: https://ampcode.com/threads/T-01a04035-16e0-717f-8cce-97041e26e175 Co-authored-by: Ivan Milev --- .github/workflows/codeboarding-sync.yml | 6 ------ .github/workflows/codeboarding.yml | 6 ------ 2 files changed, 12 deletions(-) diff --git a/.github/workflows/codeboarding-sync.yml b/.github/workflows/codeboarding-sync.yml index a3a57050f8b..23115086ed7 100644 --- a/.github/workflows/codeboarding-sync.yml +++ b/.github/workflows/codeboarding-sync.yml @@ -38,12 +38,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - name: Set up Java for CodeBoarding - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: '21' - - uses: CodeBoarding/CodeBoarding-action@v1 with: mode: sync diff --git a/.github/workflows/codeboarding.yml b/.github/workflows/codeboarding.yml index 745dd89c497..f8113576fbc 100644 --- a/.github/workflows/codeboarding.yml +++ b/.github/workflows/codeboarding.yml @@ -32,12 +32,6 @@ jobs: startsWith(github.event.comment.body, '/codeboarding') && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) steps: - - name: Set up Java for CodeBoarding - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: '21' - - uses: CodeBoarding/CodeBoarding-action@v1 with: # Free tier needs no secret; these fall through to the hosted OIDC tier when