Repository navigation
feat(uchc): add polyglot labels over stable UCNS identity #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
eeebb9f
feat(uchc): add polyglot label attachment layer
erinepshovel-code ebcc6e1
test(uchc): prove label changes preserve UCNS identity
erinepshovel-code e9a9ded
build(uchc): package polyglot relation layer
erinepshovel-code 274ab55
docs(uchc): define polyglot identity attachment boundary
erinepshovel-code f534219
docs(uchc): bind polyglot circle identity work graph
erinepshovel-code 16894f7
docs(uchc): expose shared polyglot identity layer
erinepshovel-code 30c2e72
ci(uchc): exercise polyglot package and clean install
erinepshovel-code 7f6ef1f
ci(uchc): verify polyglot labels against exact UCNS identity
erinepshovel-code 30f6fb2
fix(polyglot): bind attachments to referents
erinepshovel-code 2d3f337
test(polyglot): cover referent and scope failures
erinepshovel-code 1b695a3
fix(polyglot): keep candidate out of public wheel
erinepshovel-code cf4b77f
fix(polyglot): consume merged UCNS identity
erinepshovel-code 322859f
ci(polyglot): trigger on producer graph changes
erinepshovel-code 9e1446b
docs(polyglot): bind producer usage guidance
erinepshovel-code File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| # Usage: verifies that UCHC label attachments consume one exact UCNS | ||
| # axis-circle identity without reimplementing geometry or asserting translation. | ||
| name: Polyglot identity integration | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: ['shared/polyglot/**', 'docs/POLYGLOT.md', 'docs/work-graphs/polyglot-circle-identity-v0.json', 'pyproject.toml', '.github/workflows/polyglot-identity.yml'] | ||
| pull_request: | ||
| paths: ['shared/polyglot/**', 'docs/POLYGLOT.md', 'docs/work-graphs/polyglot-circle-identity-v0.json', 'pyproject.toml', '.github/workflows/polyglot-identity.yml'] | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| polyglot-identity: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Resolve exact producer and consumer | ||
| shell: bash | ||
| env: | ||
| SOURCE_SHA: ${{ github.sha }} | ||
| run: | | ||
| set -euo pipefail | ||
| fetch_source() { | ||
| local repository="$1" directory="$2" sha="$3" | ||
| [[ "$sha" =~ ^[0-9a-f]{40}$ ]] | ||
| git init -q "$directory" | ||
| git -C "$directory" remote add origin "https://github.com/$repository.git" | ||
| git -C "$directory" fetch --quiet --depth=1 origin "$sha" | ||
| git -C "$directory" checkout -q --detach FETCH_HEAD | ||
| test "$(git -C "$directory" rev-parse HEAD)" = "$sha" | ||
| } | ||
| fetch_source The-Interdependency/uchc source "$SOURCE_SHA" | ||
| UCNS_SHA="$(python3 - <<'PY' | ||
| import json | ||
| from pathlib import Path | ||
|
|
||
| graph = json.loads( | ||
| Path('source/docs/work-graphs/polyglot-circle-identity-v0.json').read_text( | ||
| encoding='utf-8' | ||
| ) | ||
| ) | ||
| matches = [ | ||
| row['commit'] | ||
| for row in graph['repositories'] | ||
| if row['repository'] == 'The-Interdependency/ucns' | ||
| ] | ||
| assert len(matches) == 1, matches | ||
| print(matches[0]) | ||
| PY | ||
| )" | ||
| fetch_source The-Interdependency/ucns ucns "$UCNS_SHA" | ||
| python3 -m venv .venv | ||
| .venv/bin/python -m pip install pytest==8.3.5 | ||
| - name: Run polyglot contracts | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| PYTHONPATH="$PWD/source/shared/polyglot:$PWD/ucns/src" .venv/bin/python -m pytest -q source/shared/polyglot/tests | ||
| - name: Prove rename and language attachment over one UCNS position | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| PYTHONPATH="$PWD/source/shared/polyglot:$PWD/ucns/src" .venv/bin/python - <<'PY' | ||
| from ucns import build_axis_circle_position | ||
| from uchc_polyglot import PolyglotReferent, attach_label, build_label_attachment, same_referent | ||
|
|
||
| position = build_axis_circle_position( | ||
| origin_sha256="a" * 64, | ||
| axis_count=3, | ||
| axis_ordinal=1, | ||
| ) | ||
| referent = PolyglotReferent(ucns_identity_sha256=position.identity_sha256) | ||
| heart = build_label_attachment( | ||
| ucns_identity_sha256=position.identity_sha256, | ||
| language_tag="en", | ||
| surface="heart", | ||
| scope="focus-locus", | ||
| source_id="integration:v1", | ||
| ) | ||
| before = attach_label(referent, heart) | ||
| cardiac = build_label_attachment( | ||
| ucns_identity_sha256=position.identity_sha256, | ||
| language_tag="en", | ||
| surface="cardiac", | ||
| scope="focus-locus", | ||
| source_id="integration:v2", | ||
| supersedes=heart.attachment_sha256, | ||
| ) | ||
| after = attach_label(before, cardiac) | ||
| spanish = build_label_attachment( | ||
| ucns_identity_sha256=position.identity_sha256, | ||
| language_tag="es", | ||
| surface="cardíaco", | ||
| scope="focus-locus", | ||
| source_id="integration:es", | ||
| ) | ||
| after = attach_label(after, spanish) | ||
|
|
||
| assert same_referent(before, after) | ||
| assert before.referent_identity == after.referent_identity == position.identity_sha256 | ||
| assert [x.surface for x in after.current_labels(language_tag="en")] == ["cardiac"] | ||
| assert [x.surface for x in after.current_labels(language_tag="es")] == ["cardíaco"] | ||
| PY | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # Polyglot identity layer | ||
|
|
||
| ## Purpose | ||
|
|
||
| UCHC attaches language surfaces to a stable UCNS geometric identity. | ||
|
|
||
| The referent is not a word and is not a translation pair. It is the UCNS | ||
| identity produced by the axis-circle position candidate. UCHC records language, | ||
| register/scope, provenance, and label history around that referent. | ||
|
|
||
| UCNS position identity | ||
| <- English label | ||
| <- Spanish label | ||
| <- technical label | ||
| <- historical label | ||
|
|
||
| The arrows are attachments to one referent, not pairwise equality assertions. | ||
|
|
||
| ## Rename behavior | ||
|
|
||
| A later label may supersede an earlier attachment while preserving both records. | ||
|
|
||
| Example: | ||
|
|
||
| heart -> same UCNS identity | ||
| cardiac -> same UCNS identity, supersedes heart | ||
|
|
||
| The referent identity does not change. | ||
|
|
||
| ## Multiple languages | ||
|
|
||
| Independent language implementations may attach their own surfaces: | ||
|
|
||
| cardiac (en) | ||
| cardíaco (es) | ||
| cardiaque (fr) | ||
|
|
||
| Sharing a referent does not claim that these strings have identical lexical | ||
| partitioning in every context. Language-specific construction and admission | ||
| remain owned by each language implementation. | ||
|
|
||
| ## Usage guidance | ||
|
|
||
| from uchc_polyglot import ( | ||
| PolyglotReferent, | ||
| attach_label, | ||
| build_label_attachment, | ||
| ) | ||
|
|
||
| referent = PolyglotReferent(ucns_identity_sha256=position.identity_sha256) | ||
| referent = attach_label( | ||
| referent, | ||
| build_label_attachment( | ||
| ucns_identity_sha256=position.identity_sha256, | ||
| language_tag="en", | ||
| surface="cardiac", | ||
| scope="technical", | ||
| source_id="source:example", | ||
| ), | ||
| ) | ||
|
|
||
| The caller obtains position.identity_sha256 from UCNS. UCHC does not recompute | ||
| or redefine the geometry. | ||
|
|
||
| The integration gate reads its exact UCNS producer commit from | ||
| [`polyglot-circle-identity-v0.json`](work-graphs/polyglot-circle-identity-v0.json) | ||
| rather than carrying a second version pin. The current graph consumes merged | ||
| UCNS commit `905e66964a495d7596a577bb64e4158db9465864`; update the graph and let its | ||
| path trigger the integration proof whenever that producer identity changes. | ||
|
|
||
| ## Authority boundary | ||
|
|
||
| - UCNS owns the geometric position and its identity. | ||
| - UCHC owns language-scoped attachments and their history. | ||
| - A language implementation owns its source/admission/construction evidence. | ||
| - METAPAT domain restraint prevents shared structure from silently transferring | ||
| domain-specific meaning. | ||
| - EDCM may later measure constructed outputs; it does not define the relation. | ||
|
|
||
| ## hmmm | ||
|
|
||
| Language-specific semantic partitioning, admission profiles, and evidence for | ||
| particular cross-language referent attachments remain separate work. Shared | ||
| geometric identity makes the relation representable; it does not make every | ||
| dictionary translation exact. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "schema": "the-interdependency.stack-manifest", | ||
| "version": "1.0.0", | ||
| "work_graph_sha256": "eddd8d2fd269b74a9c7999109a94406b64073f2ad142669e78557e145348998c", | ||
| "repositories": [ | ||
| { | ||
| "repository": "The-Interdependency/skill-lib", | ||
| "commit": "f94ac2e1e0089f22f20d37f3ec41a3ea37e16efa", | ||
| "authority": "reusable build/evidence discipline", | ||
| "relation": "governing skill source" | ||
| }, | ||
| { | ||
| "repository": "The-Interdependency/metapat", | ||
| "commit": "1cdfb09dd00a451cee30eec2e78624df8c682662", | ||
| "authority": "semantic/domain-restraint authority", | ||
| "relation": "conceptual boundary check" | ||
| }, | ||
| { | ||
| "repository": "The-Interdependency/ucns", | ||
| "commit": "905e66964a495d7596a577bb64e4158db9465864", | ||
| "authority": "geometric axis-circle position identity", | ||
| "relation": "producer baseline" | ||
| }, | ||
| { | ||
| "repository": "The-Interdependency/uchc", | ||
| "commit": "4ad94e92be10d2c4c875a848addfda46f3c7cfdb", | ||
| "authority": "language-hyperspace label attachments", | ||
| "relation": "consumer baseline" | ||
| } | ||
| ], | ||
| "boundaries": { | ||
| "authority_transfer": false, | ||
| "proof_status_transfer": false, | ||
| "measurement_status_transfer": false, | ||
| "semantic_mapping": "declared mapping", | ||
| "agent_scope": "cross-repository-work-graph", | ||
| "hmmm": [ | ||
| "ratification of axis-circle position as universal UCNS object identity beyond the declared candidate scope" | ||
| ] | ||
| } | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.