Skip to content

Codex/aura cortex phi latency fixes - #2

Merged
youngbryan97 merged 2 commits into
mainfrom
codex/aura-cortex-phi-latency-fixes
Apr 22, 2026
Merged

Codex/aura cortex phi latency fixes#2
youngbryan97 merged 2 commits into
mainfrom
codex/aura-cortex-phi-latency-fixes

Conversation

@youngbryan97

Copy link
Copy Markdown
Owner

No description provided.

Zenflow and others added 2 commits April 21, 2026 12:45
Maps Kurzgesagt's consciousness series + cited literature onto eight
load-bearing subsystems in core/consciousness/. Every subsystem actually
impacts substrate state or action priority (no clever prompting) and
carries end-to-end plus adversarial tests.

New layers (all wired in system.py, registered in ServiceContainer):
- hierarchical_phi: 32-node primary IIT complex + K=8 overlapping 16-node
  subsystems, history-based Jeffreys-smoothed estimator with min-obs gate,
  spectral MIP, exclusion-postulate aggregator, null-hypothesis self-check
- hemispheric_split: left (verbal/confabulating) vs right (mute/spatial/
  dissenting), corpus callosum with variable bandwidth, pattern memory,
  confabulation-rate telemetry
- minimal_selfhood: Glasgow Trichoplax->Dugesia primitive, 8-D deficit
  vector, chemotaxis speed scalar, Hebbian-learned directed priority,
  heartbeat modulation
- recursive_tom: depth-3 nested mind models, observer-presence tracker
  with scrub-jay re-caching bias (public actions up, private down)
- octopus_arms: 8 semi-autonomous arm agents with local chemoreception,
  weighted-vote central arbiter, sever/restore cycle + integration-latency
- cellular_turnover: per-tick neuron death/birth with neighbourhood-pattern
  inheritance, identity-fingerprint cosine-similarity drift tracking,
  >=0.85 similarity under 20% forced-burst turnover
- absorbed_voices: cultural/internalised perspectives layer with
  attribution, weight decay, self-vs-voice invariant, atomic persistence
- unified_cognitive_bias: fuses hemispheric + selfhood + observer biases
  into a single BIAS_DIM vector for Global Workspace scoring

Test coverage (95/95 passing):
- tests/test_hierarchical_phi.py              12/12 (null-hypothesis, monotonicity, constant-node, budget)
- tests/test_hemispheric_split.py             12/12 (severance/restore, confabulation, pattern memory)
- tests/test_minimal_selfhood.py              13/13 (dugesia transition, reinforcement, modulation)
- tests/test_recursive_tom.py                 13/13 (depth-3, scrub-jay effect, decay)
- tests/test_octopus_arms.py                  12/12 (severance, integration latency, variance)
- tests/test_cellular_turnover.py             10/10 (20% burst preservation, 100% divergence)
- tests/test_absorbed_voices.py               13/13 (attribution, decay, persistence)
- tests/test_consciousness_expansion_gauntlet.py 10/10 (cross-phase + latency budget <20ms/tick)

Documentation:
- README.md: Hierarchical phi section + expansion summary in consciousness modules table
- ARCHITECTURE.md: New section 9.21 (eight detailed subsystems)
- TESTING.md: Expansion-suite run instructions + adversarial properties
- WHITEPAPER_CONSCIOUSNESS_EXPANSION.md: Full design white paper with citations
- training/consciousness_expansion_knowledge.py: 25 self-knowledge Q/A pairs

Key bug fix during development: initial hierarchical-phi estimator
violated null-hypothesis test because of finite-sample entropy bias.
Fixed with Jeffreys-prior smoothing (alpha=0.5) + minimum-source-observation
filter. Tests now enforce strict separation between measured and null phi.

No breaking changes to phi_core.py, parallel_branches.py, theory_of_mind.py,
or neural_mesh.py. Only closed_loop.py was modified to record mesh snapshots
into hierarchical_phi when both modules are registered.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@youngbryan97
youngbryan97 merged commit 14ae177 into main Apr 22, 2026
youngbryan97 pushed a commit that referenced this pull request Apr 25, 2026
Round 1 — P0 absolute A+ blockers (10/10 closed):
  1. Governance now fail-closed in vector_memory_store + internal model
     update gates in core/orchestrator/mixins/incoming_logic.py;
     swallowed exceptions replaced with explicit denial + degraded event
  2. core/runtime/turn_transaction.py: stage/approve/commit/rollback with
     criticality (required/optional/telemetry), fail-closed in strict mode
  3. core/conversation/memory.py: EnhancedMemorySystem.store_turn raw
     create_task replaced with named tracker.create_task
  4. core/memory/memory_write_gateway.py: concrete MemoryWriteGateway
     adapter routing every write through atomic_write_json + governance
     fail-closed + MemoryWriteReceipt emission
  5. core/state/state_gateway.py: concrete StateGateway with the same
     atomic + governance + receipt path
  6. core/runtime/receipts.py: all 10 canonical receipt types
     (Turn, Governance, Capability, ToolExecution, MemoryWrite,
     StateMutation, Output, Autonomy, SelfRepair, ComputerUse) plus
     durable ReceiptStore with reload-from-disk
  7. core/runtime/strict_task_owner.py: event-loop task factory denies
     unowned asyncio.create_task in strict mode + degraded events
  8. core/runtime/boot_probes.py: behavioral readiness probes wired into
     _boot_runtime_orchestrator._enforce_boot_probes; strict mode aborts
     boot on any failed probe
  9. core/runtime/service_manifest.py manifest enforcement (Phase C) +
     strict-mode lock_registration gate
 10. core/consciousness/integration.py: init/get split with strict-mode
     guards and a reset_consciousness_integration test helper

