forked from Steake/GodelOS
-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (129 loc) · 4.92 KB
/
repo-architect-execution.yml
File metadata and controls
141 lines (129 loc) · 4.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: repo-architect-execution
# Execution lane: select one ready issue and delegate it to Copilot.
# Runs every 2 hours on a schedule, or on workflow_dispatch.
# Uses a per-repository concurrency group to prevent duplicate delegations.
on:
workflow_dispatch:
inputs:
enable_live_delegation:
description: 'Actually delegate to Copilot via GitHub API (false = dry-run report only)'
required: false
default: 'false'
type: choice
options:
- 'false'
- 'true'
active_objective:
description: 'Restrict issue selection to a specific objective (blank = any)'
required: false
default: ''
type: choice
options:
- ''
- restore-parse-correctness
- eliminate-import-cycles
- converge-runtime-structure
- normalise-knowledge-substrate
- isolate-agent-boundaries
- reduce-architecture-score-risk
- add-consciousness-instrumentation
lane_filter:
description: 'Restrict issue selection to a specific charter lane (blank = any)'
required: false
default: ''
type: string
max_concurrent_delegated:
description: 'Max number of issues simultaneously in-flight'
required: false
default: '1'
type: choice
options:
- '1'
- '2'
- '3'
stale_timeout_days:
description: 'Days before a delegated-but-PR-less item is marked stale'
required: false
default: '14'
type: string
schedule:
# Every 2 hours
- cron: '37 */2 * * *'
concurrency:
group: repo-architect-execution-${{ github.repository }}
cancel-in-progress: false # never cancel in-flight delegation runs
permissions:
contents: read
issues: write
pull-requests: read
models: read
jobs:
execute:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Ensure artifact directories exist
run: mkdir -p .agent docs/repo_architect
- name: Restore durable work state from cache
uses: actions/cache/restore@v4
with:
path: .agent/work_state.json
key: repo-architect-work-state-v1-execution
restore-keys: |
repo-architect-work-state-v1-
- name: Run repo architect (execution mode)
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_REPO: ${{ github.repository }}
REPO_ARCHITECT_BRANCH_SUFFIX: ${{ github.run_id }}-${{ github.run_attempt }}
ENABLE_LIVE_DELEGATION: ${{ github.event.inputs.enable_live_delegation || 'false' }}
MAX_CONCURRENT_DELEGATED: ${{ github.event.inputs.max_concurrent_delegated || '1' }}
ACTIVE_OBJECTIVE: ${{ github.event.inputs.active_objective || '' }}
LANE_FILTER: ${{ github.event.inputs.lane_filter || '' }}
STALE_TIMEOUT_DAYS: ${{ github.event.inputs.stale_timeout_days || '14' }}
run: |
EXTRA_ARGS=""
if [ "$ENABLE_LIVE_DELEGATION" = "true" ]; then
EXTRA_ARGS="$EXTRA_ARGS --enable-live-delegation"
fi
if [ -n "$ACTIVE_OBJECTIVE" ]; then
EXTRA_ARGS="$EXTRA_ARGS --active-objective $ACTIVE_OBJECTIVE"
fi
if [ -n "$LANE_FILTER" ]; then
EXTRA_ARGS="$EXTRA_ARGS --lane-filter $LANE_FILTER"
fi
python repo_architect.py --allow-dirty --mode execution \
--max-concurrent-delegated "$MAX_CONCURRENT_DELEGATED" \
--stale-timeout-days "$STALE_TIMEOUT_DAYS" \
$EXTRA_ARGS
- name: Save durable work state to cache
if: always()
uses: actions/cache/save@v4
with:
path: .agent/work_state.json
key: repo-architect-work-state-v1-execution-${{ github.run_id }}
- name: Upload execution artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: repo-architect-execution-${{ github.run_id }}
path: .agent/work_state.json
if-no-files-found: warn
include-hidden-files: true
retention-days: 7
- name: Write workflow summary
if: always()
run: |
echo "## repo-architect execution run summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **mode**: \`execution\`" >> $GITHUB_STEP_SUMMARY
echo "- **live delegation**: \`${{ github.event.inputs.enable_live_delegation || 'false' }}\`" >> $GITHUB_STEP_SUMMARY
echo "- **active objective**: \`${{ github.event.inputs.active_objective || 'any' }}\`" >> $GITHUB_STEP_SUMMARY
echo "- **run**: [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY