Skip to content

Add sophia-core audit v3 (trajectory, ethics, causal memory) plus CLI/tools, schemas, and tests#52

Open
pdxvoiceteacher wants to merge 1 commit intomasterfrom
codex/establish-phase-locked-coordination-protocol-ryx873
Open

Add sophia-core audit v3 (trajectory, ethics, causal memory) plus CLI/tools, schemas, and tests#52
pdxvoiceteacher wants to merge 1 commit intomasterfrom
codex/establish-phase-locked-coordination-protocol-ryx873

Conversation

@pdxvoiceteacher
Copy link
Copy Markdown
Owner

Motivation

  • Provide a self-contained sophia-core package implementing advanced Sophia audit features (v2->v3) including trajectory-phase checks, ethical-symmetry scoring, and a causal-memory kernel with drift detection so audits can monitor longitudinal coherence and surface governance signals.
  • Add optional tamper-evident anchoring of finalized audit artifacts via a lightweight append-only ledger utility and expose v3-aware controls from the CLI to enable operational runs and telemetry event emission.
  • Make the overlay minimal and consumable by packaging the new module, updating schemas and tooling, and adding unit tests to ensure regression coverage for the new behaviors.

Description

  • Add a new sophia-core Python package (src/sophia_core) with audit.py, causal_memory.py, ethics.py, trajectory_monitor.py, tel.py, version.py, and __init__.py implementing v2/v3 audit flows, kernel update/detect logic, ethics computation, trajectory phase evaluation, and TEL hooks.
  • Add configuration and schema artifacts: sophia-core/config/audit_config.json, sophia-core/config/trajectories/psi_lambda_bounds.json, schema/sophia_audit_v2.schema.json, and schema/sophia_audit_v3.schema.json, and extend schema/telemetry/telemetry_run.schema.json and schema/submission.schema.json to support v3 fields and opt-in audit flags.
  • Extend CLI tooling: update tools/telemetry/sophia_audit.py to detect and call sophia_core (v2/v3/basic) and add flags --calibrate-trajectories, --ethics-check, --memory-aware, --blockchain-commit, and --audit-sophia; add tools/telemetry/blockchain_anchor.py to anchor reports to a ledger; update tools/telemetry/ingest_submission.py to opt-in runs via submission config.
  • Add package metadata sophia-core/pyproject.toml, package README.md, overlay README.md replacement, and new unit tests tests/sophia_core/test_audit_v2.py and tests/sophia_core/test_audit_v3.py that exercise history/trend detection, contradiction detection, trajectory/ethics checks, kernel update, and drift detection.

Testing

  • Ran python -m pytest -q tests/sophia_core/test_audit_v3.py which completed with 2 passed indicating the v3 trajectory/ethics and memory-aware scenarios exercised in the tests succeeded.
  • The v3 unit test run also exercised run_audit_v3 integration with the new causal_memory, trajectory_monitor, and ethics modules and succeeded.
  • No full CI run was performed in this rollout beyond the targeted pytest invocation above.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant