Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4107180
fix(ci): restore the verified baseline across the lane's loop-mounted…
ci Nov 23, 2026
53e9d9c
Merge branch 'main' into fix/baseline-cross-filesystem
bodencrouch Nov 23, 2026
730025a
fix(ci): recover the manual-plan-pinned DeadlyStream version from its…
ci Nov 23, 2026
1987027
docs: record the pinned DeadlyStream version recovery boundary
ci Nov 23, 2026
a9bcab5
Merge #122 (cross-filesystem baseline fix) so this PR's lanes reach t…
ci Nov 23, 2026
d3bc4d5
fix(ci): name the exception type when the artifact store index fails
ci Nov 24, 2026
a4c64a8
CI: create one P2P identity per pinned archive version
ci Nov 24, 2026
77f5356
docs: list every CI workflow with its jobs and steps
ci Nov 24, 2026
5b824c9
CI: add a sample download mode and make it the release-candidate default
ci Nov 24, 2026
cdc8710
CI: create P2P identities even when archive acquisition fails
ci Nov 24, 2026
41b54e9
CI: pin the P2P identity of 191 archive versions
ci Nov 24, 2026
94a81be
CI: draw the live sample once per run, not once per game
ci Nov 24, 2026
f639619
CI: create P2P identities before the archive stage trims its cache
ci Nov 24, 2026
192770e
CI: pin the P2P identity of 166 more archive versions
ci Nov 24, 2026
99c57bf
test(ci): run the port tests without the host's secret-named variables
ci Nov 24, 2026
06e9394
fix(ci): recover a pinned DeadlyStream version after a renamed re-upload
ci Nov 24, 2026
8eb1cef
fix: K1 recipe book matches the current draft; two refusals name thei…
ci Nov 24, 2026
6a6a384
CI: pin the P2P identity of the recovered PartySwap 1.5
ci Nov 24, 2026
69916fa
fix: UCO definition comparison recovers a vendor-bound prerequisite
ci Nov 24, 2026
91188b9
fix: UCO definition comparison recovers an archive-method-bound prere…
ci Nov 24, 2026
1dbb309
fix(ci): report refused new pins instead of raising
ci Nov 24, 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
41 changes: 41 additions & 0 deletions .github/workflows/cache-archives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,47 @@ jobs:
python tools/modsync-ci/fullrun_stage.py refresh --guides guide-input --games "$GAMES" \
--cache "$RUNNER_TEMP/mod-cache" --output "$RUNNER_TEMP/archive-evidence" \
--install-profile "$INSTALL_PROFILE" --download-mode "$DOWNLOAD_MODE"
# First P2P test: each pinned version (bytes and name) has one creatable info hash.
# No torrent session, peer or credential is involved; transfer is the separate p2p job.
- name: Create the P2P identity of every pinned archive version
id: p2p-identity
# Also after a failed acquisition: bytes already verified in the object cache keep
# their identity, and one unreachable mod site must not hide every other receipt.
if: ${{ (success() || failure()) && (steps.refresh.outcome == 'success' || steps.refresh.outcome == 'failure') }}
env:
GAMES: ${{ inputs.games }}
run: |
python - <<'PYIDENTITY'
import json,os,sys
from pathlib import Path
sys.path.insert(0,'tools/modsync-ci')
import torrent_identity
games=json.loads(os.environ['GAMES'])
assert isinstance(games,list) and games and all(game in ('k1','k2') for game in games)
root,fixtures=Path(os.environ['RUNNER_TEMP']),Path('tools/modsync-ci/fixtures/ci')
codes=[]
for game in games:
receipt=root/'p2p-identity'/(game+'-p2p-identity.json')
if receipt.is_file() and not receipt.is_symlink():
# Written by the archive stage before it trimmed the object cache.
result=json.loads(receipt.read_text())
print(json.dumps({key:result.get(key) for key in ('status','plan','pinned_archives','counts','problems')},sort_keys=True))
codes.append(0 if result.get('status')=='passed' else 1)
else:
# The stage stopped before that point: use whatever verified bytes remain.
codes.append(torrent_identity.main(['survey','--plan',str(fixtures/(game+'-manual-plan.json')),
'--pins',str(fixtures/(game+'-p2p-identity.json')),'--objects',str(root/'mod-cache'/'objects'),
'--receipt',str(receipt)]))
sys.exit(max(codes))
PYIDENTITY
- name: Upload public P2P identity receipt
if: ${{ (success() || failure()) && steps.p2p-identity.outcome != 'skipped' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: p2p-identity-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/p2p-identity
if-no-files-found: warn
retention-days: 14
- name: Admit only the six verified public objects for auxiliary caching
id: k1-public-ready
if: ${{ inputs.cache_writer && startsWith(github.ref, 'refs/heads/') && steps.refresh.outcome == 'success' && steps.k1-public-key.outputs.applicable == 'true' && steps.k1-public-cache.outputs.cache-hit != 'true' }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/fullrun-p2p.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,28 @@ on:
MODSYNC_SOURCE_TOKEN: {required: false}
permissions: {contents: read}
jobs:
# First test: an info hash can be created for a pinned version, without the binary or a network.
identity:
name: P2P identity (info hash creation)
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Checkout owned CI
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with: {python-version: '3.12'}
- name: Create info hashes for known versions and check every committed pin
working-directory: tools/modsync-ci
run: python -m unittest -v test_torrent_identity
# Second test: real transfer between two isolated devices. No long-lived seeder
# exists yet, so this proves the engine path, not public swarm availability.
isolated-devices:
name: P2P availability (two-device loopback, seeder pending)
needs: identity
runs-on: ubuntu-24.04
timeout-minutes: 60
env: {RUSTUP_TOOLCHAIN: 1.95.0}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/fullrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on:
options: [minimal, full, exhaustive]
default: minimal
download_mode:
description: Cache-first, or try every download and fall back to valid cached versions
description: Cache-first, sample (one random mod per run live, the rest cached), or refresh (try every download)
type: choice
options: [cache-first, refresh]
options: [cache-first, sample, refresh]
default: cache-first
counterpart_sha:
description: Exact mod-builds guide commit; empty uses the reviewed .github/fullrun.json pin
Expand Down Expand Up @@ -56,7 +56,7 @@ env:
FULLRUN_DEFAULTS: >-
{"push":"quick","pull_request":"full","workflow_dispatch":"minimal",
"release_candidate":"exhaustive","default_download_mode":"cache-first",
"release_download_mode":"refresh","release_target_branches":["main","master"],
"release_download_mode":"sample","release_target_branches":["main","master"],
"release_branch_prefixes":["release/","release-please--"],"release_labels":["release","release-candidate"]}
permissions: {contents: read, actions: read}
concurrency:
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
uses: ./.github/workflows/fullrun-lane.yml
with:
install_profile: ${{ needs.plan.outputs.install_profile }}
# The archive producer exercises refresh once; consumers reuse its verified cache.
# The archive producer does every live download once; consumers reuse its verified cache.
# Standalone install dispatches still honor the requested downloader mode.
download_mode: ${{ needs.plan.outputs.operation == 'full' && 'cache-first' || needs.plan.outputs.download_mode }}
engine_repository: ${{ needs.plan.outputs.engine_repository }}
Expand Down
152 changes: 152 additions & 0 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,158 @@ placeholders survive conversion but still fail Rust execution. This does not clo
F01/F05, full validation or complete format/action parity. Five production gates
pass and53 frozen entries remain unchanged; no Rust tests were run.

## K1 recipe book matches the current draft again; two refusals name their cause, 2026-11-24 UTC

Engine data and two error messages; no behaviour of a successful install changed. No
Rust tests were run.

K1 install lanes stopped at `guide_selection` with `Component differs from exact reviewed
recipe context` for Stunbaton HD and Zaalbar HD. The guide and the archives were
unchanged. The recipe book `src/archive_generation/reviewed_manual_k1.json` still
embedded the options that the draft produced before negated recommendations stopped
becoming options (the "recommend against" entry below): two for Stunbaton HD, one for
Zaalbar HD. Those options carried no instructions, dependencies or restrictions and no
plan step referred to them. Recipes 32 and 41 now hold the components the engine drafts
today, with their digests, and the book hash and the master data hash that pin them were
updated in `reviewed_manual.rs`, `reviewed_master.rs`, `reviewed_master/uco.rs`,
`reviewed_master_k1.json` and `tools/modsync-ci/ports.py`.

Proof boundary. With the built CLI, all 66 recipes' raw and canonical input components
equal the engine's current output for the compiled K1 guide, and every embedded digest
matches. The archive-bound path that raised the refusal needs the mod archives and was
not run locally; the next K1 install lane is the proof.

Two refusals now carry what a reviewer needs. `UCO prerequisite differs from its complete
compiled original definition` names the prerequisite's GUID and name and the top-level
fields that differ. `Selected namespace has unclassified inactive sections` lists the
orphaned sections the patcher reported; K1 Taris Rapid Transit hits it and has no
classification yet, which is not fixed here.

The first refusal then named its cause in run 45329233118: The Sith Lords Restored
Content Mod (`bee5a72b`), differing in `Instructions` and `VendorInstallerBinding`. The
vendor installer binding rewrites that component, and the UCO definition comparison knew
how to recover the original from three other generators but not from this one.
`vendor_installer::declared_original_definition` now returns the binding's stored input
component, admitted only while it still equals the reviewed context, and the comparison
uses it. As with the other three, this is a definition comparison only and never proof
that the installer ran. Checked locally: the stored input equals the engine's draft of
that component from the compiled K2 guide in every field but the loader form of
`Language`, which the run did not report as differing. Run 45337846523 (commit
`69916fa`) confirmed it: the comparison passed that component and four more and stopped
at the next one.

That next one is Maintenance Officer Realistic Reskin (`a2072211`), differing in
`ArchiveMethodBinding` and `Instructions`: the same gap for the archive method binding.
`resolved::declared_original_definition` now restores the method-only component that
binding was made from (instructions, options and the binding receipt removed), admitted
only if the result is method-only again, and the comparison uses it. The refusal now
lists every differing prerequisite at once instead of the first. Whether any of the
remaining seven prerequisites differs is shown by the next K2 lane.

## CI archive cache recovers a pinned version after a renamed re-upload, 2026-11-24 UTC

Python CI tooling only. The pinned-version recovery of 2026-11-23 was keyed by archive
file name, so an author who re-uploaded under a new name slipped past it: DeadlyStream
`544-partyswap` now serves `PartySwap 1.6.1.7z`, the K2 plan pins `PartySwap 1.5.7z`,
and the new bytes were stored as an ordinary update. `cache.renamed_plan_pin` now links
an unpinned DeadlyStream file name on a single-file page to a plan pin when the two
names are equal once version numbers and extension are ignored, that pin is the only
such candidate, and its bytes are not already in the cache. The version history is then
walked as before and a match is stored under the pinned name.

Because the link by name is a guess, a pin that is not in the history does not fail the
item: the current upload is kept as before, a warning is printed and the entry records
`pin_not_in_history` with every hashed version. Multi-file pages, direct links, other
providers and cached objects that are never re-downloaded are unchanged; the last is why
`Heyorange_s_Sith Uniform_Reformation_Revised.zip`, whose reviewed `.7z` revision is
served from the artifact store, is not recovered by this. Covered by
`test_cache_version_history.py` (16 tests, offline HTML fixtures). Live proof: in run
45329233118 (commit `8eb1cef`) the archive stage hashed `PartySwap 1.6.1.7z` and
`PartySwap 1.6.7z`, found the pinned bytes as the third version and restored them as
`PartySwap 1.5.7z`.

## CI release candidates download one drawn mod per run live, 2026-11-24 UTC

Python CI tooling and workflow policy only; no Rust source changed and no Rust tests
were run. A third download mode, `sample`, joins `cache-first` and `refresh`. The archive
stage draws exactly one archive source per run, across all requested games, from the
run id and attempt (`fullrun_stage.sample_draw`; policy-skipped helpers are never
drawn), restores that one source with `--download-mode refresh`, then restores every
source from the verified cache. The stage fails unless the drawn source's report shows a real provider attempt.
Release candidates now default to `sample` instead of `refresh`; `refresh` remains
selectable and still satisfies the release gate, `cache-first` still does not.

This narrows a proof boundary on purpose. A release-candidate run no longer shows that
every provider was attempted, only the one drawn source, so a broken download for
any other mod is found when its turn is drawn or when a `refresh` run is requested.
In exchange a run no longer asks DeadlyStream and Nexus for every archive. A provider
attempt that ends in a verified cache fallback still counts as an attempt, as it did for
`refresh`. Covered by `test_fullrun_sample.py` (13 tests, three of them for the identity receipts); run 45303323274
showed the earlier one-per-game form downloading its drawn sources live; the one-per-run
form is proven by its first run.

## CI creates one P2P identity per pinned archive version, 2026-11-24 UTC

Python CI tooling only; no Rust source changed and no Rust tests were run. A pinned
version is its archive bytes (`archive_sha256`) plus its file name, and
`tools/modsync-ci/torrent_identity.py` derives the BitTorrent v1 info hash and magnet
for that pair with the rules of `src/p2p.rs::rebuild_single_info` (one file, 2 MiB
pieces, the pinned creator's extra empty checksum on an exact piece boundary). The same
bytes under the same name always give the same info hash; another name is another
torrent, which is why every pinned magnet must state its name (`dn`).

P2P now has two separate CI tests:

1. Identity. `test_torrent_identity.py` (12 tests) recreates five info hashes that the
production CLI reported as `rebuilt` for the same bytes and names
(`torrent-seed --authored-magnet` with a wrong hash, checked on 2026-11-24, including
files of exactly one and two pieces), checks that all 200 K1 and 159 K2 pinned file
names are valid torrent names, and validates the pin files
`tools/modsync-ci/fixtures/ci/{k1,k2}-p2p-identity.json`. The archive stage then
creates the identity of every pinned version whose verified bytes are in its object
cache and uploads a public `p2p-identity` receipt. A version whose identity cannot be
created, or differs from its pin, fails that stage; an existing pin is never replaced.
2. Transfer. The two-device loopback (`p2p_loopback.py`) is unchanged in what it
transfers and additionally requires the pinned torrent creator to mint the same info
hash as `torrent_identity.py` for its fixture.

Pinned: 199 of 200 K1 and all 159 K2 versions. Run 45303323274 (commit `cdc8710`)
gave the first 106 and 85; the rest had no bytes left because the identity step ran
after the stage had trimmed its object cache to the 2.5 GiB bound. The stage now creates
the identities itself, just before that trim (`fullrun_stage.p2p_identities`), and the
workflow step reads those receipts. Run 45322164517 (commit `f639619`) then gave 93 and
73 more. Each of the first 191 pins was recreated on two later runners (runs
45312276943 and 45322164517) and matched every time. K2 `PartySwap 1.5.7z` followed in
run 45329233118, once the renamed re-upload was recovered (entry above); that run also
recreated all 357 earlier pins and each matched. Still unpinned, with no verified bytes
in any run: K1 `Heyorange_s_Sith Uniform_Reformation_Revised.zip`, whose page now serves
a reviewed `.7z` revision from the artifact store. In run 45303323274
the second test passed, so the torrent creator minted the info hash that
`torrent_identity.py` computed for the loopback fixture.

Limits. The pins live beside the manual plans because the plan parser rejects unknown
keys. No long-lived seeder exists, so neither test shows that a pinned version can be
fetched from a public swarm. ModSync itself still accepts a magnet without a name and
falls back to the local file name; the name requirement is enforced for CI pins only.

## CI archive refresh recovers the manual-plan-pinned DeadlyStream version, 2026-11-23 UTC

The CI archive cache (`tools/modsync-ci/cache.py`, Python CI tooling only; the Rust
downloader is unchanged) now holds DeadlyStream downloads to the manual plans'
`archive_sha256` pins (`tools/modsync-ci/fixtures/ci/{k1,k2}-manual-plan.json`). Authors
re-upload files: K1 Twi'lek Male NPC Diversity moved to v1.2 on 2026-11-18, the refresh
stored the new bytes as a normal update, and every install lane then stopped at
`observe_k1_bound_model` with `source_program_archive_identity_changed`. A download whose
file name the plans pin to other bytes now walks the page's version history
(`?changelog=<id>` → `?do=download&version=<id>`), hashes each past version, records
every hash in the entry's `version_history`, and keeps the first that matches, stored
under the pinned name. No match fails the item with `pinned-version-not-in-history`; the
unpinned bytes are never stored, and a cached object that contradicts a pin no longer
counts as a cache hit or a fallback. File names without a plan pin behave as before.
An unreadable or malformed plan stops the run. Covered by
`test_cache_version_history.py` (12 tests, offline HTML fixtures); the live changelog
markup was confirmed on the Twi'lek page, and the first CI refresh is the live proof.

## DeadlyStream pages with loose files or non-ASCII file names, 2026-11-14 UTC

A DeadlyStream page that offers an archive beside a loose file now plans only its
Expand Down
6 changes: 6 additions & 0 deletions docs/ci-fullruns.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ The stage workflows are reusable **inside this repository**. The operator entry

The required `p2p` stage uses two private Linux network namespaces connected only to each other, with separate filesystem views, home directories and caches. Production ModSync authors the torrent, seeds on device 1 and downloads on device 2. The proof checks exact payload bytes, SHA-256 and the actual sender upload counter. A fresh receiver must reject a wrong SHA-256 after a real transfer. Device 2 then seeds its downloaded archive back to a fresh device-1 workspace after the original is moved outside both views. Tracker/proxy-list acquisition is disabled and the devices have no Internet route. The bounded public receipt records isolation, transfer outcomes and cleanup.

### Download modes

`cache-first` reuses verified cached archives. `sample` downloads exactly one archive source per run live, drawn across the requested games from the run id and attempt, and takes the rest from the verified cache; it is the release-candidate default. `refresh` attempts every provider and falls back to verified cache. Live downloads happen once, in the `archives` stage; on a full run the install lanes read its cache.

P2P is checked by two separate tests. The first, identity, needs no binary and no network: the `p2p` stage's `P2P identity (info hash creation)` job runs `test_torrent_identity.py`, and the `archives` stage creates the info hash of every pinned archive version it holds verified bytes for (`torrent_identity.py survey`), compares it with `tools/modsync-ci/fixtures/ci/{k1,k2}-p2p-identity.json` and uploads a public `p2p-identity` receipt. To pin new versions, copy the `created-unpinned` entries from that receipt into the pin file, or run `survey --write-pins` against a verified object cache; an existing pin is never replaced. The second test is the two-device transfer above, shown as `P2P availability (two-device loopback, seeder pending)` because no long-lived seeder exists yet; it runs only after the identity job passes.

The legacy operation named `seed` is an optional staged archive-store import. Its S3/rclone credentials belong only to that import; ModSync peer seeding runs in the required `p2p` stage without those credentials. The two-device proof requires Linux namespace provisioning and fails when isolation cannot be established.

## Configuration and credentials
Expand Down
Loading
Loading