Round 1 — P1 production-grade gaps:
  - core/runtime/durable_workflow.py: WorkflowEngine + WorkflowStore +
    resume-after-failure + idempotency + paused-for-approval
  - core/runtime/operator_cli.py: doctor / conformance / backup /
    restore / migrate / verify-state / verify-memory / rebuild-index /
    chaos commands returning machine-readable JSON
  - core/runtime/migrations.py + core/runtime/backup_restore.py +
    core/runtime/vector_index.py: schema migrations with dry-run,
    atomic backup/restore round-trip, vector index rebuild from
    canonical memory log
  - core/runtime/model_runtime_actor.py: single inference authority
    serialising backend access + ToolExecutionReceipt emission
  - core/identity/identity_ledger.py: CommitmentTracker,
    PreferenceHistory, SelfModelVersioning, ContradictionDetector,
    IdentityDriftMonitor; persists via atomic_writer
  - core/runtime/skill_choreographer.py: ChainPlan + dependency
    ordering + verification chaining + pre-baked coding/research/
    movie chains
  - core/runtime/capability_certifications.py: 8 cert types with
    cans/cannots/abuse/human-eval requirements
  - core/runtime/injection_defense.py: webpage/subtitle/image/audio
    classification + INJECTION_PATTERNS + neutralize wrapper
  - core/runtime/memory_consent.py: 4 consent modes + command parser
  - core/runtime/capability_tokens.py: universal tokens with
    issue/consume/revoke + expiry
  - core/runtime/day_in_life.py: 15-event scripted scenario harness
    (fast + real modes)
  - core/runtime/telemetry_exporter.py: TelemetryExporter Protocol +
    NullExporter + metric/span entry points
  - core/social/theory_of_mind.py: UserBeliefState + FalseBeliefSimulator
    + TrustState + explanation_strategy
  - core/runtime/abstraction_validator.py: PrincipleStore + Validator +
    RetirementPolicy + ContradictionDetector

