Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7bcce15
12
giovannivolpe Dec 2, 2026
7fed070
Saved profiles must contain the complete current configuration
giovannivolpe Dec 2, 2026
cf3f690
PR13b
giovannivolpe Dec 2, 2026
06344e2
Update of macOS installation and launcher
giovannivolpe Dec 2, 2026
550a312
Canonical preference environment variable
giovannivolpe Dec 2, 2026
0fe8962
Explicit retrieval scopes
giovannivolpe Dec 2, 2026
eb9107c
Hugging Face cache compatibility
giovannivolpe Dec 2, 2026
e425970
Update generation.py
giovannivolpe Dec 2, 2026
0ac6e76
Update test_generation.py
giovannivolpe Dec 2, 2026
469c94a
Relocation of the test-only trace traversal helper
giovannivolpe Dec 2, 2026
17a596e
Removal of redundant private parameters
giovannivolpe Dec 2, 2026
6d4b37e
Removal of obsolete project discovery
giovannivolpe Dec 2, 2026
3481495
Update test_generation.py
giovannivolpe Dec 2, 2026
dc1a627
GUI assets and graphical resources
giovannivolpe Dec 2, 2026
bd80207
Relocation of unused mascot artwork
giovannivolpe Dec 2, 2026
416c0f4
Source-distribution cleanup
giovannivolpe Dec 2, 2026
13ca374
Test and development resources
giovannivolpe Dec 2, 2026
624e84a
Canonical documentation terminology
giovannivolpe Dec 2, 2026
1768484
Architecture and extension documentation
giovannivolpe Dec 2, 2026
629c7be
Workspace, configuration and source-manifest documentation
giovannivolpe Dec 3, 2026
0794b29
Source processing, retrieval and answering documentation
giovannivolpe Dec 3, 2026
a0a850c
Memory-summary identity correction
giovannivolpe Dec 3, 2026
624d943
Conversation and trace documentation
giovannivolpe Dec 3, 2026
ddb8f12
GUI feedback revision validation
giovannivolpe Dec 3, 2026
60aea53
GUI architecture and protocol documentation
giovannivolpe Dec 3, 2026
71cacb5
Model, performance and system-testing documentation
giovannivolpe Dec 3, 2026
adcde64
Backend-independent throughput correction
giovannivolpe Dec 3, 2026
689a41f
Production docstrings and comments
giovannivolpe Dec 3, 2026
ce1b988
Tool documentation and plugin authoring contracts
giovannivolpe Dec 3, 2026
344e6fc
Tutorial execution corrections
giovannivolpe Dec 3, 2026
4c001d8
Explicit conversation resumption
giovannivolpe Dec 3, 2026
68eefd9
Tutorial workspace path normalization
giovannivolpe Dec 3, 2026
85e35bb
Update test__tutorials.py
giovannivolpe Dec 3, 2026
f282c73
Public-facing documentation and installation
giovannivolpe Dec 3, 2026
ce9ade8
Validation and publication safeguards
giovannivolpe Dec 3, 2026
d77db6a
Strengthen native release verification and align publication document…
giovannivolpe Dec 3, 2026
b0b1372
Prerelease recovery and repository hygiene
giovannivolpe Dec 3, 2026
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
3 changes: 2 additions & 1 deletion .github/workflows/macos_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
run: >-
python -m unittest
tests.setup.test__macos_builder
tests.setup.test__macos_version
tests.setup.test__macos_launcher_lock
tests.setup.test__macos_launcher_update
tests.setup.test__macos_backend_repair -v
Expand All @@ -68,7 +69,7 @@ jobs:
- name: Build ad-hoc signed application with bundled wheel
run: bash setup/macos/build_app.sh --wheel
- name: Inspect actual application, signing and disk image
run: bash tests/setup/check_macos_app.sh
run: bash tests/setup/check_macos_app.sh --wheel
- name: Upload validated ad-hoc signed disk image
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
Expand Down
94 changes: 92 additions & 2 deletions .github/workflows/native_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
outputs:
version: ${{ steps.version.outputs.version }}
prerelease: ${{ steps.version.outputs.prerelease }}
commit: ${{ steps.commit.outputs.sha }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -41,7 +42,8 @@ jobs:
with Path("pyproject.toml").open("rb") as stream:
version = tomllib.load(stream)["project"]["version"]
if not isinstance(version, str) or not re.fullmatch(
r"[0-9]+\.[0-9]+\.[0-9]+(?:b[0-9]+|rc[0-9]+)?",
r"(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
r"(?:(?:b|rc)[1-9][0-9]{0,2})?",
version,
):
raise SystemExit(f"Unsupported release version: {version!r}")
Expand All @@ -55,6 +57,13 @@ jobs:
file=output,
)
PYTHON
- name: Record validated source commit
id: commit
shell: bash
run: |
set -euo pipefail
commit=$(git rev-parse --verify HEAD^{commit})
echo "sha=$commit" >> "$GITHUB_OUTPUT"
- name: Verify tag-pinned PyPI description
run: python -m setup.generate_pypi_readme --check

