Skip to content

refactor(public-safety): centralize compact identifier shapes - #5350

Closed
BigDataDZ wants to merge 1 commit into
loopx-project:mainfrom
BigDataDZ:codex/identifier-shapes-owner
Closed

BigDataDZ wants to merge 1 commit into
loopx-project:mainfrom
BigDataDZ:codex/identifier-shapes-owner

Conversation

@BigDataDZ

Copy link
Copy Markdown
Contributor

Summary

Centralizes the identical compact public-safe reference, compact token, and module-qualified surface regular expressions in loopx/public_safe_text.py. Reward Memory, Semantic Preference, Decision Context, and Material Lifecycle retain their existing field-level behavior and error messages while consuming the shared compiled patterns.

Also adds a focused ownership regression test that verifies the listed consumers share the owner objects and no longer restate the literals.

Delivery brief

  • Goal/source: remove demonstrated duplicated identifier/surface-shape decisions in the named capability contracts.
  • Current gap: identical regular expressions were independently compiled across the shared public-safe contract surfaces, allowing drift.
  • Observable result: each migrated consumer aliases the canonical compiled pattern; validation semantics remain unchanged.
  • Owning boundary: loopx/public_safe_text.py owns syntax shapes, while callers retain contract-specific policy and diagnostics.

Validation

  • uv run --extra test pytest -q tests/control_plane/test_compact_identifier_shape_owner.py tests/capabilities/test_decision_context_packets.py tests/capabilities/test_decision_context_profile.py tests/capabilities/test_reward_memory_ingestion.py tests/test_reward_memory_pipeline.py — 61 passed
  • uv run --extra test ruff check … — passed
  • git diff --check — passed

Scope

  • Changed surfaces: shared public-safe shape owner; Reward Memory, Semantic Preference, Decision Context, and Material Lifecycle Python contract validation.
  • No frontend, CLI, permission, persistence, default-off, or authority behavior changes.
  • Future-facing refactor pass: applied; this removes duplicate shape authority without changing validation behavior.

Signed-off-by: karenchuu <25980598+karenchuu@users.noreply.github.com>
@BigDataDZ

Copy link
Copy Markdown
Contributor Author

Closing this to avoid two competing copies of the same change.

The content is re-pushed under the account this work belongs to, rebased onto a7e6b826a, in #5351 — #5351

What changed between #5350 and #5351:

No content differs otherwise: same 14 files, +116 −24, same owner exports and the same 3-test guard.

@BigDataDZ BigDataDZ closed this Sep 30, 2026
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.

2 participants