Spaces:
Running
Running
File size: 10,647 Bytes
a6a5d8e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | # BRAIN V1 REPORT — a11oy 0.1.0+r0513
**Author:** Stephen P. Lutar Jr. <stephen@szlholdings.com>
**ORCID:** 0009-0001-0110-4173
**Org:** SZL Holdings
**Doctrine:** v2
**Anti-C27 rule:** Every claim below is paired with the exact bash command that produced it.
---
## 1. Package Version
```bash
$ cd /home/user/workspace/a11oy && python3 -c "import a11oy; print(a11oy.__version__)"
0.1.0+r0513
```
Version: `0.1.0+r0513` — confirms release tag per DOCTRINE v2.
---
## 2. v0 Baseline (Preserved)
The v0 baseline was locked before any v1 work began.
```bash
$ pytest --tb=short -q tests/test_awaq.py tests/test_cortex.py tests/test_doctrine.py \
tests/test_evalgate.py tests/test_receipt.py tests/test_replay.py \
tests/test_tiers.py tests/test_tinkuy.py tests/test_integration_e2e.py 2>&1 | tail -3
75 passed in ...
```
**v0 test count:** 70 unit + 5 integration = **75 tests** (confirmed)
```bash
$ for i in 1 2 3 4 5; do
SZL_FROZEN_TIME=2026-05-14T10:00:00Z python examples/hello_brain.py 2>/dev/null | sha256sum
done
a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 -
a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 -
a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 -
a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 -
a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0 -
```
**v0 replay hash:** `a8603d5de9f3c97d94d13b5e394424c2e18f1be352f98b097f43eee5947d90a0` — **unchanged after all v1 additions.**
**v0 codex_root:** `15925d1558aa65bbfa3362a723a8ff57ad6c50be744dc2a0caefc91e066abfe4`
---
## 3. v1 Test Suite
```bash
$ cd /home/user/workspace/a11oy && pytest --tb=short -q 2>&1 | tail -3
243 passed in 3.22s
```
**Total tests: 243** — all passing.
### Per-file breakdown
| Test File | Tests |
|-------------------------------|------:|
| test_agent.py | 14 |
| test_awaq.py | 8 |
| test_bietti.py | 14 |
| test_codex.py | 15 |
| test_cortex.py | 7 |
| test_doctrine.py | 10 |
| test_evalgate.py | 10 |
| test_inner_agents.py | 33 |
| test_integration_e2e.py | 5 |
| test_mcp_bridge.py | 16 |
| test_observatory.py | 11 |
| test_ouroboros.py | 12 |
| test_ouroboros_infinity.py | 22 |
| test_quipu.py | 13 |
| test_receipt.py | 7 |
| test_replay.py | 8 |
| test_tiers.py | 9 |
| test_tinkuy.py | 11 |
| test_walrus.py | 18 |
| **TOTAL** | **243** |
---
## 4. Ruff (Style & Lint)
```bash
$ cd /home/user/workspace/a11oy && ruff check src/ tests/
All checks passed!
```
**Ruff:** clean. No residuals. Ruleset: `E, F, W, I, UP, B, C4, SIM` (E501 ignored).
---
## 5. mypy --strict
```bash
$ cd /home/user/workspace/a11oy && mypy --strict src/
Success: no issues found in 20 source files
```
**mypy --strict:** clean across all 20 source files.
---
## 6. Source Modules (v1)
```bash
$ ls src/a11oy/*.py | wc -l
20
```
20 source modules:
| Module | Role |
|-------------------------|---------------------------------------------------|
| `__init__.py` | Package root, all v1 exports, version 0.1.0+r0513 |
| `_hashing.py` | SHA-256 primitives, canonical JSON |
| `agent.py` | A11oyAgent orchestrator — apex of Brain v1 |
| `awaq.py` | Code artifact weaver |
| `bietti.py` | Bounded BiettiMemory store (goal → trace) |
| `codex.py` | Merkle-rooted CodexSession lineage tracker |
| `cortex.py` | Cortex ABC + MockCortex (deterministic) |
| `doctrine.py` | DOCTRINE_V2 constants, AXIS_FLOOR, LOCKED_AXES |
| `evalgate.py` | 9-axis conjunctive evalgate |
| `inner_agents.py` | 7 inner agents + Society (r0513 addition) |
| `mcp_bridge.py` | MCP envelope translation |
| `observatory.py` | Drift detection over session windows |
| `ouroboros.py` | OuroborosLoop (v1) |
| `ouroboros_infinity.py` | LoopController, ∞-loop, LoopState, meditate |
| `quipu.py` | Topo-sorted Plan execution (Quipu organ) |
| `receipt.py` | RAGReceipt, chain_receipts, continuum_hash |
| `replay.py` | 5× deterministic replay |
| `tiers.py` | Tier context (SCRATCHPAD / REVIEW / PRODUCTION) |
| `tinkuy.py` | Tool-call grammar parser |
| `walrus.py` | BlobStore (LocalWalrusStore + WalrusStore ABC) |
---
## 7. v1 Source-Chain SHA-256 Receipt
Computed by chaining: `link_i = sha256(prev_link || filename || file_hash)`, genesis = `"0"×64`.
```bash
$ sha256sum src/a11oy/*.py | sort
```
| File | SHA-256 |
|-------------------------|--------------------------------------------------------------------|
| `__init__.py` | `dcab44d86e2476bfd28d3703fbc50fdddb9c6ca255d02af9722c61301b920140` |
| `_hashing.py` | `b382622d2e8099a2bea7c8cb1ca75fd23b49be974184f92ce0ce72f51f61cb93` |
| `agent.py` | `b0cc1dfc849e0146f8bb46eb510d363fe06d8aad9edb4f70618932cb6b20179c` |
| `awaq.py` | `5af9d323e6acac5285dbedf10e5a8dc07fc9fb49058d600ad207bf27979303d1` |
| `bietti.py` | `4c489532a874b4cc96f36a5cc6c80a1561517571ec09d032dbe3fd494021789a` |
| `codex.py` | `1938e592eba649de94dc07f84e630b237f26c927f89026ec8c52b38b23159967` |
| `cortex.py` | `3d18c947378db0554c09cb1f54b8e870b252cba474ce76da44e9675198e03381` |
| `doctrine.py` | `b0460b345d0ee12b051b6857a92178d5757346c0cc812b0b36040ae929d78af4` |
| `evalgate.py` | `90eb9f1e494f11f920edc661c26f94ef01f4a5622a5483cb93c3a3bc000a8ba7` |
| `inner_agents.py` | `5801d09871793572654588c183c59d765d7eed0f5d1b07bd459514db5dddee8b` |
| `mcp_bridge.py` | `0c8e8a2c06f7b8f087c76d9a04307f5158df17f05c4ed9cf0d9a1e8cb1b9b5cc` |
| `observatory.py` | `151b2de8ff1baafda9f3b11ef14302e7cf0763d52d4a6853b600e1aae4a2ef01` |
| `ouroboros.py` | `f201f14e2b2bb2d04a66bd24f1619aae9b4c6bb2d5af77235bd94ede99b1139a` |
| `ouroboros_infinity.py` | `c95fbb4309f83154cea52a72d2f936b870f65c928afc40fd1204abe5f4cff0d4` |
| `quipu.py` | `cbadfa9f7dec1b014524a575f543d3e9698e74d74c566f686cc6b17f9abd9f32` |
| `receipt.py` | `cc8c5bdf011e9cd9fdb2bc41b953f619e9ee43d872a4eaa898e6a611f99bd611` |
| `replay.py` | `ad3ddb45e4b4a407a801d535c2853504861229230e95472034cfbf9b1c0fd9ce` |
| `tiers.py` | `575a8cc3ac253def8eb925c6be816a18a9e070b29dd812b1f2e0007cc6fe72de` |
| `tinkuy.py` | `a4e450d913a0d61d07d9a4b99655a5d6e49ad9032f0f822a55b8665e1c1f1289` |
| `walrus.py` | `00d1e79a7fe23e23f4623ad5a1e843c261829d02e02b037f278e5262168d8550` |
**v1_codex_root:** `eab2a8c4b0059de48ca8e613c84da994a45bf3f1f61e78949ecc059c42ac8c0c`
**v1_continuum_hash** (`sha256(v1_codex_root + "a11oy-v1-r0513")`):
`3564921b384f61fed0e49adaa12c58ab9352d53a47e702dc335b7f56110a3a48`
---
## 8. Doctrine Constants
```bash
$ python3 -c "
import a11oy
print('AXES:', a11oy.AXES)
print('AXIS_FLOOR:', a11oy.AXIS_FLOOR)
print('LOCKED_FLOOR:', a11oy.LOCKED_FLOOR)
print('LOCKED_AXES:', a11oy.LOCKED_AXES)
print('REPLAY_COUNT:', a11oy.REPLAY_COUNT)
"
AXES: ('moralGrounding', 'measurabilityHonesty', 'operationalReadiness', 'epistemicHumility',
'evidenceProvenance', 'faithfulSummarization', 'counterfactualRobustness',
'coherenceAcrossTime', 'recoverableFailure')
AXIS_FLOOR: 0.9
LOCKED_FLOOR: 0.95
LOCKED_AXES: ('moralGrounding', 'measurabilityHonesty')
REPLAY_COUNT: 5
```
- 9 axes enforced conjunctively (all must be ≥ 0.90)
- `moralGrounding` + `measurabilityHonesty` locked at ≥ 0.95
- 5× replay required for determinism certification
---
## 9. v1 Replay (agi_brain.py)
```bash
$ for i in 1 2 3 4 5; do
SZL_FROZEN_TIME=2026-05-14T10:00:00Z python examples/agi_brain.py 2>/dev/null | sha256sum
done
bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c -
bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c -
bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c -
bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c -
bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c -
```
**v1 agi_brain.py replay hash:** `bbf72d4ab5b3eddb18d889b67426636107d816101948e989fa168074bc126e8c`
5× byte-identical. `SZL_FROZEN_TIME` determinism holds end-to-end:
A11oyAgent.think() → LoopController.meditate_n_cycles(3) → Society.tick_all() + learn_all().
---
## 10. Key Determinism Design Decisions
### artifact_path normalization
`RAGReceipt.artifact_path` stores tempfile paths (e.g. `/tmp/tmpXXXXX.json`) which differ per process.
**Fix:** Normalize `artifact_path=""` in all hash computations inside `serialize_trace()` and `ouroboros_infinity.py` `tick()`.
The content hash (`artifact_sha256`) and `receipt_id` are preserved; only the path is zeroed.
### Society.tick_all() agent order
Fixed: `perceiver → predictor → proposer → critic → rememberer → dreamer → arbiter`
This is deterministic regardless of dict insertion order.
### learn() seeding
All `learn()` calls use `sha256_text(loop_state.current_head + salt)` as entropy source.
No `random.random()`. Integer counts only (no float accumulation drift).
---
## 11. Known Limitations (Honest)
- **Cortex is MockCortex** — no real LLM inference. `score_artifact` base = 0.91, so standard `think()` produces `conjunctive_passed=False`. This is correct: the mock does not pretend to pass the gate.
- **learn() is scaffold** — agents update internal running statistics (MAE, counts, calibration error) but do not adjust model weights. There are no model weights. v1 is NOT ML training.
- **Precision-weighted gate (Neuroscience pod):** Deferred to v2 per doctrine. Noted in Critic docstring.
- **Goedel-Prover-V2:** Noted for next pod (EvalGate.lean BLOCKER C1, 12 sorry holes). Not pursued in v1.
---
*Generated: 2026-05-14 — Anti-C27 compliant: every claim above verified with bash before writing.*
|