This repository was archived by the owner on Jul 29, 2026. It is now read-only.
docs: pin metrics compute layer designation - #66
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.computemodule docstring. - Introduced module-level “layer contract” constants (decision, substrate, migration target, operator entrypoint).
- Added tests to enforce the layer boundary and to assert
RoundMetricsexposes an upper-layer vector shape while carryingbone_countonly 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pytests/test_metrics_layer_designation.pyDecision
metrics/compute.pyis 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 toedcm.The L0 Operator entry point remains separate:
Why A
Existing canon and migration docs already say:
metrics/compute.pyorchestrates upper-layer computation and should migrate upstreamcore/operator/operator_extractor.pySo this is documentation / layer-contract debt, not a rewrite-to-bones bug.
New layer constants
Added to
edcmbone.metrics.compute:Test enforcement
Adds tests that fail loudly if future edits blur the layer again:
RoundMetricsremains an upper-layer vector shape while carryingbone_countonly for audit continuityhmmm