jekyll-theme-zer0 1.31.2 → 1.31.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -247,10 +247,17 @@ class RealFS:
247
247
 
248
248
  def detect_slug(source: str) -> str | None:
249
249
  """The evidence slug a generator writes to, read from its source."""
250
- m = re.search(r"\bslug:\s*['\"]([A-Za-z0-9._-]+)['\"]", source)
250
+ # Most specific first. A hand-rolled generator can carry per-CASE `slug:`
251
+ # keys (dangling-aria-controls-evidence.mjs: `slug: 'navbar-toggle-fr-about'`)
252
+ # that are file-name prefixes, not the folder; the folder it writes to wins
253
+ # over those, and an explicit `// slug: '…'` comment wins over both.
254
+ m = re.search(r"//\s*slug:\s*['\"]([A-Za-z0-9._-]+)['\"]", source)
251
255
  if m:
252
256
  return m.group(1)
253
257
  m = re.search(r"test/visual/evidence/([A-Za-z0-9._-]+)", source)
258
+ if m:
259
+ return m.group(1)
260
+ m = re.search(r"\bslug:\s*['\"]([A-Za-z0-9._-]+)['\"]", source)
254
261
  return m.group(1) if m else None
255
262
 
256
263
 
@@ -328,15 +335,23 @@ def make_plan(*, changed: list[str], head_sha: str, head_subject: str,
328
335
  gen = by_slug.get(slug)
329
336
  add(slug, "bespoke" if gen else "generic", gen, why)
330
337
 
338
+ changed_dirs = set(evidence_dirs(changed))
331
339
  for gen in changed_generators:
332
340
  slug = detect_slug(fs.read(gen))
333
341
  if not slug:
334
342
  continue
335
343
  folder = f"{EVIDENCE_ROOT}{slug}"
336
- if not has_proof(fs, folder):
337
- add(slug, "bespoke", gen, "changed generator whose evidence folder has no generated proof")
338
-
339
- if ui and not jobs and not evidence_dirs(changed) and not changed_generators and default_slug:
344
+ if folder in changed_dirs:
345
+ continue # the PR touched this folder too; the loop above decided it
346
+ # The generator was edited but its folder was not: whatever proof sits
347
+ # there was rendered by the OLD generator and proves nothing about this
348
+ # PR. (Before, an existing folder with PNGs scheduled nothing at all.)
349
+ why = ("changed generator whose evidence folder has no generated proof"
350
+ if not has_proof(fs, folder)
351
+ else "changed generator; its committed evidence predates the edit")
352
+ add(slug, "bespoke", gen, why)
353
+
354
+ if ui and not jobs and not changed_dirs and default_slug:
340
355
  add(default_slug, "generic", None, "UI paths changed and the PR ships no evidence at all")
341
356
 
342
357
  snapshots_in_scope = bool(styling)
@@ -457,8 +472,12 @@ def ensure_jekyll(timeout: int) -> bool:
457
472
  # `npm ci` would set off a regeneration whose LiveReload reloads every open
458
473
  # page mid-shot (the pr-evidence.mjs crash on #495). Create it first.
459
474
  Path("node_modules").mkdir(exist_ok=True)
460
- log("Starting Jekyll via docker compose…")
461
- run(["docker", "compose", "up", "-d"], capture=False)
475
+ # LiveReload OFF (#461): update-snapshots.sh refuses, in CI, to shoot
476
+ # against a stack that can reload the page ("[update-snapshots] ERROR:
477
+ # LiveReload is live on the snapshot stack"), and it reuses the stack we
478
+ # start here. docker-compose.yml drops --livereload when this is 0.
479
+ log("Starting Jekyll via docker compose (JEKYLL_LIVERELOAD=0)…")
480
+ run(["docker", "compose", "up", "-d"], capture=False, env={"JEKYLL_LIVERELOAD": "0"})
462
481
  log(f"Waiting up to {timeout}s for {HEAD_URL} (cold bundle install + first build)…")
463
482
  deadline = time.time() + timeout
464
483
  while time.time() < deadline:
@@ -97,7 +97,7 @@ ai_client_model() {
97
97
  if [[ -n "${ZER0_AI_MODEL:-}" ]]; then echo "$ZER0_AI_MODEL"; return 0; fi
98
98
  if [[ -n "${SPEC_AI_MODEL:-}" ]]; then echo "$SPEC_AI_MODEL"; return 0; fi
99
99
  case "$p" in
100
- anthropic) echo "${ANTHROPIC_MODEL:-claude-sonnet-5}" ;;
100
+ anthropic) echo "${ANTHROPIC_MODEL:-claude-sonnet-5-5}" ;;
101
101
  claude-cli) echo "${ANTHROPIC_MODEL:-}" ;; # empty → CLI's own default
102
102
  *) echo "${OPENAI_MODEL:-gpt-4o-mini}" ;;
103
103
  esac
@@ -135,7 +135,7 @@ OAUTH_BETA = "oauth-2025-04-20"
135
135
  # Claude Code OAuth tokens require the FIRST system block to identify as Claude
136
136
  # Code, otherwise the API rejects the call with a misleading `rate_limit_error`.
137
137
  CLAUDE_CODE_SYSTEM_PROMPT = "You are Claude Code, Anthropic's official CLI for Claude."
138
- DEFAULT_CLAUDE_MODEL = "claude-opus-4-8"
138
+ DEFAULT_CLAUDE_MODEL = "claude-opus-5-5"
139
139
  CLAUDE_MAX_TOKENS = 16000 # non-streaming ceiling; SVG banners fit comfortably
140
140
 
141
141
  # Model-name prefix → provider family. Used to ignore a configured/author model
data/scripts/translate.rb CHANGED
@@ -104,7 +104,7 @@ module Zer0Translate
104
104
  "source_lang" => "en",
105
105
  "languages" => [],
106
106
  "provider" => "claude",
107
- "model" => "claude-opus-4-8",
107
+ "model" => "claude-opus-5-5",
108
108
  "max_tokens" => 8192,
109
109
  "max_chunk_chars" => 4000,
110
110
  "max_chunk_segments" => 60,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-zer0
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.31.2
4
+ version: 1.31.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-18 00:00:00.000000000 Z
11
+ date: 2026-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll