Skip to content
Draft
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
39 changes: 37 additions & 2 deletions .github/workflows/octop-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,44 @@ jobs:
- name: Build frontend → src/octop/dashboard
run: make build-frontend

- name: Check dashboard dependencies
working-directory: dashboard
run: npm audit --registry=https://registry.npmjs.org

- name: Test dashboard
working-directory: dashboard
env:
NODE_OPTIONS: "--no-experimental-webstorage"
run: npm run lint && npm test

- uses: actions/upload-artifact@v7
with:
name: dashboard-dist
path: src/octop/dashboard/
if-no-files-found: error
retention-days: 7

organization-quality:
name: Verify organization module
if: github.event_name != 'workflow_dispatch' || github.event.inputs.attach_from_run == ''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: "24"
cache: npm
cache-dependency-path: modules/openxyos/package-lock.json
- name: Install organization dependencies
working-directory: modules/openxyos
run: npm ci
- name: Check organization module
working-directory: modules/openxyos
run: npm run ci
- name: Check organization dependencies
working-directory: modules/openxyos
run: npm audit --registry=https://registry.npmjs.org

# Job-level `if` cannot read `matrix.*` (GitHub 422). Filter here so only
# selected runners start — PRs → darwin-* + windows-*; dispatch honors `platforms`.
select-platforms:
Expand Down Expand Up @@ -134,7 +165,7 @@ jobs:

package:
name: "${{ matrix.plat }}"
needs: [frontend, select-platforms]
needs: [frontend, select-platforms, organization-quality]
runs-on: ${{ matrix.os }}
# Matrix runners are native for each plat; pin host detection so x64 Git Bash
# on windows-11-arm does not mis-classify the job as windows-amd64 cross-build.
Expand Down Expand Up @@ -177,7 +208,7 @@ jobs:

- uses: actions/setup-node@v5
with:
node-version: "20"
node-version: "24"
cache: npm
cache-dependency-path: modules/openxyos/package-lock.json

Expand Down Expand Up @@ -260,6 +291,10 @@ jobs:
- name: Install Wails v3 CLI
run: go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.13

- name: Test native desktop lifecycle and updater
working-directory: desktop/src
run: go test ./...

- name: Install NSIS
if: runner.os == 'Windows'
shell: pwsh
Expand Down
36 changes: 12 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Release

# 版本标签 v* → 测包、发 PyPI、建 GitHub Release,再级联:
# 版本标签 v* → 测包、构建 GitHub Release 制品,再级联:
# - Sync Main Into Develop
# - Build Octop FPK(复用本 Release 的 wheel;等待 docker-publish 的 GHCR 镜像)
#
Expand All @@ -18,7 +18,6 @@ on:
permissions:
contents: write
actions: write
id-token: write

concurrency:
group: release-${{ github.ref }}
Expand All @@ -43,6 +42,11 @@ jobs:
echo "Refusing release: tag $GITHUB_REF_NAME does not match pyproject.toml $package_version" >&2
exit 1
fi
git fetch origin main
if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "Refusing release: production tags must point to a commit on main" >&2
exit 1
fi

- uses: astral-sh/setup-uv@v4
with:
Expand All @@ -54,7 +58,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "24"
cache: npm
cache-dependency-path: dashboard/package-lock.json

Expand All @@ -73,26 +77,9 @@ jobs:
name: dist
path: dist/

publish:
name: Publish to PyPI
needs: build
runs-on: ubuntu-latest
environment: pypi
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

github-release:
name: Create GitHub Release
needs: publish
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -128,8 +115,9 @@ jobs:
echo ""
echo "## Install"
echo ""
echo "Download the Python wheel from this GitHub Release and install it with:"
echo '```bash'
echo "pip install octop==$version"
echo "uv pip install ./octop-$version-py3-none-any.whl"
echo '```'
} > .release-notes.md
fi
Expand Down Expand Up @@ -165,7 +153,7 @@ jobs:
-f version="${{ github.ref_name }}"

