Repository navigation
83 lines (79 loc) · 3.42 KB
/
Copy pathengine.yml
File metadata and controls
83 lines (79 loc) · 3.42 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
# Generated by `uorc-engine render` from src/Uorc/Engine.lex.tex (crates/engine).
# Do not edit: the engine's tests refuse drift. The kernel decides the facts it
# rests on (Uorc.Engine.shippedWorkflowIsValid): the cron sits off the hour,
# twice an hour, and setup plus the tick fit the job's timeout. No LLM is in
# the loop: each tick mints dominance hypotheses by the rule 30 register and
# the search weights, decides them over the κ-named corpus (a claim known by
# its κ is never rerun), and consolidates the winners into the shipped
# portfolio. A tick that advanced is committed to engine/tick, proposed as one
# pull request to main, and the acceptance gate is dispatched on it; main
# changes only when that request merges.
name: engine
on:
schedule:
- cron: "23,53 * * * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: engine
cancel-in-progress: false
jobs:
tick:
name: one tick of the engine
if: github.repository == 'UOR-Foundation/compression' && vars.UORC_ENGINE != 'off'
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: write
pull-requests: write
actions: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
persist-credentials: false
- name: Carry the open tick onto main
run: |
set -euo pipefail
git config user.name uorc-engine
git config user.email uorc-engine@users.noreply.github.com
if git ls-remote --exit-code origin refs/heads/engine/tick >/dev/null; then
git fetch origin engine/tick
git checkout -B engine/tick FETCH_HEAD
git rebase origin/main || { git rebase --abort; git checkout -B engine/tick origin/main; }
else
git checkout -B engine/tick origin/main
fi
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: target
key: engine-target-${{ hashFiles('Cargo.lock', 'generated/rust/**/provenance.json') }}
restore-keys: engine-target-
- name: Build the engine
timeout-minutes: 10
run: cargo build --locked --release -p uorc-engine
- name: Tick
id: tick
timeout-minutes: 45
run: target/release/uorc-engine tick --output "$GITHUB_OUTPUT" --summary .engine-summary.md
- name: Propose the tick
if: steps.tick.outputs.outcome != 'settled'
env:
GH_TOKEN: ${{ github.token }}
TITLE: ${{ steps.tick.outputs.title }}
run: |
set -euo pipefail
git add frontier.toml model/engine.toml model/hypotheses.toml crates/uorc/src/weights.rs
git commit -m "$TITLE"
auth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 -w0)
git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic $auth" push --force origin HEAD:refs/heads/engine/tick
if [ "$(gh pr list --head engine/tick --state open --json number --jq length)" = "0" ]; then
gh pr create --base main --head engine/tick --title "$TITLE" --body-file .engine-summary.md
else
gh pr edit engine/tick --title "$TITLE" --body-file .engine-summary.md
fi
gh workflow run bootstrap.yml --ref engine/tick
- name: Tick summary
if: always()
run: test -f .engine-summary.md && cat .engine-summary.md >> "$GITHUB_STEP_SUMMARY" || true