Skip to content

fix(ci): make template_newspaper CI-clean#9

Merged
docxology merged 2 commits into
mainfrom
fix/template-newspaper-ci
Jun 2, 2026
Merged

fix(ci): make template_newspaper CI-clean#9
docxology merged 2 commits into
mainfrom
fix/template-newspaper-ci

Conversation

@docxology
Copy link
Copy Markdown
Owner

@docxology docxology commented Jun 2, 2026

Why

main CI has been red since template_newspaper was added as a public exemplar. The 6 canonical exemplars' Project-Tests matrix was already green; the red jobs were Documentation Lint and ubuntu Infra Tests (8 failures, all newspaper-related, + one environment-specific drift flake).

Commit 1 — make template_newspaper CI-clean

  • Doc-pairs: add README.md + AGENTS.md to content/pages/ and src/newspaper/.
  • Methods orchestration: add a real ## Methods section to manuscript/02_engine_architecture.md so _discover_method_sections resolves it (every PUBLIC_PROJECT_NAMES project must expose a methods surface).
  • Registration: regenerate active_projects.md, publication_records.md, .github/README.md; add newspaper to the protected-exemplar allowlist (test_linking.py), tracked-output prefixes (git_guards.py), and docstring counts.

Commit 2 — make the infra .py-count drift check robust

test_canonical_facts_infrastructure_python_count_matches_tree counted on-disk infrastructure/**/*.py via rglob, so a build-generated .py on ubuntu CI inflated 483→484 (green on macOS, red on ubuntu). Now counts git-tracked sources — what the factsheet documents as drift — immune to transient artifacts.

Verification (run, not asserted)

  • doc-pair lint 0 issues; methods 7/7; linking + docs-consistency green; canonical_facts robust (passes with an untracked stray .py present).
  • template_newspaper core pipeline still renders (the-triplicate.pdf 479KB).
  • Prior PR run: ubuntu infra 8→1 failures (Doc-Lint, Project Tests, macOS infra all green); commit 2 closes the last one.

Deferred (separate, documented)

A latent coverage green-wash in infrastructure/reporting/suite_runner.py (cov-below-floor → exit 0) was found; its fix unmasks a pre-existing vacuous integration test, so it's deferred to a focused PR.

docxology added 2 commits June 2, 2026 06:06
template_newspaper was added as a public exemplar but broke two CI gates on main:

- Documentation Lint: add the required README.md + AGENTS.md doc-pairs to
  content/pages/ and src/newspaper/.
- Infra (methods orchestration): the public-exemplar contract requires every
  PUBLIC_PROJECT_NAMES project to expose a methods section; add a real
  ## Methods section to manuscript/02_engine_architecture.md (the deterministic
  load/measure/compose/emit build method). _discover_method_sections resolves it.

Register the new exemplar across generated docs (active_projects.md,
publication_records.md, .github/README.md via the generators), the
protected-names allowlist in test_linking.py, and the tracked-output prefix +
docstring counts in git_guards.py / test_docs_discovery_consistency.py.
test_canonical_facts_infrastructure_python_count_matches_tree counted on-disk
infrastructure/**/*.py via rglob against the live repo, so a build- or
test-generated .py (e.g. a version stub written during `uv sync` on ubuntu CI)
inflated the count 483->484 and flapped the gate per-environment (green on
macOS, red on ubuntu). Count git-tracked source files instead — that is what the
factsheet documents as 'drift', and it is immune to transient on-disk artifacts.
@docxology docxology force-pushed the fix/template-newspaper-ci branch from f2027bd to 539d819 Compare June 2, 2026 13:07
@docxology docxology merged commit 785ad09 into main Jun 2, 2026
23 checks passed
@docxology docxology deleted the fix/template-newspaper-ci branch June 2, 2026 14:00
docxology added a commit that referenced this pull request Jun 3, 2026
Finish the public-exemplar contract for the AutoScientists coordination
exemplar and move it out of the local-only set into the public CI/publication
scope, matching the other eight exemplars.

- Add the doc-pair signposts (AGENTS.md + README.md) for docs/, manuscript/,
  scripts/, src/, tests/, plus the project .gitignore and tests/conftest.py.
- Extract the matplotlib figure helpers into src/figures.py so the analysis
  scripts stay thin orchestrators (run_ablation 169→89, run_search_comparison
  123→97 lines; both under the 120-line project-script gate). figures.py is
  covered by a new no-mocks test_figures.py (real PNG output) → src 99.59%.
- Empty LOCAL_ONLY_TEMPLATE_NAMES (autoscientists has real Zenodo DOIs now) and
  update the local-only-exemplars doc to reflect "none currently".
- Regenerate active_projects.md / publication_records.md and update
  canonical_facts.md (9th exemplar row, 79 tests/99.59%, project-scope infra
  collection 213→214).

Gates green: drift --strict, lint_docs, 19 docs-consistency tests, 214 project
infra tests, ruff + mypy (769 files), autoscientists 79 tests @ 99.59%.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant