Skip to content

ci: sweep orphaned chat preview Spaces - #2168

Merged
leehack merged 2 commits into
mainfrom
ci/2160-delete-pr-preview-space
Nov 22, 2026
Merged

leehack merged 2 commits into
mainfrom
ci/2160-delete-pr-preview-space

Conversation

@leehack

@leehack leehack commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #2160

Changelog

N/A: CI-only housekeeping.

Production-readiness scope

  • User-facing scope: Closed PR preview Spaces are reclaimed when event-driven cleanup misses them.
  • Supported platforms/paths: Scheduled and manual GitHub Actions runs on leehack/llamadart main, using HF_TOKEN and read-only GitHub PR lookups.
  • Unsupported or intentionally unavailable paths: Production and other Space IDs are outside the sweep. Missing and open PRs are skipped. A missing preview Space is treated as already removed.
  • Out of scope / follow-ups: None.

Completeness checklist

  • Declared scope is implemented.
  • Unsupported paths are documented.
  • Maintainer instructions are updated. Public API, examples, support matrix, and changelogs are N/A for this CI change.
  • Regression tests distinguish closed, open, missing, and reopened PRs and reject out-of-scope Space IDs.
  • Public capability validation registry is N/A for this CI change.
  • Mocked provider failures verify redaction of raw response text, tokens, and signed URLs.
  • Follow-up work is listed above.

PR type guidance

  • Bugfix PR: The trigger gap and delete-failure evidence are in the summary. GitHub Actions workflow and offline provider coverage are in the matrix.
  • Feature and docs-only guidance: N/A for a CI bugfix with maintainer documentation.

Test Plan

  • dart run tool/prepare_workspace.dart on the clean worktree.
  • python3 tool/ci/check_format.py, dart analyze, and dart run tool/testing/check_platform_boundaries.dart.
  • Targeted VM tooling tests with isolated TMPDIR passed 116 tests, including the Markdown reader inventory.
  • python3 -B -m unittest discover -s test/ci -p 'test_*.py' ran 274 tests with 34 skips. The final preview suite ran 20 tests.
  • Actionlint 1.7.12 passed with the repository's exact concurrency.queue suppression. Unfiltered output reported the known queue diagnostic.
  • Failing-first controls reproduced missing sweep wiring. Removing the queue caused the workflow test to fail. Removing the recheck caused the reopened-PR test to observe a mock deletion.
  • The initial full VM tooling run found one Markdown reader inventory mismatch. The final targeted rerun verified the exemption update and preview tests.
  • Full root VM and Chrome suites: N/A to the workflow execution path. Targeted tooling tests cover job wiring and both provider call paths.
  • coverage-lib: N/A for a CI-only change.
  • Live Hugging Face execution: Mocked by assignment. No live listing, creation, deletion, or workflow dispatch.

Matrix Evidence

Matrix row Scope covered Platform / model / backend Result Evidence / notes
ci-selection PR event gates, empty matrix, shared write group, read-only GitHub permissions, and unchanged close workflow macOS, Dart VM and Python, mocked provider PASS ci_workflow_selection_test.dart, preview_guard_test.dart, hf_space_deploy_test.dart, and markdown_test_suites_test.dart passed 116 tests.
static-format-analyze Dart format, analysis, and web/native import boundaries macOS, pinned Flutter 3.47.1 PASS Repository format helper, analyzer and boundary checker passed.
Sweep regression checks Exact IDs, closed/open/missing/reopened PRs, 404, redaction, and empty output macOS, Python, mocked provider PASS test/ci/test_preview_sweep.py; both mutation controls failed as expected.
high-risk-exact-head-independent-qa Independent review against current main GitHub Actions and mocked provider PASS Fresh-session auditor-deep ACCEPT at eb328e0c. A reopened PR, an unknown PR state and an out-of-scope id each caused zero deletions, and all 3 mutations were caught. Readiness exits 2 locally

Review Notes

  • Independent review status: ACCEPT. One nonblocking P3: a backlog over 256 closed previews exceeds GitHub's 256-job matrix cap. Today's backlog is 0, and the P3 is tracked in 0.20.x audit follow-ups (P3) #2098.
  • CI status / head SHA: 36 passed, 9 skipped on eb328e0c133bb643e34208b3167502534e9fa685.

High-risk regression review

  • Classification: High-risk (regressionPolicy).
  • Implementation task: CI: delete the PR chat preview Space when its PR closes #2160 preview sweep implementation.
  • Independent blocking QA task: Fresh-session auditor-deep audit, ACCEPT
  • Exact head / current base: eb328e0c133bb643e34208b3167502534e9fa685 / d38c50377b17e06d0cd1a90265a93d7963ccc030.
  • Production-branch deletion, bypass, or miswire proof: Removing the concurrency block failed the YAML wiring test. Removing the shared callback invocation caused delete_repo to be called for a reopened PR.
  • Affected-family real-model/artifact evidence: N/A for the GitHub Actions policy change.
  • Explicit unavailable-family or other N/A evidence: Hugging Face operations were mocked under the task's live-operation restriction.
  • Known PR-caused P1 regressions: 0. The independent audit agrees.
  • Unresolved review threads: 0 at creation.

@leehack
leehack marked this pull request as ready for review November 22, 2026 18:11
@leehack
leehack merged commit b6cbf85 into main Nov 22, 2026
47 checks passed
@leehack
leehack deleted the ci/2160-delete-pr-preview-space branch November 22, 2026 18:11
@leehack leehack mentioned this pull request Nov 22, 2026
37 of 50 tasks
@github-actions

Copy link
Copy Markdown
Contributor

Chat app preview removed for leehack/llamadart-chat-pr-2168.

leehack added a commit that referenced this pull request Nov 22, 2026
## Summary

