Skip to content

Commit 620fd70

Browse files
author
TNFR AI Agent
committed
docs: centralize canonical TNFR documentation
Intent: improve structural coherence and traceability across the repository documentation. Operators involved: Coherence, Contraction, Self-organization. Affected invariants: nodal equation integrity, grammar compliance, structural metrology, reproducible dynamics. Key changes: centralize architecture and theory indexes; remove obsolete audit and package documents; add strict documentation checks and MkDocs configuration; correct package claims and installation tests. Expected risks/dissonances: removed historical material is preserved in Git history; active references were verified. Metrics: 903 internal references valid; strict documentation build passes; 45 focused tests pass.
1 parent 8966add commit 620fd70

132 files changed

Lines changed: 1583 additions & 16092 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/WORKFLOWS.md‎

Lines changed: 37 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,39 @@
11
# GitHub Actions Workflows
22

3-
This document describes the CI/CD workflows configured for this repository.
4-
5-
## Active Workflows
6-
7-
### Core Development Workflows
8-
9-
#### 1. CI (`ci.yml`)
10-
**Triggers:** Push and PR to main/master branches
11-
**Purpose:** Core continuous integration testing and quality checks
12-
**Jobs:**
13-
- **Format check**: Runs pre-commit hooks (black, isort, pydocstyle)
14-
- **Type check and static analysis**: Runs flake8, mypy, pyright, vulture, and language policy enforcement
15-
- **Changelog fragments**: Enforces changelog fragments for PRs
16-
- **Tests**: Runs pytest across Python 3.9-3.13 with coverage reporting
17-
18-
**Status:** ✅ Working (has legitimate doctest failures in codebase, not workflow issues)
19-
20-
#### 2. Docs (`docs.yml`)
21-
**Triggers:** Push and PR to main branch
22-
**Purpose:** Build and validate documentation
23-
**Jobs:**
24-
- Build MkDocs site with strict mode
25-
- Run Sphinx doctests
26-
- Perform link checking
27-
28-
**Status:** ✅ Working (has legitimate doctest failures in codebase, not workflow issues)
29-
30-
### Security Workflows
31-
32-
#### 3. Dependency Vulnerability Audit (`pip-audit.yml`)
33-
**Triggers:** Push/PR to main/master, weekly schedule (Monday 5 AM UTC), manual dispatch
34-
**Purpose:** Scan Python dependencies for known vulnerabilities (PyPA Advisory Database)
35-
**Jobs:**
36-
- Install all project dependencies
37-
- Run pip-audit against installed packages
38-
- Upload JSON report artifact
39-
- Fail build if vulnerabilities detected
40-
41-
**Status:** ✅ Working correctly
42-
43-
**Note:** This is the single retained automated vulnerability scanner. It runs
44-
as a CI check and never creates branches or pull requests. The previous CodeQL
45-
and Bandit/Semgrep (SAST Lint) workflows and the Dependabot version-update
46-
configuration were removed to eliminate automated branch/alert noise. Secret
47-
scanning and push protection remain enabled at the repository settings level
48-
(notification-only, no branches generated).
49-
50-
### Quality Assurance Workflows
51-
52-
#### 6. Reproducibility Check (`reproducibility.yml`)
53-
**Triggers:** Push/PR to main/master, manual dispatch
54-
**Purpose:** Verify benchmark reproducibility (TNFR canonical requirement)
55-
**Jobs:**
56-
- Run benchmarks twice with same seed
57-
- Compare manifest checksums
58-
- Verify identical results
59-
60-
**Status:** ✅ Working correctly
61-
62-
#### 7. Performance Regression (`performance-regression.yml`)
63-
**Triggers:** PRs to main/master, manual dispatch
64-
**Purpose:** Detect performance degradations
65-
**Jobs:**
66-
- Run performance regression test suite
67-
- Mark slow tests appropriately
68-
69-
**Status:** ✅ Working correctly
70-
71-
#### 8. Verify Internal References (`verify-references.yml`)
72-
**Triggers:** Push/PR affecting markdown/notebook files
73-
**Purpose:** Validate internal documentation links
74-
**Jobs:**
75-
- Scan 985+ internal references
76-
- Report broken links
77-
78-
**Status:** ⚠️ Working but reports 75 broken links (codebase issue, not workflow)
79-
80-
### Infrastructure Workflows
81-
82-
#### 9. Lint Workflows (`lint-workflows.yml`)
83-
**Triggers:** Push/PR affecting workflows, tools, or scripts
84-
**Purpose:** Validate workflow configurations
85-
**Jobs:**
86-
- Check for invalid Bandit format usage (SARIF not supported)
87-
- Verify bandit_to_sarif.py converter exists
88-
89-
**Status:** ✅ Working correctly
90-
91-
#### 10. Release (`release.yml`)
92-
**Triggers:** Push to main, manual dispatch
93-
**Purpose:** Automated semantic release process
94-
**Jobs:**
95-
- **Prepare**: Detect next version, compile changelog, apply tags
96-
- **Publish**: Build distributions, sign with GPG, publish to PyPI, create GitHub release
97-
98-
**Status:** ✅ Working correctly (intentionally skips when no release needed)
99-
100-
## Removed Workflows
101-
102-
The following workflows were removed during cleanup:
103-
104-
### 1. `bandit.yml` (Removed)
105-
**Reason:** Duplicate functionality - Bandit already runs in `sast-lint.yml`
106-
107-
### 2. `black-duck-security-scan-ci.yml` (Removed)
108-
**Reason:** Requires paid Black Duck service with configuration not available in repository
109-
110-
### 3. `security-dashboard.yml` (Removed)
111-
**Reason:** Optional aggregator workflow with configuration issues; individual security scans (CodeQL, SAST, pip-audit) already provide comprehensive coverage
112-
113-
## Workflow Best Practices
114-
115-
1. **Concurrency Control**: All workflows use `concurrency` groups with `cancel-in-progress: true` to save CI resources
116-
2. **Caching**: Python dependencies and pip are cached to speed up builds
117-
3. **Matrix Testing**: CI tests across Python 3.9-3.13 to ensure compatibility
118-
4. **SARIF Integration**: Security workflows upload results to GitHub Security tab
119-
5. **Artifact Preservation**: Important outputs (reports, logs) are uploaded as artifacts
120-
121-
## Known Issues
122-
123-
These issues exist in the codebase, not in workflow configurations:
124-
125-
1. **Doctest Failures**:
126-
- Files: `docs/source/api/api_mapping.rst`, `docs/source/how_to_reproduce_results.rst`
127-
- Cause: Unexpected warnings and validation errors
128-
- Impact: CI and Docs workflows report failures
129-
130-
2. **Broken Documentation Links**:
131-
- 75 broken internal references
132-
- Common patterns: missing API pages, moved/renamed files
133-
- Impact: Verify Internal References workflow reports failures
134-
135-
## Maintenance Notes
136-
137-
- All workflows follow TNFR canonical requirements (reproducibility, traceability, English-only)
138-
- Security workflows run on schedule to catch newly disclosed vulnerabilities
139-
- Release workflow requires semantic commit messages for version bumping
140-
- No workflow credentials are committed to the repository (use GitHub Secrets)
3+
This page describes workflow intent. Workflow YAML is the source of truth for
4+
triggers, matrices, permissions, and commands.
5+
6+
## Active validation
7+
8+
| Workflow | Responsibility |
9+
| --- | --- |
10+
| `ci.yml` | Formatting, lint, advisory type analysis, changelog policy, and tests on Python 3.10-3.13 |
11+
| `docs.yml` | Internal paths and fragments, documentation integrity, strict MkDocs build, and Pages publication from main |
12+
| `verify-references.yml` | Independent internal-reference validation for Markdown changes |
13+
| `tests.yml` | Additional test execution |
14+
| `reproducibility.yml` | Repeated seeded benchmark comparison |
15+
| `performance-regression.yml` | Performance regression checks |
16+
| `pip-audit.yml` | Dependency vulnerability audit |
17+
| `release.yml` | Versioned release and publication |
18+
19+
## Documentation publication
20+
21+
There is one documentation build and deployment workflow:
22+
23+
1. install the project with the `docs` extra;
24+
2. validate local Markdown targets and GitHub-style fragments;
25+
3. run executable documentation integrity checks;
26+
4. stage canonical repository sources with `scripts/prepare_docs.py`;
27+
5. build MkDocs with strict mode;
28+
6. publish the exact `site/` artifact on pushes to `main`.
29+
30+
Pull requests build and validate the same site without publishing it.
31+
32+
## Maintenance rules
33+
34+
- Keep supported Python versions synchronized with `pyproject.toml`.
35+
- Keep commands in this page descriptive; copy exact command details only when
36+
they are stable public interfaces.
37+
- Treat advisory jobs as advisory in both prose and YAML.
38+
- Do not report workflow health or finding counts as permanent facts here.
39+
- Update this page when a workflow is added, removed, or changes purpose.

