diff --git a/skills/aaif-create-chapter/SKILL.md b/skills/aaif-create-chapter/SKILL.md index 7c3a1e3..6850430 100644 --- a/skills/aaif-create-chapter/SKILL.md +++ b/skills/aaif-create-chapter/SKILL.md @@ -129,7 +129,7 @@ Run these in order. Nothing is created without `--write`. - [ ] **4. Verify** (below). A run is not finished until this passes. - [ ] **5. Hand off.** Report the new folder URL. A new chapter is not on the website until **`aaif-sync-chapters`** writes its feed row — that engine - also enforces the 100-chapter cap, which `create_chapter` only warns about. + also enforces the chapter cap, which `create_chapter` only warns about. ### Recovering a failed or partial run — `--resume` @@ -222,9 +222,9 @@ template or the rebrand engine is broken. Fix that — don't resume. python3 /scripts/render_web_banner.py --write python3 /scripts/render_web_banner.py --chapter --create --write ``` -- **`create_chapter` writes no Chapters List row**, so its 100-chapter cap check - is an early warning, not a guarantee: three runs at 99 live chapters each read - 99, each pass, and the next sync refuses all three rows together. +- **`create_chapter` writes no Chapters List row**, so its chapter cap check + is an early warning, not a guarantee: three runs one short of the cap each read + the same count, each pass, and the next sync refuses all three rows together. - **The template must stay "clean"**: `San Francisco` contiguous (no run or paragraph splits) and the slug normalized to `aaif-sanfrancisco`. - **The map-marker fill is shared state.** `create_chapter.GREEN` is `--spec-3` diff --git a/skills/aaif-create-chapter/scripts/create_chapter.py b/skills/aaif-create-chapter/scripts/create_chapter.py index 56448ae..77220a6 100755 --- a/skills/aaif-create-chapter/scripts/create_chapter.py +++ b/skills/aaif-create-chapter/scripts/create_chapter.py @@ -26,7 +26,7 @@ """ import argparse, fnmatch, html, json, math, os, re, shutil, sys, tempfile, time, unicodedata, urllib.error, urllib.parse, urllib.request, zipfile -# The 100-chapter cap is defined ONCE, in aaif-sync-chapters. A chapter comes +# The chapter cap is defined ONCE, in aaif-sync-chapters. A chapter comes # into existence in two places — the Drive folder this script makes and the feed # row that engine appends — and a second copy of the number here would let the # two disagree, which means a half-made chapter whose other half is refused. diff --git a/skills/aaif-create-chapter/scripts/test_create_chapter.py b/skills/aaif-create-chapter/scripts/test_create_chapter.py index 2176211..d270499 100644 --- a/skills/aaif-create-chapter/scripts/test_create_chapter.py +++ b/skills/aaif-create-chapter/scripts/test_create_chapter.py @@ -721,12 +721,12 @@ def test_resume_matches_original_name_subfolder_and_renames(self): class TestMainGuards(unittest.TestCase): """Argument checks in main(), the plan-by-default / tempdir contract of a - --write run, and which invocations consult the 100-chapter cap.""" + --write run, and which invocations consult the chapter cap.""" def run_main(self, argv, clone=None, cap_calls=None, banner=None): """Drive main() with every external call stubbed. - `assert_under_cap` joined that list when the 100-chapter cap landed: it + `assert_under_cap` joined that list when the chapter cap landed: it reads the live chapters tab through the `gws` CLI, so leaving it real made this suite hit the network on a developer machine and fail outright on CI, where `gws` is not installed. `cap_calls` collects the `what` diff --git a/skills/aaif-sync-chapters/references/chapter-cap.md b/skills/aaif-sync-chapters/references/chapter-cap.md index 555e787..3970096 100644 --- a/skills/aaif-sync-chapters/references/chapter-cap.md +++ b/skills/aaif-sync-chapters/references/chapter-cap.md @@ -1,4 +1,4 @@ -# The 100-chapter cap and the chapters-tab `Status` column +# The chapter cap and the chapters-tab `Status` column > Load this when a new chapter row is refused, when deciding whether to retire a > chapter, or before setting a `Status` value by hand. `chapter_health.py` is the @@ -32,13 +32,13 @@ version. Blank counting as live is deliberate: the alternative lets the estate grow past the cap simply by nobody filling the column in. -`CHAPTER_CAP = 100` counts **rows on the chapters tab**, and the feed row is the -only thing that moves that count — so this engine's new-row path is the real -chokepoint. `create_chapter.py` checks the same cap before building a Drive -folder, but that check is an early warning, not a guarantee: creating a folder -adds no row, so three `create_chapter --write` runs at 99 live chapters each -read 99, each pass, and each build a folder, and the next sync refuses all three -rows together. Closing that properly means `create_chapter` claiming its row as +`CHAPTER_CAP` (100 from 2026-09-18, 125 since 2026-11-12) counts **rows on the +chapters tab**, and the feed row is the only thing that moves that count — so +this engine's new-row path is the real chokepoint. `create_chapter.py` checks +the same cap before building a Drive folder, but that check is an early warning, +not a guarantee: creating a folder adds no row, so three `create_chapter +--write` runs one short of the cap each read the same count, each pass, and each +build a folder, and the next sync refuses all three rows together. Closing that properly means `create_chapter` claiming its row as it creates the folder, which it does not do yet. The number is defined once, in `sync_chapters.py`, and `create_chapter.py` imports it; `census_of()` is the one routine that decides which statuses count, for the same reason. Planning and report runs are exempt diff --git a/skills/aaif-sync-chapters/scripts/chapter_health.py b/skills/aaif-sync-chapters/scripts/chapter_health.py index d269229..9fa71e5 100755 --- a/skills/aaif-sync-chapters/scripts/chapter_health.py +++ b/skills/aaif-sync-chapters/scripts/chapter_health.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Rank chapters by whether anything is actually happening in them. READ-ONLY. -Exists because of the 100-chapter cap (see sync_chapters.CHAPTER_CAP): growth +Exists because of the chapter cap (see sync_chapters.CHAPTER_CAP): growth has to be paid for by retiring or coalescing an existing chapter, and that is a decision somebody has to make about a named chapter. This is the evidence for that decision, and deliberately nothing more — it proposes a `Status` and never diff --git a/skills/aaif-sync-chapters/scripts/sync_chapters.py b/skills/aaif-sync-chapters/scripts/sync_chapters.py index 6f39da2..5bb49fd 100755 --- a/skills/aaif-sync-chapters/scripts/sync_chapters.py +++ b/skills/aaif-sync-chapters/scripts/sync_chapters.py @@ -94,7 +94,9 @@ #: estate grow past the cap simply by nobody filling the column in. RETIRED_STATUSES = ("Merged", "Deprecated") -#: Hard ceiling on live chapters (set 2026-09-18). The point is not the number: +#: Hard ceiling on live chapters (set at 100 on 2026-09-18, raised to 125 on +#: 2026-11-12 so Columbus and Philadelphia could launch without retiring a +#: chapter — an operator's call, made at the cap). The point is not the number: #: it is that growth has to be paid for by sunsetting or coalescing something, #: which is a decision somebody has to make rather than a queue that silently #: grows. @@ -104,12 +106,12 @@ #: create_chapter.py checks the same cap before building a Drive folder, but be #: precise about what that check is worth: making a folder does not add a row, #: so it cannot detect its own predecessors. Three `create_chapter --write` runs -#: at 99 live chapters each read 99, each pass, and each build a folder; the -#: next sync run then refuses all three rows at once. The folder check is an +#: one short of the cap each read the same count, each pass, and each build a +#: folder; the next sync run then refuses all three rows at once. The folder check is an #: early warning that saves the common single-run case, NOT a guarantee — the #: guarantee lives on the row. Closing that gap properly means create_chapter #: claiming its row as it creates the folder, which it does not do yet. -CHAPTER_CAP = 100 +CHAPTER_CAP = 125 # Also blank on new rows, but read-only legacy history — never backfilled, so the # report must not tell an operator to fill it. diff --git a/skills/aaif-sync-chapters/scripts/test_chapter_cap.py b/skills/aaif-sync-chapters/scripts/test_chapter_cap.py index 02c5001..ff80461 100755 --- a/skills/aaif-sync-chapters/scripts/test_chapter_cap.py +++ b/skills/aaif-sync-chapters/scripts/test_chapter_cap.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""The 100-chapter cap and the Status census. Plain script; exit 1 on failure.""" +"""The chapter cap and the Status census. Plain script; exit 1 on failure.""" import os import sys @@ -88,16 +88,18 @@ def census(pairs): # --- `incoming` is a separate parameter, because it used to be smuggled ------ # The feed-row guard passed live+new as `live` and restated the breakdown inside # `what`, so the headline printed "N live chapters" for a number that was not. +CAP = sc.CHAPTER_CAP check("live + incoming under the cap is allowed", - sc.cap_refusal(98, {}, "append", incoming=2), None) + sc.cap_refusal(CAP - 2, {}, "append", incoming=2), None) check("exactly at the cap with nothing incoming is allowed", - sc.cap_refusal(sc.CHAPTER_CAP, {}, "x", incoming=0), None) -over = sc.cap_refusal(98, {}, "append 3 new chapter row(s)", incoming=3) + sc.cap_refusal(CAP, {}, "x", incoming=0), None) +over = sc.cap_refusal(CAP - 2, {}, "append 3 new chapter row(s)", incoming=3) check("live + incoming OVER the cap refuses", over.startswith("ABORT:"), True) check("the headline separates live from incoming rather than summing silently", - "98 live chapters + 3 new = 101" in over, True) + "%d live chapters + 3 new = %d" % (CAP - 2, CAP + 1) in over, True) check("a single-chapter refusal keeps the plain headline", - sc.cap_refusal(100, {}, "x").splitlines()[0].startswith("ABORT: 100 live chapters —"), + sc.cap_refusal(CAP, {}, "x").splitlines()[0].startswith( + "ABORT: %d live chapters —" % CAP), True) # --- an out-of-vocabulary Status counts as live AND is surfaced ------------- @@ -114,7 +116,7 @@ def census(pairs): sc.unknown_statuses(by), [("merged", 3), ("Archived", 1)]) check("the vocabulary itself is not reported as unknown", sc.unknown_statuses({"Active": 5, "Merged": 1, "": 3}), []) -odd = sc.cap_refusal(100, {"Archived": 2}, "x") +odd = sc.cap_refusal(CAP, {"Archived": 2}, "x") check("the refusal warns about out-of-vocabulary values", "not in the vocabulary" in odd and "'Archived' (2)" in odd, True)