Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f61339f
feat(action): simplify action flow to incremental/full CLI contract
ivanmilevtues Aug 3, 2026
d59229f
fix(action): restore manifest and CI checks
ivanmilevtues Aug 3, 2026
4bc6cf3
fix(ci): align dogfood workflows with action inputs
ivanmilevtues Aug 3, 2026
220cc37
fix(lint): make local runner shellcheck clean
ivanmilevtues Aug 3, 2026
de457c0
fix(action): restore review authentication compatibility
ivanmilevtues Aug 3, 2026
e13086e
fix(action): run engine on supported Python
ivanmilevtues Aug 3, 2026
060e7e3
fix(action): honor engine fallback contract
ivanmilevtues Aug 3, 2026
6397805
fix(action): surface engine contract errors
ivanmilevtues Aug 3, 2026
a7259e0
fix(action): parse logged engine responses
ivanmilevtues Aug 3, 2026
96de6a7
fix(action): normalize direct LLM keys
ivanmilevtues Aug 3, 2026
812ed52
fix(review): retain baseline through rendering
ivanmilevtues Aug 3, 2026
bde08fa
fix(review): read boolean render metadata
ivanmilevtues Aug 3, 2026
fa74487
fix(review): post rendered diagram content
ivanmilevtues Aug 3, 2026
463ab43
fix(action): stream CLI progress logs
ivanmilevtues Aug 5, 2026
07de887
fix(review): restore slash command feedback
ivanmilevtues Aug 5, 2026
b6d04c3
fix(review): refine comment presentation
ivanmilevtues Aug 5, 2026
3024fdb
fix(sync): preserve user CodeBoarding config
ivanmilevtues Aug 5, 2026
ef9fdea
feat!: simplify the v2 action contract
ampagent Aug 8, 2026
15ea6a8
fix: resolve action paths and local fallbacks safely
ampagent Aug 8, 2026
ef706cc
fix: remove deprecated artifact fallback
ampagent Aug 8, 2026
821ff56
chore: defer dogfood workflow cleanup
ampagent Aug 8, 2026
281e85d
fix(review): highlight components owning changed methods
ampagent Aug 8, 2026
0c7612c
fix(action): address sync and cleanup edge cases
ampagent Aug 8, 2026
b8e508d
chore: merge main into v2 simplification
ampagent Aug 8, 2026
664ec59
fix(action): address final review edge cases
ampagent Aug 8, 2026
3bfc007
fix(action): secure slash commands and dogfood inputs
ampagent Aug 8, 2026
1013b83
fix(review): link progress comment to workflow run
ampagent Aug 8, 2026
0efc12e
docs(scripts): explain shell script purposes
ampagent Aug 8, 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
16 changes: 3 additions & 13 deletions .github/workflows/codeboarding-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ on:
options: [push, pull_request]
required: false
default: push
sync_pr_branch:
description: 'Machine-owned branch used when sync_strategy is pull_request.'
type: string
required: false
default: codeboarding/sync

# No workflow-level permissions: the single job below requests only what it
# needs (least privilege), so the default token starts with none.
Expand All @@ -70,6 +65,7 @@ jobs:
permissions:
contents: write # push the generated baseline branch
pull-requests: write # workflow_dispatch may exercise pull_request delivery
id-token: write # mint per-request OIDC credentials for the relay
Comment thread
ivanmilevtues marked this conversation as resolved.
steps:
# Dogfood: run the action from the checked-out repo (uses: ./) so pushes to
# main exercise the action code on main, not the last published release.
Expand Down Expand Up @@ -145,15 +141,9 @@ jobs:
- uses: ./
with:
mode: sync
force_full: ${{ inputs.force_full || false }}
# Push events retain direct delivery to their branch. A manual
# pull_request-strategy run targets main even though the workflow code
# itself is checked out from the feature ref being dogfooded.
target_branch: ${{ github.event_name == 'workflow_dispatch' && inputs.sync_strategy == 'pull_request' && 'main' || github.ref_name }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we still need to support this no? I am a bit puzzled what was this line doing and what is the behavior now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This line made a manually dispatched rolling-PR sync target main even when the workflow itself was launched from a feature ref. Removing target_branch makes the action use github.ref_name, so that behavior is lost and a manual run can target the wrong branch. If feature-ref dogfooding into a PR against main remains required, target_branch should stay as a small explicit input.

sync_strategy: ${{ inputs.sync_strategy || 'push' }}
Comment thread
ivanmilevtues marked this conversation as resolved.
sync_pr_branch: ${{ inputs.sync_pr_branch || 'codeboarding/sync' }}
force_full: ${{ inputs.force_full || false }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep manual rolling syncs targeting main

When this workflow is manually dispatched from a non-main ref with sync_strategy=pull_request, this block no longer supplies target_branch. The action consequently falls back to github.ref_name in scripts/action/guard.sh, opening the rolling baseline PR against the selected feature branch even though this workflow is designated as this repository's main-branch baseline writer. Pass target_branch: main for this manual delivery path.

Useful? React with 👍 / 👎.

# App token authenticates the baseline push so the commit is attributed
# to the CodeBoarding App (logo avatar). Falls back to the workflow token,
# which can push because this job grants contents: write.
push_token: ${{ steps.codeboarding-app-token-client.outputs.token || steps.codeboarding-app-token-app.outputs.token || github.token }}
llm_api_key: ${{ secrets.OPENROUTER_API_KEY }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

why are we dropping the operouter key here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That line made this repository’s dogfood sync use its own OpenRouter key directly. Removing it switched dogfood to the hosted OIDC tier because the job grants id-token: write; it was not required by the CLI-contract simplification. BYO-key support should remain. The pending action changes restore BYO keys and custom-provider routing; whether this workflow should continue dogfooding BYO or intentionally exercise hosted OIDC is a separate spec choice.

github_token: ${{ steps.codeboarding-app-token-client.outputs.token || steps.codeboarding-app-token-app.outputs.token || github.token }}
31 changes: 9 additions & 22 deletions .github/workflows/codeboarding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,24 @@ jobs:
contents: read
pull-requests: write # post / update the architecture-diff PR comment
issues: write # the /codeboarding issue_comment trigger + comment API
# Never auto-review the sync mode's own baseline PR (head branch
# 'codeboarding/sync', the sync_pr_branch default): it only changes generated
# files, so a diff comment would be noise. Scoped to THIS repo's head so a fork
# PR that merely happens to name its branch 'codeboarding/sync' is still
# reviewed normally. Consumers using sync_strategy: pull_request should match
# this exclusion to their sync_pr_branch and, if they run other pull_request
# workflows (tests, lint), exclude the branch there too (via a head_ref guard).
id-token: write # mint per-request OIDC credentials for the relay
Comment thread
ivanmilevtues marked this conversation as resolved.
# Never auto-review the fixed machine-owned 'codeboarding/sync' PR: it only
# changes generated files, so a diff comment would be noise. Scope this to
# this repository so a fork using the same branch name is still reviewed.
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.head_ref == 'codeboarding/sync' && 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:
# Dogfood: run the action from the checked-out repo (uses: ./) so each PR
# exercises the action code under review, not the last published release.
# The action reads its scripts via github.action_path and checks the engine
# and target repo into subdirectories, so this local checkout is untouched.
#
# On issue_comment events, checkout's default ref is the repo's DEFAULT
# BRANCH (the event isn't tied to a PR), so `uses: ./` would run main's
# action code, not this PR's — /codeboarding would silently test the wrong
# version. Check out the PR head explicitly for that event so the comment
# path dogfoods the PR under review too. pull_request events keep checkout's
# default (the PR merge ref), which already points at the PR. On-demand runs
# are restricted to same-repo PRs, so refs/pull/<n>/head resolves in this
# repo (no fork-repo override needed).
# Automatic same-repo reviews dogfood the PR action. Slash commands use the
# trusted default-branch action, which can safely analyze a fork's head
# without executing its action.yml with this job's OIDC permission.
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || '' }}
ref: ${{ github.event_name == 'issue_comment' && github.event.repository.default_branch || '' }}
- name: Detect CodeBoarding GitHub App credentials
id: codeboarding-app-config
shell: bash
Expand Down Expand Up @@ -123,4 +111,3 @@ jobs:
- uses: ./
with:
github_token: ${{ steps.codeboarding-app-token-client.outputs.token || steps.codeboarding-app-token-app.outputs.token || github.token }}
llm_api_key: ${{ secrets.OPENROUTER_API_KEY }}
Loading
Loading