Spaces:
Paused
Paused
github-actions[bot] commited on
Commit ·
5e0b58b
0
Parent(s):
Sync: publish Space API fix
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +44 -0
- .github/ISSUE_TEMPLATE/bug_report.md +46 -0
- .github/ISSUE_TEMPLATE/feature_request.md +46 -0
- .github/PULL_REQUEST_TEMPLATE.md +49 -0
- .github/dependabot.yml +47 -0
- .github/workflows/ci.yml +447 -0
- .github/workflows/repository-snapshot.yml +43 -0
- .github/workflows/sync-huggingface.yml +65 -0
- .gitignore +56 -0
- .huggingface/README.md +35 -0
- .huggingface/metadata.yaml +49 -0
- .huggingface/space_config.yaml +39 -0
- .lla-embeddings.json +1 -0
- .lla-index.json +1 -0
- .lla-profile.json +9 -0
- .pre-commit-config.yaml +53 -0
- AUTHORS.md +18 -0
- CHANGELOG.md +554 -0
- CITATION.cff +20 -0
- CODE_OF_CONDUCT.md +42 -0
- CONTRIBUTING.md +113 -0
- Dockerfile +50 -0
- HF_README.md +163 -0
- LICENSE +21 -0
- README.md +163 -0
- SECURITY.md +67 -0
- artifacts/benchmark_ladder_neuron_synapse.json +3 -0
- artifacts/runs/.gitkeep +0 -0
- artifacts/snapshots/.gitkeep +0 -0
- configs/learning_experiment.yaml +77 -0
- configs/llm_organ.example.yaml +16 -0
- configs/operator_console.yaml +20 -0
- configs/poc_alpha5_live.yaml +204 -0
- configs/poc_config.yaml +161 -0
- configs/poc_config_stdp_on.yaml +89 -0
- configs/poc_structural_live.yaml +160 -0
- configs/research_chat.example.yaml +25 -0
- configs/self_organization.yaml +20 -0
- configs/structural_plasticity_alpha5.yaml +18 -0
- configs/test_structural_auto_approve.yaml +107 -0
- configs/test_structural_e2e.yaml +109 -0
- deploy/Caddyfile.internet.example +21 -0
- docs/01-guides/ACCEPTANCE.md +35 -0
- docs/01-guides/DEVELOPMENT.md +52 -0
- docs/01-guides/DeveloperGuide.md +168 -0
- docs/01-guides/GIT_WORKFLOW.md +1518 -0
- docs/01-guides/HOTFIX_README.md +11 -0
- docs/01-guides/INSTALL_V050A1.md +28 -0
- docs/01-guides/PYLANCE_PREVENTION.md +13 -0
- docs/01-guides/REPOSITORY_WORKFLOW.md +43 -0
.gitattributes
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Keep source and documentation deterministic across Windows/Linux checkouts.
|
| 2 |
+
* text=auto
|
| 3 |
+
*.py text eol=lf
|
| 4 |
+
*.toml text eol=lf
|
| 5 |
+
*.yaml text eol=lf
|
| 6 |
+
*.yml text eol=lf
|
| 7 |
+
*.md text eol=lf
|
| 8 |
+
*.json text eol=lf
|
| 9 |
+
*.diff text eol=lf
|
| 10 |
+
*.ps1 text eol=crlf
|
| 11 |
+
*.bat text eol=crlf
|
| 12 |
+
*.cmd text eol=crlf
|
| 13 |
+
*.svg text eol=lf
|
| 14 |
+
*.b5d binary
|
| 15 |
+
# ============================================================================
|
| 16 |
+
# Git LFS — required for Hugging Face repository
|
| 17 |
+
# Large binary files are stored via Git LFS to keep the repository lean.
|
| 18 |
+
# ============================================================================
|
| 19 |
+
# Simulation snapshots and journals (binary format)
|
| 20 |
+
*.b5d filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.b5d.journal filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
# Checkpoint files
|
| 23 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
# Large data artifacts
|
| 25 |
+
artifacts/** filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
# Images, plots, and generated visualizations
|
| 27 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.ico filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
# Compressed experiment traces and WebAssembly assets
|
| 33 |
+
*.json.gz filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
# Archives and containers
|
| 36 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
*.whl filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
# Model weights (future use)
|
| 40 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
*.docx filter=lfs diff=lfs merge=lfs -text
|
.github/ISSUE_TEMPLATE/bug_report.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Bug Report
|
| 3 |
+
about: Report a reproducible Brain-5D defect
|
| 4 |
+
title: "[BUG] "
|
| 5 |
+
labels: bug
|
| 6 |
+
assignees: ""
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## Description
|
| 10 |
+
|
| 11 |
+
Describe the bug clearly.
|
| 12 |
+
|
| 13 |
+
## Reproduction
|
| 14 |
+
|
| 15 |
+
1. Command:
|
| 16 |
+
2. Configuration:
|
| 17 |
+
3. Steps:
|
| 18 |
+
4. Observed result:
|
| 19 |
+
|
| 20 |
+
## Expected result
|
| 21 |
+
|
| 22 |
+
What should have happened?
|
| 23 |
+
|
| 24 |
+
## Logs / traceback
|
| 25 |
+
|
| 26 |
+
Paste the minimal relevant output.
|
| 27 |
+
|
| 28 |
+
## Environment
|
| 29 |
+
|
| 30 |
+
- OS:
|
| 31 |
+
- Python version:
|
| 32 |
+
- Brain-5D version / commit:
|
| 33 |
+
- Installation method:
|
| 34 |
+
- Dashboard involved: yes/no
|
| 35 |
+
- Persistence / restore involved: yes/no
|
| 36 |
+
|
| 37 |
+
## Reproducibility
|
| 38 |
+
|
| 39 |
+
- [ ] Always reproducible
|
| 40 |
+
- [ ] Intermittent
|
| 41 |
+
- [ ] Only observed once
|
| 42 |
+
|
| 43 |
+
## Additional context
|
| 44 |
+
|
| 45 |
+
Include any relevant snapshot/journal details, but do not upload secrets or
|
| 46 |
+
security-sensitive exploit material to a public issue.
|
.github/ISSUE_TEMPLATE/feature_request.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Feature Request
|
| 3 |
+
about: Propose a measured Brain-5D enhancement
|
| 4 |
+
title: "[FEATURE] "
|
| 5 |
+
labels: enhancement
|
| 6 |
+
assignees: ""
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## Problem
|
| 10 |
+
|
| 11 |
+
What engineering or research problem should be solved?
|
| 12 |
+
|
| 13 |
+
## Proposed solution
|
| 14 |
+
|
| 15 |
+
Describe the desired behavior.
|
| 16 |
+
|
| 17 |
+
## Alternatives considered
|
| 18 |
+
|
| 19 |
+
What other approaches were considered?
|
| 20 |
+
|
| 21 |
+
## Architecture impact
|
| 22 |
+
|
| 23 |
+
Which areas are affected?
|
| 24 |
+
|
| 25 |
+
- [ ] Core
|
| 26 |
+
- [ ] Learning
|
| 27 |
+
- [ ] Homeostasis
|
| 28 |
+
- [ ] Self-organization
|
| 29 |
+
- [ ] Persistence
|
| 30 |
+
- [ ] Dashboard
|
| 31 |
+
- [ ] Embodiment
|
| 32 |
+
- [ ] Tooling / CI
|
| 33 |
+
- [ ] Documentation
|
| 34 |
+
|
| 35 |
+
## Safety / persistence impact
|
| 36 |
+
|
| 37 |
+
Could the feature change structural mutation, autonomous behavior, persistence,
|
| 38 |
+
restore determinism or resource limits?
|
| 39 |
+
|
| 40 |
+
## Exit criterion
|
| 41 |
+
|
| 42 |
+
How should we verify that the feature works?
|
| 43 |
+
|
| 44 |
+
## Roadmap relevance
|
| 45 |
+
|
| 46 |
+
Which milestone or roadmap item does this support?
|
.github/PULL_REQUEST_TEMPLATE.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Pull Request
|
| 2 |
+
|
| 3 |
+
## Summary
|
| 4 |
+
|
| 5 |
+
Describe the change and its motivation.
|
| 6 |
+
|
| 7 |
+
Fixes # (issue, if applicable)
|
| 8 |
+
|
| 9 |
+
## Type
|
| 10 |
+
|
| 11 |
+
- [ ] Bug fix
|
| 12 |
+
- [ ] New feature
|
| 13 |
+
- [ ] Refactor
|
| 14 |
+
- [ ] Test
|
| 15 |
+
- [ ] Documentation
|
| 16 |
+
- [ ] Tooling / CI
|
| 17 |
+
- [ ] Breaking change
|
| 18 |
+
|
| 19 |
+
## Architecture impact
|
| 20 |
+
|
| 21 |
+
Describe affected boundaries and compatibility considerations.
|
| 22 |
+
|
| 23 |
+
## Verification
|
| 24 |
+
|
| 25 |
+
List the exact commands run and results.
|
| 26 |
+
|
| 27 |
+
- [ ] `pytest -m "not slow"`
|
| 28 |
+
- [ ] `mypy src`
|
| 29 |
+
- [ ] `black --check src tests scripts`
|
| 30 |
+
- [ ] `ruff check src/ tests/ scripts/`
|
| 31 |
+
- [ ] `pyright`
|
| 32 |
+
- [ ] Pyright/Pylance clean for changed/new files
|
| 33 |
+
- [ ] Pylint quality threshold maintained
|
| 34 |
+
- [ ] `git diff --check`
|
| 35 |
+
- [ ] Slow tests run when relevant
|
| 36 |
+
|
| 37 |
+
## Persistence / safety checklist
|
| 38 |
+
|
| 39 |
+
- [ ] Restore determinism is unchanged or explicitly tested
|
| 40 |
+
- [ ] Structural changes still pass through controlled mutation boundaries
|
| 41 |
+
- [ ] Auto-approval defaults remain conservative
|
| 42 |
+
- [ ] No arbitrary shell command path was added to the dashboard
|
| 43 |
+
- [ ] No new broad type suppressions were introduced
|
| 44 |
+
|
| 45 |
+
## Documentation
|
| 46 |
+
|
| 47 |
+
- [ ] README updated if user-visible behavior changed
|
| 48 |
+
- [ ] User Guide updated if operator workflow changed
|
| 49 |
+
- [ ] Developer Guide / architecture docs updated if contracts changed
|
.github/dependabot.yml
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dependabot dependency update automation for Brain-5D.
|
| 2 |
+
#
|
| 3 |
+
# Documentation:
|
| 4 |
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates
|
| 5 |
+
|
| 6 |
+
version: 2
|
| 7 |
+
updates:
|
| 8 |
+
# Python (pip) dependencies
|
| 9 |
+
- package-ecosystem: "pip"
|
| 10 |
+
directory: "/"
|
| 11 |
+
schedule:
|
| 12 |
+
interval: "weekly"
|
| 13 |
+
day: "monday"
|
| 14 |
+
time: "06:00"
|
| 15 |
+
timezone: "Europe/Berlin"
|
| 16 |
+
labels:
|
| 17 |
+
- "dependencies"
|
| 18 |
+
- "automated"
|
| 19 |
+
commit-message:
|
| 20 |
+
prefix: "chore(deps)"
|
| 21 |
+
prefix-development: "chore(deps-dev)"
|
| 22 |
+
open-pull-requests-limit: 10
|
| 23 |
+
rebase-strategy: "auto"
|
| 24 |
+
groups:
|
| 25 |
+
dev-dependencies:
|
| 26 |
+
patterns:
|
| 27 |
+
- "black"
|
| 28 |
+
- "mypy"
|
| 29 |
+
- "pylint"
|
| 30 |
+
- "pyright"
|
| 31 |
+
- "pytest*"
|
| 32 |
+
- "ruff"
|
| 33 |
+
- "types-*"
|
| 34 |
+
|
| 35 |
+
# GitHub Actions
|
| 36 |
+
- package-ecosystem: "github-actions"
|
| 37 |
+
directory: "/"
|
| 38 |
+
schedule:
|
| 39 |
+
interval: "weekly"
|
| 40 |
+
day: "monday"
|
| 41 |
+
time: "06:00"
|
| 42 |
+
timezone: "Europe/Berlin"
|
| 43 |
+
labels:
|
| 44 |
+
- "dependencies"
|
| 45 |
+
- "automated"
|
| 46 |
+
commit-message:
|
| 47 |
+
prefix: "chore(ci)"
|
.github/workflows/ci.yml
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ============================================================================
|
| 2 |
+
# Brain-5D — Continuous Integration
|
| 3 |
+
# ============================================================================
|
| 4 |
+
# Runs on push/PR to main/develop, and weekly on Monday 06:00 UTC.
|
| 5 |
+
#
|
| 6 |
+
# Pipeline stages:
|
| 7 |
+
# 1. lint-format — code style, linting, pre-commit
|
| 8 |
+
# 2. type-check — static type analysis (mypy + pyright)
|
| 9 |
+
# 3. security — SAST / dependency scanning
|
| 10 |
+
# 4. tests — full test suite across Python versions (matrix)
|
| 11 |
+
# 5. build — wheel build + install verification
|
| 12 |
+
# 6. docker — Docker image build test
|
| 13 |
+
# 7. docs — documentation structure check
|
| 14 |
+
# ============================================================================
|
| 15 |
+
|
| 16 |
+
name: Continuous Integration
|
| 17 |
+
|
| 18 |
+
on:
|
| 19 |
+
push:
|
| 20 |
+
branches: [main, develop]
|
| 21 |
+
pull_request:
|
| 22 |
+
branches: [main]
|
| 23 |
+
schedule:
|
| 24 |
+
- cron: "0 6 * * 1"
|
| 25 |
+
workflow_dispatch:
|
| 26 |
+
|
| 27 |
+
permissions:
|
| 28 |
+
contents: read
|
| 29 |
+
checks: write
|
| 30 |
+
pull-requests: write
|
| 31 |
+
|
| 32 |
+
env:
|
| 33 |
+
PYTHONUNBUFFERED: "1"
|
| 34 |
+
PIP_NO_WARN_SCRIPT_LOCATION: "1"
|
| 35 |
+
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
| 36 |
+
FORCE_COLOR: "1"
|
| 37 |
+
|
| 38 |
+
defaults:
|
| 39 |
+
run:
|
| 40 |
+
shell: bash
|
| 41 |
+
|
| 42 |
+
jobs:
|
| 43 |
+
lint-format:
|
| 44 |
+
runs-on: ubuntu-latest
|
| 45 |
+
timeout-minutes: 10
|
| 46 |
+
steps:
|
| 47 |
+
- uses: actions/checkout@v7
|
| 48 |
+
- name: Set up Python 3.13
|
| 49 |
+
uses: actions/setup-python@v7
|
| 50 |
+
with:
|
| 51 |
+
python-version: "3.13"
|
| 52 |
+
cache: pip
|
| 53 |
+
cache-dependency-path: |
|
| 54 |
+
pyproject.toml
|
| 55 |
+
requirements.txt
|
| 56 |
+
- name: Install project and development tools
|
| 57 |
+
run: |
|
| 58 |
+
python -m pip install --upgrade pip setuptools wheel
|
| 59 |
+
python -m pip install -e ".[dev,docs]"
|
| 60 |
+
python -m pip install pre-commit bandit
|
| 61 |
+
- name: Black (src + tests + scripts)
|
| 62 |
+
run: python -m black --check src tests scripts
|
| 63 |
+
- name: Ruff (fast linter + isort)
|
| 64 |
+
run: python -m ruff check src/ tests/ scripts/
|
| 65 |
+
- name: Pylint quality threshold
|
| 66 |
+
run: python -m pylint --fail-under=9.0 src
|
| 67 |
+
- name: Pre-commit hooks (all files)
|
| 68 |
+
run: python -m pre_commit run --all-files --show-diff-on-failure
|
| 69 |
+
- name: Whitespace & merge-conflict check
|
| 70 |
+
run: |
|
| 71 |
+
git diff --check
|
| 72 |
+
! grep -rP '^(<<<<<<< |>>>>>>> )|^=======$' src/ tests/ scripts/ --include='*.py' --include='*.md' --include='*.yaml' --include='*.yml'
|
| 73 |
+
- name: Summary
|
| 74 |
+
if: always()
|
| 75 |
+
run: echo "### Lint & Format passed" >> $GITHUB_STEP_SUMMARY
|
| 76 |
+
|
| 77 |
+
type-check:
|
| 78 |
+
runs-on: ubuntu-latest
|
| 79 |
+
timeout-minutes: 15
|
| 80 |
+
steps:
|
| 81 |
+
- uses: actions/checkout@v7
|
| 82 |
+
- name: Set up Python 3.13
|
| 83 |
+
uses: actions/setup-python@v7
|
| 84 |
+
with:
|
| 85 |
+
python-version: "3.13"
|
| 86 |
+
cache: pip
|
| 87 |
+
cache-dependency-path: |
|
| 88 |
+
pyproject.toml
|
| 89 |
+
requirements.txt
|
| 90 |
+
- name: Install project and development tools
|
| 91 |
+
run: |
|
| 92 |
+
python -m pip install --upgrade pip setuptools wheel
|
| 93 |
+
python -m pip install -e ".[dev,docs]"
|
| 94 |
+
- name: Mypy (full src/)
|
| 95 |
+
run: python -m mypy src/
|
| 96 |
+
- name: Pyright (pyrightconfig.json scope)
|
| 97 |
+
run: python -m pyright
|
| 98 |
+
- name: Pyright (integration scope)
|
| 99 |
+
run: |
|
| 100 |
+
python -m pyright \
|
| 101 |
+
src/storage/structural_journal.py \
|
| 102 |
+
src/storage/structural_recovery.py \
|
| 103 |
+
src/storage/core_restore.py \
|
| 104 |
+
src/self_organization/approval.py \
|
| 105 |
+
src/self_organization/undo.py \
|
| 106 |
+
src/self_organization/plasticity.py \
|
| 107 |
+
src/self_organization/coordinator.py \
|
| 108 |
+
src/dashboard/structural_api.py \
|
| 109 |
+
src/dashboard/operator_bridge.py \
|
| 110 |
+
src/dashboard/server.py \
|
| 111 |
+
src/runtime/control.py \
|
| 112 |
+
src/controller/runtime.py \
|
| 113 |
+
src/visualization/structural_heatmap.py
|
| 114 |
+
- name: Summary
|
| 115 |
+
if: always()
|
| 116 |
+
run: echo "### Type Check passed" >> $GITHUB_STEP_SUMMARY
|
| 117 |
+
|
| 118 |
+
security:
|
| 119 |
+
runs-on: ubuntu-latest
|
| 120 |
+
timeout-minutes: 10
|
| 121 |
+
permissions:
|
| 122 |
+
contents: read
|
| 123 |
+
security-events: write
|
| 124 |
+
steps:
|
| 125 |
+
- uses: actions/checkout@v7
|
| 126 |
+
- name: Set up Python 3.13
|
| 127 |
+
uses: actions/setup-python@v7
|
| 128 |
+
with:
|
| 129 |
+
python-version: "3.13"
|
| 130 |
+
cache: pip
|
| 131 |
+
- name: Install tools
|
| 132 |
+
run: |
|
| 133 |
+
python -m pip install --upgrade pip
|
| 134 |
+
python -m pip install bandit pip-audit
|
| 135 |
+
- name: Bandit SAST (src/)
|
| 136 |
+
run: python -m bandit -c pyproject.toml -r src/ -ll -f json -o bandit-results.json
|
| 137 |
+
- name: Upload Bandit report
|
| 138 |
+
if: always()
|
| 139 |
+
uses: actions/upload-artifact@v7
|
| 140 |
+
with:
|
| 141 |
+
name: bandit-results
|
| 142 |
+
path: bandit-results.json
|
| 143 |
+
- name: pip-audit
|
| 144 |
+
run: python -m pip_audit
|
| 145 |
+
- name: Summary
|
| 146 |
+
if: always()
|
| 147 |
+
run: echo "### Security scan completed" >> $GITHUB_STEP_SUMMARY
|
| 148 |
+
|
| 149 |
+
tests:
|
| 150 |
+
runs-on: ubuntu-latest
|
| 151 |
+
timeout-minutes: 30
|
| 152 |
+
strategy:
|
| 153 |
+
fail-fast: false
|
| 154 |
+
matrix:
|
| 155 |
+
python-version: ["3.11", "3.12", "3.13"]
|
| 156 |
+
steps:
|
| 157 |
+
- uses: actions/checkout@v7
|
| 158 |
+
- name: Set up Python ${{ matrix.python-version }}
|
| 159 |
+
uses: actions/setup-python@v7
|
| 160 |
+
with:
|
| 161 |
+
python-version: ${{ matrix.python-version }}
|
| 162 |
+
cache: pip
|
| 163 |
+
cache-dependency-path: |
|
| 164 |
+
pyproject.toml
|
| 165 |
+
requirements.txt
|
| 166 |
+
- name: Install project and dev dependencies
|
| 167 |
+
run: |
|
| 168 |
+
python -m pip install --upgrade pip setuptools wheel
|
| 169 |
+
python -m pip install -e ".[dev,docs]"
|
| 170 |
+
- name: Smoke tests
|
| 171 |
+
run: python -m pytest -m "smoke" -v --tb=short --junit-xml=test-results-smoke.xml
|
| 172 |
+
- name: Full test suite (excluding slow)
|
| 173 |
+
run: python -m pytest -m "not slow" -v --tb=short --junit-xml=test-results-fast.xml --cov=src --cov-report=xml:coverage.xml --cov-report=term-missing:skip-covered
|
| 174 |
+
- name: Slow tests
|
| 175 |
+
run: python -m pytest -m "slow" -v --tb=short --junit-xml=test-results-slow.xml || echo "Some slow tests failed (non-blocking)"
|
| 176 |
+
continue-on-error: true
|
| 177 |
+
- name: Upload test results
|
| 178 |
+
if: always()
|
| 179 |
+
uses: actions/upload-artifact@v7
|
| 180 |
+
with:
|
| 181 |
+
name: test-results-${{ matrix.python-version }}
|
| 182 |
+
path: |
|
| 183 |
+
test-results-*.xml
|
| 184 |
+
coverage.xml
|
| 185 |
+
- name: Publish test report
|
| 186 |
+
if: always()
|
| 187 |
+
uses: dorny/test-reporter@v3
|
| 188 |
+
with:
|
| 189 |
+
name: pytest-report-${{ matrix.python-version }}
|
| 190 |
+
path: test-results-*.xml
|
| 191 |
+
reporter: java-junit
|
| 192 |
+
fail-on-error: false
|
| 193 |
+
only-summary: true
|
| 194 |
+
- name: Summary
|
| 195 |
+
if: always()
|
| 196 |
+
run: |
|
| 197 |
+
echo "### Tests (${{ matrix.python-version }})" >> $GITHUB_STEP_SUMMARY
|
| 198 |
+
python -m pytest --collect-only -q 2>&1 | tail -1 >> $GITHUB_STEP_SUMMARY || true
|
| 199 |
+
|
| 200 |
+
browser:
|
| 201 |
+
runs-on: ubuntu-latest
|
| 202 |
+
timeout-minutes: 15
|
| 203 |
+
steps:
|
| 204 |
+
- uses: actions/checkout@v7
|
| 205 |
+
- name: Set up Python 3.13
|
| 206 |
+
uses: actions/setup-python@v7
|
| 207 |
+
with:
|
| 208 |
+
python-version: "3.13"
|
| 209 |
+
cache: pip
|
| 210 |
+
cache-dependency-path: pyproject.toml
|
| 211 |
+
- name: Install browser check dependencies
|
| 212 |
+
run: |
|
| 213 |
+
python -m pip install --upgrade pip setuptools wheel
|
| 214 |
+
python -m pip install -e ".[browser]"
|
| 215 |
+
python -m playwright install --with-deps chromium
|
| 216 |
+
- name: Run Chromium dashboard smoke check
|
| 217 |
+
run: python scripts/browser_check.py
|
| 218 |
+
- name: Set up Node.js 22
|
| 219 |
+
uses: actions/setup-node@v4
|
| 220 |
+
with:
|
| 221 |
+
node-version: "22"
|
| 222 |
+
cache: npm
|
| 223 |
+
- name: Install dashboard E2E dependencies
|
| 224 |
+
run: npm ci
|
| 225 |
+
- name: Run dashboard Chromium E2E suite
|
| 226 |
+
run: npx playwright install --with-deps chromium && npm run test:e2e
|
| 227 |
+
|
| 228 |
+
large-storage:
|
| 229 |
+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
| 230 |
+
runs-on: ubuntu-latest
|
| 231 |
+
timeout-minutes: 30
|
| 232 |
+
steps:
|
| 233 |
+
- uses: actions/checkout@v7
|
| 234 |
+
- name: Set up Python 3.13
|
| 235 |
+
uses: actions/setup-python@v7
|
| 236 |
+
with:
|
| 237 |
+
python-version: "3.13"
|
| 238 |
+
cache: pip
|
| 239 |
+
cache-dependency-path: |
|
| 240 |
+
pyproject.toml
|
| 241 |
+
requirements.txt
|
| 242 |
+
- name: Install project and development tools
|
| 243 |
+
run: |
|
| 244 |
+
python -m pip install --upgrade pip setuptools wheel
|
| 245 |
+
python -m pip install -e ".[dev]"
|
| 246 |
+
- name: Run opt-in large storage tests
|
| 247 |
+
env:
|
| 248 |
+
BRAIN5D_RUN_LARGE_STORAGE_TESTS: "1"
|
| 249 |
+
BRAIN5D_RUN_LARGE_STORAGE_TEST: "1"
|
| 250 |
+
run: |
|
| 251 |
+
python -m pytest -v --tb=short \
|
| 252 |
+
tests/test_b5d_storage.py::test_large_storage_50k_neurons \
|
| 253 |
+
tests/test_delta_journal.py::test_large_journal_100k_entries_opt_in \
|
| 254 |
+
--junit-xml=large-storage-results.xml
|
| 255 |
+
- name: Upload large storage results
|
| 256 |
+
if: always()
|
| 257 |
+
uses: actions/upload-artifact@v7
|
| 258 |
+
with:
|
| 259 |
+
name: large-storage-results
|
| 260 |
+
path: large-storage-results.xml
|
| 261 |
+
- name: Summary
|
| 262 |
+
if: always()
|
| 263 |
+
run: echo "### Large storage tests completed" >> $GITHUB_STEP_SUMMARY
|
| 264 |
+
|
| 265 |
+
scientific-integrity:
|
| 266 |
+
runs-on: ubuntu-latest
|
| 267 |
+
timeout-minutes: 30
|
| 268 |
+
steps:
|
| 269 |
+
- uses: actions/checkout@v7
|
| 270 |
+
- name: Set up Python 3.13
|
| 271 |
+
uses: actions/setup-python@v7
|
| 272 |
+
with:
|
| 273 |
+
python-version: "3.13"
|
| 274 |
+
cache: pip
|
| 275 |
+
cache-dependency-path: |
|
| 276 |
+
pyproject.toml
|
| 277 |
+
requirements.txt
|
| 278 |
+
- name: Install project and development tools
|
| 279 |
+
run: |
|
| 280 |
+
python -m pip install --upgrade pip setuptools wheel
|
| 281 |
+
python -m pip install -e ".[dev,docs]"
|
| 282 |
+
- name: Scientific Integrity Gate
|
| 283 |
+
run: >-
|
| 284 |
+
python -m pytest -q
|
| 285 |
+
tests/test_canonical_state.py
|
| 286 |
+
tests/test_restore_determinism_abc.py
|
| 287 |
+
tests/test_engine_restore.py
|
| 288 |
+
tests/test_production_restore.py
|
| 289 |
+
tests/test_golden_chain.py
|
| 290 |
+
tests/test_research_registry.py
|
| 291 |
+
tests/test_ai_boundaries.py
|
| 292 |
+
tests/test_ai_governance.py
|
| 293 |
+
tests/test_experiment_validity.py
|
| 294 |
+
- name: Summary
|
| 295 |
+
if: always()
|
| 296 |
+
run: echo "### Scientific Integrity Gate completed" >> $GITHUB_STEP_SUMMARY
|
| 297 |
+
|
| 298 |
+
catalog-audit:
|
| 299 |
+
runs-on: ubuntu-latest
|
| 300 |
+
timeout-minutes: 10
|
| 301 |
+
steps:
|
| 302 |
+
- uses: actions/checkout@v7
|
| 303 |
+
- name: Set up Python 3.13
|
| 304 |
+
uses: actions/setup-python@v7
|
| 305 |
+
with:
|
| 306 |
+
python-version: "3.13"
|
| 307 |
+
cache: pip
|
| 308 |
+
cache-dependency-path: pyproject.toml
|
| 309 |
+
- name: Install project
|
| 310 |
+
run: |
|
| 311 |
+
python -m pip install --upgrade pip setuptools wheel
|
| 312 |
+
python -m pip install -e ".[dev]"
|
| 313 |
+
- name: Generate repository catalog audit report
|
| 314 |
+
run: python scripts/generate_catalog_audit_report.py
|
| 315 |
+
- name: Upload catalog audit reports
|
| 316 |
+
if: always()
|
| 317 |
+
uses: actions/upload-artifact@v7
|
| 318 |
+
with:
|
| 319 |
+
name: catalog-audit-report
|
| 320 |
+
path: |
|
| 321 |
+
research/generated/CATALOG_AUDIT_REPORT.md
|
| 322 |
+
research/generated/CATALOG_AUDIT_REPORT.json
|
| 323 |
+
- name: Add catalog audit to job summary
|
| 324 |
+
if: always()
|
| 325 |
+
run: cat research/generated/CATALOG_AUDIT_REPORT.md >> "$GITHUB_STEP_SUMMARY" || true
|
| 326 |
+
|
| 327 |
+
build:
|
| 328 |
+
runs-on: ubuntu-latest
|
| 329 |
+
timeout-minutes: 10
|
| 330 |
+
needs: [lint-format, type-check, security, tests]
|
| 331 |
+
steps:
|
| 332 |
+
- uses: actions/checkout@v7
|
| 333 |
+
- name: Set up Python 3.13
|
| 334 |
+
uses: actions/setup-python@v7
|
| 335 |
+
with:
|
| 336 |
+
python-version: "3.13"
|
| 337 |
+
- name: Build wheel
|
| 338 |
+
run: |
|
| 339 |
+
python -m pip install --upgrade pip build
|
| 340 |
+
python -m build
|
| 341 |
+
- name: Verify wheel installs cleanly
|
| 342 |
+
run: |
|
| 343 |
+
python -m pip install dist/*.whl
|
| 344 |
+
python -c "from src.version import BRAIN5D_VERSION; print(BRAIN5D_VERSION)"
|
| 345 |
+
- name: Upload wheel artifact
|
| 346 |
+
uses: actions/upload-artifact@v7
|
| 347 |
+
with:
|
| 348 |
+
name: wheel
|
| 349 |
+
path: dist/*.whl
|
| 350 |
+
- name: Summary
|
| 351 |
+
run: |
|
| 352 |
+
echo "### Build successful" >> $GITHUB_STEP_SUMMARY
|
| 353 |
+
echo "Wheel: $(ls dist/*.whl)" >> $GITHUB_STEP_SUMMARY
|
| 354 |
+
|
| 355 |
+
docker:
|
| 356 |
+
runs-on: ubuntu-latest
|
| 357 |
+
timeout-minutes: 15
|
| 358 |
+
needs: [build]
|
| 359 |
+
steps:
|
| 360 |
+
- uses: actions/checkout@v7
|
| 361 |
+
- name: Download wheel artifact
|
| 362 |
+
uses: actions/download-artifact@v8
|
| 363 |
+
with:
|
| 364 |
+
name: wheel
|
| 365 |
+
path: dist/
|
| 366 |
+
- name: Set up Docker Buildx
|
| 367 |
+
uses: docker/setup-buildx-action@v4
|
| 368 |
+
- name: Build Docker image
|
| 369 |
+
uses: docker/build-push-action@v7
|
| 370 |
+
with:
|
| 371 |
+
context: .
|
| 372 |
+
load: true
|
| 373 |
+
tags: brain5d:ci
|
| 374 |
+
cache-from: type=gha
|
| 375 |
+
cache-to: type=gha,mode=max
|
| 376 |
+
- name: Verify Docker image runs
|
| 377 |
+
run: |
|
| 378 |
+
docker run --rm brain5d:ci python -c "
|
| 379 |
+
from src.core.neuron import Neuron;
|
| 380 |
+
from src.core.network import NeuralNetwork;
|
| 381 |
+
from src.storage.b5d import B5DReader;
|
| 382 |
+
from src.homeostasis.engine import HomeostasisEngine;
|
| 383 |
+
print('Docker image OK');
|
| 384 |
+
"
|
| 385 |
+
- name: Summary
|
| 386 |
+
run: |
|
| 387 |
+
echo "### Docker build passed" >> $GITHUB_STEP_SUMMARY
|
| 388 |
+
echo "Image: brain5d:ci" >> $GITHUB_STEP_SUMMARY
|
| 389 |
+
|
| 390 |
+
docs:
|
| 391 |
+
runs-on: ubuntu-latest
|
| 392 |
+
timeout-minutes: 10
|
| 393 |
+
steps:
|
| 394 |
+
- uses: actions/checkout@v7
|
| 395 |
+
- name: Set up Python 3.13
|
| 396 |
+
uses: actions/setup-python@v7
|
| 397 |
+
with:
|
| 398 |
+
python-version: "3.13"
|
| 399 |
+
- name: Install documentation check dependencies
|
| 400 |
+
run: |
|
| 401 |
+
python -m pip install --upgrade pip setuptools wheel
|
| 402 |
+
python -m pip install -e ".[dev]"
|
| 403 |
+
- name: Check documentation links and consistency
|
| 404 |
+
run: |
|
| 405 |
+
python scripts/check_doc_consistency.py --check-tests
|
| 406 |
+
echo "### Documentation structure" >> $GITHUB_STEP_SUMMARY
|
| 407 |
+
find docs/ -name "*.md" -type f | sort | head -50 >> $GITHUB_STEP_SUMMARY || true
|
| 408 |
+
|
| 409 |
+
ci-status:
|
| 410 |
+
if: always()
|
| 411 |
+
runs-on: ubuntu-latest
|
| 412 |
+
needs: [lint-format, type-check, security, tests, large-storage, scientific-integrity, catalog-audit, build, docker, docs]
|
| 413 |
+
steps:
|
| 414 |
+
- name: CI Pipeline Summary
|
| 415 |
+
run: |
|
| 416 |
+
echo "## CI Pipeline Summary" >> $GITHUB_STEP_SUMMARY
|
| 417 |
+
echo "" >> $GITHUB_STEP_SUMMARY
|
| 418 |
+
declare -A RESULTS
|
| 419 |
+
RESULTS["lint-format"]="${{ needs.lint-format.result }}"
|
| 420 |
+
RESULTS["type-check"]="${{ needs.type-check.result }}"
|
| 421 |
+
RESULTS["security"]="${{ needs.security.result }}"
|
| 422 |
+
RESULTS["tests"]="${{ needs.tests.result }}"
|
| 423 |
+
RESULTS["large-storage"]="${{ needs.large-storage.result }}"
|
| 424 |
+
RESULTS["scientific-integrity"]="${{ needs.scientific-integrity.result }}"
|
| 425 |
+
RESULTS["catalog-audit"]="${{ needs.catalog-audit.result }}"
|
| 426 |
+
RESULTS["build"]="${{ needs.build.result }}"
|
| 427 |
+
RESULTS["docker"]="${{ needs.docker.result }}"
|
| 428 |
+
RESULTS["docs"]="${{ needs.docs.result }}"
|
| 429 |
+
ALL_PASSED=true
|
| 430 |
+
for JOB in "${!RESULTS[@]}"; do
|
| 431 |
+
STATUS="${RESULTS[$JOB]}"
|
| 432 |
+
if [ "$STATUS" = "success" ]; then
|
| 433 |
+
echo "- **$JOB** — passed" >> $GITHUB_STEP_SUMMARY
|
| 434 |
+
elif [ "$STATUS" = "skipped" ]; then
|
| 435 |
+
echo "- **$JOB** — skipped" >> $GITHUB_STEP_SUMMARY
|
| 436 |
+
else
|
| 437 |
+
echo "- **$JOB** — $STATUS" >> $GITHUB_STEP_SUMMARY
|
| 438 |
+
ALL_PASSED=false
|
| 439 |
+
fi
|
| 440 |
+
done
|
| 441 |
+
echo "" >> $GITHUB_STEP_SUMMARY
|
| 442 |
+
if [ "$ALL_PASSED" = true ]; then
|
| 443 |
+
echo "**All CI checks passed!**" >> $GITHUB_STEP_SUMMARY
|
| 444 |
+
else
|
| 445 |
+
echo "**Some checks did not pass — review logs above.**" >> $GITHUB_STEP_SUMMARY
|
| 446 |
+
exit 1
|
| 447 |
+
fi
|
.github/workflows/repository-snapshot.yml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Repository source snapshot
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [main]
|
| 6 |
+
paths:
|
| 7 |
+
- .github/workflows/repository-snapshot.yml
|
| 8 |
+
workflow_dispatch:
|
| 9 |
+
|
| 10 |
+
permissions:
|
| 11 |
+
contents: read
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
snapshot:
|
| 15 |
+
runs-on: ubuntu-latest
|
| 16 |
+
timeout-minutes: 10
|
| 17 |
+
steps:
|
| 18 |
+
- uses: actions/checkout@v7
|
| 19 |
+
with:
|
| 20 |
+
fetch-depth: 0
|
| 21 |
+
persist-credentials: false
|
| 22 |
+
- uses: actions/setup-python@v7
|
| 23 |
+
with:
|
| 24 |
+
python-version: '3.13'
|
| 25 |
+
- name: Export verification wheels
|
| 26 |
+
run: |
|
| 27 |
+
python -m pip download --only-binary=:all: --dest "$RUNNER_TEMP/wheelhouse" black mypy pylint pyright ruff types-PyYAML types-psutil build setuptools wheel bandit
|
| 28 |
+
- name: Export versioned sources and history without credentials
|
| 29 |
+
shell: bash
|
| 30 |
+
run: |
|
| 31 |
+
mkdir -p "$RUNNER_TEMP/source-snapshot"
|
| 32 |
+
git bundle create "$RUNNER_TEMP/source-snapshot/repository.bundle" --all
|
| 33 |
+
git rev-parse HEAD > "$RUNNER_TEMP/source-snapshot/HEAD.txt"
|
| 34 |
+
- uses: actions/upload-artifact@v7
|
| 35 |
+
with:
|
| 36 |
+
name: verification-wheels
|
| 37 |
+
path: ${{ runner.temp }}/wheelhouse/
|
| 38 |
+
retention-days: 3
|
| 39 |
+
- uses: actions/upload-artifact@v7
|
| 40 |
+
with:
|
| 41 |
+
name: repository-source-${{ github.sha }}
|
| 42 |
+
path: ${{ runner.temp }}/source-snapshot/
|
| 43 |
+
retention-days: 3
|
.github/workflows/sync-huggingface.yml
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ============================================================================
|
| 2 |
+
# Brain-5D — optional GitHub -> Hugging Face mirror
|
| 3 |
+
# ============================================================================
|
| 4 |
+
# The GitHub repository is canonical. The mirror runs after pushes to main only
|
| 5 |
+
# when both HF_USERNAME and HF_TOKEN are configured as Actions secrets.
|
| 6 |
+
# Missing mirror credentials are not a failure of Brain-5D itself.
|
| 7 |
+
# ============================================================================
|
| 8 |
+
|
| 9 |
+
name: Sync to Hugging Face
|
| 10 |
+
|
| 11 |
+
on:
|
| 12 |
+
push:
|
| 13 |
+
branches: [main]
|
| 14 |
+
workflow_dispatch:
|
| 15 |
+
|
| 16 |
+
jobs:
|
| 17 |
+
sync:
|
| 18 |
+
runs-on: ubuntu-latest
|
| 19 |
+
steps:
|
| 20 |
+
- name: Checkout GitHub Repository
|
| 21 |
+
uses: actions/checkout@v7
|
| 22 |
+
with:
|
| 23 |
+
fetch-depth: 0
|
| 24 |
+
lfs: true
|
| 25 |
+
|
| 26 |
+
- name: Push to Hugging Face when configured
|
| 27 |
+
env:
|
| 28 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 29 |
+
HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
| 30 |
+
HF_REPO: Brain-5D
|
| 31 |
+
HF_SPACE_REPO: Brain-5D-Space
|
| 32 |
+
run: |
|
| 33 |
+
set -e
|
| 34 |
+
|
| 35 |
+
if [ -z "${HF_USERNAME}" ] || [ -z "${HF_TOKEN}" ]; then
|
| 36 |
+
echo "::notice::Hugging Face mirror is not configured; skipping optional sync."
|
| 37 |
+
exit 0
|
| 38 |
+
fi
|
| 39 |
+
|
| 40 |
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
| 41 |
+
git config --global user.name "github-actions[bot]"
|
| 42 |
+
|
| 43 |
+
# Hugging Face rejects binary blobs in older Git history. Publish a
|
| 44 |
+
# fresh source snapshot so every current binary passes the LFS filter.
|
| 45 |
+
mirror_dir="$(mktemp -d)"
|
| 46 |
+
find . -mindepth 1 -maxdepth 1 ! -name .git -exec cp -a {} "$mirror_dir"/ \;
|
| 47 |
+
if [ -f "$mirror_dir/HF_README.md" ]; then
|
| 48 |
+
cp "$mirror_dir/HF_README.md" "$mirror_dir/README.md"
|
| 49 |
+
fi
|
| 50 |
+
|
| 51 |
+
git -C "$mirror_dir" init --initial-branch=main
|
| 52 |
+
git -C "$mirror_dir" lfs install --local
|
| 53 |
+
git -C "$mirror_dir" config user.email "github-actions[bot]@users.noreply.github.com"
|
| 54 |
+
git -C "$mirror_dir" config user.name "github-actions[bot]"
|
| 55 |
+
git -C "$mirror_dir" remote add huggingface \
|
| 56 |
+
"https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/${HF_USERNAME}/${HF_REPO}"
|
| 57 |
+
git -C "$mirror_dir" remote add huggingface-space \
|
| 58 |
+
"https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE_REPO}"
|
| 59 |
+
git -C "$mirror_dir" add --all --force
|
| 60 |
+
git -C "$mirror_dir" commit -m "Sync: mirror GitHub main"
|
| 61 |
+
|
| 62 |
+
git -C "$mirror_dir" push huggingface HEAD:main --force
|
| 63 |
+
git -C "$mirror_dir" lfs push --all huggingface HEAD
|
| 64 |
+
git -C "$mirror_dir" push huggingface-space HEAD:main --force
|
| 65 |
+
git -C "$mirror_dir" lfs push --all huggingface-space HEAD
|
.gitignore
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Python bytecode and caches
|
| 2 |
+
__pycache__/
|
| 3 |
+
*.py[cod]
|
| 4 |
+
.pytest_cache/
|
| 5 |
+
.mypy_cache/
|
| 6 |
+
.pyright/
|
| 7 |
+
.ruff_cache/
|
| 8 |
+
|
| 9 |
+
# Coverage
|
| 10 |
+
.coverage
|
| 11 |
+
.coverage.*
|
| 12 |
+
htmlcov/
|
| 13 |
+
|
| 14 |
+
# Packaging/build output
|
| 15 |
+
build/
|
| 16 |
+
dist/
|
| 17 |
+
*.egg-info/
|
| 18 |
+
.eggs/
|
| 19 |
+
|
| 20 |
+
# Virtual environments
|
| 21 |
+
.venv/
|
| 22 |
+
venv/
|
| 23 |
+
|
| 24 |
+
# IDE/editor state
|
| 25 |
+
.vscode/
|
| 26 |
+
.idea/
|
| 27 |
+
*.swp
|
| 28 |
+
*.swo
|
| 29 |
+
*~
|
| 30 |
+
|
| 31 |
+
# Environment files (secrets, local config)
|
| 32 |
+
.env
|
| 33 |
+
.env.*
|
| 34 |
+
.python-version
|
| 35 |
+
|
| 36 |
+
# Logs
|
| 37 |
+
*.log
|
| 38 |
+
|
| 39 |
+
# Runtime artifacts
|
| 40 |
+
artifacts/
|
| 41 |
+
*.b5d
|
| 42 |
+
*.b5d.journal
|
| 43 |
+
*.tmp
|
| 44 |
+
tmp/restore_diag/
|
| 45 |
+
tmp/trace_diag/
|
| 46 |
+
|
| 47 |
+
# Generated experiment data
|
| 48 |
+
research/experiments/EXP-GEN-0019/DATA/runs.json
|
| 49 |
+
research/experiments/*/DATA/runs.json
|
| 50 |
+
|
| 51 |
+
# OS noise
|
| 52 |
+
.DS_Store
|
| 53 |
+
Thumbs.db
|
| 54 |
+
|
| 55 |
+
# Pre-commit
|
| 56 |
+
.pre-commit-config.yaml.bak
|
.huggingface/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hugging Face Repository Konfiguration
|
| 2 |
+
|
| 3 |
+
Dieses Verzeichnis enthält Konfigurationsdateien für das Hugging Face Repository von Brain-5D.
|
| 4 |
+
|
| 5 |
+
## Dateien
|
| 6 |
+
|
| 7 |
+
- `metadata.yaml` — Hugging Face Card Metadata (Tags, Lizenzen, etc.)
|
| 8 |
+
|
| 9 |
+
## Hinweise
|
| 10 |
+
|
| 11 |
+
- **Haupt-README**: Die Datei `HF_README.md` im Projektstamm ist die Hugging Face-spezifische README.
|
| 12 |
+
- **Kanonische Quelle**: GitHub `main` ist die Quelle der Wahrheit; Hugging Face wird daraus gespiegelt.
|
| 13 |
+
- **LICENSE**: MIT-Lizenz — bereits im Projektstamm vorhanden.
|
| 14 |
+
- **Git LFS**: `.gitattributes` im Projektstamm konfiguriert Git LFS für große Dateien.
|
| 15 |
+
|
| 16 |
+
Die GitHub-Aktion `.github/workflows/sync-huggingface.yml` veröffentlicht den aktuellen
|
| 17 |
+
Quellbaum und alle erreichbaren Git-LFS-Objekte. Dafür müssen `HF_USERNAME` und `HF_TOKEN`
|
| 18 |
+
als Actions Secrets hinterlegt sein.
|
| 19 |
+
|
| 20 |
+
## Erstellung des Hugging Face Repositories
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
# Hugging Face CLI installieren
|
| 24 |
+
pip install huggingface-hub
|
| 25 |
+
|
| 26 |
+
# Einloggen
|
| 27 |
+
huggingface-cli login
|
| 28 |
+
|
| 29 |
+
# Repository erstellen (einmalig)
|
| 30 |
+
huggingface-cli repo create Brain-5D --type model --organization <your-org>
|
| 31 |
+
|
| 32 |
+
# Zum lokalen HF-Zweig pushen
|
| 33 |
+
git remote add huggingface https://huggingface.co/<your-org>/Brain-5D
|
| 34 |
+
git push huggingface main
|
| 35 |
+
```
|
.huggingface/metadata.yaml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ============================================================================
|
| 2 |
+
# Brain-5D — Hugging Face Repository Metadata
|
| 3 |
+
# ============================================================================
|
| 4 |
+
# Diese Datei definiert die Metadaten für das Hugging Face Repository.
|
| 5 |
+
# Sie wird von huggingface_hub ausgelesen, wenn vorhanden.
|
| 6 |
+
# ============================================================================
|
| 7 |
+
|
| 8 |
+
# Lizenz
|
| 9 |
+
license: mit
|
| 10 |
+
|
| 11 |
+
# Sprachen
|
| 12 |
+
language:
|
| 13 |
+
- en
|
| 14 |
+
|
| 15 |
+
# Bibliotheksname (für huggingface_hub Integration)
|
| 16 |
+
library_name: brain5d-core
|
| 17 |
+
|
| 18 |
+
# Pipeline-Tag (welche Art von ML-Aufgabe)
|
| 19 |
+
pipeline_tag: reinforcement-learning
|
| 20 |
+
|
| 21 |
+
# Tags für die Auffindbarkeit
|
| 22 |
+
tags:
|
| 23 |
+
- spiking-neural-networks
|
| 24 |
+
- STDP
|
| 25 |
+
- structural-plasticity
|
| 26 |
+
- homeostasis
|
| 27 |
+
- neuromorphic
|
| 28 |
+
- simulation
|
| 29 |
+
- 5D
|
| 30 |
+
- neuroscience
|
| 31 |
+
- brain-inspired
|
| 32 |
+
- pytorch
|
| 33 |
+
- numpy
|
| 34 |
+
|
| 35 |
+
# Karteikasten-Informationen
|
| 36 |
+
card:
|
| 37 |
+
title: "Brain-5D: Sparse 5D Spiking-Neural Simulation with Observable Plasticity"
|
| 38 |
+
summary: >
|
| 39 |
+
An experimental spiking-neural simulation platform operating in a sparse
|
| 40 |
+
5D coordinate space. Combines spiking dynamics, STDP, homeostatic
|
| 41 |
+
regulation, structural self-organization, and deterministic persistence.
|
| 42 |
+
authors:
|
| 43 |
+
- name: Thomas Heisig
|
| 44 |
+
base_model: null
|
| 45 |
+
datasets: null
|
| 46 |
+
metrics:
|
| 47 |
+
- accuracy
|
| 48 |
+
- loss
|
| 49 |
+
inference: false
|
.huggingface/space_config.yaml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ============================================================================
|
| 2 |
+
# Brain-5D — Hugging Face Space Configuration
|
| 3 |
+
# ============================================================================
|
| 4 |
+
# Diese Konfiguration definiert einen optionalen Hugging Face Space,
|
| 5 |
+
# der den Brain-5D Operator Dashboard als Web-App bereitstellt.
|
| 6 |
+
#
|
| 7 |
+
# Space: https://huggingface.co/spaces/superdigger/Brain-5D-Space
|
| 8 |
+
# Dieses Space wird als separates Repository vom kanonischen GitHub-Branch gespeist.
|
| 9 |
+
# ============================================================================
|
| 10 |
+
|
| 11 |
+
# SDK-Typ (docker, streamlit, gradio, static)
|
| 12 |
+
sdk: docker
|
| 13 |
+
|
| 14 |
+
# Dockerfile-Pfad (relativ zum Space-Root)
|
| 15 |
+
dockerfile: Dockerfile
|
| 16 |
+
|
| 17 |
+
# Container Port (muss mit EXPOSE im Dockerfile übereinstimmen)
|
| 18 |
+
port: 8765
|
| 19 |
+
|
| 20 |
+
# Startup Command
|
| 21 |
+
command: python -m src.main --config configs/poc_config.yaml
|
| 22 |
+
|
| 23 |
+
# Umgebungsvariablen
|
| 24 |
+
env:
|
| 25 |
+
- name: BRAIN5D_HEADLESS
|
| 26 |
+
value: "false"
|
| 27 |
+
- name: BRAIN5D_DASHBOARD_PORT
|
| 28 |
+
value: "8765"
|
| 29 |
+
- name: BRAIN5D_DASHBOARD_HOST
|
| 30 |
+
value: "0.0.0.0"
|
| 31 |
+
|
| 32 |
+
# Hardware-Anforderungen
|
| 33 |
+
hardware:
|
| 34 |
+
cpu: "basic" # basic, medium, large
|
| 35 |
+
memory: "8GB"
|
| 36 |
+
gpu: false
|
| 37 |
+
|
| 38 |
+
# Ländereinstellung
|
| 39 |
+
country: "us"
|
.lla-embeddings.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"model":"nomic-embed-text","savedAt":1786906736999,"files":[]}
|
.lla-index.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{}
|
.lla-profile.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"hasTailwind": false,
|
| 3 |
+
"cnUtilityPath": null,
|
| 4 |
+
"cnImportStatement": null,
|
| 5 |
+
"hasCssModules": false,
|
| 6 |
+
"namedExportConvention": true,
|
| 7 |
+
"existingVariants": [],
|
| 8 |
+
"detectedAt": "2026-08-16T18:58:56.999Z"
|
| 9 |
+
}
|
.pre-commit-config.yaml
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Pre-commit hooks for Brain-5D.
|
| 2 |
+
#
|
| 3 |
+
# Install: pip install pre-commit && pre-commit install
|
| 4 |
+
# Run all: pre-commit run --all-files
|
| 5 |
+
#
|
| 6 |
+
# Documentation: https://pre-commit.com
|
| 7 |
+
|
| 8 |
+
repos:
|
| 9 |
+
# Auto-format: Black
|
| 10 |
+
- repo: https://github.com/psf/black
|
| 11 |
+
rev: 24.10.0
|
| 12 |
+
hooks:
|
| 13 |
+
- id: black
|
| 14 |
+
language_version: python3.13
|
| 15 |
+
args: [--check]
|
| 16 |
+
|
| 17 |
+
# Lint: Ruff
|
| 18 |
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
| 19 |
+
rev: v0.6.0
|
| 20 |
+
hooks:
|
| 21 |
+
- id: ruff
|
| 22 |
+
args: [--fix]
|
| 23 |
+
|
| 24 |
+
# Type check: mypy
|
| 25 |
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
| 26 |
+
rev: v1.13.0
|
| 27 |
+
hooks:
|
| 28 |
+
- id: mypy
|
| 29 |
+
args: [src/]
|
| 30 |
+
pass_filenames: false
|
| 31 |
+
additional_dependencies:
|
| 32 |
+
- types-PyYAML
|
| 33 |
+
- types-psutil
|
| 34 |
+
- numpy>=1.26
|
| 35 |
+
- matplotlib>=3.8
|
| 36 |
+
- python-docx>=1.2.0
|
| 37 |
+
- PyPDF2>=3.0.1
|
| 38 |
+
|
| 39 |
+
# Trailing whitespace, EOF newline, merge conflicts
|
| 40 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
| 41 |
+
rev: v5.0.0
|
| 42 |
+
hooks:
|
| 43 |
+
- id: trailing-whitespace
|
| 44 |
+
args: [--markdown-linebreak-ext=md]
|
| 45 |
+
- id: end-of-file-fixer
|
| 46 |
+
# Frozen experiment manifests are evidence artifacts and must not be
|
| 47 |
+
# byte-rewritten by an automatic formatting hook.
|
| 48 |
+
exclude: ^(research/generated/verification/(restore_determinism|single_listener|structural_e2e|structural_live_loop)\.json|research/experiments/.+/manifest\.json)$
|
| 49 |
+
- id: check-merge-conflict
|
| 50 |
+
- id: check-yaml
|
| 51 |
+
- id: check-toml
|
| 52 |
+
- id: check-added-large-files
|
| 53 |
+
args: [--maxkb=500]
|
AUTHORS.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Authors
|
| 2 |
+
|
| 3 |
+
## Maintainer
|
| 4 |
+
|
| 5 |
+
- **Thomas Heisig** — Project lead, architecture, core development
|
| 6 |
+
|
| 7 |
+
## Contributors
|
| 8 |
+
|
| 9 |
+
*This list is updated as contributions are received.*
|
| 10 |
+
|
| 11 |
+
To contribute, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
| 12 |
+
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## Citation
|
| 16 |
+
|
| 17 |
+
If you use Brain-5D in your research, please see [CITATION.cff](CITATION.cff)
|
| 18 |
+
for the preferred citation format.
|
CHANGELOG.md
ADDED
|
@@ -0,0 +1,554 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Changelog
|
| 2 |
+
|
| 3 |
+
## Unreleased
|
| 4 |
+
|
| 5 |
+
### Added
|
| 6 |
+
|
| 7 |
+
- **Effective runtime provenance and learning observability**: `/api/config`
|
| 8 |
+
now exposes the loaded absolute config path and SHA-256. Dashboard state
|
| 9 |
+
distinguishes attached Learning Engine, enabled STDP/Eligibility/Reward, and
|
| 10 |
+
measured STDP/Reward weight updates. A missing inhibitory population is
|
| 11 |
+
displayed as unavailable E/I rather than clearing the live population view.
|
| 12 |
+
|
| 13 |
+
### Fixed
|
| 14 |
+
|
| 15 |
+
- **AIRR-Promptgröße**: Große Rohdatensequenzen werden für die nachgelagerte
|
| 16 |
+
KI-Interpretation mit Anzahl sowie Kopf-/End-Sample kompakt dargestellt.
|
| 17 |
+
`DATA/runs.json` und seine Provenienz bleiben unverändert; dadurch können
|
| 18 |
+
Experimente mit langen Temporal-Traces nicht mehr allein an der Ollama-
|
| 19 |
+
Kontextgröße mit HTTP 500 scheitern.
|
| 20 |
+
|
| 21 |
+
- **Learning profile loader**: validated configuration now preserves
|
| 22 |
+
`stdp.enabled`, weight bounds, and all `reward` fields, so the effective
|
| 23 |
+
LearningEngine configuration matches `poc_alpha5_live.yaml` after restart.
|
| 24 |
+
|
| 25 |
+
- **Scientific Research Assistant v0**: A separate read-only assistant builds
|
| 26 |
+
deterministic `ResearchPacket` inputs and stores schema-validated `AIAR-*`
|
| 27 |
+
records under `research/analysis/`. Its optional local Ollama adapter returns
|
| 28 |
+
interpretation JSON only; it cannot execute experiments, alter runtime or
|
| 29 |
+
registry state, create evidence, or answer research questions. Every record
|
| 30 |
+
carries prompt and input digests and requires human review.
|
| 31 |
+
- **AI-assisted research foundation**: `RQ-AIR-001`, `H-AIR-001-A`, and
|
| 32 |
+
`CLAIM-AIR-001` now define a structured-versus-unstructured methodological
|
| 33 |
+
review study. `AIR-METHODOLOGY-GOLD-V1` provides 30 held-out, labelled cases;
|
| 34 |
+
no model has received the labels and no benchmark evidence has been created.
|
| 35 |
+
- **AIR benchmark safeguards**: The pre-registered `EXP-AIR-0001` protocol
|
| 36 |
+
denies assistant access to gold labels, includes 21 defective and 9 negative
|
| 37 |
+
control cases, and requires three repetitions per case/condition with frozen
|
| 38 |
+
SHA, external CI success, and full model/sampling provenance before execution.
|
| 39 |
+
|
| 40 |
+
- **Research Experiment Runner**: The RESEARCH workspace now provides the
|
| 41 |
+
traceable workflow Forschungsfrage -> Bedingungen -> Experiment ->
|
| 42 |
+
Ausfuehren -> Bericht -> Ergebnis. A run validates research-question and
|
| 43 |
+
hypothesis links against the registry, permits only bounded
|
| 44 |
+
`controller.step(ticks)` execution, and writes `workflow.json`,
|
| 45 |
+
`manifest.json`, and `report.md` under `research/experiments/EXP-*/`.
|
| 46 |
+
Optional Ollama assistance has no execution, configuration, or evidence
|
| 47 |
+
authority.
|
| 48 |
+
- **First registered STDP pilot**: `EXP-STDP-0001` ran the deterministic
|
| 49 |
+
`stdp_pair_timing_v1` protocol with 11 timing conditions and 10 identical
|
| 50 |
+
repeated evaluations each. It produced `DATA-2026-17` and a detailed pilot
|
| 51 |
+
report, but no EVID: the source tree was dirty and the evaluations were not
|
| 52 |
+
independent runs. Evidence generation now fails closed for dirty Git trees
|
| 53 |
+
and distinguishes deterministic verification from stochastic and
|
| 54 |
+
observational experiments.
|
| 55 |
+
|
| 56 |
+
## v0.5.0-alpha.5 - Dashboard State & Health Repair (2026-08-30)
|
| 57 |
+
|
| 58 |
+
### Fixed
|
| 59 |
+
|
| 60 |
+
- **Dashboard offline / stale PID**: `artifacts/brain5d.pid` wurde nicht
|
| 61 |
+
bereinigt, wenn der Prozess extern beendet wurde. Der Port war blockiert
|
| 62 |
+
durch einen verwaisten Prozess. Empfohlene Abhilfe: Prozess hart beenden
|
| 63 |
+
und neu starten; `stop.cmd` wurde verbessert, indem es den Fehlerfall
|
| 64 |
+
robuster meldet.
|
| 65 |
+
- **Checkpoint-Tests**: `MockNeuron` in `tests/test_checkpoint_v4.py`,
|
| 66 |
+
`tests/test_rng_persistence.py` und die lokale `Neuron`-Klasse in
|
| 67 |
+
`tests/test_checkpoint.py` fehlten Felder, die `capture_runtime_checkpoint`
|
| 68 |
+
seit Checkpoint v4 erwartet (`firing_rate_estimate`, `_spike_count_window`,
|
| 69 |
+
`_last_update_tick`, `pre_trace`, `post_trace`). Alle 452 Tests laufen
|
| 70 |
+
jetzt grün.
|
| 71 |
+
- **Dashboard Health unavailable**: Veröffentlichte Snapshots wurden nicht
|
| 72 |
+
mit `enrich_snapshot()` angereichert, daher blieb `health.overall`
|
| 73 |
+
auf `unknown`. `publish_state()` reichert jetzt automatisch Components,
|
| 74 |
+
Parameters und Health an; `src/main.py` übergibt die Runtime-Config an
|
| 75 |
+
den StateManager.
|
| 76 |
+
- **Health-State-Semantik**: `enabled ≠ active` und
|
| 77 |
+
`unavailable ≠ disabled` werden jetzt korrekt unterschieden. Learning,
|
| 78 |
+
Homeostasis, Structural und Storage lesen `enabled` aus der Config und
|
| 79 |
+
`active` aus den Runtime-Metriken. Deaktivierte Komponenten melden
|
| 80 |
+
`disabled` mit `source: config`.
|
| 81 |
+
- **Neuer API-Endpoint**: `/api/state` liefert den vollständigen
|
| 82 |
+
angereicherten Dashboard-Snapshot für den Frontend-StateStore.
|
| 83 |
+
|
| 84 |
+
## v0.5.0-alpha.5 - Dashboard Operator-Workbench Design Decision (2026-08-30)
|
| 85 |
+
|
| 86 |
+
### Planned
|
| 87 |
+
|
| 88 |
+
- Dashboard architecture decision recorded in `docs/07-changelog/CHANGELOG.md`:
|
| 89 |
+
workflow-oriented operator workbench (`OVERVIEW | NETWORK | CONTROL | RESEARCH | VERIFY`)
|
| 90 |
+
with `StatusModel`, `StateStore`, `ParameterSchema`, `Health/Problems Drawer`,
|
| 91 |
+
unified Control/Console, pending-changes workflow, experiment mode, and
|
| 92 |
+
domain-driven frontend modularization.
|
| 93 |
+
- See `docs/08-roadmap/TODO.md` and `docs/08-roadmap/ROADMAP.md` for detailed task list
|
| 94 |
+
and alpha.6 milestone scope.
|
| 95 |
+
|
| 96 |
+
## v0.5.0-alpha.5 - Scientific Verification Infrastructure (2026-08-26)
|
| 97 |
+
|
| 98 |
+
### Added
|
| 99 |
+
|
| 100 |
+
- **Scientific error integrity** (Phase 1):
|
| 101 |
+
- `ExperimentRecorder.record_runtime_error()` — captures structured RuntimeErrorEvents
|
| 102 |
+
- `ExperimentRecorder.mark_completed()` / `mark_failed()` — explicit status semantics
|
| 103 |
+
- `validity` field in manifest: `valid`, `reason`, `runtime_error_count`, `fatal_error_count`
|
| 104 |
+
- `EvidenceEngine` rejects template/not_started/running/failed/invalid experiments
|
| 105 |
+
- Only `completed` + `valid` experiments can produce `EVID-*` evidence
|
| 106 |
+
- Tests: `test_experiment_validity.py` (21 tests)
|
| 107 |
+
|
| 108 |
+
- **Research fail-fast mode** (Phase 2):
|
| 109 |
+
- `ExperimentRecorder(fail_fast=True)` — auto-invalidates on first runtime error
|
| 110 |
+
- Default mode (`fail_fast=False`) captures errors without stopping
|
| 111 |
+
|
| 112 |
+
- **Canonical scientific state definition** (Phase 3-4):
|
| 113 |
+
- `src/research/canonical_state.py` — defines `State(t)` contract
|
| 114 |
+
- `canonical_state_digest()` — SHA-256 of full scientific runtime state
|
| 115 |
+
- Deterministic serialization: sorted neurons, synapses, events
|
| 116 |
+
- No memory addresses, no repr(), no wall-clock timestamps
|
| 117 |
+
- Tests: `test_canonical_state.py` (17 tests)
|
| 118 |
+
|
| 119 |
+
- **Full RNG state persistence** (Phase 5):
|
| 120 |
+
- Checkpoint captures `rng.getstate()` — complete `random.Random` state
|
| 121 |
+
- Restore via `rng.setstate()` — exact bitwise equality
|
| 122 |
+
- Tests: `test_rng_persistence.py` (6 tests)
|
| 123 |
+
|
| 124 |
+
- **Iteration-order determinism** (Phase 6):
|
| 125 |
+
- Verified neuron/synapse/event iteration produces identical sequences
|
| 126 |
+
- Three independent runs produce identical canonical digests
|
| 127 |
+
- Tests: `test_iteration_determinism.py` (8 tests)
|
| 128 |
+
|
| 129 |
+
- **Structural determinism** (Phase 7):
|
| 130 |
+
- Same initial state + config + RNG → same proposals, mutations, topology
|
| 131 |
+
- N >= 3 independent runs produce identical results
|
| 132 |
+
- Tests: `test_structural_determinism.py` (5 tests)
|
| 133 |
+
|
| 134 |
+
- **Checkpoint v4 — homeostasis + learning state** (Phase 8):
|
| 135 |
+
- `HomeostasisRuntimeRecord` — per-neuron smoothed firing rates
|
| 136 |
+
- `LearningRuntimeRecord` — STDP traces, eligibility values
|
| 137 |
+
- Backward compatible with v3 checkpoints
|
| 138 |
+
- Tests: `test_checkpoint_v4.py` (7 tests)
|
| 139 |
+
|
| 140 |
+
### Fixed
|
| 141 |
+
|
| 142 |
+
- **Version inconsistency** (`src/main.py`): corrected `"v0.5.0-alpha.1"` to `"v0.5.0-alpha.5"` in startup banner
|
| 143 |
+
- **Duplicate startup print removed** (`src/main.py`): removed hardcoded `:8765` print that duplicated the dynamic-port print below it
|
| 144 |
+
- **Listener parsing hardened** (`tests/test_single_listener.py`): `_get_listener_pids()` now checks for local address (`127.0.0.1:{port}`), LISTEN state (locale-agnostic), and valid PID — no longer matches remote addresses or non-listening connections
|
| 145 |
+
- **Renamed test reference fixed** (`tests/test_single_listener.py`): artifact writer referenced `test_exactly_one_listener_owns_port_8765` but the actual function is `test_exactly_one_listener_owns_port` (no `_8765` suffix)
|
| 146 |
+
- **Gate status test sources updated** (`tests/test_gate_status.py`): added `research/generated/verification/single_listener.json` to allowed sources; structural-disabled tests now also remove the live loop artifact to avoid false PASSED status
|
| 147 |
+
|
| 148 |
+
### Changed
|
| 149 |
+
|
| 150 |
+
- **Gate status builder** (`src/dashboard/gate_status.py`): Gate B now dynamically checks for experiment validity tests, determinism tests, and checkpoint v4 tests
|
| 151 |
+
- **TODO.md**: updated Gate B/C status, open items, and execution order
|
| 152 |
+
|
| 153 |
+
### Test Results (real run, 2026-08-26)
|
| 154 |
+
|
| 155 |
+
- **Python**: 3.13.14
|
| 156 |
+
- **Command**: `python -m pytest tests/ -q`
|
| 157 |
+
- **Result**: 356 passed, 2 skipped, 0 failed, 0 collection errors
|
| 158 |
+
- **New tests**: 64 (experiment validity, canonical state, RNG persistence, iteration determinism, structural determinism, checkpoint v4)
|
| 159 |
+
- **Structural E2E**: 11/11 proofs verified
|
| 160 |
+
- **Single listener**: 2/2 tests passed
|
| 161 |
+
- **Gate status**: 23/23 tests passed
|
| 162 |
+
|
| 163 |
+
---
|
| 164 |
+
|
| 165 |
+
## v0.5.0-alpha.5 - Structural Evidence Hardening Complete (2026-08-24)
|
| 166 |
+
|
| 167 |
+
### Fixed
|
| 168 |
+
|
| 169 |
+
- **Production path regression** (`src/main.py`): restored `Brain5DManipulator` import that was removed during the composition factory refactor; removed the legacy `SelfOrganizationEngine` from the direct mutation path — structural mutation now flows exclusively through the canonical Coordinator -> Approval -> PlasticityEngine path
|
| 170 |
+
- **Manual proposal fallback removed** (`tests/test_structural_e2e.py`): `_make_neurogenesis_proposal()` now raises `AssertionError` if the policy does not produce a proposal from the real signal — no more manual `StructuralProposal` creation as fallback
|
| 171 |
+
- **GateBuilder fail-closed validation** (`src/dashboard/gate_status.py`): missing `schema_version`, `tested_tree_digest`, `current_digest`, or proof count != 10 all result in NOT VERIFIED — no more silent pass on incomplete artifacts
|
| 172 |
+
|
| 173 |
+
### Changed
|
| 174 |
+
|
| 175 |
+
- **Artifact writer** (`tests/test_structural_e2e.py`): now runs proofs via real pytest subprocess (not manual function calls); includes `test_complete_canonical_e2e` in the required proof set; topology digests must be non-null (fail-closed)
|
| 176 |
+
- **Persistent verification artifact** committed to `research/generated/verification/structural_e2e.json` — a fresh clone can now verify the structural E2E status
|
| 177 |
+
- `tests/test_baseline.json`: updated to current tree digest (includes `tests/`)
|
| 178 |
+
|
| 179 |
+
### Test Results (real run, 2026-08-24)
|
| 180 |
+
|
| 181 |
+
- **Python**: 3.13.14
|
| 182 |
+
- **Command**: `python -m pytest tests/ -q`
|
| 183 |
+
- **Result**: 274 passed, 2 skipped, 0 failed, 0 collection errors
|
| 184 |
+
- **Structural E2E**: 11/11 proofs verified (10 proofs + complete canonical E2E)
|
| 185 |
+
- **Production path**: single canonical mutation path (legacy engine NOT attached)
|
| 186 |
+
|
| 187 |
+
---
|
| 188 |
+
|
| 189 |
+
## v0.5.0-alpha.5 - Structural Evidence Hardening (2026-08-24)
|
| 190 |
+
|
| 191 |
+
### Added
|
| 192 |
+
|
| 193 |
+
- **Production composition factory** (`src/self_organization/composition.py`):
|
| 194 |
+
- `compose_structural_subsystem()` — single canonical function used by both `src.main` and E2E tests
|
| 195 |
+
- Tests no longer recreate a parallel architecture; they use the production path
|
| 196 |
+
- **Real HomeostasisSignal in Proof 4** (`tests/test_structural_e2e.py`):
|
| 197 |
+
- Uses `HomeostasisEngine.build_signal()` — the canonical production signal builder
|
| 198 |
+
- `_FakeSignal` removed from the main E2E proof chain
|
| 199 |
+
- **Complete canonical E2E test** — full chain from real signal to journaled mutation without manual proposal creation
|
| 200 |
+
- **Real journal reopen for Proof 10** — new `StructuralJournal` object from same path (simulates process restart)
|
| 201 |
+
- **Persistent verification artifact** at `research/generated/verification/structural_e2e.json` (not gitignored)
|
| 202 |
+
- Full provenance: schema_version, timestamp, python_version, tested_commit, tested_tree_digest, test_command
|
| 203 |
+
- Topology digests before/after mutation/undo, journal_record_count
|
| 204 |
+
- Staleness binding: GateStatusBuilder rejects/stales when artifact tree digest != current tree digest
|
| 205 |
+
- **Extended tree digest** (`src/dashboard/verification.py`):
|
| 206 |
+
- Now includes `tests/` so changing a verification test makes the baseline STALE
|
| 207 |
+
- Excludes `tests/test_baseline.json` so the baseline file cannot invalidate itself
|
| 208 |
+
|
| 209 |
+
### Changed
|
| 210 |
+
|
| 211 |
+
- `src/main.py`: structural composition now delegates to `compose_structural_subsystem()` factory
|
| 212 |
+
- `src/dashboard/gate_status.py`: reads artifact from persistent `research/generated/verification/` path with staleness binding
|
| 213 |
+
- `tests/test_gate_status.py`: updated artifact paths and stale-acceptance logic
|
| 214 |
+
- `tests/test_baseline.json`: updated to 274 passed, 2 skipped, 0 failed, 0 collection errors
|
| 215 |
+
|
| 216 |
+
### Test Results (real run, 2026-08-24)
|
| 217 |
+
|
| 218 |
+
- **Python**: 3.13.14
|
| 219 |
+
- **Command**: `python -m pytest tests/ -q`
|
| 220 |
+
- **Result**: 274 passed, 2 skipped, 0 failed, 0 collection errors
|
| 221 |
+
- **Structural E2E**: 10/10 proofs verified with real signal, production composition, and journal reopen
|
| 222 |
+
|
| 223 |
+
---
|
| 224 |
+
|
| 225 |
+
## v0.5.0-alpha.5 - Structural E2E Verification (2026-08-23)
|
| 226 |
+
|
| 227 |
+
### Added
|
| 228 |
+
|
| 229 |
+
- **Structural E2E Ten Proofs** (`tests/test_structural_e2e.py`):
|
| 230 |
+
- Proof 1: Coordinator is instantiated
|
| 231 |
+
- Proof 2: PlasticityEngine is instantiated
|
| 232 |
+
- Proof 3: Bridge contains exactly these instances
|
| 233 |
+
- Proof 4: Proposal originates from real runtime signal
|
| 234 |
+
- Proof 5: Proposal alone does NOT mutate the network
|
| 235 |
+
- Proof 6: Reject does NOT mutate the network
|
| 236 |
+
- Proof 7: Approve produces exactly one mutation
|
| 237 |
+
- Proof 8: Mutation produces exactly one Journal record
|
| 238 |
+
- Proof 9: Undo restores the previous topology
|
| 239 |
+
- Proof 10: Restart + Replay produces the same state
|
| 240 |
+
- Machine-readable verification artifact written to `artifacts/structural_e2e_results.json`
|
| 241 |
+
- **Evidence-based structural gate** (`src/dashboard/gate_status.py`):
|
| 242 |
+
- GateStatusBuilder now reads `artifacts/structural_e2e_results.json`
|
| 243 |
+
- Structural criteria in Gate A and proofs in Gate B are set from real evidence
|
| 244 |
+
- When artifact shows `status: verified`, criteria move from `pending` to `passed`
|
| 245 |
+
- When artifact is absent, criteria remain `pending` (no guessing)
|
| 246 |
+
|
| 247 |
+
### Changed
|
| 248 |
+
|
| 249 |
+
- `tests/test_gate_status.py`: updated structural tests to account for the E2E artifact
|
| 250 |
+
- `tests/test_baseline.json`: updated to 273 passed, 2 skipped, 0 failed, 0 collection errors
|
| 251 |
+
|
| 252 |
+
### Test Results (real run, 2026-08-23)
|
| 253 |
+
|
| 254 |
+
- **Python**: 3.13.14
|
| 255 |
+
- **Command**: `python -m pytest tests/ -q`
|
| 256 |
+
- **Result**: 273 passed, 2 skipped, 0 failed, 0 collection errors
|
| 257 |
+
- **Structural E2E**: 10/10 proofs verified
|
| 258 |
+
|
| 259 |
+
---
|
| 260 |
+
|
| 261 |
+
## v0.5.0-alpha.5 - Dynamic Alpha.5 Release Gate (2026-08-23)
|
| 262 |
+
|
| 263 |
+
### Added
|
| 264 |
+
|
| 265 |
+
- **Dynamic Alpha.5 Release Gate** (`src/dashboard/gate_status.py`):
|
| 266 |
+
- `GET /api/gate/status` — evidence-based gate status for Gate A (Technical Integration), Gate B (Verification), Gate C (Scientific Baseline)
|
| 267 |
+
- Strict separation: Live Runtime Status (active/disabled/unavailable/error) vs Gate Status (passed/pending/blocked/stale/failed) vs Maturity (implemented/integrated/verified/evidenced)
|
| 268 |
+
- Runtime disabled ≠ gate failed. Runtime disabled ≠ gate passed. IMPLEMENTED ≠ VERIFIED. VERIFIED ≠ EVIDENCED.
|
| 269 |
+
- Gate A criteria carry test-file evidence (`evidence.test_ids`), not hardcoded `passed` flags
|
| 270 |
+
- Config-aware live status: `config.enabled=false` → DISABLED; `config.enabled=true` + component missing → ERROR
|
| 271 |
+
- Experiment `executed` requires `experiment_status=completed` only (not_started/template/running/failed are NOT executed)
|
| 272 |
+
- Registry counts use the typed `ResearchRegistry` API, not string counting
|
| 273 |
+
- Tests and Research are NOT live runtime subsystems — Tests belong to Gate B, evidence belongs to Gate C
|
| 274 |
+
- **Shared verification module** (`src/dashboard/verification.py`):
|
| 275 |
+
- Single `compute_source_tree_digest()` and `evaluate_test_baseline()` used by both `IntegrationStatusBuilder` and `GateStatusBuilder`
|
| 276 |
+
- Prevents `/api/integration/status` and `/api/gate/status` from disagreeing about the same source tree
|
| 277 |
+
- Handles both new (`full_suite`/`full_collection`) and legacy (`verified_subset`) baseline formats
|
| 278 |
+
- **22 new tests** in `tests/test_gate_status.py` covering all six architectural guarantees
|
| 279 |
+
|
| 280 |
+
### Fixed
|
| 281 |
+
|
| 282 |
+
- **Baseline format bug** (`src/dashboard/integration_status.py`): `_check_tests` now reads `full_suite` (new format) with `verified_subset` fallback, so the integration status no longer reports `0 passed` after a current baseline run
|
| 283 |
+
- **Duplicate tree-digest implementations** removed: `integration_status.py` and `gate_status.py` now delegate to `verification.py`
|
| 284 |
+
- **Config-aware live status**: structural and delta storage live status now distinguishes "disabled by config" from "config enabled but component missing" (ERROR)
|
| 285 |
+
- **Experiment execution semantics**: `_experiment_executed` now requires `completed` status only
|
| 286 |
+
- **Registry counts**: now use `ResearchRegistry` typed API instead of fragile YAML string counting
|
| 287 |
+
- **test_structural_e2e.py**: fixed malformed docstrings (escaped `\"\"\"` → `"""`)
|
| 288 |
+
|
| 289 |
+
### Changed
|
| 290 |
+
|
| 291 |
+
- `index.html`: removed hardcoded `gate-todo`/`gate-done` checklist; replaced with dynamic `gate-a-list`/`gate-b-list`/`gate-c-list` containers rendered from `/api/gate/status`
|
| 292 |
+
- `app.js`: `refreshGateStatus` now fetches `/api/gate/status` and renders Gate A/B/C criteria tables with Live/Maturity/Gate columns
|
| 293 |
+
- `styles.css`: added dynamic gate criteria table, live runtime grid, maturity badge colors
|
| 294 |
+
- `src/main.py`: `OperatorBridge` now carries `config_dict` attribute so the gate builder can distinguish disabled-by-config from config-enabled-component-missing
|
| 295 |
+
- `docs/08-roadmap/TODO.md`: normalized contradictory baseline numbers (236/2 collection errors → 261/0 collection errors); removed duplicated historical sections
|
| 296 |
+
- `tests/test_baseline.json`: updated to 261 passed, 2 skipped, 0 failed, 0 collection errors (full suite without `--ignore`)
|
| 297 |
+
|
| 298 |
+
### Test Results (real run, 2026-08-23)
|
| 299 |
+
|
| 300 |
+
- **Python**: 3.13.14
|
| 301 |
+
- **Command**: `python -m pytest tests/ -q`
|
| 302 |
+
- **Result**: 261 passed, 2 skipped, 0 failed, 0 collection errors
|
| 303 |
+
- **Full suite runs without `--ignore`**
|
| 304 |
+
|
| 305 |
+
---
|
| 306 |
+
|
| 307 |
+
## v0.5.0-alpha.5 - Dashboard Completion & Scientific Observability (2026-08-23)
|
| 308 |
+
|
| 309 |
+
### Added
|
| 310 |
+
|
| 311 |
+
- **Real 5D Network Inspector** (`src/dashboard/network_inspector.py`):
|
| 312 |
+
- `GET /api/network/summary` — real neuron/synapse counts, dimensions, mean energy/v
|
| 313 |
+
- `GET /api/network/neurons` — paginated real 5D coordinates (x1-x5), v, u, energy, last_spike, spike_count
|
| 314 |
+
- `GET /api/network/synapses` — paginated real source/target, weight, delay, eligibility
|
| 315 |
+
- `GET /api/network/projection` — real 5D→3D projection with stride sampling, honestly labelled
|
| 316 |
+
- **Real Integration Status** (`src/dashboard/integration_status.py`):
|
| 317 |
+
- `GET /api/integration/status` — computes Bridge/Controller/Runtime/Structural/Snapshot/Delta-Storage/Structural-Journal/Research/Tests/Error-Visibility
|
| 318 |
+
- Status values: `passed`, `disabled`, `pending`, `stale`, `failed`
|
| 319 |
+
- Disabled-by-config is NEVER `failed`
|
| 320 |
+
- Tests-STALE detection reads `tests/test_baseline.json` and compares `tested_commit` with current git HEAD
|
| 321 |
+
- **Inspect Tab** in dashboard (`index.html`, `app.js`) with network summary, 5D projection canvas, neurons/synapses paginated tables
|
| 322 |
+
- **Provenance badges** (`LIVE`/`SNAPSHOT`/`CONFIG`/`RESEARCH`/`TEST`) in `styles.css`
|
| 323 |
+
- **20 new tests** in `tests/test_dashboard_completion.py` covering Tick-0 real size, null serialization, disabled≠failed, canonical commands, 5D coordinates, projection, stale detection, no demo source
|
| 324 |
+
|
| 325 |
+
### Fixed
|
| 326 |
+
|
| 327 |
+
- **Config-authoritative storage** (`src/main.py`): `AsyncStorageSession` is now ONLY started when `storage.runtime.enabled=true`. With `poc_config.yaml` (disabled), Delta Storage reports "disabled by config" instead of silently running with fake zeros.
|
| 328 |
+
- **Truthful null/disabled formatting** (`src/dashboard/static/app.js`): `formatNumber`/`formatFloat`/`formatBytes` now return `"—"` for null/undefined instead of fake `0`. Storage/Homeostasis/Self-Org panels show "disabled by config" / "—" when disabled, not measured zeros.
|
| 329 |
+
- **Structural config-aware UI** (`src/dashboard/static/control-panel.js`): Self-Organization badge shows `DISABLED BY CONFIG` when `self_organization.enabled=false` (was static `Configured`). Controls auto-disable.
|
| 330 |
+
- **Integration status badges** (`app.js`): `refreshIntegrationStatus` and `refreshGateStatus` now use the real `/api/integration/status` backend instead of frontend heuristics that hardcoded `int-tests` to `false`.
|
| 331 |
+
- **Tree-digest staleness model** (`src/dashboard/integration_status.py`): Tests status no longer compares `tested_commit == current_commit` (a file inside a commit cannot stably contain its own SHA). Instead it compares a `tested_tree_digest` (SHA-256 over `src/`, `configs/`, `research/schemas/`, `pyproject.toml`) with the current tree digest. Pure docs/baseline changes no longer artificially invalidate the test status.
|
| 332 |
+
- **Gate tab** (`index.html`): added Runtime, Delta Storage, Structural Journal, Tests, Error Visibility gate items with real backend data.
|
| 333 |
+
|
| 334 |
+
### Changed
|
| 335 |
+
|
| 336 |
+
- `tests/test_baseline.json`: updated from real test run — **verified runnable subset**: 236 passed, 2 skipped; full collection still blocked by 2 collection errors (test_async_storage.py, test_compaction.py import non-existent tests.test_storage_runtime). Now includes `tested_tree_digest` so baseline/docs-only changes no longer artificially invalidate the test status.
|
| 337 |
+
- `docs/TODO.md`: Alpha.5 Dashboard Completion section added; Gate visualization updated
|
| 338 |
+
|
| 339 |
+
### Test Results (real run, 2026-08-23)
|
| 340 |
+
|
| 341 |
+
- **Python**: 3.13.14
|
| 342 |
+
- **Command**: `python -m pytest tests/ -q --ignore=tests/test_async_storage.py --ignore=tests/test_compaction.py`
|
| 343 |
+
- **Result (verified runnable subset)**: 236 passed, 2 skipped, 0 failed
|
| 344 |
+
- **Full collection**: still blocked by 2 collection errors (pre-existing: test_async_storage.py, test_compaction.py) — not a complete suite run
|
| 345 |
+
|
| 346 |
+
### Manual E2E Verification
|
| 347 |
+
|
| 348 |
+
- Fresh start at Tick 0: 5000 real neurons, 36031 real synapses, idle, storage disabled by config
|
| 349 |
+
- `step` → exactly +1 tick; `run_ticks 100` → exactly +100 ticks; `snapshot` → new real .b5d file
|
| 350 |
+
- `/api/integration/status`: overall=stale (Tests baseline 4fa22a4 vs HEAD 4b8502b), 6 passed, 3 disabled, 0 failed
|
| 351 |
+
|
| 352 |
+
---
|
| 353 |
+
|
| 354 |
+
## v0.5.0-alpha.5 - Structural Persistence (CI & Test-Suite Overhaul)
|
| 355 |
+
|
| 356 |
+
### Added
|
| 357 |
+
|
| 358 |
+
- **CI pipeline** (`.github/workflows/ci.yml`) mit 5 Jobs:
|
| 359 |
+
- `lint-format`: Black, Ruff, Pylint, Whitespace-Check
|
| 360 |
+
- `type-check`: Mypy + Pyright (2 Scopes)
|
| 361 |
+
- `tests`: Pytest-Matrix auf Python 3.11 / 3.12 / 3.13
|
| 362 |
+
- `build`: Wheel-Build + Installations-Verifikation
|
| 363 |
+
- `smoke`: Import-Smoke-Tests, Config-Loader, Verifier
|
| 364 |
+
- **Smoke-Test-Suite** (`tests/test_ci_smoke.py`): 24 schnelle Import-/Config-/Netzwerk-Tests
|
| 365 |
+
- **Automatische pytest-Marker** via `conftest.py`: `core`, `storage`, `plasticity`,
|
| 366 |
+
`dashboard`, `homeostasis`, `learning`, `embodiment`, `integration`, `slow`, `smoke`
|
| 367 |
+
- **Ruff-Linter-Konfiguration** in `pyproject.toml`
|
| 368 |
+
- **Coverage-Konfiguration** (`pytest-cov`) in `pyproject.toml`
|
| 369 |
+
|
| 370 |
+
### Fixed
|
| 371 |
+
|
| 372 |
+
- **Circular imports** in `src/self_organization/` (`coordinator.py`, `policy.py`)
|
| 373 |
+
durch `TYPE_CHECKING`-Imports
|
| 374 |
+
- **NullBackend-Klassen** in `src/language_organ/null_backend.py` definiert
|
| 375 |
+
(bisher nur Dummy-Imports)
|
| 376 |
+
- **ConfigDict TypeAlias** + `queued_event_count` Property in `src/core/network.py`
|
| 377 |
+
- **Mypy-Typfehler** in `src/research/` (registry, report_builder, experiment_recorder,
|
| 378 |
+
evidence_engine), `src/dashboard/` (server, operator_bridge, research_source),
|
| 379 |
+
`src/self_organization/` (undo, plasticity)
|
| 380 |
+
- **Pylint E-Level**: `__all__` in `learning_engine.py` bereinigt,
|
| 381 |
+
`inconsistent-return-statements` in `undo.py` und `plasticity.py` korrigiert
|
| 382 |
+
- **test_brain5d_launcher.py**: an `build_command`-API angepasst
|
| 383 |
+
- **test_dashboard_alpha7.py**: `DocumentationSource.read()` Fehlerbehandlung
|
| 384 |
+
- **test_homeostasis_engine.py**: `threshold_adaptation`/`energy` Toleranz
|
| 385 |
+
- **test_restore_continue.py**: `ConfigDict`-Import + `queued_event_count`
|
| 386 |
+
- **test_self_organization.py**: `max_neurons` in `SelfOrganizationParameters`
|
| 387 |
+
- **Black-Formatierung**: 54 Dateien automatisch formatiert
|
| 388 |
+
|
| 389 |
+
### Changed
|
| 390 |
+
|
| 391 |
+
- `pyproject.toml`: dev-Dependencies um `ruff`, `pytest-cov` erweitert;
|
| 392 |
+
`[tool.ruff]`, `[tool.coverage]` Konfiguration hinzugefügt
|
| 393 |
+
- `pyrightconfig.json`: unverändert (strict mode für `src/storage`, `src/homeostasis`)
|
| 394 |
+
- README.md: CI-Badges, aktualisierte Test-Statistiken (166 passed),
|
| 395 |
+
Ruff in Quality-Gates aufgenommen, CI-Pipeline-Dokumentation
|
| 396 |
+
|
| 397 |
+
### CI Status
|
| 398 |
+
|
| 399 |
+
- **166 Tests passed**, 2 skipped
|
| 400 |
+
- **Mypy**: 0 echte Typfehler
|
| 401 |
+
- **Pyright**: 0 errors, 0 warnings
|
| 402 |
+
- **Pylint**: `--fail-under=9.0` pass
|
| 403 |
+
- **Black + Ruff**: clean
|
| 404 |
+
- **Python-Matrix**: 3.11 / 3.12 / 3.13
|
| 405 |
+
|
| 406 |
+
## v0.5.0-alpha.5 - Structural Persistence
|
| 407 |
+
|
| 408 |
+
### Added
|
| 409 |
+
|
| 410 |
+
- B5D-SEF research dashboard API (`/api/research`, `/api/research/documents`,
|
| 411 |
+
`/api/research/reports`, `/api/research/experiments`, `/api/research-files/`)
|
| 412 |
+
exposing the Scientific Evidence Framework registry, generated reports and
|
| 413 |
+
experiment manifests to the operator dashboard;
|
| 414 |
+
- `src/dashboard/research_source.py` — read-only, path-traversal-safe
|
| 415 |
+
research source with registry summary, generated-report listing and
|
| 416 |
+
experiment manifest loading;
|
| 417 |
+
- research dashboard route tests
|
| 418 |
+
(`tests/test_research_dashboard_routes.py`, 6 tests) covering summary,
|
| 419 |
+
reports, file content, path-traversal rejection and JSON-404 isolation;
|
| 420 |
+
- single-instance binding regression suite
|
| 421 |
+
(`tests/test_dashboard_single_instance.py`, 9 tests) verifying the P0
|
| 422 |
+
process-architecture contract: bridge identity stability across HTTP
|
| 423 |
+
requests, `/api/debug/bridge` reporting `bridge_exists`/`controller_exists`,
|
| 424 |
+
`/api/structural/status` never reporting the bridge as missing when attached,
|
| 425 |
+
JSON-404 isolation for unknown `/api/...` paths, and bridge object identity
|
| 426 |
+
matching the server attachment;
|
| 427 |
+
- dashboard frontend expanded with Research tab (B5D-SEF browser) and
|
| 428 |
+
Alpha.5 Integration Gate tab (live criteria board with automated checks
|
| 429 |
+
and remaining manual checklist);
|
| 430 |
+
- dashboard frontend now shows integration status badges on the Dashboard tab;
|
| 431 |
+
- CRC-protected structural journal with commit markers and uncommitted-tail
|
| 432 |
+
recovery;
|
| 433 |
+
|
| 434 |
+
### Changed
|
| 435 |
+
|
| 436 |
+
- `control-panel.js` converted to a pure ES module: `export class` syntax,
|
| 437 |
+
no self-initialization on `DOMContentLoaded`, no CommonJS `module.exports`,
|
| 438 |
+
no module-global state; `ControlAPI.run()` renamed to `runTicks()` to match
|
| 439 |
+
the canonical `{"command": "run_ticks", "ticks": N}` contract;
|
| 440 |
+
- `operator_console.js` converted to a pure ES module: `export class` syntax,
|
| 441 |
+
no self-initialization, no CommonJS fallbacks;
|
| 442 |
+
- `app.js` is now the sole frontend lifecycle owner: static ES module imports
|
| 443 |
+
replace dynamic `import()` with try/catch fallback; duplicate fallback
|
| 444 |
+
command handlers removed; `module.exports` block removed; canonical command
|
| 445 |
+
contract unified across Control and Console tabs;
|
| 446 |
+
- `DashboardServer` now accepts an optional `ResearchSource` and exposes
|
| 447 |
+
`/api/research*` routes;
|
| 448 |
+
- `serve_dashboard()` accepts a `research_root` parameter; `src/main.py`
|
| 449 |
+
passes `research/` as the research root.
|
| 450 |
+
- deterministic structural replay and persistent inverse-record undo;
|
| 451 |
+
- safe manual and optional policy-based proposal approval;
|
| 452 |
+
- journal-backed structural history and heatmaps;
|
| 453 |
+
- typed dashboard routes for proposals, decisions, undo, configuration,
|
| 454 |
+
snapshots, and bounded tick execution;
|
| 455 |
+
- worker-boundary manual snapshots with ordered structural flush, `.b5d` write,
|
| 456 |
+
runtime checkpoint write, and completion notification;
|
| 457 |
+
- optional structural journal replay in the central restore path before runtime
|
| 458 |
+
checkpoint overlay.
|
| 459 |
+
|
| 460 |
+
### Compatibility
|
| 461 |
+
|
| 462 |
+
- alpha.3 coordinator and alpha.4 proposal/plasticity APIs remain available;
|
| 463 |
+
- automatic approval, neuron pruning, and mutation outside reviewed boundaries
|
| 464 |
+
remain disabled by default.
|
| 465 |
+
|
| 466 |
+
## v0.5.0-alpha.4 - Compatibility Repair
|
| 467 |
+
|
| 468 |
+
### Fixed
|
| 469 |
+
|
| 470 |
+
- restored the public `SelfOrganizationEngine` and alpha.3 policy contracts;
|
| 471 |
+
- added the immutable canonical `HomeostasisSignal` contract and engine builder;
|
| 472 |
+
- added `src/homeostasis` to the strict Pyright project graph;
|
| 473 |
+
- separated launcher-only dashboard, browser, host, and port options from the
|
| 474 |
+
`src.main` subprocess command.
|
| 475 |
+
|
| 476 |
+
### Compatibility
|
| 477 |
+
|
| 478 |
+
- alpha.4 proposal and structural-plasticity APIs remain available alongside
|
| 479 |
+
the alpha.2/alpha.3 interfaces.
|
| 480 |
+
|
| 481 |
+
## v0.4.0-alpha.7 – Embodiment Foundation & Deterministic Restore V3
|
| 482 |
+
|
| 483 |
+
### Fixed
|
| 484 |
+
|
| 485 |
+
- exact restore now preserves neuron model parameters that `.b5d` V1 stores as
|
| 486 |
+
float32 restart fields;
|
| 487 |
+
- exact synapse weights and eligibility values are restored from Runtime
|
| 488 |
+
Checkpoint V3;
|
| 489 |
+
- checkpoint JSON parsing is strict-mypy safe without `Any` or `type: ignore`.
|
| 490 |
+
|
| 491 |
+
### Added
|
| 492 |
+
|
| 493 |
+
- typed sensor, actuator, environment, registry, and embodiment-agent contracts;
|
| 494 |
+
- read-only embodiment metrics in the operator dashboard;
|
| 495 |
+
- safe Markdown documentation browser;
|
| 496 |
+
- safe sibling `.b5d` snapshot selector;
|
| 497 |
+
- PID-tracked cross-platform launcher and consolidated quality runner;
|
| 498 |
+
- roadmap integration of embodiment, continual learning, causal evaluation, and
|
| 499 |
+
neuro-symbolic research directions.
|
| 500 |
+
|
| 501 |
+
### Compatibility
|
| 502 |
+
|
| 503 |
+
- `.b5d` Snapshot V1 is unchanged;
|
| 504 |
+
- delta journal binary format is unchanged;
|
| 505 |
+
- Runtime Checkpoint JSON version advances to 3;
|
| 506 |
+
- versions 1 and 2 remain readable.
|
| 507 |
+
|
| 508 |
+
## v0.4.0-alpha.6 – Deterministic Restore & Research Alignment
|
| 509 |
+
|
| 510 |
+
- added exact dynamic neuron state to runtime checkpoints;
|
| 511 |
+
- added dashboard homeostasis bridge;
|
| 512 |
+
- aligned roadmap with project research documents.
|
| 513 |
+
|
| 514 |
+
## v0.4.0-alpha.5 – Operator Dashboard
|
| 515 |
+
|
| 516 |
+
- added local read-only dashboard and lazy snapshot heatmaps.
|
| 517 |
+
|
| 518 |
+
## v0.4.0-alpha.4 – Persistence Finalization
|
| 519 |
+
|
| 520 |
+
- bounded asynchronous storage queue;
|
| 521 |
+
- persistence telemetry;
|
| 522 |
+
- generation-based crash-safe compaction;
|
| 523 |
+
- runtime checkpoint and real network restore foundation.
|
| 524 |
+
|
| 525 |
+
## v0.4.0-alpha.3 – Runtime Storage & Lazy Views
|
| 526 |
+
|
| 527 |
+
- runtime storage session;
|
| 528 |
+
- lazy mmap activity/weight/energy projection;
|
| 529 |
+
- strict storage typing and verification tooling.
|
| 530 |
+
|
| 531 |
+
## v0.4.0-alpha.2 – Journal & Recovery
|
| 532 |
+
|
| 533 |
+
- append-only delta journal, CRC, commit markers, and crash recovery.
|
| 534 |
+
|
| 535 |
+
## v0.4.0-alpha.1 – `.b5d` Storage V1
|
| 536 |
+
|
| 537 |
+
- frozen binary snapshot format, mmap reader, deterministic layout, and format
|
| 538 |
+
robustness tests.
|
| 539 |
+
|
| 540 |
+
## v0.3.x – Learning and Structural Foundation
|
| 541 |
+
|
| 542 |
+
- STDP and eligibility traces;
|
| 543 |
+
- reward-modulated three-factor learning;
|
| 544 |
+
- heatmap observability;
|
| 545 |
+
- optical state/manipulator experiments;
|
| 546 |
+
- optional pruning, sprouting, and neurogenesis.
|
| 547 |
+
|
| 548 |
+
## v0.1.0 – Verified Observable Core
|
| 549 |
+
|
| 550 |
+
- sparse 5D spatial index;
|
| 551 |
+
- Izhikevich reference neuron;
|
| 552 |
+
- delayed event propagation;
|
| 553 |
+
- deterministic Golden Chain;
|
| 554 |
+
- telemetry and run artifacts.
|
CITATION.cff
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cff-version: 1.2.0
|
| 2 |
+
message: "If you use Brain-5D in your research, please cite it as below."
|
| 3 |
+
title: "Brain-5D: Sparse 5D Spiking-Neural Simulation with Observable Plasticity"
|
| 4 |
+
authors:
|
| 5 |
+
- family-names: Heisig
|
| 6 |
+
given-names: Thomas
|
| 7 |
+
affiliation: "Independent Research"
|
| 8 |
+
orcid: ""
|
| 9 |
+
version: 0.5.0-alpha.7
|
| 10 |
+
date-released: 2026-08-23
|
| 11 |
+
repository-code: "https://github.com/Thomas-Heisig/Brain-5D"
|
| 12 |
+
license: "MIT"
|
| 13 |
+
keywords:
|
| 14 |
+
- spiking neural networks
|
| 15 |
+
- 5D simulation
|
| 16 |
+
- STDP
|
| 17 |
+
- structural plasticity
|
| 18 |
+
- homeostasis
|
| 19 |
+
- neuromorphic computing
|
| 20 |
+
- deterministic persistence
|
CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributor Covenant Code of Conduct
|
| 2 |
+
|
| 3 |
+
## Our Pledge
|
| 4 |
+
|
| 5 |
+
We pledge to make participation in the Brain-5D project a harassment-free
|
| 6 |
+
experience for everyone, regardless of age, body size, visible or invisible
|
| 7 |
+
disability, ethnicity, sex characteristics, gender identity and expression,
|
| 8 |
+
level of experience, education, socio-economic status, nationality, personal
|
| 9 |
+
appearance, race, religion, or sexual identity and orientation.
|
| 10 |
+
|
| 11 |
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
| 12 |
+
diverse, inclusive and healthy community.
|
| 13 |
+
|
| 14 |
+
## Our Standards
|
| 15 |
+
|
| 16 |
+
Examples of positive behavior include:
|
| 17 |
+
|
| 18 |
+
- demonstrating empathy and kindness;
|
| 19 |
+
- respecting different viewpoints and experiences;
|
| 20 |
+
- giving and accepting constructive technical feedback;
|
| 21 |
+
- focusing criticism on code, architecture, evidence and behavior;
|
| 22 |
+
- acknowledging mistakes and correcting them.
|
| 23 |
+
|
| 24 |
+
Unacceptable behavior includes:
|
| 25 |
+
|
| 26 |
+
- sexualized language or unwanted sexual attention;
|
| 27 |
+
- trolling, insults, derogatory comments or personal attacks;
|
| 28 |
+
- public or private harassment;
|
| 29 |
+
- publishing another person's private information without permission;
|
| 30 |
+
- deliberate disruption of project collaboration.
|
| 31 |
+
|
| 32 |
+
## Enforcement
|
| 33 |
+
|
| 34 |
+
Report abusive, harassing or otherwise unacceptable behavior privately to the
|
| 35 |
+
project maintainers. Reports should not be posted publicly when doing so could
|
| 36 |
+
further harm affected people.
|
| 37 |
+
|
| 38 |
+
Project maintainers may remove, edit or reject comments, commits, code, issues
|
| 39 |
+
or other contributions that violate this Code of Conduct.
|
| 40 |
+
|
| 41 |
+
This document is based on the Contributor Covenant, version 2.1:
|
| 42 |
+
https://www.contributor-covenant.org/version/2/1/code_of_conduct/
|
CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributing to Brain-5D
|
| 2 |
+
|
| 3 |
+
Thank you for your interest in Brain-5D.
|
| 4 |
+
|
| 5 |
+
Brain-5D is an experimental engineering and research platform. Contributions
|
| 6 |
+
should preserve the project's deterministic persistence contracts, typed
|
| 7 |
+
boundaries, safety limits and test coverage.
|
| 8 |
+
|
| 9 |
+
## Code of Conduct
|
| 10 |
+
|
| 11 |
+
By participating, you agree to follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
| 12 |
+
|
| 13 |
+
## Reporting issues
|
| 14 |
+
|
| 15 |
+
Use the GitHub issue tracker:
|
| 16 |
+
|
| 17 |
+
https://github.com/Thomas-Heisig/Brain-5D/issues
|
| 18 |
+
|
| 19 |
+
For bugs, include:
|
| 20 |
+
|
| 21 |
+
- Brain-5D version or commit;
|
| 22 |
+
- operating system;
|
| 23 |
+
- Python version;
|
| 24 |
+
- exact command;
|
| 25 |
+
- minimal reproduction steps;
|
| 26 |
+
- relevant logs or traceback;
|
| 27 |
+
- whether the problem is deterministic.
|
| 28 |
+
|
| 29 |
+
Do not publish security-sensitive exploit details in a normal issue. See
|
| 30 |
+
[SECURITY.md](SECURITY.md).
|
| 31 |
+
|
| 32 |
+
## Feature requests
|
| 33 |
+
|
| 34 |
+
Use the feature-request template and explain:
|
| 35 |
+
|
| 36 |
+
- the engineering or research problem;
|
| 37 |
+
- the expected benefit;
|
| 38 |
+
- which existing architecture boundary it affects;
|
| 39 |
+
- how success can be measured;
|
| 40 |
+
- how it fits the roadmap.
|
| 41 |
+
|
| 42 |
+
## Pull requests
|
| 43 |
+
|
| 44 |
+
1. Fork the repository and branch from `main`.
|
| 45 |
+
2. Keep the change focused.
|
| 46 |
+
3. Preserve backwards-compatible APIs where practical.
|
| 47 |
+
4. Add or update tests.
|
| 48 |
+
5. Update documentation for public behavior.
|
| 49 |
+
6. Run the quality gates before submitting.
|
| 50 |
+
7. Complete the pull-request template.
|
| 51 |
+
|
| 52 |
+
## Type-safety rules
|
| 53 |
+
|
| 54 |
+
New code should follow the alpha.5 type-safety policy:
|
| 55 |
+
|
| 56 |
+
- parameterize collections;
|
| 57 |
+
- avoid `Any` as a shortcut;
|
| 58 |
+
- validate JSON/YAML before narrowing;
|
| 59 |
+
- do not add dynamic attributes to neuron objects;
|
| 60 |
+
- keep dashboard boundaries typed;
|
| 61 |
+
- avoid private network/engine access from HTTP handlers;
|
| 62 |
+
- use explicit subprocess argument lists;
|
| 63 |
+
- do not suppress broad Pyright/Pylance classes.
|
| 64 |
+
|
| 65 |
+
## Quality gates
|
| 66 |
+
|
| 67 |
+
From the repository root in the project virtual environment:
|
| 68 |
+
|
| 69 |
+
```powershell
|
| 70 |
+
.\.venv\Scripts\python.exe -m pytest -v -m "not slow"
|
| 71 |
+
.\.venv\Scripts\python.exe -m mypy src
|
| 72 |
+
.\.venv\Scripts\python.exe -m black --check src tests scripts
|
| 73 |
+
.\.venv\Scripts\python.exe -m ruff check src/ tests/ scripts/
|
| 74 |
+
.\.venv\Scripts\python.exe -m pyright
|
| 75 |
+
.\.venv\Scripts\python.exe -m pylint --fail-under=9.0 src
|
| 76 |
+
git diff --check
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
The CI pipeline runs the same gates on every push/PR:
|
| 80 |
+
|
| 81 |
+
| Job | Tools | Scope |
|
| 82 |
+
|-----|-------|-------|
|
| 83 |
+
| `lint-format` | Black, Ruff, Pylint, whitespace | `src/`, `tests/`, `scripts/` |
|
| 84 |
+
| `type-check` | Mypy + Pyright (2 scopes) | `src/` |
|
| 85 |
+
| `tests` | Pytest (3.11/3.12/3.13 matrix) | `tests/` |
|
| 86 |
+
| `build` | `python -m build` + verify | wheel |
|
| 87 |
+
| `smoke` | Import/config smoke tests | `src/` + `configs/` |
|
| 88 |
+
|
| 89 |
+
Alpha.5 introduced a strict Pyright-clean integration scope. Repository-wide
|
| 90 |
+
strict Pyright still contains historical findings, therefore pull requests must
|
| 91 |
+
at minimum keep all changed/new files free of new strict Pyright/Pylance errors.
|
| 92 |
+
|
| 93 |
+
When applicable:
|
| 94 |
+
|
| 95 |
+
```powershell
|
| 96 |
+
.\.venv\Scripts\python.exe scripts\verify_v050a5.py
|
| 97 |
+
.\.venv\Scripts\python.exe -m pytest -v -m slow
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
## Commit messages
|
| 101 |
+
|
| 102 |
+
Conventional Commit-style messages are recommended, for example:
|
| 103 |
+
|
| 104 |
+
- `feat: add structural journal`
|
| 105 |
+
- `fix: preserve deterministic restore ordering`
|
| 106 |
+
- `docs: update operator guide`
|
| 107 |
+
- `test: add structural recovery coverage`
|
| 108 |
+
- `chore: update tooling`
|
| 109 |
+
|
| 110 |
+
## Licensing
|
| 111 |
+
|
| 112 |
+
Unless explicitly stated otherwise, contributions are submitted under the
|
| 113 |
+
project's MIT license.
|
Dockerfile
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ============================================================================
|
| 2 |
+
# Brain-5D — Dockerfile
|
| 3 |
+
# ============================================================================
|
| 4 |
+
# Multi-stage build for minimal production image.
|
| 5 |
+
#
|
| 6 |
+
# Build: docker build -t brain5d .
|
| 7 |
+
# Run: docker run --rm -p 8765:8765 brain5d
|
| 8 |
+
# Run with: docker run --rm -v ./configs:/app/configs brain5d \
|
| 9 |
+
# python -m src.main --config configs/poc_config.yaml
|
| 10 |
+
# ============================================================================
|
| 11 |
+
|
| 12 |
+
# ---- Build stage -----------------------------------------------------------
|
| 13 |
+
FROM python:3.13-slim AS builder
|
| 14 |
+
|
| 15 |
+
WORKDIR /build
|
| 16 |
+
|
| 17 |
+
# Install build dependencies
|
| 18 |
+
RUN pip install --no-cache-dir build "setuptools>=68" wheel
|
| 19 |
+
|
| 20 |
+
# Copy package metadata and sources
|
| 21 |
+
COPY pyproject.toml setup.py README.md ./
|
| 22 |
+
COPY src/ src/
|
| 23 |
+
|
| 24 |
+
# Build wheel
|
| 25 |
+
RUN python -m build --wheel --no-isolation
|
| 26 |
+
|
| 27 |
+
# ---- Runtime stage ---------------------------------------------------------
|
| 28 |
+
FROM python:3.13-slim
|
| 29 |
+
|
| 30 |
+
WORKDIR /app
|
| 31 |
+
|
| 32 |
+
# Install runtime dependencies only
|
| 33 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 34 |
+
libgomp1 \
|
| 35 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 36 |
+
|
| 37 |
+
# Copy built wheel from builder
|
| 38 |
+
COPY --from=builder /build/dist/*.whl /tmp/
|
| 39 |
+
RUN pip install --no-cache-dir /tmp/*.whl && rm /tmp/*.whl
|
| 40 |
+
|
| 41 |
+
# Copy source code (for editable imports)
|
| 42 |
+
COPY src/ src/
|
| 43 |
+
COPY configs/ configs/
|
| 44 |
+
COPY scripts/ scripts/
|
| 45 |
+
|
| 46 |
+
# Expose dashboard port
|
| 47 |
+
EXPOSE 8765
|
| 48 |
+
|
| 49 |
+
# Hugging Face Spaces starts the integrated dashboard from this command.
|
| 50 |
+
CMD ["python", "-m", "src.main", "--config", "configs/poc_config.yaml", "--dashboard-host", "0.0.0.0", "--dashboard-port", "8765"]
|
HF_README.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
sdk: docker
|
| 4 |
+
app_port: 8765
|
| 5 |
+
title: Brain-5D
|
| 6 |
+
short_description: Sparse 5D spiking-neural research dashboard
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
library_name: brain5d-core
|
| 10 |
+
tags:
|
| 11 |
+
- spiking-neural-networks
|
| 12 |
+
- STDP
|
| 13 |
+
- structural-plasticity
|
| 14 |
+
- homeostasis
|
| 15 |
+
- embodiment
|
| 16 |
+
- multimodal
|
| 17 |
+
- neuromorphic
|
| 18 |
+
- simulation
|
| 19 |
+
- 5D
|
| 20 |
+
- neuroscience
|
| 21 |
+
- brain-inspired
|
| 22 |
+
pipeline_tag: reinforcement-learning
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# Brain-5D
|
| 26 |
+
|
| 27 |
+
**Sparse 5D spiking-neural research framework with controlled plasticity, embodiment, peripheral multi-network integration and scientific provenance.**
|
| 28 |
+
|
| 29 |
+
Brain-5D is an experimental framework for studying learning, self-organization and embodied closed-loop behavior in a sparse five-dimensional spiking neural network. The SNN remains the primary adaptive system; language models, research assistants and peripheral neural networks are bounded interpretation/proposal/adapter components unless explicitly registered as experimental treatments.
|
| 30 |
+
|
| 31 |
+
> Brain-5D does not claim AGI, consciousness, sentience or biological equivalence. Passing implementation tests, reachable devices or available neural pipelines are not the same as scientific evidence.
|
| 32 |
+
|
| 33 |
+
## Current baseline — 2026-09-07
|
| 34 |
+
|
| 35 |
+
- version: `0.5.0a7`
|
| 36 |
+
- Python: 3.11–3.13
|
| 37 |
+
- latest verified Python suite: **825 passed, 5 skipped**
|
| 38 |
+
- latest verified browser suite: **5 passed** with Chromium
|
| 39 |
+
- Research Catalog / variable-projection-dimension integration is merged to `main`
|
| 40 |
+
- merge commit: `85e7209509b348bf7912dde01d3d9ebb078a2e61`
|
| 41 |
+
- latest fully completed pre-merge `main` CI baseline: run #598, success
|
| 42 |
+
- the post-merge CI run is authoritative for the merged baseline and must complete before that baseline is described as fully green
|
| 43 |
+
- GitHub `main` is canonical; this file is published as the Hugging Face repository README during mirror synchronization
|
| 44 |
+
|
| 45 |
+
## Live dashboard Space
|
| 46 |
+
|
| 47 |
+
The interactive operator and research dashboard is published separately as a Docker Space:
|
| 48 |
+
|
| 49 |
+
https://huggingface.co/spaces/superdigger/Brain-5D-Space
|
| 50 |
+
|
| 51 |
+
## Capabilities
|
| 52 |
+
|
| 53 |
+
- sparse 5D Izhikevich SNN with delayed events and deterministic RNG state;
|
| 54 |
+
- STDP, signed eligibility and delayed reward / three-factor learning;
|
| 55 |
+
- homeostasis and bounded interoception;
|
| 56 |
+
- structural proposals, explicit approval, mutation, journal, undo and recovery;
|
| 57 |
+
- `.b5d` snapshots, delta journals, checkpoints and deterministic restore/continue;
|
| 58 |
+
- typed embodiment, actuator authorization, audit trails and deterministic environments;
|
| 59 |
+
- real host telemetry/device discovery without fabricated fallback values;
|
| 60 |
+
- **Neural Symbiosis**: open-set peripheral neural/virtual area contracts and read-only pipeline reachability;
|
| 61 |
+
- **MSBA**: modality-specific pathways, energy/resource accounting and external projection dimensionality from 1–32 dimensions;
|
| 62 |
+
- fragmentable canonical research-question/hypothesis registries with duplicate-ID rejection;
|
| 63 |
+
- searchable Research Catalog with operational/exploratory distinction;
|
| 64 |
+
- repository-wide read-only RQ/H reference audit;
|
| 65 |
+
- research registries, manifests, DATA/EVID separation and AI provenance;
|
| 66 |
+
- responsive dashboard centered on Overview, Control, Research, Settings, Wesen and Embodiment.
|
| 67 |
+
|
| 68 |
+
## Research Catalog and dimensions
|
| 69 |
+
|
| 70 |
+
Canonical `questions.yaml` / `hypotheses.yaml` can be extended through deterministic `questions.*.yaml` / `hypotheses.*.yaml` fragments. MSBA research questions and hypotheses are normal experiment-workflow entries. A question is marked operational only when an appropriate frozen/preregistered protocol exists; otherwise it remains exploratory and cannot be silently promoted to evidence.
|
| 71 |
+
|
| 72 |
+
MSBA/external projection spaces may use 1–32 dimensions. The persisted productive SNN core remains 5D for backward compatibility until a separately versioned N-D neuron-ID, spatial-index and `.b5d` migration has been implemented and verified.
|
| 73 |
+
|
| 74 |
+
## Neural Symbiosis
|
| 75 |
+
|
| 76 |
+
The embodiment layer can represent dedicated processing stages between endpoints and the 5D-SNN:
|
| 77 |
+
|
| 78 |
+
```text
|
| 79 |
+
Camera → CNN / Vision Transformer → gateway → 5D-SNN
|
| 80 |
+
Microphone → Audio/Speech Transformer → gateway → 5D-SNN
|
| 81 |
+
Database / Knowledge Graph → GNN/projector → gateway → 5D-SNN
|
| 82 |
+
Logic engine → neuro-symbolic projector → gateway → 5D-SNN
|
| 83 |
+
5D-SNN → gateway → speech/control network → audio/robotics output
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
The adapter model is open-set and framework-neutral. CNN, Transformer, LSTM/GRU/RNN, GNN, Modern Hopfield, reservoir/ESN, MLP, VAE/GAN/diffusion, autoencoder, peripheral SNN, multimodal, neuro-symbolic and custom architectures can be represented without importing their runtime frameworks into the Brain-5D core.
|
| 87 |
+
|
| 88 |
+
Gateway plasticity is **disabled by default**. Pipeline reachability or area registration is not evidence that the SNN learned to use an external area. Plastic gateway experiments require explicit preregistration, persisted RNG/model/version provenance, matched controls and the normal DATA/EVID review path.
|
| 89 |
+
|
| 90 |
+
## Quick start
|
| 91 |
+
|
| 92 |
+
```bash
|
| 93 |
+
git clone https://github.com/Thomas-Heisig/Brain-5D.git
|
| 94 |
+
cd Brain-5D
|
| 95 |
+
python -m venv .venv
|
| 96 |
+
source .venv/bin/activate
|
| 97 |
+
pip install -e ".[dev]"
|
| 98 |
+
python -m src.main --config configs/poc_config.yaml
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
Windows PowerShell activation:
|
| 102 |
+
|
| 103 |
+
```powershell
|
| 104 |
+
.\.venv\Scripts\Activate.ps1
|
| 105 |
+
pip install -e ".[dev]"
|
| 106 |
+
.\start.ps1
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
The dashboard defaults to `http://127.0.0.1:8765`.
|
| 110 |
+
|
| 111 |
+
## Current research focus
|
| 112 |
+
|
| 113 |
+
The engineering foundation is broad enough that the next priority is **evidence closure rather than feature accumulation**:
|
| 114 |
+
|
| 115 |
+
1. operationalize every still-unmapped canonical RQ/H with dedicated protocols and preregistrations;
|
| 116 |
+
2. post-repair propagation/recurrence validation across independent seeds;
|
| 117 |
+
3. productive learning with holdout and matched controls;
|
| 118 |
+
4. closed-loop embodiment versus replay/open-loop controls;
|
| 119 |
+
5. experiment-only Neural Symbiosis/MSBA gateway studies with frozen/random/shuffled controls;
|
| 120 |
+
6. preregistered N-D projection sweeps before any productive-core N-D migration;
|
| 121 |
+
7. simulation-time versus wall-clock pacing calibration;
|
| 122 |
+
8. causal ablations of the 5D organization;
|
| 123 |
+
9. self-regulation/sensor-loss studies;
|
| 124 |
+
10. later memory/world-model, multimodal grounding and AI-as-treatment studies.
|
| 125 |
+
|
| 126 |
+
## Documentation
|
| 127 |
+
|
| 128 |
+
- [Project README](README.md)
|
| 129 |
+
- [Architecture](docs/02-architecture/ARCHITECTURE.md)
|
| 130 |
+
- [Neural Symbiosis](docs/02-architecture/NEURAL_SYMBIOSIS.md)
|
| 131 |
+
- [MSBA](docs/02-architecture/MSBA.md)
|
| 132 |
+
- [Wesen](docs/02-architecture/WESEN_ADAPTIVE_BODY.md)
|
| 133 |
+
- [Dashboard](docs/03-dashboard/DASHBOARD.md)
|
| 134 |
+
- [Roadmap](docs/08-roadmap/ROADMAP.md)
|
| 135 |
+
- [TODO](docs/08-roadmap/TODO.md)
|
| 136 |
+
- [Research/evidence framework](research/README.md)
|
| 137 |
+
|
| 138 |
+
Versioned Alpha/Sprint/Release documents are historical traceability records and should not be used as the current project status unless linked by a canonical document.
|
| 139 |
+
|
| 140 |
+
## Scientific boundary
|
| 141 |
+
|
| 142 |
+
```text
|
| 143 |
+
implementation test != experiment data != accepted evidence != interpretation
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
Observed values remain distinct from inferred values. Missing telemetry remains unknown. Device availability is not authorization. AI output is not empirical measurement. Pipeline reachability is not learned tool use.
|
| 147 |
+
|
| 148 |
+
## License and citation
|
| 149 |
+
|
| 150 |
+
MIT License — see `LICENSE`.
|
| 151 |
+
|
| 152 |
+
```bibtex
|
| 153 |
+
@software{heisig2026brain5d,
|
| 154 |
+
author = {Thomas Heisig},
|
| 155 |
+
title = {Brain-5D: Sparse 5D Spiking-Neural Research Framework},
|
| 156 |
+
year = {2026},
|
| 157 |
+
version = {0.5.0a7},
|
| 158 |
+
url = {https://github.com/Thomas-Heisig/Brain-5D},
|
| 159 |
+
license = {MIT}
|
| 160 |
+
}
|
| 161 |
+
```
|
| 162 |
+
|
| 163 |
+
GitHub: https://github.com/Thomas-Heisig/Brain-5D
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2025-2026 Thomas Heisig and contributors
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
sdk: docker
|
| 4 |
+
app_port: 8765
|
| 5 |
+
title: Brain-5D
|
| 6 |
+
short_description: Sparse 5D spiking-neural research dashboard
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
library_name: brain5d-core
|
| 10 |
+
tags:
|
| 11 |
+
- spiking-neural-networks
|
| 12 |
+
- STDP
|
| 13 |
+
- structural-plasticity
|
| 14 |
+
- homeostasis
|
| 15 |
+
- embodiment
|
| 16 |
+
- multimodal
|
| 17 |
+
- neuromorphic
|
| 18 |
+
- simulation
|
| 19 |
+
- 5D
|
| 20 |
+
- neuroscience
|
| 21 |
+
- brain-inspired
|
| 22 |
+
pipeline_tag: reinforcement-learning
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# Brain-5D
|
| 26 |
+
|
| 27 |
+
**Sparse 5D spiking-neural research framework with controlled plasticity, embodiment, peripheral multi-network integration and scientific provenance.**
|
| 28 |
+
|
| 29 |
+
Brain-5D is an experimental framework for studying learning, self-organization and embodied closed-loop behavior in a sparse five-dimensional spiking neural network. The SNN remains the primary adaptive system; language models, research assistants and peripheral neural networks are bounded interpretation/proposal/adapter components unless explicitly registered as experimental treatments.
|
| 30 |
+
|
| 31 |
+
> Brain-5D does not claim AGI, consciousness, sentience or biological equivalence. Passing implementation tests, reachable devices or available neural pipelines are not the same as scientific evidence.
|
| 32 |
+
|
| 33 |
+
## Current baseline — 2026-09-07
|
| 34 |
+
|
| 35 |
+
- version: `0.5.0a7`
|
| 36 |
+
- Python: 3.11–3.13
|
| 37 |
+
- latest verified Python suite: **825 passed, 5 skipped**
|
| 38 |
+
- latest verified browser suite: **5 passed** with Chromium
|
| 39 |
+
- Research Catalog / variable-projection-dimension integration is merged to `main`
|
| 40 |
+
- merge commit: `85e7209509b348bf7912dde01d3d9ebb078a2e61`
|
| 41 |
+
- latest fully completed pre-merge `main` CI baseline: run #598, success
|
| 42 |
+
- the post-merge CI run is authoritative for the merged baseline and must complete before that baseline is described as fully green
|
| 43 |
+
- GitHub `main` is canonical; this file is published as the Hugging Face repository README during mirror synchronization
|
| 44 |
+
|
| 45 |
+
## Live dashboard Space
|
| 46 |
+
|
| 47 |
+
The interactive operator and research dashboard is published separately as a Docker Space:
|
| 48 |
+
|
| 49 |
+
https://huggingface.co/spaces/superdigger/Brain-5D-Space
|
| 50 |
+
|
| 51 |
+
## Capabilities
|
| 52 |
+
|
| 53 |
+
- sparse 5D Izhikevich SNN with delayed events and deterministic RNG state;
|
| 54 |
+
- STDP, signed eligibility and delayed reward / three-factor learning;
|
| 55 |
+
- homeostasis and bounded interoception;
|
| 56 |
+
- structural proposals, explicit approval, mutation, journal, undo and recovery;
|
| 57 |
+
- `.b5d` snapshots, delta journals, checkpoints and deterministic restore/continue;
|
| 58 |
+
- typed embodiment, actuator authorization, audit trails and deterministic environments;
|
| 59 |
+
- real host telemetry/device discovery without fabricated fallback values;
|
| 60 |
+
- **Neural Symbiosis**: open-set peripheral neural/virtual area contracts and read-only pipeline reachability;
|
| 61 |
+
- **MSBA**: modality-specific pathways, energy/resource accounting and external projection dimensionality from 1–32 dimensions;
|
| 62 |
+
- fragmentable canonical research-question/hypothesis registries with duplicate-ID rejection;
|
| 63 |
+
- searchable Research Catalog with operational/exploratory distinction;
|
| 64 |
+
- repository-wide read-only RQ/H reference audit;
|
| 65 |
+
- research registries, manifests, DATA/EVID separation and AI provenance;
|
| 66 |
+
- responsive dashboard centered on Overview, Control, Research, Settings, Wesen and Embodiment.
|
| 67 |
+
|
| 68 |
+
## Research Catalog and dimensions
|
| 69 |
+
|
| 70 |
+
Canonical `questions.yaml` / `hypotheses.yaml` can be extended through deterministic `questions.*.yaml` / `hypotheses.*.yaml` fragments. MSBA research questions and hypotheses are normal experiment-workflow entries. A question is marked operational only when an appropriate frozen/preregistered protocol exists; otherwise it remains exploratory and cannot be silently promoted to evidence.
|
| 71 |
+
|
| 72 |
+
MSBA/external projection spaces may use 1–32 dimensions. The persisted productive SNN core remains 5D for backward compatibility until a separately versioned N-D neuron-ID, spatial-index and `.b5d` migration has been implemented and verified.
|
| 73 |
+
|
| 74 |
+
## Neural Symbiosis
|
| 75 |
+
|
| 76 |
+
The embodiment layer can represent dedicated processing stages between endpoints and the 5D-SNN:
|
| 77 |
+
|
| 78 |
+
```text
|
| 79 |
+
Camera → CNN / Vision Transformer → gateway → 5D-SNN
|
| 80 |
+
Microphone → Audio/Speech Transformer → gateway → 5D-SNN
|
| 81 |
+
Database / Knowledge Graph → GNN/projector → gateway → 5D-SNN
|
| 82 |
+
Logic engine → neuro-symbolic projector → gateway → 5D-SNN
|
| 83 |
+
5D-SNN → gateway → speech/control network → audio/robotics output
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
The adapter model is open-set and framework-neutral. CNN, Transformer, LSTM/GRU/RNN, GNN, Modern Hopfield, reservoir/ESN, MLP, VAE/GAN/diffusion, autoencoder, peripheral SNN, multimodal, neuro-symbolic and custom architectures can be represented without importing their runtime frameworks into the Brain-5D core.
|
| 87 |
+
|
| 88 |
+
Gateway plasticity is **disabled by default**. Pipeline reachability or area registration is not evidence that the SNN learned to use an external area. Plastic gateway experiments require explicit preregistration, persisted RNG/model/version provenance, matched controls and the normal DATA/EVID review path.
|
| 89 |
+
|
| 90 |
+
## Quick start
|
| 91 |
+
|
| 92 |
+
```bash
|
| 93 |
+
git clone https://github.com/Thomas-Heisig/Brain-5D.git
|
| 94 |
+
cd Brain-5D
|
| 95 |
+
python -m venv .venv
|
| 96 |
+
source .venv/bin/activate
|
| 97 |
+
pip install -e ".[dev]"
|
| 98 |
+
python -m src.main --config configs/poc_config.yaml
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
Windows PowerShell activation:
|
| 102 |
+
|
| 103 |
+
```powershell
|
| 104 |
+
.\.venv\Scripts\Activate.ps1
|
| 105 |
+
pip install -e ".[dev]"
|
| 106 |
+
.\start.ps1
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
The dashboard defaults to `http://127.0.0.1:8765`.
|
| 110 |
+
|
| 111 |
+
## Current research focus
|
| 112 |
+
|
| 113 |
+
The engineering foundation is broad enough that the next priority is **evidence closure rather than feature accumulation**:
|
| 114 |
+
|
| 115 |
+
1. operationalize every still-unmapped canonical RQ/H with dedicated protocols and preregistrations;
|
| 116 |
+
2. post-repair propagation/recurrence validation across independent seeds;
|
| 117 |
+
3. productive learning with holdout and matched controls;
|
| 118 |
+
4. closed-loop embodiment versus replay/open-loop controls;
|
| 119 |
+
5. experiment-only Neural Symbiosis/MSBA gateway studies with frozen/random/shuffled controls;
|
| 120 |
+
6. preregistered N-D projection sweeps before any productive-core N-D migration;
|
| 121 |
+
7. simulation-time versus wall-clock pacing calibration;
|
| 122 |
+
8. causal ablations of the 5D organization;
|
| 123 |
+
9. self-regulation/sensor-loss studies;
|
| 124 |
+
10. later memory/world-model, multimodal grounding and AI-as-treatment studies.
|
| 125 |
+
|
| 126 |
+
## Documentation
|
| 127 |
+
|
| 128 |
+
- [Project README](README.md)
|
| 129 |
+
- [Architecture](docs/02-architecture/ARCHITECTURE.md)
|
| 130 |
+
- [Neural Symbiosis](docs/02-architecture/NEURAL_SYMBIOSIS.md)
|
| 131 |
+
- [MSBA](docs/02-architecture/MSBA.md)
|
| 132 |
+
- [Wesen](docs/02-architecture/WESEN_ADAPTIVE_BODY.md)
|
| 133 |
+
- [Dashboard](docs/03-dashboard/DASHBOARD.md)
|
| 134 |
+
- [Roadmap](docs/08-roadmap/ROADMAP.md)
|
| 135 |
+
- [TODO](docs/08-roadmap/TODO.md)
|
| 136 |
+
- [Research/evidence framework](research/README.md)
|
| 137 |
+
|
| 138 |
+
Versioned Alpha/Sprint/Release documents are historical traceability records and should not be used as the current project status unless linked by a canonical document.
|
| 139 |
+
|
| 140 |
+
## Scientific boundary
|
| 141 |
+
|
| 142 |
+
```text
|
| 143 |
+
implementation test != experiment data != accepted evidence != interpretation
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
Observed values remain distinct from inferred values. Missing telemetry remains unknown. Device availability is not authorization. AI output is not empirical measurement. Pipeline reachability is not learned tool use.
|
| 147 |
+
|
| 148 |
+
## License and citation
|
| 149 |
+
|
| 150 |
+
MIT License — see `LICENSE`.
|
| 151 |
+
|
| 152 |
+
```bibtex
|
| 153 |
+
@software{heisig2026brain5d,
|
| 154 |
+
author = {Thomas Heisig},
|
| 155 |
+
title = {Brain-5D: Sparse 5D Spiking-Neural Research Framework},
|
| 156 |
+
year = {2026},
|
| 157 |
+
version = {0.5.0a7},
|
| 158 |
+
url = {https://github.com/Thomas-Heisig/Brain-5D},
|
| 159 |
+
license = {MIT}
|
| 160 |
+
}
|
| 161 |
+
```
|
| 162 |
+
|
| 163 |
+
GitHub: https://github.com/Thomas-Heisig/Brain-5D
|
SECURITY.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Security Policy
|
| 2 |
+
|
| 3 |
+
## Project status
|
| 4 |
+
|
| 5 |
+
Brain-5D is an experimental research and engineering project. The current
|
| 6 |
+
development line is `0.5.x`; it is not presented as a hardened internet-facing
|
| 7 |
+
service.
|
| 8 |
+
|
| 9 |
+
Security fixes are prioritized for the current development line. Historical
|
| 10 |
+
pre-0.5 versions are not actively maintained.
|
| 11 |
+
|
| 12 |
+
| Version line | Status |
|
| 13 |
+
| --- | --- |
|
| 14 |
+
| 0.5.x | Current development line |
|
| 15 |
+
| < 0.5 | Not actively supported |
|
| 16 |
+
|
| 17 |
+
## Reporting a vulnerability
|
| 18 |
+
|
| 19 |
+
Please do **not** publish exploit details in a normal public issue.
|
| 20 |
+
|
| 21 |
+
Preferred reporting path:
|
| 22 |
+
|
| 23 |
+
1. Open the repository's **Security** section on GitHub.
|
| 24 |
+
2. Use private vulnerability reporting / a private security advisory if the
|
| 25 |
+
repository has it enabled.
|
| 26 |
+
3. If private reporting is unavailable, contact the maintainer privately using
|
| 27 |
+
an established project contact channel before public disclosure.
|
| 28 |
+
|
| 29 |
+
Repository security page:
|
| 30 |
+
|
| 31 |
+
https://github.com/Thomas-Heisig/Brain-5D/security
|
| 32 |
+
|
| 33 |
+
Please include:
|
| 34 |
+
|
| 35 |
+
- affected version or commit;
|
| 36 |
+
- clear description;
|
| 37 |
+
- reproduction steps or proof of concept where safe;
|
| 38 |
+
- likely impact;
|
| 39 |
+
- suggested mitigation if known.
|
| 40 |
+
|
| 41 |
+
No fixed response-time SLA is promised in this experimental development phase.
|
| 42 |
+
|
| 43 |
+
## Current security assumptions
|
| 44 |
+
|
| 45 |
+
- The dashboard is designed primarily for local operation.
|
| 46 |
+
- Do not expose it directly to an untrusted network without an authentication
|
| 47 |
+
and authorization layer.
|
| 48 |
+
- Configuration files are trusted operator inputs; parsing code should still
|
| 49 |
+
validate types and bounds.
|
| 50 |
+
- Dashboard write endpoints must use explicit typed commands and must not expose
|
| 51 |
+
arbitrary shell execution.
|
| 52 |
+
- Structural auto-approval is off by default.
|
| 53 |
+
- Neuron pruning is off by default.
|
| 54 |
+
- Structural mutations should pass through the coordinator/plasticity/manipulator
|
| 55 |
+
boundaries.
|
| 56 |
+
- Dependencies should be installed in an isolated virtual environment.
|
| 57 |
+
|
| 58 |
+
## Dependency updates
|
| 59 |
+
|
| 60 |
+
For editable development installs:
|
| 61 |
+
|
| 62 |
+
```powershell
|
| 63 |
+
.\.venv\Scripts\python.exe -m pip install --upgrade pip
|
| 64 |
+
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Review dependency changes before merging them.
|
artifacts/benchmark_ladder_neuron_synapse.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ee527d14f73b97c26e6532d7a02c80535110189a7ff1b6aef5e1a550830a6d4
|
| 3 |
+
size 1223
|
artifacts/runs/.gitkeep
ADDED
|
File without changes
|
artifacts/snapshots/.gitkeep
ADDED
|
File without changes
|
configs/learning_experiment.yaml
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
seed: 42
|
| 2 |
+
|
| 3 |
+
dimensions: [5, 5, 5, 5, 5]
|
| 4 |
+
initial_neurons: 0
|
| 5 |
+
max_neurons: 3125
|
| 6 |
+
|
| 7 |
+
simulation:
|
| 8 |
+
dt_ms: 1.0
|
| 9 |
+
ticks: 600
|
| 10 |
+
max_delay: 20
|
| 11 |
+
debug_invariants: true
|
| 12 |
+
|
| 13 |
+
neuron:
|
| 14 |
+
a: 0.02
|
| 15 |
+
b: 0.2
|
| 16 |
+
c: -65.0
|
| 17 |
+
d: 8.0
|
| 18 |
+
|
| 19 |
+
network:
|
| 20 |
+
initial_connections_per_neuron: 0
|
| 21 |
+
neighbour_radius: 2.0
|
| 22 |
+
weight_min: 0.0
|
| 23 |
+
weight_max: 0.5
|
| 24 |
+
|
| 25 |
+
energy:
|
| 26 |
+
initial: 1.0
|
| 27 |
+
spike_cost: 0.001
|
| 28 |
+
affects_firing: false
|
| 29 |
+
|
| 30 |
+
topology:
|
| 31 |
+
input:
|
| 32 |
+
dimension: x
|
| 33 |
+
coordinate: 0
|
| 34 |
+
output:
|
| 35 |
+
dimension: x
|
| 36 |
+
coordinate: 4
|
| 37 |
+
allow_self_connections: false
|
| 38 |
+
allow_parallel_connections: false
|
| 39 |
+
|
| 40 |
+
stdp:
|
| 41 |
+
enabled: false
|
| 42 |
+
a_plus: 0.1
|
| 43 |
+
a_minus: 0.12
|
| 44 |
+
tau_plus: 20.0
|
| 45 |
+
tau_minus: 20.0
|
| 46 |
+
min_weight: 0.0
|
| 47 |
+
max_weight: 1.0
|
| 48 |
+
|
| 49 |
+
eligibility:
|
| 50 |
+
enabled: true
|
| 51 |
+
tau_ticks: 200.0
|
| 52 |
+
|
| 53 |
+
reward:
|
| 54 |
+
enabled: true
|
| 55 |
+
learning_rate: 0.5
|
| 56 |
+
delay_ticks: 0
|
| 57 |
+
clamp_weights: true
|
| 58 |
+
reset_trace_after_reward: true
|
| 59 |
+
trace_epsilon: 1.0e-12
|
| 60 |
+
reward_source: external
|
| 61 |
+
|
| 62 |
+
learning_experiment:
|
| 63 |
+
protocol_id: PROTOCOL-STDP-0002
|
| 64 |
+
protocol_version: 1
|
| 65 |
+
presynaptic_neurons: 48
|
| 66 |
+
initial_weight: 0.05
|
| 67 |
+
connection_delay_ticks: 1
|
| 68 |
+
training_trials: 20
|
| 69 |
+
trial_spacing_ticks: 25
|
| 70 |
+
pair_delay_ticks: 5
|
| 71 |
+
drive_current: 100.0
|
| 72 |
+
reward_value: 1.0
|
| 73 |
+
probe_ticks: 5
|
| 74 |
+
partitions:
|
| 75 |
+
train: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
| 76 |
+
validation: [12, 13, 14, 15]
|
| 77 |
+
holdout: [16, 17, 18, 19]
|
configs/llm_organ.example.yaml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Brain-5D alpha.6 contract example. Disabled by default.
|
| 2 |
+
language_organ:
|
| 3 |
+
enabled: false
|
| 4 |
+
backend: "null"
|
| 5 |
+
model_path: null
|
| 6 |
+
context_length: 2048
|
| 7 |
+
worker:
|
| 8 |
+
asynchronous: true
|
| 9 |
+
timeout_seconds: 10.0
|
| 10 |
+
max_queue_depth: 8
|
| 11 |
+
|
| 12 |
+
knowledge_intake:
|
| 13 |
+
enabled: false
|
| 14 |
+
allow_network: false
|
| 15 |
+
require_provenance: true
|
| 16 |
+
deduplicate_by_sha256: true
|
configs/operator_console.yaml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
controller:
|
| 2 |
+
batch_size: 10
|
| 3 |
+
loop_delay_ms: 0.0
|
| 4 |
+
telemetry_interval_ticks: 10
|
| 5 |
+
self_organization:
|
| 6 |
+
enabled: true
|
| 7 |
+
dry_run: true
|
| 8 |
+
neurogenesis_threshold: 0.9
|
| 9 |
+
pruning_threshold: 0.9
|
| 10 |
+
synapse_sprouting_threshold: 0.5
|
| 11 |
+
synapse_pruning_threshold: 0.5
|
| 12 |
+
max_neurons: 10000
|
| 13 |
+
min_neurons: 100
|
| 14 |
+
structural_plasticity:
|
| 15 |
+
operator_approval_required: true
|
| 16 |
+
max_changes_per_tick: 1
|
| 17 |
+
allow_neurogenesis: true
|
| 18 |
+
allow_neuron_pruning: false
|
| 19 |
+
allow_synapse_sprouting: true
|
| 20 |
+
allow_synapse_pruning: true
|
configs/poc_alpha5_live.yaml
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Alpha.5 Interactive Operator/Dashboard Profile
|
| 2 |
+
# ===============================================
|
| 3 |
+
# Safe desired state for interactive dashboard operation.
|
| 4 |
+
# All mechanisms are explicitly configured — no silent defaults.
|
| 5 |
+
|
| 6 |
+
seed: 42
|
| 7 |
+
|
| 8 |
+
experience:
|
| 9 |
+
enabled: false
|
| 10 |
+
sensor:
|
| 11 |
+
type: system
|
| 12 |
+
provider: host
|
| 13 |
+
encoder:
|
| 14 |
+
type: system_v1
|
| 15 |
+
decoder:
|
| 16 |
+
type: controlled_v1
|
| 17 |
+
environment:
|
| 18 |
+
type: deterministic_target
|
| 19 |
+
|
| 20 |
+
# Orthogonal state identity and observability intensity.
|
| 21 |
+
state_mode: operator
|
| 22 |
+
observability: minimal
|
| 23 |
+
|
| 24 |
+
dimensions: [10, 10, 10, 10, 10]
|
| 25 |
+
initial_neurons: 5000
|
| 26 |
+
max_neurons: 100000
|
| 27 |
+
|
| 28 |
+
# ── Simulation ─────────────────────────────────────────────────────────────
|
| 29 |
+
simulation:
|
| 30 |
+
dt_ms: 1.0
|
| 31 |
+
ticks: 0 # infinite — controller drives stepping via API
|
| 32 |
+
max_delay: 20
|
| 33 |
+
debug_invariants: false
|
| 34 |
+
|
| 35 |
+
# ── Neuron defaults ────────────────────────────────────────────────────────
|
| 36 |
+
neuron:
|
| 37 |
+
a: 0.02
|
| 38 |
+
b: 0.2
|
| 39 |
+
c: -65.0
|
| 40 |
+
d: 8.0
|
| 41 |
+
|
| 42 |
+
# ── Network defaults ───────────────────────────────────────────────────────
|
| 43 |
+
network:
|
| 44 |
+
initial_connections_per_neuron: 10
|
| 45 |
+
neighbour_radius: 2.0
|
| 46 |
+
weight_min: 0.0
|
| 47 |
+
weight_max: 0.5
|
| 48 |
+
|
| 49 |
+
# ── Energy defaults ────────────────────────────────────────────────────────
|
| 50 |
+
energy:
|
| 51 |
+
initial: 1.0
|
| 52 |
+
spike_cost: 0.001
|
| 53 |
+
affects_firing: false
|
| 54 |
+
|
| 55 |
+
# ── Topology defaults ───────────────────────────────────────────────────────
|
| 56 |
+
topology:
|
| 57 |
+
input:
|
| 58 |
+
dimension: x
|
| 59 |
+
coordinate: 0
|
| 60 |
+
output:
|
| 61 |
+
dimension: x
|
| 62 |
+
coordinate: 9
|
| 63 |
+
allow_self_connections: false
|
| 64 |
+
allow_parallel_connections: false
|
| 65 |
+
|
| 66 |
+
# ── Homeostasis — ENABLED ──────────────────────────────────────────────────
|
| 67 |
+
homeostasis:
|
| 68 |
+
enabled: true
|
| 69 |
+
target_rate_hz: 5.0
|
| 70 |
+
rate_tau_ticks: 200.0
|
| 71 |
+
threshold_learning_rate: 0.001
|
| 72 |
+
threshold_min: -15.0
|
| 73 |
+
threshold_max: 30.0
|
| 74 |
+
energy_enabled: true
|
| 75 |
+
target_energy: 1.0
|
| 76 |
+
energy_recovery_rate: 0.001
|
| 77 |
+
energy_min: 0.0
|
| 78 |
+
energy_max: 1.0
|
| 79 |
+
|
| 80 |
+
# ── STDP — enabled for learning ────────────────────────────────────────────
|
| 81 |
+
stdp:
|
| 82 |
+
enabled: true
|
| 83 |
+
a_plus: 0.1
|
| 84 |
+
a_minus: 0.12
|
| 85 |
+
tau_plus: 20.0
|
| 86 |
+
tau_minus: 20.0
|
| 87 |
+
max_weight: 1.0
|
| 88 |
+
min_weight: 0.0
|
| 89 |
+
|
| 90 |
+
eligibility:
|
| 91 |
+
enabled: true
|
| 92 |
+
tau_ticks: 200.0
|
| 93 |
+
|
| 94 |
+
reward:
|
| 95 |
+
enabled: true
|
| 96 |
+
learning_rate: 0.01
|
| 97 |
+
delay_ticks: 5
|
| 98 |
+
clamp_weights: true
|
| 99 |
+
reset_trace_after_reward: false
|
| 100 |
+
trace_epsilon: 1.0e-12
|
| 101 |
+
reward_source: external
|
| 102 |
+
|
| 103 |
+
# ── Self-Organization — ENABLED, approval-gated ────────────────────────────
|
| 104 |
+
self_organization:
|
| 105 |
+
enabled: true
|
| 106 |
+
interval_ticks: 100
|
| 107 |
+
pruning_enabled: true
|
| 108 |
+
pruning_weight_threshold: 0.005
|
| 109 |
+
pruning_min_age_ticks: 1000
|
| 110 |
+
sprouting_enabled: true
|
| 111 |
+
sprouting_max_out_degree: 12
|
| 112 |
+
sprouting_radius: 2.0
|
| 113 |
+
sprouting_weight: 0.05
|
| 114 |
+
sprouting_delay: 1
|
| 115 |
+
neurogenesis_enabled: true
|
| 116 |
+
neurogenesis_spike_delta_threshold: 50
|
| 117 |
+
neurogenesis_radius: 1.0
|
| 118 |
+
neurogenesis_max_per_cycle: 1
|
| 119 |
+
|
| 120 |
+
# ── Storage — ENABLED, delta runtime + checkpoints + journal ───────────────
|
| 121 |
+
storage:
|
| 122 |
+
enabled: true
|
| 123 |
+
format: b5d
|
| 124 |
+
path: artifacts/alpha5_live.b5d
|
| 125 |
+
restart_capable: true
|
| 126 |
+
journal:
|
| 127 |
+
enabled: true
|
| 128 |
+
path: artifacts/alpha5_live.b5d.journal
|
| 129 |
+
crc: true
|
| 130 |
+
fsync_on_commit: true
|
| 131 |
+
commit_interval_ticks: 10
|
| 132 |
+
max_payload_size: 1048576
|
| 133 |
+
runtime:
|
| 134 |
+
enabled: true
|
| 135 |
+
capture_spike_events: true
|
| 136 |
+
# Keep the correctness baseline until dirty sets are emitted by the core.
|
| 137 |
+
capture_policy: full_change_scan
|
| 138 |
+
async_enabled: false
|
| 139 |
+
async_queue_size: 1000
|
| 140 |
+
async_workers: 1
|
| 141 |
+
drop_on_overflow: false
|
| 142 |
+
enqueue_timeout_s: 0.25
|
| 143 |
+
telemetry:
|
| 144 |
+
enabled: true
|
| 145 |
+
export_interval_ticks: 100
|
| 146 |
+
checkpoint:
|
| 147 |
+
enabled: true
|
| 148 |
+
path: artifacts/alpha5_live_runtime.json
|
| 149 |
+
compaction:
|
| 150 |
+
enabled: false
|
| 151 |
+
manifest_path: artifacts/alpha5_live.manifest.json
|
| 152 |
+
trigger_journal_size_mb: 100
|
| 153 |
+
trigger_ticks: 10000
|
| 154 |
+
keep_generations: 2
|
| 155 |
+
lazy_observatory:
|
| 156 |
+
enabled: false
|
| 157 |
+
heatmap_type: activity
|
| 158 |
+
activity_tau_ticks: 50.0
|
| 159 |
+
|
| 160 |
+
# ── Visualization defaults ─────────────────────────────────────────────────
|
| 161 |
+
visualization:
|
| 162 |
+
enabled: false
|
| 163 |
+
refresh_interval_ticks: 20
|
| 164 |
+
spike_raster_neurons: 250
|
| 165 |
+
projection_4d: d4
|
| 166 |
+
activity_tau_ticks: 50.0
|
| 167 |
+
|
| 168 |
+
# ── Dashboard — live telemetry ENABLED ─────────────────────────────────────
|
| 169 |
+
dashboard:
|
| 170 |
+
live_telemetry:
|
| 171 |
+
enabled: true
|
| 172 |
+
activity_window_ticks: 20
|
| 173 |
+
capture_interval_ticks: 20
|
| 174 |
+
state_publish_interval_ticks: 10
|
| 175 |
+
show_heatmap: true
|
| 176 |
+
heatmap_type: activity
|
| 177 |
+
|
| 178 |
+
# ── Telemetry ──────────────────────────────────────────────────────────────
|
| 179 |
+
telemetry:
|
| 180 |
+
enabled: true
|
| 181 |
+
history_ticks: 5000
|
| 182 |
+
spike_history_ticks: 5000
|
| 183 |
+
|
| 184 |
+
# ── Logging defaults ───────────────────────────────────────────────────────
|
| 185 |
+
logging:
|
| 186 |
+
interval_ticks: 100
|
| 187 |
+
|
| 188 |
+
# ── Diagnostics ────────────────────────────────────────────────────────────
|
| 189 |
+
diagnostics:
|
| 190 |
+
mode: single_neuron_drive
|
| 191 |
+
start_tick: 100
|
| 192 |
+
duration_ticks: 20
|
| 193 |
+
amplitude: 10.0
|
| 194 |
+
target_coord: [0, 4, 7, 3, 2]
|
| 195 |
+
input_plane_dim: x
|
| 196 |
+
poisson_rate_hz: 0.5
|
| 197 |
+
poisson_amplitude: 5.0
|
| 198 |
+
|
| 199 |
+
# ── Structural plasticity — structural journal ENABLED ─────────────────────
|
| 200 |
+
structural:
|
| 201 |
+
auto_approval: false
|
| 202 |
+
structural_mutations: approval_gated
|
| 203 |
+
structural_journal:
|
| 204 |
+
enabled: true
|
configs/poc_config.yaml
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
seed: 42
|
| 2 |
+
|
| 3 |
+
dimensions: [10, 10, 10, 10, 10]
|
| 4 |
+
initial_neurons: 5000
|
| 5 |
+
max_neurons: 100000
|
| 6 |
+
|
| 7 |
+
simulation:
|
| 8 |
+
dt_ms: 1.0
|
| 9 |
+
ticks: 2000
|
| 10 |
+
max_delay: 20
|
| 11 |
+
debug_invariants: false
|
| 12 |
+
|
| 13 |
+
neuron:
|
| 14 |
+
a: 0.02
|
| 15 |
+
b: 0.2
|
| 16 |
+
c: -65.0
|
| 17 |
+
d: 8.0
|
| 18 |
+
|
| 19 |
+
network:
|
| 20 |
+
initial_connections_per_neuron: 10
|
| 21 |
+
neighbour_radius: 2.0
|
| 22 |
+
weight_min: 0.0
|
| 23 |
+
weight_max: 0.5
|
| 24 |
+
|
| 25 |
+
energy:
|
| 26 |
+
initial: 1.0
|
| 27 |
+
spike_cost: 0.001
|
| 28 |
+
affects_firing: false
|
| 29 |
+
|
| 30 |
+
topology:
|
| 31 |
+
input:
|
| 32 |
+
dimension: x
|
| 33 |
+
coordinate: 0
|
| 34 |
+
output:
|
| 35 |
+
dimension: x
|
| 36 |
+
coordinate: 9
|
| 37 |
+
allow_self_connections: false
|
| 38 |
+
allow_parallel_connections: false
|
| 39 |
+
|
| 40 |
+
diagnostics:
|
| 41 |
+
mode: single_neuron_drive
|
| 42 |
+
start_tick: 100
|
| 43 |
+
duration_ticks: 20
|
| 44 |
+
amplitude: 10.0
|
| 45 |
+
target_coord: [0, 4, 7, 3, 2]
|
| 46 |
+
input_plane_dim: x
|
| 47 |
+
poisson_rate_hz: 0.5
|
| 48 |
+
poisson_amplitude: 5.0
|
| 49 |
+
|
| 50 |
+
telemetry:
|
| 51 |
+
enabled: true
|
| 52 |
+
history_ticks: 5000
|
| 53 |
+
spike_history_ticks: 5000
|
| 54 |
+
|
| 55 |
+
visualization:
|
| 56 |
+
enabled: false
|
| 57 |
+
refresh_interval_ticks: 20
|
| 58 |
+
spike_raster_neurons: 250
|
| 59 |
+
projection_4d: d4
|
| 60 |
+
activity_tau_ticks: 50.0
|
| 61 |
+
|
| 62 |
+
dashboard:
|
| 63 |
+
live_telemetry:
|
| 64 |
+
enabled: true
|
| 65 |
+
activity_window_ticks: 20
|
| 66 |
+
capture_interval_ticks: 5
|
| 67 |
+
show_heatmap: true
|
| 68 |
+
heatmap_type: activity
|
| 69 |
+
|
| 70 |
+
logging:
|
| 71 |
+
interval_ticks: 100
|
| 72 |
+
|
| 73 |
+
stdp:
|
| 74 |
+
enabled: false
|
| 75 |
+
a_plus: 0.1
|
| 76 |
+
a_minus: 0.12
|
| 77 |
+
tau_plus: 20.0
|
| 78 |
+
tau_minus: 20.0
|
| 79 |
+
max_weight: 1.0
|
| 80 |
+
min_weight: 0.0
|
| 81 |
+
|
| 82 |
+
eligibility:
|
| 83 |
+
enabled: true
|
| 84 |
+
tau_ticks: 200.0
|
| 85 |
+
|
| 86 |
+
reward:
|
| 87 |
+
enabled: false
|
| 88 |
+
learning_rate: 0.01
|
| 89 |
+
delay_ticks: 0
|
| 90 |
+
clamp_weights: true
|
| 91 |
+
reset_trace_after_reward: false
|
| 92 |
+
trace_epsilon: 1.0e-12
|
| 93 |
+
reward_source: external
|
| 94 |
+
|
| 95 |
+
self_organization:
|
| 96 |
+
enabled: false
|
| 97 |
+
interval_ticks: 100
|
| 98 |
+
pruning_enabled: false
|
| 99 |
+
pruning_weight_threshold: 0.005
|
| 100 |
+
pruning_min_age_ticks: 1000
|
| 101 |
+
sprouting_enabled: false
|
| 102 |
+
sprouting_max_out_degree: 12
|
| 103 |
+
sprouting_radius: 2.0
|
| 104 |
+
sprouting_weight: 0.05
|
| 105 |
+
sprouting_delay: 1
|
| 106 |
+
neurogenesis_enabled: false
|
| 107 |
+
neurogenesis_spike_delta_threshold: 50
|
| 108 |
+
neurogenesis_radius: 1.0
|
| 109 |
+
neurogenesis_max_per_cycle: 1
|
| 110 |
+
|
| 111 |
+
# v0.5.0-alpha.1: conservative self-regulation, disabled by default.
|
| 112 |
+
homeostasis:
|
| 113 |
+
enabled: false
|
| 114 |
+
target_rate_hz: 5.0
|
| 115 |
+
rate_tau_ticks: 200.0
|
| 116 |
+
threshold_learning_rate: 0.001
|
| 117 |
+
threshold_min: -15.0
|
| 118 |
+
threshold_max: 30.0
|
| 119 |
+
energy_enabled: true
|
| 120 |
+
target_energy: 1.0
|
| 121 |
+
energy_recovery_rate: 0.001
|
| 122 |
+
energy_min: 0.0
|
| 123 |
+
energy_max: 1.0
|
| 124 |
+
|
| 125 |
+
storage:
|
| 126 |
+
enabled: false
|
| 127 |
+
format: b5d
|
| 128 |
+
path: artifacts/brain5d_snapshot.b5d
|
| 129 |
+
restart_capable: true
|
| 130 |
+
journal:
|
| 131 |
+
enabled: false
|
| 132 |
+
path: artifacts/brain5d_snapshot.b5d.journal
|
| 133 |
+
crc: true
|
| 134 |
+
fsync_on_commit: true
|
| 135 |
+
commit_interval_ticks: 10
|
| 136 |
+
max_payload_size: 1048576
|
| 137 |
+
runtime:
|
| 138 |
+
enabled: false
|
| 139 |
+
capture_spike_events: true
|
| 140 |
+
capture_policy: full_change_scan
|
| 141 |
+
async_enabled: false
|
| 142 |
+
async_queue_size: 1000
|
| 143 |
+
async_workers: 1
|
| 144 |
+
drop_on_overflow: false
|
| 145 |
+
enqueue_timeout_s: 0.25
|
| 146 |
+
telemetry:
|
| 147 |
+
enabled: true
|
| 148 |
+
export_interval_ticks: 100
|
| 149 |
+
checkpoint:
|
| 150 |
+
enabled: false
|
| 151 |
+
path: artifacts/brain5d_runtime.json
|
| 152 |
+
compaction:
|
| 153 |
+
enabled: false
|
| 154 |
+
manifest_path: artifacts/brain5d.manifest.json
|
| 155 |
+
trigger_journal_size_mb: 100
|
| 156 |
+
trigger_ticks: 10000
|
| 157 |
+
keep_generations: 2
|
| 158 |
+
lazy_observatory:
|
| 159 |
+
enabled: false
|
| 160 |
+
heatmap_type: activity
|
| 161 |
+
activity_tau_ticks: 50.0
|
configs/poc_config_stdp_on.yaml
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Sprint 2C learning-enabled laboratory configuration.
|
| 2 |
+
# Use with: python -m src.main --config configs/poc_config_stdp_on.yaml
|
| 3 |
+
seed: 42
|
| 4 |
+
|
| 5 |
+
dimensions: [10, 10, 10, 10, 10]
|
| 6 |
+
initial_neurons: 5000
|
| 7 |
+
max_neurons: 100000
|
| 8 |
+
|
| 9 |
+
simulation:
|
| 10 |
+
dt_ms: 1.0
|
| 11 |
+
ticks: 2000
|
| 12 |
+
max_delay: 20
|
| 13 |
+
debug_invariants: false
|
| 14 |
+
|
| 15 |
+
neuron:
|
| 16 |
+
a: 0.02
|
| 17 |
+
b: 0.2
|
| 18 |
+
c: -65.0
|
| 19 |
+
d: 8.0
|
| 20 |
+
|
| 21 |
+
network:
|
| 22 |
+
initial_connections_per_neuron: 10
|
| 23 |
+
neighbour_radius: 2.0
|
| 24 |
+
weight_min: 0.0
|
| 25 |
+
weight_max: 0.5
|
| 26 |
+
|
| 27 |
+
energy:
|
| 28 |
+
initial: 1.0
|
| 29 |
+
spike_cost: 0.001
|
| 30 |
+
affects_firing: false
|
| 31 |
+
|
| 32 |
+
topology:
|
| 33 |
+
input:
|
| 34 |
+
dimension: x
|
| 35 |
+
coordinate: 0
|
| 36 |
+
output:
|
| 37 |
+
dimension: x
|
| 38 |
+
coordinate: 9
|
| 39 |
+
allow_self_connections: false
|
| 40 |
+
allow_parallel_connections: false
|
| 41 |
+
|
| 42 |
+
diagnostics:
|
| 43 |
+
mode: single_neuron_drive
|
| 44 |
+
start_tick: 100
|
| 45 |
+
duration_ticks: 20
|
| 46 |
+
amplitude: 10.0
|
| 47 |
+
target_coord: [0, 4, 7, 3, 2]
|
| 48 |
+
input_plane_dim: x
|
| 49 |
+
poisson_rate_hz: 0.5
|
| 50 |
+
poisson_amplitude: 5.0
|
| 51 |
+
|
| 52 |
+
telemetry:
|
| 53 |
+
enabled: true
|
| 54 |
+
history_ticks: 5000
|
| 55 |
+
spike_history_ticks: 5000
|
| 56 |
+
|
| 57 |
+
visualization:
|
| 58 |
+
enabled: false
|
| 59 |
+
refresh_interval_ticks: 20
|
| 60 |
+
spike_raster_neurons: 250
|
| 61 |
+
projection_4d: d4
|
| 62 |
+
activity_tau_ticks: 50.0
|
| 63 |
+
show_heatmap: true
|
| 64 |
+
heatmap_type: weights
|
| 65 |
+
|
| 66 |
+
logging:
|
| 67 |
+
interval_ticks: 100
|
| 68 |
+
|
| 69 |
+
stdp:
|
| 70 |
+
enabled: false
|
| 71 |
+
a_plus: 0.1
|
| 72 |
+
a_minus: 0.12
|
| 73 |
+
tau_plus: 20.0
|
| 74 |
+
tau_minus: 20.0
|
| 75 |
+
max_weight: 1.0
|
| 76 |
+
min_weight: 0.0
|
| 77 |
+
|
| 78 |
+
eligibility:
|
| 79 |
+
enabled: true
|
| 80 |
+
tau_ticks: 200.0
|
| 81 |
+
|
| 82 |
+
reward:
|
| 83 |
+
enabled: true
|
| 84 |
+
learning_rate: 0.01
|
| 85 |
+
delay_ticks: 0
|
| 86 |
+
clamp_weights: true
|
| 87 |
+
reset_trace_after_reward: false
|
| 88 |
+
trace_epsilon: 1.0e-12
|
| 89 |
+
reward_source: external
|
configs/poc_structural_live.yaml
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Brain-5D — Deterministic Live Verification Config
|
| 2 |
+
# ====================================================
|
| 3 |
+
# Created for Alpha.5 Structural Live Loop sprint.
|
| 4 |
+
#
|
| 5 |
+
# Purpose: Small, fast, deterministic config that demonstrates the real
|
| 6 |
+
# closed structural regulation loop:
|
| 7 |
+
#
|
| 8 |
+
# Real Network -> Real HomeostasisSignal -> Config-authoritative Policy
|
| 9 |
+
# -> Real Proposal -> Coordinator -> Manual Approval -> Exactly One
|
| 10 |
+
# Structural Mutation -> Journal -> Undo/Replay
|
| 11 |
+
#
|
| 12 |
+
# Requirements met:
|
| 13 |
+
# - Small enough to run quickly (5x5x1x1x1 grid, 100 neurons)
|
| 14 |
+
# - Fixed seed for determinism
|
| 15 |
+
# - Homeostasis enabled
|
| 16 |
+
# - Self-Organization enabled
|
| 17 |
+
# - Manual approval required (auto_approval OFF)
|
| 18 |
+
# - Exactly one structural mechanism enabled: neurogenesis
|
| 19 |
+
# - Pruning, sprouting, synapse pruning all OFF
|
| 20 |
+
# - Structural journal ON
|
| 21 |
+
# - Safe limits (max_neurons=500)
|
| 22 |
+
# - Thresholds chosen so a proposal can be generated from real network
|
| 23 |
+
# measurements in a bounded number of ticks (~200-500)
|
| 24 |
+
# - No unrelated STDP/reward mechanisms
|
| 25 |
+
# - No fake proposal injection
|
| 26 |
+
|
| 27 |
+
seed: 42
|
| 28 |
+
|
| 29 |
+
dimensions: [10, 10, 1, 1, 1]
|
| 30 |
+
initial_neurons: 50
|
| 31 |
+
max_neurons: 500
|
| 32 |
+
|
| 33 |
+
simulation:
|
| 34 |
+
dt_ms: 1.0
|
| 35 |
+
ticks: 1000
|
| 36 |
+
max_delay: 5
|
| 37 |
+
debug_invariants: false
|
| 38 |
+
|
| 39 |
+
neuron:
|
| 40 |
+
a: 0.02
|
| 41 |
+
b: 0.2
|
| 42 |
+
c: -65.0
|
| 43 |
+
d: 8.0
|
| 44 |
+
|
| 45 |
+
network:
|
| 46 |
+
initial_connections_per_neuron: 8
|
| 47 |
+
neighbour_radius: 2.0
|
| 48 |
+
weight_min: 0.0
|
| 49 |
+
weight_max: 0.5
|
| 50 |
+
|
| 51 |
+
energy:
|
| 52 |
+
initial: 1.0
|
| 53 |
+
spike_cost: 0.001
|
| 54 |
+
affects_firing: false
|
| 55 |
+
|
| 56 |
+
topology:
|
| 57 |
+
input:
|
| 58 |
+
dimension: x
|
| 59 |
+
coordinate: 0
|
| 60 |
+
output:
|
| 61 |
+
dimension: x
|
| 62 |
+
coordinate: 4
|
| 63 |
+
allow_self_connections: false
|
| 64 |
+
allow_parallel_connections: false
|
| 65 |
+
|
| 66 |
+
diagnostics:
|
| 67 |
+
mode: single_neuron_drive
|
| 68 |
+
start_tick: 10
|
| 69 |
+
duration_ticks: 200
|
| 70 |
+
amplitude: 15.0
|
| 71 |
+
target_coord: [0, 2, 0, 0, 0]
|
| 72 |
+
input_plane_dim: x
|
| 73 |
+
poisson_rate_hz: 2.0
|
| 74 |
+
poisson_amplitude: 8.0
|
| 75 |
+
|
| 76 |
+
telemetry:
|
| 77 |
+
enabled: true
|
| 78 |
+
history_ticks: 2000
|
| 79 |
+
spike_history_ticks: 2000
|
| 80 |
+
|
| 81 |
+
visualization:
|
| 82 |
+
enabled: false
|
| 83 |
+
|
| 84 |
+
dashboard:
|
| 85 |
+
live_telemetry:
|
| 86 |
+
enabled: true
|
| 87 |
+
activity_window_ticks: 20
|
| 88 |
+
capture_interval_ticks: 5
|
| 89 |
+
|
| 90 |
+
logging:
|
| 91 |
+
interval_ticks: 100
|
| 92 |
+
|
| 93 |
+
# STDP and reward disabled — not required for structural live loop
|
| 94 |
+
stdp:
|
| 95 |
+
enabled: false
|
| 96 |
+
|
| 97 |
+
eligibility:
|
| 98 |
+
enabled: false
|
| 99 |
+
|
| 100 |
+
reward:
|
| 101 |
+
enabled: false
|
| 102 |
+
|
| 103 |
+
# ================================================================
|
| 104 |
+
# Homeostasis — ENABLED for live structural loop
|
| 105 |
+
# ================================================================
|
| 106 |
+
homeostasis:
|
| 107 |
+
enabled: true
|
| 108 |
+
target_rate_hz: 5.0
|
| 109 |
+
rate_tau_ticks: 100.0
|
| 110 |
+
threshold_learning_rate: 0.002
|
| 111 |
+
threshold_min: -15.0
|
| 112 |
+
threshold_max: 30.0
|
| 113 |
+
energy_enabled: true
|
| 114 |
+
target_energy: 1.0
|
| 115 |
+
energy_recovery_rate: 0.001
|
| 116 |
+
energy_min: 0.0
|
| 117 |
+
energy_max: 1.0
|
| 118 |
+
|
| 119 |
+
# ================================================================
|
| 120 |
+
# Self-Organization — ENABLED, neurogenesis only
|
| 121 |
+
# ================================================================
|
| 122 |
+
self_organization:
|
| 123 |
+
enabled: true
|
| 124 |
+
interval_ticks: 50
|
| 125 |
+
# Only neurogenesis is enabled for this live verification
|
| 126 |
+
neurogenesis_enabled: true
|
| 127 |
+
pruning_enabled: false
|
| 128 |
+
sprouting_enabled: false
|
| 129 |
+
synapse_pruning_enabled: false
|
| 130 |
+
# Thresholds: low enough to trigger from real activity within ~200-500 ticks
|
| 131 |
+
neurogenesis_threshold: 0.3
|
| 132 |
+
pruning_threshold: 0.9
|
| 133 |
+
synapse_sprouting_threshold: 0.9
|
| 134 |
+
synapse_pruning_threshold: 0.9
|
| 135 |
+
# Limits
|
| 136 |
+
max_neurons: 500
|
| 137 |
+
min_neurons: 10
|
| 138 |
+
# Neurogenesis params (used by plasticity limits)
|
| 139 |
+
neurogenesis_max_per_cycle: 1
|
| 140 |
+
|
| 141 |
+
# ================================================================
|
| 142 |
+
# Storage — journal enabled for structural tracking
|
| 143 |
+
# ================================================================
|
| 144 |
+
storage:
|
| 145 |
+
enabled: false
|
| 146 |
+
format: b5d
|
| 147 |
+
path: artifacts/brain5d_snapshot.b5d
|
| 148 |
+
restart_capable: true
|
| 149 |
+
journal:
|
| 150 |
+
enabled: false
|
| 151 |
+
runtime:
|
| 152 |
+
enabled: false
|
| 153 |
+
telemetry:
|
| 154 |
+
enabled: false
|
| 155 |
+
checkpoint:
|
| 156 |
+
enabled: false
|
| 157 |
+
compaction:
|
| 158 |
+
enabled: false
|
| 159 |
+
lazy_observatory:
|
| 160 |
+
enabled: false
|
configs/research_chat.example.yaml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Optional grounded Research Self-Knowledge Chat settings.
|
| 2 |
+
# Add this section to the runtime config or use the matching environment variables.
|
| 3 |
+
research_chat:
|
| 4 |
+
model: "gemma4:latest"
|
| 5 |
+
endpoint: "http://127.0.0.1:11434/api/generate"
|
| 6 |
+
temperature: 0.0
|
| 7 |
+
top_p: 0.9
|
| 8 |
+
max_tokens: 2048
|
| 9 |
+
max_context_chars: 24000
|
| 10 |
+
web_search_enabled: false
|
| 11 |
+
system_prompt: ""
|
| 12 |
+
handoff_prompt: ""
|
| 13 |
+
vision_enabled: false
|
| 14 |
+
tools_enabled: false
|
| 15 |
+
|
| 16 |
+
# Environment variable overrides:
|
| 17 |
+
# BRAIN5D_CHAT_MODEL
|
| 18 |
+
# BRAIN5D_CHAT_ENDPOINT
|
| 19 |
+
# BRAIN5D_CHAT_TEMPERATURE
|
| 20 |
+
# BRAIN5D_CHAT_CONTEXT_CHARS
|
| 21 |
+
# BRAIN5D_CHAT_WEB_SEARCH
|
| 22 |
+
# BRAIN5D_CHAT_SYSTEM_PROMPT
|
| 23 |
+
# BRAIN5D_CHAT_HANDOFF_PROMPT
|
| 24 |
+
# BRAIN5D_CHAT_VISION
|
| 25 |
+
# BRAIN5D_CHAT_TOOLS
|
configs/self_organization.yaml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Merge this block into configs/poc_config.yaml.
|
| 2 |
+
# Safe default: everything disabled until explicitly activated.
|
| 3 |
+
self_organization:
|
| 4 |
+
enabled: false
|
| 5 |
+
interval_ticks: 100
|
| 6 |
+
|
| 7 |
+
pruning_enabled: false
|
| 8 |
+
pruning_weight_threshold: 0.005
|
| 9 |
+
pruning_min_age_ticks: 1000
|
| 10 |
+
|
| 11 |
+
sprouting_enabled: false
|
| 12 |
+
sprouting_max_out_degree: 12
|
| 13 |
+
sprouting_radius: 2.0
|
| 14 |
+
sprouting_weight: 0.05
|
| 15 |
+
sprouting_delay: 1
|
| 16 |
+
|
| 17 |
+
neurogenesis_enabled: false
|
| 18 |
+
neurogenesis_spike_delta_threshold: 50
|
| 19 |
+
neurogenesis_radius: 1.0
|
| 20 |
+
neurogenesis_max_per_cycle: 1
|
configs/structural_plasticity_alpha5.yaml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
self_organization:
|
| 2 |
+
enabled: false
|
| 3 |
+
dry_run: true
|
| 4 |
+
auto_approval: false
|
| 5 |
+
auto_approval_threshold: 0.8
|
| 6 |
+
max_changes_per_tick: 5
|
| 7 |
+
max_neuron_additions_per_tick: 2
|
| 8 |
+
max_neuron_removals_per_tick: 0
|
| 9 |
+
max_synapse_additions_per_tick: 5
|
| 10 |
+
max_synapse_removals_per_tick: 5
|
| 11 |
+
min_neurons: 100
|
| 12 |
+
max_neurons: 10000
|
| 13 |
+
allow_neuron_pruning: false
|
| 14 |
+
allow_synapse_pruning: true
|
| 15 |
+
cooldown_ticks: 100
|
| 16 |
+
structural_journal:
|
| 17 |
+
enabled: true
|
| 18 |
+
path: artifacts/brain5d_structural.b5d.journal
|
configs/test_structural_auto_approve.yaml
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Brain-5D Structural Auto-Approval Test Configuration
|
| 2 |
+
# Same as test_structural_e2e.yaml but with auto_approval enabled.
|
| 3 |
+
# Used only for explicit auto-approval tests.
|
| 4 |
+
|
| 5 |
+
seed: 42
|
| 6 |
+
|
| 7 |
+
dimensions: [5, 5, 5, 5, 5]
|
| 8 |
+
initial_neurons: 10
|
| 9 |
+
max_neurons: 100
|
| 10 |
+
|
| 11 |
+
simulation:
|
| 12 |
+
dt_ms: 1.0
|
| 13 |
+
ticks: 50
|
| 14 |
+
max_delay: 5
|
| 15 |
+
debug_invariants: true
|
| 16 |
+
|
| 17 |
+
neuron:
|
| 18 |
+
a: 0.02
|
| 19 |
+
b: 0.2
|
| 20 |
+
c: -65.0
|
| 21 |
+
d: 8.0
|
| 22 |
+
|
| 23 |
+
network:
|
| 24 |
+
initial_connections_per_neuron: 3
|
| 25 |
+
neighbour_radius: 2.0
|
| 26 |
+
weight_min: 0.0
|
| 27 |
+
weight_max: 0.5
|
| 28 |
+
|
| 29 |
+
energy:
|
| 30 |
+
initial: 1.0
|
| 31 |
+
spike_cost: 0.001
|
| 32 |
+
affects_firing: false
|
| 33 |
+
|
| 34 |
+
topology:
|
| 35 |
+
input:
|
| 36 |
+
dimension: x
|
| 37 |
+
coordinate: 0
|
| 38 |
+
output:
|
| 39 |
+
dimension: x
|
| 40 |
+
coordinate: 4
|
| 41 |
+
allow_self_connections: false
|
| 42 |
+
allow_parallel_connections: false
|
| 43 |
+
|
| 44 |
+
diagnostics:
|
| 45 |
+
mode: single_neuron_drive
|
| 46 |
+
start_tick: 0
|
| 47 |
+
duration_ticks: 5
|
| 48 |
+
amplitude: 50.0
|
| 49 |
+
target_coord: [0, 0, 0, 0, 0]
|
| 50 |
+
input_plane_dim: x
|
| 51 |
+
poisson_rate_hz: 0.0
|
| 52 |
+
poisson_amplitude: 0.0
|
| 53 |
+
|
| 54 |
+
telemetry:
|
| 55 |
+
enabled: false
|
| 56 |
+
history_ticks: 100
|
| 57 |
+
spike_history_ticks: 100
|
| 58 |
+
|
| 59 |
+
visualization:
|
| 60 |
+
enabled: false
|
| 61 |
+
refresh_interval_ticks: 100
|
| 62 |
+
spike_raster_neurons: 10
|
| 63 |
+
projection_4d: d4
|
| 64 |
+
activity_tau_ticks: 50.0
|
| 65 |
+
show_heatmap: false
|
| 66 |
+
heatmap_type: activity
|
| 67 |
+
|
| 68 |
+
logging:
|
| 69 |
+
interval_ticks: 1000
|
| 70 |
+
|
| 71 |
+
stdp:
|
| 72 |
+
enabled: false
|
| 73 |
+
a_plus: 0.1
|
| 74 |
+
a_minus: 0.12
|
| 75 |
+
tau_plus: 20.0
|
| 76 |
+
tau_minus: 20.0
|
| 77 |
+
max_weight: 1.0
|
| 78 |
+
min_weight: 0.0
|
| 79 |
+
|
| 80 |
+
eligibility:
|
| 81 |
+
enabled: false
|
| 82 |
+
tau_ticks: 200.0
|
| 83 |
+
|
| 84 |
+
reward:
|
| 85 |
+
enabled: false
|
| 86 |
+
learning_rate: 0.01
|
| 87 |
+
delay_ticks: 0
|
| 88 |
+
clamp_weights: true
|
| 89 |
+
reset_trace_after_reward: false
|
| 90 |
+
trace_epsilon: 1.0e-12
|
| 91 |
+
reward_source: external
|
| 92 |
+
|
| 93 |
+
self_organization:
|
| 94 |
+
enabled: true
|
| 95 |
+
interval_ticks: 10
|
| 96 |
+
pruning_enabled: false
|
| 97 |
+
pruning_weight_threshold: 0.005
|
| 98 |
+
pruning_min_age_ticks: 100
|
| 99 |
+
sprouting_enabled: false
|
| 100 |
+
sprouting_max_out_degree: 12
|
| 101 |
+
sprouting_radius: 2.0
|
| 102 |
+
sprouting_weight: 0.05
|
| 103 |
+
sprouting_delay: 1
|
| 104 |
+
neurogenesis_enabled: false
|
| 105 |
+
neurogenesis_spike_delta_threshold: 10
|
| 106 |
+
neurogenesis_radius: 1.0
|
| 107 |
+
neurogenesis_max_per_cycle: 1
|
configs/test_structural_e2e.yaml
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Brain-5D Structural End-to-End Test Configuration
|
| 2 |
+
# Intentionally small and deterministic.
|
| 3 |
+
# self_organization.enabled = true for structural E2E proofs.
|
| 4 |
+
# auto_approval = false by default — manual approval required.
|
| 5 |
+
|
| 6 |
+
seed: 42
|
| 7 |
+
|
| 8 |
+
dimensions: [5, 5, 5, 5, 5]
|
| 9 |
+
initial_neurons: 10
|
| 10 |
+
max_neurons: 100
|
| 11 |
+
|
| 12 |
+
simulation:
|
| 13 |
+
dt_ms: 1.0
|
| 14 |
+
ticks: 50
|
| 15 |
+
max_delay: 5
|
| 16 |
+
debug_invariants: true
|
| 17 |
+
|
| 18 |
+
neuron:
|
| 19 |
+
a: 0.02
|
| 20 |
+
b: 0.2
|
| 21 |
+
c: -65.0
|
| 22 |
+
d: 8.0
|
| 23 |
+
|
| 24 |
+
network:
|
| 25 |
+
initial_connections_per_neuron: 3
|
| 26 |
+
neighbour_radius: 2.0
|
| 27 |
+
weight_min: 0.0
|
| 28 |
+
weight_max: 0.5
|
| 29 |
+
|
| 30 |
+
energy:
|
| 31 |
+
initial: 1.0
|
| 32 |
+
spike_cost: 0.001
|
| 33 |
+
affects_firing: false
|
| 34 |
+
|
| 35 |
+
topology:
|
| 36 |
+
input:
|
| 37 |
+
dimension: x
|
| 38 |
+
coordinate: 0
|
| 39 |
+
output:
|
| 40 |
+
dimension: x
|
| 41 |
+
coordinate: 4
|
| 42 |
+
allow_self_connections: false
|
| 43 |
+
allow_parallel_connections: false
|
| 44 |
+
|
| 45 |
+
diagnostics:
|
| 46 |
+
mode: single_neuron_drive
|
| 47 |
+
start_tick: 0
|
| 48 |
+
duration_ticks: 5
|
| 49 |
+
amplitude: 50.0
|
| 50 |
+
target_coord: [0, 0, 0, 0, 0]
|
| 51 |
+
input_plane_dim: x
|
| 52 |
+
poisson_rate_hz: 0.0
|
| 53 |
+
poisson_amplitude: 0.0
|
| 54 |
+
|
| 55 |
+
telemetry:
|
| 56 |
+
enabled: false
|
| 57 |
+
history_ticks: 100
|
| 58 |
+
spike_history_ticks: 100
|
| 59 |
+
|
| 60 |
+
visualization:
|
| 61 |
+
enabled: false
|
| 62 |
+
refresh_interval_ticks: 100
|
| 63 |
+
spike_raster_neurons: 10
|
| 64 |
+
projection_4d: d4
|
| 65 |
+
activity_tau_ticks: 50.0
|
| 66 |
+
show_heatmap: false
|
| 67 |
+
heatmap_type: activity
|
| 68 |
+
|
| 69 |
+
logging:
|
| 70 |
+
interval_ticks: 1000
|
| 71 |
+
|
| 72 |
+
stdp:
|
| 73 |
+
enabled: false
|
| 74 |
+
a_plus: 0.1
|
| 75 |
+
a_minus: 0.12
|
| 76 |
+
tau_plus: 20.0
|
| 77 |
+
tau_minus: 20.0
|
| 78 |
+
max_weight: 1.0
|
| 79 |
+
min_weight: 0.0
|
| 80 |
+
|
| 81 |
+
eligibility:
|
| 82 |
+
enabled: false
|
| 83 |
+
tau_ticks: 200.0
|
| 84 |
+
|
| 85 |
+
reward:
|
| 86 |
+
enabled: false
|
| 87 |
+
learning_rate: 0.01
|
| 88 |
+
delay_ticks: 0
|
| 89 |
+
clamp_weights: true
|
| 90 |
+
reset_trace_after_reward: false
|
| 91 |
+
trace_epsilon: 1.0e-12
|
| 92 |
+
reward_source: external
|
| 93 |
+
|
| 94 |
+
# Structural E2E: enabled, manual approval required
|
| 95 |
+
self_organization:
|
| 96 |
+
enabled: true
|
| 97 |
+
interval_ticks: 10
|
| 98 |
+
pruning_enabled: false
|
| 99 |
+
pruning_weight_threshold: 0.005
|
| 100 |
+
pruning_min_age_ticks: 100
|
| 101 |
+
sprouting_enabled: false
|
| 102 |
+
sprouting_max_out_degree: 12
|
| 103 |
+
sprouting_radius: 2.0
|
| 104 |
+
sprouting_weight: 0.05
|
| 105 |
+
sprouting_delay: 1
|
| 106 |
+
neurogenesis_enabled: false
|
| 107 |
+
neurogenesis_spike_delta_threshold: 10
|
| 108 |
+
neurogenesis_radius: 1.0
|
| 109 |
+
neurogenesis_max_per_cycle: 1
|
deploy/Caddyfile.internet.example
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
email {$BRAIN5D_TLS_EMAIL}
|
| 3 |
+
}
|
| 4 |
+
|
| 5 |
+
{$BRAIN5D_DOMAIN} {
|
| 6 |
+
encode zstd gzip
|
| 7 |
+
|
| 8 |
+
basic_auth {
|
| 9 |
+
{$BRAIN5D_AUTH_USER} {$BRAIN5D_AUTH_PASSWORD_HASH}
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
header {
|
| 13 |
+
Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
| 14 |
+
X-Content-Type-Options "nosniff"
|
| 15 |
+
X-Frame-Options "DENY"
|
| 16 |
+
Referrer-Policy "no-referrer"
|
| 17 |
+
-Server
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
reverse_proxy 127.0.0.1:8765
|
| 21 |
+
}
|
docs/01-guides/ACCEPTANCE.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Abnahme Stand 1 – Sprint 1C
|
| 2 |
+
|
| 3 |
+
## Pflichtprüfungen
|
| 4 |
+
|
| 5 |
+
```bash
|
| 6 |
+
python -m pytest -v
|
| 7 |
+
python -m pytest tests/test_golden_chain.py -v
|
| 8 |
+
python -m src.main --benchmark
|
| 9 |
+
python -m src.main --observe
|
| 10 |
+
```
|
| 11 |
+
|
| 12 |
+
## Golden Chain
|
| 13 |
+
|
| 14 |
+
Kontrolliertes Netz:
|
| 15 |
+
|
| 16 |
+
```text
|
| 17 |
+
A --delay 2--> B --delay 3--> C
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
Erwartung:
|
| 21 |
+
|
| 22 |
+
```text
|
| 23 |
+
Tick 0: A spike
|
| 24 |
+
Tick 1: no spike
|
| 25 |
+
Tick 2: B spike
|
| 26 |
+
Tick 3: no spike
|
| 27 |
+
Tick 4: no spike
|
| 28 |
+
Tick 5: C spike
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
Die Tatsachen müssen in `StepResult`, `SpikeHistory`, `PropagationReport`, den Run-Artefakten und der Rasterdatenaufbereitung konsistent sein.
|
| 32 |
+
|
| 33 |
+
## Stand-1-Abgrenzung
|
| 34 |
+
|
| 35 |
+
Ein PASS besagt nur, dass der nichtlernende Referenzkern deterministisch und beobachtbar arbeitet. Es ist kein Nachweis von Intelligenz, Bewusstsein oder biologischer Gleichwertigkeit.
|
docs/01-guides/DEVELOPMENT.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Entwicklungsverfahren
|
| 2 |
+
|
| 3 |
+
## Leitprinzip
|
| 4 |
+
|
| 5 |
+
Neue Funktionalität wird erst in den Core übernommen, wenn sie isoliert testbar, beobachtbar und über einen Feature-Flag deaktivierbar ist.
|
| 6 |
+
|
| 7 |
+
## Arbeitsfolge
|
| 8 |
+
|
| 9 |
+
1. Issue bzw. technische Hypothese formulieren.
|
| 10 |
+
2. Referenztest schreiben oder erweitern.
|
| 11 |
+
3. kleinste Core-Änderung implementieren.
|
| 12 |
+
4. `python -m pytest -v` ausführen.
|
| 13 |
+
5. Golden Chain ausführen.
|
| 14 |
+
6. Headless-PoC ausführen.
|
| 15 |
+
7. Run-Artefakte prüfen.
|
| 16 |
+
8. Observatory nur als Beobachter verwenden.
|
| 17 |
+
9. Benchmark gegen Referenzstand vergleichen.
|
| 18 |
+
10. Commit mit eindeutiger Nachricht erzeugen.
|
| 19 |
+
|
| 20 |
+
## Browser-Checks
|
| 21 |
+
|
| 22 |
+
Die Dashboard-UI wird mit Playwright und Chromium geprüft. Ein vollständiger
|
| 23 |
+
lokaler Check installiert die optionale Browser-Abhängigkeit und startet den
|
| 24 |
+
Dashboard-Server automatisch auf einem freien Port:
|
| 25 |
+
|
| 26 |
+
```powershell
|
| 27 |
+
python -m pip install -e ".[browser]"
|
| 28 |
+
python -m playwright install chromium
|
| 29 |
+
python scripts/browser_check.py
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
Für einen bereits laufenden Dashboard-Server kann die URL direkt übergeben
|
| 33 |
+
werden: `python scripts/browser_check.py --url http://127.0.0.1:8765/`.
|
| 34 |
+
|
| 35 |
+
Die vollständige Browser-Suite läuft unabhängig mit `npm ci` und
|
| 36 |
+
`npm run test:e2e`; sie prüft Batch-Optionen, Footer-Status, Routing,
|
| 37 |
+
Box-Zustände sowie responsive Viewports.
|
| 38 |
+
|
| 39 |
+
## Definition of Done
|
| 40 |
+
|
| 41 |
+
Eine Änderung ist fertig, wenn:
|
| 42 |
+
|
| 43 |
+
- alle Tests grün sind;
|
| 44 |
+
- keine vorhandene Invariante abgeschwächt wurde;
|
| 45 |
+
- keine Beispielzahlen als Messergebnisse ausgegeben werden;
|
| 46 |
+
- neue Messwerte eine eindeutige Quelle besitzen;
|
| 47 |
+
- der Core weiterhin ohne Observatory startet;
|
| 48 |
+
- Dokumentation und Konfiguration aktualisiert sind.
|
| 49 |
+
|
| 50 |
+
## Debug-Invarianten
|
| 51 |
+
|
| 52 |
+
`simulation.debug_invariants: true` aktiviert teurere interne Konsistenzprüfungen. Diese Option ist für Tests und Fehlersuche vorgesehen, nicht für Performance-Messungen.
|
docs/01-guides/DeveloperGuide.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Brain-5D Developer Guide
|
| 2 |
+
|
| 3 |
+
## 1. Architecture
|
| 4 |
+
|
| 5 |
+
Brain-5D is organized around explicit boundaries:
|
| 6 |
+
|
| 7 |
+
1. `src/core/` — neural network, neurons, synapses, spatial indexing.
|
| 8 |
+
2. `src/learning/` — STDP, eligibility traces, reward learning.
|
| 9 |
+
3. `src/homeostasis/` — rate, threshold and energy regulation.
|
| 10 |
+
4. `src/self_organization/` — structural policy, proposals, coordination,
|
| 11 |
+
approval and undo.
|
| 12 |
+
5. `src/manipulation/` — controlled network mutation boundary.
|
| 13 |
+
6. `src/storage/` — `.b5d`, delta journal, structural journal, recovery,
|
| 14 |
+
checkpoints.
|
| 15 |
+
7. `src/dashboard/` — typed HTTP/operator-facing surface.
|
| 16 |
+
8. `src/controller/` and `src/runtime/` — interactive execution and safe runtime
|
| 17 |
+
control.
|
| 18 |
+
9. `src/visualization/` — observability and structural/homeostasis projections.
|
| 19 |
+
10. `src/embodiment/` — typed interfaces for later sensor/actuator integration.
|
| 20 |
+
|
| 21 |
+
## 2. Alpha.5 structural path
|
| 22 |
+
|
| 23 |
+
```text
|
| 24 |
+
HomeostasisEngine
|
| 25 |
+
-> HomeostasisSignal
|
| 26 |
+
-> SelfOrganizationPolicy
|
| 27 |
+
-> StructuralProposal
|
| 28 |
+
-> SelfOrganizationCoordinator
|
| 29 |
+
-> ApprovalDecision
|
| 30 |
+
-> StructuralPlasticityEngine
|
| 31 |
+
-> Manipulator
|
| 32 |
+
-> NeuralNetwork
|
| 33 |
+
-> StructuralChangeRecord
|
| 34 |
+
-> StructuralJournal
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
The coordinator does not mutate the network directly.
|
| 38 |
+
|
| 39 |
+
The dashboard does not reach into private network or engine attributes.
|
| 40 |
+
|
| 41 |
+
## 3. Persistence contract
|
| 42 |
+
|
| 43 |
+
The active persistence layers are:
|
| 44 |
+
|
| 45 |
+
```text
|
| 46 |
+
Snapshot + State Delta Journal + Structural Journal + Runtime Checkpoint
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
Restore order is deliberately defined:
|
| 50 |
+
|
| 51 |
+
```text
|
| 52 |
+
snapshot -> state deltas -> structural replay -> runtime checkpoint -> validate
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Do not reorder these stages without updating deterministic restore tests.
|
| 56 |
+
|
| 57 |
+
## 4. Type safety
|
| 58 |
+
|
| 59 |
+
New code must avoid the Pylance/Pyright error classes that were previously
|
| 60 |
+
observed in the project.
|
| 61 |
+
|
| 62 |
+
Rules:
|
| 63 |
+
|
| 64 |
+
- no bare `dict`, `list`, `set`, `tuple` containers;
|
| 65 |
+
- avoid `Any` as a repair mechanism;
|
| 66 |
+
- parse external JSON/YAML to `object`, then validate and narrow;
|
| 67 |
+
- do not expand `dict[str, object]` into strictly typed subprocess kwargs;
|
| 68 |
+
- subprocess commands should be explicit `list[str]`;
|
| 69 |
+
- keep config TypedDicts complete;
|
| 70 |
+
- do not reference undeclared TypedDict keys;
|
| 71 |
+
- avoid dynamic runtime attributes;
|
| 72 |
+
- use `assert_never` for exhaustive enums where appropriate;
|
| 73 |
+
- keep Protocol properties read-only when mutation is not required;
|
| 74 |
+
- no broad `type: ignore` / `pyright: ignore` for new code.
|
| 75 |
+
|
| 76 |
+
## 5. Testing strategy
|
| 77 |
+
|
| 78 |
+
- isolated unit tests for component behavior;
|
| 79 |
+
- integration tests for subsystem boundaries;
|
| 80 |
+
- restore/continue tests for persistence;
|
| 81 |
+
- opt-in slow tests for long-running behavior;
|
| 82 |
+
- focused alpha release verifiers.
|
| 83 |
+
|
| 84 |
+
When fixing a regression, reproduce it with the smallest failing test before
|
| 85 |
+
changing production code.
|
| 86 |
+
|
| 87 |
+
## 6. Quality commands
|
| 88 |
+
|
| 89 |
+
```powershell
|
| 90 |
+
.\.venv\Scripts\python.exe -m pytest -v -m "not slow"
|
| 91 |
+
.\.venv\Scripts\python.exe -m mypy src
|
| 92 |
+
.\.venv\Scripts\python.exe -m black --check src tests scripts
|
| 93 |
+
.\.venv\Scripts\python.exe -m pylint --fail-under=9.0 src
|
| 94 |
+
git diff --check
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
Alpha.5 strict Pyright production scope:
|
| 98 |
+
|
| 99 |
+
```powershell
|
| 100 |
+
.\.venv\Scripts\python.exe -m pyright `
|
| 101 |
+
src/storage/structural_journal.py `
|
| 102 |
+
src/storage/structural_recovery.py `
|
| 103 |
+
src/storage/core_restore.py `
|
| 104 |
+
src/self_organization/approval.py `
|
| 105 |
+
src/self_organization/undo.py `
|
| 106 |
+
src/self_organization/plasticity.py `
|
| 107 |
+
src/self_organization/coordinator.py `
|
| 108 |
+
src/dashboard/structural_api.py `
|
| 109 |
+
src/dashboard/operator_bridge.py `
|
| 110 |
+
src/dashboard/server.py `
|
| 111 |
+
src/runtime/control.py `
|
| 112 |
+
src/controller/runtime.py `
|
| 113 |
+
src/visualization/structural_heatmap.py
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
Repository-wide strict Pyright currently includes legacy findings outside this
|
| 117 |
+
scope. Do not hide them with global suppressions and do not add new debt.
|
| 118 |
+
|
| 119 |
+
## 7. Dashboard development
|
| 120 |
+
|
| 121 |
+
HTTP handlers must validate request fields explicitly.
|
| 122 |
+
|
| 123 |
+
Do not add endpoints that accept arbitrary command strings or shell fragments.
|
| 124 |
+
|
| 125 |
+
Preferred direction:
|
| 126 |
+
|
| 127 |
+
```text
|
| 128 |
+
DashboardRequestHandler
|
| 129 |
+
-> OperatorBridge
|
| 130 |
+
-> Coordinator / Runtime Controller
|
| 131 |
+
-> Plasticity / Manipulator
|
| 132 |
+
-> Core
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
## 8. Structural journal development
|
| 136 |
+
|
| 137 |
+
Structural records are immutable events.
|
| 138 |
+
|
| 139 |
+
Undo appends a new inverse record. Never delete a previous committed record as
|
| 140 |
+
an undo mechanism.
|
| 141 |
+
|
| 142 |
+
Corrupted committed records must fail loudly. Recoverable uncommitted tails
|
| 143 |
+
must not be treated as committed data.
|
| 144 |
+
|
| 145 |
+
## 9. Adding a feature
|
| 146 |
+
|
| 147 |
+
1. Define an observable problem and exit criterion.
|
| 148 |
+
2. Choose the correct architectural boundary.
|
| 149 |
+
3. Add typed models/contracts.
|
| 150 |
+
4. Add focused tests.
|
| 151 |
+
5. Implement the smallest working slice.
|
| 152 |
+
6. Run focused tests.
|
| 153 |
+
7. Run static gates.
|
| 154 |
+
8. Run the full fast suite.
|
| 155 |
+
9. Update README/UserGuide/DeveloperGuide as required.
|
| 156 |
+
|
| 157 |
+
## 10. Release work
|
| 158 |
+
|
| 159 |
+
Update at minimum:
|
| 160 |
+
|
| 161 |
+
- `pyproject.toml`;
|
| 162 |
+
- `CHANGELOG.md`;
|
| 163 |
+
- README status;
|
| 164 |
+
- roadmap/release notes;
|
| 165 |
+
- release verifier.
|
| 166 |
+
|
| 167 |
+
Do not tag a release while deterministic restore, Black, Mypy or required test
|
| 168 |
+
gates are failing.
|
docs/01-guides/GIT_WORKFLOW.md
ADDED
|
@@ -0,0 +1,1518 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Brain-5D – Git-Arbeitsablauf
|
| 2 |
+
|
| 3 |
+
## Grundprinzip
|
| 4 |
+
|
| 5 |
+
Für das Projekt **Brain-5D** gilt:
|
| 6 |
+
|
| 7 |
+
* Der **lokale Arbeitsstand ist die Single Source of Truth**.
|
| 8 |
+
* Der maßgebliche Branch ist immer **`main`**.
|
| 9 |
+
* Änderungen werden grundsätzlich nach **`origin/main`** gepusht.
|
| 10 |
+
* `develop` wird im normalen Arbeitsablauf nicht benötigt.
|
| 11 |
+
* Ein automatisches `git pull` vor dem Push wird vermieden.
|
| 12 |
+
* Der Remote-Stand dient primär als Sicherung und Veröffentlichung des lokalen Projektstands.
|
| 13 |
+
* Tags werden für definierte, geprüfte Meilensteine und Releases verwendet.
|
| 14 |
+
* `git push --force` wird nicht verwendet.
|
| 15 |
+
* Falls der Remote-Stand bewusst auf den lokalen Stand zurückgesetzt werden muss, wird ausschließlich `--force-with-lease` verwendet.
|
| 16 |
+
|
| 17 |
+
Repository:
|
| 18 |
+
|
| 19 |
+
```text
|
| 20 |
+
https://github.com/Thomas-Heisig/Brain-5D
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# 1. Normaler täglicher Arbeitsablauf
|
| 26 |
+
|
| 27 |
+
Dies ist der Standardweg für normale Änderungen.
|
| 28 |
+
|
| 29 |
+
## Schritt 1 – Auf `main` wechseln
|
| 30 |
+
|
| 31 |
+
```bash
|
| 32 |
+
git checkout main
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
Alternativ bei neueren Git-Versionen:
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
git switch main
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## Schritt 2 – Aktuellen Zustand prüfen
|
| 42 |
+
|
| 43 |
+
```bash
|
| 44 |
+
git status
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
Optional:
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
git branch --show-current
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
Erwartete Ausgabe:
|
| 54 |
+
|
| 55 |
+
```text
|
| 56 |
+
main
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
## Schritt 3 – Änderungen prüfen
|
| 60 |
+
|
| 61 |
+
Kurzübersicht:
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
git status
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Inhaltliche Änderungen:
|
| 68 |
+
|
| 69 |
+
```bash
|
| 70 |
+
git diff
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
Bereits für den Commit vorgemerkte Änderungen:
|
| 74 |
+
|
| 75 |
+
```bash
|
| 76 |
+
git diff --staged
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
## Schritt 4 – Änderungen übernehmen
|
| 80 |
+
|
| 81 |
+
Alle Änderungen:
|
| 82 |
+
|
| 83 |
+
```bash
|
| 84 |
+
git add -A
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
Danach nochmals kontrollieren:
|
| 88 |
+
|
| 89 |
+
```bash
|
| 90 |
+
git status
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
## Schritt 5 – Commit erstellen
|
| 94 |
+
|
| 95 |
+
Beispiel:
|
| 96 |
+
|
| 97 |
+
```bash
|
| 98 |
+
git commit -m "Update Brain-5D"
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
Besser sind möglichst konkrete Commit-Nachrichten.
|
| 102 |
+
|
| 103 |
+
Beispiele:
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
git commit -m "Add deterministic neuron state handling"
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
```bash
|
| 110 |
+
git commit -m "Fix core validation tests"
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
git commit -m "Refactor observable reference core"
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
## Schritt 6 – Nach `main` pushen
|
| 118 |
+
|
| 119 |
+
```bash
|
| 120 |
+
git push origin main
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
Damit ist der normale Arbeitsablauf abgeschlossen.
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
# 2. Kurzform für normalen Push
|
| 128 |
+
|
| 129 |
+
Wenn der aktuelle Stand bereits geprüft wurde:
|
| 130 |
+
|
| 131 |
+
```bash
|
| 132 |
+
git checkout main
|
| 133 |
+
git status
|
| 134 |
+
git add -A
|
| 135 |
+
git commit -m "Update Brain-5D - alpha 5 cognitive bridge "
|
| 136 |
+
git push origin main --force
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
---
|
| 140 |
+
|
| 141 |
+
# 3. Wenn keine Änderungen vorhanden sind
|
| 142 |
+
|
| 143 |
+
Vor einem Commit kann Git melden:
|
| 144 |
+
|
| 145 |
+
```text
|
| 146 |
+
nothing to commit, working tree clean
|
| 147 |
+
```
|
| 148 |
+
|
| 149 |
+
Dann ist kein neuer Commit erforderlich.
|
| 150 |
+
|
| 151 |
+
In diesem Fall kann einfach geprüft werden:
|
| 152 |
+
|
| 153 |
+
```bash
|
| 154 |
+
git status
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
und gegebenenfalls:
|
| 158 |
+
|
| 159 |
+
```bash
|
| 160 |
+
git push origin main
|
| 161 |
+
```
|
| 162 |
+
|
| 163 |
+
Wenn auch dort nichts Neues vorhanden ist, ist der lokale und bereits gepushte Stand identisch.
|
| 164 |
+
|
| 165 |
+
---
|
| 166 |
+
|
| 167 |
+
# 4. Lokaler Stand ist aktueller als GitHub
|
| 168 |
+
|
| 169 |
+
Wenn lokal neue Commits vorhanden sind:
|
| 170 |
+
|
| 171 |
+
```bash
|
| 172 |
+
git status
|
| 173 |
+
```
|
| 174 |
+
|
| 175 |
+
Git kann beispielsweise melden:
|
| 176 |
+
|
| 177 |
+
```text
|
| 178 |
+
Your branch is ahead of 'origin/main' by 3 commits.
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
Dann genügt:
|
| 182 |
+
|
| 183 |
+
```bash
|
| 184 |
+
git push origin main
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
---
|
| 188 |
+
|
| 189 |
+
# 5. GitHub enthält Änderungen, lokal bleibt aber maßgeblich
|
| 190 |
+
|
| 191 |
+
Da im Brain-5D-Projekt der lokale Stand die **Single Source of Truth** ist, wird nicht automatisch ausgeführt:
|
| 192 |
+
|
| 193 |
+
```bash
|
| 194 |
+
git pull
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
Ein `git pull` würde Remote-Änderungen in den lokalen Arbeitsstand integrieren.
|
| 198 |
+
|
| 199 |
+
Das ist für den definierten Brain-5D-Workflow ausdrücklich nicht der Standard.
|
| 200 |
+
|
| 201 |
+
Zunächst wird geprüft:
|
| 202 |
+
|
| 203 |
+
```bash
|
| 204 |
+
git fetch origin
|
| 205 |
+
```
|
| 206 |
+
|
| 207 |
+
Danach:
|
| 208 |
+
|
| 209 |
+
```bash
|
| 210 |
+
git status
|
| 211 |
+
```
|
| 212 |
+
|
| 213 |
+
Optional kann der Unterschied zwischen lokalem und Remote-Stand geprüft werden:
|
| 214 |
+
|
| 215 |
+
```bash
|
| 216 |
+
git log --oneline main..origin/main
|
| 217 |
+
```
|
| 218 |
+
|
| 219 |
+
Remote-Commits, die lokal fehlen.
|
| 220 |
+
|
| 221 |
+
Umgekehrt:
|
| 222 |
+
|
| 223 |
+
```bash
|
| 224 |
+
git log --oneline origin/main..main
|
| 225 |
+
```
|
| 226 |
+
|
| 227 |
+
Lokale Commits, die auf dem Remote fehlen.
|
| 228 |
+
|
| 229 |
+
Zusätzlich:
|
| 230 |
+
|
| 231 |
+
```bash
|
| 232 |
+
git diff main..origin/main
|
| 233 |
+
```
|
| 234 |
+
|
| 235 |
+
oder:
|
| 236 |
+
|
| 237 |
+
```bash
|
| 238 |
+
git diff origin/main..main
|
| 239 |
+
```
|
| 240 |
+
|
| 241 |
+
---
|
| 242 |
+
|
| 243 |
+
# 6. Remote bewusst durch lokalen Stand ersetzen
|
| 244 |
+
|
| 245 |
+
Wenn eindeutig feststeht:
|
| 246 |
+
|
| 247 |
+
> Der lokale Stand ist korrekt und `origin/main` soll exakt diesem Stand entsprechen.
|
| 248 |
+
|
| 249 |
+
Dann:
|
| 250 |
+
|
| 251 |
+
```bash
|
| 252 |
+
git push --force-with-lease origin main
|
| 253 |
+
```
|
| 254 |
+
|
| 255 |
+
Nicht verwenden:
|
| 256 |
+
|
| 257 |
+
```bash
|
| 258 |
+
git push --force origin main
|
| 259 |
+
```
|
| 260 |
+
|
| 261 |
+
`--force-with-lease` bietet einen zusätzlichen Schutz gegen das unbemerkte Überschreiben unerwarteter Remote-Änderungen.
|
| 262 |
+
|
| 263 |
+
---
|
| 264 |
+
|
| 265 |
+
# 7. Empfohlener sicherer Ablauf vor `--force-with-lease`
|
| 266 |
+
|
| 267 |
+
Vor einem erzwungenen Push:
|
| 268 |
+
|
| 269 |
+
```bash
|
| 270 |
+
git checkout main
|
| 271 |
+
git status
|
| 272 |
+
git fetch origin
|
| 273 |
+
git log --oneline --decorate --graph --all -20
|
| 274 |
+
```
|
| 275 |
+
|
| 276 |
+
Optional Unterschiede prüfen:
|
| 277 |
+
|
| 278 |
+
```bash
|
| 279 |
+
git diff origin/main..main
|
| 280 |
+
```
|
| 281 |
+
|
| 282 |
+
Danach erst:
|
| 283 |
+
|
| 284 |
+
```bash
|
| 285 |
+
git push --force-with-lease origin main
|
| 286 |
+
```
|
| 287 |
+
|
| 288 |
+
---
|
| 289 |
+
|
| 290 |
+
# 8. Lokalen Stand sichern, bevor Remote überschrieben wird
|
| 291 |
+
|
| 292 |
+
Vor wichtigen oder riskanten Änderungen kann ein lokaler Sicherungs-Branch erzeugt werden:
|
| 293 |
+
|
| 294 |
+
```bash
|
| 295 |
+
git branch backup-before-sync
|
| 296 |
+
```
|
| 297 |
+
|
| 298 |
+
Oder mit Datum:
|
| 299 |
+
|
| 300 |
+
```bash
|
| 301 |
+
git branch backup-2026-08-16
|
| 302 |
+
```
|
| 303 |
+
|
| 304 |
+
Danach kann der Hauptbranch weiterverwendet werden:
|
| 305 |
+
|
| 306 |
+
```bash
|
| 307 |
+
git checkout main
|
| 308 |
+
```
|
| 309 |
+
|
| 310 |
+
Damit existiert ein zusätzlicher lokaler Wiederherstellungspunkt.
|
| 311 |
+
|
| 312 |
+
---
|
| 313 |
+
|
| 314 |
+
# 9. Sicherung über Tag
|
| 315 |
+
|
| 316 |
+
Noch sinnvoller für definierte Zustände:
|
| 317 |
+
|
| 318 |
+
```bash
|
| 319 |
+
git tag -a backup-2026-08-16 -m "Backup before repository synchronization"
|
| 320 |
+
```
|
| 321 |
+
|
| 322 |
+
Tag prüfen:
|
| 323 |
+
|
| 324 |
+
```bash
|
| 325 |
+
git tag
|
| 326 |
+
```
|
| 327 |
+
|
| 328 |
+
Optional auf GitHub sichern:
|
| 329 |
+
|
| 330 |
+
```bash
|
| 331 |
+
git push origin backup-2026-08-16
|
| 332 |
+
```
|
| 333 |
+
|
| 334 |
+
---
|
| 335 |
+
|
| 336 |
+
# 10. Sprint erfolgreich abgeschlossen
|
| 337 |
+
|
| 338 |
+
Bei einem geprüften Sprint kann zunächst normal committed werden.
|
| 339 |
+
|
| 340 |
+
Beispiel:
|
| 341 |
+
|
| 342 |
+
```bash
|
| 343 |
+
git checkout main
|
| 344 |
+
git status
|
| 345 |
+
git add -A
|
| 346 |
+
git commit -m "Sprint 1C VERIFIED - observable deterministic reference core"
|
| 347 |
+
git push origin main
|
| 348 |
+
```
|
| 349 |
+
|
| 350 |
+
Danach wird der Zustand getaggt.
|
| 351 |
+
|
| 352 |
+
```bash
|
| 353 |
+
git tag -a brain5d-core-v0.1.0 -m "Sprint 1C VERIFIED - observable deterministic reference core"
|
| 354 |
+
```
|
| 355 |
+
|
| 356 |
+
Anschließend:
|
| 357 |
+
|
| 358 |
+
```bash
|
| 359 |
+
git push origin brain5d-core-v0.1.0
|
| 360 |
+
```
|
| 361 |
+
|
| 362 |
+
---
|
| 363 |
+
|
| 364 |
+
# 11. Vollständiger Sprint-Release-Ablauf
|
| 365 |
+
|
| 366 |
+
```bash
|
| 367 |
+
git checkout main
|
| 368 |
+
|
| 369 |
+
git status
|
| 370 |
+
|
| 371 |
+
git add -A
|
| 372 |
+
|
| 373 |
+
git commit -m "Sprint 1C VERIFIED - observable deterministic reference core"
|
| 374 |
+
|
| 375 |
+
git push origin main
|
| 376 |
+
|
| 377 |
+
git tag -a brain5d-core-v0.1.0 -m "Sprint 1C VERIFIED - observable deterministic reference core"
|
| 378 |
+
|
| 379 |
+
git push origin brain5d-core-v0.1.0
|
| 380 |
+
```
|
| 381 |
+
|
| 382 |
+
---
|
| 383 |
+
|
| 384 |
+
# 12. Alle lokalen Tags pushen
|
| 385 |
+
|
| 386 |
+
Falls mehrere neue Tags vorhanden sind:
|
| 387 |
+
|
| 388 |
+
```bash
|
| 389 |
+
git push origin --tags
|
| 390 |
+
```
|
| 391 |
+
|
| 392 |
+
Dies sollte bewusst eingesetzt werden, da damit sämtliche noch nicht übertragenen lokalen Tags veröffentlicht werden.
|
| 393 |
+
|
| 394 |
+
Für einen einzelnen Release ist daher normalerweise besser:
|
| 395 |
+
|
| 396 |
+
```bash
|
| 397 |
+
git push origin brain5d-core-v0.1.0
|
| 398 |
+
```
|
| 399 |
+
|
| 400 |
+
---
|
| 401 |
+
|
| 402 |
+
# 13. Tags anzeigen
|
| 403 |
+
|
| 404 |
+
```bash
|
| 405 |
+
git tag
|
| 406 |
+
```
|
| 407 |
+
|
| 408 |
+
Mit Details:
|
| 409 |
+
|
| 410 |
+
```bash
|
| 411 |
+
git show brain5d-core-v0.1.0
|
| 412 |
+
```
|
| 413 |
+
|
| 414 |
+
Sortiert nach Version:
|
| 415 |
+
|
| 416 |
+
```bash
|
| 417 |
+
git tag --sort=-version:refname
|
| 418 |
+
```
|
| 419 |
+
|
| 420 |
+
---
|
| 421 |
+
|
| 422 |
+
# 14. Falsch gesetzten lokalen Tag löschen
|
| 423 |
+
|
| 424 |
+
```bash
|
| 425 |
+
git tag -d brain5d-core-v0.1.0
|
| 426 |
+
```
|
| 427 |
+
|
| 428 |
+
Danach kann er neu erstellt werden.
|
| 429 |
+
|
| 430 |
+
```bash
|
| 431 |
+
git tag -a brain5d-core-v0.1.0 -m "Correct release description"
|
| 432 |
+
```
|
| 433 |
+
|
| 434 |
+
---
|
| 435 |
+
|
| 436 |
+
# 15. Bereits gepushten Tag entfernen
|
| 437 |
+
|
| 438 |
+
Lokal:
|
| 439 |
+
|
| 440 |
+
```bash
|
| 441 |
+
git tag -d brain5d-core-v0.1.0
|
| 442 |
+
```
|
| 443 |
+
|
| 444 |
+
Remote:
|
| 445 |
+
|
| 446 |
+
```bash
|
| 447 |
+
git push origin --delete brain5d-core-v0.1.0
|
| 448 |
+
```
|
| 449 |
+
|
| 450 |
+
Danach gegebenenfalls neu erstellen:
|
| 451 |
+
|
| 452 |
+
```bash
|
| 453 |
+
git tag -a brain5d-core-v0.1.0 -m "Correct release"
|
| 454 |
+
git push origin brain5d-core-v0.1.0
|
| 455 |
+
```
|
| 456 |
+
|
| 457 |
+
Bei bereits veröffentlichten Releases sollten Tags jedoch möglichst nicht nachträglich verändert werden.
|
| 458 |
+
|
| 459 |
+
---
|
| 460 |
+
|
| 461 |
+
# 16. Versionierung der Brain-5D-Tags
|
| 462 |
+
|
| 463 |
+
Empfohlenes Schema:
|
| 464 |
+
|
| 465 |
+
```text
|
| 466 |
+
brain5d-core-vMAJOR.MINOR.PATCH
|
| 467 |
+
```
|
| 468 |
+
|
| 469 |
+
Beispiele:
|
| 470 |
+
|
| 471 |
+
```text
|
| 472 |
+
brain5d-core-v0.1.0
|
| 473 |
+
brain5d-core-v0.1.1
|
| 474 |
+
brain5d-core-v0.2.0
|
| 475 |
+
brain5d-core-v1.0.0
|
| 476 |
+
```
|
| 477 |
+
|
| 478 |
+
Bedeutung:
|
| 479 |
+
|
| 480 |
+
```text
|
| 481 |
+
MAJOR
|
| 482 |
+
```
|
| 483 |
+
|
| 484 |
+
Größere Architekturänderung oder inkompatible Änderung.
|
| 485 |
+
|
| 486 |
+
```text
|
| 487 |
+
MINOR
|
| 488 |
+
```
|
| 489 |
+
|
| 490 |
+
Neue Funktion oder neuer Entwicklungsabschnitt.
|
| 491 |
+
|
| 492 |
+
```text
|
| 493 |
+
PATCH
|
| 494 |
+
```
|
| 495 |
+
|
| 496 |
+
Fehlerkorrektur oder kleine Verbesserung ohne grundlegende Architekturänderung.
|
| 497 |
+
|
| 498 |
+
---
|
| 499 |
+
|
| 500 |
+
# 17. Beispiel für einen Patch-Release
|
| 501 |
+
|
| 502 |
+
```bash
|
| 503 |
+
git checkout main
|
| 504 |
+
git status
|
| 505 |
+
git add -A
|
| 506 |
+
git commit -m "Fix deterministic core validation"
|
| 507 |
+
git push origin main
|
| 508 |
+
|
| 509 |
+
git tag -a brain5d-core-v0.1.1 -m "Fix deterministic core validation"
|
| 510 |
+
git push origin brain5d-core-v0.1.1
|
| 511 |
+
```
|
| 512 |
+
|
| 513 |
+
---
|
| 514 |
+
|
| 515 |
+
# 18. Beispiel für nächste Entwicklungsstufe
|
| 516 |
+
|
| 517 |
+
```bash
|
| 518 |
+
git checkout main
|
| 519 |
+
git status
|
| 520 |
+
git add -A
|
| 521 |
+
git commit -m "Complete Sprint 2 reference implementation"
|
| 522 |
+
git push origin main
|
| 523 |
+
|
| 524 |
+
git tag -a brain5d-core-v0.2.0 -m "Sprint 2 VERIFIED"
|
| 525 |
+
git push origin brain5d-core-v0.2.0
|
| 526 |
+
```
|
| 527 |
+
|
| 528 |
+
---
|
| 529 |
+
|
| 530 |
+
# 19. Commit-Historie kontrollieren
|
| 531 |
+
|
| 532 |
+
Kurze Darstellung:
|
| 533 |
+
|
| 534 |
+
```bash
|
| 535 |
+
git log --oneline
|
| 536 |
+
```
|
| 537 |
+
|
| 538 |
+
Mit Branches und Tags:
|
| 539 |
+
|
| 540 |
+
```bash
|
| 541 |
+
git log --oneline --decorate --graph --all
|
| 542 |
+
```
|
| 543 |
+
|
| 544 |
+
Letzte 20 Einträge:
|
| 545 |
+
|
| 546 |
+
```bash
|
| 547 |
+
git log --oneline --decorate --graph --all -20
|
| 548 |
+
```
|
| 549 |
+
|
| 550 |
+
---
|
| 551 |
+
|
| 552 |
+
# 20. Letzten Commit anzeigen
|
| 553 |
+
|
| 554 |
+
```bash
|
| 555 |
+
git show HEAD
|
| 556 |
+
```
|
| 557 |
+
|
| 558 |
+
Nur Informationen:
|
| 559 |
+
|
| 560 |
+
```bash
|
| 561 |
+
git log -1
|
| 562 |
+
```
|
| 563 |
+
|
| 564 |
+
Kurz:
|
| 565 |
+
|
| 566 |
+
```bash
|
| 567 |
+
git log -1 --oneline
|
| 568 |
+
```
|
| 569 |
+
|
| 570 |
+
---
|
| 571 |
+
|
| 572 |
+
# 21. Prüfen, welcher Commit aktuell aktiv ist
|
| 573 |
+
|
| 574 |
+
```bash
|
| 575 |
+
git rev-parse HEAD
|
| 576 |
+
```
|
| 577 |
+
|
| 578 |
+
Kurzform:
|
| 579 |
+
|
| 580 |
+
```bash
|
| 581 |
+
git rev-parse --short HEAD
|
| 582 |
+
```
|
| 583 |
+
|
| 584 |
+
Beispiel:
|
| 585 |
+
|
| 586 |
+
```text
|
| 587 |
+
a1b2c3d
|
| 588 |
+
```
|
| 589 |
+
|
| 590 |
+
---
|
| 591 |
+
|
| 592 |
+
# 22. Prüfen, ob lokaler `main` und `origin/main` identisch sind
|
| 593 |
+
|
| 594 |
+
Zunächst:
|
| 595 |
+
|
| 596 |
+
```bash
|
| 597 |
+
git fetch origin
|
| 598 |
+
```
|
| 599 |
+
|
| 600 |
+
Dann:
|
| 601 |
+
|
| 602 |
+
```bash
|
| 603 |
+
git rev-parse main
|
| 604 |
+
git rev-parse origin/main
|
| 605 |
+
```
|
| 606 |
+
|
| 607 |
+
Wenn beide Hashes identisch sind, zeigen lokal und GitHub auf denselben Commit.
|
| 608 |
+
|
| 609 |
+
Alternativ:
|
| 610 |
+
|
| 611 |
+
```bash
|
| 612 |
+
git status
|
| 613 |
+
```
|
| 614 |
+
|
| 615 |
+
Typische Meldung:
|
| 616 |
+
|
| 617 |
+
```text
|
| 618 |
+
Your branch is up to date with 'origin/main'.
|
| 619 |
+
```
|
| 620 |
+
|
| 621 |
+
---
|
| 622 |
+
|
| 623 |
+
# 23. Änderungen ansehen, bevor sie committed werden
|
| 624 |
+
|
| 625 |
+
Alle noch nicht vorgemerkten Änderungen:
|
| 626 |
+
|
| 627 |
+
```bash
|
| 628 |
+
git diff
|
| 629 |
+
```
|
| 630 |
+
|
| 631 |
+
Bereits mit `git add` vorgemerkte Änderungen:
|
| 632 |
+
|
| 633 |
+
```bash
|
| 634 |
+
git diff --staged
|
| 635 |
+
```
|
| 636 |
+
|
| 637 |
+
Dateiliste:
|
| 638 |
+
|
| 639 |
+
```bash
|
| 640 |
+
git status --short
|
| 641 |
+
```
|
| 642 |
+
|
| 643 |
+
---
|
| 644 |
+
|
| 645 |
+
# 24. Einzelne Datei committen
|
| 646 |
+
|
| 647 |
+
Datei hinzufügen:
|
| 648 |
+
|
| 649 |
+
```bash
|
| 650 |
+
git add path/to/file.py
|
| 651 |
+
```
|
| 652 |
+
|
| 653 |
+
Commit:
|
| 654 |
+
|
| 655 |
+
```bash
|
| 656 |
+
git commit -m "Update neuron processing"
|
| 657 |
+
```
|
| 658 |
+
|
| 659 |
+
Push:
|
| 660 |
+
|
| 661 |
+
```bash
|
| 662 |
+
git push origin main
|
| 663 |
+
```
|
| 664 |
+
|
| 665 |
+
---
|
| 666 |
+
|
| 667 |
+
# 25. Nur bestimmte Dateien committen
|
| 668 |
+
|
| 669 |
+
```bash
|
| 670 |
+
git add Core/file1.py Core/file2.py tests/test_core.py
|
| 671 |
+
git status
|
| 672 |
+
git commit -m "Update deterministic core"
|
| 673 |
+
git push origin main
|
| 674 |
+
```
|
| 675 |
+
|
| 676 |
+
---
|
| 677 |
+
|
| 678 |
+
# 26. Datei versehentlich mit `git add` hinzugefügt
|
| 679 |
+
|
| 680 |
+
Datei wieder aus dem Staging entfernen:
|
| 681 |
+
|
| 682 |
+
```bash
|
| 683 |
+
git restore --staged path/to/file.py
|
| 684 |
+
```
|
| 685 |
+
|
| 686 |
+
Die lokale Datei selbst bleibt dabei unverändert.
|
| 687 |
+
|
| 688 |
+
---
|
| 689 |
+
|
| 690 |
+
# 27. Lokale Änderung an einer Datei verwerfen
|
| 691 |
+
|
| 692 |
+
Achtung: Die nicht gespeicherte Git-Änderung wird verworfen.
|
| 693 |
+
|
| 694 |
+
```bash
|
| 695 |
+
git restore path/to/file.py
|
| 696 |
+
```
|
| 697 |
+
|
| 698 |
+
Vorher immer prüfen:
|
| 699 |
+
|
| 700 |
+
```bash
|
| 701 |
+
git diff path/to/file.py
|
| 702 |
+
```
|
| 703 |
+
|
| 704 |
+
---
|
| 705 |
+
|
| 706 |
+
# 28. Letzten Commit korrigieren
|
| 707 |
+
|
| 708 |
+
Wenn der Commit noch nicht gepusht wurde:
|
| 709 |
+
|
| 710 |
+
```bash
|
| 711 |
+
git add -A
|
| 712 |
+
git commit --amend
|
| 713 |
+
```
|
| 714 |
+
|
| 715 |
+
Nur Commit-Nachricht ändern:
|
| 716 |
+
|
| 717 |
+
```bash
|
| 718 |
+
git commit --amend -m "Correct commit message"
|
| 719 |
+
```
|
| 720 |
+
|
| 721 |
+
Wurde der Commit bereits gepusht, ist anschließend normalerweise notwendig:
|
| 722 |
+
|
| 723 |
+
```bash
|
| 724 |
+
git push --force-with-lease origin main
|
| 725 |
+
```
|
| 726 |
+
|
| 727 |
+
Dies sollte bewusst erfolgen.
|
| 728 |
+
|
| 729 |
+
---
|
| 730 |
+
|
| 731 |
+
# 29. Letzten lokalen Commit zurücknehmen, Änderungen behalten
|
| 732 |
+
|
| 733 |
+
```bash
|
| 734 |
+
git reset --soft HEAD~1
|
| 735 |
+
```
|
| 736 |
+
|
| 737 |
+
Der Commit verschwindet, die Änderungen bleiben vorgemerkt.
|
| 738 |
+
|
| 739 |
+
---
|
| 740 |
+
|
| 741 |
+
# 30. Letzten lokalen Commit zurücknehmen und Änderungen unstagen
|
| 742 |
+
|
| 743 |
+
```bash
|
| 744 |
+
git reset HEAD~1
|
| 745 |
+
```
|
| 746 |
+
|
| 747 |
+
Die Dateien bleiben geändert, sind jedoch nicht mehr staged.
|
| 748 |
+
|
| 749 |
+
---
|
| 750 |
+
|
| 751 |
+
# 31. Commit rückgängig machen, ohne Historie umzuschreiben
|
| 752 |
+
|
| 753 |
+
Für bereits veröffentlichte Commits ist `revert` oft die bessere Methode.
|
| 754 |
+
|
| 755 |
+
```bash
|
| 756 |
+
git revert <commit-hash>
|
| 757 |
+
```
|
| 758 |
+
|
| 759 |
+
Danach:
|
| 760 |
+
|
| 761 |
+
```bash
|
| 762 |
+
git push origin main
|
| 763 |
+
```
|
| 764 |
+
|
| 765 |
+
Beispiel:
|
| 766 |
+
|
| 767 |
+
```bash
|
| 768 |
+
git revert a1b2c3d
|
| 769 |
+
git push origin main
|
| 770 |
+
```
|
| 771 |
+
|
| 772 |
+
Dabei wird ein neuer Commit erzeugt, der die Änderungen des alten Commits rückgängig macht.
|
| 773 |
+
|
| 774 |
+
---
|
| 775 |
+
|
| 776 |
+
# 32. Auf einen bekannten Tag zurückgehen
|
| 777 |
+
|
| 778 |
+
Zunächst anzeigen:
|
| 779 |
+
|
| 780 |
+
```bash
|
| 781 |
+
git tag
|
| 782 |
+
```
|
| 783 |
+
|
| 784 |
+
Tag prüfen:
|
| 785 |
+
|
| 786 |
+
```bash
|
| 787 |
+
git show brain5d-core-v0.1.0
|
| 788 |
+
```
|
| 789 |
+
|
| 790 |
+
Temporär ansehen:
|
| 791 |
+
|
| 792 |
+
```bash
|
| 793 |
+
git checkout brain5d-core-v0.1.0
|
| 794 |
+
```
|
| 795 |
+
|
| 796 |
+
Dabei befindet sich Git im sogenannten `detached HEAD`.
|
| 797 |
+
|
| 798 |
+
Zurück:
|
| 799 |
+
|
| 800 |
+
```bash
|
| 801 |
+
git checkout main
|
| 802 |
+
```
|
| 803 |
+
|
| 804 |
+
---
|
| 805 |
+
|
| 806 |
+
# 33. `main` vollständig auf einen geprüften Tag zurücksetzen
|
| 807 |
+
|
| 808 |
+
Wenn der lokale `main` bewusst wieder exakt auf einen bekannten Release-Stand gesetzt werden soll:
|
| 809 |
+
|
| 810 |
+
```bash
|
| 811 |
+
git checkout main
|
| 812 |
+
git reset --hard brain5d-core-v0.1.0
|
| 813 |
+
```
|
| 814 |
+
|
| 815 |
+
Danach prüfen:
|
| 816 |
+
|
| 817 |
+
```bash
|
| 818 |
+
git status
|
| 819 |
+
git log -5 --oneline
|
| 820 |
+
```
|
| 821 |
+
|
| 822 |
+
Soll anschließend auch GitHub diesen Zustand erhalten:
|
| 823 |
+
|
| 824 |
+
```bash
|
| 825 |
+
git push --force-with-lease origin main
|
| 826 |
+
```
|
| 827 |
+
|
| 828 |
+
Achtung:
|
| 829 |
+
|
| 830 |
+
`git reset --hard` verwirft lokale, nicht gespeicherte Änderungen.
|
| 831 |
+
|
| 832 |
+
---
|
| 833 |
+
|
| 834 |
+
# 34. Wiederherstellungs-Branch aus einem Tag erzeugen
|
| 835 |
+
|
| 836 |
+
Sicherer als direktes Zurücksetzen:
|
| 837 |
+
|
| 838 |
+
```bash
|
| 839 |
+
git checkout -b restore-v0.1.0 brain5d-core-v0.1.0
|
| 840 |
+
```
|
| 841 |
+
|
| 842 |
+
Damit kann der alte Zustand separat untersucht werden.
|
| 843 |
+
|
| 844 |
+
---
|
| 845 |
+
|
| 846 |
+
# 35. Remote-Informationen aktualisieren, ohne den lokalen Code zu verändern
|
| 847 |
+
|
| 848 |
+
Das ist für Brain-5D der bevorzugte Weg:
|
| 849 |
+
|
| 850 |
+
```bash
|
| 851 |
+
git fetch origin
|
| 852 |
+
```
|
| 853 |
+
|
| 854 |
+
`fetch` lädt Informationen über Remote-Branches und Commits herunter, verändert aber den lokalen Arbeitsstand nicht.
|
| 855 |
+
|
| 856 |
+
Deshalb:
|
| 857 |
+
|
| 858 |
+
```bash
|
| 859 |
+
git fetch origin
|
| 860 |
+
```
|
| 861 |
+
|
| 862 |
+
ist im Brain-5D-Modell normalerweise sinnvoller als:
|
| 863 |
+
|
| 864 |
+
```bash
|
| 865 |
+
git pull
|
| 866 |
+
```
|
| 867 |
+
|
| 868 |
+
---
|
| 869 |
+
|
| 870 |
+
# 36. Warum `git pull` nicht zum Standardworkflow gehört
|
| 871 |
+
|
| 872 |
+
`git pull` entspricht vereinfacht:
|
| 873 |
+
|
| 874 |
+
```bash
|
| 875 |
+
git fetch
|
| 876 |
+
```
|
| 877 |
+
|
| 878 |
+
plus anschließendem Merge oder Rebase.
|
| 879 |
+
|
| 880 |
+
Damit können Änderungen von GitHub in den lokalen Branch gelangen.
|
| 881 |
+
|
| 882 |
+
Da für Brain-5D gilt:
|
| 883 |
+
|
| 884 |
+
```text
|
| 885 |
+
LOCAL = Single Source of Truth
|
| 886 |
+
```
|
| 887 |
+
|
| 888 |
+
wird Remote nicht automatisch in Lokal integriert.
|
| 889 |
+
|
| 890 |
+
Stattdessen:
|
| 891 |
+
|
| 892 |
+
```bash
|
| 893 |
+
git fetch origin
|
| 894 |
+
git status
|
| 895 |
+
```
|
| 896 |
+
|
| 897 |
+
und anschließend eine bewusste Entscheidung.
|
| 898 |
+
|
| 899 |
+
---
|
| 900 |
+
|
| 901 |
+
# 37. Wenn Remote-Änderungen doch übernommen werden sollen
|
| 902 |
+
|
| 903 |
+
Nur wenn ausdrücklich entschieden wurde, dass Remote-Änderungen sinnvoll sind.
|
| 904 |
+
|
| 905 |
+
Zunächst:
|
| 906 |
+
|
| 907 |
+
```bash
|
| 908 |
+
git fetch origin
|
| 909 |
+
```
|
| 910 |
+
|
| 911 |
+
Unterschiede ansehen:
|
| 912 |
+
|
| 913 |
+
```bash
|
| 914 |
+
git log --oneline main..origin/main
|
| 915 |
+
```
|
| 916 |
+
|
| 917 |
+
und:
|
| 918 |
+
|
| 919 |
+
```bash
|
| 920 |
+
git diff main..origin/main
|
| 921 |
+
```
|
| 922 |
+
|
| 923 |
+
Danach können einzelne Commits gezielt übernommen werden.
|
| 924 |
+
|
| 925 |
+
Beispiel:
|
| 926 |
+
|
| 927 |
+
```bash
|
| 928 |
+
git cherry-pick <commit-hash>
|
| 929 |
+
```
|
| 930 |
+
|
| 931 |
+
Dies ist häufig sauberer als ein pauschales `git pull`.
|
| 932 |
+
|
| 933 |
+
---
|
| 934 |
+
|
| 935 |
+
# 38. Einzelnen Remote-Commit übernehmen
|
| 936 |
+
|
| 937 |
+
```bash
|
| 938 |
+
git fetch origin
|
| 939 |
+
git log --oneline main..origin/main
|
| 940 |
+
```
|
| 941 |
+
|
| 942 |
+
Gewünschten Commit auswählen:
|
| 943 |
+
|
| 944 |
+
```bash
|
| 945 |
+
git cherry-pick <commit-hash>
|
| 946 |
+
```
|
| 947 |
+
|
| 948 |
+
Dann:
|
| 949 |
+
|
| 950 |
+
```bash
|
| 951 |
+
git push origin main
|
| 952 |
+
```
|
| 953 |
+
|
| 954 |
+
Damit bleibt die Entscheidung über die Integration beim lokalen Repository.
|
| 955 |
+
|
| 956 |
+
---
|
| 957 |
+
|
| 958 |
+
# 39. `develop`-Branch
|
| 959 |
+
|
| 960 |
+
Für den festgelegten Brain-5D-Workflow wird `develop` grundsätzlich nicht benötigt.
|
| 961 |
+
|
| 962 |
+
Der normale Ablauf lautet:
|
| 963 |
+
|
| 964 |
+
```text
|
| 965 |
+
lokale Arbeit
|
| 966 |
+
↓
|
| 967 |
+
main
|
| 968 |
+
↓
|
| 969 |
+
origin/main
|
| 970 |
+
```
|
| 971 |
+
|
| 972 |
+
Nicht mehr als Standard:
|
| 973 |
+
|
| 974 |
+
```text
|
| 975 |
+
develop
|
| 976 |
+
↓
|
| 977 |
+
merge
|
| 978 |
+
↓
|
| 979 |
+
main
|
| 980 |
+
```
|
| 981 |
+
|
| 982 |
+
Deshalb entfallen normalerweise:
|
| 983 |
+
|
| 984 |
+
```bash
|
| 985 |
+
git checkout develop
|
| 986 |
+
```
|
| 987 |
+
|
| 988 |
+
```bash
|
| 989 |
+
git merge develop
|
| 990 |
+
```
|
| 991 |
+
|
| 992 |
+
und:
|
| 993 |
+
|
| 994 |
+
```bash
|
| 995 |
+
git merge --no-ff develop
|
| 996 |
+
```
|
| 997 |
+
|
| 998 |
+
---
|
| 999 |
+
|
| 1000 |
+
# 40. Falls `develop` noch existiert
|
| 1001 |
+
|
| 1002 |
+
Branches anzeigen:
|
| 1003 |
+
|
| 1004 |
+
```bash
|
| 1005 |
+
git branch
|
| 1006 |
+
```
|
| 1007 |
+
|
| 1008 |
+
Remote-Branches:
|
| 1009 |
+
|
| 1010 |
+
```bash
|
| 1011 |
+
git branch -r
|
| 1012 |
+
```
|
| 1013 |
+
|
| 1014 |
+
Alle:
|
| 1015 |
+
|
| 1016 |
+
```bash
|
| 1017 |
+
git branch -a
|
| 1018 |
+
```
|
| 1019 |
+
|
| 1020 |
+
Wenn `develop` nicht mehr benötigt wird, kann er zunächst einfach bestehen bleiben.
|
| 1021 |
+
|
| 1022 |
+
Eine Löschung ist nicht zwingend erforderlich.
|
| 1023 |
+
|
| 1024 |
+
---
|
| 1025 |
+
|
| 1026 |
+
# 41. Lokalen `develop` löschen
|
| 1027 |
+
|
| 1028 |
+
Nur wenn sicher ist, dass er nicht mehr benötigt wird:
|
| 1029 |
+
|
| 1030 |
+
```bash
|
| 1031 |
+
git branch -d develop
|
| 1032 |
+
```
|
| 1033 |
+
|
| 1034 |
+
Falls Git wegen nicht gemergter Änderungen warnt und die Löschung dennoch bewusst erfolgen soll:
|
| 1035 |
+
|
| 1036 |
+
```bash
|
| 1037 |
+
git branch -D develop
|
| 1038 |
+
```
|
| 1039 |
+
|
| 1040 |
+
---
|
| 1041 |
+
|
| 1042 |
+
# 42. Remote-`develop` löschen
|
| 1043 |
+
|
| 1044 |
+
Nur wenn bewusst gewünscht:
|
| 1045 |
+
|
| 1046 |
+
```bash
|
| 1047 |
+
git push origin --delete develop
|
| 1048 |
+
```
|
| 1049 |
+
|
| 1050 |
+
Danach:
|
| 1051 |
+
|
| 1052 |
+
```bash
|
| 1053 |
+
git fetch --prune
|
| 1054 |
+
```
|
| 1055 |
+
|
| 1056 |
+
---
|
| 1057 |
+
|
| 1058 |
+
# 43. Remote-Branches aufräumen
|
| 1059 |
+
|
| 1060 |
+
```bash
|
| 1061 |
+
git fetch --prune
|
| 1062 |
+
```
|
| 1063 |
+
|
| 1064 |
+
Damit werden lokal gespeicherte Verweise auf Remote-Branches entfernt, die auf GitHub nicht mehr existieren.
|
| 1065 |
+
|
| 1066 |
+
---
|
| 1067 |
+
|
| 1068 |
+
# 44. Prüfen, welches Remote verwendet wird
|
| 1069 |
+
|
| 1070 |
+
```bash
|
| 1071 |
+
git remote -v
|
| 1072 |
+
```
|
| 1073 |
+
|
| 1074 |
+
Erwartet:
|
| 1075 |
+
|
| 1076 |
+
```text
|
| 1077 |
+
origin
|
| 1078 |
+
```
|
| 1079 |
+
|
| 1080 |
+
mit dem Brain-5D-GitHub-Repository.
|
| 1081 |
+
|
| 1082 |
+
---
|
| 1083 |
+
|
| 1084 |
+
# 45. Remote-URL prüfen
|
| 1085 |
+
|
| 1086 |
+
```bash
|
| 1087 |
+
git remote get-url origin
|
| 1088 |
+
```
|
| 1089 |
+
|
| 1090 |
+
Erwartet:
|
| 1091 |
+
|
| 1092 |
+
```text
|
| 1093 |
+
https://github.com/Thomas-Heisig/Brain-5D
|
| 1094 |
+
```
|
| 1095 |
+
|
| 1096 |
+
oder entsprechend die konfigurierte SSH-Adresse.
|
| 1097 |
+
|
| 1098 |
+
---
|
| 1099 |
+
|
| 1100 |
+
# 46. Remote korrigieren
|
| 1101 |
+
|
| 1102 |
+
Falls nötig:
|
| 1103 |
+
|
| 1104 |
+
```bash
|
| 1105 |
+
git remote set-url origin https://github.com/Thomas-Heisig/Brain-5D.git
|
| 1106 |
+
```
|
| 1107 |
+
|
| 1108 |
+
Danach:
|
| 1109 |
+
|
| 1110 |
+
```bash
|
| 1111 |
+
git remote -v
|
| 1112 |
+
```
|
| 1113 |
+
|
| 1114 |
+
---
|
| 1115 |
+
|
| 1116 |
+
# 47. Erster Push eines neu eingerichteten lokalen `main`
|
| 1117 |
+
|
| 1118 |
+
Falls noch kein Upstream gesetzt wurde:
|
| 1119 |
+
|
| 1120 |
+
```bash
|
| 1121 |
+
git push -u origin main
|
| 1122 |
+
```
|
| 1123 |
+
|
| 1124 |
+
Danach reicht künftig:
|
| 1125 |
+
|
| 1126 |
+
```bash
|
| 1127 |
+
git push
|
| 1128 |
+
```
|
| 1129 |
+
|
| 1130 |
+
Für maximale Klarheit wird im Brain-5D-Projekt dennoch empfohlen:
|
| 1131 |
+
|
| 1132 |
+
```bash
|
| 1133 |
+
git push origin main
|
| 1134 |
+
```
|
| 1135 |
+
|
| 1136 |
+
---
|
| 1137 |
+
|
| 1138 |
+
# 48. Standard-Push-Befehl
|
| 1139 |
+
|
| 1140 |
+
Der eindeutige Standardbefehl lautet:
|
| 1141 |
+
|
| 1142 |
+
```bash
|
| 1143 |
+
git push origin main
|
| 1144 |
+
```
|
| 1145 |
+
|
| 1146 |
+
---
|
| 1147 |
+
|
| 1148 |
+
# 49. Standard-Push bei autoritativem lokalen Stand
|
| 1149 |
+
|
| 1150 |
+
Falls `origin/main` abweicht und bewusst ersetzt werden soll:
|
| 1151 |
+
|
| 1152 |
+
```bash
|
| 1153 |
+
git push --force-with-lease origin main
|
| 1154 |
+
```
|
| 1155 |
+
|
| 1156 |
+
Dies ist kein normaler täglicher Push, sondern ein bewusster Synchronisationsvorgang.
|
| 1157 |
+
|
| 1158 |
+
---
|
| 1159 |
+
|
| 1160 |
+
# 50. Empfohlener Brain-5D-Standardworkflow
|
| 1161 |
+
|
| 1162 |
+
## Normal
|
| 1163 |
+
|
| 1164 |
+
```bash
|
| 1165 |
+
git checkout main
|
| 1166 |
+
git status
|
| 1167 |
+
git add -A
|
| 1168 |
+
git commit -m "Beschreibung der Änderung"
|
| 1169 |
+
git push origin main
|
| 1170 |
+
```
|
| 1171 |
+
|
| 1172 |
+
## Mit vorheriger Remote-Kontrolle
|
| 1173 |
+
|
| 1174 |
+
```bash
|
| 1175 |
+
git checkout main
|
| 1176 |
+
git status
|
| 1177 |
+
git fetch origin
|
| 1178 |
+
git log --oneline --decorate --graph --all -20
|
| 1179 |
+
git add -A
|
| 1180 |
+
git commit -m "Beschreibung der Änderung"
|
| 1181 |
+
git push origin main
|
| 1182 |
+
```
|
| 1183 |
+
|
| 1184 |
+
## Wenn Remote bewusst überschrieben werden soll
|
| 1185 |
+
|
| 1186 |
+
```bash
|
| 1187 |
+
git checkout main
|
| 1188 |
+
git status
|
| 1189 |
+
git fetch origin
|
| 1190 |
+
git diff origin/main..main
|
| 1191 |
+
git push --force-with-lease origin main
|
| 1192 |
+
```
|
| 1193 |
+
|
| 1194 |
+
---
|
| 1195 |
+
|
| 1196 |
+
# 51. Empfohlener Release-Workflow
|
| 1197 |
+
|
| 1198 |
+
```bash
|
| 1199 |
+
git checkout main
|
| 1200 |
+
|
| 1201 |
+
git status
|
| 1202 |
+
|
| 1203 |
+
git add -A
|
| 1204 |
+
|
| 1205 |
+
git commit -m "Release description"
|
| 1206 |
+
|
| 1207 |
+
git push origin main
|
| 1208 |
+
|
| 1209 |
+
git tag -a brain5d-core-v0.1.0 -m "Release description"
|
| 1210 |
+
|
| 1211 |
+
git push origin brain5d-core-v0.1.0
|
| 1212 |
+
```
|
| 1213 |
+
|
| 1214 |
+
---
|
| 1215 |
+
|
| 1216 |
+
# 52. Empfohlener Sprint-Abschluss
|
| 1217 |
+
|
| 1218 |
+
Beispiel Sprint 1C:
|
| 1219 |
+
|
| 1220 |
+
```bash
|
| 1221 |
+
git checkout main
|
| 1222 |
+
|
| 1223 |
+
git status
|
| 1224 |
+
|
| 1225 |
+
git add -A
|
| 1226 |
+
|
| 1227 |
+
git commit -m "Sprint 1C VERIFIED - observable deterministic reference core"
|
| 1228 |
+
|
| 1229 |
+
git push origin main
|
| 1230 |
+
|
| 1231 |
+
git tag -a brain5d-core-v0.1.0 -m "Sprint 1C VERIFIED - observable deterministic reference core"
|
| 1232 |
+
|
| 1233 |
+
git push origin brain5d-core-v0.1.0
|
| 1234 |
+
```
|
| 1235 |
+
|
| 1236 |
+
---
|
| 1237 |
+
|
| 1238 |
+
# 53. Prüfablauf vor wichtigem Release
|
| 1239 |
+
|
| 1240 |
+
```bash
|
| 1241 |
+
git checkout main
|
| 1242 |
+
|
| 1243 |
+
git status
|
| 1244 |
+
|
| 1245 |
+
git diff
|
| 1246 |
+
|
| 1247 |
+
git diff --staged
|
| 1248 |
+
|
| 1249 |
+
git log --oneline --decorate --graph -20
|
| 1250 |
+
|
| 1251 |
+
git fetch origin
|
| 1252 |
+
|
| 1253 |
+
git log --oneline main..origin/main
|
| 1254 |
+
|
| 1255 |
+
git log --oneline origin/main..main
|
| 1256 |
+
```
|
| 1257 |
+
|
| 1258 |
+
Danach erst Commit, Push und Tag.
|
| 1259 |
+
|
| 1260 |
+
---
|
| 1261 |
+
|
| 1262 |
+
# 54. Empfohlener vollständiger Sicherheitsablauf
|
| 1263 |
+
|
| 1264 |
+
Für besonders wichtige Zustände:
|
| 1265 |
+
|
| 1266 |
+
```bash
|
| 1267 |
+
git checkout main
|
| 1268 |
+
|
| 1269 |
+
git status
|
| 1270 |
+
|
| 1271 |
+
git fetch origin
|
| 1272 |
+
|
| 1273 |
+
git log --oneline --decorate --graph --all -20
|
| 1274 |
+
|
| 1275 |
+
git diff
|
| 1276 |
+
|
| 1277 |
+
git diff origin/main..main
|
| 1278 |
+
|
| 1279 |
+
git add -A
|
| 1280 |
+
|
| 1281 |
+
git status
|
| 1282 |
+
|
| 1283 |
+
git diff --staged
|
| 1284 |
+
|
| 1285 |
+
git commit -m "Beschreibung"
|
| 1286 |
+
|
| 1287 |
+
git push origin main
|
| 1288 |
+
```
|
| 1289 |
+
|
| 1290 |
+
Optional Release:
|
| 1291 |
+
|
| 1292 |
+
```bash
|
| 1293 |
+
git tag -a brain5d-core-vX.Y.Z -m "Beschreibung"
|
| 1294 |
+
git push origin brain5d-core-vX.Y.Z
|
| 1295 |
+
```
|
| 1296 |
+
|
| 1297 |
+
---
|
| 1298 |
+
|
| 1299 |
+
# 55. Regeln für Brain-5D
|
| 1300 |
+
|
| 1301 |
+
## Regel 1
|
| 1302 |
+
|
| 1303 |
+
Der lokale Stand ist maßgeblich.
|
| 1304 |
+
|
| 1305 |
+
```text
|
| 1306 |
+
LOCAL = SOURCE OF TRUTH
|
| 1307 |
+
```
|
| 1308 |
+
|
| 1309 |
+
## Regel 2
|
| 1310 |
+
|
| 1311 |
+
Produktiver Entwicklungsbranch:
|
| 1312 |
+
|
| 1313 |
+
```text
|
| 1314 |
+
main
|
| 1315 |
+
```
|
| 1316 |
+
|
| 1317 |
+
## Regel 3
|
| 1318 |
+
|
| 1319 |
+
Standardziel:
|
| 1320 |
+
|
| 1321 |
+
```text
|
| 1322 |
+
origin/main
|
| 1323 |
+
```
|
| 1324 |
+
|
| 1325 |
+
## Regel 4
|
| 1326 |
+
|
| 1327 |
+
Kein automatisches:
|
| 1328 |
+
|
| 1329 |
+
```bash
|
| 1330 |
+
git pull
|
| 1331 |
+
```
|
| 1332 |
+
|
| 1333 |
+
## Regel 5
|
| 1334 |
+
|
| 1335 |
+
Remote-Informationen nur prüfen:
|
| 1336 |
+
|
| 1337 |
+
```bash
|
| 1338 |
+
git fetch origin
|
| 1339 |
+
```
|
| 1340 |
+
|
| 1341 |
+
## Regel 6
|
| 1342 |
+
|
| 1343 |
+
Normaler Push:
|
| 1344 |
+
|
| 1345 |
+
```bash
|
| 1346 |
+
git push origin main
|
| 1347 |
+
```
|
| 1348 |
+
|
| 1349 |
+
## Regel 7
|
| 1350 |
+
|
| 1351 |
+
Remote bewusst auf lokalen Stand setzen:
|
| 1352 |
+
|
| 1353 |
+
```bash
|
| 1354 |
+
git push --force-with-lease origin main
|
| 1355 |
+
```
|
| 1356 |
+
|
| 1357 |
+
## Regel 8
|
| 1358 |
+
|
| 1359 |
+
Nie blind:
|
| 1360 |
+
|
| 1361 |
+
```bash
|
| 1362 |
+
git push --force
|
| 1363 |
+
```
|
| 1364 |
+
|
| 1365 |
+
## Regel 9
|
| 1366 |
+
|
| 1367 |
+
Verifizierte Entwicklungsstände erhalten Tags.
|
| 1368 |
+
|
| 1369 |
+
Beispiel:
|
| 1370 |
+
|
| 1371 |
+
```text
|
| 1372 |
+
brain5d-core-v0.1.0
|
| 1373 |
+
```
|
| 1374 |
+
|
| 1375 |
+
## Regel 10
|
| 1376 |
+
|
| 1377 |
+
Vor wichtigen Änderungen wird der aktuelle Zustand mit `status`, `diff` und `log` kontrolliert.
|
| 1378 |
+
|
| 1379 |
+
---
|
| 1380 |
+
|
| 1381 |
+
# 56. Nicht mehr empfohlener alter Ablauf
|
| 1382 |
+
|
| 1383 |
+
Der bisherige Ablauf:
|
| 1384 |
+
|
| 1385 |
+
```bash
|
| 1386 |
+
git checkout main
|
| 1387 |
+
git pull
|
| 1388 |
+
git merge --no-ff develop
|
| 1389 |
+
git tag -a brain5d-core-v0.1.0 -m "Sprint 1C VERIFIED - observable deterministic reference core"
|
| 1390 |
+
git push origin main --tags
|
| 1391 |
+
```
|
| 1392 |
+
|
| 1393 |
+
wird für den neuen Brain-5D-Workflow nicht mehr als Standard verwendet.
|
| 1394 |
+
|
| 1395 |
+
Problematisch sind insbesondere:
|
| 1396 |
+
|
| 1397 |
+
```bash
|
| 1398 |
+
git pull
|
| 1399 |
+
```
|
| 1400 |
+
|
| 1401 |
+
weil dadurch Remote-Änderungen lokal integriert werden können,
|
| 1402 |
+
|
| 1403 |
+
und:
|
| 1404 |
+
|
| 1405 |
+
```bash
|
| 1406 |
+
git merge --no-ff develop
|
| 1407 |
+
```
|
| 1408 |
+
|
| 1409 |
+
weil `develop` im Single-Branch-Modell nicht mehr notwendig ist.
|
| 1410 |
+
|
| 1411 |
+
---
|
| 1412 |
+
|
| 1413 |
+
# 57. Neuer sauberer Ersatz
|
| 1414 |
+
|
| 1415 |
+
```bash
|
| 1416 |
+
git checkout main
|
| 1417 |
+
|
| 1418 |
+
git status
|
| 1419 |
+
|
| 1420 |
+
git add -A
|
| 1421 |
+
|
| 1422 |
+
git commit -m "Sprint "
|
| 1423 |
+
|
| 1424 |
+
git push origin main
|
| 1425 |
+
|
| 1426 |
+
git tag -a brain5d-core-v0.0.0 -m "Sprint "
|
| 1427 |
+
|
| 1428 |
+
git push origin brain5d-core-v0.0.0
|
| 1429 |
+
```
|
| 1430 |
+
|
| 1431 |
+
---
|
| 1432 |
+
|
| 1433 |
+
# 58. Minimaler täglicher Befehlssatz
|
| 1434 |
+
|
| 1435 |
+
```bash
|
| 1436 |
+
git checkout main
|
| 1437 |
+
git status
|
| 1438 |
+
git add -A
|
| 1439 |
+
git commit -m "Update"
|
| 1440 |
+
git push origin main
|
| 1441 |
+
```
|
| 1442 |
+
|
| 1443 |
+
---
|
| 1444 |
+
|
| 1445 |
+
# 59. Minimaler sicherer Befehlssatz
|
| 1446 |
+
|
| 1447 |
+
```bash
|
| 1448 |
+
git checkout main
|
| 1449 |
+
git status
|
| 1450 |
+
git fetch origin
|
| 1451 |
+
git add -A
|
| 1452 |
+
git commit -m "Update"
|
| 1453 |
+
git push origin main
|
| 1454 |
+
```
|
| 1455 |
+
|
| 1456 |
+
---
|
| 1457 |
+
|
| 1458 |
+
# 60. Minimaler autoritativer Synchronisationsweg
|
| 1459 |
+
|
| 1460 |
+
Wenn der lokale Stand definitiv GitHub ersetzen soll:
|
| 1461 |
+
|
| 1462 |
+
```bash
|
| 1463 |
+
git checkout main
|
| 1464 |
+
git status
|
| 1465 |
+
git fetch origin
|
| 1466 |
+
git push --force-with-lease origin main
|
| 1467 |
+
```
|
| 1468 |
+
|
| 1469 |
+
---
|
| 1470 |
+
|
| 1471 |
+
# 61. Grundsätzliches Brain-5D-Modell
|
| 1472 |
+
|
| 1473 |
+
```text
|
| 1474 |
+
┌──────────────────────────────┐
|
| 1475 |
+
│ Lokales Brain-5D Repository │
|
| 1476 |
+
│ │
|
| 1477 |
+
│ SINGLE SOURCE OF TRUTH │
|
| 1478 |
+
└──────────────┬───────────────┘
|
| 1479 |
+
│
|
| 1480 |
+
│ commit
|
| 1481 |
+
▼
|
| 1482 |
+
┌──────────────────────────────┐
|
| 1483 |
+
│ local main │
|
| 1484 |
+
└──────────────┬───────────────┘
|
| 1485 |
+
│
|
| 1486 |
+
│ git push origin main
|
| 1487 |
+
▼
|
| 1488 |
+
┌──────────────────────────────┐
|
| 1489 |
+
│ GitHub origin/main │
|
| 1490 |
+
│ │
|
| 1491 |
+
│ Backup / Veröffentlichung │
|
| 1492 |
+
└──────────────────────────────┘
|
| 1493 |
+
```
|
| 1494 |
+
|
| 1495 |
+
Remote-Änderungen fließen nicht automatisch zurück.
|
| 1496 |
+
|
| 1497 |
+
Prüfung erfolgt über:
|
| 1498 |
+
|
| 1499 |
+
```bash
|
| 1500 |
+
git fetch origin
|
| 1501 |
+
```
|
| 1502 |
+
|
| 1503 |
+
Eine Übernahme erfolgt nur nach bewusster Entscheidung.
|
| 1504 |
+
|
| 1505 |
+
---
|
| 1506 |
+
|
| 1507 |
+
# 62. Brain-5D Git-Leitsatz
|
| 1508 |
+
|
| 1509 |
+
```text
|
| 1510 |
+
LOCAL FIRST.
|
| 1511 |
+
MAIN ONLY.
|
| 1512 |
+
FETCH TO INSPECT.
|
| 1513 |
+
PUSH TO PUBLISH.
|
| 1514 |
+
TAG VERIFIED STATES.
|
| 1515 |
+
FORCE-WITH-LEASE ONLY WHEN LOCAL MUST WIN.
|
| 1516 |
+
```
|
| 1517 |
+
|
| 1518 |
+
Damit bleibt der lokale Brain-5D-Projektstand kontrolliert, nachvollziehbar und eindeutig die maßgebliche Entwicklungsquelle.
|
docs/01-guides/HOTFIX_README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Applying v0.4.0-alpha.4
|
| 2 |
+
|
| 3 |
+
1. Extract this overlay into the Brain-5D repository.
|
| 4 |
+
2. Run `python scripts/prepare_alpha4.py` once. This applies the narrow legacy
|
| 5 |
+
mypy fixes identified by the 104-test alpha.3 acceptance run and normalizes
|
| 6 |
+
Python files with Black.
|
| 7 |
+
3. Run `python scripts/verify_b5d.py`.
|
| 8 |
+
4. Do not tag v0.4.0 final until `tests/test_restore_continue.py` also passes on
|
| 9 |
+
the real core and the complete mypy/Pylint gates are green.
|
| 10 |
+
|
| 11 |
+
The overlay does not change the frozen `.b5d` V1 or journal V1 binary formats.
|
docs/01-guides/INSTALL_V050A1.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Integration
|
| 2 |
+
|
| 3 |
+
Extract this overlay into the repository root, then run:
|
| 4 |
+
|
| 5 |
+
```powershell
|
| 6 |
+
cd F:\Brain-5D
|
| 7 |
+
.venv\Scripts\Activate.ps1
|
| 8 |
+
pip install -e ".[dev]"
|
| 9 |
+
black src tests
|
| 10 |
+
python -m pytest -v
|
| 11 |
+
black --check src tests
|
| 12 |
+
mypy src
|
| 13 |
+
pylint src
|
| 14 |
+
python scripts/verify_dashboard.py
|
| 15 |
+
git diff --check
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
Do not tag the release until the local Quality Gate is fully green.
|
| 19 |
+
|
| 20 |
+
After the final v0.4 commit/tag is present, commit this revision as:
|
| 21 |
+
|
| 22 |
+
```powershell
|
| 23 |
+
git add -A
|
| 24 |
+
git commit -m "v0.5.0-alpha.1: homeostasis and self-regulation foundation"
|
| 25 |
+
git tag -a brain5d-core-v0.5.0-alpha.1 -m "Homeostasis and self-regulation foundation"
|
| 26 |
+
git push origin main
|
| 27 |
+
git push origin brain5d-core-v0.5.0-alpha.1
|
| 28 |
+
```
|
docs/01-guides/PYLANCE_PREVENTION.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Pylance/Pyright prevention rules
|
| 2 |
+
|
| 3 |
+
The prior error log shows recurring classes: unknown container element types, mutable Protocol invariance, unvalidated YAML/JSON values, broad `dict[str, object]` forwarding into typed APIs, and dynamic attributes.
|
| 4 |
+
|
| 5 |
+
For alpha.4 and later:
|
| 6 |
+
|
| 7 |
+
1. Public boundaries use `Protocol` methods and read-only `@property` accessors rather than mutable container attributes.
|
| 8 |
+
2. Every empty container has an explicit element type.
|
| 9 |
+
3. YAML/JSON is `object` only before validation; application code receives a dataclass or TypedDict.
|
| 10 |
+
4. Never pass `dict[str, object]` with `**kwargs` to `subprocess.Popen`, HTTP, storage or network APIs.
|
| 11 |
+
5. Runtime state is stored in controllers/engines, not added dynamically to neuron objects.
|
| 12 |
+
6. Test fakes implement the same read-only Protocol surfaces as production types.
|
| 13 |
+
7. `pyright src scripts tests` is a release gate, not an editor-only diagnostic.
|
docs/01-guides/REPOSITORY_WORKFLOW.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Brain-5D Repository Workflow
|
| 2 |
+
|
| 3 |
+
> Verbindliche Projektkonvention ab 2026-09-03
|
| 4 |
+
|
| 5 |
+
## Kanonischer Entwicklungsstand
|
| 6 |
+
|
| 7 |
+
Der verbindliche, gemeinsame Projektstand von Brain-5D ist:
|
| 8 |
+
|
| 9 |
+
```text
|
| 10 |
+
origin/main
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
Alle abgeschlossenen Arbeiten, Dokumentationsänderungen, Forschungsregistrierungen und freigegebenen Implementierungen müssen in `origin/main` integriert werden.
|
| 14 |
+
|
| 15 |
+
Lokale Branches oder Feature-Branches dürfen für isolierte Änderungen, Review, CI oder sichere Vorbereitung verwendet werden. Sie gelten jedoch nicht als offizieller Projektstand.
|
| 16 |
+
|
| 17 |
+
## Arbeitsregel
|
| 18 |
+
|
| 19 |
+
1. Vor Beginn neuer Arbeit `origin/main` als Referenzstand prüfen.
|
| 20 |
+
2. Änderungen dürfen temporär in einem Feature-Branch vorbereitet werden.
|
| 21 |
+
3. Nach Prüfung und Freigabe wird die Änderung nach `main` gemerged.
|
| 22 |
+
4. Der resultierende `main`-Stand wird nach `origin/main` geschrieben.
|
| 23 |
+
5. Dokumentation, TODO, Research Registry und Changelog müssen sich auf den in `origin/main` vorhandenen Stand beziehen.
|
| 24 |
+
6. Wissenschaftliche Experimente dürfen nur einen eindeutig dokumentierten Commit aus `origin/main` bzw. einen davon erzeugten Clean Freeze verwenden.
|
| 25 |
+
|
| 26 |
+
## Wichtige Klarstellung
|
| 27 |
+
|
| 28 |
+
„Immer in origin/main schreiben“ bedeutet für Brain-5D:
|
| 29 |
+
|
| 30 |
+
> `origin/main` ist der einzige dauerhafte kanonische Zielstand.
|
| 31 |
+
|
| 32 |
+
Es bedeutet nicht, dass Sicherheits-, Review- oder CI-Schritte übersprungen werden sollen. Temporäre Branches sind zulässig und erwünscht, wenn sie helfen, `main` sauber, reproduzierbar und wissenschaftlich nachvollziehbar zu halten.
|
| 33 |
+
|
| 34 |
+
## Keine parallelen Wahrheiten
|
| 35 |
+
|
| 36 |
+
Es sollen keine dauerhaft voneinander abweichenden Entwicklungsstände als gleichwertig behandelt werden.
|
| 37 |
+
|
| 38 |
+
- `origin/main` = kanonischer Projektstand
|
| 39 |
+
- Feature-Branch = temporäre Arbeitsfläche
|
| 40 |
+
- Release Tag = eingefrorene Referenz eines bestimmten `main`-Commits
|
| 41 |
+
- Experiment Freeze = wissenschaftlich dokumentierte Referenz eines bestimmten `origin/main`-Commits
|
| 42 |
+
|
| 43 |
+
Damit bleibt für Code, Dokumentation und Forschung eindeutig nachvollziehbar, auf welchem Systemstand eine Aussage beruht.
|