Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
61 changes: 49 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ on:
schedule:
# 02:00 Asia/Shanghai every day. GitHub schedules can be delayed.
- cron: "0 18 * * *"
# 08:00 Asia/Shanghai every Sunday (00:00 UTC).
- cron: "0 0 * * 0"
workflow_dispatch:
inputs:
weekly:
description: Plan the weekly stable minor release (default is a patch preview)
default: false
type: boolean
release_v020:
description: One-off formal v0.2.0 release (daily preview policy is unchanged)
default: false
Expand Down Expand Up @@ -37,6 +43,9 @@ jobs:
prerelease: ${{ steps.plan.outputs.prerelease }}
commit: ${{ steps.plan.outputs.commit }}
previous_tag: ${{ steps.plan.outputs.previous_tag }}
notes_start_tag: ${{ steps.plan.outputs.notes_start_tag }}
reviewed_notes: ${{ steps.plan.outputs.reviewed_notes }}
weekly: ${{ steps.plan.outputs.weekly }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -46,20 +55,33 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Plan only when the source tree changed since the last published release
- name: Plan the release for the triggering channel
id: plan
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
RELEASE_V020: ${{ github.event_name == 'workflow_dispatch' && inputs.release_v020 }}
WEEKLY: ${{ github.event.schedule == '0 0 * * 0' || (github.event_name == 'workflow_dispatch' && inputs.weekly) }}
WEEKLY_ENABLED: ${{ vars.INFERRSI_WEEKLY_RELEASE_ENABLED }}
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
shell: bash
run: |
echo "weekly=$WEEKLY" >> "$GITHUB_OUTPUT"
if [[ "$WEEKLY" == true && "$WEEKLY_ENABLED" != true && "$DRY_RUN" != true ]]; then
echo "::notice::Weekly publication is disabled pending the default-branch dry run."
echo "release=false" >> "$GITHUB_OUTPUT"
exit 0
fi
gh api --paginate --slurp "repos/$GH_REPO/releases?per_page=100" > "$RUNNER_TEMP/releases.json"
options=()
if [[ "$RELEASE_V020" == true ]]; then options+=(--release-v020); fi
if [[ "$WEEKLY" == true ]]; then options+=(--weekly); fi
python tools/check_release.py plan --default-branch "$DEFAULT_BRANCH" \
--releases "$RUNNER_TEMP/releases.json" "${options[@]}" >> "$GITHUB_OUTPUT"
if grep -Fxq 'release=false' "$GITHUB_OUTPUT"; then
echo "::notice::No release due for this channel."
fi

build:
needs: plan
Expand Down Expand Up @@ -161,12 +183,13 @@ jobs:
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ needs.plan.outputs.tag }}
RELEASE_COMMIT: ${{ needs.plan.outputs.commit }}
PREVIOUS_TAG: ${{ needs.plan.outputs.previous_tag }}
PREVIOUS_TAG: ${{ needs.plan.outputs.notes_start_tag }}
REVIEWED_NOTES: ${{ needs.plan.outputs.reviewed_notes }}
shell: bash
run: |
if [[ "$RELEASE_TAG" == v0.2.0 ]]; then
if [[ "$REVIEWED_NOTES" == true ]]; then
mkdir -p "$RUNNER_TEMP/release-notes"
cp docs/release-notes/v0.2.0.md "$RUNNER_TEMP/release-notes/ai-notes.md"
cp "docs/release-notes/$RELEASE_TAG.md" "$RUNNER_TEMP/release-notes/ai-notes.md"
else
python tools/generate_release_notes.py --tag "$RELEASE_TAG" \
--commit "$RELEASE_COMMIT" --previous-tag "$PREVIOUS_TAG" \
Expand Down Expand Up @@ -205,7 +228,10 @@ jobs:
RELEASE_TAG: ${{ needs.plan.outputs.tag }}
RELEASE_COMMIT: ${{ needs.plan.outputs.commit }}
PREVIOUS_TAG: ${{ needs.plan.outputs.previous_tag }}
NOTES_START_TAG: ${{ needs.plan.outputs.notes_start_tag }}
REVIEWED_NOTES: ${{ needs.plan.outputs.reviewed_notes }}
PRERELEASE: ${{ needs.plan.outputs.prerelease }}
WEEKLY: ${{ needs.plan.outputs.weekly }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
steps:
# The write job never checks out or executes repository/build code.
Expand All @@ -216,7 +242,11 @@ jobs:
[[ "$RELEASE_TAG" =~ $version_tag ]]
[[ "$RELEASE_COMMIT" =~ ^[0-9a-f]{40}$ ]]
[[ -z "$PREVIOUS_TAG" || "$PREVIOUS_TAG" =~ $version_tag ]]
[[ -z "$NOTES_START_TAG" || "$NOTES_START_TAG" =~ $version_tag ]]
[[ "$REVIEWED_NOTES" == true || "$REVIEWED_NOTES" == false ]]
[[ "$PRERELEASE" == true || "$PRERELEASE" == false ]]
[[ "$WEEKLY" == true || "$WEEKLY" == false ]]
[[ "$WEEKLY" == false || "$PRERELEASE" == false ]]
- uses: actions/download-artifact@v4
with:
name: release-distributions
Expand Down Expand Up @@ -244,15 +274,23 @@ jobs:
echo "::error::Release already exists; no tags or assets will be overwritten."
exit 1
fi
published=$(jq -r '.[][] | select(.draft == false) | .tag_name | select(test("^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"))' <<< "$releases")
latest=$(printf '%s\n' "$published" | sort -V | tail -n 1)
[[ "$latest" == "$PREVIOUS_TAG" ]]
version_tag='^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$'
published=$(jq -r --arg pattern "$version_tag" '.[][] | select(.draft == false and (.tag_name | test($pattern))) | [.tag_name, .prerelease] | @tsv' <<< "$releases")
if [[ "$WEEKLY" == true ]]; then
latest_stable=$(awk '$2 == "false" {print $1}' <<< "$published" | sort -V | tail -n 1)
[[ "$latest_stable" == "$NOTES_START_TAG" ]]
newest=$( { cut -f1 <<< "$published"; echo "$RELEASE_TAG"; } | sort -V | tail -n 1)
[[ "$newest" == "$RELEASE_TAG" ]]
else
latest=$(cut -f1 <<< "$published" | sort -V | tail -n 1)
[[ "$latest" == "$PREVIOUS_TAG" ]]
fi
- name: Create the remote tag, upload packages, then publish
shell: bash
env:
AI_NOTES_DOWNLOADED: ${{ steps.download_notes.outcome }}
run: |
if [[ "$RELEASE_TAG" == v0.2.0 ]]; then
if [[ "$REVIEWED_NOTES" == true ]]; then
[[ "${AI_NOTES_DOWNLOADED:-}" == success && -f notes/ai-notes.md && ! -L notes/ai-notes.md ]]
[[ "$(wc -c < notes/ai-notes.md)" -gt 0 && "$(wc -c < notes/ai-notes.md)" -le 20000 ]]
fi
Expand All @@ -264,8 +302,8 @@ jobs:
printf '\nThese notes describe software changes. Release builds and scaffold checks do not establish campaign PASS, model quality or service performance. Any such claim requires its acceptance issue and complete frozen evidence.\n'
if [[ "${AI_NOTES_DOWNLOADED:-}" == success && -f notes/ai-notes.md && ! -L notes/ai-notes.md ]] &&
[[ "$(wc -c < notes/ai-notes.md)" -gt 0 && "$(wc -c < notes/ai-notes.md)" -le 20000 ]]; then
if [[ "$RELEASE_TAG" == v0.2.0 ]]; then
printf '\n## Reviewed v0.2.0 highlights\n\n'
if [[ "$REVIEWED_NOTES" == true ]]; then
printf '\n## Reviewed %s highlights\n\n' "$RELEASE_TAG"
else
printf '\n## AI-generated summary\n\n'
fi
Expand All @@ -274,8 +312,7 @@ jobs:
fi
} > "$notes_file"
options=()
if [[ "$RELEASE_TAG" == v0.2.0 ]]; then PREVIOUS_TAG=v0.1.1; fi
if [[ -n "$PREVIOUS_TAG" ]]; then options+=(--notes-start-tag "$PREVIOUS_TAG"); fi
if [[ -n "$NOTES_START_TAG" ]]; then options+=(--notes-start-tag "$NOTES_START_TAG"); fi
gh release create "$RELEASE_TAG" dist/*.whl dist/*.tar.gz dist/*.zip dist/SHA256SUMS \
--verify-tag --draft --title "InferRSI $RELEASE_TAG" \
--generate-notes --notes-file "$notes_file" "${options[@]}"
Expand Down
30 changes: 30 additions & 0 deletions docs/release-notes/v0.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# InferRSI v0.3.0

InferRSI v0.3.0 ties optimization decisions to measured bottlenecks. Teams can now run the same task with the knowledge library enabled and disabled, then compare the candidates that two independent agent sessions produce within the same budget. These highlights cover changes since v0.2.0.

## Optimization and evaluation

- **Diagnose the bottleneck before searching.** New managed optimization runs record a baseline profile or measurements from the same workload and environment before the agent searches for knowledge or evaluates a candidate. Each round links back to its diagnosis. Project campaigns can also start one service per candidate and use it for performance, quality and optional profiling checks. The selected candidate gets an independent final evaluation. [Diagnosis](https://github.com/InferMatrixLab/InferRSI/pull/519) · [Service reuse](https://github.com/InferMatrixLab/InferRSI/pull/480) · [Optional profiling](https://github.com/InferMatrixLab/InferRSI/pull/521)
- **Measure what the knowledge library contributes.** `inferrsi benchmarks compare` runs independent optimization sessions with managed knowledge on and off under the same task, evaluation rules and round budget. It defaults to Qwen-Image 2.1 denoising and MoE forward on Ascend. The report pairs final speedup with elapsed optimization time and flags missing or invalid pairs as insufficient evidence. [Comparison guide](https://github.com/InferMatrixLab/InferRSI/blob/6ed42af83a69f13fe88aaf0426ab8ef4f8ac7654/docs/benchmark-comparison.md)

## Knowledge and results

- **Start from the engineering task.** Seven entry points cover model bring-up, performance, debugging, accuracy, version alignment, derived engines and independent engines. Search spans skills, cases and engineering findings. With CANNBot enabled, the dashboard shows its search and read records alongside local retrieval and identifies the sources the agent explicitly cited in each round. [Task routes](https://github.com/InferMatrixLab/InferRSI/pull/516) · [CANNBot tracing](https://github.com/InferMatrixLab/InferRSI/pull/523)
- **Review and share a run.** The dashboard connects performance trends to individual rounds, candidate choices and execution results. `inferrsi export` writes a Markdown report, offline HTML, a machine-readable result and an artifact index from the same snapshot. Keep the original campaign directory for the code and evidence referenced by the export. [Round view](https://github.com/InferMatrixLab/InferRSI/pull/495) · [Result export](https://github.com/InferMatrixLab/InferRSI/pull/485)
- **Revisit earlier experiments.** Versioned archives preserve the original trial records for H3 Ref2VA, Qwen3.8 and MiniCPM Seed-TTS. The repository keeps compact evidence bundles with checksums, so reviewers can inspect individual trials and their original verdicts. [H3 and Qwen3.8 archives](https://github.com/InferMatrixLab/InferRSI/pull/472) · [MiniCPM Seed-TTS archive](https://github.com/InferMatrixLab/InferRSI/pull/435)

## Upgrading from v0.2.x

The `inferrsi` command and `python -m inferrsi` remain the CLI entry points. Apps now brings together the CLI, integrations and reports. Harness runs experiments, Benchmark owns tasks and evaluation rules, and Knowledge supplies skills and findings. Python integrations that import the retired `inferrsi.infra` or `inferrsi.model` packages need to update those imports. [CLI migration](https://github.com/InferMatrixLab/InferRSI/pull/461) · [Full module migration details](https://github.com/InferMatrixLab/InferRSI/blob/6ed42af83a69f13fe88aaf0426ab8ef4f8ac7654/CHANGELOG.md)

| Previous import | v0.3.0 import |
| --- | --- |
| `inferrsi.cli` | `inferrsi.apps.cli` |
| `inferrsi.infra.artifacts` | `inferrsi.apps.artifacts` |
| `inferrsi.infra.http` | `inferrsi.harness.serving.http` |
| `inferrsi.model.protocols.metrics` | `inferrsi.benchmark.metrics` |
| `inferrsi.model.validators` | `inferrsi.benchmark.validators` |

**Keep the original runtime for in-flight sessions.** A frozen plan records the runtime that created it. Use that environment for `status` and `recover`. Start a fresh session to run under v0.3.0. [Session recovery guide](https://github.com/InferMatrixLab/InferRSI/blob/6ed42af83a69f13fe88aaf0426ab8ef4f8ac7654/docs/optimization-workflow-unification.md#release-boundary-recovery)

[Full comparison from v0.2.0 to v0.3.0](https://github.com/InferMatrixLab/InferRSI/compare/v0.2.0...v0.3.0)
76 changes: 43 additions & 33 deletions docs/releases.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# Automatic daily releases

The [release bot](../.github/workflows/release.yml) runs every day at **02:00
Asia/Shanghai** (18:00 UTC). GitHub schedules can be delayed. If the default
branch's source tree is unchanged from the highest successfully published numeric
version, it skips the release. Empty commits do not cause a release.

When changed, the bot chooses a version, builds and checks the packages, creates
the tag and publishes the GitHub Release as `github-actions[bot]`. There is no
manual version bump, tag push or draft publication step. The first release uses
`tool.inferrsi.release.initial_version` in `pyproject.toml` (initially `0.1.0`);
subsequent releases allocate the next unused numeric patch version. Major/minor
releases need a separately reviewed change to that initial-version floor.

The existing **Developer Preview** classification is preserved:
`tool.inferrsi.release.prerelease = true` marks automatic releases as GitHub
prereleases and does not mark them Latest. Changing to a stable channel is a
separately reviewed configuration decision. Published previews count as
successful releases for no-change detection; private drafts do not.
# Daily previews and weekly stable releases

The [release bot](../.github/workflows/release.yml) runs on the default branch.
Both schedules use Asia/Shanghai time. GitHub may delay a scheduled run.

| Schedule | Version | Changes since | GitHub designation |
| --- | --- | --- | --- |
| Every day at 02:00 (18:00 UTC the previous day) | Next patch, e.g. v0.3.1 | Latest published numeric release | Pre-release |
| Sunday at 08:00 (00:00 UTC Sunday) | Next minor, e.g. v0.3.0, then v0.4.0 | Latest published numeric stable release | Latest |

After weekly activation, Sunday runs both channels. Each skips an unchanged source tree against its own
baseline. A preview can therefore become stable on the same commit. A published
stable release also satisfies the current Sunday-to-Saturday window on retries.
Drafts and reserved tags consume version numbers. Evidence archive tags are
outside the numeric sequence. Both channels build and validate packages before
publication. A stable release uses reviewed highlights from
`docs/release-notes/<tag>.md` when present. Otherwise the notes job generates a
summary from the channel baseline. GitHub's generated changelog covers that
same range. The daily publisher checks that the latest numeric release still
matches its plan. The weekly publisher checks that its stable baseline is
current and that its target is still the newest eligible version. An intervening
preview below that target can still precede the weekly release. A mid-week
hotfix reaches preview first and is eligible for stable on Sunday.

## Authority boundary

Expand Down Expand Up @@ -81,7 +85,7 @@ configuration does not silently change their access or existing branch rules.
All source-tree changes, including documentation, are eligible. The
[notes configuration](../.github/release.yml) groups existing `enhancement`,
`bug` and `documentation` labels and includes other merged PRs. Notes use the
previous published tag rather than incomplete reserved tags. A release describes
channel's previous published tag. A release describes
software changes; CPU/package checks do not establish campaign `PASS`, model
quality or service performance. Such claims retain the acceptance and evidence
requirements in [contributing](contributing.md#evidence-and-claims).
Expand Down Expand Up @@ -172,15 +176,22 @@ repository and default branch; copies must deliberately update that repository
guard.

Under **Actions → Release bot → Run workflow**, select the default branch and
leave **dry_run** checked. It plans and builds the next release without creating
a remote tag or Release; unchanged trees skip here too. With `DS_API_KEY`
configured, a changed-source dry run also makes the AI request and uploads the
summary artifact for inspection, consuming API usage. Clearing **dry_run**
runs the same automatic publication immediately. It takes no version/tag input.
leave **dry_run** checked. Select **weekly** to rehearse the stable path.
If a stable release already exists in the current Sunday-to-Saturday window,
the dry run reports a skip before building, even if new commits have landed.
When a build uses generated notes and `DS_API_KEY` is configured, the dry run
also requests a summary and uploads it for inspection.

Before the first weekly publication, run the following command after the
workflow reaches the default branch. The release owner records the successful
build, notes and skipped publisher in [the activation issue](https://github.com/InferMatrixLab/InferRSI/issues/554),
then enables the Actions repository variable `INFERRSI_WEEKLY_RELEASE_ENABLED=true`.
While the variable is unset or false, both scheduled and manually requested
live weekly runs report a skip. Daily previews and manual dry runs remain available.

```bash
gh workflow run release.yml --repo InferMatrixLab/InferRSI --ref <default-branch> \
-F dry_run=true
-F weekly=true -F dry_run=true
```

Actions artifacts are retained for seven days. Package versions come from Git
Expand All @@ -203,7 +214,7 @@ Runs are serialized across schedule and manual dispatch. A failed build creates
no remote tag or Release. A later tag/upload/publication failure can leave an
unused tag or private incomplete draft. The bot never moves tags, overwrites
notes/assets or uses `--clobber`. On a later eligible run it allocates the next
unused patch version, so failures may leave gaps in version numbers. Failed
unused version for the selected channel, so failures may leave gaps in version numbers. Failed
attempts do not advance the successful-release baseline or suppress retry of
unreleased source. Old drafts remain for an authorized maintainer to inspect.

Expand All @@ -226,7 +237,7 @@ and [publication CLI](https://cli.github.com/manual/gh_release_edit), plus the
Remote scheduled execution, repository policy and actual publication remain
unverified until observed in an actual release run.

## One-off formal v0.2.0
## Historical one-off formal v0.2.0

The existing workflow accepts `release_v020=true` only through manual dispatch.
It plans exactly v0.2.0 with `prerelease=false`, rejects any already reserved
Expand All @@ -242,8 +253,7 @@ check still uses the actual latest release, not that historical notes baseline.
This one-off notes path does not call the model API. Wheel, sdist, Codex ZIP,
WorkSwarm ZIP and SHA256SUMS remain bound to the planned source commit.

Scheduled dispatch and ordinary manual runs keep the existing pyproject defaults.
After v0.2.0 is published, the unchanged semantic patch planner naturally selects
v0.2.1 as a preview when source changes; this does not retain the v0.1.x numbering
line or turn future releases stable. A failed reserved v0.2.0 is not overwritten
or silently replaced: investigate and obtain a new release decision.
The daily patch planner continued with v0.2.1 after this promotion.
If a failed one-off attempt has reserved v0.2.0, the planner stops. Inspect the
reservation and obtain a new release decision from the maintainer before retrying.
The recurring Sunday channel now handles subsequent minor releases.
Loading
Loading