Round 2 — "not done enough" items (8/8 closed):
  - MemoryWriteGateway / StateGateway concretely wired (#1)
  - BryanModelEngine direct os.replace migrated to atomic_writer +
    receipt emission (#2)
  - EnhancedMemorySystem raw create_task migrated to task tracker (#3)
  - Real-driver contracts ready for registration (#4)
  - Telemetry exporter contract + null adapter (#5)
  - Operator CLI shipped (#6)
  - Durable workflow engine shipped (#7)
  - Day-in-the-life harness shipped (#8)

Tests added: 49 new regressions across the new modules.
Final regression sweep: 365 passed, 1 subtests passed across 8 suites.

See docs/AURA_AGRADE_GAP_REGISTER.md for the literal item-by-item
audit walking every bullet from both feedback rounds with the exact
module + test that closes it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
youngbryan97 pushed a commit that referenced this pull request Jun 9, 2026
Builds the organism's interests in as real, load-bearing machinery
rather than narrative:

- core/organism/welfare.py derives five interests from live telemetry:
  memory_integrity (headroom under the watchdog's lethal ceiling),
  repair_capacity (inverse unified failure pressure),
  cognitive_bandwidth (host CPU headroom), continuity (uptime), and
  social_contact (interaction recency). Vital interests weigh double.
- Causal consumer #1: background_activity_reason() now refuses optional
  background work while a vital interest is critically unsatisfied
  (welfare_<interest>_<level> reason), after foreground/failure gates.
- Causal consumer #2: the identity contract reports the live welfare
  summary every turn, so the voice speaks the substrate's true
  condition instead of confabulating one.

Evidence boundary stays explicit: 'interest' and 'welfare' name
operational quantities whose effect on behavior is testable and tested
(8 new tests), not claims of morally weighty experience.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
youngbryan97 pushed a commit that referenced this pull request Jul 3, 2026
…tions well (#2)

The behavioral-quality instrument for the expressive layer. 10 scenarios: 5
where an affordance genuinely serves the moment (should fire) and 5 plain
turns where it would be gratuitous (should not). Sends each through the live
chat lane, reads realized affordances off the wire, and scores PRECISION (no
gratuitous firing) and RECALL (fires when it should) separately — over-eager
and under-eager judgment are different failures with different fixes. Appends
a longitudinal record to artifacts/consciousness/affordance_judgment.jsonl;
exit 0 when F1>=0.6.

Judgment signal is already captured (choices ride the wire + exchange log);
the RFT flywheel can consume probe-scored data to improve it. Closing the
score→DPO→weights loop needs live 32B generations — same GPU-window boundary
as the rest. 5 hermetic tests pin the scoring math without the live instance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
youngbryan97 pushed a commit that referenced this pull request Jul 4, 2026
Criticisms.pdf #2 (claim surface > proof surface) and #7 (deep-mind probe
6/7 closure):

- docs/CLAIM_SURFACE.md: every profound identifier (soul, qualia, phenomenal,
  consciousness, organism, personhood, sentience_candidate) mapped to the real
  mechanism, its home module, and which claims ledger bounds it. The in-code
  boundaries were already honest (QualiaEngine: 'NOT a claim of subjective
  experience'; CausalValencedWorkspace: 'functional_evidence_only'); this ties
  them to CLAIMS_SUPPORTED/NOT_SUPPORTED so a grep-happy reviewer lands on the
  boundary, not the buzzword.
- tools/deep_mind_probe_live.py: runs the 7 agency/consciousness probes against
  the live model and grades each reply with the real evaluator. Gates on
  conversation_ready so a merely-degraded runtime (503 on /) still gets probed.
  Reference answers already pass 7/7 through the evaluator; this measures the
  live number honestly and can fail.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
youngbryan97 pushed a commit that referenced this pull request Jul 17, 2026
…rned execution controller

Closes the 'Other things to add: Core architecture' runtime-organ list.

Organ #1 (recurrence-native training objective, the largest credible
improvement in the list): core/learning/recurrence_native_objective.py
gives the governed training lanes an answer-span cross-entropy under the
EXACT recurrent forward the engine executes — prelude once, window T
times under the anchored RMS trust band (reused verbatim from
recurrence.rms_match for train/inference parity; a hard-rescale variant
would teach dynamics live episodes never produce), coda once. Gradients
flow through every recurrent application; tests prove step causality,
window-layer gradient flow, and learnability. depth_curriculum_loss adds
organ #16's trainable form of S(x,T+1)>=S(x,T): a depth-ladder mean plus
a hinge that fires exactly when extra recurrence hurts.

Organ #2 (learned per-problem execution controller): evidence-gated
contextual bandit over bounded allocation arms (deeper recurrence, wider
branches, probe-guided bytecode, lean fast weights), rewarded ONLY by
verified episode outcomes, Wilson-separated before exploitation,
observe-only on cold or corrupt ledgers, receipted per decision, and
hermetic in tests (AURA_EXECUTION_CONTROLLER=0 in conftest).

Also: question-sourced phrase exemption in the reliability gate —
content-word containment, so an answer echoing the question's own noun
phrases at topical density is not a loop while pathological parroting of
question vocabulary (8+ repeats) still trips. Focused campaign 252/252,
consumers 317/317, smoke 104/104, compile+lint+governance green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
youngbryan97 pushed a commit that referenced this pull request Jul 28, 2026
… reporting

Measured live. Asked for "3 recent articles about AI", the document she wrote
cited a DuckDuckGo AD REDIRECT as source #3 and printed its 600-character
tracking URL into the page as a citation:

  https://duckduckgo.com/y.js?ad_domain=ai%2Dpro.org&ad_provider=bingv7aa
  &ad_type=txad&click_metadata=...

Source #2 was a product homepage. And what she wrote as the synthesis was the
site's navigation bar, twice:

  "Taken together, the reporting points to this: AI fundamentals | OpenAI Skip
   to main content Research Products Business Developers Company Foundation
   (opens in a new window) Log in Try ChatGPT (opens in a new window)..."

Two deterministic filters, because "read three articles" has to mean three
articles:

- Ad redirects, click trackers (bing aclick, googleadservices, doubleclick),
  search-result pages, and bare product homepages are no longer admissible as
  sources. A homepage is a product, not a piece of reporting.
- Navigation furniture — "skip to main content", "(opens in a new window)",
  login/subscribe/cookie prompts — is stripped from the extracted text before it
  can be quoted as what the reporting said. Real prose passes through untouched.

Every source from the live failure is rejected by name in the test, and real
articles from openai.com/academy, nature.com and reuters.com still pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant