Docs/infra/.github review: CODEOWNERS+concurrency, find_repo_root, infra hygiene, docs fixes#24
Merged
Merged
Conversation
…/stale concurrency
- CODEOWNERS listed 6 exemplars while ci.yml runs 9; added the 3 missing
(template_autoscientists, template_newspaper, template_textbook). Symmetric
diff against the ci.yml test-project matrix is now empty.
- release.yml: add concurrency group release-${{ github.ref }} with
cancel-in-progress: false (never cancel an in-flight release).
- stale.yml: add concurrency group stale with cancel-in-progress: true.
Verified: comm -3 CODEOWNERS vs ci.yml matrix = empty (9 == 9); actionlint
exits 0 over all workflows; .github docs already state '9 exemplars x 2 = 18
cells' (no drift).
…epo_root() Five call sites hard-coded Path(__file__).resolve().parents[N] with N varying by file depth (2 or 3) — fragile to file moves and easy to get off by one. Add find_repo_root() to core/project_paths.py (the canonical foundation helper, at a fixed location) and route them through it: - publishing/metadata_export_cli.py (was parents[2]) - orchestration/cli.py (was parents[2]) - validation/integrity/check_links.py (was parents[3]) - project/linking.py (was parents[2] fallback) - core/pipeline/multi_project_cli.py: was parents[4], which resolved ABOVE the repo root — a latent bug, dormant only because the sole caller (scripts/execute_multi_project.py) always passes repo_root explicitly. Routing to find_repo_root() corrects it. scanner.py deliberately left unchanged: its _find_repo_root_for_main() already does a pyproject.toml marker-walk (strictly more robust than a fixed depth). Verifier-first: proved each routed site's old parents[N] resolves to the same dir as find_repo_root() at runtime. RedTeam adversarial pass (path equivalence, the bugfix, import cycles, symlink/worktree edge cases, scanner skip) returned SAFE with no defects. New test pins the find_repo_root contract. Verified: ruff + mypy clean (6 files); 171 affected tests pass (linking, orchestration cli, discovery, project_discovery incl. new find_repo_root test).
… default, redundancy, test/doc hygiene) Each item re-verified against the tree before editing: - cache_gate.py: remove dead _load_plugin_manifest (def only, zero callers) + now-unused Any import; make the default cache dir portable (XDG_CACHE_HOME/~/.cache instead of root-only /var/cache/template). - doctor/safety.py: drop redundant os.path.normpath wrapper around Path.resolve() (resolve already normalises; behaviour-identical). - test_consistency_lint.py: assert the two facade exports the smoke test had drifted past (check_memory_decision_rule_links, check_project_discovery_claims). - public_audit.py: document the six top-level audit regexes (comments only). Refuted/skipped (verifier-first): mermaid_lint macOS Chrome path is a documented, .exists()-guarded tier-4 fallback — removing it would break Chrome resolution on macOS without a puppeteer cache; left as-is. print()->logger in cache_gate skipped: prints are intentional CLI gate output. Verified: ruff check + format clean; mypy clean (3 files); tests pass — consistency_lint+public_audit (8), doctor (49), cache_gate (3).
- docs/core/README.md: add the missing literature-data-flow.md row to the Contents table (file existed but was unlisted). - docs/documentation-index.md: fix the broken Pitfall-6 link (#pitfall-6-root-venv had no matching heading) to the real generated anchor, matching the already-correct quick-start-cheatsheet.md link. - docs/_generated/canonical_facts.md: modules-on-disk 516 -> 519 (this session added 3 infra validators; re-derived find infrastructure -name '*.py' | wc -l). Verified: lint_docs.py PASS (0 broken cross-links, 0 consistency, 0 doc-pairs), check_template_drift.py PASS.
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.
Summary
Clean, CI-verified subset of a
docs/+infrastructure/+.github/review pass, re-applied directly onto currentmain. (The original work branched before the recent Active-Inference PRs #19–22 landed; rather than force a 21-conflict merge that would re-resolve AI manuscript content, only the genuinely-additive, still-needed fixes are cherry-picked here.)What's included (4 commits, all verified against current main)
.githubhygiene —CODEOWNERSaligned to the 9-exemplar CI matrix (was 6, missingtemplate_autoscientists/newspaper/textbook);concurrency:guards added torelease.yml(no cancel-in-progress) andstale.yml. Symmetric diff vs theci.ymltest-projectmatrix is now empty; actionlint clean.find_repo_root()helper — centralizes repo-root computation ininfrastructure.core.project_paths; routes 5 hard-codedPath(__file__).resolve().parents[N]sites to it, fixing a latentparents[4]bug inmulti_project_cli(it resolved one level above the repo root; dormant only because callers always passrepo_root). RedTeam-audited for path-equivalence._load_plugin_manifest+ unused import fromcache_gate; portable XDG/~/.cachedefault (was root-only/var/cache); drop a redundantos.path.normpathwrapper indoctor/safety(.resolve()already normalizes); assert two real-but-untested facade exports intest_consistency_lint; document the six audit regexes inpublic_audit.literature-data-flow.mdrow todocs/core/README.md; fix the broken Pitfall-6 anchor indocumentation-index.mdto the real heading slug.Verification
check_template_drift --strict, module-line-count gate, tracked-projects guard, lint_docs (links/consistency/doc-pairs) — all green.find_repo_rootrefactor returned SAFE.Deliberately deferred (separate follow-ups)
integration_audit.pysplit — it's 948 lines on main (WARN, 2 under the 950 fail line). The split is valuable but needs fresh re-derivation against main's current version (PR feat(active_inference): four AIF extensions — precision sweep, cue-T-maze, Dirichlet learning, Lean identity #22 modified it); risky to cherry-pick as-is. Worth its own focused PR.figures.pymypy fix from the original branch was not needed — main'sfigures.pyis already clean.🤖 Generated with Claude Code