Skip to content

PR#2: Geometry Layer v0 — Instrumentation (gate.py emission hook)#4

Merged
LalaSkye merged 2 commits intomainfrom
geometry-layer-v0-instrumentation
Feb 23, 2026
Merged

PR#2: Geometry Layer v0 — Instrumentation (gate.py emission hook)#4
LalaSkye merged 2 commits intomainfrom
geometry-layer-v0-instrumentation

Conversation

@LalaSkye
Copy link
Owner

Geometry Layer v0 -- PR#2: Instrumentation

Artefact ref: MORPHEUS_PR2_GEOMETRY_INSTRUMENTATION_stop-machine_fb5b267
Scope: NON_EXEC (no runtime semantic change)
Spec ref: docs/geometry_export_spec_v0.1.md

What this adds

Adds optional GEOMETRY_LOG_PATH JSONL emission; off by default; best-effort; deterministic; no semantic change.

  • Three private helper functions: _sha256_bytes, _canonical_json, _emit_geometry_event
  • Single hook point at end of evaluate() in gate.py
  • Enabled only via GEOMETRY_LOG_PATH env var
  • Emission failure silently returns (never throws, never blocks)
  • Canonical JSON with sorted keys, SHA-256 hashes
  • Stdlib-only imports (hashlib, json, os)
  • No new external dependencies

What this does NOT change

  • Zero changes to ALLOW/HOLD/DENY/SILENCE semantics
  • No imports from analysis/, docs/, artifacts/, examples/
  • No wall-clock timestamps
  • No CI changes
  • No new shared utility modules

Build sequence

This is PR#2 of 4:

  • PR#1 (Docs only): Merged
  • PR#2 (this): Instrumentation (gate.py emission hook)
  • PR#3: CI (geometry-analysis job + drift alarm)
  • PR#4: Tests (adversarial fixtures + determinism proxy)

Best-effort, off by default, deterministic, no semantic change.
Stdlib-only imports (hashlib, json, os). No new dependencies.
Sorted keys, SHA-256 hashes, try/except silencing.
@LalaSkye LalaSkye merged commit b55cda1 into main Feb 23, 2026
3 checks passed
@LalaSkye LalaSkye deleted the geometry-layer-v0-instrumentation branch February 23, 2026 15:46
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