- Prepare core and all three Apple runtime companions at `0.20.6` for
#2149. The release includes capability-gated JS-backed staging for Web
GGUF models and projectors with bridge `v0.1.92` (#2165).
- Refresh current installation snippets and regenerate the chat app,
validation harness, and observability locks. The Apple companions retain
their published core floors and SwiftPM runtime pins.

## Changelog

N/A: Prepares release metadata and generates 0.20.6 notes from merged
changes.

## Production-readiness scope

- **User-facing scope** — Release notes and install guidance for the
core and the llama.cpp, LiteRT-LM, and Stable Diffusion Apple
companions.
- **Supported platforms/paths** — Core pub archive, Flutter Apple
SwiftPM packages, and the docs site. The landed Web change and its
runtime evidence are in #2165.
- **Unsupported or intentionally unavailable paths** — N/A for release
metadata. The Web staging option follows the capability checks
documented in #2165.
- **Out of scope / follow-ups** — #2090 and the Stable Diffusion
`v0.4.0-1` pin are planned for 0.20.7. #2171 tracks the separate browser
driver. #2136, #554, and #1702 remain open. The package owner verifies
pub.dev automated-publishing settings before release approval.

## Completeness checklist

- [x] Bumped the core and companion versions, recorded the release
notes, refreshed install guidance, and regenerated the three consumer
locks.
- [x] Unsupported platform/option changes are N/A for this metadata
diff.
- [x] Kept the current install docs and changelogs aligned with the
candidate. API and support-matrix edits are N/A for this diff.
- [x] Verified the release receipt, companion compatibility, and
rejection of a changed receipt digest.
- [x] Validation coverage registry changes are N/A for this metadata
diff.
- [x] The diff and receipt contain no credentials or private artifact
paths.
- [x] The release follow-ups are linked above.

## PR type guidance

- **Release prep** — Versions, changelogs, install docs, and generated
locks. Feature, bugfix, and docs-only guidance is N/A.

## Test Plan

- [x] Clean `dart run tool/prepare_workspace.dart`, repository format,
`dart analyze`, and platform boundaries with Flutter 3.47.1.
- [x] Root VM and Chrome suites excluding local-only, tooling suite, and
validation coverage inventory. All passed.
- [x] Both version verifier modes, the release candidate rehearsal, live
bridge and native digests, six Apple SwiftPM digests, companion registry
preflight, and three staged companion dry-runs.
- [x] Core archive consumer, docs build and website tests, chat app VM
and targeted Chrome, basic and server examples, and observability.
- [x] Studio core and UI formatting, analysis, VM and targeted Chrome
with Flutter 3.50.0, plus the Studio Android acceptance tooling tests.
- [x] `coverage-lib` is N/A because the diff changes no library
behavior.

## Matrix Evidence

| Matrix row | Scope covered | Platform / model / backend | Result |
Evidence / notes |
| --- | --- | --- | --- | --- |
| `static-format-analyze` | Workspace preparation, format, analysis,
platform boundaries | macOS arm64 / Flutter 3.47.1 | PASS | 1,924 files
formatted with zero changes. Clean analysis and platform boundaries. |
| `root-vm` | VM suite excluding local-only | macOS arm64 / Dart | PASS
| 15,659 passed and 135 skipped in an isolated system temp. |
| `root-chrome` | Chrome suite excluding local-only | macOS / Chrome |
PASS | 5,227 passed and one skipped. |
| Release tooling | Tooling suite and coverage inventory | macOS / Dart
VM | PASS | 2,370 tooling tests passed and 11 skipped. All 15 inventory
tests and 37 targeted companion pin tests passed. The publisher
rehearsal rejected a corrupted receipt digest. |
| `docs-site` | Site build, links, analyzes and tests | macOS / Jaspr |
PASS | 4,592 pages, 64 sitemap entries, no broken internal links, and 31
website tests. |
| `release-doc-version-consistency` | Core and companion versions and
compatibility | macOS / Dart | PASS | Default and strict modes passed
with no pending companion bumps. |
| `webgpu-bridge-tag-consistency` | Bridge pins, live manifest and
release provenance | WebGPU `v0.1.92` | PASS | All 14 pin references
agree. |
| `native-release-digests` | Runtime archive digests | llama.cpp
`v1.0.0-4`, LiteRT-LM `v0.19.1-7`, Stable Diffusion `v0.4.0` | PASS | 12
llama.cpp, eight LiteRT-LM, and 12 Stable Diffusion bundle digests
match. |
| `release-companion-pub-gate` | Package registry, SwiftPM, and staged
publication dry-runs | pub.dev / Apple SwiftPM | PASS | Preflight and
all three staged dry-runs passed. Six SwiftPM digests match. All four
0.20.6 version endpoints returned HTTP 404. |
| `release-representative-smokes` | Core archive and consumer resolution
| macOS / Dart | PASS | 2,037 selected files. The fresh consumer and
packaged basic example resolved and analyzed. |
| `examples-tests` | Chat app, basic, server, observability | macOS /
Dart and Flutter | PASS | Chat app 698 VM and 141 Chrome, basic 51,
server 54, observability seven. |
| Studio packages | Package-local format, analysis, VM and targeted
Chrome | macOS / Flutter 3.50.0 | PASS | Core 314 VM and 18 Chrome. UI
206 VM and nine Chrome. Four Android acceptance tooling tests passed. |
| `android-release-device-pool` | Old and modern arm64 devices | Android
| N/A for prep | No Android runtime, CPU profile, or native pin changes
since 0.20.5. |
| `coverage-lib` | Line coverage | — | N/A | No library behavior changes
in the prep diff. |
| `genkit-release` | Independently versioned adapter | — | N/A | Genkit
is outside this release. |
| `high-risk-exact-head-independent-qa` | Independent blocking review |
`39e4d68a` against `main` `99cb4291` | PASS | Fresh-session
`auditor-deep` ACCEPT. Versions, floors, pins, both changelogs and size
limits checked. The squash rehearsal and the publication trace (core,
then llama.cpp, LiteRT-LM, Stable Diffusion) passed. 4 of 5 verifier
mutations were rejected. The surviving one is an existing P3 limitation,
offset by the source-PR comparison. Readiness exits 2 locally |

## Review Notes

- Independent review ACCEPT at the exact head.
- Head `39e4d68a24690754828222f90e345fd03a33158f`. The labeled [Verify
release prep
run](https://github.com/leehack/llamadart/actions/runs/45080590366/job/137389057874)
passed. The final description update triggers another verification at
the same head and base.

## High-risk regression review

- **Classification** — High-risk / `artifactConsumer`.
- **Implementation task** — #2149, llamadart 0.20.6 release preparation.
- **Independent blocking QA task** — fresh-session `auditor-deep`,
ACCEPT.
- **Exact head / current base** —
`39e4d68a24690754828222f90e345fd03a33158f` /
`99cb4291da4eb304258083ed3fab3a1c61e93006`.
- **Production-branch deletion, bypass, or miswire proof** — N/A for
production code. The local publisher rehearsal accepted the candidate
and rejected a deliberately changed release receipt digest.
- **Affected-family real-model/artifact evidence** — The live default
bridge, native archive and Apple SwiftPM identities match. See #2165 for
Web runtime evidence.
- **Explicit unavailable-family or other N/A evidence** — The prep diff
changes versions, installation guidance, package resolution metadata,
and release notes. The physical Safari/iOS and Montréal follow-ups
remain in #2136 and #554.
- **Known PR-caused P1 regressions** — 0. The independent audit agrees.
- **Unresolved review threads** — 0 at creation.

## Collector ledger

| Source | Disposition | Release note or reason |
| --- | --- | --- |
| #2165 | Included | Added capability-gated JS-backed Web model and
projector staging with bridge v0.1.92. |
| #2150 | N/A | Apple setup guide correction. |
| #2151, #2157 | N/A | Maintainer release tooling and tests. |
| #2152, #2158, #2159 | N/A | Private qualification and test harness
changes. |
| #2161, #2167, #2168, #2170 | N/A | Static deployment and CI
maintenance. |

One included PR, ten N/A, and zero unresolved inputs. The collector
separately recognized the generated 0.20.5 docs cut.

## Release notes review

- 99cb429 Combine the new staging
option and its bridge capability requirement with the WebGPU v0.1.92 pin
announcement.

## Release notes input

Previous-tag: v0.20.5@ee0bfb72da29ad64c12e83683ff0d7590710956e
Through: 99cb429
Input-SHA256:
e4fac36cc031df0d8a382db47b2e0a3a6fcc6ca19bada0aea093201aba1c1247
@leehack leehack mentioned this pull request Nov 24, 2026
15 of 16 tasks
leehack added a commit that referenced this pull request Nov 24, 2026
## Summary

- Check the LiteRT-LM cache canary in all three VM jobs only after
successful seeding, including when a later test fails.
- Limit each orphaned chat preview sweep to the 256 lowest closed PR
numbers so larger backlogs can drain.
- Cover signed URL redaction when the deploy CLI catches a custom
`BaseException`.

Tracks the P3 items in #2098 from #2206, #2168, and #2170.

## Changelog

N/A: Changes repository CI, preview maintenance, and offline regression
tests.

## Production-readiness scope

- **User-facing scope:** None. This changes maintainer CI and orphaned
preview cleanup.
- **Supported platforms/paths:** GitHub Actions Markdown Tests, Linux
VM, macOS and Windows native VM jobs, and the scheduled or manually
dispatched preview sweep on trusted main.
- **Unsupported or intentionally unavailable paths:** The sweep
continues to reject untrusted invocations. Cancelled VM jobs and jobs
that never seeded the canary skip the check.
- **Out of scope / follow-ups:** None for these three tracker items.

## Completeness checklist

- [x] Declared scope is implemented.
- [x] Unsupported paths retain their existing rejection or skip
behavior.
- [x] PR Changelog disposition supplied. Public docs, examples and
support matrices are N/A for maintainer tooling.
- [x] Regression coverage exercises all three tracker items.
- [x] Public capability coverage is N/A for maintainer tooling.
- [x] Offline CLI tests verify that synthetic signed URLs stay out of
the traceback and stdout. The production deploy wrapper is unchanged.
- [x] Follow-ups are recorded above.

## PR type guidance

- **Bugfix PR:** A setup failure could be reported as canary deletion in
the Markdown and Linux VM jobs. All VM jobs now check the seed outcome
directly. A sweep with over 256 closed previews could exceed the matrix
job limit. Discovery now applies the limit after filtering and sorting
numerically.
- **Feature / docs-only PR:** N/A. This is a CI and maintainer tooling
fix.

## Test Plan

- [x] `dart run tool/prepare_workspace.dart` on the clean base.
- [x] `python3 tool/ci/check_format.py`.
- [x] `dart analyze`.
- [x] `dart run tool/testing/check_platform_boundaries.dart`.
- [x] `python3 -m unittest discover -s test/ci -p 'test_*.py'`. 302
discovered, 267 passed, 35 skipped (Linux-only supervisor suite and
optional SDK wheel). Provider calls in the relevant tests were faked.
- [x] `dart test -p vm -j 1
test/unit/tooling/ci_workflow_selection_test.dart` with an isolated temp
directory. 57 passed.
- [x] Failing-first canary and sweep tests. Six mutation checks rejected
all three guard removals, cap removal, lexicographic ordering, and
narrowing the deploy handler to `Exception`.
- [ ] Full VM and Chrome suites delegated to hosted CI. Local validation
is scoped to the affected tooling.
- [x] `coverage-lib` N/A because no library code changed.

## Matrix Evidence

| Matrix row | Scope covered | Platform / model / backend | Result |
Evidence / notes |
| --- | --- | --- | --- | --- |
| `high-risk-exact-head-independent-qa` | Independent blocking review of
exact head and base | GitHub Actions and Python CI tooling | Pending |
Draft until independent review and live CI are complete. |
| `release-metadata-verification` | Core-patch release metadata | N/A |
N/A | No release metadata changed. |
| `structured-output-adversarial`, LiteRT-LM v1 and JSON Schema rows |
Runtime generation and native model contracts | N/A | N/A | No model or
runtime code changed. |

## Review Notes

- Independent review status: Pending coordinator assignment.
- CI status / head SHA: Hosted checks pending at
`cfa88fa572061f11ab42f7cb6171a048b2ea4a76`.

## High-risk regression review

- **Classification:** High-risk (`regressionPolicy`).
- **Implementation task:** P3 in #2098.
- **Independent blocking QA task:** Pending.
- **Exact head / current base:**
`cfa88fa572061f11ab42f7cb6171a048b2ea4a76` /
`3abb5524a1d2324b28f27d9279caa5a0d4fa4c5b`.
- **Production-branch deletion, bypass, or miswire proof:** Each removed
canary guard failed the workflow contract test. Removing the sweep cap
or numeric ordering failed the 260-preview case. Narrowing the deploy
handler failed the subprocess redaction assertion.
- **Affected-family real-model/artifact evidence:** N/A. This changes CI
control flow and preview discovery.
- **Explicit unavailable-family or other N/A evidence:** N/A. Discovery
and deploy coverage use fakes.
- **Known PR-caused P1 regressions:** None observed in implementation
validation. Independent audit pending.
- **Unresolved review threads:** Pending live verification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: delete the PR chat preview Space when its PR closes

1 participant