OXYGENHUB

Diffusion: flag upstream changes that touch what a game watches c4e432da4bc9

A consumer's .oxymodules watch patterns flag the upstream changes that
touch a matching file: a bump proposal lists them first under "Touches
what you watch", with the files, and marks them in the changelog. Asked
for by Vampire Killer, to know when the X16 frame wait, interrupt or bank
calls change.

refs #148
Author
Andy McCall @andymccall <[email protected]>
When
· 2026-10-13 07:13 UTC
Signature
✔ signed by Andy McCall
Hash
c4e432da4bc94bfb6be107039abe3f6aac1678c279a5395c905022ab9b2b899c
Depends on
42fa95540468 93be9ce4653e 9aaa88b2d9c8 a7e6e8e6094c cc19697f8871 e71583501b1d f01cb865fc60 f677d6270298
Depended on by
f4d6ef418a96 6ae3fa0af4f6 757195ad7a5d
In bookmarks
api-unknown-fields cancel-landed-runs close-proposal-140 diffusion-pin-bookmark draft-ready main oh-comment-body-file proposal-list-fast
In tags
v0.5.0 v0.5.1 v0.5.2 v0.6.0 v0.6.1 v0.7.0 v0.8.0 v0.9.0 v0.9.1 v0.9.11 v0.9.15 v0.9.16 v0.9.19 v0.9.2 v0.9.20 v0.9.21 v0.9.22 v0.9.23 v0.9.24 v0.9.3 v0.9.4 v0.9.5 v0.9.6 v0.9.7 v0.9.8 v0.9.9
Edits
17 atoms, 0 tree operations, 3 files

Browse the tree at this change

modified crates/hub/src/diffusion.rs +91 −17
…
336 unchanged lines
337 337
    db::accounts::create_account(pool, ACCOUNT, "diffusion@localhost", "!", "", false).await.ok()