‎.github/agents/my-agent.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ program history** (the full milestone/gap/branch threads live in the notes).
556556
| **REMESH-∞ closure** | The 13-operator catalog is closed under the `τ_g → ∞` limit (N15, Branch A); universality is structural/operational, not spectral. | [REMESH_INFINITY_DERIVATION.md](theory/REMESH_INFINITY_DERIVATION.md) |
557557
| **TNFR-Navier–Stokes** | The two-face reading: incompressible NS is first-order, so its *linear* part is the **diffusive (over-damped) projection** of the separate graph-wave model (`ν_f = ν`; `verify_diffusive_face` VALID for every physical viscosity) — blow-up is a purely **nonlinear `K_φ` cascade** (the vortex-stretching VAL source), not a linear resonance. Measured: peak enstrophy debt grows with Re at matched `τ_str = ν·t` (bounded at fixed Re — the diffusive face regularises); the `Re → ∞` cascade bound = Clay, **open**. Closes nothing. | [TNFR_NAVIER_STOKES_RESEARCH_NOTES.md](theory/TNFR_NAVIER_STOKES_RESEARCH_NOTES.md) |
558558
| **Number theory** | Primality as `ΔNFR = 0` (canonical **unit** coefficients, §4.2 coefficient independence); arithmetic structural triad; the arithmetic network as an NFR (multinodal topology + emergent symplectic geometry); the cyclotomy law `s_k(p) = gcd(k, p−1) + 1` (proved), read as the **arithmetic pulse** (the residue-NFR's tone-count — a prime is its most degenerate chord). | [TNFR_NUMBER_THEORY.md](theory/TNFR_NUMBER_THEORY.md) |
559-
| **Structural research program (R1–R9)** | Nine internal lines on the arithmetic/spectral dynamics, refined by the post-review roadmap (N00–N13): symmetry-sector observability with **word-composition closure and pointed selectors** (R1, N06/N07 **derived**; cross-operator cache leak fixed, N01); the arithmetic pulse recurrence `gcd(k,p−1)+1` plus **amplitudes `= m_λ/n`** (R2, N12 **derived**); CRT as U5 synthesis (R3, exact Kronecker); the projective p-adic tower — transport exact, **REMESH is a morphism not an operator** (R4/N09, the static lift fails only the temporal echo); finite/Gaussian fields with the exact **trace-collision** character formula (R5, N10; type detection still k-sensitive); controlled additive theory (R6, additive reading **= Fourier**, constructive negative); the arithmetic-pressure audit — sufficient, functionally independent, **primality-redundant**, completeness open (R7/N02); operator certification plus a **structural-morphism taxonomy derived from the nodal equation** (R8/N08, 6 of 7 kinds emerge as nodal-flow transports — no 14th operator); directed non-normal dynamics — metric layer, scalar-`ν_f` **clock-change theorem**, transient U2/U6 (per-node contraction; the ambient `>1` is the `‖Q‖` projection artifact) and the heterogeneous-`ν_f` boundary (R9, N03–N05/N13). The canonical U2 metric stays **open** and U2/U6 are **unmodified**. None closes an open problem. | [RESEARCH_R1_R9_HANDOFF_2026-09-05.md](theory/RESEARCH_R1_R9_HANDOFF_2026-09-05.md) |
559+
| **Structural research program (R1–R9)** | Nine internal lines on arithmetic and spectral dynamics: observability, arithmetic pulse, CRT synthesis, p-adic transport, finite fields, additive reduction, arithmetic pressure, operator certification and directed non-normal evolution. Exact, measured, negative and open results are separated in the program index. | [STRUCTURAL_RESEARCH_PROGRAM.md](theory/STRUCTURAL_RESEARCH_PROGRAM.md) |
560560
| **Millennium reformulations** | P vs NP, BSD, Hodge, Yang–Mills: TNFR-internal structural reformulations and diagnostics — none a proof. | `theory/TNFR_*_RESEARCH_NOTES.md` |
561561

562562
**Honest scope, global**: these programs produce TNFR-internal structural results and
@@ -590,7 +590,7 @@ Navier–Stokes regularity, or any Millennium problem.
590590
(R2 rank + amplitudes), `crt_multiscale.py` (R3), `padic_tower.py` / `remesh_audit.py`
591591
(R4 transport + REMESH audit), `finite_fields.py` / `trace_collisions.py` (R5),
592592
`arithmetic_pressure.py` (R7), `operator_certificates.py` (R8). Ledger:
593-
[RESEARCH_R1_R9_HANDOFF_2026-09-05.md](theory/RESEARCH_R1_R9_HANDOFF_2026-09-05.md).
593+
[STRUCTURAL_RESEARCH_PROGRAM.md](theory/STRUCTURAL_RESEARCH_PROGRAM.md).
594594
- **SDK** — [src/tnfr/sdk/](src/tnfr/sdk/): `simple.py` (`TNFR.create(...)`, tetrad,
595595
conservation, substrate, integrity, audit, `nfr()` whole-NFR read-out,
596596
`nodal_state`/`nodal_scan` micro-NFR), `fluent.py` (`auto_optimize()`). The shared

‎.github/workflows/deploy-docs.yml‎

Lines changed: 0 additions & 52 deletions
This file was deleted.

‎.github/workflows/docs.yml‎

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
name: Build and Deploy Documentation (DISABLED)
1+
name: Documentation
22

3-
# DISABLED: Documentation is now built locally only. This workflow stays valid
4-
# but only runs on manual dispatch (a workflow with no 'on:' trigger is invalid
5-
# and reports a startup failure on every push). To re-enable automatic builds,
6-
# add the push / pull_request triggers under 'on:' below.
73
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- '**.md'
8+
- 'mkdocs.yml'
9+
- 'pyproject.toml'
10+
- 'scripts/check_documentation.py'
11+
- 'scripts/prepare_docs.py'
12+
- 'scripts/verify_internal_references.py'
13+
- '.github/workflows/docs.yml'
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '**.md'
18+
- 'mkdocs.yml'
19+
- 'pyproject.toml'
20+
- 'scripts/check_documentation.py'
21+
- 'scripts/prepare_docs.py'
22+
- 'scripts/verify_internal_references.py'
23+
- '.github/workflows/docs.yml'
824
workflow_dispatch: {}
925

26+
concurrency:
27+
group: documentation-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
permissions:
31+
contents: write
32+
1033
jobs:
11-
build-deploy:
34+
build:
1235
runs-on: ubuntu-latest
13-
permissions:
14-
contents: write
1536
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v5
18-
19-
- name: Set up Python
20-
uses: actions/setup-python@v6
37+
- uses: actions/checkout@v5
38+
- uses: actions/setup-python@v6
2139
with:
2240
python-version: '3.11'
23-
24-
- name: Install dependencies
41+
cache: pip
42+
- name: Install project and documentation dependencies
43+
run: python -m pip install --upgrade pip && python -m pip install '.[docs]'
44+
- name: Verify documentation sources
2545
run: |
26-
python -m pip install --upgrade pip
27-
pip install -r docs/requirements.txt
28-
29-
- name: Sync README files
30-
run: |
31-
python scripts/sync-readme-docs.py
32-
33-
- name: Build docs
46+
python scripts/verify_internal_references.py --ci
47+
python scripts/check_documentation.py
48+
- name: Build canonical site
3449
run: |
35-
mkdocs build
36-
37-
- name: Deploy to GitHub Pages
38-
if: github.ref == 'refs/heads/main'
50+
python scripts/prepare_docs.py
51+
python -m mkdocs build --strict
52+
- name: Deploy main documentation
53+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
3954
uses: peaceiris/actions-gh-pages@v4
4055
with:
4156
github_token: ${{ secrets.GITHUB_TOKEN }}
4257
publish_dir: ./site
58+
publish_branch: gh-pages
4359
force_orphan: true
44-
commit_message: "docs: deploy MkDocs site (${GITHUB_SHA})"
45-
46-
link-check:
47-
runs-on: ubuntu-latest
48-
steps:
49-
- name: Checkout
50-
uses: actions/checkout@v5
51-
- name: Set up Python
52-
uses: actions/setup-python@v6
53-
with:
54-
python-version: '3.11'
55-
- name: Install dependencies
56-
run: |
57-
python -m pip install --upgrade pip
58-
pip install mkdocs mkdocs-material mkdocs-redirects
59-
- name: Build (no deploy) & basic link check
60-
run: |
61-
mkdocs build
62-
echo "(Basic build complete - consider adding lychee for deeper link checking)"
60+
user_name: github-actions[bot]
61+
user_email: github-actions[bot]@users.noreply.github.com
62+
commit_message: docs publish ${{ github.sha }}

‎.github/workflows/verify-references.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Set up Python
3636
uses: actions/setup-python@v6
3737
with:
38-
python-version: '3.9'
38+
python-version: '3.10'
3939

4040
- name: Verify internal references
4141
run: |

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dist/
66
build/
77
site/
88
docs/_build/
9+
build/docs-source/
910
*.egg-info/
1011
*.egg
1112
.semantic_release/
@@ -86,4 +87,4 @@ logs/
8687

8788
# Local-only modules (not published to GitHub)
8889
crypto/
89-
publish/
90+
publish/

0 commit comments

Comments
 (0)