mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 04:19:52 +00:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9333d272f | ||
|
|
395aaeb4e7 | ||
|
|
efb63a37d4 | ||
|
|
35cdf56e80 | ||
|
|
db3bdb5a5c | ||
|
|
9b20f78a06 | ||
|
|
b39780b421 | ||
|
|
f8f497b578 | ||
|
|
77cec214c0 | ||
|
|
953254a435 |
No files matched your search
@@ -1,102 +0,0 @@
|
||||
name: Agent PR checks
|
||||
|
||||
# Checks pull requests against the task queue: linked claimed task, file
|
||||
# ownership, overlap with other open pull requests, and independent
|
||||
# verification. Runs on the base branch only: pull request code is never checked
|
||||
# out or executed; changed files come from the API. Not yet run on GitHub.
|
||||
#
|
||||
# Advisory: problems are reported as a warning and in the run summary, but the
|
||||
# check does not fail until a live smoke test and the migration of existing
|
||||
# issues are done (docs/coordination/agent-tasks.md). Only a comment starting
|
||||
# with /verified starts the verify job; ordinary comments start nothing.
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, edited]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
check:
|
||||
if: github.event_name == 'pull_request_target'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
pull-requests: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Check pull request
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
PYTHONPATH: scripts
|
||||
run: |
|
||||
set -eu
|
||||
python3 -m agent_queue event --path "$GITHUB_EVENT_PATH" > "$RUNNER_TEMP/event.json"
|
||||
number=$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["number"])' "$RUNNER_TEMP/event.json")
|
||||
python3 -m agent_queue gather --repo "$GH_REPO" --pr "$number" > "$RUNNER_TEMP/state.json"
|
||||
status=0
|
||||
python3 -m agent_queue pr-check --state "$RUNNER_TEMP/state.json" > "$RUNNER_TEMP/result.json" || status=$?
|
||||
{
|
||||
echo '## Agent PR check'
|
||||
echo '```json'
|
||||
cat "$RUNNER_TEMP/result.json"
|
||||
echo '```'
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
# 1 means problems were found: advisory for now. Anything else is a failure of the check itself.
|
||||
if [ "$status" -eq 1 ]; then
|
||||
echo "::warning title=Agent PR check (advisory)::problems found; see the run summary"
|
||||
elif [ "$status" -ne 0 ]; then
|
||||
exit "$status"
|
||||
fi
|
||||
|
||||
verify:
|
||||
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/verified')
|
||||
runs-on: ubuntu-24.04-arm
|
||||
# issues: write posts the reply.
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: read
|
||||
concurrency:
|
||||
group: agent-verify-${{ github.event.issue.number }}
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Record verification and check again
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
PYTHONPATH: scripts
|
||||
run: |
|
||||
set -eu
|
||||
python3 -m agent_queue event --path "$GITHUB_EVENT_PATH" > "$RUNNER_TEMP/event.json"
|
||||
number=$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["number"])' "$RUNNER_TEMP/event.json")
|
||||
python3 -m agent_queue gather --repo "$GH_REPO" --pr "$number" > "$RUNNER_TEMP/state.json"
|
||||
python3 -m agent_queue decide --event "$RUNNER_TEMP/event.json" --state "$RUNNER_TEMP/state.json" > "$RUNNER_TEMP/actions.json"
|
||||
python3 -m agent_queue apply --repo "$GH_REPO" --actions "$RUNNER_TEMP/actions.json"
|
||||
# Check again only after an accepted verification of the current head: refused, stale,
|
||||
# malformed or unauthorized /verified comments get a reply and nothing else.
|
||||
if ! python3 -m agent_queue should-rerun --actions "$RUNNER_TEMP/actions.json"; then exit 0; fi
|
||||
# pull_request_target runs are recorded against the base branch, not the pull request
|
||||
# head, so the earlier check run cannot be found by head SHA. Evaluate the same check here.
|
||||
status=0
|
||||
python3 -m agent_queue pr-check --state "$RUNNER_TEMP/state.json" > "$RUNNER_TEMP/result.json" || status=$?
|
||||
{
|
||||
echo '## Agent PR check after verification'
|
||||
echo '```json'
|
||||
cat "$RUNNER_TEMP/result.json"
|
||||
echo '```'
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
if [ "$status" -eq 1 ]; then
|
||||
echo "::warning title=Agent PR check (advisory)::problems found; see the run summary"
|
||||
elif [ "$status" -ne 0 ]; then
|
||||
exit "$status"
|
||||
fi
|
||||
@@ -10,8 +10,10 @@ Guest execution uses original, purpose-built test programs. Commercial Xbox game
|
||||
remains unsupported.
|
||||
|
||||
### Added
|
||||
- Documented the original Windows workload set and Phase 1 hybrid measurement protocol (#353), including receipt-field sources, percentile definitions, negative controls and independent reproduction requirements. The protocol identifies the unmerged runner candidate and its missing raw traces and measurements; it adds no execution or compatibility claim.
|
||||
- Added the upstream research registry and component reuse matrix (`docs/research/`), a public-documentation review (evidence class D, nothing executed) of CrossOver, Wine, DXMT, DXVK, VKD3D-Proton, MoltenVK, FEX, VIctory, VIctory-macOS and PortWatch. VIctory-family projects are excluded from reuse on provenance grounds. The GitHub project board is not yet configured because the token lacks the `project` scope (#346).
|
||||
- Added hybrid research records: `docs/research/hybrid-backlog-research-2026-11-25.md` (findings and registry candidates, from search summaries) and `docs/research/primary-source-verification-2026-11-25.md` (re-check against CodeWeavers, Apple, DXMT and Wine primary pages). It confirms CrossOver's backend list, finds no public documentation of `CX_GRAPHICS_BACKEND`, and records that two Apple notices on Rosetta's end disagree; D3DMetal's license text and CrossOver's Rosetta and ARM64 plans remain unverified. Eleven issues created from the research were reviewed the same day: #364 and #365 stay in Phase 1, the others are parked and recorded under "Parked ideas" in the roadmap. Rust 1.100.0 (already installed) is the required toolchain; the default `stable` was 1.94.1. Planning only; nothing was installed or run.
|
||||
- Added `docs/research/crossover-licensing.md`, a per-component license and redistribution record for the hybrid direction: CrossOver itself, Wine, DXMT, DXVK, VKD3D-Proton, MoltenVK, Apple's Game Porting Toolkit repository, D3DMetal and Rosetta 2, each with the exact text read or the missing document named, plus an entry in `docs/licenses.md` (#354). Nothing is bundled or redistributed; the D3DMetal text (third-party copy, not confirmed against Apple's) and Rosetta 2 terms remain unverified, and CrossOver 26.3.0's FOSS inventory is unknown. Research only; no code or dependency change.
|
||||
- Added File > Open Executable… with Command-O to the app (#252). It opens the focused window's read-only file importer, the same one as that window's button, and is disabled when no window can present it; each window keeps its own importer, so with several windows only the focused one shows the picker. The chosen file goes through the same inspection path as the button, drag and drop and Finder Open With; nothing is executed. A file-importer failure is now shown in red with the system's description instead of being ignored, a cancelled picker shows nothing, and the message clears on the next selection. `BetterXen --smoke-import-result`, run by `scripts/build-app.sh`, checks cancellation, a shown failure and its clearing; it fails on the previous importer handling. Checked locally on Apple Silicon in the running app (Command-O and the menu item open the picker, cancel shows no error, a second Command-O opens it again, with two windows only the focused one presents it, and with every window closed the menu item is disabled); not yet independently reviewed.
|
||||
- Added `docs/research/texture-formats.md`, an inventory of the texture formats and layouts BetterXen handles (#260). For BC1–BC7, RGBA8 and Depth32Float it separates container recognition, CPU decoding, layout conversion, native Metal upload and readback, translated sampling, the host-side D3D12-shaped API (called from Rust, not wired to guest imports) and guest reachability through imported services, and links each cell's implementing files and tests and each format's exact public specification sections, including the packed BC footprints from #241. It cross-references #208 and #209 instead of opening duplicate tasks, lists console layouts, console descriptors and asset or audio containers as unknowns, and ranks three proposed follow-ups with fixture recipes and owners. Research only; no implementation changed.
|
||||
- Rewrote the README around the six development phases and the first-launchable-application target (#311), with colour-coded Mermaid diagrams (system flow, milestone roadmap, CPU, runtime-service and shader-form charts built from the generated registries), badges, a repository overview, a contributing section and corrected texture-sampling wording. The older X1–X25 capability map is kept in a collapsible section. The diagrams were not render-tested locally.
|
||||
@@ -19,6 +21,7 @@ remains unsupported.
|
||||
- Documented the proposed guest AVX/AVX2 state and decoding contract and specified an original integer fixture with known results and fault controls (#299).
|
||||
|
||||
### Removed
|
||||
- Removed the "Agent PR checks" workflow (`.github/workflows/agent-pr-checks.yml`), its section in `docs/coordination/agent-tasks.md` and the four workflow tests in `tests/agent_queue/test_workflows_cli.py` that only exercised it. Pull requests are no longer checked for `Closes #N`, task file patterns or `/verified` comments; the claims workflow and its tests are unchanged. The agent queue Python tests pass locally (85 tests).
|
||||
- Removed the "PR template" check (`.github/workflows/pr-template.yml`, `scripts/pr_template_check.py` and its tests) and its CI test step. Also removed `.github/PULL_REQUEST_TEMPLATE.md`. Pull request descriptions are no longer validated or pre-filled; CONTRIBUTING.md still asks for the same information and the claim-first rule still applies.
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -53,6 +53,7 @@ checkpoints retain their original evidence scope.
|
||||
|
||||
## Testing, validation, and benchmarks
|
||||
|
||||
- [Hybrid workloads and measurement protocol](testing/hybrid-workloads.md) — Original Windows workload selection, metric definitions, receipt sources and independent reproduction requirements; distinguishes the pending hybrid candidate from merged behavior.
|
||||
- [Migrated pull-request integration review](testing/migration-pr-review.md) — Merge decisions, integration fixes, native verification and excluded concurrent work.
|
||||
- [Testing and acceptance index](testing/README.md) — Entry point for test procedures, evidence and review records.
|
||||
- [AMD RDNA2 desktop GPU (gfx1030) form acceptance](testing/shader-form-acceptance.md) — Independence, command, log and promotion rules for fixture-verified instruction forms.
|
||||
@@ -73,6 +74,7 @@ checkpoints retain their original evidence scope.
|
||||
- [Synthetic integration and upstream evidence](research/synthetic-integration.md) — Audited source snapshots and remaining commercial startup prerequisites.
|
||||
- [Hybrid backlog research record](research/hybrid-backlog-research-2026-11-25.md) — Findings, registry candidates and the issues they produced (2026-11-25); not verified on hardware.
|
||||
- [Primary-source verification](research/primary-source-verification-2026-11-25.md) — Which hybrid-research claims were confirmed, contradicted or left unverified against vendor documentation.
|
||||
- [CrossOver licensing boundaries](research/crossover-licensing.md) — Per-component licenses and redistribution status for the hybrid direction, with the unread documents named.
|
||||
|
||||
## Security, licensing, and contributions
|
||||
|
||||
|
||||
@@ -36,10 +36,9 @@ pending-run replay and exact head-SHA verification against a real repository.
|
||||
|
||||
## Production follow-ups
|
||||
|
||||
1. Keep `agent-pr-checks` advisory until this evidence is reviewed.
|
||||
2. Coordinate adding `pull-requests: read` to the production audit job permissions
|
||||
1. Coordinate adding `pull-requests: read` to the production audit job permissions
|
||||
(same defect as the smoke audit failure).
|
||||
3. Add a second QA-eligible verifier before treating `/verified` as smoke-complete.
|
||||
2. Add a second QA-eligible verifier before treating `/verified` as smoke-complete.
|
||||
|
||||
## Local unit suite
|
||||
|
||||
|
||||
@@ -90,22 +90,6 @@ cycles `agent:invalid` (and restores them when fixed), flags overlapping claims
|
||||
writes a JSON summary to the run summary. `scripts/agent-queue.sh status --json` prints the same
|
||||
machine-readable summary (counts and lists per area, priority and state).
|
||||
|
||||
## Pull request checks
|
||||
|
||||
`agent-pr-checks` fails a pull request when: it has no `Closes #N` for a claimed task; the task is held
|
||||
by someone else; it changes files outside the task's patterns; it changes a file that another open
|
||||
pull request also changes; the claim has lapsed without a push; or no eligible `/verified <current
|
||||
head sha>` exists. The SHA must be the full 40 characters and the only argument: a commit with the
|
||||
same short prefix is cheap to make. After an accepted `/verified` (an eligible verifier, the current
|
||||
head) the verify job evaluates the same check again and writes it to its run summary; the earlier
|
||||
check run is not re-run, since `pull_request_target` runs are recorded against the base branch and
|
||||
cannot be found by the pull request head. Refused, stale, malformed or unauthorized `/verified`
|
||||
comments get a reply and nothing else, and other pull request comments start no job.
|
||||
|
||||
The check is advisory for now: a failure is shown as a warning and in the run summary, and the job
|
||||
still succeeds. It becomes blocking (fail on problems, then a required check) only after a live smoke
|
||||
test on GitHub and the migration of existing issues into the queue.
|
||||
|
||||
## Forks and upstream sync
|
||||
|
||||
Work from a fork, but synchronise against the real upstream (`ranveersoni98/Xenora` in the
|
||||
|
||||
@@ -113,3 +113,21 @@ These packages are resolved only by the isolated fuzz workspace. Use MIT when it
|
||||
| libfuzzer-sys | 0.4.13 | `719e4efb9b8857ebaa782ae59376c8cbb78fed0f` | MIT AND NCSA |
|
||||
| r-efi | 6.0.0 | `7e1b0322d31d625f81a5656096330934f9cd835d` | MIT |
|
||||
| shlex | 2.0.1 | `e82b1411beb7c92871c2c078c9ab415bbcf207ef` | MIT |
|
||||
|
||||
## External hybrid components (not distributed)
|
||||
|
||||
The hybrid direction relies on an externally installed CrossOver. Nothing below is bundled, linked or redistributed by BetterXen, and the licenses are the upstream texts read on 2026-11-25, not the revisions CodeWeavers ships in 26.3.0.
|
||||
|
||||
| Component | License read | Distribution model | Notes |
|
||||
|---|---|---|---|
|
||||
| CrossOver (product) | Proprietary EULA; FOSS components keep their licenses | External install | [EULA](https://www.codeweavers.com/crossover/eula) §2 permits building alternate Wine and does not supersede FOSS licenses; §3 restricts reverse engineering and redistribution. The source page lists Wine, Vkd3d, DXVK and MoltenVK, not DXMT or VKD3D-Proton |
|
||||
| Wine | LGPL-2.1-or-later | External | `either version 2.1 … or any later version` |
|
||||
| DXMT | LGPL-2.1-or-later; releases up to v0.80 were MIT (`LICENSE.OLD`) | External | Copyright 2023-2026 Feifan He for CodeWeavers |
|
||||
| DXVK | zlib | External | Retain the notice if ever distributed |
|
||||
| VKD3D-Proton | LGPL-2.1-or-later | External | Source headers carry the `or later` grant |
|
||||
| MoltenVK | Apache-2.0 | External | Compatible with GPL-3.0, not GPL-2.0; no `NOTICE` file at the pinned revision |
|
||||
| D3DMetal | Unverified: a third-party copy of the 4.0 `License.pdf` was reported; Apple's own copy was not read | User-supplied only; never bundled | The reported terms are non-commercial and no reverse engineering; the Apache-2.0 Game Porting Toolkit repository is not the D3DMetal license |
|
||||
| Rosetta 2 | Unknown; Apple's license text was not read | External OS component | Never redistributed |
|
||||
|
||||
Details, exact sources and the missing documents are in [research/crossover-licensing.md](research/crossover-licensing.md).
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
# CrossOver licensing and redistribution boundaries
|
||||
|
||||
Research note for the hybrid direction. It records what the public license
|
||||
texts say about the components a CrossOver-based BetterXen would rely on, and
|
||||
which documents are still missing. It is not legal advice.
|
||||
|
||||
Reviewed 2026-11-25 against public sources only. No CrossOver installation, no
|
||||
Apple license text and no proprietary component was downloaded for this note.
|
||||
|
||||
## Distribution model
|
||||
|
||||
BetterXen does not bundle, redistribute or modify CrossOver, D3DMetal, Rosetta 2
|
||||
or any of the open-source components listed below. The intended model is an
|
||||
externally installed CrossOver that BetterXen invokes as a separate program, with
|
||||
all third-party components supplied by their own distributors. This note records
|
||||
licenses so that any later decision to ship, link or copy a component has a
|
||||
starting point; it does not approve one.
|
||||
|
||||
## Components
|
||||
|
||||
| Component | Version or revision read | License read | Source | Redistribution in BetterXen | Notes |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| BetterXen | current `main` | GPL-3.0-or-later | [`LICENSE`](../../LICENSE) | The project itself | Compatibility baseline for every row below |
|
||||
| CrossOver (product) | 26.3.0, per CodeWeavers' source page | Proprietary EULA; FOSS components keep their own licenses | [EULA](https://www.codeweavers.com/crossover/eula), [FOSS source page](https://www.codeweavers.com/crossover/source) | Not bundled; externally installed | EULA §2 permits building alternate Wine for use with CrossOver and states that the EULA does not supersede the FOSS licenses; §3 forbids decompiling or reverse engineering and distribution or derivative works except where law or those licenses permit. The source page publishes the 26.3.0 tarball and lists Wine, Vkd3d, DXVK and MoltenVK; it does not list DXMT or VKD3D-Proton. Whether 26.3.0 ships them, and at which revisions, is **unknown** |
|
||||
| Wine | `a79470449d03`, master on 2026-11-25 | LGPL-2.1-or-later | [`LICENSE`](https://raw.githubusercontent.com/wine-mirror/wine/a79470449d03/LICENSE) | Not bundled or linked today | "either version 2.1 of the License, or (at your option) any later version" |
|
||||
| DXMT | `faa73e4a0686`, main on 2026-11-25 | LGPL-2.1-or-later; releases up to v0.80 were MIT | [`LICENSE`](https://raw.githubusercontent.com/3Shain/dxmt/faa73e4a0686/LICENSE), [`LICENSE.OLD`](https://raw.githubusercontent.com/3Shain/dxmt/faa73e4a0686/LICENSE.OLD) | Not bundled or linked today | Copyright 2023–2026 Feifan He for CodeWeavers. `LICENSE.OLD` records MIT for releases up to v0.80, so the licence of a shipped DXMT depends on its version |
|
||||
| DXVK | `57b2a7c1e87b`, master on 2026-11-25 | zlib | [`LICENSE`](https://raw.githubusercontent.com/doitsujin/dxvk/57b2a7c1e87b/LICENSE) | Not bundled or linked today | Permission to use, alter and redistribute freely; the notice must be retained |
|
||||
| VKD3D-Proton | `71cae091b065`, master on 2026-11-25 | LGPL-2.1-or-later | [`COPYING`](https://raw.githubusercontent.com/HansKristian-Work/vkd3d-proton/71cae091b065/COPYING) | Not bundled or linked today | `COPYING` grants "either version 2.1 … or any later version"; the `LICENSE` file is the LGPL 2.1 text |
|
||||
| MoltenVK | `5189f8de86ec`, main on 2026-11-25 | Apache-2.0 | [`LICENSE`](https://raw.githubusercontent.com/KhronosGroup/MoltenVK/5189f8de86ec/LICENSE) | Not bundled or linked today | Compatible with GPL-3.0, not GPL-2.0. There is no `NOTICE` file at this pin, so Apache-2.0 §4(d) does not apply; §4(a)–(c) (license copy, change notices, retained notices) do |
|
||||
| Apple Game Porting Toolkit repository | `main`, read 2026-11-25 | Apache-2.0 | [`LICENSE`](https://raw.githubusercontent.com/apple/game-porting-toolkit/main/LICENSE) | Not bundled | This is the repository's license for its porting resources. It is not the license for the separately distributed D3DMetal framework |
|
||||
| D3DMetal | Game Porting Toolkit 4.0, reported | Unconfirmed: a third-party copy of the 4.0 `License.pdf` was read outside this repository; Apple's own download was not read | Third-party copy: `Sikarugir-App/Sikarugir` at `5446b7d18072`, `D3DMetal/{1.1,2.0,2.1,3.0,4.0}/License.pdf` | User-supplied only; never bundled | Reported (evidence class D, not confirmed against Apple's copy): a personal licence to install, use and test for developing, testing or evaluating games on Apple hardware, distribution solely for non-commercial purposes, no use on non-Apple hardware, Framework and Redistributables not separable, and no reverse engineering (sections 2A, 2C, 2D). The missing document is Apple's own copy in the Game Porting Toolkit download. Do not treat the repository's Apache-2.0 license as D3DMetal's |
|
||||
| Rosetta 2 | macOS feature | Unknown: Apple's applicable software license was not read | [Apple Rosetta documentation](https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment) | External OS component; not bundled | The documentation describes the translation environment; it is not the license grant |
|
||||
|
||||
## Compatibility with GPL-3.0-or-later
|
||||
|
||||
LGPL-2.1-or-later, zlib and Apache-2.0 are generally compatible with a
|
||||
GPL-3.0-or-later work, subject to each license's notice and source-availability
|
||||
conditions. That compatibility matters only if BetterXen links to or copies the
|
||||
component. Invoking an externally installed CrossOver as a separate program does
|
||||
not make its components part of BetterXen's distributed work, and this note does
|
||||
not decide otherwise.
|
||||
|
||||
The CrossOver EULA is recorded above; D3DMetal's own text is not. Neither may be
|
||||
bundled, linked or copied on the strength of this note alone: the product terms
|
||||
are restrictive, and D3DMetal's authoritative licence is still unread.
|
||||
|
||||
GPL-2.0-only components cannot be combined into this GPL-3.0-or-later workspace.
|
||||
A comment on this issue identified MacBox and ScarlettMac as GPL-2.0; they are
|
||||
not part of the component list above and this note does not rely on them.
|
||||
|
||||
## Unknowns and the exact missing documents
|
||||
|
||||
- **CrossOver 26.3.0's FOSS inventory.** The EULA points to Appendix A for the
|
||||
full list, but that list was not included inline on the page read and was not
|
||||
located elsewhere. The source page lists Wine, Vkd3d, DXVK and MoltenVK and
|
||||
does not list DXMT or VKD3D-Proton. Whether 26.3.0 ships DXMT, FEX and
|
||||
VKD3D-Proton, and at which revisions, is unknown.
|
||||
- **D3DMetal license.** It ships with the Game Porting Toolkit download; that
|
||||
download was not made. A third-party copy of the 4.0 `License.pdf` (in
|
||||
`Sikarugir-App/Sikarugir` at `5446b7d18072`) was reported to this issue with a
|
||||
section-level summary, but it is not Apple's copy and stays evidence class D.
|
||||
The `apple/game-porting-toolkit` repository is Apache-2.0 and does not
|
||||
establish the framework's terms. Confirm the summary against Apple's own copy
|
||||
before relying on it; until then D3DMetal is user-supplied and never bundled.
|
||||
- **Rosetta 2 terms.** Apple's license text was not read. Rosetta 2 stays an
|
||||
external macOS component and is never redistributed by BetterXen.
|
||||
- **Exact revisions.** The files above were read at these pins on 2026-11-25:
|
||||
Wine `a79470449d03`, DXMT `faa73e4a0686`, DXVK `57b2a7c1e87b`,
|
||||
VKD3D-Proton `71cae091b065`, MoltenVK `5189f8de86ec`. The revisions CodeWeavers
|
||||
ships in 26.3.0 are still unknown; pin them before any reuse or notice work.
|
||||
- **Linking versus invocation.** Which components, if any, BetterXen would link
|
||||
against rather than invoke is an architecture decision that has not been made
|
||||
here.
|
||||
|
||||
## Sources
|
||||
|
||||
- CodeWeavers, "Free and Open Source Software Code for CrossOver", listing the
|
||||
26.3.0 source tarball and the open-source projects:
|
||||
<https://www.codeweavers.com/crossover/source> (accessed 2026-11-25).
|
||||
- Wine `LICENSE`, wine-mirror/wine at `a79470449d03`, accessed 2026-11-25.
|
||||
- DXMT `LICENSE` and `LICENSE.OLD`, 3Shain/dxmt at `faa73e4a0686`, accessed
|
||||
2026-11-25.
|
||||
- DXVK `LICENSE`, doitsujin/dxvk at `57b2a7c1e87b`, accessed 2026-11-25.
|
||||
- VKD3D-Proton `COPYING`, HansKristian-Work/vkd3d-proton at `71cae091b065`,
|
||||
accessed 2026-11-25.
|
||||
- MoltenVK `LICENSE`, KhronosGroup/MoltenVK at `5189f8de86ec`, and its file list
|
||||
at that pin for the absence of `NOTICE`, accessed 2026-11-25.
|
||||
- CodeWeavers, "CrossOver End User License Agreement", sections 2 and 3:
|
||||
<https://www.codeweavers.com/crossover/eula>, read in a browser 2026-11-25.
|
||||
- D3DMetal third-party copies: `Sikarugir-App/Sikarugir` at `5446b7d18072`,
|
||||
`D3DMetal/{1.1,2.0,2.1,3.0,4.0}/License.pdf`. Not Apple's copy.
|
||||
- Apple Game Porting Toolkit repository `LICENSE`, apple/game-porting-toolkit at
|
||||
`main`, accessed 2026-11-25. Repository license only; it is not the D3DMetal
|
||||
license.
|
||||
- Apple, "About the Rosetta translation environment", accessed 2026-11-25.
|
||||
Documentation only, not the license text.
|
||||
@@ -0,0 +1,262 @@
|
||||
# Hybrid workloads and measurement protocol
|
||||
|
||||
This is the Phase 1 protocol for [issue #353](https://github.com/MacosPorters/betterxen/issues/353).
|
||||
It defines workload selection, measurement boundaries and the evidence a contributor
|
||||
must retain for the [CrossOver baseline task](https://github.com/MacosPorters/betterxen/issues/355).
|
||||
It adds no runner and reports no new Windows or GPU execution results.
|
||||
|
||||
## Implementation checkpoint
|
||||
|
||||
The commands below refer to [PR #384](https://github.com/MacosPorters/betterxen/pull/384),
|
||||
reviewed at commit `566272082a74d8b45fcec37edd00f4f6703df3ab` on 2026-11-25.
|
||||
Its `betterxen-hybrid` command, build script and Windows workloads are not on
|
||||
`main` at this document's base revision. Use a separate checkout of that exact
|
||||
candidate to review the recipe; after it merges, record the actual merged SHA
|
||||
and recheck the command options. A missing command is an unavailable prerequisite.
|
||||
Do not substitute the preserved native benchmark suite for a CrossOver run.
|
||||
|
||||
The implementation links in this document are pinned to that candidate. They
|
||||
describe source inspection, not independent acceptance of the author's recorded
|
||||
M4 results. Those results remain in the candidate's
|
||||
[baseline record](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/docs/research/crossover-baseline-2026-11-25.md).
|
||||
Use the [roadmap](../roadmap.md) for phase completion and
|
||||
[benchmark protocol](benchmarks.md) for the existing native benchmark's separate scope.
|
||||
|
||||
## Selected workloads and provenance
|
||||
|
||||
All four initial workloads are original BetterXen source. Each source below has
|
||||
an `SPDX-License-Identifier: GPL-3.0-or-later` header at the pinned revision.
|
||||
Use the repository [license](../../LICENSE); no external test source, shader,
|
||||
texture, game binary or asset is added by this selection. The C programs use
|
||||
external mingw-w64 headers; the Rust program uses the Rust standard library.
|
||||
Those build dependencies retain their own terms and are not relicensed by the
|
||||
workload headers. The build's exact dependency review belongs to
|
||||
[#364](https://github.com/MacosPorters/betterxen/issues/364) and
|
||||
[#354](https://github.com/MacosPorters/betterxen/issues/354).
|
||||
|
||||
| Workload and source at the candidate | Purpose and expected result | Limits |
|
||||
| --- | --- | --- |
|
||||
| [C self-check](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/workloads/win-selfcheck-c/selfcheck.c) | CRC-32 of `123456789` is `0xCBF43926`; four threads increment a shared counter to 400,000; stdout ends in `PASS`, exit 0. | CPU/runtime smoke check; no GPU work. The thread wait result is not checked separately. |
|
||||
| [Rust self-check](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/workloads/win-selfcheck-rust/src/main.rs) | Four thread-local counters give 1,000, 2,000, 3,000 and 4,000; their total is 10,000; the main thread's counter stays zero; `PASS`, exit 0. | One small threads/TLS case, not general Wine conformance. TLS means thread-local storage. |
|
||||
| [Direct3D 11 clear](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/workloads/d3d11-clear/d3d11_clear.c) | Clear a 64×64 RGBA8 target, read all 4,096 pixels, `PASS`, exit 0. Each channel must be within 0.6 of `(0.25, 0.5, 0.75, 1) × 255`; ideal bytes are `(64,128,191,255)`. | The specified conversion tolerance permits green 127 or 128. No shader, texture sampling or presentation. |
|
||||
| [Direct3D 11 indexed triangle/frame loop](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/workloads/d3d11-frameloop/frameloop.c) | A 640×360 target, one indexed triangle, vertex/pixel shaders and an event-query wait per iteration. First-frame readback checks corner `(0,0,0,255)` and centre `(51,102,204,255)` within the source's tolerance; `PASS frames=N`, exit 0. | Only two pixels of the first frame are checked. HLSL is compiled at runtime with `D3DCompile`, a deviation from #365's requested build-time compilation. No window, swapchain or presented frames. |
|
||||
|
||||
For both graphics programs, `--negative-control` deliberately changes the
|
||||
expected colour: require a mismatch and exit 1, not a missing-device result.
|
||||
Exit 2 with `NO DEVICE` is unsupported/unavailable graphics, never a pass; exit 3
|
||||
is an API failure. Re-derive pixel expectations from geometry and Microsoft's
|
||||
[data conversion rules](https://learn.microsoft.com/en-us/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-data-conversion)
|
||||
before accepting the output. Do not change tolerances after seeing a failure.
|
||||
|
||||
The x86-64 Windows PE builds are the initial execution set. ARM64 Windows builds
|
||||
are a separate admission experiment: record what the installed runtime does,
|
||||
including refusal, without treating it as x86-64 success or assuming every
|
||||
CrossOver release behaves alike. PE denotes Portable Executable, the Windows
|
||||
executable format; it is guest input, not the host executable architecture.
|
||||
|
||||
Texture sampling and compute workloads are still required by
|
||||
[#365](https://github.com/MacosPorters/betterxen/issues/365). Depth, presentation,
|
||||
Direct3D 12 and upstream Wine conformance runs are not established by these four
|
||||
programs. External test candidates need an exact revision and per-file license
|
||||
review before admission; none is selected here.
|
||||
|
||||
## Preparation and correctness run
|
||||
|
||||
Use an Apple Silicon Mac and record its actual chip and memory. The initial
|
||||
reference is an M4 with 24 GiB; another configuration is another observation,
|
||||
not a replacement for that host's acceptance. CrossOver and any required Rosetta
|
||||
installation must already be supplied by the contributor under their own terms.
|
||||
Nothing in this protocol installs, bundles or activates proprietary software.
|
||||
|
||||
1. Record the full candidate SHA, dirty state, Rust/compiler versions, build
|
||||
flags and target. Use native ARM64 host tools; retain `file`, `lipo -archs`
|
||||
and `otool -L` evidence for the tools and executable actually used. A universal
|
||||
tool's ARM64 slice and its Windows output target are different facts.
|
||||
2. Verify the llvm-mingw archive version and checksum against the pinned
|
||||
[toolchain note](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/docs/research/hybrid-toolchain.md).
|
||||
At this checkpoint the build script accepts an unpacked directory and does
|
||||
not enforce the pin. Rebuild twice, retain output hashes and report any
|
||||
directory-dependent differences; do not claim reproducibility from one build.
|
||||
3. Create a disposable, dedicated bottle through CrossOver's UI. Record its
|
||||
template, configuration and name locally. Keep unrelated programs out of it:
|
||||
stopping the runtime can stop every process in that bottle.
|
||||
4. Keep raw evidence under ignored `artifacts/`. Use a new directory per attempt;
|
||||
the candidate overwrites `bench.json` and names individual run JSON by seconds.
|
||||
Record setup, correctness and timing as separate attempts.
|
||||
|
||||
In the checkout containing the candidate implementation, with `LLVM_MINGW_DIR`
|
||||
set to the already verified toolchain directory:
|
||||
|
||||
```sh
|
||||
test -f crates/hybrid/Cargo.toml || exit 1
|
||||
: "${LLVM_MINGW_DIR:?Set the verified llvm-mingw directory}"
|
||||
export CARGO_BUILD_JOBS=2
|
||||
cargo +1.100.0 build --locked --release --target aarch64-apple-darwin -p betterxen-hybrid
|
||||
B=target/aarch64-apple-darwin/release/betterxen-hybrid
|
||||
OUT=artifacts/hybrid-protocol/correctness-01
|
||||
mkdir -p "$OUT"
|
||||
git rev-parse HEAD > "$OUT/candidate.txt"
|
||||
git status --porcelain > "$OUT/dirty.txt"
|
||||
"$B" receipt > "$OUT/receipt.json"
|
||||
scripts/hybrid/build-windows-workloads.sh "$LLVM_MINGW_DIR"
|
||||
shasum -a 256 artifacts/hybrid-workloads/x86_64/*.exe > "$OUT/workload-sha256.txt"
|
||||
|
||||
for p in selfcheck-c selfcheck-rust d3d11-clear d3d11-frameloop; do
|
||||
"$B" run --bottle betterxen-protocol --timeout 60 --expect PASS \
|
||||
--out "$OUT/$p" -- "$PWD/artifacts/hybrid-workloads/x86_64/$p.exe" \
|
||||
> "$OUT/$p.json" || exit 1
|
||||
done
|
||||
|
||||
"$B" run --bottle betterxen-protocol --timeout 60 \
|
||||
--out "$OUT/clear-negative" -- \
|
||||
"$PWD/artifacts/hybrid-workloads/x86_64/d3d11-clear.exe" --negative-control \
|
||||
> "$OUT/clear-negative.json"
|
||||
```
|
||||
|
||||
Create the bottle `betterxen-protocol` before this recipe. For the last command,
|
||||
require runner exit 1 **and** JSON `classification: failed_exit_1`, workload
|
||||
`exit_code: 1` and the pixel-mismatch diagnostic. Also run the triangle negative
|
||||
control with the same option. A runner error, timeout or `no_graphics_device`
|
||||
does not satisfy a negative control. The positive runs need their expected
|
||||
checks, not just a zero supervisor exit or the substring `PASS`.
|
||||
|
||||
At the pinned checkpoint, #384's stop path can leave a workload running because
|
||||
it selects the bottle incorrectly for `wineserver -k`. The correction is in
|
||||
[PR #388](https://github.com/MacosPorters/betterxen/pull/388); inspect the actual
|
||||
revision under test rather than assuming the correction merged. After any timeout
|
||||
or low-memory stop, stop the dedicated bottle in CrossOver and confirm the workload
|
||||
is gone before another run. A classification alone is not proof of cleanup.
|
||||
|
||||
## Receipt and run-record sources
|
||||
|
||||
`receipt` emits `betterxen-hybrid-receipt/0` with `host`, `crossover` and
|
||||
`windows_cross_compilers`. A `run` record (`betterxen-hybrid-run/0`) does **not**
|
||||
embed that host receipt at the pinned revision; keep the sibling `receipt.json`
|
||||
with each attempt. `bench` embeds `host` once. Supplement these records with
|
||||
candidate/workload hashes, build options, source commands and measurement settings;
|
||||
they are not all emitted by the current tool. Do not invent an implemented schema.
|
||||
|
||||
| Fact | Source at this checkpoint | Interpretation and missing data |
|
||||
| --- | --- | --- |
|
||||
| macOS version/build | `sw_vers -productVersion`; `sysctl -n kern.osversion` | Retain both; a marketing version alone is insufficient. |
|
||||
| Chip, memory and CPUs | `sysctl -n machdep.cpu.brand_string`, `hw.memsize`, `hw.logicalcpu`, `hw.perflevel0.physicalcpu`, `hw.perflevel1.physicalcpu` | Bytes for memory; failed or absent keys are unknown. Preserve raw perflevel values; their P/E labels are the collector's interpretation. |
|
||||
| Collector architecture and Rosetta execution probe | `receipt_binary_arch` comes from Rust's build target; `arch -x86_64 /usr/bin/true` supplies `rosetta_executes_x86_64` | The latter deliberately executes a system binary's Intel slice. Failure does not distinguish absence from disabled/unusable translation; it does not establish the Wine process's architecture. |
|
||||
| GPU and Metal description | `system_profiler SPDisplaysDataType -json`, first matching `sppci_model`, `sppci_cores`, `spdisplays_mtlgpufamilysupport` | Inventory strings, not runtime `MTLDevice` capability queries or execution proof. Capability queries not collected are unknown. |
|
||||
| CrossOver build and bundle architecture | `Contents/Info.plist` via `plutil`; `lipo -archs` on `Contents/MacOS/<CFBundleExecutable>` | Record the selected installation; the GUI executable's slices do not establish `wineloader`/`wineserver` architecture. Multiple installations need explicit reconciliation with the runner's first-discovered selection. |
|
||||
| Bottle search/preferences | `defaults read com.codeweavers.CrossOver BottleDir` and `ManagedBottleDirs`; candidate locations and `mdfind` | Unset/unreadable preferences are not proof of no bottles or no installation. |
|
||||
| Windows compiler identity | Resolved compiler path, `--version`, `-dumpmachine`; retain archive hash separately | Inspect native executables before running them. The receipt's probe does not establish the archive pin or inspect every helper. |
|
||||
| Requested/detected backend | CLI selection and `CX_GRAPHICS_BACKEND`; stdout/stderr banners or adapter-name heuristic in `run.rs` | The variable is undocumented for macOS in the reviewed sources (#350). Preserve `unknown` and `inferred` labels; `default` is not proof of a particular backend. |
|
||||
| Run outcome and lifetime | Child status/output; supervisor monotonic clock from spawn through completion/stop | Require correctness diagnostics and expected exit as well as classification. `duration_ms` includes startup and workload time, not isolated startup latency. |
|
||||
|
||||
Field definitions come from the candidate's
|
||||
[host collector](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/crates/hybrid/src/host.rs),
|
||||
[CrossOver discovery](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/crates/hybrid/src/crossover.rs),
|
||||
[CLI](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/crates/hybrid/src/main.rs)
|
||||
and [runner](https://github.com/MacosPorters/betterxen/blob/566272082a74d8b45fcec37edd00f4f6703df3ab/crates/hybrid/src/run.rs).
|
||||
This describes their implementation, not a guarantee that every probe works on
|
||||
every macOS version. Preserve JSON `null` and explain absent fields as unknown;
|
||||
never replace them with zero or a nearby machine's values.
|
||||
|
||||
## Metric definitions and collection limits
|
||||
|
||||
| Metric | Definition / collection | Required qualification |
|
||||
| --- | --- | --- |
|
||||
| Average rate and frame-time percentiles | Positive finite intervals `t[i]` in milliseconds; rate = `1000 × n / sum(t)`. Sort intervals; percentile p is rank `ceil(p × n / 100)`, one-based. Report n, p50, p95, p99, p99.9 and maximum. | The hybrid analyzer uses nearest rank; the preserved native startup benchmark uses interpolation. Do not combine them. Report sample count; a small sample's p99.9 can be its maximum. |
|
||||
| 1% and 0.1% lows | `1000/p99_ms` and `1000/p99.9_ms`, respectively. | These are reciprocal percentiles, not averages of the slowest 1% or 0.1%. Keep that definition in reports. |
|
||||
| Stutters | Count intervals strictly greater than twice p50. | A protocol convention, not a universal perceptual threshold. Intervals equal to twice p50 do not count. |
|
||||
| CPU | Sample `/bin/ps -axo rss=,pcpu=,command=`; sum matched CrossOver/bottle processes and average the samples. | Percent of one core, can exceed 100%. Path matching is heuristic and can include unrelated CrossOver processes. This is not CPU time divided by the run's wall time. Zero samples means unavailable, not zero usage. |
|
||||
| Unified memory / memory pressure | `memory_pressure -Q` free-percentage line; retain starting and minimum observed percent plus poll interval. `ps` provides sampled peak summed resident set size (RSS, KB). | The free-percentage text format is observed, not a stable documented API. System free percentage and process RSS are not total unified/GPU allocation. RSS can double-count shared pages; failed `ps` currently also yields zeros, so do not accept those as measured zero. |
|
||||
| GPU utilization | Not collected by the candidate. | Unknown; do not infer it from FPS, RSS or elapsed time. A future collector must name its source and overhead. |
|
||||
| Startup and shader compilation | Current `duration_ms` covers the whole supervised process. D3D11 HLSL compilation occurs before the loop. | Separate spawn-to-first-result and compile durations are not instrumented. Mark them uncollected; a first run is not necessarily a cold-cache run. |
|
||||
| Thermals | `pmset -g therm` before/after; retain raw warnings and power-source/idle notes (`pmset -g batt`, `uptime`). | No warning is not a temperature reading, proof of no throttling or a sustained-load result. |
|
||||
| Long-duration stability | Predeclare wall-time/iteration budget, timeout, sampling interval and stop conditions; retain every failure, memory trend and repeat. | The tiny triangle is not representative load. Its only pixel readback is at the beginning, so successful exit does not establish correctness of all later frames. |
|
||||
|
||||
The frame loop uses
|
||||
[QueryPerformanceCounter](https://learn.microsoft.com/en-us/windows/win32/api/profileapi/nf-profileapi-queryperformancecounter)
|
||||
around submission and a
|
||||
[GetData event-query wait](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-getdata).
|
||||
It measures CPU-observed offscreen iteration intervals, including wait, loop and
|
||||
logging overhead. It does not measure GPU timestamp duration or displayed FPS.
|
||||
The first interval starts before first submission; after the first readback the
|
||||
clock is reset. Preserve that boundary when describing the series. The busy wait
|
||||
also affects CPU and thermal observations.
|
||||
|
||||
The runner computes statistics from `frame_ms` lines but deletes its full raw
|
||||
stdout/stderr files, retaining only tails without the frame lines in JSON.
|
||||
Consequently its summary alone cannot be independently reanalyzed. Full trace
|
||||
retention, presented-frame capture per backend and capture-overhead measurement
|
||||
remain [#145](https://github.com/MacosPorters/betterxen/issues/145) work. Until they
|
||||
exist, label these runs exploratory offscreen summaries. Do not present them as
|
||||
validated frame-pacing or capture-overhead results.
|
||||
|
||||
## Repetition and analysis check
|
||||
|
||||
Run correctness and both graphics negative controls for each backend before
|
||||
using its timing. Use release builds, AC power, an otherwise idle machine and
|
||||
one GPU job at a time. Record validation variables and toolchain settings;
|
||||
keep correctness with validation enabled separate from timing with it disabled.
|
||||
Reuse the [native protocol's](benchmarks.md#protocol) environment discipline.
|
||||
|
||||
Declare iteration count (for example 2,000), two untimed warm-up processes and
|
||||
five measured processes per backend before starting. Record the exact backend
|
||||
order and reverse/rotate it for a repeated comparison. Do not silently discard
|
||||
failed attempts, outliers, the first interval or additional warm-ups. The
|
||||
candidate does not implement within-process warm-up exclusion; report the full
|
||||
series it actually summarizes. Keep first-run and warmed observations separate
|
||||
without claiming to have cleared any driver cache.
|
||||
|
||||
After correctness passes, a measured block on the candidate can use:
|
||||
|
||||
```sh
|
||||
OUT=artifacts/hybrid-protocol/timing-01
|
||||
mkdir -p "$OUT"
|
||||
MTL_DEBUG_LAYER=0 MTL_SHADER_VALIDATION=0 "$B" bench \
|
||||
--bottle betterxen-protocol --backends d3dmetal,dxmt --repeat 5 \
|
||||
--timeout 60 --min-start-free 50 --min-free 15 --expect PASS --out "$OUT" \
|
||||
-- "$PWD/artifacts/hybrid-workloads/x86_64/d3d11-frameloop.exe" 2000 \
|
||||
> "$OUT/bench-stdout.json"
|
||||
```
|
||||
|
||||
Run the declared warm-ups separately before that block. These backend names are
|
||||
candidates, not promises of availability; retain refusals and unknown identity.
|
||||
Report each process's statistics and the median/range across processes. Do not
|
||||
pool intervals across processes or call a median of p99 values the pooled p99.
|
||||
Do not subtract an assumed capture overhead; it has not been measured.
|
||||
|
||||
Check the analyzer independently with 100 synthetic intervals: 98 at 10 ms,
|
||||
one at 20 ms and one at 100 ms. Their sum is 1,100 ms, mean 11 ms and rate
|
||||
`1000/11` per second. Nearest ranks 50, 95, 99 and 100 give p50=10, p95=10,
|
||||
p99=20 and p99.9=100 ms. The lows are 50 and 10 per second; exactly one
|
||||
interval exceeds twice the median. In the implementation checkout:
|
||||
|
||||
```sh
|
||||
mkdir -p artifacts/hybrid-protocol
|
||||
python3 -c 'print("\n".join(["10"] * 98 + ["20", "100"]))' \
|
||||
> artifacts/hybrid-protocol/known-intervals.txt
|
||||
"$B" frames artifacts/hybrid-protocol/known-intervals.txt
|
||||
```
|
||||
|
||||
This arithmetic is a check of analysis conventions, not Windows/GPU evidence or
|
||||
a new performance measurement. An independent reviewer must re-derive it rather
|
||||
than use the analyzer to generate its own expected answers.
|
||||
|
||||
## Evidence and independent acceptance
|
||||
|
||||
Attach the candidate identity, workload hashes, receipt, settings, command exit
|
||||
statuses, output checks and run records to each local attempt. Classify CPU,
|
||||
graphics readback, runtime admission and timing separately. Record `passed`,
|
||||
failed, unavailable, unsupported and not-run outcomes explicitly. Missing
|
||||
tooling, a skipped test or a timeout cannot establish GPU support.
|
||||
|
||||
Keep source review (class D), local original-fixture execution and independent
|
||||
reproduction distinct under the repository's [claims registry](../claims.toml)
|
||||
and [review records](review-log.md). Do not promote one machine's observation to
|
||||
M1–M5 compatibility, Xbox-hardware verification or game compatibility. A second
|
||||
contributor records their own candidate, hardware, commands and disagreements;
|
||||
the implementer cannot independently accept their result.
|
||||
|
||||
Before posting evidence, review a separate redacted copy: remove personal paths,
|
||||
email addresses, unrelated process data and private bottle/program names, while
|
||||
retaining versions, units, outcomes and hashes needed to understand the run.
|
||||
Use repository-relative paths and a pseudonym. Raw receipts can contain local
|
||||
compiler/application paths and stdout tails; this protocol never uploads them.
|
||||
@@ -15,7 +15,7 @@ def dump(obj, path):
|
||||
|
||||
|
||||
WF = os.path.join(ROOT, ".github", "workflows")
|
||||
QUEUE_WORKFLOWS = ["agent-claims.yml", "agent-pr-checks.yml"]
|
||||
QUEUE_WORKFLOWS = ["agent-claims.yml"]
|
||||
USER_TEXT = re.compile(r"\$\{\{\s*github\.event\.(comment|issue|pull_request)\.(body|title)|github\.head_ref")
|
||||
|
||||
|
||||
@@ -58,11 +58,6 @@ class Workflows(unittest.TestCase):
|
||||
bad = "jobs:\n a:\n steps:\n - run: |\n echo ${{ github.event.comment.body }}\n"
|
||||
self.assertTrue(any(re.search(r"\$\{\{", b) for b in run_blocks(bad)))
|
||||
|
||||
def test_pr_workflow_never_checks_out_pr_code(self):
|
||||
text = self.read("agent-pr-checks.yml")
|
||||
self.assertNotRegex(text, r"github\.event\.pull_request\.head|ref:\s*\$\{\{")
|
||||
self.assertIn("pull_request_target", text)
|
||||
|
||||
def job(self, name, job):
|
||||
"""Text of one job block: from ` <job>:` to the next two-space-indented key."""
|
||||
m = re.search(r"(?ms)^ %s:\n(.*?)(?=^ \S|\Z)" % re.escape(job), self.read(name))
|
||||
@@ -74,9 +69,7 @@ class Workflows(unittest.TestCase):
|
||||
|
||||
def test_only_command_comments_start_runs(self):
|
||||
# Ordinary comments must not start a claim run or a verification re-run.
|
||||
self.assertIn("startsWith(github.event.comment.body, '/verified')", self.job_if("agent-pr-checks.yml", "verify"))
|
||||
self.assertIn("startsWith(github.event.comment.body, '/')", self.job_if("agent-claims.yml", "command"))
|
||||
self.assertNotIn("issue_comment", self.job_if("agent-pr-checks.yml", "check"))
|
||||
|
||||
def test_claim_jobs_share_one_group_and_replay(self):
|
||||
for job in ("command", "audit"):
|
||||
@@ -87,15 +80,6 @@ class Workflows(unittest.TestCase):
|
||||
self.assertIn("--recent-commands", text, job)
|
||||
self.assertNotIn("agent_queue decide", self.job("agent-claims.yml", "command"))
|
||||
|
||||
def test_rerun_needs_an_accepted_verification(self):
|
||||
text = self.job("agent-pr-checks.yml", "verify")
|
||||
self.assertIn('if ! python3 -m agent_queue should-rerun --actions "$RUNNER_TEMP/actions.json"; then exit 0; fi', text)
|
||||
self.assertLess(text.index("agent_queue should-rerun"), text.index("agent_queue pr-check"))
|
||||
# The check is evaluated in this job: pull_request_target runs cannot be found by head SHA.
|
||||
self.assertNotIn("gh run", text)
|
||||
self.assertNotIn("actions: write", text)
|
||||
self.assertIn("::warning title=Agent PR check (advisory)::", text)
|
||||
|
||||
def test_should_rerun_exit_codes(self):
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
p = os.path.join(d, "a.json")
|
||||
@@ -104,19 +88,6 @@ class Workflows(unittest.TestCase):
|
||||
dump(actions, p)
|
||||
self.assertEqual(Cli.run_cli(self, "should-rerun", "--actions", p).returncode, code, actions)
|
||||
|
||||
def test_verify_runs_one_at_a_time_per_pull_request(self):
|
||||
text = self.job("agent-pr-checks.yml", "verify")
|
||||
self.assertRegex(text, r"group: agent-verify-\$\{\{ github\.event\.issue\.number \}\}\n\s+cancel-in-progress: false")
|
||||
|
||||
def test_pr_check_is_advisory(self):
|
||||
# Exit status 1 (problems found) only warns until the live smoke test and issue migration.
|
||||
text = self.job("agent-pr-checks.yml", "check")
|
||||
found = re.search(r'if \[ "\$status" -eq 1 \]; then\n(.*?)\n\s+elif \[ "\$status" -ne 0 \]; then\n\s+exit "\$status"', text, re.S)
|
||||
self.assertIsNotNone(found, text)
|
||||
self.assertIn("::warning title=Agent PR check (advisory)::", found.group(1))
|
||||
self.assertNotIn("exit", found.group(1))
|
||||
self.assertEqual(text.count("exit "), 1)
|
||||
|
||||
def test_actions_pinned_by_sha(self):
|
||||
for name in QUEUE_WORKFLOWS:
|
||||
for use in re.findall(r"uses:\s*(\S+)", self.read(name)):
|
||||
|
||||
Reference in new issue
Block a user