338 338
}
339 339
340 -
/// The upstream changes a bump brings: in `new` and not in `old`, newest
341 -
/// first, as Markdown lines linking to the upstream's change pages.
342 -
pub async fn changelog(app: &Shared, upstream: &RepoRow, old: Vec<ChangeHash>, new: Vec<ChangeHash>) -> Vec<String> {
343 -
    let Some(name) = RepoName::new(&upstream.owner, &upstream.name) else { return Vec::new() };
340 +
/// Whether `path` matches a `watch` pattern: `*` is any run of characters
341 +
/// within one path segment, `**` any run across segments, `?` one
342 +
/// character; a pattern without a wildcard also matches everything below
343 +
/// it, as a directory would.
344 +
pub fn watched(pattern: &str, path: &str) -> bool {
345 +
    fn m(p: &[u8], s: &[u8]) -> bool {
346 +
        match (p.first(), s.first()) {
347 +
            (None, None) => true,
348 +
            (Some(b'*'), _) if p.get(1) == Some(&b'*') => (0..=s.len()).any(|i| m(&p[2..], &s[i..])),
349 +
            (Some(b'*'), _) => (0..=s.len()).take_while(|&i| i == 0 || s[i - 1] != b'/').any(|i| m(&p[1..], &s[i..])),
350 +
            (Some(b'?'), Some(c)) if *c != b'/' => m(&p[1..], &s[1..]),
351 +
            (Some(a), Some(b)) if a == b => m(&p[1..], &s[1..]),
352 +
            _ => false,
353 +
        }
354 +
    }
355 +
    let p = pattern.trim().trim_matches('/');
356 +
    if p.is_empty() {
357 +
        return false;
358 +
    }
359 +
    m(p.as_bytes(), path.as_bytes()) || (!p.contains(['*', '?']) && path.starts_with(&format!("{p}/")))
360 +
}
361 +
362 +
/// What a bump brings: the upstream changes in `new` and not in `old`,
363 +
/// newest first, as Markdown lines linking to the upstream's change pages,
364 +
/// with those touching a `watch` pattern flagged (and listed again).
365 +
pub struct Changelog {
366 +
    pub lines: Vec<String>,
367 +
    pub watched: Vec<String>,
368 +
}
369 +
370 +
pub async fn changelog(app: &Shared, upstream: &RepoRow, old: Vec<ChangeHash>, new: Vec<ChangeHash>, watch: Vec<String>) -> Changelog {
371 +
    let Some(name) = RepoName::new(&upstream.owner, &upstream.name) else { return Changelog { lines: Vec::new(), watched: Vec::new() } };
344 372
    let linked: std::collections::HashMap<String, String> =
345 373
        db::accounts::identity_accounts(&app.db).await.unwrap_or_default().into_iter().collect();
346 374
    let base = format!("/{}/{}", upstream.owner, upstream.name);
347 375
    app.repos
348 376
        .read(&name, move |r, cache| {
349 377
            let (o, n) = (cache.summary(r, &old)?, cache.summary(r, &new)?);
350 -
            let mut added: Vec<(u64, ChangeHash, String, String)> = Vec::new();
378 +
            let mut added: Vec<(u64, ChangeHash, String, String, Vec<String>)> = Vec::new();
351 379
            for h in n.changes.iter().filter(|c| !o.changes.contains(*c)) {
352 380
                let Ok(c) = r.store().get_change(h) else { continue };
353 381
                let key = c.author.to_hex();
354 382
                let who = linked.get(&key).cloned().unwrap_or_else(|| key[..12].to_string());
355 383
                let first = c.message.lines().next().unwrap_or("").trim().to_string();
356 -
                added.push((c.hlc.wall_ms, *h, first, who));
384 +
                // The watched paths it touches, when the game watches any.
385 +
                let hits: Vec<String> = if watch.is_empty() {
386 +
                    Vec::new()
387 +
                } else {
388 +
                    crate::repos::view::change(r, cache, h)
389 +
                        .map(|d| d.files.into_iter().map(|f| f.path).filter(|p| watch.iter().any(|w| watched(w, p))).collect())
390 +
                        .unwrap_or_default()
391 +
                };
392 +
                added.push((c.hlc.wall_ms, *h, first, who, hits));
357 393
            }
358 394
            added.sort_by_key(|a| std::cmp::Reverse(a.0));
359 -
            Ok(added
360 -
                .into_iter()
361 -
                .map(|(_, h, msg, who)| {
362 -
                    format!("- [`{}`]({base}/change/{}) {} ({who})", &h.to_hex()[..12], h.to_hex(), msg.replace('\n', " "))
395 +
            let line = |h: &ChangeHash, msg: &str, who: &str, flag: bool| {
396 +
                format!(
397 +
                    "- {}[`{}`]({base}/change/{}) {} ({who})",
398 +
                    if flag { "⚑ " } else { "" },
399 +
                    &h.to_hex()[..12],
400 +
                    h.to_hex(),
401 +
                    msg.replace('\n', " ")
402 +
                )
403 +
            };
404 +
            let watched = added
405 +
                .iter()
406 +
                .filter(|a| !a.4.is_empty())
407 +
                .map(|(_, h, msg, who, hits)| {
408 +
                    format!(
409 +
                        "{} — touches {}",
410 +
                        line(h, msg, who, true),
411 +
                        hits.iter().map(|p| format!("`{p}`")).collect::<Vec<_>>().join(", ")
412 +
                    )
363 413
                })
364 -
                .collect())
414 +
                .collect();
415 +
            let lines = added.iter().map(|(_, h, msg, who, hits)| line(h, msg, who, !hits.is_empty())).collect();
416 +
            Ok(Changelog { lines, watched })
365 417
        })
366 418
        .await
367 -
        .unwrap_or_default()
419 +
        .unwrap_or(Changelog { lines: Vec::new(), watched: Vec::new() })
368 420
}
369 421
370 422
/// Why a bump was made, which its proposal says.
…
19 unchanged lines
390 442
    path: &str,
391 443
    upstream: &RepoRow,
392 444
    (from, to): (Vec<ChangeHash>, Vec<ChangeHash>),
393 -
    why: Why,
445 +
    (why, watch): (Why, Vec<String>),
394 446
) -> Option<i64> {
395 447
    use crate::db::proposals as pdb;
396 448
    let bookmark = bump_bookmark(path);
397 449
    let bookmark = bookmark.as_str();
398 450
    let me = account(&app.db).await?;
399 -
    let lines = changelog(app, upstream, from, to.clone()).await;
451 +
    let log = changelog(app, upstream, from, to.clone(), watch.clone()).await;
452 +
    let lines = log.lines;
453 +
    let flagged = if log.watched.is_empty() {
454 +
        String::new()
455 +
    } else {
456 +
        format!(
457 +
            "\n\n**Touches what you watch** ({}):\n\n{}",
458 +
            watch.iter().map(|w| format!("`{w}`")).collect::<Vec<_>>().join(", "),
459 +
            log.watched.join("\n")
460 +
        )
461 +
    };
400 462
    let slug = format!("{}/{}", upstream.owner, upstream.name);
401 463
    let short: Vec<String> = to.iter().map(|h| h.to_hex()[..12].to_string()).collect();
402 464
    let ub = &upstream.default_bookmark;
…
10 unchanged lines
413 475
        String::new()
414 476
    };
415 477
    let body = format!(
416 -
        "Moves the subrepo `{path}` to [{slug}](/{slug})'s `{ub}`, {when} (`{}`). Only the pin changes; this repository's own checks test it.{amber}\n\n**What it brings** ({count}):\n\n{}\n\nOpened and kept up to date by Diffusion (docs/diffusion.md). It never lands by itself.",
478 +
        "Moves the subrepo `{path}` to [{slug}](/{slug})'s `{ub}`, {when} (`{}`). Only the pin changes; this repository's own checks test it.{amber}{flagged}\n\n**What it brings** ({count}):\n\n{}\n\nOpened and kept up to date by Diffusion (docs/diffusion.md). It never lands by itself.",
417 479
        short.join("+"),
418 480
        lines.join("\n")
419 481
    );
…
147 unchanged lines
567 629
            Ok(Bumped::Moved { from, bookmark, heads: bumped, state, .. }) => {
568 630
                // Its pipeline runs as for a push, so the proposal is tested.
569 631
                tokio::spawn(start_runs(app.clone(), consumer.clone(), bookmark, state, bumped));
570 -
                let n = propose(app, &consumer, &target, &path, upstream, (from, heads.clone()), why).await;
632 +
                let n = propose(app, &consumer, &target, &path, upstream, (from, heads.clone()), (why, r.watch.clone())).await;
571 633
                tracing::info!(
572 634
                    "diffusion: {}/{} {path} bumped to {}/{} (proposal {n:?})",
573 635
                    consumer.owner,
…
5 unchanged lines
579 641
            Ok(Bumped::Already { from, to }) => {
580 642
                // Already moved: its proposal's text and labels are brought
581 643
                // up to date all the same.
582 -
                propose(app, &consumer, &target, &path, upstream, (from, to), why).await;
644 +
                propose(app, &consumer, &target, &path, upstream, (from, to), (why, r.watch.clone())).await;
583 645
            }
584 646
            Ok(other) => tracing::info!("diffusion: {}/{} {path}: no bump ({other:?})", consumer.owner, consumer.name),
585 647
            Err(e) => tracing::warn!("diffusion: bump {}/{} {path}: {e}", consumer.owner, consumer.name),
…
186 unchanged lines
772 834
            diffusion: diffusion.into(),
773 835
            ..Default::default()
774 836
        }
837 +
    }
838 +
839 +
    #[test]
840 +
    fn watch_patterns_match_paths() {
841 +
        assert!(watched("src/x16/irq*", "src/x16/irq.s"));
842 +
        assert!(watched("src/x16/irq*", "src/x16/irq_wait.c"));
843 +
        assert!(!watched("src/x16/irq*", "src/x16/sub/irq.s"), "one segment");
844 +
        assert!(watched("src/**/frame*.c", "src/x16/floor/frame_wait.c"));
845 +
        assert!(watched("src/x16", "src/x16/bank.s"), "a directory");
846 +
        assert!(!watched("src/x16", "src/x160/bank.s"));
847 +
        assert!(watched("include/r?m.h", "include/rim.h"));
848 +
        assert!(!watched("", "anything"));
775 849
    }
776 850
777 851
    #[test]
…
20 unchanged lines
modified crates/hub/tests/flow.rs +4 −0
…
3443 unchanged lines
3444 3444
    let app_work = tempfile::tempdir().unwrap();
3445 3445
    let app = client(&format!("{}/andy/app", h.base), app_work.path());
3446 3446
    app.submodule_add(&format!("{}/andy/lib", h.base), "deps/lib", Some("main")).unwrap();
3447 +
    // It watches lib.c: upstream changes touching it are flagged.
3448 +
    let modules = std::fs::read_to_string(app_work.path().join(".oxymodules")).unwrap();
3449 +
    write(app_work.path(), ".oxymodules", &format!("{modules}watch = lib.c\n"));
3447 3450
    app.snapshot("t").unwrap();
3448 3451
    app.commit("app on lib", &[]).unwrap();
3449 3452
    assert!(app.push("origin", false).unwrap().iter().all(|r| r.ok));
…
26 unchanged lines
3476 3479
    }
3477 3480
    let p = found.expect("a bump although the upstream never goes green");
3478 3481
    assert!(p.body.contains("Upstream unverified"), "{}", p.body);
3482 +
    assert!(p.body.contains("Touches what you watch") && p.body.contains("touches `lib.c`") && p.body.contains("⚑"), "{}", p.body);
3479 3483
    let mut labels = Vec::new();
3480 3484
    for _ in 0..100 {
3481 3485
        labels = db::issues::proposal_labels(&h.app.db, p.id).await.unwrap().into_iter().map(|l| l.name).collect::<Vec<String>>();
…
7 unchanged lines
modified docs/spec.md +1 −1
…
514 unchanged lines
515 515
  - its key is the one the runner's token first signed with. The first signed receipt under a token binds that token to its key in `flow_runner_keys`.
516 516
517 517
  Otherwise the job's result still stands, and the run page says why the receipt was not kept. The run page links each kept receipt, with its signer. The change page lists the receipts for the state whose only head is that change. `/{owner}/{name}/receipts/{attest}` downloads a signed receipt for `oxy receipt verify` or `import`.
518 -
- **Architecture** (OxygenFlow spec §11.2–§11.3, oxygenflow#36): a runner reports each image's architecture on its claims (`image_archs`), kept in `flow_images`; a job is offered only to a runner whose architecture matches its sandbox's `arch`, else its image's as known; unknown matches, as before. The queue says which architecture a waiting job asks for. **Images by hash** (oxygenflow#39, Jetstream): `flow rootfs push HASH` sends a rootfs image as the FastCDC chunks the hub lacks (`POST /flow/images/missing`, `PUT /flow/images/chunks/{hash}`, by a token that may write repositories) and then its manifest (`PUT /flow/images/{hash}`), which the hub accepts only when every chunk is held and they make an image with that hash; chunks are kept zstd-compressed under `<data>/images`, shared by every image, and `jet_images` lists what is held. Runners and accounts fetch with `GET /flow/images/{hash}` and `GET /flow/images/chunks/{hash}`. A runner whose claims say `fetches_images` is offered jobs whose image only the hub holds, and fetches it before its preflight. Each claim also carries the runner's `facts` (OxygenFlow spec §11.1, oxygenflow#40): free disk, load, speed score and class, kernel; the hub keeps the latest on the runner, shows them on Admin › Runners and in `GET /runners`. A job's finish carries the most disk and memory it took (`peak_disk_mib`, `peak_memory_mib`, oxygenflow#41); a new job's `need_disk_mib` is the most its last five runs of the same repository and name took, plus a quarter and 64 MiB, and it is offered only to a runner whose claim reports at least that much free disk; the waiting reason says so. **Ranking** (oxygenflow#42): a job that another free runner which polled in the last 10 s would do better (it holds the job's image while the claimant would fetch it, or has a higher speed class) is held from the claimant for up to 15 s, then any runner that fits takes it; each job records why it ran where it did (`placed`: "holds the image, idle, speed 100 (class 3)", with "after N s held for a better runner" when it was), shown on the run page, in the API and by `oh run view`. A run whose jobs pin an image held by neither the hub nor a runner sets a failing `pipeline/images` check on its state (#137), naming the images and how to send them (`flow rootfs push`), so a proposal pinning a new image shows it before it lands; a later run of the state turns it to passed once every image is held. A placement pass every 15 seconds works out why each ready queued job no runner can take waits, from what each online runner offered at its last claim (scope, tier, architecture, image held, labels, memory and CPUs, a recent decline), and shows it on the job (API `waiting`, `oh run view` and `oh run watch`, its panel open on the run page) and in its check's summary, so a proposal says why its check is stuck (#28). **Diffusion** (#148, `docs/diffusion.md`): a push that moves a repository's default bookmark, or the bookmark its work lands on (the most common target of its proposals landed in the last 90 days), records each Oxygen subrepo pin in the new state (`diffusion_pins`: consumer, bookmark, path, the upstream's Oxygen repository id, the pinned heads); a hub that had no index fills it at start. `GET /repos/{owner}/{name}/consumers` lists the consumers the caller may read, each with its pin and how many changes of this repository's default bookmark it lacks (`behind`, null when the pin names changes this repository does not hold), and the overview shows them as Used by. A consumer follows a subrepo's upstream as its `.oxymodules` entry says (`follow = off | green | any`, `land = propose | auto`, `target` naming the bookmark to bump, `watch` listing paths whose upstream changes are flagged), else as its repository setting says (Settings › Diffusion, or `PUT /repos/{owner}/{name}/diffusion {"follow": ...}` by its owners and admins; migration 0058), else as `[diffusion] follow` in hub.toml says (default `off`). A **bump** moves a consumer's pin at a path to a newer upstream state: one change on the target bookmark's heads that replaces only the pin (oxy-core `build_pin_change`), signed with the hub's key, on the bookmark `diffusion/<path>`, which the hub owns and rebuilds on the target each time (a forced update). When the pin has changes the upstream's state lacks (say, from an upstream proposal not landed yet), the bump moves to both, so a consumer never loses changes it relies on; it is skipped when that combination would conflict, when the pin names changes the upstream does not hold, when the pin already holds the state, or when the bump bookmark already moves it there, and the hub logs why. A bump is **proposed** once per bump bookmark, by the hub's `diffusion` account (made on first use, never able to sign in), into the target, labelled `dependencies`, its body the upstream changes the pin lacks (newest first, linking to the upstream's change pages); a later bump edits the same open proposal. It is triggered when a push moves the upstream's default bookmark (for consumers following `any`) or when a run of that bookmark passes (for `green`). Diffusion never lands a proposal. An upstream with no checks of its own (Flow off, or no run ever of its default bookmark) is **unverified**: it never turns green, so its moves also bump consumers following `green`, and those proposals are marked amber with the `upstream unverified` label and a note in the body; a later bump from a passing run removes the label. A bump already in place refreshes its proposal's text and labels. Turning Diffusion on for a consumer (the setting or the API) catches it up at once: it is bumped to each upstream's newest state whose default-bookmark run passed, or to its newest state when it follows every move. **Images page** (#146): Admin › Runners › Images lists every rootfs image a runner holds, the hub keeps, or a job ran on in the last 90 days (from each job's sandbox), newest use first: its size and architecture, where it is (the hub, each runner holding it, each runner fetching it from the swarm now), the repositories whose jobs used it, and who sent it; an image held nowhere is marked. **The swarm** (#144, oxygenflow docs/jetstream.md §8.1): a runner in an image swarm reports its peer address, its site and the BLAKE3 of its TLS certificate with each claim (`swarm`; without a certificate it is not in the swarm), kept in memory and shown on Admin › Runners. `POST /flow/swarm/announce {image, state}` (by a runner; `fetching`, `done` or `stopped`) returns the online runners in its site that hold the image or announced fetching it in the last 45 seconds, each with its certificate's fingerprint, which the fetcher pins its TLS connection to, and a ticket signed with the hub key (JSON naming the runner, its site and an expiry 15 minutes on, hex, then the signature) that peers check against `/.well-known/oxyhub-key` before serving chunks; a runner that has not reported an address is told to add `[runner.swarm]` (409).
518 +
- **Architecture** (OxygenFlow spec §11.2–§11.3, oxygenflow#36): a runner reports each image's architecture on its claims (`image_archs`), kept in `flow_images`; a job is offered only to a runner whose architecture matches its sandbox's `arch`, else its image's as known; unknown matches, as before. The queue says which architecture a waiting job asks for. **Images by hash** (oxygenflow#39, Jetstream): `flow rootfs push HASH` sends a rootfs image as the FastCDC chunks the hub lacks (`POST /flow/images/missing`, `PUT /flow/images/chunks/{hash}`, by a token that may write repositories) and then its manifest (`PUT /flow/images/{hash}`), which the hub accepts only when every chunk is held and they make an image with that hash; chunks are kept zstd-compressed under `<data>/images`, shared by every image, and `jet_images` lists what is held. Runners and accounts fetch with `GET /flow/images/{hash}` and `GET /flow/images/chunks/{hash}`. A runner whose claims say `fetches_images` is offered jobs whose image only the hub holds, and fetches it before its preflight. Each claim also carries the runner's `facts` (OxygenFlow spec §11.1, oxygenflow#40): free disk, load, speed score and class, kernel; the hub keeps the latest on the runner, shows them on Admin › Runners and in `GET /runners`. A job's finish carries the most disk and memory it took (`peak_disk_mib`, `peak_memory_mib`, oxygenflow#41); a new job's `need_disk_mib` is the most its last five runs of the same repository and name took, plus a quarter and 64 MiB, and it is offered only to a runner whose claim reports at least that much free disk; the waiting reason says so. **Ranking** (oxygenflow#42): a job that another free runner which polled in the last 10 s would do better (it holds the job's image while the claimant would fetch it, or has a higher speed class) is held from the claimant for up to 15 s, then any runner that fits takes it; each job records why it ran where it did (`placed`: "holds the image, idle, speed 100 (class 3)", with "after N s held for a better runner" when it was), shown on the run page, in the API and by `oh run view`. A run whose jobs pin an image held by neither the hub nor a runner sets a failing `pipeline/images` check on its state (#137), naming the images and how to send them (`flow rootfs push`), so a proposal pinning a new image shows it before it lands; a later run of the state turns it to passed once every image is held. A placement pass every 15 seconds works out why each ready queued job no runner can take waits, from what each online runner offered at its last claim (scope, tier, architecture, image held, labels, memory and CPUs, a recent decline), and shows it on the job (API `waiting`, `oh run view` and `oh run watch`, its panel open on the run page) and in its check's summary, so a proposal says why its check is stuck (#28). **Diffusion** (#148, `docs/diffusion.md`): a push that moves a repository's default bookmark, or the bookmark its work lands on (the most common target of its proposals landed in the last 90 days), records each Oxygen subrepo pin in the new state (`diffusion_pins`: consumer, bookmark, path, the upstream's Oxygen repository id, the pinned heads); a hub that had no index fills it at start. `GET /repos/{owner}/{name}/consumers` lists the consumers the caller may read, each with its pin and how many changes of this repository's default bookmark it lacks (`behind`, null when the pin names changes this repository does not hold), and the overview shows them as Used by. A consumer follows a subrepo's upstream as its `.oxymodules` entry says (`follow = off | green | any`, `land = propose | auto`, `target` naming the bookmark to bump, `watch` listing paths whose upstream changes are flagged), else as its repository setting says (Settings › Diffusion, or `PUT /repos/{owner}/{name}/diffusion {"follow": ...}` by its owners and admins; migration 0058), else as `[diffusion] follow` in hub.toml says (default `off`). A **bump** moves a consumer's pin at a path to a newer upstream state: one change on the target bookmark's heads that replaces only the pin (oxy-core `build_pin_change`), signed with the hub's key, on the bookmark `diffusion/<path>`, which the hub owns and rebuilds on the target each time (a forced update). When the pin has changes the upstream's state lacks (say, from an upstream proposal not landed yet), the bump moves to both, so a consumer never loses changes it relies on; it is skipped when that combination would conflict, when the pin names changes the upstream does not hold, when the pin already holds the state, or when the bump bookmark already moves it there, and the hub logs why. A bump is **proposed** once per bump bookmark, by the hub's `diffusion` account (made on first use, never able to sign in), into the target, labelled `dependencies`, its body the upstream changes the pin lacks (newest first, linking to the upstream's change pages); a later bump edits the same open proposal. It is triggered when a push moves the upstream's default bookmark (for consumers following `any`) or when a run of that bookmark passes (for `green`). Diffusion never lands a proposal. An upstream with no checks of its own (Flow off, or no run ever of its default bookmark) is **unverified**: it never turns green, so its moves also bump consumers following `green`, and those proposals are marked amber with the `upstream unverified` label and a note in the body; a later bump from a passing run removes the label. A bump already in place refreshes its proposal's text and labels. A consumer's `watch` patterns (`*` within a path segment, `**` across them, `?` one character; a plain path covers everything below it) flag the upstream changes touching a matching file: they are listed first under "Touches what you watch", with the files, and marked ⚑ in the changelog. Turning Diffusion on for a consumer (the setting or the API) catches it up at once: it is bumped to each upstream's newest state whose default-bookmark run passed, or to its newest state when it follows every move. **Images page** (#146): Admin › Runners › Images lists every rootfs image a runner holds, the hub keeps, or a job ran on in the last 90 days (from each job's sandbox), newest use first: its size and architecture, where it is (the hub, each runner holding it, each runner fetching it from the swarm now), the repositories whose jobs used it, and who sent it; an image held nowhere is marked. **The swarm** (#144, oxygenflow docs/jetstream.md §8.1): a runner in an image swarm reports its peer address, its site and the BLAKE3 of its TLS certificate with each claim (`swarm`; without a certificate it is not in the swarm), kept in memory and shown on Admin › Runners. `POST /flow/swarm/announce {image, state}` (by a runner; `fetching`, `done` or `stopped`) returns the online runners in its site that hold the image or announced fetching it in the last 45 seconds, each with its certificate's fingerprint, which the fetcher pins its TLS connection to, and a ticket signed with the hub key (JSON naming the runner, its site and an expiry 15 minutes on, hex, then the signature) that peers check against `/.well-known/oxyhub-key` before serving chunks; a runner that has not reported an address is told to add `[runner.swarm]` (409).
519 519
- **Variables** (oxygenhub#102): Administration, an organisation's settings and a repository's settings each hold `NAME=value` pairs (a name is a letter or `_` then letters, digits and `_`, up to 64, never `FLOW_*`; a value up to 4096 characters; up to 100 per level) under **Variables**, each page showing what it inherits and which inherited names it overrides. A claim carries the repository's effective set as `env`, inner levels overriding outer; Flow puts them in the job's environment under `FLOW_*` and the pipeline's own `env`, so they are part of the receipt. They are not secrets and are shown in full to whoever sees the page; secrets are mounted by Flow (OxygenFlow spec §9), never put in the environment. Changes are audited (`flow.variable.set`, `flow.variable.deleted`); `flow run --var NAME=VALUE` gives a local run the same.
520 520
- **Secrets** (oxygenhub#107; OxygenFlow spec §9): the same three levels hold **Secrets**, named as a pipeline's `secret "name" { mount-path "/run/secrets/…" }` names them (1 to 64 of `A-Z a-z 0-9 . _ -`, a value up to 64 KiB, up to 100 per level), typed once and sealed under `keys/secrets.key`; pages show names, when each was set and where it comes from, never a value. A claim carries only the secrets its job declares, each with its path and value, from the innermost level that sets the name; one no level sets is noted at the top of the job's log and left out, so the job fails on the missing file rather than running with a stand-in. Flow writes each as a file (0400, the job's user's, on an in-memory mount) before the job starts and never puts it in the environment, the receipt or an artifact. Log intake replaces each value, and its base64, with `***` before a record is stored. Changes are audited (`flow.secret.set`, `flow.secret.deleted`), never with the value.
521 521
- **Artifacts** (OxygenFlow spec §5.2): a job may declare artifacts with `output`.
…
231 unchanged lines