Merge phase/01-sp-theme-restoration — v1.17.1 (v1.18 P1 S&P theme restoration + PPTX automation complete)
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"phase": 0,
|
||||
"stage": "plan",
|
||||
"stage": "complete",
|
||||
"milestone": "v1.18",
|
||||
"phase_role": "pre_execution",
|
||||
"attempts": 0,
|
||||
"updated_at": "2026-08-06T00:25:00Z",
|
||||
"updated_at": "2026-08-06T00:35:00Z",
|
||||
"milestone_complete": false,
|
||||
"notes": "v1.18 PLAN complete. 8 phases, 6 waves, 15 requirements. Sequential execution."
|
||||
"tag": "v1.17.0",
|
||||
"release_id": 522,
|
||||
"notes": "v1.18 P0 complete. 5 pre-execution stages done. Tag v1.17.0, release 522."
|
||||
}
|
||||
@@ -100,9 +100,11 @@ CHROME_PATH=/root/.cache/ms-playwright/chromium-1217/chrome-linux64/chrome \
|
||||
```
|
||||
|
||||
The `--allow-local-files` flag is **required** for PPTX export so the local
|
||||
PNG diagrams are embedded in the file. PPTX files are not committed to the
|
||||
repo (binary, no meaningful diffs) — they are uploaded to the Gitea release
|
||||
as downloadable attachments.
|
||||
PNG diagrams are embedded in the file. As of v1.18 (REQ-228, D-141), PPTX
|
||||
files **are committed to the repo** as first-class binary artifacts (no LFS)
|
||||
and are also attached to the phase's Gitea release via
|
||||
`scripts/attach_release_asset.py`. The render + commit + attach pipeline is
|
||||
automated by `scripts/render_deck.sh`.
|
||||
|
||||
### Step 4 — Talking points (presenter cues)
|
||||
|
||||
|
||||
@@ -6,13 +6,25 @@ size: 16x9
|
||||
header: 'Nova — The No-Humans Infrastructure Platform'
|
||||
footer: 'Act %{page}/5 — v1.17'
|
||||
style: |
|
||||
section { font-size: 0.85em; }
|
||||
h1 { color: #1a1a2e; }
|
||||
h2 { color: #16213e; }
|
||||
table { font-size: 0.75em; }
|
||||
.badge { padding: 2px 8px; border-radius: 3px; font-size: 0.8em; }
|
||||
.badge.planned { background: #fff3cd; color: #856404; }
|
||||
section.title { background: #1a1a2e; color: white; }
|
||||
section {
|
||||
font-family: "Akkurat Pro", "Helvetica Neue", "Arial", sans-serif;
|
||||
font-size: 22px;
|
||||
color: #1B1B1B;
|
||||
}
|
||||
h1 { color: #D6002A; font-size: 34px; margin-bottom: 0.3em; }
|
||||
h2 { color: #D6002A; font-size: 26px; margin-bottom: 0.2em; }
|
||||
section.title { background: #1B1B1B; color: #fff; border-top: 8px solid #D6002A; }
|
||||
section.title h1 { color: #fff; }
|
||||
table { font-size: 18px; width: 100%; }
|
||||
th { background: #F0F0F0; }
|
||||
blockquote { border-left: 4px solid #D6002A; color: #2E2E2E; font-size: 20px; }
|
||||
img { display: block; margin: 0 auto; max-height: 320px; }
|
||||
.badge {
|
||||
display: inline-block; padding: 2px 8px; border-radius: 4px;
|
||||
font-size: 14px; font-weight: 600;
|
||||
}
|
||||
.badge.today { background: #c6f6d5; color: #22543d; }
|
||||
.badge.planned { background: #fef3c7; color: #78350f; }
|
||||
---
|
||||
|
||||
<!-- _class: title -->
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Executable
+80
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env python3
|
||||
"""scripts/attach_release_asset.py — upload a file as a Gitea release attachment.
|
||||
|
||||
REQ-228 (v1.18): PPTX (and any deck artifact) is attached to the phase's
|
||||
Gitea release. Uses the Gitea API:
|
||||
POST /api/v1/repos/{owner}/{repo}/releases/{id}/assets
|
||||
multipart form: name=<filename>, attachment=<file bytes>
|
||||
|
||||
Usage:
|
||||
python3 scripts/attach_release_asset.py <file-path> <release-id>
|
||||
python3 scripts/attach_release_asset.py docs/presentations/nova-no-humans-platform.pptx 522
|
||||
|
||||
Token resolution: reads NOVA_GITEA_TOKEN (or ACDL_GITEA_TOKEN) from .env.secrets
|
||||
/ .env, matching the ship_phase.sh pattern. Never uses shell env tokens.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import urllib.request
|
||||
import urllib.error
|
||||
from pathlib import Path
|
||||
|
||||
GITEA_BASE = "https://git.cloudinit.dev"
|
||||
OWNER = "continuous-intelligence"
|
||||
REPO = "acdl"
|
||||
|
||||
|
||||
def resolve_token() -> str:
|
||||
for fn in (".env.secrets", ".env"):
|
||||
try:
|
||||
for line in Path(fn).read_text().splitlines():
|
||||
if line.startswith("NOVA_GITEA_TOKEN=") or line.startswith("ACDL_GITEA_TOKEN="):
|
||||
return line.split("=", 1)[1].strip()
|
||||
except (FileNotFoundError, PermissionError):
|
||||
continue
|
||||
raise RuntimeError("No Gitea token found in .env.secrets or .env (NOVA_GITEA_TOKEN/ACDL_GITEA_TOKEN)")
|
||||
|
||||
|
||||
def attach_asset(file_path: str, release_id: str) -> dict:
|
||||
token = resolve_token()
|
||||
p = Path(file_path)
|
||||
if not p.is_file():
|
||||
raise FileNotFoundError(f"Asset file not found: {file_path}")
|
||||
|
||||
url = f"{GITEA_BASE}/api/v1/repos/{OWNER}/{REPO}/releases/{release_id}/assets"
|
||||
filename = p.name
|
||||
|
||||
boundary = "----NovaBoundary7MAgYbk"
|
||||
body = (
|
||||
f"--{boundary}\r\n"
|
||||
f'Content-Disposition: form-data; name="name"\r\n\r\n'
|
||||
f"{filename}\r\n"
|
||||
f"--{boundary}\r\n"
|
||||
f'Content-Disposition: form-data; name="attachment"; filename="{filename}"\r\n'
|
||||
f"Content-Type: application/octet-stream\r\n\r\n"
|
||||
).encode() + p.read_bytes() + f"\r\n--{boundary}--\r\n".encode()
|
||||
|
||||
req = urllib.request.Request(
|
||||
url,
|
||||
data=body,
|
||||
headers={
|
||||
"Authorization": f"token {token}",
|
||||
"Content-Type": f"multipart/form-data; boundary={boundary}",
|
||||
},
|
||||
method="POST",
|
||||
)
|
||||
try:
|
||||
resp = urllib.request.urlopen(req, timeout=60)
|
||||
return json.loads(resp.read())
|
||||
except urllib.error.HTTPError as e:
|
||||
err = e.read().decode()[:300]
|
||||
raise RuntimeError(f"HTTP {e.code} attaching {filename} to release {release_id}: {err}") from e
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage: attach_release_asset.py <file-path> <release-id>")
|
||||
sys.exit(1)
|
||||
result = attach_asset(sys.argv[1], sys.argv[2])
|
||||
print(f"Attached: {result.get('name')} → release {sys.argv[2]} (asset id {result.get('id')})")
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
# scripts/render_deck.sh — render a Marp deck to HTML + PPTX, commit both to git.
|
||||
# REQ-228 (v1.18): PPTX is now a first-class committed artifact + release attachment.
|
||||
#
|
||||
# Usage:
|
||||
# bash scripts/render_deck.sh <deck-name>
|
||||
# bash scripts/render_deck.sh nova-no-humans-platform
|
||||
#
|
||||
# Renders:
|
||||
# docs/presentations/<deck-name>-marp.md → docs/presentations/<deck-name>.html (committed)
|
||||
# → docs/presentations/<deck-name>.pptx (committed, binary)
|
||||
#
|
||||
# The PPTX is also attached to the current phase's Gitea release via
|
||||
# scripts/attach_release_asset.py (call separately after ship, or this script
|
||||
# will invoke it if NOVA_GITEA_RELEASE_ID is set).
|
||||
set -euo pipefail
|
||||
|
||||
DECK="${1:?Usage: render_deck.sh <deck-name>}"
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
|
||||
SRC="docs/presentations/${DECK}-marp.md"
|
||||
HTML="docs/presentations/${DECK}.html"
|
||||
PPTX="docs/presentations/${DECK}.pptx"
|
||||
|
||||
if [ ! -f "$SRC" ]; then
|
||||
echo "ERROR: source deck $SRC not found" >&2; exit 1
|
||||
fi
|
||||
|
||||
CHROME=""
|
||||
for c in \
|
||||
/root/.cache/ms-playwright/chromium-1217/chrome-linux64/chrome \
|
||||
/usr/bin/chromium \
|
||||
/usr/bin/chromium-browser \
|
||||
/usr/bin/google-chrome; do
|
||||
if [ -x "$c" ]; then CHROME="$c"; break; fi
|
||||
done
|
||||
if [ -z "$CHROME" ]; then
|
||||
echo "WARNING: no Chrome/Chromium found — skipping render (HTML/PPTX will need manual re-render)" >&2
|
||||
exit 0
|
||||
fi
|
||||
export CHROME_PATH="$CHROME"
|
||||
|
||||
echo "Rendering HTML → $HTML"
|
||||
npx --yes @marp-team/marp-cli@latest --allow-local-files "$SRC" -o "$HTML" 2>&1 | tail -3
|
||||
|
||||
echo "Rendering PPTX → $PPTX"
|
||||
npx --yes @marp-team/marp-cli@latest --allow-local-files "$SRC" -o "$PPTX" 2>&1 | tail -3
|
||||
|
||||
git add "$HTML" "$PPTX"
|
||||
echo "Staged $HTML + $PPTX for commit."
|
||||
|
||||
if [ -n "${NOVA_GITEA_RELEASE_ID:-}" ]; then
|
||||
echo "Attaching PPTX to Gitea release $NOVA_GITEA_RELEASE_ID..."
|
||||
python3 scripts/attach_release_asset.py "$PPTX" "$NOVA_GITEA_RELEASE_ID" || \
|
||||
echo "WARNING: attach failed — PPTX is still committed; attach manually."
|
||||
fi
|
||||
Reference in New Issue
Block a user