Conversation
Signed-off-by: karenchuu <25980598+karenchuu@users.noreply.github.com>
This was referenced Sep 30, 2026
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 (
is, not==) and no longer restate the literals.Delivery brief
loopx/public_safe_text.pyowns syntax shapes only, while callers retain contract-specific field names, thresholds, policy and diagnostics.Relationship to #5350 and #5296
This replaces #5350, which carried the same content from a different account; #5350 is closed with a pointer here.
Rebased onto
a7e6b826a. Two files conflict on the way because #5296 landed between the original branch point and this base:decision_context/packets.pyandmaterial_lifecycle/_validation.pyno longer carry_LOCAL_PATH_RE(that check now goes throughfind_public_safe_local_path). Resolution kept #5296's owner call and its explanatory comments verbatim, and removed only the duplicated_TOKEN_REliteral in favour of the shared import. Both files keep a net line delta of 0, which is what preserves the twoproject_registry_iocensus sites recorded for_validation.py.Validation
pytest -q tests/control_plane/test_compact_identifier_shape_owner.py— 3 passed.pytest -q tests/architecture --ignore=tests/architecture/test_semantic_production.py— 1009 passed / 0 failed (2m21s);tests/architecture/test_semantic_production.pyseparately — 34 passed.pytest -q tests/architecture/test_project_registry_io_census.py— 7 passed (needs thetypescriptdev dependency installed; run from a tree withnode_modules).pytest -q tests/capabilities tests/test_decision_context_material.pyplus the new guard — 1831 passed / 9 failed / 42 skipped (4m15s). All 9 failures are intests/capabilities/test_repository_change_window.py, which spawns theloopxconsole script; they reproduce identically (9 failed / 8 passed) on an unmodified worktree ata7e6b826aunder the same interpreter and PATH, so they are an environment artifact of this machine and not a regression from this change.examples/semantic-vocabulary-drift-smoke.py— ok. Measured counts are byte-identical between the unmodified base and this head (multi_value_twins=8/8,same_runtime_forks=11/11,conflicting_values=16/16,schema_version_same_runtime_forks=2/2), so no budget anchor moves: the three shapes were never registered as twins, and removing the duplicates does not by itself lower a budget.python -m ruff checkon all 14 changed files — all checks passed;python -m mypy(no arguments, as CI runs it) —Success: no issues found in 19 source files;git diff --check— clean.loopx check --scan-pathoverpublic_safe_text.py, the four capability packages and the new guard —errors=0,public boundary scan clean: 77 files.loopx canary premergewith the 14 changed files listed explicitly —selected=10 executed=10 failures=0 advisory_failures=0.node_modulessymlink from another worktree (after diffingpackage.jsondependencies and devDependencies field by field, identical) instead of a freshuv sync --extra test, and pointedPYTHONPATHat this tree. The commands above are what actually ran, withPYTHONPATHandPATH(Node 22.23.2) set that way.Scope
chat_action_store.py/chat_actions.py/goals/deletion_service.pyeach compile the same^[A-Za-z0-9._:-]{1,200}$, andglobal_risks.py/global_todos.py/summary_all.pyeach restate the sameSCHEMA_VERSIONvalue. Those are separate owners with different contract lifetimes and are left for their own PRs rather than folded in here.