Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
52 changes: 48 additions & 4 deletions .github/workflows/repo-architect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ on:
- analyze
- report
- mutate
lane:
description: 'Slice lane name (e.g. report_packet, parse_repair:test_pipeline)'
required: false
default: ''
type: string
targets:
description: 'Comma-separated list of files/modules for this slice'
required: false
default: ''
type: string
github_model:
description: 'GitHub Models model id'
required: true
Expand All @@ -31,6 +41,14 @@ on:
- '1'
- '2'
- '3'
allow_dirty:
description: 'Allow dirty working tree'
required: false
default: 'true'
type: choice
options:
- 'true'
- 'false'
schedule:
- cron: '17 * * * *'

Expand Down Expand Up @@ -67,17 +85,42 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_REPO: ${{ github.repository }}
GITHUB_BASE_BRANCH: ${{ github.event.repository.default_branch }}
GITHUB_MODEL: ${{ github.event.inputs.github_model || 'openai/gpt-4.1' }}
REPO_ARCHITECT_LANE: ${{ github.event.inputs.lane || '' }}
REPO_ARCHITECT_TARGETS: ${{ github.event.inputs.targets || '' }}
run: |
MODE="${{ github.event.inputs.mode }}"
MODEL="${{ github.event.inputs.github_model }}"
REPORT_PATH="${{ github.event.inputs.report_path }}"
MUTATION_BUDGET="${{ github.event.inputs.mutation_budget }}"
ALLOW_DIRTY="${{ github.event.inputs.allow_dirty }}"
if [ -z "$MODE" ]; then MODE="report"; fi
if [ -z "$MODEL" ]; then MODEL="openai/gpt-4.1"; fi
if [ -z "$REPORT_PATH" ]; then REPORT_PATH="docs/repo_architect/runtime_inventory.md"; fi
if [ -z "$MUTATION_BUDGET" ]; then MUTATION_BUDGET="1"; fi
export GITHUB_MODEL="$MODEL"
python repo_architect.py --allow-dirty --mode "$MODE" --report-path "$REPORT_PATH" --mutation-budget "$MUTATION_BUDGET"
if [ -z "$ALLOW_DIRTY" ]; then ALLOW_DIRTY="true"; fi

# Detect optional --lane / --targets CLI support; fall back to env vars if absent
HELP_TEXT="$(python repo_architect.py --help 2>&1)"
EXTRA_ARGS=()
if echo "$HELP_TEXT" | grep -q -- '--lane'; then
if [ -n "$REPO_ARCHITECT_LANE" ]; then
EXTRA_ARGS+=(--lane "$REPO_ARCHITECT_LANE")
fi
fi
if echo "$HELP_TEXT" | grep -q -- '--targets'; then
if [ -n "$REPO_ARCHITECT_TARGETS" ]; then
EXTRA_ARGS+=(--targets "$REPO_ARCHITECT_TARGETS")
fi
fi
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

lane/targets inputs are exported/detected here, but repo_architect.py currently does not accept --lane/--targets and also does not read REPO_ARCHITECT_LANE / REPO_ARCHITECT_TARGETS from the environment. As a result, dispatched “slice” runs cannot actually be scoped by lane/targets (these values are effectively ignored). Consider either implementing lane/targets handling in repo_architect.py (CLI flags or env var parsing) or removing these workflow inputs/args until the backend supports them to avoid a misleading interface.

Copilot uses AI. Check for mistakes.

if [ "$ALLOW_DIRTY" = "true" ]; then
EXTRA_ARGS+=(--allow-dirty)
fi

python repo_architect.py \
--mode "$MODE" \
--report-path "$REPORT_PATH" \
--mutation-budget "$MUTATION_BUDGET" \
"${EXTRA_ARGS[@]}"

- name: Upload repo architect artifacts
if: always()
Expand All @@ -87,5 +130,6 @@ jobs:
path: |
.agent
docs/repo_architect
include-hidden-files: true
if-no-files-found: warn
retention-days: 7
Loading
Loading