# FnOS FPK:复用本 Release 的 wheel + docker-publish 的 GHCR 镜像。
# 与 sync-develop 并行。Dispatch 失败必须让本 workflow 变红(PyPI 已发布仍如此)。
# 与 sync-develop 并行。Dispatch 失败必须让本 workflow 变红,以便发现下游构建漏触发。
trigger-fnos:
name: Trigger FnOS FPK build
needs: github-release
Expand All @@ -175,7 +163,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# --ref 用版本 tag,保证 FPK 打在与 PyPI / 镜像相同的 commit 上
# --ref 用版本 tag,保证 FPK 打在与 GitHub Release / 镜像相同的 commit 上
gh workflow run fnos-build-fpk.yml \
--repo "${{ github.repository }}" \
--ref "${{ github.ref_name }}"
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@

## [Unreleased]

### Changed

- Publish Python distributions as GitHub Release assets only; the FreeOS release workflow no longer publishes the colliding `octop` package name to PyPI, and install scripts default to the FreeOS GitHub source.

### Fixed

- Remove checkpoint-resident system messages before model calls while preserving the active compiled prompt, preventing strict Qwen chat templates from failing when an older conversation contains a stale bootstrap message.
- Detect models from an already-running Ollama daemon even when FreeOS-managed Ollama startup is disabled; model discovery never starts Ollama unless the user enabled it.
- Preserve `config.json` when it is malformed: startup and all configuration writers now report the file and parser position, avoid leaking stored credentials, and use atomic replacement instead of silently rebuilding an empty configuration.

## [0.1.0] - 2026-10-07

### Changed

- Publish the successor to 0.0.10 as 0.1.0, with Python distributions attached to GitHub Releases only.

### Fixed

- Remove stale checkpoint system messages before model calls, detect models from an already-running Ollama daemon without starting it, and preserve malformed `config.json` files instead of silently replacing them.
- Improve desktop update safety by checkpointing SQLite WAL before restart.

## [0.0.10] - 2026-10-03

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ See [AGENTS.md](AGENTS.md) for module boundaries and coding conventions.

1. Cut `release/x.y.z` from latest `develop` (version bump + CHANGELOG on that branch)
2. Open PR: `release/x.y.z` → `main` and merge when green
3. Tag `v<version>` on **main tip** and push — GitHub Actions builds, publishes to PyPI, and creates the GitHub Release
3. Tag `v<version>` on **main tip** and push — GitHub Actions builds Python distributions and creates a GitHub Release with the artifacts; FreeOS does not publish the `octop` distribution to PyPI
4. Delete `release/x.y.z`; Actions syncs `main` → `develop` (or opens `chore/sync-develop-after-*` if merge conflicts / branch protection)

Agent-assisted publish: `.cursor/skills/publish` (`/publish <version>`).
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ REPO_ROOT := $(shell pwd)
DASHBOARD_DIR := $(REPO_ROOT)/dashboard
DASHBOARD_DEST := $(REPO_ROOT)/src/octop/dashboard
DIST_DIR := $(REPO_ROOT)/dist
FRONTEND_NODE_OPTIONS ?= --max-old-space-size=4096

# PyPI repository (override: make publish PYPI_REPO=testpypi)
PYPI_REPO ?= pypi
Expand All @@ -29,7 +30,7 @@ RUN := $(if $(UV),uv run,)
PYTHON := $(if $(UV),uv run python,python3)
PIP := $(if $(UV),uv pip,python3 -m pip)
# Parallel workers for make test / make test-fast (override: make test PYTEST_JOBS=4)
PYTEST_JOBS ?= auto
PYTEST_JOBS ?= 4

# ─── Help ────────────────────────────────────────────────────────────────────

Expand Down Expand Up @@ -98,7 +99,7 @@ build-frontend:
@echo "[build-frontend] Installing npm dependencies..."
cd $(DASHBOARD_DIR) && npm ci
@echo "[build-frontend] Building dashboard (output: $(DASHBOARD_DEST))..."
cd $(DASHBOARD_DIR) && NODE_ENV=production NODE_OPTIONS="--max-old-space-size=2048" npm run build
cd $(DASHBOARD_DIR) && NODE_ENV=production NODE_OPTIONS="$(FRONTEND_NODE_OPTIONS)" npm run build
@echo "[build-frontend] Done."

.PHONY: build-wheel
Expand Down
Loading
Loading