mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-11-09 17:32:41 -10:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
557ca75a69 | ||
|
|
d38c3bf4ee | ||
|
|
8a3e092b97 |
No files matched your search
@@ -0,0 +1,91 @@
|
||||
name: Tests
|
||||
|
||||
# Builds, type-checks and runs every test suite on a clean GitHub runner, and records the file
|
||||
# list each published package would contain. Each suite is its own job so one failure does not
|
||||
# hide the others. Runners have no agent CLIs, logins or shared configuration, so tests cannot
|
||||
# reach a real account or a running rig.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: tests-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-package:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- name: Record the published file list of each package
|
||||
run: |
|
||||
mkdir -p pack-lists
|
||||
for p in cli daemon tui; do
|
||||
(cd packages/$p && npm pack --dry-run --json --ignore-scripts) \
|
||||
| node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{for(const f of JSON.parse(s)[0].files)console.log(f.path)})' \
|
||||
| sort > pack-lists/$p.txt
|
||||
echo "$p: $(wc -l < pack-lists/$p.txt) files"
|
||||
done
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pack-lists
|
||||
path: pack-lists/
|
||||
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
|
||||
repo-checks:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run test:repo
|
||||
|
||||
package-tests:
|
||||
# macOS, the platform OpenRig runs on: several daemon and cli tests read macOS ps columns,
|
||||
# file-inode behaviour and release tags.
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: [daemon, cli, tui, ui]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: brew install tmux
|
||||
- run: npm ci
|
||||
- name: Build the packages the tests import
|
||||
run: npm run build
|
||||
- run: npm run test -w packages/${{ matrix.package }}
|
||||
@@ -41,7 +41,7 @@ describe("0.5.2-07 A2-3 — model-fidelity enumeration guard", () => {
|
||||
const src = read("adapters/codex-runtime-adapter.ts");
|
||||
// The LAUNCH resume call threads binding.launchPosture, model, then the exact precomputed
|
||||
// posture segment. The latter prevents W3 observation from re-deciding policy.
|
||||
expect(src).toMatch(/buildCodexResumeCore\([^;]*binding\.launchPosture,\s*model,\s*postureArg\)/);
|
||||
expect(src).toMatch(/buildCodexResumeCore\([^;]*binding\.launchPosture,\s*model,\s*postureArg(?:,\s*daemonOptOut)?\)/);
|
||||
});
|
||||
|
||||
it("claude adapter: every claude seat-launch template threads modelArg", () => {
|
||||
@@ -66,9 +66,9 @@ describe("0.5.2-07 A2-3 — model-fidelity enumeration guard", () => {
|
||||
|
||||
it("shared buildCodexResumeCore accepts a model param and emits -m before the resume subcommand", () => {
|
||||
const src = read("domain/native-resume-probe.ts");
|
||||
expect(src).toMatch(/model\?: string \| null,\n\s*\/\*\*[^]*?\*\/\n\s*precomputedPostureArg\?: string,\n\): string/);
|
||||
expect(src).toMatch(/model\?: string \| null,\n\s*\/\*\*[^]*?\*\/\n\s*precomputedPostureArg\?: string,\n(?:\s*\/\*\*[^]*?\*\/\n\s*daemonOptOut\?: boolean,\n)?\): string/);
|
||||
expect(src).toMatch(/const modelArg = model \? ` -m \$\{shellQuote\(model\)\}`/);
|
||||
expect(src).toContain("`codex${profileOrPosture}${modelArg} resume ");
|
||||
expect(src).toContain("`codex${daemonArg}${profileOrPosture}${modelArg} resume ");
|
||||
});
|
||||
|
||||
it("buildNativeResumeCommand is classified NOT-A-SEAT-LAUNCH: every caller is metadata/inventory, none is a launch module", () => {
|
||||
|
||||
Reference in new issue
Block a user