Source of www.aienos.com, served from my own hardware
Brought by drakestapleton
About Files History Releases Proposed changes Issues For developers
fix: remove stale AGPL share-card badges and refresh preview metadata
closed 4d8844e72e8ebcef #64 · opened 2026-10-24 14:52 UTC · closed 2026-10-29 19:02 UTC
Imported from GitHub aien-dev/aienos.com#64, by drakestapleton
Base a200ba65b46ebf85a73254766c2d758d0aa4d601 · Head 0dd727e0ea3045579c67c33bbe6d350d3d488a32
drakestapleton wrote on 2026-10-24 14:52 UTC
User reported stale licensing in pasted website links. Live www.aienos.com/og.png still showed AGPL-3.0-or-later while the homepage, canonical licensing page and LICENSE already state Apache-2.0 WITH LLVM-exception. This is a presentation correction, not a license change.
Update the existing shared card generator and regenerate all ten 1200x630 cards with the current license badge.
Fit the longer badge inside existing margins and preserve Arial-compatible headline layout on Linux.
Point JSON-LD license URL to the existing canonical /licensing/ page rather than GNU AGPL.
Use one versioned image URL helper for Open Graph, Twitter and JSON-LD, so new crawls request fresh image bytes.
Add regression checks for license synchronization, badge fit, deterministic rendering and metadata consistency.
PASS: three Python regression tests (also rerun by parent), deterministic repeated generation, exact dimensions, source invariants, independent code review, full-size home and ten-card visual inspection, git diff --check. No legal text, root index.html, logo, page registry, canonical hostname, deployment workflow or visibility changes.
NOT_RUN: cargo test, full Rust site build and integrity verifier (Rust toolchain absent in current workspace). Permission to install the official toolchain in the temporary workspace has been requested; do not report those tests as passing. No live deployment yet. Existing Pages workflow has no PR build; it builds/deploys main.
After authorized merge and successful deployment, verify the live versioned og:image/twitter:image URLs and PNG bytes. Third-party services can still cache an already-created page unfurl until they recrawl; no global cache refresh is claimed.
drakestapleton wrote on 2026-10-29 19:02 UTC
Closing in org cleanup (Drake, 2026-10-29): superseded by commits 7f2393be156234f19ff68f7f03de1ab8b3833276 and 83caab42e25ec79e476e11ecb663870aba1169b4 on main. Reopen if still needed.
Fetch it
A git bundle of the pull request's head, 1063793 bytes.
curl -fsSL https://interplane.io/drakestapleton/aienos.com/patches/4d8844e72e8ebcef .bundle -o 4d8844e72e8ebcef .bundle
git fetch 4d8844e72e8ebcef .bundle refs/pull/64/head
Raw bundle · Diff
Provenance
This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:
github-import 1
aien-dev/aienos.com
64
0dd727e0ea3045579c67c33bbe6d350d3d488a32
{"kind":"github-import","owner":"aien-dev","repo":"aienos.com","number":64,"url":"https://github.com/aien-dev/aienos.com/pull/64","export_sha256":"8ece92e1057e3cbc924084bd6b2aea957f4dbb0d6f03f2b07d3eb99757ab3bdf ","imported_utc":"2026-11-18T16:38:14Z"}
Changes
diff --git a/crates/site-builder/src/seo.rs b/crates/site-builder/src/seo.rs
index 35e0919 ..60571df 100644
--- a/crates/site-builder/src/seo.rs
+++ b/crates/site-builder/src/seo.rs
@@ -30,7 +30,7 @@ pub const AUTHOR: &str = "M. Drake Stapleton";
pub const AUTHOR_URL: &str = "https://www.drakestapleton.com";
pub const AUTHOR_GITHUB: &str = "https://github.com/drakestapleton";
pub const LICENSE_NAME: &str = "Apache-2.0 WITH LLVM-exception";
-pub const LICENSE_URL: &str = "https://www.gnu.org/licenses/agpl-3.0.html";
+pub const LICENSE_URL: &str = "https://www.aienos.com/licensing/";
/// What a page is, for structured data.
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
@@ -535,7 +535,7 @@ fn graph(page: &Emitted, info: &PageInfo, facts: &HeadFacts, has_mirror: bool, c
let url = page.url();
let title = unescape(if facts.og_title.is_empty() { &facts.title } else { &facts.og_title });
let description = unescape(if facts.description.is_empty() { &facts.og_description } else { &facts.description });
- let image = format!("{HOST}{}", info.image);
+ let image = social_image_url(info);
let zh = page.is_zh();
let kind = match info.kind {
Kind::Home | Kind::Page | Kind::Live => "WebPage",
@@ -611,13 +611,18 @@ fn graph(page: &Emitted, info: &PageInfo, facts: &HeadFacts, has_mirror: bool, c
json!({"@context": "https://schema.org", "@graph": nodes})
}
+/// Bump when cards change so preview crawlers fetch the new image bytes.
+fn social_image_url(info: &PageInfo) -> String {
+ format!("{HOST}{}?v=20261024 -apache-llvm", info.image)
+}
+
/// The tags the pass writes into every head.
fn head_block(page: &Emitted, info: &PageInfo, facts: &HeadFacts, has_mirror: bool, ctx: &BuildCtx, dist: &Path) -> String {
let url = page.url();
let title = if facts.og_title.is_empty() { facts.title.clone() } else { facts.og_title.clone() };
let description = if facts.og_description.is_empty() { facts.description.clone() } else { facts.og_description.clone() };
let og_type = if !facts.og_type.is_empty() { facts.og_type.clone() } else { match info.kind { Kind::Article | Kind::Paper => "article".into(), _ => "website".into() } };
- let image = format!("{HOST}{}", info.image);
+ let image = social_image_url(info);
let image_alt = escape(&format!("{SITE_NAME}: {}", info.name));
let locale = if page.is_zh() { "zh_CN" } else { "en_US" };
let mut b = String::new();
@@ -1124,6 +1129,27 @@ pub fn verify(dist: &Path) {
mod tests {
use super::*;
+ #[test]
+ fn social_previews_use_current_license_and_fresh_images() {
+ assert_eq!(LICENSE_NAME, "Apache-2.0 WITH LLVM-exception");
+ assert_eq!(LICENSE_URL, "https://www.aienos.com/licensing/");
+ let ctx = BuildCtx { built: "b".into(), head_committed: "h".into(), ledger_written: "l".into(), facts_generated: "f".into() };
+ for info in PAGES {
+ for lang in ["en", "zh-CN"] {
+ let path = if lang == "en" { info.path.to_string() } else { format!("/zh-CN{}", info.path) };
+ let page = Emitted { path, file: PathBuf::from("x"), lang: lang.into(), lastmod: "2026-10-24T00:00:00Z".into() };
+ let facts = HeadFacts::default();
+ let head = head_block(&page, info, &facts, false, &ctx, Path::new("/nonexistent"));
+ let image = social_image_url(info);
+ assert!(image.ends_with("?v=20261024 -apache-llvm"));
+ assert!(head.contains(&format!("property=\"og:image\" content=\"{image}\"")));
+ assert!(head.contains(&format!("name=\"twitter:image\" content=\"{image}\"")));
+ assert!(head.contains(LICENSE_URL));
+ assert!(!head.contains("gnu.org/licenses/agpl"));
+ }
+ }
+ }
+
#[test]
fn rfc3339_round_trip() {
assert_eq!(rfc3339(0), "1970-01-01T00:00:00Z");
diff --git a/public/og-blog.png b/public/og-blog.png
index 6159e14 ..3faa632 100644
Binary files a/public/og-blog.png and b/public/og-blog.png differ
diff --git a/public/og-discovery.png b/public/og-discovery.png
index d6abe8f ..a86ce35 100644
Binary files a/public/og-discovery.png and b/public/og-discovery.png differ
diff --git a/public/og-evidence.png b/public/og-evidence.png
index c347108 ..681c1cc 100644
Binary files a/public/og-evidence.png and b/public/og-evidence.png differ
diff --git a/public/og-experiments.png b/public/og-experiments.png
index e65b934 ..ca970f6 100644
Binary files a/public/og-experiments.png and b/public/og-experiments.png differ
diff --git a/public/og-machine.png b/public/og-machine.png
index c55281f ..5437354 100644
Binary files a/public/og-machine.png and b/public/og-machine.png differ
diff --git a/public/og-now.png b/public/og-now.png
index d4b19b6 ..699dada 100644
Binary files a/public/og-now.png and b/public/og-now.png differ
diff --git a/public/og-philosophy.png b/public/og-philosophy.png
index 4c55f6c ..4b232f5 100644
Binary files a/public/og-philosophy.png and b/public/og-philosophy.png differ
diff --git a/public/og-research.png b/public/og-research.png
index 21e344d ..8f4bd55 100644
Binary files a/public/og-research.png and b/public/og-research.png differ
diff --git a/public/og-turing.png b/public/og-turing.png
index 54e741b ..9d54ca7 100644
Binary files a/public/og-turing.png and b/public/og-turing.png differ
diff --git a/public/og.png b/public/og.png
index fea7cce ..6930dc4 100644
Binary files a/public/og.png and b/public/og.png differ
diff --git a/scripts/og-cards.py b/scripts/og-cards.py
index ac93ff7 ..70c7f91 100644
--- a/scripts/og-cards.py
+++ b/scripts/og-cards.py
@@ -23,6 +23,19 @@ GREEN = (0, 229, 153)
TEXT = (241, 245, 249)
MUTED = (148, 163, 184)
DIM = (100, 116, 139)
+LICENSE_NAME = "Apache-2.0 WITH LLVM-exception"
+BADGES = ((f"Open source, {LICENSE_NAME}", GREEN),
+ ("Experimental, pre-alpha", (245, 166, 35)),
+ ("Receipts over claims", BLUE))
+
+def badge_font(draw):
+ # Keep the full license identifier and all three badges inside the margins.
+ for size in range(22, 11, -1):
+ candidate = font(MONO, size)
+ width = sum(draw.textlength(label, font=candidate) + 30 for label, _ in BADGES)
+ if width + 16 * (len(BADGES) - 1) <= W - 160:
+ return candidate
+ raise ValueError("Social card badges do not fit")
CARDS = [
# file, kicker, claim (two lines max), sub line, address
@@ -71,15 +84,16 @@ CARDS = [
FONT_DIRS = ["/System/Library/Fonts/Supplemental", "/System/Library/Fonts",
"/usr/share/fonts/truetype/dejavu", "/usr/share/fonts/truetype/liberation"]
def font(names, size):
- for d in FONT_DIRS:
- for n in names:
+ for n in names:
+ for d in FONT_DIRS:
p = os.path.join(d, n)
if os.path.exists(p):
return ImageFont.truetype(p, size)
return ImageFont.load_default(size)
-BOLD = ["Arial Bold.ttf", "DejaVuSans-Bold.ttf", "LiberationSans-Bold.ttf"]
-REG = ["Arial.ttf", "DejaVuSans.ttf", "LiberationSans-Regular.ttf"]
+# Liberation Sans is metrically compatible with Arial; preserve the card layout on Linux.
+BOLD = ["Arial Bold.ttf", "LiberationSans-Bold.ttf", "DejaVuSans-Bold.ttf"]
+REG = ["Arial.ttf", "LiberationSans-Regular.ttf", "DejaVuSans.ttf"]
MONO = ["Menlo.ttc", "DejaVuSansMono.ttf", "LiberationMono-Regular.ttf"]
def glow(base, xy, r, color, alpha):
@@ -135,7 +149,8 @@ def card(file, kicker, claim, sub, address):
y += 38
# Badges along the bottom.
bx = 80
- for label, col in (("Open source, AGPL-3.0-or-later", GREEN), ("Experimental, pre-alpha", (245, 166, 35)), ("Receipts over claims", BLUE)):
+ fm = badge_font(d)
+ for label, col in BADGES:
tw = d.textlength(label, font=fm)
d.rounded_rectangle((bx, 518, bx + tw + 30, 558), radius=6, outline=col, width=1, fill=(14, 18, 25, 255))
d.text((bx + 15, 526), label, font=fm, fill=col)
diff --git a/scripts/test_og_cards.py b/scripts/test_og_cards.py
new file mode 100644
index 0000000 ..d0c6196
--- /dev/null
+++ b/scripts/test_og_cards.py
@@ -0,0 +1,52 @@
+"""Social-card regression checks: python3 -m unittest discover -s scripts -p 'test_og_cards.py'."""
+import importlib.util
+from pathlib import Path
+import tempfile
+import unittest
+
+from PIL import Image, ImageDraw
+
+SPEC = importlib.util.spec_from_file_location("og_cards", Path(__file__).with_name("og-cards.py"))
+cards = importlib.util.module_from_spec(SPEC)
+SPEC.loader.exec_module(cards)
+ROOT = Path(__file__).resolve().parents[1]
+
+
+class SocialCardsTests(unittest.TestCase):
+ def test_license_matches_site_metadata_and_controlling_text(self):
+ seo = (ROOT / "crates/site-builder/src/seo.rs").read_text()
+ self.assertIn(f'LICENSE_NAME: &str = "{cards.LICENSE_NAME}"', seo)
+ self.assertIn("LLVM Exceptions", (ROOT / "LICENSE").read_text())
+ self.assertIn(cards.LICENSE_NAME, (ROOT / "public/licensing/index.html").read_text())
+ self.assertEqual(cards.BADGES[0][0], f"Open source, {cards.LICENSE_NAME}")
+ self.assertNotIn("AGPL", cards.BADGES[0][0])
+
+ def test_badges_fit_inside_card_margins(self):
+ draw = ImageDraw.Draw(Image.new("RGB", (cards.W, cards.H)))
+ font = cards.badge_font(draw)
+ width = sum(draw.textlength(label, font=font) + 30 for label, _ in cards.BADGES)
+ self.assertLessEqual(width + 16 * (len(cards.BADGES) - 1), cards.W - 160)
+
+ def test_all_cards_render_deterministically_at_published_dimensions(self):
+ old_out = cards.OUT
+ try:
+ with tempfile.TemporaryDirectory() as directory:
+ cards.OUT = directory
+ for card in cards.CARDS:
+ with self.subTest(card=card[0]):
+ cards.card(*card)
+ rendered = Path(directory, card[0])
+ first = rendered.read_bytes()
+ cards.card(*card)
+ self.assertEqual(rendered.read_bytes(), first)
+ with Image.open(ROOT / "public" / card[0]) as published:
+ self.assertEqual(published.size, (1200, 630))
+ with Image.open(rendered) as image:
+ self.assertEqual(image.size, (1200, 630))
+ self.assertEqual(image.mode, "RGB")
+ finally:
+ cards.OUT = old_out
+
+
+if __name__ == "__main__":
+ unittest.main()