fix(ci): make template_newspaper CI-clean#9
Merged
Conversation
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.
f2027bd to
539d819
Compare
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%.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
mainCI 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
README.md+AGENTS.mdtocontent/pages/andsrc/newspaper/.## Methodssection tomanuscript/02_engine_architecture.mdso_discover_method_sectionsresolves it (every PUBLIC_PROJECT_NAMES project must expose a methods surface).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_treecounted on-diskinfrastructure/**/*.pyvia rglob, so a build-generated.pyon 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)
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.