Expand Down Expand Up @@ -113,14 +122,95 @@ jobs:
RELEASE_TAG: ${{ github.ref_name }}
RELEASE_VERSION: ${{ needs.validate.outputs.version }}
IS_PRERELEASE: ${{ needs.validate.outputs.prerelease }}
RELEASE_COMMIT: ${{ needs.validate.outputs.commit }}
run: |
set -euo pipefail
assets=(
"release-assets/KiLin-${RELEASE_VERSION}-macos-arm64.dmg"
"release-assets/KiLin-Setup-${RELEASE_VERSION}.exe"
"release-assets/SHA256SUMS.txt"
)
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
# A failed API request is not evidence that a release is absent.
# Include draft releases and all pages of assets in the preflight.
existing=$(python3 - "${assets[@]}" <<'PYTHON'
import json
import os
from pathlib import Path
import re
import subprocess
import sys

repo = f"repos/{os.environ['GH_REPO']}"
tag = os.environ["RELEASE_TAG"]
commit = os.environ["RELEASE_COMMIT"]
stage = os.environ["IS_PRERELEASE"]
if stage not in {"true", "false"}:
raise SystemExit("Invalid release classification")
prerelease = stage == "true"

def api(*args):
return json.loads(subprocess.check_output(
["gh", "api", *args], encoding="utf-8",
))

def items(path):
pages = api("--paginate", "--slurp", path)
if not isinstance(pages, list) or not all(
isinstance(page, list) for page in pages
):
raise SystemExit("Invalid paginated GitHub response")
return [item for page in pages for item in page]

releases = [
release for release in items(f"{repo}/releases?per_page=100")
if release["tag_name"] == tag
]
if len(releases) > 1:
raise SystemExit("Multiple releases match the version tag")
if releases:
release = releases[0]
if release["prerelease"] is not prerelease:
raise SystemExit("Existing release classification differs")
if release.get("immutable") is True:
raise SystemExit("Existing release is immutable")
release_id = release["id"]
if type(release_id) is not int or release_id <= 0:
raise SystemExit("Invalid existing release identity")
names = {
asset["name"] for asset in items(
f"{repo}/releases/{release_id}/assets?per_page=100"
)
}
conflicts = names.intersection(Path(p).name for p in sys.argv[1:])
if conflicts:
raise SystemExit(
"Release assets already exist: "
+ ", ".join(sorted(conflicts))
)

# Peel annotated tags to the commit actually used by the builds.
# Resolve the explicit tag ref rather than an ambiguous branch name.
if not re.fullmatch(r"[0-9a-f]{40}", commit):
raise SystemExit("Invalid validated source commit")
target = api(f"{repo}/git/ref/tags/{tag}")["object"]
seen = set()
while True:
sha = target["sha"]
if not re.fullmatch(r"[0-9a-f]{40}", sha) or sha in seen:
raise SystemExit("Invalid release tag target")
if target["type"] == "commit":
break
if target["type"] != "tag":
raise SystemExit("Release tag does not identify a commit")
seen.add(sha)
target = api(f"{repo}/git/tags/{sha}")["object"]
if sha != commit:
raise SystemExit("Release tag no longer identifies built commit")

print("true" if releases else "false")
PYTHON
)
if [[ "$existing" == "true" ]]; then
# Do not overwrite published assets: a rerun must be reviewed.
gh release upload "$RELEASE_TAG" "${assets[@]}"
else
Expand Down
72 changes: 70 additions & 2 deletions .github/workflows/windows_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ jobs:
$version = (Select-String pyproject.toml -Pattern '^version = "(.*)"$').Matches[0].Groups[1].Value
$runtime = Join-Path $env:LOCALAPPDATA "kilin\runtime\$version"
if (-not (Test-Path "$runtime\Scripts\kilin-gui.exe")) { throw "kilin-gui.exe is missing." }
& "$runtime\Scripts\python.exe" -c "import kilin, PySide6, torch, transformers; print(torch.__version__)"
if ($LASTEXITCODE -ne 0) { throw "The installed runtime cannot import KiLin." }
& "$runtime\Scripts\python.exe" -I "$env:GITHUB_WORKSPACE\tests\setup\check_windows_runtime.py" `
"$runtime" "$env:GITHUB_WORKSPACE\pyproject.toml"
if ($LASTEXITCODE -ne 0) { throw "Installed runtime verification failed." }
& "$runtime\Scripts\python.exe" -I "$env:GITHUB_WORKSPACE\examples\plugins\check_examples.py"
if ($LASTEXITCODE -ne 0) { throw "Installed plugin lifecycle failed." }
$shortcut = Join-Path ([Environment]::GetFolderPath("Programs")) "KíLín.lnk"
Expand All @@ -85,6 +86,67 @@ jobs:
$spec = [Environment]::GetEnvironmentVariable("KILIN_APP_SPEC", "User")
if (-not (Test-Path -LiteralPath $uv)) { throw "KILIN_APP_UV does not name uv.exe." }
if (-not $spec.EndsWith("[app]")) { throw "KILIN_APP_SPEC is $spec." }
- name: Verify failed same-version reinstall restores the runtime
env:
# Force package resolution to fail without a network outage or a
# test-only switch in the production installer. The wheel alone
# cannot supply its dependencies, and uv may not use its cache.
UV_OFFLINE: "1"
UV_NO_CACHE: "1"
UV_NO_CONFIG: "1"
run: |
$version = (Select-String pyproject.toml -Pattern '^version = "(.*)"$').Matches[0].Groups[1].Value
$runtime = Join-Path $env:LOCALAPPDATA "kilin\runtime\$version"
$backup = "$runtime.rollback"
$probe = Join-Path $runtime "reinstall-probe.txt"
$shortcut = Join-Path ([Environment]::GetFolderPath("Programs")) "KíLín.lnk"
$shortcutHash = (Get-FileHash -LiteralPath $shortcut).Hash
$uv = [Environment]::GetEnvironmentVariable("KILIN_APP_UV", "User")
$spec = [Environment]::GetEnvironmentVariable("KILIN_APP_SPEC", "User")
if ((Test-Path -LiteralPath $probe) -or (Test-Path -LiteralPath $backup)) {
throw "Reinstall probe or rollback directory already exists."
}
Set-Content -LiteralPath $probe -Value "Original installed runtime"
$probeHash = (Get-FileHash -LiteralPath $probe).Hash
$setup = Get-ChildItem dist -Filter "KiLin-Setup-*.exe" | Select-Object -First 1
try {
foreach ($scenario in @("failed", "interrupted")) {
if ($scenario -eq "interrupted") {
# Simulate termination after the backup rename and
# creation of a partial replacement at the final path.
Move-Item -LiteralPath $runtime -Destination $backup
New-Item -ItemType Directory -Path $runtime | Out-Null
Set-Content -LiteralPath (Join-Path $runtime "partial.txt") -Value "Incomplete runtime"
}
$log = "$scenario-reinstall.log"
$process = Start-Process -FilePath $setup.FullName -Wait -PassThru `
-ArgumentList "/VERYSILENT", "/SUPPRESSMSGBOXES", "/NORESTART", "/LOG=$log"
Get-Content -LiteralPath $log -Tail 40
if ($process.ExitCode -eq 0) { throw "Offline reinstall unexpectedly succeeded." }
$details = Get-Content -LiteralPath $log -Raw
if (-not $details.Contains("Preserved previous runtime at") -or
-not $details.Contains("Restored previous runtime at")) {
throw "Setup did not exercise runtime rollback ($scenario)."
}
if (Test-Path -LiteralPath $backup) { throw "Rollback did not restore the backup." }
if (Test-Path -LiteralPath (Join-Path $runtime "partial.txt")) {
throw "Partial replacement survived rollback."
}
if ((Get-FileHash -LiteralPath $probe).Hash -ne $probeHash) {
throw "Failed reinstall changed the original runtime."
}
if ((Get-FileHash -LiteralPath $shortcut).Hash -ne $shortcutHash -or
[Environment]::GetEnvironmentVariable("KILIN_APP_UV", "User") -ne $uv -or
[Environment]::GetEnvironmentVariable("KILIN_APP_SPEC", "User") -ne $spec) {
throw "Failed reinstall changed the shortcut or repair variables."
}
& "$runtime\Scripts\python.exe" -I "$env:GITHUB_WORKSPACE\tests\setup\check_windows_runtime.py" `
"$runtime" "$env:GITHUB_WORKSPACE\pyproject.toml"
if ($LASTEXITCODE -ne 0) { throw "Restored runtime verification failed ($scenario)." }
}
} finally {
if (Test-Path -LiteralPath $probe) { Remove-Item -LiteralPath $probe }
}
- name: Verify user plugin files survive reinstall
run: |
# Hosted runner only: seed a reviewed example in the default user store.
Expand All @@ -102,6 +164,12 @@ jobs:
$process = Start-Process -FilePath $setup.FullName -Wait -PassThru `
-ArgumentList "/VERYSILENT", "/SUPPRESSMSGBOXES", "/LOG=reinstall.log"
if ($process.ExitCode -ne 0) { throw "Reinstall failed with $($process.ExitCode)." }
$version = (Select-String pyproject.toml -Pattern '^version = "(.*)"$').Matches[0].Groups[1].Value
$runtime = Join-Path $env:LOCALAPPDATA "kilin\runtime\$version"
if (Test-Path -LiteralPath "$runtime.rollback") { throw "Reinstall left a rollback directory." }
& "$runtime\Scripts\python.exe" -I "$env:GITHUB_WORKSPACE\tests\setup\check_windows_runtime.py" `
"$runtime" "$env:GITHUB_WORKSPACE\pyproject.toml"
if ($LASTEXITCODE -ne 0) { throw "Reinstalled runtime verification failed." }
if ((Get-FileHash $toolFile).Hash -ne $toolHash -or (Get-FileHash $type).Hash -ne $typeHash) {
throw "Reinstall changed user plugins."
}
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ include docs/PLUGIN_API.md
include docs/PROJECT_TYPE_SCHEMA.md
include docs/PLUGIN_AUTHORING.md
recursive-include examples/plugins *.py *.json *.md

# Development tests require the complete repository checkout.
prune tests
Loading
Loading