mirror of
https://github.com/ultraworkers/claw-code.git
synced 2026-05-30 03:35:20 +08:00
Add a lightweight ROADMAP duplicate-id guard and wire it into the low-risk docs/pre-push paths so optimistic append collisions introduced after the next-id helper are caught before merge. Constraint: Current ROADMAP contains legacy numbered lists and pre-helper duplicate low ids, so the default guard checks helper-era ids >=723 while preserving --min-id 1 for a future strict audit. Rejected: Fail CI on every numeric duplicate in the whole historical ROADMAP | current main would fail before this PR because old prose/list numbering is already duplicated. Confidence: high Scope-risk: narrow Directive: Keep roadmap-next-id.sh paired with roadmap-check-ids.sh when changing ROADMAP append workflows. Tested: bash -n scripts/roadmap-check-ids.sh scripts/roadmap-next-id.sh .github/hooks/pre-push; scripts/roadmap-check-ids.sh; temp ROADMAP copy with duplicate 723 failed nonzero and listed id 723; SKIP_CLAW_PRE_PUSH_BUILD=1 .github/hooks/pre-push; git diff --check; python3 .github/scripts/check_doc_source_of_truth.py; python3 .github/scripts/check_release_readiness.py Not-tested: full cargo workspace build/test because this is docs/scripts-only and the local pre-push cargo build was smoke-tested with its documented skip path.
158 lines
4.1 KiB
YAML
158 lines
4.1 KiB
YAML
name: Rust CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'gaebal/**'
|
|
- 'omx-issue-*'
|
|
paths:
|
|
- .github/workflows/rust-ci.yml
|
|
- .github/scripts/check_doc_source_of_truth.py
|
|
- .github/scripts/check_release_readiness.py
|
|
- .github/FUNDING.yml
|
|
- CODE_OF_CONDUCT.md
|
|
- CONTRIBUTING.md
|
|
- LICENSE
|
|
- README.md
|
|
- SECURITY.md
|
|
- SUPPORT.md
|
|
- USAGE.md
|
|
- PARITY.md
|
|
- PHILOSOPHY.md
|
|
- ROADMAP.md
|
|
- scripts/roadmap-*.sh
|
|
- docs/**
|
|
- rust/**
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .github/workflows/rust-ci.yml
|
|
- .github/scripts/check_doc_source_of_truth.py
|
|
- .github/scripts/check_release_readiness.py
|
|
- .github/FUNDING.yml
|
|
- CODE_OF_CONDUCT.md
|
|
- CONTRIBUTING.md
|
|
- LICENSE
|
|
- README.md
|
|
- SECURITY.md
|
|
- SUPPORT.md
|
|
- USAGE.md
|
|
- PARITY.md
|
|
- PHILOSOPHY.md
|
|
- ROADMAP.md
|
|
- scripts/roadmap-*.sh
|
|
- docs/**
|
|
- rust/**
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: rust-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: rust
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
doc-source-of-truth:
|
|
name: docs source-of-truth
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: .
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Check docs and metadata for stale branding
|
|
run: python .github/scripts/check_doc_source_of_truth.py
|
|
- name: Check release policy docs and local links
|
|
run: python .github/scripts/check_release_readiness.py
|
|
- name: Check ROADMAP ids
|
|
run: scripts/roadmap-check-ids.sh
|
|
|
|
fmt:
|
|
name: cargo fmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: rust -> target
|
|
- name: Check formatting
|
|
run: cargo fmt --all --check
|
|
|
|
test-workspace:
|
|
name: cargo test --workspace
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: rust -> target
|
|
- name: Run workspace tests
|
|
run: cargo test --workspace
|
|
|
|
clippy-workspace:
|
|
name: cargo clippy --workspace
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: rust -> target
|
|
- name: Run workspace clippy
|
|
run: cargo clippy --workspace
|
|
|
|
windows-smoke:
|
|
name: windows PowerShell smoke
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
working-directory: rust
|
|
shell: pwsh
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: rust -> target
|
|
- name: Build CLI for Windows smoke
|
|
run: cargo build -p rusty-claude-cli
|
|
- name: Smoke local commands without live credentials
|
|
env:
|
|
ANTHROPIC_API_KEY: ""
|
|
ANTHROPIC_AUTH_TOKEN: ""
|
|
OPENAI_API_KEY: ""
|
|
XAI_API_KEY: ""
|
|
DASHSCOPE_API_KEY: ""
|
|
run: |
|
|
$ErrorActionPreference = "Stop"
|
|
$env:CLAW_CONFIG_HOME = Join-Path $env:RUNNER_TEMP "claw config home"
|
|
New-Item -ItemType Directory -Force -Path $env:CLAW_CONFIG_HOME | Out-Null
|
|
$workspace = Join-Path $env:RUNNER_TEMP "claw path smoke"
|
|
New-Item -ItemType Directory -Force -Path $workspace | Out-Null
|
|
$claw = Join-Path $env:GITHUB_WORKSPACE "rust\target\debug\claw.exe"
|
|
Push-Location $workspace
|
|
try {
|
|
& $claw help
|
|
& $claw status
|
|
& $claw config env
|
|
& $claw doctor
|
|
} finally {
|
|
Pop-Location
|
|
}
|