Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

docs: pin metrics compute layer designation - #66

Merged
erinepshovel-code merged 3 commits into
mainfrom
feat/resolve-metrics-layer-designation
May 22, 2026
Merged

erinepshovel-code merged 3 commits into
mainfrom
feat/resolve-metrics-layer-designation

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Collaborator

GPT generated; context, prompt Erin Spencer

Summary

Resolves the edcm_metrics.py / metrics compute layer-designation question as A — Behavioral/orchestration, not Operator L0.

This PR updates:

  • backend/src/edcmbone/metrics/compute.py
  • tests/test_metrics_layer_designation.py

Decision

metrics/compute.py is not the bones-only Operator layer. It is an upper-layer / orchestration module that currently lives in edcmbone for compatibility and is marked for future migration to edcm.

The L0 Operator entry point remains separate:

core/operator/operator_extractor.py

Why A

Existing canon and migration docs already say:

  • edcmbone is canonical L0 only
  • metrics/compute.py orchestrates upper-layer computation and should migrate upstream
  • the 9 Behavioral metrics are not the L0 Operator vector
  • Operator output comes from core/operator/operator_extractor.py

So this is documentation / layer-contract debt, not a rewrite-to-bones bug.

New layer constants

Added to edcmbone.metrics.compute:

LAYER_DECISION = "A_BEHAVIORAL_ORCHESTRATION"
LAYER_DESIGNATION = "L1_L2_L3_ORCHESTRATOR_PENDING_EDCM_MIGRATION"
LAYER_INPUT_SUBSTRATE = "round_text_tokens_marker_stats_prior_round_context"
OPERATOR_LAYER_SUBSTRATE = "bones_only"
OPERATES_ON_OPERATOR_BONES = False
CONSUMES_BONE_COUNT_FOR_AUDIT = True
MIGRATION_TARGET = "edcm"
OPERATOR_ENTRYPOINT = "core.operator.operator_extractor"

Test enforcement

Adds tests that fail loudly if future edits blur the layer again:

  • metrics compute is Behavioral/orchestration, not Operator L0
  • Operator entry point remains separate
  • RoundMetrics remains an upper-layer vector shape while carrying bone_count only for audit continuity

hmmm

Copilot AI review requested due to automatic review settings May 16, 2026 10:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR clarifies the architectural/layer contract for backend/src/edcmbone/metrics/compute.py, explicitly designating it as Behavioral/orchestration (not Operator L0), and adds a regression test to prevent future drift of that designation.

Changes:

  • Added an explicit “Layer designation” section to the edcmbone.metrics.compute module docstring.
  • Introduced module-level “layer contract” constants (decision, substrate, migration target, operator entrypoint).
  • Added tests to enforce the layer boundary and to assert RoundMetrics exposes an upper-layer vector shape while carrying bone_count only as audit metadata.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
backend/src/edcmbone/metrics/compute.py Adds layer designation documentation and a set of constants encoding the layer contract; minor signature formatting.
tests/test_metrics_layer_designation.py Adds tests that lock the compute module’s layer decision/entrypoint separation and the RoundMetrics vector shape.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_metrics_layer_designation.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@erinepshovel-code
erinepshovel-code merged commit 1edb87d into main May 22, 2026
2 of 3 checks passed
@erinepshovel-code
erinepshovel-code deleted the feat/resolve-metrics-layer-designation branch May 22, 2026 10:23
Copilot stopped work on behalf of erinepshovel-code due to an error May 22, 2026 10:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants