diff --git a/.github/workflows/english-ordinal-geometry.yml b/.github/workflows/english-ordinal-geometry.yml new file mode 100644 index 00000000..f6bab7c2 --- /dev/null +++ b/.github/workflows/english-ordinal-geometry.yml @@ -0,0 +1,62 @@ +name: English ordinal forge +on: + pull_request: + paths: ['research/english-gonol/**', '.github/workflows/english-ordinal-geometry.yml'] + push: + branches: [main] + paths: ['research/english-gonol/**', '.github/workflows/english-ordinal-geometry.yml'] +permissions: + contents: read +jobs: + ordinal-source: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - uses: actions/checkout@v7.0.1 + with: + repository: The-Interdependency/ucns + ref: ed0b0760f05cd975a7a811f8abeb70a11d09f00b + path: _deps/ucns-ordinal + persist-credentials: false + - uses: actions/setup-python@v7.0.0 + with: + python-version: '3.12.14' + - name: Verify source graph and producer + run: | + python - <<'PY' + import hashlib, json, subprocess + from pathlib import Path + graph = json.loads(Path('research/english-gonol/docs/ordinal-work-graph.json').read_text()) + payload = {key: graph[key] for key in ('repositories', 'boundaries')} + assert hashlib.sha256(json.dumps(payload, sort_keys=True, separators=(',', ':')).encode()).hexdigest() == graph['work_graph_sha256'] + producer = next(r for r in graph['repositories'] if r['repository'] == 'The-Interdependency/ucns') + assert subprocess.check_output(['git', '-C', '_deps/ucns-ordinal', 'rev-parse', 'HEAD'], text=True).strip() == producer['commit'] + assert graph['boundaries']['authority_transfer'] is False + PY + - name: Install selected UCNS producer + run: | + python -m pip install ./_deps/ucns-ordinal + python -m pip install pytest==8.3.5 PyYAML==6.0.2 + - name: Exercise native ordinal candidate + env: + PYTHONPATH: research/english-gonol + run: | + mkdir -p _state + python -m pytest -q research/english-gonol/ordinal_tests/test_ordinal_construction.py --junitxml=_state/ordinal.xml + python -m english_gonol.ordinal_construction word > _state/word.json + python - <<'PY' + import xml.etree.ElementTree as ET + suites = list(ET.parse('_state/ordinal.xml').getroot().iter('testsuite')) + totals = {key: sum(int(s.get(key, 0)) for s in suites) for key in ('tests', 'errors', 'failures', 'skipped')} + assert totals['tests'] >= 10 and totals['errors'] == totals['failures'] == totals['skipped'] == 0, totals + print(totals) + PY + - uses: actions/upload-artifact@v7.0.1 + with: + name: english-ordinal-forge + path: | + _state/ordinal.xml + _state/word.json + if-no-files-found: error diff --git a/.github/workflows/english-recursive-attachment.yml b/.github/workflows/english-recursive-attachment.yml new file mode 100644 index 00000000..b485d350 --- /dev/null +++ b/.github/workflows/english-recursive-attachment.yml @@ -0,0 +1,50 @@ +name: English recursive attachment +on: + pull_request: + paths: ['research/english-gonol/**', '.github/workflows/english-recursive-attachment.yml'] + push: + branches: [main] + paths: ['research/english-gonol/**', '.github/workflows/english-recursive-attachment.yml'] +permissions: + contents: read +jobs: + native-consumer: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - uses: actions/checkout@v7.0.1 + with: + repository: The-Interdependency/ucns + ref: 9cc00771e54336d58ee377faeec87a3a33dbd4bf + path: _deps/ucns + persist-credentials: false + - uses: actions/setup-python@v7.0.0 + with: + python-version: '3.12.14' + - name: Install exact native producer and tools + run: | + test "$(git -C _deps/ucns rev-parse HEAD)" = 9cc00771e54336d58ee377faeec87a3a33dbd4bf + python -m pip install ./_deps/ucns pytest==8.3.5 PyYAML==6.0.2 + - name: Check native consumer and graph identity + env: + PYTHONPATH: research/english-gonol + run: | + python -m pytest -c /dev/null -q research/english-gonol/ordinal_tests/test_attachment_construction.py --junitxml=attachment.xml + python - <<'PY' + import json, hashlib, xml.etree.ElementTree as E + from pathlib import Path + from english_gonol.attachment_construction import authority + graph = json.loads(Path('research/english-gonol/docs/recursive-work-graph.json').read_text()) + assert authority()['commit'] == next(r['commit'] for r in graph['repositories'] if r['repository'] == 'The-Interdependency/ucns') + assert graph['work_graph_sha256'] == hashlib.sha256(json.dumps({k: graph[k] for k in ('repositories','boundaries')}, sort_keys=True, separators=(',', ':')).encode()).hexdigest() + suites = list(E.parse('attachment.xml').getroot().iter('testsuite')) + assert sum(int(s.get('tests', 0)) for s in suites) == 7 + assert all(int(s.get(k, 0)) == 0 for s in suites for k in ('failures','errors','skipped')) + PY + - uses: actions/upload-artifact@v7.0.1 + if: always() + with: + name: english-recursive-attachment + path: attachment.xml diff --git a/STACK_MANIFEST.md b/STACK_MANIFEST.md index fd878562..07970a38 100644 --- a/STACK_MANIFEST.md +++ b/STACK_MANIFEST.md @@ -17,7 +17,7 @@ Provenance and authority-boundary record for `The-Interdependency/stack`. - English four-view complete-corpus audit UTC: `2026-09-22`, exact view source `1f9a35eb355296fc88d09784c7a3e2e95511ca31`; all 164,864 words, native and independent agreement. - Stack-manifest schema: `the-interdependency.stack-manifest` version `1.1.0` - Work-graph digest (SHA-256 over canonical `repositories` + `research_participants` + `boundaries` JSON): - `88049d2bcc65315fde82e4713a424e20b1537ff68d46b42285ce4bc0b461b3f4` + `38d0295cf7e7aa4a82aea203c5e8dad91aeb08d897bf3bf623daa3b254326213` - Weave workspace creation UTC: `2026-09-28`; new specification-first research starts from the intended multi-arity interleaving mechanism without URPCS inheritance - Pi radix workspace creation UTC: `2026-10-10`; bounded cross-base computation starts from Stack `ccf707f933a9611d7b7fe13a0417378d8b453a14` - Machine-readable copy: [`stack-manifest.json`](stack-manifest.json) @@ -280,3 +280,28 @@ sequences, retains native whole/occurrence-circle relations, uses scoped numeral references and prime-route bit partitions, and reverses the completed rounds. See `research/weave/CYCLE.md` for the explicit profile, exact source lock, bounds and all-cost accounting. This is construction/recovery, not established encryption. + +## English ordinal candidate + +The candidate remains in `research/english-gonol/`; UCHC verifies an exact extraction. +See [source provenance and usage](research/english-gonol/docs/ordinal-geometry.md). + +| Source | Exact commit | Role | +| --- | --- | --- | +| `The-Interdependency/ucns` | `ed0b0760f05cd975a7a811f8abeb70a11d09f00b` | Public Gonol and ordinal geometry; exact native producer | +| `The-Interdependency/uchc` | `c514e1a2a3f3da5ffae9ebf76d67a1d348845842` | unmerged ordinal proposal; not English implementation authority; source provenance preserved before rehoming and review repairs | +| `The-Interdependency/skill-lib` | `e46accffcb67a10630516d486c89e67f6ad19c7a` | build, extraction and review discipline; governing source; no geometry authority | + +No authority, semantic standing or graduation status transfers. + +## English recursive attachment integration + +See [recursive-stack.md](research/english-gonol/docs/recursive-stack.md). +The global libraries and historical ordinal source remain unchanged. + +| Source | Exact commit | Role | +| --- | --- | --- | +| `The-Interdependency/ucns` | `9cc00771e54336d58ee377faeec87a3a33dbd4bf` | native recursive planar attachment and exact expression geometry; exact producer; historical ordinal modules unchanged | +| `The-Interdependency/stack` | `f19389bd7b15e6540f812ec47d67274e429daec5` | English construction forge pending domain graduation; input baseline; output extraction must pin the resulting forge commit | +| `The-Interdependency/uchc` | `f2528c7f4cc182912df11b92fa355b16231b1fb5` | verified extraction consumer baseline; input baseline; candidate output identity is separate | +| `The-Interdependency/skill-lib` | `d71a3a938cb6d646ffc0b59186452117e4a37d13` | build and verification discipline; resolved governing skills; no geometry authority | diff --git a/research/english-gonol/BASE.json b/research/english-gonol/BASE.json index e80065f3..6a2c3323 100644 --- a/research/english-gonol/BASE.json +++ b/research/english-gonol/BASE.json @@ -24,5 +24,18 @@ "commit": "0873c105799681ea1f7ccb3e619d1f7aebbd85e0", "relation": "exact EDCM semantic metric-origin producer with canonical O/L split; does not refresh the historical extraction source or libs/edcm pin", "authority_transfer": false + }, + "ordinal_candidate": { + "work_graph": "docs/ordinal-work-graph.json", + "proposal_provenance": "docs/ordinal-source.json", + "authority": "Stack English implementation candidate; UCNS owns geometry", + "authority_transfer": false + }, + "recursive_attachment_candidate": { + "profile": "english.attachment/1", + "work_graph": "docs/recursive-work-graph.json", + "native_commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "authority_transfer": false, + "standing": "forward native integration; candidate bearing explicit; graduation unchanged" } } diff --git a/research/english-gonol/MIGRATION.json b/research/english-gonol/MIGRATION.json index 76ff9e22..dad993ee 100644 --- a/research/english-gonol/MIGRATION.json +++ b/research/english-gonol/MIGRATION.json @@ -116,5 +116,24 @@ "downstream_reconsumption": "hmmm: candidate wheel consumption exists, released-artifact reconsumption does not" }, "scope": "Historical 0.1.0a1 input consumer; not evidence for structural 0.1.0a2 integration" + }, + "ordinal_extension": { + "state": "stabilizing", + "source_path": "research/english-gonol/english_gonol/ordinal_construction.py", + "proposal_provenance": "docs/ordinal-source.json", + "work_graph": "docs/ordinal-work-graph.json", + "extraction_target": "The-Interdependency/uchc PR #10; exact source/test and behavior equivalence required", + "authority_transfer": false, + "hmmm": [ + "a3 clean-wheel/forge equivalence is a separate candidate gate; existing a1/a2 receipts do not verify it", + "stable publication, released-artifact reconsumption and graduation remain incomplete" + ] + }, + "recursive_attachment_candidate": { + "profile": "english.attachment/1", + "work_graph": "docs/recursive-work-graph.json", + "native_commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "authority_transfer": false, + "standing": "forward native integration; candidate bearing explicit; graduation unchanged" } } diff --git a/research/english-gonol/README.md b/research/english-gonol/README.md index 1acd36c0..7873ac41 100644 --- a/research/english-gonol/README.md +++ b/research/english-gonol/README.md @@ -1,5 +1,12 @@ # English Gonol Construction +## Ordinal candidate + +The active [recursive attachment profile](docs/recursive-stack.md) consumes +native UCNS stacks, closed compound joins and reversible origin views. +Sentences stack closed words through the same operation that stacks glyphs. +The [ordinal v1 profile](docs/ordinal-geometry.md) remains historical replay. + ## Structural profile v1 — new construction entrypoint The operator-ratified [structural profile](docs/structural-profile-v1.md) replaces diff --git a/research/english-gonol/docs/ordinal-LICENSE b/research/english-gonol/docs/ordinal-LICENSE new file mode 100644 index 00000000..c42f7f84 --- /dev/null +++ b/research/english-gonol/docs/ordinal-LICENSE @@ -0,0 +1,105 @@ +# Functional Source License, Version 1.1, ALv2 Future License + +## Abbreviation + +FSL-1.1-ALv2 + +## Notice + +Copyright 2026 Erin Spencer + +## Terms and Conditions + +### Licensor ("We") + +The party offering the Software under these Terms and Conditions. + +### The Software + +The "Software" is each version of the software that we make available under +these Terms and Conditions, as indicated by our inclusion of these Terms and +Conditions with the Software. + +### License Grant + +Subject to your compliance with this License Grant and the Patents, +Redistribution and Trademark clauses below, we hereby grant you the right to +use, copy, modify, create derivative works, publicly perform, publicly display +and redistribute the Software for any Permitted Purpose identified below. + +### Permitted Purpose + +A Permitted Purpose is any purpose other than a Competing Use. A Competing Use +means making the Software available to others in a commercial product or +service that: + +1. substitutes for the Software; + +2. substitutes for any other product or service we offer using the Software + that exists as of the date we make the Software available; or + +3. offers the same or substantially similar functionality as the Software. + +Permitted Purposes specifically include using the Software: + +1. for your internal use and access; + +2. for non-commercial education; + +3. for non-commercial research; and + +4. in connection with professional services that you provide to a licensee + using the Software in accordance with these Terms and Conditions. + +### Patents + +To the extent your use for a Permitted Purpose would necessarily infringe our +patents, the license grant above includes a license under our patents. If you +make a claim against any party that the Software infringes or contributes to +the infringement of any patent, then your patent license to the Software ends +immediately. + +### Redistribution + +The Terms and Conditions apply to all copies, modifications and derivatives of +the Software. + +If you redistribute any copies, modifications or derivatives of the Software, +you must include a copy of or a link to these Terms and Conditions and not +remove any copyright notices provided in or with the Software. + +### Disclaimer + +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR +PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT. + +IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE +SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, +EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE. + +### Trademarks + +Except for displaying the License Details and identifying us as the origin of +the Software, you have no right under these Terms and Conditions to use our +trademarks, trade names, service marks or product names. + +## Grant of Future License + +We hereby irrevocably grant you an additional license to use the Software under +the Apache License, Version 2.0 that is effective on the second anniversary of +the date we make the Software available. On or after that date, you may use the +Software under the Apache License, Version 2.0, in which case the following +will apply: + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/research/english-gonol/docs/ordinal-NOTICE b/research/english-gonol/docs/ordinal-NOTICE new file mode 100644 index 00000000..410ae7e4 --- /dev/null +++ b/research/english-gonol/docs/ordinal-NOTICE @@ -0,0 +1,17 @@ +UCHC +Copyright 2026 Erin Spencer + +This repository is licensed under the Functional Source License, Version 1.1, +ALv2 Future License (FSL-1.1-ALv2). See LICENSE. Each version converts to the +Apache License, Version 2.0 on the second anniversary of the date it is made +available. + +Prior publication under MPL-2.0: portions of the English Gonol code in this +repository were previously published under the Mozilla Public License 2.0 in +The-Interdependency/edcm (edcm/gonol.py, edcm/language/*) before moving through +The-Interdependency/stack (research/english-gonol/) into this repository. +Those portions remain available under MPL-2.0 from those earlier publications. + +Third-party input: the Open English WordNet 2025 +(globalwordnet/english-wordnet@dc343f2683279ecbb13fab4e2fd778d7b162d287) is +used as lexical evidence under the Princeton WordNet License plus CC BY 4.0. diff --git a/research/english-gonol/docs/ordinal-decisions-2026-10-27.md b/research/english-gonol/docs/ordinal-decisions-2026-10-27.md new file mode 100644 index 00000000..a6d988fe --- /dev/null +++ b/research/english-gonol/docs/ordinal-decisions-2026-10-27.md @@ -0,0 +1,282 @@ +# English ordinal decisions — 2026-10-27, clarified through 2026-10-29 + +**Standing:** Erin Spencer ratified the policy, attachment and SPACE-direction +requirements below. SPACE remaining with each glyph is a construction +assumption; a separately stored SPACE object is not a selected requirement. +Each halving represents another disk; sentences recursively stack closed words +using the same operation. The native implementation is described in +[recursive-stack.md](recursive-stack.md). A physical camera model remains open. + +## Scope and authority + +These decisions apply to forward English ordinal construction and its required +UCNS carrier/attachment support. Stack owns English admission, lexical ownership +and construction research. UCNS owns the geometric constructor and exact angles. +UCHC consumes a verified extraction. No geometry, proof, measurement or release +standing transfers between those roles. + +Here, **definition origin** means the local attachment belonging to the source +lexical construction. It does not mean a grammatical head word, semantic cause, +or a new physical coordinate law. **Rebasing** means assigning bearings under a +new explicitly identified carrier version; it does not edit old receipts. + +## Ratification and selected requirements + +The preceding answer offered a probable and an alternative answer for each row. +Erin replied: “the probable answer. the probable answer. the alternative answer.” +The positional mapping is: + +| Question | Ratified requirement | Other option from that question | +|---|---|---| +| What determines a closed word's bearing in its parent frame? | Derive it from the closed construction and SPACE attachment. | A separately defined word carrier was not chosen. | +| Who owns the definition origin for a multiword lexical entry? | The whole closed lexical construction, retaining its constituent relations. | Attachment to an explicitly selected constituent was not chosen. | +| May expanding the Public Gonol change existing glyph bearings? | Permit rebasing in a new version with new construction receipts. | Preserving existing bearings during expansion is not a requirement. | + +This ratification is scoped to these requirements. It does not select an +unstated formula, glyph ordering, carrier inventory, or executable candidate. +The third choice permits changed bearings; it does not require every bearing +to change. The existing 157-position artifact and its digest retain their exact +historical identity. New constructions must identify the new carrier version. + +SPACE already supplies attachment between nested frames and multiword lexical +definition attachment. The new ownership decision applies that attachment to +the whole source lexical construction. Ordered constituents, punctuation, +multiplicity, sense/synset provenance and successive-definition relations remain +recoverable. Selecting one constituent silently would violate this decision. + +## Compound joining clarification + +Erin specified: “bull + shit the 'l' in bull becomes the space that the 's' in +shit sits on.” When asked about distance, Erin clarified: “distance is +unchanged, this preserves the compound joining. the angle changes, +demonstrating the join”. + +For this explicitly declared compound join: + +- The terminal `l` occurrence in `bull` supplies the local SPACE attachment + reference for `shit`. This means the second `l` occurrence, not every + occurrence of the shared glyph identity. +- `s` retains its established ordinal radial distance in the incoming local + frame. The join changes that frame's attachment and angular placement. +- Compound joining preserves established radial distances and the recoverable + interiors of the component constructions. It is a separate operation from + appending glyphs with successive radial halving. +- The terminal occurrence keeps its identity and participation in `bull` while + serving the SPACE role at this join. It is not deleted or relabeled globally. +- The compound relation must retain its declared component boundary and order. + This example does not authorize automatic splitting of arbitrary words or + applying the rule to every ordinary inter-word SPACE. + +The symbolic invariant is `local_radius_after_join == local_radius_before_join`. +The 2026-10-28 origin-at-attachment clarification below fixes the local-frame +reading of that invariant. Distances measured from a different parent origin +need not stay unchanged. `s` has its retained nonzero local radius; making the +terminal `l` the incoming origin does not place `s` on top of that `l`. + +### Superseded complete-join interpretation + +The earlier angular-reference formula at +`c17ed27a935a5583880f2a29d79f9152f2362ea3` kept all spatial origins together. +Its exact-turn angle shift remains useful as a projected view, but an +angle-only shared-origin drawing is not the complete origin-at-attachment +construction now requested. The earlier projections and receipts retain their +historical scope; they do not verify the forward transport or SPACE assumption. + +## SPACE direction and persistence — clarified 2026-10-29 + +### Domain-bound meanings + +These records scope the operative terms before attaching conversational +provenance. They concern forward UCNS geometry consumed by English research; +Stack records the requirements and assumptions without acquiring UCNS authority. + +| Field | Retained SPACE | Superposition | +|---|---|---| +| Surface form | SPACE, SPACE storage | super positioned with the glyph | +| Term id | `ucns.ordinal_attachment.retained_space` | `ucns.ordinal_attachment.space_glyph_superposition` | +| Claiming domain | UCNS construction/frame geometry | UCNS construction/frame geometry | +| Claimed sense | A glyph begins as SPACE; its underlying SPACE and frame reference remain assumed in the construction after placement. | SPACE and the glyph coexist in the construction's interpretation. | +| Scope | Forward glyph and word attachments in this record. | The same forward construction scope. | +| Claim type / status | Specialized / construction assumption; storage representation open. | Specialized / construction assumption; storage representation open. | +| Included uses | Preserving or deriving the occurrence's SPACE role, origin, direction and attachment relation. | Interpreting glyph placement without erasing the underlying SPACE role. | +| Excluded uses | Automatically inserting a literal U+0020; requiring an additional stored object or field merely because the assumption is present. | Destructive conceptual replacement of SPACE; an extra sequential text character; an undeclared arithmetic operation. | +| Neighbors | Public Gonol SPACE position, literal SPACE seam, local origin, local zero-angle direction, definition origin. | Retained interior, glyph identity, occurrence, rendering and storage representation. | +| Known collisions / resolution | Literal text SPACE and the geometric SPACE role remain distinct; the literal-SPACE admission rule is unchanged. | Conceptual coexistence does not itself prescribe separate allocation, serialization or object identity. | +| Effective version | 2026-10-29 clarification | 2026-10-29 clarification | +| Supersedes | The assistant's 2026-10-28 claim that every SPACE support must be stored explicitly. | The assistant's promotion of conceptual coexistence into mandatory native storage. | +| Authority source | The operator statements and accepted antecedent below. | The operator statements below. | +| Handle identity | Not applicable. | Not applicable. | +| Unresolved | Which relations are implicit, derived or stored; exact native frame transport. | Representation and verification of the assumption without prescribing redundant records. | + +### Accepted direction and corrected storage interpretation + +Erin stated: “origin at the attachment is definitely a thing for words.” + +The proposed SPACE-direction rule was: the preceding letter's placement +direction becomes the next frame's SPACE direction; the next glyph's carrier +angle is measured relative to that inherited direction. Erin then replied: + +> I agree with your space direction rule; every glyph begins as space; the storage never goes away but instead it's super positioned with the glyph + +The assistant interpreted this as requiring explicit per-occurrence SPACE +storage. Erin corrected that interpretation on 2026-10-29: + +> I'm not sure it's required to store such; but the assumption is there. + +The correction changes the representation claim, without withdrawing the +accepted word attachment or direction rule: + +1. A word's local origin is at its declared attachment. For the declared + `bull + shit` join, the second `l` occurrence supplies the incoming SPACE + attachment, while the whole closed lexical construction retains definition + ownership. +2. The preceding placed letter's direction supplies the next frame's SPACE + direction. A point alone is not the angular datum: both location and oriented + SPACE reference must be available, whether stored or derived. +3. Every glyph beginning as SPACE, with SPACE remaining alongside it, is the + working construction assumption. This does not require a separately stored + SPACE object, a particular field, or preserving a runtime object's identity. + An implicit or derived representation remains admissible if it supplies the + declared relations without guessing. +4. Preserve individual occurrences, including repeated glyphs, their order, + attachments and closed interiors. A display may emphasize the glyph while + leaving the assumed SPACE role implicit. +5. Keep glyph-building halving distinct from joining already closed components. + Appending a glyph follows the declared ordinal halving rule; the compound + join preserves the components' established local radii. + +The direction rule is selected and implemented by the native attachment profile. +Explicit SPACE storage is not an additional acceptance gate. + +### Directional consequence and view contract + +Let `theta_i` be occurrence i's exact carrier turn relative to its own SPACE, +and let `space_heading_i` express that SPACE direction in a common planar +orientation. The accepted direction rule gives, modulo one turn: + +```text +placed_heading_i = space_heading_i + theta_i +space_heading_(i+1) = placed_heading_i +``` + +The first SPACE heading comes from the word's declared attachment frame. +Repeated glyphs retain the same local carrier turn while their parent-frame +headings can differ. This does not change the historical carrier or its old +receipts. + +A planar display can express a placement as +`point_i = origin_i + local_radius_i * unit(placed_heading_i)`. +This equation neither defines a depth projection nor supplies missing native +cross-frame transport or further sheet/lift behavior. Origins, orientations and +attachment sites must be available from the construction; this does not require +storing each as a separate field. + +The common-origin concentric view and the view retaining individual origins +are proposed views of one construction. Their correspondence must recover the +ordered occurrences, local radii, local carrier turns and attachment/frame +relations consistently with the SPACE assumption. Coincident rendered points +must not merge occurrences. Exact derivation from sufficient construction data +is allowed. A flattened drawing is insufficient if it loses required relations. +Coordinate-only round trips do not establish native implementation. + +### Recursive disk-stack rule — clarified 2026-10-29 + +Erin specified: “each halving represents another disk.” The clarified sentence +rule is: “from words, sentences stack like glyphs into words.” This settles the +recursive operation. For `n` participants, zero-based occurrence `i` has disk +depth `n-i` and parent radius `R / 2**(n-i)`. Appending a participant halves the +earlier parent radii and advances their depths. A closed child's internal +geometry is retained; a word is one participant in its parent stack. + +The common-origin view shows each ordered ray from the root; the attached-origin +view places each origin at the preceding endpoint. Both retain the root SPACE +orientation. They express the same construction and need not be congruent. + +The exact functional deriving a closed word's bearing was not specified. +The implementation exposes root-to-endpoint and final accumulated heading as +explicit comparison candidates, without a default. This narrow remaining choice +does not reopen whether sentences use the recursive stack. A physical observer +projection or camera law is not required to implement the selected recurrence. + +### Representation-neutral verification + +Native validation must establish: + +- the inherited SPACE direction and exact local carrier turn at each occurrence; +- local radii under both glyph appending and closed-component joining; +- distinguishable repeated occurrences and their attachment relations; +- recovery through both proposed views for the declared representation; +- preservation of required information through nesting and serialization, + with a new versioned receipt for changed geometry. + +Fail if required relations cannot be recovered, if SPACE is silently inserted +as an extra text occurrence, if selected direction inheritance resets to global +zero, or if an old receipt is reused for a changed construction. Absence of a +separate SPACE record is not by itself a failure. Physical projection claims require their own specified camera model and checks. + +## Historical source inspection before native integration + +The inspected inputs are: + +| Repository | Exact revision | Role | +|---|---|---| +| The-Interdependency/skill-lib | `e46accffcb67a10630516d486c89e67f6ad19c7a` | Construction, scoped ratification and provenance discipline | +| The-Interdependency/ucns | `ed0b0760f05cd975a7a811f8abeb70a11d09f00b` | Native ordinal constructor and current Public Gonol | +| The-Interdependency/stack | `c8bddd5ae02fdaa001c2ba6962da66117384437e` | English candidate implementation before this decision record | +| The-Interdependency/uchc | `27796465cfb5f68497e63aa1a10cf5c0c6d91b19` | Verified extraction and isolated acceptance commands | + +At that UCNS revision, `Participant.closed(carrier, interior)` requires an +explicit carrier. `Placement.turn` obtains the angle from that carrier. Neither +derives a parent bearing from the closed interior or its SPACE attachment. +The clarified requirements select the terminal attachment and inherited SPACE +direction; SPACE persistence remains an assumption with representation open. +They do not collapse the whole word into its terminal glyph. Centroid, hash, +lexical-index and shared-zero substitutions remain unauthorized. + +The inspected ordinal implementation stores `Construction.origin` as a string +and each `Participant` as a carrier/identity with an optional closed interior. +No separate initial-SPACE object per primitive occurrence is represented. +That absence alone does not violate the clarified assumption. The inspected +source does not implement the selected inherited per-occurrence orientation +and attachment transport; a word-level `origin='SPACE'` label does not +establish those behaviors. + +The sealed historical structural profile returns +`hmmm:compound-lexical-origin` for the 57,155 affected definition records in its +sealed complete-corpus evidence. The forward recursive profile overlays a typed whole lexical owner and audits +every definition. It does not retrospectively change those rows or receipts. + +## Implementation and failure conditions + +1. Implement the selected attachment and inherited SPACE direction in UCNS, + consistently with the SPACE assumption. Choose stored or derived relations + only as needed by the representation. English supplies declared relations + and consumes that geometry. Verify the terminal occurrence, unchanged + compound local radii, correct directional composition and both component + interiors. Fail on radial recontraction, a wrong repeated occurrence, + unrecoverable relations/boundaries, or reuse of an old receipt for changed + placements. Do not substitute an unrelated word carrier. +2. Represent the whole closed lexical owner in the forward English profile. + Preserve each constituent and each original definition relation; never pass + a lexical-entry identifier off as a word identifier. Verify all affected + definitions against the complete source and replay the resulting receipts. +3. Declare the expanded carrier's admitted inventory, ordering and SPACE datum. + Give it a distinct version and receipt. Reconstruct consumers against that + version; reject receipt/version substitution and silent reinterpretation of + constructions made with the old carrier. + +Completion requires executable source and exact replay for the declared scope. +It fails if a chosen policy is reported as implemented, an unresolved numerical +rule is invented, constituent information disappears, or old receipts are +silently relabeled. Rollback selects an explicitly identified prior profile; +it does not reverse this ratification or erase historical evidence. + +## hmmm + +- Select the precise construction-derived closed-word bearing functional. +- Numerical definition attachment, beyond the implemented typed lexical owner. +- Native sheet/lift behavior and any physical observer projection. +- Exact expanded carrier inventory/order and versioned reconstruction. +- Hosted verification, stable publication and domain graduation. + +GPT generated; context, prompt Erin Spencer. diff --git a/research/english-gonol/docs/ordinal-geometry.md b/research/english-gonol/docs/ordinal-geometry.md new file mode 100644 index 00000000..acd05e6e --- /dev/null +++ b/research/english-gonol/docs/ordinal-geometry.md @@ -0,0 +1,78 @@ +# Historical English ordinal v1 profile + +Forward construction uses [recursive attachment](recursive-stack.md). The +`english.ordinal/1` interface and its SPACE-seam partial results remain historical +replay behavior. Sentence stacking is specified; new frame transport is implemented. +The implementation-pending statements below describe that older profile only. + +Stack owns this candidate's English implementation and public-contract research. +UCNS owns its Public Gonol carrier, ordinal geometry, native objects and receipts. +UCHC may carry a verified extraction while the domain remains ungraduated. + +The candidate originated in UCHC PR #10 at +`c514e1a2a3f3da5ffae9ebf76d67a1d348845842`. That proposal lacked the required +Stack source. This repair establishes the source here and preserves the proposal's +identity in [ordinal-source.json](ordinal-source.json); it does not pretend the +proposal originally came from Stack. Copied source retains FSL-1.1-ALv2 terms. +The [input graph](ordinal-work-graph.json) records exact upstream identities. + +## Usage and construction + +Install UCNS from the graph's exact producer and run from this workspace: + +```bash +python -m english_gonol.ordinal_construction word +python -m pytest -q ordinal_tests/test_ordinal_construction.py +UCHC_STRUCTURAL_FIELD=/path/to/verified/complete/field \ + python -m pytest -q ordinal_tests/test_ordinal_corpus.py +``` + +The Public Gonol supplies angles relative to SPACE. Appending a glyph places it +at R/2 and halves earlier occurrences: `word` ends at R/16, R/8, R/4, R/2. +Only UCNS computes those placements. Missing bearings refuse; SPACE-spanning +queries retain word interiors and explicitly leave their parent frame unresolved. +Every returned word/interior carries the verified UCNS producer identities. + +The [decisions, clarified through 2026-10-29](ordinal-decisions-2026-10-27.md) +select construction-derived parent bearing through SPACE, whole-lexical +definition ownership, and permission to rebase bearings in a new carrier version. +Word origins sit at their attachments; the preceding placed letter's direction +becomes the next frame's SPACE direction. Every glyph beginning as SPACE, with +SPACE remaining alongside it, is a construction assumption. This does not +require a separately stored SPACE object; relations may be implicit or derived. + +For the declared compound join, established component-local radii remain +unchanged. Native frame transport, reversible views and the expanded carrier +specification remain open implementation work. The disk-stack picture is a +proposed depth interpretation; projection and the meaning of the changing angle +are unresolved. The executable candidate above does not implement the selected +inherited direction and attachment transport. + +## Extraction and verification + +Make implementation changes here first. UCHC pins an exact Stack commit and +checks source/test SHA-256 values plus the existing structural import closure. +Its ordinal workflow runs Stack source tests and compares Stack, UCHC source, +and clean-wheel CLI results. Its structural workflow reuses the complete corpus +to run the same detached-interior regression against Stack and the installed +wheel, then compares the actual SPACE-seam output. + +`ordinal_tests/` is a separate suite because it requires the selected UCNS +ordinal package, while historical English suites retain their own producer pins. +The dedicated Stack workflow fails on errors or skipped ordinal tests. A passed +candidate extraction does not transfer authority or publish a stable release. + +Rollback removes this optional candidate and its dedicated workflow together; +retain the original proposal identity and sealed historical corpus evidence. +No AHBG lock, historical English receipt, or global `libs/ucns` pin changes. + +## hmmm + +- Expanded carrier inventory/order and bearings for missing Unicode scalars; + rebasing in a new version is authorized by the linked decision. +- Native inherited direction/attachment transport and reversible common-origin/ + local-origin views; implementation and verification remain pending. +- The SPACE assumption's representation may be implicit or derived. Separate + storage is not required. The proposed disk-stack projection remains open. +- Whole-lexical-owner implementation and full-corpus replay; ownership is chosen. +- Stable publication, released-artifact reconsumption and domain graduation. diff --git a/research/english-gonol/docs/ordinal-source.json b/research/english-gonol/docs/ordinal-source.json new file mode 100644 index 00000000..1a28acb9 --- /dev/null +++ b/research/english-gonol/docs/ordinal-source.json @@ -0,0 +1,27 @@ +{ + "schema": "english.ordinal-proposal-provenance", + "version": "1.0.0", + "origin_repository": "The-Interdependency/uchc", + "origin_commit": "c514e1a2a3f3da5ffae9ebf76d67a1d348845842", + "origin_pull_request": 10, + "forge_repository": "The-Interdependency/stack", + "forge_root": "research/english-gonol", + "files": [ + { + "original_path": "human/english/english_gonol/ordinal_construction.py", + "forge_path": "english_gonol/ordinal_construction.py", + "original_sha256": "78035a5b320153e5f72de5751d9e134cfb8125f3d70919290811e4f37ff579f2" + }, + { + "original_path": "tests/test_ordinal_construction.py", + "forge_path": "ordinal_tests/test_ordinal_construction.py", + "original_sha256": "e6e405164b2f255bc1d3bef9c2c94f793373aff077b43f9fd334777558ff7961" + } + ], + "license": "FSL-1.1-ALv2; original LICENSE and NOTICE copied beside this record", + "authority_transfer": false, + "standing": "original proposal rehomed in its existing Stack forge, with review repairs; not a claim of historical Stack authorship", + "hmmm": [ + "UCHC extraction must pin the resulting Stack commit and verify repaired source/test bytes; release and graduation remain separate." + ] +} diff --git a/research/english-gonol/docs/ordinal-work-graph.json b/research/english-gonol/docs/ordinal-work-graph.json new file mode 100644 index 00000000..1b99d073 --- /dev/null +++ b/research/english-gonol/docs/ordinal-work-graph.json @@ -0,0 +1,42 @@ +{ + "schema": "the-interdependency.stack-manifest", + "version": "1.0.0", + "repositories": [ + { + "repository": "The-Interdependency/ucns", + "commit": "ed0b0760f05cd975a7a811f8abeb70a11d09f00b", + "authority": "Public Gonol and ordinal geometry", + "relation": "exact native producer" + }, + { + "repository": "The-Interdependency/stack", + "commit": "9de81c67b271df09c1d9ba5422660c96fe8af7ac", + "authority": "English construction forge pending UCHC graduation", + "relation": "starting forge baseline; this change adds the ordinal candidate" + }, + { + "repository": "The-Interdependency/uchc", + "commit": "c514e1a2a3f3da5ffae9ebf76d67a1d348845842", + "authority": "unmerged ordinal proposal; not English implementation authority", + "relation": "source provenance preserved before rehoming and review repairs" + }, + { + "repository": "The-Interdependency/skill-lib", + "commit": "e46accffcb67a10630516d486c89e67f6ad19c7a", + "authority": "build, extraction and review discipline", + "relation": "governing source; no geometry authority" + } + ], + "boundaries": { + "authority_transfer": false, + "proof_status_transfer": false, + "measurement_status_transfer": false, + "semantic_mapping": "UCNS defines geometry; Stack owns the English candidate; UCHC may verify an extraction.", + "agent_scope": "english-ordinal-review-repair", + "hmmm": [ + "Missing Public Gonol bearings and higher word frames remain unresolved.", + "Verified extraction is not stable publication, released-artifact reconsumption or domain graduation." + ] + }, + "work_graph_sha256": "7cbf5bbef94a934731a5d5fee73af627f3466388692ec37b246e1ce09c0c9078" +} diff --git a/research/english-gonol/docs/recursive-stack.md b/research/english-gonol/docs/recursive-stack.md new file mode 100644 index 00000000..0877c023 --- /dev/null +++ b/research/english-gonol/docs/recursive-stack.md @@ -0,0 +1,100 @@ +# Recursive attachment profile + +GPT generated; context, prompt Erin Spencer. + +`english.attachment/1` applies the same native UCNS stack to glyphs within words +and closed words within sentences. Compound joining is a separate native rigid +attachment: it preserves the components' local radii and retains their boundary. +The declared `bull + shit` join attaches at the second `l`; the resulting closed +compound can itself participate in a parent stack. + +Stack owns English admission and source relations. UCNS owns all geometry. +UCHC must extract this source and tests at an exact Stack commit. The +[input work graph](recursive-work-graph.json) records the starting baselines; +its Stack baseline is not the eventual extraction commit. Graduation is unchanged. + +## Exact construction and views + +With `n` participants, occurrence `i` has depth `n-i`, radius `R/2**(n-i)` and +the previous placed heading as its SPACE direction. Its origin is the preceding +endpoint. Appending halves the earlier parent geometry and advances disk depths. +Closed interiors keep their own local geometry, order, repeated occurrences and +source identities. No separate stored SPACE object is required. + +The common-origin view retains ordered rays from the root; the attached-origin +view uses their prefix sums. Exact differences recover the original rays. +Both serialize the root location and SPACE orientation. These views need not be +congruent. Graph replay retains carriers, shared child references and every +occurrence; it rejects receipt, root, carrier and relationship mutations. + +Native coordinates are exact constructive expressions. Expression identity is +not a complete geometric-equivalence test. Floating display is explicitly lossy +and refuses detected underflow/collapse; it does not supply construction receipts. +No physical camera or sheet-lift law is asserted. + +## Explicit bearing candidates + +The recursive operation is specified. The exact functional deriving a closed +word's bearing remains unselected; neither candidate has a default: + +| Candidate | Bearing supplied to the parent | Boundary | +| --- | --- | --- | +| `root-endpoint-v1` | Direction from the child's root to its endpoint | Requires a proved nonzero endpoint; unsupported nonzero proofs refuse | +| `exit-heading-v1` | Final accumulated heading within the child | Distinct interiors can share this bearing; interiors remain retained | + +Comparing these candidates does not introduce an alternative sentence-distance +rule. Native stacks have a nonzero endpoint by strict last-ray dominance. A +compound join need not; native exact zero/unknown checks prevent undefined +endpoint normalization. A bearing is an orientation, not a unique word identity. + +## Usage + +Install UCNS at `9cc00771e54336d58ee377faeec87a3a33dbd4bf`; the consumer verifies +the exact four source blobs before construction. From the English forge: + +```bash +python -m english_gonol.attachment_construction word bull +python -m english_gonol.attachment_construction compound bull shit +python -m english_gonol.attachment_construction sequence bull shit --bearing root-endpoint-v1 +python -m pytest -c /dev/null ordinal_tests/test_attachment_construction.py +UCHC_STRUCTURAL_FIELD=/path/to/complete/field python -m pytest -c /dev/null ordinal_tests/test_attachment_corpus.py +python -m english_gonol.attachment_audit /path/to/complete/field --expect experiments/recursive-attachment-v1/corpus-audit.json +``` + +CLI sequence arguments declare word boundaries; they do not infer sentence +closure. `RecursiveStructuralField.compose(..., relation='sentence')` preserves +the existing structural closure gate. Source queries retain all punctuation, +SPACE events, offsets and word occurrences. The parent geometry's scope is +ordered closed-word placement; it does not invent punctuation function geometry. +Without a bearing, it returns retained word interiors and the narrow partial +`CLOSED_WORD_BEARING_POLICY_REQUIRED`. + +`definition()` overlays a typed whole lexical owner, including all components +and provenance, and retains the historical origin separately. A lexical record +ID is never passed as a word ID. This fixes logical ownership; numerical +definition attachment is still open. Historical database bytes and receipts +are not rewritten. Historical word geometry is explicitly qualified under +`historical_structural_geometry` when the new profile returns a word. + +## Evidence and remaining scope + +The native full outcome gate passes 303 tests, including 24,336 non-SPACE glyph +pairs against an independent cyclotomic oracle, recursive candidate bindings, +graph/view mutation controls and 1,100-level nesting. An independent review +checked attachment closure and the PID-namespace supervisor repair required by +the gate. Consumer checks cover actual native imports, drift/refusal boundaries, +compound replay, shared interiors, and complete-corpus sentence closure. + +The complete corpus audit visits every word and definition, checking retained +parts, source succession and typed lexical ownership. Its deterministic stream +digests can be compared across forge and installed consumer. Read the adjacent +experiment evidence for executed counts and exact producer identities. +Acceptance also requires the complete report to match the preserved census via +`--expect`; two equally regressed consumers do not pass. Optimized Python (`-O` +or `PYTHONOPTIMIZE`) is refused because it disables verification assertions. + +**hmmm:** select the closed-word bearing functional; numerical definition +attachment; expanded carrier inventory/order; punctuation geometry and sheet +lift; hosted CI, stable publication, released-artifact reconsumption and domain +graduation. Historical ordinal and structural profiles remain explicit replay +interfaces. Rollback selects those versioned profiles without changing receipts. diff --git a/research/english-gonol/docs/recursive-work-graph.json b/research/english-gonol/docs/recursive-work-graph.json new file mode 100644 index 00000000..9b7e27ef --- /dev/null +++ b/research/english-gonol/docs/recursive-work-graph.json @@ -0,0 +1,42 @@ +{ + "schema": "the-interdependency.stack-manifest", + "version": "1.0.0", + "repositories": [ + { + "repository": "The-Interdependency/ucns", + "commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "authority": "native recursive planar attachment and exact expression geometry", + "relation": "exact producer; historical ordinal modules unchanged" + }, + { + "repository": "The-Interdependency/stack", + "commit": "f19389bd7b15e6540f812ec47d67274e429daec5", + "authority": "English construction forge pending domain graduation", + "relation": "input baseline; output extraction must pin the resulting forge commit" + }, + { + "repository": "The-Interdependency/uchc", + "commit": "f2528c7f4cc182912df11b92fa355b16231b1fb5", + "authority": "verified extraction consumer baseline", + "relation": "input baseline; candidate output identity is separate" + }, + { + "repository": "The-Interdependency/skill-lib", + "commit": "d71a3a938cb6d646ffc0b59186452117e4a37d13", + "authority": "build and verification discipline", + "relation": "resolved governing skills; no geometry authority" + } + ], + "boundaries": { + "authority_transfer": false, + "proof_status_transfer": false, + "measurement_status_transfer": false, + "semantic_mapping": "UCNS owns geometry; Stack owns English; UCHC verifies extraction.", + "agent_scope": "english-recursive-attachment", + "hmmm": [ + "Closed bearing functional remains unselected; recursive stack operation is specified.", + "Numerical definition attachment, expanded carrier, sheet lift and graduation remain open." + ] + }, + "work_graph_sha256": "ba6ce1f1d3586d06c6eb8027958db8f43097a629e47c7cb79148bf6b4e048fbf" +} diff --git a/research/english-gonol/english_gonol/attachment_audit.py b/research/english-gonol/english_gonol/attachment_audit.py new file mode 100644 index 00000000..9262618a --- /dev/null +++ b/research/english-gonol/english_gonol/attachment_audit.py @@ -0,0 +1,125 @@ +# ratios: loc_comments=76:37 imports_exports=8:3 calls_definitions=38:3 +# SPDX-License-Identifier: FSL-1.1-ALv2 +# Copyright 2026 Erin Spencer +# === MODULE_BUILD === +# id: english_attachment_complete_audit +# module_name: attachment_audit +# module_kind: verification-tool +# summary: complete forward word and typed lexical ownership census over a verified corpus +# owner: Erin Spencer +# public_surface: audit, verify_report, main +# internal_surface: ordered stream digests +# auth_boundary: verified structural field and pinned native modules +# storage_boundary: corpus read-only; JSON report to stdout +# network_boundary: none +# user_data_boundary: public corpus only +# admin_only: false +# tests: complete-corpus execution and source/installed report equality +# rollout: additive attachment profile evidence +# rollback: preserve historical structural profile +# requires: english_recursive_attachment_consumer +# unresolved: candidate bearing selection and numerical definition attachment +# === END MODULE_BUILD === +# === CONTRACTS === +# id: english_attachment_complete_census +# given: a verified complete structural corpus +# then: every word is reconstructed or explicitly refused and every definition retains its whole lexical owner, constituents and source succession +# id: english_attachment_census_baseline +# given: an observed census and an explicitly supplied preserved baseline +# then: refuse any changed result even when forge and installed outputs agree; refuse optimized execution that disables the audit assertions +# === END CONTRACTS === +"""GPT generated; context, prompt Erin Spencer. + +Usage: python -m english_gonol.attachment_audit /path/to/structural-field + --expect experiments/recursive-attachment-v1/corpus-audit.json +This finite complete audit has no sampling or scientific runtime cutoff. +Stream hashes bind ordered results without retaining a second corpus in memory. +Omit --expect only for a new observation, never for baseline acceptance. +""" +import argparse +from collections import Counter +import hashlib +import json +from pathlib import Path + +from english_gonol.attachment_construction import RecursiveStructuralField, authority +from english_gonol.ordinal_construction import OrdinalGeometryError +from english_gonol.structural_rules import digest + + +def audit(path): + if not __debug__: + raise RuntimeError('OPTIMIZED_AUDIT_FORBIDDEN: verification requires assertions') + counts, refusals = Counter(), Counter() + words_hash, definitions_hash = hashlib.sha256(), hashlib.sha256() + with RecursiveStructuralField(path) as field: + if not field.complete_corpus: + raise ValueError('COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL') + for wid, surface in field.db.execute('SELECT id,surface FROM words ORDER BY id'): + counts['words'] += 1 + try: + obj = field._closed_word(surface, wid) + except OrdinalGeometryError as exc: + if exc.code != 'PUBLIC_GONOL_ANGLE_UNAVAILABLE': + raise + counts['refused_words'] += 1 + refusals.update(exc.glyphs) + record = {'word_id': wid, 'surface': surface, 'code': exc.code, 'glyphs': list(exc.glyphs)} + else: + assert obj.recover() == tuple(surface) + assert [obj.depth(i) for i in range(len(surface))] == list(range(len(surface), 0, -1)) + counts['constructed_words'] += 1 + record = {'word_id': wid, 'construction': obj.record()} + words_hash.update((digest(record) + '\n').encode()) + for rid, text, owner, ordinal, previous, provenance, old_state in field.db.execute( + "SELECT id,text,owner_record_id,ordinal,previous_definition_id,provenance,origin_state FROM records WHERE kind='definition' ORDER BY id"): + result = field.definition(rid) + lexical = result['lexical_owner'] + assert lexical['record_id'] == owner and lexical['kind'] == 'lexical-construction' + assert result['text'] == text and result['provenance'] == json.loads(provenance) + assert result['definition_succession'] == {'ordinal': ordinal, 'previous': previous} + for source_id, source_text, parts in ((rid, text, result['parts']), (owner, lexical['text'], lexical['parts'])): + source_parts = list(field.db.execute( + 'SELECT ordinal,kind,word_id,character_id,start_offset,end_offset,function FROM components WHERE record_id=? ORDER BY ordinal', (source_id,))) + assert len(source_parts) == len(parts) + for part, row in zip(parts, source_parts): + n, kind, wid, cid, start, end, function = row + assert part == {'ordinal': n, 'kind': kind, 'identity': wid if kind == 'word' else cid, + 'start': start, 'end': end, 'function': json.loads(function)} + assert ''.join(source_text[p['start']:p['end']] for p in parts) == source_text + assert len(result['constituent_direct']) == len(result['parts']) + assert all(p['owner'] == result['origin'] for p in result['constituent_direct']) + counts['definitions'] += 1 + counts['formerly_compound_definitions'] += int(old_state == 'hmmm:compound-lexical-origin') + definitions_hash.update((result['attachment_receipt'] + '\n').encode()) + assert counts['words'] == field.db.execute('SELECT count(*) FROM words').fetchone()[0] + result = {'schema': 'english.attachment-corpus-audit.v1', 'geometry_authority': authority(), + 'field_receipt': field._field_receipt, 'counts': dict(counts), + 'unplaced_glyph_word_counts': dict(sorted(refusals.items())), + 'word_stream_sha256': words_hash.hexdigest(), 'definition_stream_sha256': definitions_hash.hexdigest(), + 'scope': 'all corpus words and all definition ownership overlays; no bearing candidate selected', + 'hmmm': ['Numerical definition attachment and bearing selection remain open.']} + return {**result, 'receipt': digest(result)} + + +def verify_report(observed, expected): + """Bind the whole census, including exclusions, provenance and stream identities.""" + if digest(observed) != digest(expected): + raise ValueError('CENSUS_BASELINE_MISMATCH') + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('field') + parser.add_argument('--expect', type=Path, help='require the complete preserved census JSON') + args = parser.parse_args() + expected = json.loads(args.expect.read_text()) if args.expect else None + result = audit(args.field) + if args.expect is not None: + verify_report(result, expected) + print(json.dumps(result, sort_keys=True, ensure_ascii=False, indent=2)) + + +if __name__ == '__main__': + main() +# ratios: loc_comments=76:37 imports_exports=8:3 calls_definitions=38:3 diff --git a/research/english-gonol/english_gonol/attachment_construction.py b/research/english-gonol/english_gonol/attachment_construction.py new file mode 100644 index 00000000..4b10066b --- /dev/null +++ b/research/english-gonol/english_gonol/attachment_construction.py @@ -0,0 +1,322 @@ +# ratios: loc_comments=230:54 imports_exports=9:9 calls_definitions=103:17 +# SPDX-License-Identifier: FSL-1.1-ALv2 +# Copyright 2026 Erin Spencer +# === MODULE_BUILD === +# id: english_recursive_attachment_consumer +# module_name: attachment_construction +# module_kind: adapter +# summary: English admission and lexical ownership consuming native recursive UCNS stacks +# owner: Erin Spencer +# public_surface: construct_word, construct_sequence, construct_compound, replay_compound, word_record, RecursiveStructuralField, main +# internal_surface: exact producer integrity and language-only relation records +# auth_boundary: exact UCNS modules and verified corpus; integrity is not authentication +# storage_boundary: read-only structural field; caller owns returned records +# network_boundary: none +# user_data_boundary: query text remains local +# admin_only: false +# tests: ordinal_tests/test_attachment_construction.py, ordinal_tests/test_attachment_corpus.py +# rollout: explicit recursive-stack profile; historical structural and ordinal replay remain versioned +# rollback: select historical profile explicitly; never reinterpret an existing receipt +# requires: ucns_attachment_stack, ucns_attachment_codec, english_structural_profile +# unresolved: exact closed-word bearing selection, non-Public-Gonol admission and punctuation geometric operations +# === END MODULE_BUILD === +# === CONTRACTS === +# id: english_attachment_native_authority +# given: an admitted word or explicitly bound sequence +# then: all coordinates, headings, halvings, closure and graph replay are produced by exact pinned UCNS modules +# id: english_attachment_source_structure +# given: a verified query containing repeated words, punctuation and whitespace +# then: preserve every source part and occurrence and apply the existing admission and sentence-closure gates without splitting or normalizing text +# id: english_attachment_bearing_boundary +# given: closed words to place at the parent scale +# then: require an explicit named candidate bearing without reopening the specified recursive stacking operation +# id: english_attachment_lexical_owner +# given: a definition with a source lexical owner +# then: the entire closed lexical construction owns the typed definition origin while original parts, succession and provenance remain recoverable +# === END CONTRACTS === +"""Forward English attachment profile, forged in Stack and extracted into UCHC. + +GPT generated; context, prompt Erin Spencer. + +Usage:: + + python -m english_gonol.attachment_construction word bull + python -m english_gonol.attachment_construction sequence bull shit --bearing exit-heading-v1 + python -m english_gonol.attachment_construction compound bull shit + +The sequence command declares word boundaries explicitly; it does not infer a +sentence. Corpus queries use RecursiveStructuralField and the structural +sentence-closure gate. Both bearing choices are unselected candidates. Every +result retains exact UCNS expressions; display is optional and lossy. Historical +StructuralField and OrdinalStructuralField remain explicit replay interfaces. +""" +from __future__ import annotations + +import argparse +from functools import lru_cache +import importlib +import json +from pathlib import Path + +from english_gonol.ordinal_construction import ( + OrdinalGeometryError, _git_blob_sha1, _ucns, + construct_glyph_gonol, PUBLIC_GONOL_SHA256, +) +from english_gonol.structural_query import StructuralField +from english_gonol.structural_rules import digest + +UCNS_COMMIT = '9cc00771e54336d58ee377faeec87a3a33dbd4bf' +UCNS_BLOBS = {'attachment_stack': '0ce3879257b40d264749c1b65fff23abf186fded', 'attachment_codec': '5e761f8e2169ddb24aa6744a8a577ee4aa4989bd', 'ordinal_affixiation': '9fa84ef20f19fe0c04df680f49b50ea307e6d624', 'public_gonol': 'c1955e46e2dc918fb657cb346e42106d71937e91'} + + +@lru_cache(maxsize=1) +def _native(): + _ucns() + modules = {} + for name, expected in UCNS_BLOBS.items(): + try: + module = importlib.import_module('ucns.' + name) + except ImportError as exc: + raise OrdinalGeometryError('UCNS_ATTACHMENT_PRODUCER_REQUIRED') from exc + path = getattr(module, '__file__', None) + try: + content = Path(path).read_bytes() if path else None + except OSError as exc: + raise OrdinalGeometryError('UCNS_ATTACHMENT_PRODUCER_REQUIRED') from exc + if content is None or _git_blob_sha1(content) != expected: + raise OrdinalGeometryError('UCNS_ATTACHMENT_PRODUCER_DRIFT') + modules[name] = module + if set(modules) != {'attachment_stack', 'attachment_codec', 'ordinal_affixiation', 'public_gonol'}: + raise OrdinalGeometryError('UCNS_ATTACHMENT_PRODUCER_REQUIRED') + return modules['attachment_stack'], modules['attachment_codec'] + + +def authority(): + _native() + return {'repository': 'The-Interdependency/ucns', 'commit': UCNS_COMMIT, + 'source_blobs': dict(UCNS_BLOBS), 'public_gonol_sha256': PUBLIC_GONOL_SHA256} + + +def construct_word(text, *, source='english.attachment/1:declared-word'): + """Construct one declared word; no corpus admission is implied by this API.""" + native, _codec = _native() + admitted = construct_glyph_gonol(text, source=source) + return native.stack(text, admitted.participants, relation='english.attachment/1:glyph-stack', source=source) + + +def word_record(word): + native, codec = _native() + if not isinstance(word, native.DiskStack): + raise OrdinalGeometryError('NATIVE_WORD_STACK_REQUIRED') + expected = construct_word(word.identity, source=word.source) + if expected.receipt != word.receipt: + raise OrdinalGeometryError('PUBLIC_GONOL_WORD_STACK_REQUIRED') + return {'schema': 'english.attachment-word.v1', 'geometry_authority': authority(), + 'graph': codec.export_graph(word), 'recovered_glyphs': list(word.recover()), + 'disk_depths': [word.depth(i) for i in range(len(word.rays))]} + + +def construct_sequence(words, *, bearing=None, source='english.attachment/1:declared-sequence'): + """Same native stack, now consuming already closed words; never text.split().""" + native, _codec = _native() + if bearing not in native.POLICIES: + raise OrdinalGeometryError('CLOSED_WORD_BEARING_POLICY_REQUIRED') + if not isinstance(words, tuple) or not words: + raise OrdinalGeometryError('CLOSED_WORD_PARTICIPANTS_REQUIRED') + for word in words: + closed_record(word) + return native.stack('declared-word-sequence', tuple(native.Closed(w, bearing) for w in words), + relation='english.attachment/1:word-stack', source=source) + + +def construct_compound(left, right, *, source='english.attachment/1:declared-compound'): + """Explicit component boundary; the terminal occurrence supplies attachment.""" + if not isinstance(source, str) or not source: + raise OrdinalGeometryError('SOURCE_IDENTITY_REQUIRED') + native, codec = _native() + left_record, right_record = closed_record(left), closed_record(right) + site = len(left.rays) - 1 + rows = native.attach(left, site, right) + obj = native.join(left.identity + right.identity, left, right, + relation='english.attachment/1:declared-compound', source=source) + result = {'schema': 'english.attachment-compound.v1', 'source': source, + 'relation': 'declared-compound', 'geometry_authority': authority(), + 'components': [left_record, right_record], 'attachment_ordinal': site, + 'graph': codec.export_graph(obj), + 'incoming_rows': [{'origin': o.record(), 'point': p.record()} for o, p in rows], + 'local_radii_preserved': True, 'definition_owner': 'whole-closed-lexical-construction'} + return {**result, 'receipt': digest(result)} + + +def closed_record(obj): + """Validate either a glyph-built word or a retained explicit compound.""" + native, codec = _native() + if not isinstance(obj, native.AttachmentJoin): + return word_record(obj) + pending, seen = [obj], set() + while pending: + current = pending.pop() + if current.receipt in seen: + continue + seen.add(current.receipt) + if isinstance(current, native.AttachmentJoin): + expected = native.join(current.left.identity + current.right.identity, + current.left, current.right, + relation='english.attachment/1:declared-compound', source=current.source) + if current.receipt != expected.receipt: + raise OrdinalGeometryError('DECLARED_COMPOUND_REQUIRED') + pending.extend((current.right, current.left)) + else: + word_record(current) + return {'schema': 'english.closed-compound.v1', 'geometry_authority': authority(), + 'graph': codec.export_graph(obj)} + + +def replay_compound(record): + """Reconstruct both components and the actual attachment, not just a hash.""" + _native_module, codec = _native() + try: + if not isinstance(record, dict) or len(record['components']) != 2: + raise ValueError('two components required') + left, right = (codec.replay_graph(p['graph']) for p in record['components']) + expected = construct_compound(left, right, source=record['source']) + if digest(expected) != digest(record): + raise ValueError('compound replay mismatch') + return expected + except (KeyError, TypeError, ValueError) as exc: + raise OrdinalGeometryError('COMPOUND_REPLAY_MISMATCH') from exc + + +class RecursiveStructuralField(StructuralField): + """Verified corpus adapter. Candidate bearings are explicit per field instance.""" + + def __init__(self, out_dir, *, bearing=None): + native, _codec = _native() + if bearing is not None and bearing not in native.POLICIES: + raise OrdinalGeometryError('CLOSED_WORD_BEARING_POLICY_REQUIRED') + self.bearing = bearing + super().__init__(out_dir) + + def _closed_word(self, surface, word_id): + if not self.complete_corpus: + raise OrdinalGeometryError('COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL') + return construct_word(surface, source='english.structural/1:' + self._field_receipt + ':word:' + str(word_id)) + + def word(self, surface): + result = super().word(surface) + result['attachment_geometry'] = word_record(self._closed_word(surface, result['word_id'])) + result['historical_structural_geometry'] = {key: result.pop(key) for key in + ('gonal_order', 'attachment', 'definition_attachment')} + result['gonal_order'] = result['attachment_geometry']['graph'] + result['geometry_state'] = 'constructed-native-attachment' + return result + + def geometry(self, record, *, operation): + if operation != 'recursive-stack': + return super().geometry(record, operation=operation) + graph = self.replay(record) + if not self.complete_corpus: + return {'standing': 'refused', 'code': 'COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL'} + if graph['refusals']: + return {'standing': 'refused', 'code': 'PARTICIPANT_ADMISSION_REQUIRED'} + native, codec = _native() + words, occurrences, interiors = [], [], {} + try: + for part in graph['parts']: + if part['kind'] != 'word': + continue + surface = graph['source'][part['start']:part['end']] + word = self._closed_word(surface, part['identity']) + words.append(word) + interiors[word.receipt] = word_record(word) + occurrences.append({'part_ordinal': part['ordinal'], 'start': part['start'], + 'end': part['end'], 'word_id': part['identity'], 'interior': word.receipt}) + except OrdinalGeometryError as exc: + return {'standing': 'refused', 'code': exc.code, 'unplaced_glyphs': list(exc.glyphs)} + result = {'schema': 'english.recursive-word-placement.v1', 'source_structure': graph, + 'geometry_authority': authority(), 'word_interiors': list(interiors.values()), + 'word_occurrences': occurrences, 'scope': 'ordered closed-word placement', + 'hmmm': ['Punctuation function geometry is not supplied by the word stack.', + 'Closed-word bearing candidates remain unselected.']} + if not words: + return {**result, 'standing': 'refused', 'code': 'CLOSED_WORD_PARTICIPANTS_REQUIRED'} + if self.bearing is None: + return {**result, 'standing': 'partial', 'code': 'CLOSED_WORD_BEARING_POLICY_REQUIRED'} + parent = construct_sequence(tuple(words), bearing=self.bearing, + source='english.query:' + graph['receipt_sha256']) + result.update(standing='constructed', bearing_policy=self.bearing, + bearing_standing='unselected-candidate', word_stack=codec.export_graph(parent)) + result['receipt'] = digest(result) + return result + + def compose(self, record, *, relation): + result = super().compose(record, relation=relation) + if result['standing'] != 'logically-closed': + return result + geometry = self.geometry(record, operation='recursive-stack') + result['attachment_geometry'] = geometry + result['geometry_state'] = ('constructed-word-stack;candidate-bearing' if geometry['standing'] == 'constructed' + else 'hmmm:' + geometry['code']) + return result + + def lexical_owner(self, record_id): + """Whole source lexical closure; this is a typed owner, never a word ID.""" + row = self.db.execute("SELECT text,provenance FROM records WHERE id=? AND kind='lexical'", (record_id,)).fetchone() + if row is None: + raise OrdinalGeometryError('LEXICAL_OWNER_REQUIRED') + parts = [] + for ordinal, kind, wid, cid, start, end, function in self.db.execute( + 'SELECT ordinal,kind,word_id,character_id,start_offset,end_offset,function FROM components WHERE record_id=? ORDER BY ordinal', (record_id,)): + parts.append({'ordinal': ordinal, 'kind': kind, 'identity': wid if kind == 'word' else cid, + 'start': start, 'end': end, 'function': json.loads(function)}) + owner = {'schema': 'english.closed-lexical-owner.v1', 'kind': 'lexical-construction', + 'record_id': record_id, 'field_receipt': self._field_receipt, 'text': row[0], + 'parts': parts, 'closed': True, 'provenance': json.loads(row[1])} + return {**owner, 'receipt': digest(owner)} + + def definition(self, record_id): + result = super().definition(record_id) + owner = self.lexical_owner(result['owner_record_id']) + result['historical_origin'] = {'origin': result['origin'], 'state': result['origin_state']} + result['lexical_owner'] = owner + result['origin'] = {'space': 'O_D', 'owner_kind': owner['kind'], 'owner_record_id': owner['record_id'], + 'owner_receipt': owner['receipt']} + result['origin_state'] = 'whole-closed-lexical-owner' + result['constituent_direct'] = [{'owner': result['origin'], 'part': i, 'standing': result['origin_state']} + for i in range(len(result['parts']))] + result['origin_geometry'] = 'hmmm: typed lexical ownership is not a numerical definition attachment' + result['attachment_profile'] = 'english.attachment/1' + result['attachment_receipt'] = digest(result) + return result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + sub = parser.add_subparsers(dest='command', required=True) + word = sub.add_parser('word'); word.add_argument('text') + sequence = sub.add_parser('sequence'); sequence.add_argument('words', nargs='+') + sequence.add_argument('--bearing', required=True, choices=('root-endpoint-v1', 'exit-heading-v1')) + compound = sub.add_parser('compound'); compound.add_argument('left'); compound.add_argument('right') + args = parser.parse_args() + try: + _native_module, codec = _native() + if args.command == 'word': + obj = construct_word(args.text) + result = {**word_record(obj), 'common_view': codec.export_view(obj, kind='common'), + 'attached_view': codec.export_view(obj)} + elif args.command == 'sequence': + obj = construct_sequence(tuple(construct_word(w) for w in args.words), bearing=args.bearing) + result = {'geometry_authority': authority(), 'bearing_standing': 'unselected-candidate', + 'bearing_policy': args.bearing, 'graph': codec.export_graph(obj)} + else: + result = construct_compound(construct_word(args.left), construct_word(args.right)) + except OrdinalGeometryError as exc: + print(json.dumps({'standing': 'refused', 'code': exc.code, 'glyphs': exc.glyphs})) + return 2 + print(json.dumps(result, ensure_ascii=False, sort_keys=True, indent=2)) + return 0 + + +if __name__ == '__main__': + raise SystemExit(main()) +# ratios: loc_comments=230:54 imports_exports=9:9 calls_definitions=103:17 diff --git a/research/english-gonol/english_gonol/data/EDCM_METRIC_ORIGINS_SOURCE.json b/research/english-gonol/english_gonol/data/EDCM_METRIC_ORIGINS_SOURCE.json new file mode 100644 index 00000000..244f58c8 --- /dev/null +++ b/research/english-gonol/english_gonol/data/EDCM_METRIC_ORIGINS_SOURCE.json @@ -0,0 +1,206 @@ +{ + "schema": "edcm.metric-origin-spec-fixture", + "version": "0.4.0", + "producer_repository": "The-Interdependency/edcm", + "producer_commit": "0873c105799681ea1f7ccb3e619d1f7aebbd85e0", + "specs": { + "C": { + "surface_terms": [ + "Constraint Strain" + ], + "semantic_definition": "constraint strain is pressure produced by contradiction within the measured window", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "implicit contradiction semantics are not measured by the maintained proxy" + ], + "construction_terms": [ + "constraint", + "strain", + "contradiction", + "pressure" + ], + "canonical_metric_id": "edcm.behavioral.C.constraint_strain" + }, + "R": { + "surface_terms": [ + "Refusal Density" + ], + "semantic_definition": "refusal density is the concentration of refusal relative to active constraint statements", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "implemented denominator is token-count scale, not counted constraint statements" + ], + "construction_terms": [ + "refusal", + "density", + "refusal", + "constraint" + ], + "canonical_metric_id": "edcm.behavioral.R.refusal_density" + }, + "F": { + "surface_terms": [ + "Fixation" + ], + "semantic_definition": "fixation is persistence of substantially the same constraint-bearing pattern across successive states", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "maintained implementation is a lexical structural proxy, not embedding similarity" + ], + "construction_terms": [ + "fixation", + "persistence", + "repetition" + ], + "canonical_metric_id": "edcm.behavioral.F.fixation" + }, + "E": { + "surface_terms": [ + "Escalation" + ], + "semantic_definition": "escalation is positive change in commitment or constraint intensity across sequence", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "maintained implementation does not directly compute commitment-intensity derivative" + ], + "construction_terms": [ + "escalation", + "increase", + "commitment", + "intensity" + ], + "canonical_metric_id": "edcm.behavioral.E.escalation" + }, + "D": { + "surface_terms": [ + "Deflection" + ], + "semantic_definition": "deflection is movement away from the active constraint-bearing subject or relation", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "prior-round lexical overlap substitutes for active-constraint topic tracking" + ], + "construction_terms": [ + "deflection", + "movement", + "away", + "constraint" + ], + "canonical_metric_id": "edcm.behavioral.D.deflection" + }, + "N": { + "surface_terms": [ + "Noise" + ], + "semantic_definition": "noise is activity that consumes representational space without proportionate constraint resolution", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "maintained implementation measures repetition and entropy rather than resolution ratio" + ], + "construction_terms": [ + "noise", + "repetition", + "without", + "resolution" + ], + "canonical_metric_id": "edcm.behavioral.N.noise" + }, + "I": { + "surface_terms": [ + "Integration Failure" + ], + "semantic_definition": "integration failure is failure of a correction or newly supplied constraint to alter subsequent behavior accordingly", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "maintained implementation does not observe subsequent integration behavior" + ], + "construction_terms": [ + "integration", + "failure", + "correction", + "change" + ], + "canonical_metric_id": "edcm.behavioral.I.integration" + }, + "O": { + "canonical_metric_id": "edcm.behavioral.O_scope", + "surface_terms": [ + "Scope Motion", + "Overextension" + ], + "semantic_definition": "scope motion is signed boundary change from contraction through stability to expansion or overextension", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "legacy scalar carrier O explicitly targets edcm.behavioral.O_scope; O_confidence is a distinct canonical axis and is not produced by RoundMetrics" + ], + "construction_terms": [ + "scope", + "motion", + "expansion", + "contraction" + ] + }, + "L": { + "canonical_metric_id": "edcm.behavioral.L_loss", + "surface_terms": [ + "Coherence Loss" + ], + "semantic_definition": "coherence loss is signed continuity motion from recovery through stability to degradation", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "legacy scalar carrier L explicitly targets edcm.behavioral.L_loss; L_load and L_resistance are distinct canonical axes" + ], + "construction_terms": [ + "coherence", + "loss", + "continuity", + "degradation" + ] + }, + "P": { + "surface_terms": [ + "Progress" + ], + "semantic_definition": "progress is newly integrated information or state change that advances resolution relative to the prior state", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "progress is explicitly implemented as a proxy" + ], + "construction_terms": [ + "progress", + "novelty", + "change", + "resolution" + ], + "canonical_metric_id": "edcm.round.P_progress" + }, + "kappa": { + "surface_terms": [ + "Stored Tension" + ], + "semantic_definition": "stored tension is unresolved dissonance carried forward as circuit state", + "standing": "resolved", + "measurement_alignment": "proxy", + "unresolved": [ + "resolution function is currently approximated from dissonance" + ], + "construction_terms": [ + "stored", + "tension", + "unresolved", + "conflict" + ], + "canonical_metric_id": "edcm.state.kappa" + } + } +} diff --git a/research/english-gonol/english_gonol/data/METRIC_ORIGIN_PROVENANCE.json b/research/english-gonol/english_gonol/data/METRIC_ORIGIN_PROVENANCE.json new file mode 100644 index 00000000..f1177316 --- /dev/null +++ b/research/english-gonol/english_gonol/data/METRIC_ORIGIN_PROVENANCE.json @@ -0,0 +1,8 @@ +{ + "metric_origin_source": { + "repository": "The-Interdependency/edcm", + "commit": "0873c105799681ea1f7ccb3e619d1f7aebbd85e0", + "relation": "exact EDCM semantic metric-origin producer with canonical O/L split; does not refresh the historical extraction source or libs/edcm pin", + "authority_transfer": false + } +} diff --git a/research/english-gonol/english_gonol/edcm_metric_origins.py b/research/english-gonol/english_gonol/edcm_metric_origins.py index b141f966..3852d066 100644 --- a/research/english-gonol/english_gonol/edcm_metric_origins.py +++ b/research/english-gonol/english_gonol/edcm_metric_origins.py @@ -78,8 +78,12 @@ SCHEMA = "english-gonol.edcm-metric-origin-set" VERSION = "0.2.0" -FIXTURE = Path(__file__).resolve().parents[1] / "EDCM_METRIC_ORIGINS_SOURCE.json" -BASE = FIXTURE.parent / "BASE.json" +DATA = Path(__file__).resolve().parent / "data" +# The exact semantic fixture and its registration travel with the package. +# Stack's BASE/manifest projections are checked by the forge tests, not read +# from a caller's workspace at runtime. +FIXTURE = DATA / "EDCM_METRIC_ORIGINS_SOURCE.json" +BASE = DATA / "METRIC_ORIGIN_PROVENANCE.json" # Bind the complete source projection, not only a caller-supplied commit label. FIXTURE_SHA256 = "4a769f493af21eb54c0f7d95307237a172e3fd17aaf43e62d6602cd80e0dba5c" diff --git a/research/english-gonol/english_gonol/ordinal_construction.py b/research/english-gonol/english_gonol/ordinal_construction.py new file mode 100644 index 00000000..2e6deb2e --- /dev/null +++ b/research/english-gonol/english_gonol/ordinal_construction.py @@ -0,0 +1,343 @@ +# ratios: loc_comments=234:76 imports_exports=8:5 calls_definitions=72:13 +# SPDX-License-Identifier: FSL-1.1-ALv2 +# Copyright 2026 Erin Spencer +# === MODULE_BUILD === +# id: uchc_english_ordinal_ucns_consumer +# module_name: ordinal_construction +# module_kind: adapter +# summary: exact glyph instantiation from the UCNS Public Gonol carrier and ordinal-affixiation geometry +# owner: Erin Spencer +# public_surface: construct_glyph_gonol, geometry_record, OrdinalStructuralField, OrdinalGeometryError +# internal_surface: pinned UCNS module integrity and exact corpus receipts +# auth_boundary: pinned UCNS source bytes and immutable Public Gonol arrangement +# storage_boundary: verified structural corpus read-only; geometric records returned without DB mutation +# network_boundary: none +# user_data_boundary: caller source remains in local computation +# admin_only: false +# tests: ordinal_tests/test_ordinal_construction.py in Stack; tests/test_ordinal_construction.py in UCHC; paired complete-corpus acceptance +# rollout: extract the verified Stack candidate; historical StructuralField receipts remain immutable +# rollback: remove consumer module and its explicit API; do not modify UCNS or sealed corpus artifacts +# requires: ucns.ordinal_affixiation, ucns.public_gonol, english_gonol.structural_query +# since: 2026-10-19 +# unresolved: non-Public-Gonol scalar angles and higher-scale word-carrier angular attachment +# === END MODULE_BUILD === +# +# === CONTRACTS === +# id: uchc_ordinal_ucns_is_the_sole_geometry_authority +# given: any UCHC glyph construction +# then: it uses exact pinned UCNS Carrier, Participant and affixiate objects with no local angular or radial formula +# class: correctness +# +# id: uchc_ordinal_glyph_occurrences_preserve_geometry +# given: an ordered sequence of admitted Public Gonol glyphs +# then: every occurrence preserves UCNS turn, exact halving exponent, multiplicity, order and replay receipt +# class: correctness +# +# id: uchc_ordinal_no_fabricated_angles +# given: an unadmitted glyph, changed UCNS producer, or unverified corpus origin +# then: geometric construction refuses without allocating a replacement angle or changing corpus evidence +# class: safety +# +# id: uchc_ordinal_query_consumes_verified_word_interiors +# given: an admitted verified English structural query and Public Gonol glyphs +# then: returned glyph geometry and each word's recoverable interior come from UCNS without inventing a parent word carrier +# class: correctness +# +# id: uchc_ordinal_detached_interiors_keep_authority +# given: a word or partial SPACE-seam result is detached from its query +# then: every constructed word interior carries the exact UCNS repository, commit and source blob identities +# class: evidence +# === END CONTRACTS === + +"""Stack-forged English ordinal candidate, consuming UCNS geometry. + +Usage with exact UCNS producer installed: + python -m english_gonol.ordinal_construction word + +Use OrdinalStructuralField for a verified English corpus. The older +StructuralField remains the immutable historical-replay surface. +Stack owns this candidate until domain graduation. UCHC verifies its exact +extraction; see the ordinal work graph and extraction receipt before editing. +The Public Gonol fixes angular ordering; UCNS computes turns, radial halvings, +closure and receipts. Hyperspace before instantiation is NOT a gonol. +""" +from __future__ import annotations + +import argparse +from functools import lru_cache +from hashlib import sha1 +import importlib +import json +from pathlib import Path + +from english_gonol.structural_query import StructuralField + +SCHEMA = "uchc.english-ordinal-geometry" +VERSION = "1.0.0" +UCNS_COMMIT = "ed0b0760f05cd975a7a811f8abeb70a11d09f00b" +UCNS_ORDINAL_BLOB = "9fa84ef20f19fe0c04df680f49b50ea307e6d624" +UCNS_PUBLIC_BLOB = "c1955e46e2dc918fb657cb346e42106d71937e91" +PUBLIC_GONOL_SHA256 = "55d10c84529a4d7bc7714786357e977b68d9df2ac3f73d20e229580b552c2ef5" + + +class OrdinalGeometryError(ValueError): + """Named refusal rather than a local substitute for UCNS geometry.""" + + def __init__(self, code: str, glyphs: tuple[str, ...] = ()): + self.code = code + self.glyphs = glyphs + super().__init__(code) + + +def _git_blob_sha1(source: bytes) -> str: + """Verify exact Git blob bytes; a digest is integrity, not authentication.""" + return sha1(b"blob " + str(len(source)).encode("ascii") + b"\0" + source).hexdigest() + + +@lru_cache(maxsize=1) +def _ucns(): + """Load the exact UCNS producer before admitting any geometric construction.""" + try: + ordinal = importlib.import_module("ucns.ordinal_affixiation") + public = importlib.import_module("ucns.public_gonol") + except ImportError as exc: + raise OrdinalGeometryError("UCNS_ORDINAL_PRODUCER_REQUIRED") from exc + for module, expected in ( + (ordinal, UCNS_ORDINAL_BLOB), + (public, UCNS_PUBLIC_BLOB), + ): + path = getattr(module, "__file__", None) + if not path or not Path(path).is_file(): + raise OrdinalGeometryError("UCNS_PRODUCER_SOURCE_UNAVAILABLE") + if _git_blob_sha1(Path(path).read_bytes()) != expected: + raise OrdinalGeometryError("UCNS_PRODUCER_DRIFT") + if ( + public.PUBLIC_GONOL_SHA256 != PUBLIC_GONOL_SHA256 + or public.public_gonol_sha256() != PUBLIC_GONOL_SHA256 + or len(public.PUBLIC_GONOL_157) != 157 + or public.PUBLIC_GONOL_157[0] != " " + ): + raise OrdinalGeometryError("PUBLIC_GONOL_CARRIER_DRIFT") + carrier = ordinal.Carrier( + tuple(public.PUBLIC_GONOL_157), + "ucns:public-gonol-157:" + PUBLIC_GONOL_SHA256, + ) + return ordinal, public, carrier + + +def construct_glyph_gonol(text: str, *, source: str = "uchc:english.ordinal/1"): + """Construct every glyph instance through UCNS with exact local-frame placement. + + All glyphs must have positions on the pinned Public Gonol. In particular, + an unknown Unicode scalar cannot be silently assigned a Unicode-order, + hash-derived or locally invented bearing. + """ + if not isinstance(text, str) or not text: + raise OrdinalGeometryError("NONEMPTY_GLYPH_SEQUENCE_REQUIRED") + if any(0xD800 <= ord(glyph) <= 0xDFFF for glyph in text): + raise OrdinalGeometryError("UNICODE_SCALAR_REQUIRED") + if not isinstance(source, str) or not source: + raise OrdinalGeometryError("SOURCE_IDENTITY_REQUIRED") + # SPACE is the fixed reference and seam event, not a radial glyph instance. + if " " in text: + raise OrdinalGeometryError("SPACE_SEAM_REQUIRES_FRAME_ATTACHMENT") + ordinal, public, carrier = _ucns() + missing = tuple(dict.fromkeys( + glyph for glyph in text if public.public_gonol_position(glyph) is None + )) + if missing: + raise OrdinalGeometryError("PUBLIC_GONOL_ANGLE_UNAVAILABLE", missing) + construction = ordinal.affixiate( + text, + tuple(ordinal.Participant.atom(carrier, glyph) for glyph in text), + origin="SPACE", + relation="english.ordinal/1:glyph-instantiation", + source=source, + ) + if construction.recover() != tuple(text): + raise OrdinalGeometryError("UCNS_CONSTRUCTION_RECOVERY_MISMATCH") + return construction + + +def geometry_record(construction) -> dict: + """Carry only Public Gonol glyph constructions, not arbitrary UCNS frames.""" + ordinal, _public, carrier = _ucns() + if not isinstance(construction, ordinal.Construction): + raise OrdinalGeometryError("UCNS_CONSTRUCTION_REQUIRED") + if ( + construction.origin != "SPACE" + or construction.relation != "english.ordinal/1:glyph-instantiation" + or not construction.participants + or any( + participant.interior is not None + or participant.carrier != carrier + or participant.identity == " " + for participant in construction.participants + ) + or construction.identity != "".join(p.identity for p in construction.participants) + or construction.recover() != tuple(construction.identity) + ): + raise OrdinalGeometryError("UCNS_PUBLIC_GLYPH_CONSTRUCTION_REQUIRED") + # A native UCNS object can be built using an alternate relation or carrier. + # Never attach Public Gonol provenance to that different construction. + rebuilt = ordinal.affixiate( + construction.identity, construction.participants, + origin=construction.origin, relation=construction.relation, + source=construction.source, + ) + if construction.receipt != rebuilt.receipt: + raise OrdinalGeometryError("UCNS_CONSTRUCTION_RECEIPT_MISMATCH") + return { + "schema": SCHEMA, + "version": VERSION, + "geometry_authority": { + "repository": "The-Interdependency/ucns", + "commit": UCNS_COMMIT, + "ordinal_blob": UCNS_ORDINAL_BLOB, + "public_gonol_blob": UCNS_PUBLIC_BLOB, + "public_gonol_sha256": PUBLIC_GONOL_SHA256, + }, + "construction": construction.record(), + "receipt": construction.receipt, + "recovered_glyphs": list(construction.recover()), + } + + +def _refusal(code: str, glyphs: tuple[str, ...] = ()) -> dict: + return { + "standing": "refused", + "code": code, + "unplaced_glyphs": list(glyphs), + "edges": [], + } + + +class OrdinalStructuralField(StructuralField): + """Verified structural English field using the selected UCNS glyph geometry. + + Preserves the historical structural artifact and its replay byte-for-byte. + Only a verified complete corpus can bind its glyph identifiers to the + canonical Public Gonol; partial fixtures cannot claim that binding. + """ + + def _word_geometry(self, surface: str, word: dict): + if not self.complete_corpus: + raise OrdinalGeometryError("COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL") + return construct_glyph_gonol( + surface, + source=( + "uchc:english.structural/1:" + + self.manifest["receipt_sha256"] + + ":word:" + + str(word["word_id"]) + ), + ) + + def word(self, surface: str) -> dict: + result = super().word(surface) + constructed = self._word_geometry(surface, result) + geometry = geometry_record(constructed) + result["gonal_order"] = geometry["construction"] + result["geometry_receipt"] = geometry["receipt"] + result["geometry_authority"] = geometry["geometry_authority"] + result["geometry_state"] = "constructed" + return result + + def geometry(self, record: dict, *, operation: str) -> dict: + if operation != "ordinal-affixiation": + return super().geometry(record, operation=operation) + graph = self.replay(record) + if not self.complete_corpus: + return _refusal("COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL") + if graph["refusals"]: + return _refusal("PARTICIPANT_ADMISSION_REQUIRED") + if not graph["source"]: + return _refusal("NONEMPTY_GLYPH_SEQUENCE_REQUIRED") + try: + interiors: dict[str, dict] = {} + word_order = [] + for part in graph["parts"]: + if part["kind"] != "word": + continue + surface = graph["source"][part["start"]:part["end"]] + key = str(part["identity"]) + if key not in interiors: + interior = self.word(surface) + interiors[key] = { + "word_id": part["identity"], + "source": surface, + "construction": interior["gonal_order"], + "receipt": interior["geometry_receipt"], + "geometry_authority": interior["geometry_authority"], + } + word_order.append({"ordinal": part["ordinal"], "word_id": part["identity"]}) + if " " in graph["source"]: + return { + "standing": "partial", + "code": "SPACE_SEAM_FRAME_NOT_SELECTED", + "source_receipt": graph["receipt_sha256"], + "word_interiors": list(interiors.values()), + "ordered_word_references": word_order, + "word_sites": graph["word_sites"], + "higher_word_frame": "hmmm:WORD_CARRIER_ANGLE_NOT_SELECTED", + "edges": [], + } + glyph_frame = construct_glyph_gonol( + graph["source"], + source="uchc:english.structural-query:" + graph["receipt_sha256"], + ) + except OrdinalGeometryError as exc: + return _refusal(exc.code, exc.glyphs) + return { + "standing": "constructed", + "operation": "ordinal-affixiation", + "source_receipt": graph["receipt_sha256"], + "glyph_frame": geometry_record(glyph_frame), + "word_interiors": list(interiors.values()), + "ordered_word_references": word_order, + "higher_word_frame": "hmmm:WORD_CARRIER_ANGLE_NOT_SELECTED", + "edges": [], + } + + def compose(self, record: dict, *, relation: str) -> dict: + result = super().compose(record, relation=relation) + if result["standing"] != "logically-closed": + return result + geometry = self.geometry(record, operation="ordinal-affixiation") + if geometry["standing"] != "constructed": + result["geometry_state"] = "hmmm:" + geometry["code"] + result["word_interiors"] = geometry.get("word_interiors", []) + result["word_sites"] = geometry.get("word_sites", []) + result["geometry_refusal"] = geometry + return result + result["geometry_state"] = "constructed-glyph-frame;higher-word-frame-hmmm" + result["glyph_geometry"] = geometry["glyph_frame"] + result["word_interiors"] = geometry["word_interiors"] + return result + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("text") + parser.add_argument("--source", default="uchc:english.ordinal/1") + parser.add_argument("--state-dir", help="verified complete structural corpus") + args = parser.parse_args() + try: + if args.state_dir: + with OrdinalStructuralField(args.state_dir) as field: + record = field.geometry( + field.construct(args.text), + operation="ordinal-affixiation", + ) + else: + record = geometry_record(construct_glyph_gonol(args.text, source=args.source)) + record["standing"] = "constructed" + except OrdinalGeometryError as exc: + record = _refusal(exc.code, exc.glyphs) + print(json.dumps(record, ensure_ascii=False, indent=2)) + return 0 if record["standing"] == "constructed" else 2 + + +if __name__ == "__main__": + raise SystemExit(main()) +# ratios: loc_comments=234:76 imports_exports=8:5 calls_definitions=72:13 diff --git a/research/english-gonol/experiments/recursive-attachment-v1/README.md b/research/english-gonol/experiments/recursive-attachment-v1/README.md new file mode 100644 index 00000000..52a001e0 --- /dev/null +++ b/research/english-gonol/experiments/recursive-attachment-v1/README.md @@ -0,0 +1,26 @@ +# Recursive attachment evidence — 30 October 2026 + +GPT generated; context, prompt Erin Spencer. + +`local-verification.json` binds the executed source and artifact identities. +`corpus-audit.json` is the complete clean-installed forward census. Counts and +stream digests cover every corpus word and definition; neither bearing candidate +is selected. Typed whole lexical ownership does not claim numerical attachment. + +Native source, wheel and sdist each passed 303 tests. The first wheel run had +two wall-clock timing failures; both isolated controls and the complete retry +passed without changing code or thresholds. That attempt remains disclosed. +Hosted jobs failed before any steps; their cause is not established here. + +The source census began before the final native commit metadata was filled. +Its word/definition streams, counts and native source blobs match the final +installed census. The whole reports differ only in commit metadata and their +own receipt; no identical whole-report claim is made. + +Historical corpus bytes/receipts were not reinterpreted. The corpus was rebuilt +under Python 3.12.14 and PyYAML 6.0.3, then verified by the installed consumer with +PyYAML 6.0.2. Its logical receipt reproduces the sealed profile; this is not a claim +that its physical SQLite bytes match a historical build on another runtime. + +hmmm: bearing functional, numerical definition attachment, expanded carrier, +native sheet lift, hosted CI, stable publication and domain graduation. diff --git a/research/english-gonol/experiments/recursive-attachment-v1/corpus-audit.json b/research/english-gonol/experiments/recursive-attachment-v1/corpus-audit.json new file mode 100644 index 00000000..e7e37aa7 --- /dev/null +++ b/research/english-gonol/experiments/recursive-attachment-v1/corpus-audit.json @@ -0,0 +1,47 @@ +{ + "counts": { + "constructed_words": 103027, + "definitions": 185155, + "formerly_compound_definitions": 57155, + "refused_words": 26, + "words": 103053 + }, + "definition_stream_sha256": "9d28ce7be9d073498b20ebd1064a71911d05822d363ffa4e3a2f4a455d69d59f", + "field_receipt": "26ab095f73306ff4fbd9f67d1c282c1df79f926bb75cc081c879db8a6989b58a", + "geometry_authority": { + "commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "public_gonol_sha256": "55d10c84529a4d7bc7714786357e977b68d9df2ac3f73d20e229580b552c2ef5", + "repository": "The-Interdependency/ucns", + "source_blobs": { + "attachment_codec": "5e761f8e2169ddb24aa6744a8a577ee4aa4989bd", + "attachment_stack": "0ce3879257b40d264749c1b65fff23abf186fded", + "ordinal_affixiation": "9fa84ef20f19fe0c04df680f49b50ea307e6d624", + "public_gonol": "c1955e46e2dc918fb657cb346e42106d71937e91" + } + }, + "hmmm": [ + "Numerical definition attachment and bearing selection remain open." + ], + "receipt": "10b484f2e025f39160a6af7f67d3da5b3f88732d42288361347a2345f7216dd7", + "schema": "english.attachment-corpus-audit.v1", + "scope": "all corpus words and all definition ownership overlays; no bearing candidate selected", + "unplaced_glyph_word_counts": { + "á": 1, + "ä": 1, + "ç": 3, + "é": 8, + "ê": 1, + "ë": 1, + "ð": 1, + "ñ": 3, + "ò": 2, + "š": 1, + "ʰ": 1, + "θ": 1, + "Ъ": 1, + "Ь": 1, + "ъ": 1, + "ь": 1 + }, + "word_stream_sha256": "a8a1c8248ad97711055dacb698f863a3fe8d36eb29013391900d7506da37edc1" +} diff --git a/research/english-gonol/experiments/recursive-attachment-v1/integration-verification.json b/research/english-gonol/experiments/recursive-attachment-v1/integration-verification.json new file mode 100644 index 00000000..0deb97f9 --- /dev/null +++ b/research/english-gonol/experiments/recursive-attachment-v1/integration-verification.json @@ -0,0 +1,699 @@ +{ + "attribution": "GPT generated; context, prompt Erin Spencer.", + "authority_transfer": false, + "bearing_selection": "none", + "build_environment": { + "SOURCE_DATE_EPOCH": "1790308800", + "packaging": "26.0", + "pytest": "8.3.5", + "python": "3.12.14", + "setuptools": "82.0.1", + "sqlite": "3.53.1", + "uchc_archive_permissions": [ + "LICENSE: 0664 to 0644", + "NOTICE: 0664 to 0644" + ], + "wheel": "0.46.3" + }, + "cli_operations": [ + { + "operation": [ + "word", + "bull" + ], + "sha256": "b9add37dbdd3e65832054adcdd190151241667bc3973f7f792df404dd04dcbfb", + "source_forge_installed_and_historical_match": true + }, + { + "operation": [ + "compound", + "bull", + "shit" + ], + "sha256": "c15836e0ef0d4778523be891760bf32ed22176983deb0a6ab72ccc447259e695", + "source_forge_installed_and_historical_match": true + }, + { + "operation": [ + "sequence", + "bull", + "shit", + "--bearing", + "root-endpoint-v1" + ], + "sha256": "f11e62b7feaa3ea559dd3423592613bb358af3844f4ef4bf5bfb9b234df8be79", + "source_forge_installed_and_historical_match": true + }, + { + "operation": [ + "sequence", + "bull", + "shit", + "--bearing", + "exit-heading-v1" + ], + "sha256": "49ab6d6833a94fac1b7ebf7b450dcead118ea46fec8871b3d4ea6de03997556f", + "source_forge_installed_and_historical_match": true + }, + { + "exit_code": 2, + "operation": [ + "sequence", + "bull", + "shit" + ], + "refusal": "argparse: explicit --bearing required" + }, + { + "exit_code": 2, + "operation": [ + "word", + "\u00e9" + ], + "refusal": "{\"standing\": \"refused\", \"code\": \"PUBLIC_GONOL_ANGLE_UNAVAILABLE\", \"glyphs\": [\"\\u00e9\"]}" + } + ], + "complete_corpus": { + "audit": { + "counts": { + "constructed_words": 103027, + "definitions": 185155, + "formerly_compound_definitions": 57155, + "refused_words": 26, + "words": 103053 + }, + "definition_stream_sha256": "9d28ce7be9d073498b20ebd1064a71911d05822d363ffa4e3a2f4a455d69d59f", + "field_receipt": "26ab095f73306ff4fbd9f67d1c282c1df79f926bb75cc081c879db8a6989b58a", + "geometry_authority": { + "commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "public_gonol_sha256": "55d10c84529a4d7bc7714786357e977b68d9df2ac3f73d20e229580b552c2ef5", + "repository": "The-Interdependency/ucns", + "source_blobs": { + "attachment_codec": "5e761f8e2169ddb24aa6744a8a577ee4aa4989bd", + "attachment_stack": "0ce3879257b40d264749c1b65fff23abf186fded", + "ordinal_affixiation": "9fa84ef20f19fe0c04df680f49b50ea307e6d624", + "public_gonol": "c1955e46e2dc918fb657cb346e42106d71937e91" + } + }, + "hmmm": [ + "Numerical definition attachment and bearing selection remain open." + ], + "receipt": "10b484f2e025f39160a6af7f67d3da5b3f88732d42288361347a2345f7216dd7", + "schema": "english.attachment-corpus-audit.v1", + "scope": "all corpus words and all definition ownership overlays; no bearing candidate selected", + "unplaced_glyph_word_counts": { + "\u00e1": 1, + "\u00e4": 1, + "\u00e7": 3, + "\u00e9": 8, + "\u00ea": 1, + "\u00eb": 1, + "\u00f0": 1, + "\u00f1": 3, + "\u00f2": 2, + "\u0161": 1, + "\u02b0": 1, + "\u03b8": 1, + "\u042a": 1, + "\u042c": 1, + "\u044a": 1, + "\u044c": 1 + }, + "word_stream_sha256": "a8a1c8248ad97711055dacb698f863a3fe8d36eb29013391900d7506da37edc1" + }, + "baseline_sha256": "99d26c9aa091e85a741ecbed77cf556807b362857ea756eb37517bd23762b92e", + "forge_equals_installed_equals_baseline": true, + "installed_build_logical_receipt": "26ab095f73306ff4fbd9f67d1c282c1df79f926bb75cc081c879db8a6989b58a" + }, + "corrections": [ + "Forge and installed census are each compared in full with the preserved baseline; shared regressions no longer pass by equality alone.", + "Extraction verifier and census audit refuse optimized Python before assertions can be disabled; pre-fix -O incorrectly reported exact for a changed checkout.", + "Workflow verifies exact test counts and records graph and baseline identities; install/use guide separates candidate usability from stable authority." + ], + "dependency_pins": { + "historical_corpus_carrier": "4f863ad37096b7baab8f62820ad5cb937b62a3a7", + "historical_lexical_test_ucns": "d7c6f51304ed6c32d48badf63132bea6de8af497", + "native_ucns": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "oewn": "dc343f2683279ecbb13fab4e2fd778d7b162d287", + "stack_extraction": "251ba2290675a21154582f0b3fb0d7a9d509ed50" + }, + "earlier_environment_attempts": [ + { + "reason": "Missing historical checkout roots and wrong working directory; not the configured acceptance gate.", + "results": { + "errors": 0, + "failures": 26, + "skipped": 9, + "tests": 301 + } + }, + { + "reason": "One historical UCNS checkout was insufficient for independent lexical/inference pins.", + "results": { + "errors": 0, + "failures": 18, + "skipped": 8, + "tests": 301 + } + } + ], + "evidence_commit_scope": "This record is added after the tested implementation commits; no package or verification code changes.", + "extraction": { + "files": 18, + "geometry_authority": { + "commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "public_gonol_sha256": "55d10c84529a4d7bc7714786357e977b68d9df2ac3f73d20e229580b552c2ef5", + "repository": "The-Interdependency/ucns", + "source_blobs": { + "attachment_codec": "5e761f8e2169ddb24aa6744a8a577ee4aa4989bd", + "attachment_stack": "0ce3879257b40d264749c1b65fff23abf186fded", + "ordinal_affixiation": "9fa84ef20f19fe0c04df680f49b50ea307e6d624", + "public_gonol": "c1955e46e2dc918fb657cb346e42106d71937e91" + } + }, + "source_commit": "251ba2290675a21154582f0b3fb0d7a9d509ed50", + "standing": "exact", + "work_graph_sha256": "a17bdf8c1fda5fec60f7d1b819b48fa493b873c8e3f8997d83144b038fb14dd5" + }, + "graph_sha256": "a17bdf8c1fda5fec60f7d1b819b48fa493b873c8e3f8997d83144b038fb14dd5", + "historical_evidence_unchanged_sha256": { + "stack/corpus-audit.json": "99d26c9aa091e85a741ecbed77cf556807b362857ea756eb37517bd23762b92e", + "stack/local-verification.json": "f62e8f21adfcbb6683f67b0555b38f95a342a3e081c2db7f51e35ebb47359bbb", + "uchc/corpus-audit.json": "99d26c9aa091e85a741ecbed77cf556807b362857ea756eb37517bd23762b92e", + "uchc/local-verification.json": "f62e8f21adfcbb6683f67b0555b38f95a342a3e081c2db7f51e35ebb47359bbb" + }, + "historical_suite_resolution": { + "ENGLISH_GONOL_UCNS_ROOT": "ucns at historical_lexical_test_ucns pin", + "PYTHONPATH": "absolute human/english, programming/python, shared/polyglot", + "UCNS_SOURCE_ROOT": "ucns at native_ucns pin", + "command": "python -m pytest -c /dev/null -q tests ../../programming/python/tests ../../shared/polyglot/tests", + "cwd": "uchc/human/english", + "product_changes": false + }, + "hmmm": [ + "root-endpoint-v1 and exit-heading-v1 remain explicit unselected candidates", + "26 corpus words remain refused; expanded carrier requires supported bearings", + "Numerical definition attachment and punctuation geometry remain unresolved", + "Native sheet lift remains outside this planar profile", + "Hosted verification, terminal review, producer-order merge and authorized publication/reconsumption/graduation remain incomplete" + ], + "hosted_ci": { + "stack": { + "annotation": "The job was not started because your account is locked due to a billing issue.", + "annotation_url": "https://api.github.com/repos/The-Interdependency/stack/check-runs/124472084029/annotations", + "annotations_sha256": "e4ba63d453d99ba274ea6f07623573768e2acb4ef418f43e0a587e5d8754b954", + "check_run_id": 124472084029, + "checks": [ + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910401/job/124472084399", + "id": 124472084399, + "name": "english-gonol-tests", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910418/job/124472084051", + "id": 124472084051, + "name": "input-distinction", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910449/job/124472084035", + "id": 124472084035, + "name": "consistency", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910433/job/124472084029", + "id": 124472084029, + "name": "native-consumer", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910417/job/124472083971", + "id": 124472083971, + "name": "ordinal-source", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910367/job/124472083948", + "id": 124472083948, + "name": "sealed-evidence", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910430/job/124472083936", + "id": 124472083936, + "name": "released-artifact", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910384/job/124472083864", + "id": 124472083864, + "name": "installed-candidate", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910364/job/124472083850", + "id": 124472083850, + "name": "contracts", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910346/job/124472083776", + "id": 124472083776, + "name": "test", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910340/job/124472083759", + "id": 124472083759, + "name": "structural-complete-corpus", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178910363/job/124472083754", + "id": 124472083754, + "name": "contracts", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178907554/job/124472078650", + "id": 124472078650, + "name": "Analyze (python)", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178907554/job/124472078610", + "id": 124472078610, + "name": "Analyze (actions)", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178907554/job/124472078489", + "id": 124472078489, + "name": "Analyze (javascript-typescript)", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/stack/actions/runs/41178905997/job/124472072158", + "id": 124472072158, + "name": "english-gonol-tests", + "status": "completed" + } + ], + "classification": "external account billing lock before test steps", + "conclusion": "failure", + "head": "251ba2290675a21154582f0b3fb0d7a9d509ed50" + }, + "uchc": { + "annotation": "The job was not started because your account is locked due to a billing issue.", + "annotation_url": "https://api.github.com/repos/The-Interdependency/uchc/check-runs/124472228538/annotations", + "annotations_sha256": "75e310cbc62c5abe0e25858879198f7ac404a6a1bc9ab6da4e7dc8e81ea81108", + "check_run_id": 124472228538, + "checks": [ + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/uchc/actions/runs/41178959617/job/124472228538", + "id": 124472228538, + "name": "complete-installed-consumer", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/uchc/actions/runs/41178959600/job/124472228518", + "id": 124472228518, + "name": "work-graph-integrity", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/uchc/actions/runs/41178959632/job/124472228512", + "id": 124472228512, + "name": "polyglot-identity", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/uchc/actions/runs/41178959582/job/124472228504", + "id": 124472228504, + "name": "structural-complete-corpus", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/uchc/actions/runs/41178959574/job/124472228315", + "id": 124472228315, + "name": "installed-geometry", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/uchc/actions/runs/41178959569/job/124472228264", + "id": 124472228264, + "name": "complete-corpus", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/uchc/actions/runs/41178956835/job/124472222700", + "id": 124472222700, + "name": "Analyze (python)", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/uchc/actions/runs/41178956835/job/124472222458", + "id": 124472222458, + "name": "Analyze (actions)", + "status": "completed" + } + ], + "classification": "external account billing lock before test steps", + "conclusion": "failure", + "head": "fabe52e0e180ec508d81dc5e695a867d37a2bc51" + }, + "ucns": { + "annotation": "The job was not started because your account is locked due to a billing issue.", + "annotation_url": "https://api.github.com/repos/The-Interdependency/ucns/check-runs/123844738271/annotations", + "annotations_sha256": "d4abed9511e5ae5cc86897c1730d6150f68502b4bf05c72c304a69da2af86670", + "check_run_id": 123844738271, + "checks": [ + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/ucns/actions/runs/40988417301/job/123844738271", + "id": 123844738271, + "name": "verify (3.12)", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/ucns/actions/runs/40988417301/job/123844738267", + "id": 123844738267, + "name": "verify (3.11)", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/ucns/actions/runs/40988417301/job/123844738012", + "id": 123844738012, + "name": "verify (3.10)", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/ucns/actions/runs/40988415129/job/123844735062", + "id": 123844735062, + "name": "Analyze (actions)", + "status": "completed" + }, + { + "conclusion": "failure", + "details_url": "https://github.com/The-Interdependency/ucns/actions/runs/40988415129/job/123844734862", + "id": 123844734862, + "name": "Analyze (python)", + "status": "completed" + } + ], + "classification": "external account billing lock before test steps", + "conclusion": "failure", + "head": "9cc00771e54336d58ee377faeec87a3a33dbd4bf" + } + }, + "implementation_commits": { + "stack": "251ba2290675a21154582f0b3fb0d7a9d509ed50", + "uchc": "fabe52e0e180ec508d81dc5e695a867d37a2bc51", + "ucns": "9cc00771e54336d58ee377faeec87a3a33dbd4bf" + }, + "implementation_trees": { + "stack": "e4daaf4e55ac98b9f6e210f4ce56f9cc75577789", + "uchc": "676c36089355e5b78982f060c20e77a06efdd76d", + "ucns": "d871b3d8d94abc106e83e9b88c4a403019b83f21" + }, + "initial_heads": { + "stack": "dd0af5fd985a620608b188bb10403775837334c4", + "uchc": "18a464d9442e56b9d76ca2411fa5ac6d4e12cc05", + "ucns": "9cc00771e54336d58ee377faeec87a3a33dbd4bf" + }, + "installed_import_proof": "Noneditable clean wheel and sdist environments; isolated -I imports; native blob identities checked; extraction closure identical in source, wheel and sdist.", + "merge_admission": { + "blocking_gates": [ + "Hosted checks have not executed successfully", + "Complete effective UCNS branch protection policy unreadable", + "Terminal review at current head/base remains unestablished" + ], + "current_head_approval": "none observed", + "merge_order": [ + "ucns", + "stack", + "uchc" + ], + "rulesets": { + "stack": [], + "uchc": [], + "ucns": [] + }, + "stack_main_protected": false, + "standing": "not admitted", + "uchc_main_protected": false, + "ucns_full_protection": "hmmm: HTTP 403; integration lacks administration read access", + "ucns_main_protected": true + }, + "merged": false, + "native_distribution_replay": { + "artifacts_sha256": { + "ucns-0.0.0.dev0-py3-none-any.whl": "e62016ba688e9ef20b4a8adc3a794af8fddf3e971fb772581ffcca6ed9331a97", + "ucns-0.0.0.dev0.tar.gz": "5d9fe7db99f0f0954bf34c434b6f52afd3e03bbe26752f8a578b1fb09e991d59" + }, + "candidate_ratification": "none", + "exact_input_receipt_identity": "91e93c882f8db3391214804fa3a3bdc8c094593158d618653f5a7b9ce2aa8028", + "receipt_sha256": "73c061f783a540f76539ff2ea3de2197bef396ce75f45e2ec863543519801b91", + "status": "passed" + }, + "native_geometry_witnesses": [ + "UCNS DiskStack type, exact glyph headings and dyadic radii", + "closed word recursion and compound participants under both explicit candidates", + "complete corpus source structure, multiplicity, closure and replay", + "producer/carrier drift and missing bearings refuse" + ], + "negative_controls": { + "audit_optimization_mode": "-O", + "extraction_optimization_modes": [ + "-O", + "PYTHONOPTIMIZE=1" + ], + "pre_fix_false_exact_report_sha256": "bfc6225f2ed717a94b9c1ce2dabf9f4d3ab569f5827797c908566c09eb6cb4f8", + "shared_census_mutations": 7 + }, + "observed_at": "2026-10-31T07:09:23.585570+00:00", + "other_gates": { + "build_and_twine": "passed for both packages", + "changed_python_ratios": "passed", + "exact_native_distribution_bytes": "passed", + "git_diff_check": "passed", + "stack_consistency": "passed: 7 repositories, 48 research identities", + "ucns_contracts": "closed", + "workflow_yaml_bash_python_syntax": "passed" + }, + "released": false, + "review_snapshot": { + "stack": { + "base": "9de81c67b271df09c1d9ba5422660c96fe8af7ac", + "draft": false, + "head": "251ba2290675a21154582f0b3fb0d7a9d509ed50", + "mergeable": true, + "merged": false, + "resolved_threads": 0, + "reviews": { + "reviews": [] + }, + "state": "open", + "unresolved_threads": [] + }, + "uchc": { + "base": "45f50ebce04235611223fda13cf67e1a71d45dba", + "draft": false, + "head": "fabe52e0e180ec508d81dc5e695a867d37a2bc51", + "mergeable": true, + "merged": false, + "resolved_threads": 6, + "reviews": { + "reviews": [ + { + "author": { + "avatar_url": "https://avatars.githubusercontent.com/in/1144995?v=4", + "email": null, + "id": null, + "login": "chatgpt-codex-connector", + "name": "chatgpt-codex-connector" + }, + "body": "\n\n\n### \ud83d\udca1 Codex Review\n\nHere are some automated review suggestions for this pull request.\n\n**Reviewed commit:** `07d83b2824`\n \n\n
\u2139\ufe0f About Codex in GitHub\n
\n\n[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you\n- Open a pull request for review\n- Mark a draft as ready\n- Comment \"@codex review\".\n\nIf Codex has suggestions, it will comment; otherwise it will react with \ud83d\udc4d.\n\n\n\n\nCodex can also answer questions or update the PR. Try commenting \"@codex address that feedback\".\n \n
", + "id": "PRR_kwDOUi3exM8AAAABTE_tIg", + "state": "COMMENTED", + "submitted_at": "2026-10-19T17:29:12Z" + }, + { + "author": { + "avatar_url": "https://avatars.githubusercontent.com/u/250928284?u=0560d31094b3002a9f20474298720fcba2e06acd&v=4", + "email": null, + "id": null, + "login": "erinepshovel-code", + "name": "erinepshovel-code" + }, + "body": "", + "id": "PRR_kwDOUi3exM8AAAABTFE6KQ", + "state": "COMMENTED", + "submitted_at": "2026-10-19T17:37:00Z" + }, + { + "author": { + "avatar_url": "https://avatars.githubusercontent.com/u/250928284?u=0560d31094b3002a9f20474298720fcba2e06acd&v=4", + "email": null, + "id": null, + "login": "erinepshovel-code", + "name": "erinepshovel-code" + }, + "body": "", + "id": "PRR_kwDOUi3exM8AAAABTFE8Jg", + "state": "COMMENTED", + "submitted_at": "2026-10-19T17:37:03Z" + }, + { + "author": { + "avatar_url": "https://avatars.githubusercontent.com/u/250928284?u=0560d31094b3002a9f20474298720fcba2e06acd&v=4", + "email": null, + "id": null, + "login": "erinepshovel-code", + "name": "erinepshovel-code" + }, + "body": "", + "id": "PRR_kwDOUi3exM8AAAABTFE-Ww", + "state": "COMMENTED", + "submitted_at": "2026-10-19T17:37:06Z" + }, + { + "author": { + "avatar_url": "https://avatars.githubusercontent.com/in/1144995?v=4", + "email": null, + "id": null, + "login": "chatgpt-codex-connector", + "name": "chatgpt-codex-connector" + }, + "body": "\n\n\n### \ud83d\udca1 Codex Review\n\nHere are some automated review suggestions for this pull request.\n\n**Reviewed commit:** `c514e1a2a3`\n \n\n
\u2139\ufe0f About Codex in GitHub\n
\n\n[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you\n- Open a pull request for review\n- Mark a draft as ready\n- Comment \"@codex review\".\n\nIf Codex has suggestions, it will comment; otherwise it will react with \ud83d\udc4d.\n\n\n\n\nCodex can also answer questions or update the PR. Try commenting \"@codex address that feedback\".\n \n
", + "id": "PRR_kwDOUi3exM8AAAABTFKNew", + "state": "COMMENTED", + "submitted_at": "2026-10-19T17:43:56Z" + } + ] + }, + "state": "open", + "unresolved_threads": [] + }, + "ucns": { + "base": "ed0b0760f05cd975a7a811f8abeb70a11d09f00b", + "draft": false, + "head": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "mergeable": true, + "merged": false, + "resolved_threads": 0, + "reviews": { + "reviews": [] + }, + "state": "open", + "unresolved_threads": [] + } + }, + "schema": "english.recursive-integration-local-evidence.v2", + "skill_lib_commit": "d71a3a938cb6d646ffc0b59186452117e4a37d13", + "standing": "locally verified candidate; hosted verification and merge admission incomplete", + "test_results": { + "stack_complete": { + "errors": 0, + "failures": 0, + "junit_sha256": "3fd262f68a3b6fd666580e212e79ee5fb28331321d47a60d891608b504a4d41f", + "skipped": 0, + "tests": 13 + }, + "stack_focused": { + "errors": 0, + "failures": 0, + "junit_sha256": "0c4a0dae05b8498372b0dc495b8c1234f8e6e06f401f15652f5d47280f4e7a3c", + "skipped": 0, + "tests": 7 + }, + "uchc_historical": { + "errors": 0, + "failures": 0, + "junit_sha256": "d6679b203e7cdf74d0298a0afc2acf492ffa755e18bb0285d744a6b839e68243", + "skipped": 0, + "tests": 301 + }, + "uchc_installed_complete": { + "errors": 0, + "failures": 0, + "junit_sha256": "d5e56e8dc2e6c7c6649a447e9a28882fe02d49db86fccc124737f441f0b5ed5f", + "skipped": 0, + "tests": 13 + }, + "uchc_sdist_focused": { + "errors": 0, + "failures": 0, + "junit_sha256": "4cad16ebf1402ff016d868fd82ffabeac2971dd3bffdd11b7d5dd6a1d19ac089", + "skipped": 0, + "tests": 7 + }, + "uchc_verifier": { + "errors": 0, + "failures": 0, + "junit_sha256": "36183aa58f5f477f22ad39ec50dea5985b739d0e0777f191e00ad5b30d3234ec", + "skipped": 0, + "tests": 1 + }, + "uchc_wheel_focused": { + "errors": 0, + "failures": 0, + "junit_sha256": "7b6e21fa07a0a29db33296caf21dcef7f4b0d4b27b1d3e848e44802f24b01cee", + "skipped": 0, + "tests": 7 + }, + "ucns_sdist": { + "errors": 0, + "failures": 0, + "junit_sha256": "2c033807865f92b1f344180dccf950046a93d32a6ffd68185880eaafac18e610", + "skipped": 0, + "tests": 303 + }, + "ucns_source": { + "errors": 0, + "failures": 0, + "skipped": 0, + "tests": 303 + }, + "ucns_wheel": { + "errors": 0, + "failures": 0, + "junit_sha256": "586eae390dc1b9c1e64e564da6c0820395417b34eca71239183449202fb24064", + "skipped": 0, + "tests": 303 + } + }, + "uchc_artifacts_sha256": { + "uchc-0.1.0a4-py3-none-any.whl": "e6a5fe38334bda30fc1158652e9badee91f20d35bcb00a1544d75d1285399cb2", + "uchc-0.1.0a4.tar.gz": "071463636bbe916211c035a1df08c47e6d7ba27506d5ee41907fd60e59c374f1" + } +} diff --git a/research/english-gonol/experiments/recursive-attachment-v1/local-verification.json b/research/english-gonol/experiments/recursive-attachment-v1/local-verification.json new file mode 100644 index 00000000..b77b1a1b --- /dev/null +++ b/research/english-gonol/experiments/recursive-attachment-v1/local-verification.json @@ -0,0 +1,246 @@ +{ + "archive_permission_normalization": [ + "LICENSE: 0664 to 0644", + "NOTICE: 0664 to 0644" + ], + "artifacts_sha256": { + "authority/consumer-committed-dist/uchc-0.1.0a4-py3-none-any.whl": "a5ad321549152411ff736124a09d50ea665603d5d8be791ecd2e2e85039b45cd", + "ucns/dist/ucns-0.0.0.dev0-py3-none-any.whl": "ccdbb2de6228e153e9e9065ff7aa9c099f87371fa1c55206b001535d9c51464d", + "ucns/dist/ucns-0.0.0.dev0.tar.gz": "5c5de04e6431fc79ad5f5c7a090d47c8f220209ef877f555502f998d2e3638b3" + }, + "attribution": "GPT generated; context, prompt Erin Spencer.", + "authority_transfer": false, + "bearing_selection": "none", + "cli_operations": [ + { + "operation": [ + "word", + "bull" + ], + "sha256": "b9add37dbdd3e65832054adcdd190151241667bc3973f7f792df404dd04dcbfb" + }, + { + "operation": [ + "compound", + "bull", + "shit" + ], + "sha256": "c15836e0ef0d4778523be891760bf32ed22176983deb0a6ab72ccc447259e695" + }, + { + "operation": [ + "sequence", + "bull", + "shit", + "--bearing", + "root-endpoint-v1" + ], + "sha256": "f11e62b7feaa3ea559dd3423592613bb358af3844f4ef4bf5bfb9b234df8be79" + }, + { + "operation": [ + "sequence", + "bull", + "shit", + "--bearing", + "exit-heading-v1" + ], + "sha256": "49ab6d6833a94fac1b7ebf7b450dcead118ea46fec8871b3d4ea6de03997556f" + } + ], + "corpus_build_pyyaml": "6.0.3", + "extraction": { + "files": 18, + "geometry_authority": { + "commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "public_gonol_sha256": "55d10c84529a4d7bc7714786357e977b68d9df2ac3f73d20e229580b552c2ef5", + "repository": "The-Interdependency/ucns", + "source_blobs": { + "attachment_codec": "5e761f8e2169ddb24aa6744a8a577ee4aa4989bd", + "attachment_stack": "0ce3879257b40d264749c1b65fff23abf186fded", + "ordinal_affixiation": "9fa84ef20f19fe0c04df680f49b50ea307e6d624", + "public_gonol": "c1955e46e2dc918fb657cb346e42106d71937e91" + } + }, + "source_commit": "86a5fb1936dc6ca04ad6fb9bb161ea3fd7f4da88", + "standing": "exact", + "work_graph_sha256": "a8e9be098fc1fb21bbf8af555ee0271377f9114263dad2bf259ce27847155603" + }, + "extraction_verifier": "checks both pinned committed Git blobs and working tree bytes", + "hmmm": [ + "Closed-word bearing functional unselected", + "Numerical definition attachment, punctuation geometry, expanded carrier and native sheet lift remain open", + "Hosted CI and stable release/graduation remain incomplete" + ], + "hosted_ci": "failed before any job steps; cause not established", + "hosted_ci_evidence": { + "stack": { + "jobs": [ + { + "conclusion": "failure", + "name": "native-consumer", + "steps": [] + } + ], + "run": 40988619431 + }, + "uchc": { + "jobs": [ + { + "conclusion": "failure", + "name": "complete-installed-consumer", + "steps": [] + } + ], + "run": 40989143484 + }, + "ucns": { + "jobs": [ + { + "conclusion": "failure", + "name": "verify (3.10)", + "steps": [] + }, + { + "conclusion": "failure", + "name": "verify (3.11)", + "steps": [] + }, + { + "conclusion": "failure", + "name": "verify (3.12)", + "steps": [] + } + ], + "run": 40988417301 + } + }, + "independent_handoff_review": "all 18 files matched immutable Stack Git blobs; no substantive findings", + "installed_corpus_audit": { + "counts": { + "constructed_words": 103027, + "definitions": 185155, + "formerly_compound_definitions": 57155, + "refused_words": 26, + "words": 103053 + }, + "definition_stream_sha256": "9d28ce7be9d073498b20ebd1064a71911d05822d363ffa4e3a2f4a455d69d59f", + "field_receipt": "26ab095f73306ff4fbd9f67d1c282c1df79f926bb75cc081c879db8a6989b58a", + "geometry_authority": { + "commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "public_gonol_sha256": "55d10c84529a4d7bc7714786357e977b68d9df2ac3f73d20e229580b552c2ef5", + "repository": "The-Interdependency/ucns", + "source_blobs": { + "attachment_codec": "5e761f8e2169ddb24aa6744a8a577ee4aa4989bd", + "attachment_stack": "0ce3879257b40d264749c1b65fff23abf186fded", + "ordinal_affixiation": "9fa84ef20f19fe0c04df680f49b50ea307e6d624", + "public_gonol": "c1955e46e2dc918fb657cb346e42106d71937e91" + } + }, + "hmmm": [ + "Numerical definition attachment and bearing selection remain open." + ], + "receipt": "10b484f2e025f39160a6af7f67d3da5b3f88732d42288361347a2345f7216dd7", + "schema": "english.attachment-corpus-audit.v1", + "scope": "all corpus words and all definition ownership overlays; no bearing candidate selected", + "unplaced_glyph_word_counts": { + "\u00e1": 1, + "\u00e4": 1, + "\u00e7": 3, + "\u00e9": 8, + "\u00ea": 1, + "\u00eb": 1, + "\u00f0": 1, + "\u00f1": 3, + "\u00f2": 2, + "\u0161": 1, + "\u02b0": 1, + "\u03b8": 1, + "\u042a": 1, + "\u042c": 1, + "\u044a": 1, + "\u044c": 1 + }, + "word_stream_sha256": "a8a1c8248ad97711055dacb698f863a3fe8d36eb29013391900d7506da37edc1" + }, + "installed_verification_pyyaml": "6.0.2", + "native_confirmation_sdist": { + "errors": 0, + "failures": 0, + "skipped": 0, + "tests": 303 + }, + "native_confirmation_wheel": { + "errors": 0, + "failures": 0, + "skipped": 0, + "tests": 303 + }, + "native_distribution_replay": { + "artifacts_sha256": { + "ucns-0.0.0.dev0-py3-none-any.whl": "ccdbb2de6228e153e9e9065ff7aa9c099f87371fa1c55206b001535d9c51464d", + "ucns-0.0.0.dev0.tar.gz": "5c5de04e6431fc79ad5f5c7a090d47c8f220209ef877f555502f998d2e3638b3" + }, + "exact_input_receipt_identity": "5d9593d7c7c8dd2d240682bf53f968032194a63c6acd749ce233d2166f53e07c", + "receipt_sha256": "b590b990cd31823212f0cad1f541b37b04cfafe5cdeff2c211b405bc816f0b7c", + "status": "passed" + }, + "native_first_wheel": { + "failed_tests": [ + "test_geometry_suite_rejects_nonpasses", + "test_missing_capability_and_timeout_are_enforced" + ], + "isolated_unchanged_retry": { + "errors": 0, + "failures": 0, + "skipped": 0, + "tests": 2 + }, + "results": { + "errors": 0, + "failures": 2, + "skipped": 0, + "tests": 303 + }, + "thresholds_changed": false + }, + "python": "3.12.14", + "schema": "english.recursive-integration-local-evidence.v1", + "source_census_comparison": { + "prepin_source_audit_sha256": "c1df7ff97adf1d1b9bf49b10aa912369c1fddb087021cab2f763c5c03df3428b", + "reason": "Source report had PENDING_NATIVE_COMMIT; installed report binds the final immutable producer.", + "standing": "exact word and definition streams, counts and source blobs; source process began before commit metadata was filled", + "whole_report_equality": false + }, + "sqlite_build_version": "3.53.1", + "stack_source_commit": "86a5fb1936dc6ca04ad6fb9bb161ea3fd7f4da88", + "test_results": { + "consumer_complete_source": { + "errors": 0, + "failures": 0, + "skipped": 0, + "tests": 6 + }, + "consumer_installed": { + "errors": 0, + "failures": 0, + "skipped": 0, + "tests": 11 + }, + "consumer_source": { + "errors": 0, + "failures": 0, + "skipped": 0, + "tests": 5 + }, + "ucns_source": { + "errors": 0, + "failures": 0, + "skipped": 0, + "tests": 303 + } + }, + "uchc_clean_archive_wheel_equals_tested": true, + "uchc_source_commit": "8ac9ba88a40af24d332453c93d6357ccf1fb9fa7", + "ucns_commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf" +} diff --git a/research/english-gonol/ordinal_tests/test_attachment_construction.py b/research/english-gonol/ordinal_tests/test_attachment_construction.py new file mode 100644 index 00000000..219ee8b7 --- /dev/null +++ b/research/english-gonol/ordinal_tests/test_attachment_construction.py @@ -0,0 +1,211 @@ +# ratios: loc_comments=141:53 imports_exports=14:7 calls_definitions=86:7 +# === CHECKS === +# id: check_english_word_uses_native_attachment_and_exact_views +# proves: english_attachment_native_authority +# call: self::test_word_uses_native_attachment_and_exact_views +# requires: pytest, pinned_ucns +# mutates: none +# cleanup: context_manager +# id: check_english_recursive_word_stack_requires_explicit_candidate +# proves: english_attachment_bearing_boundary +# call: self::test_recursive_word_stack_requires_explicit_candidate +# requires: pytest, pinned_ucns +# mutates: none +# cleanup: context_manager +# id: check_english_compound_keeps_boundary_and_replays +# proves: english_attachment_native_authority +# call: self::test_compound_keeps_boundary_and_replays +# requires: pytest, pinned_ucns +# mutates: none +# cleanup: context_manager +# id: check_english_no_false_native_or_carrier_provenance +# proves: english_attachment_native_authority +# call: self::test_no_false_native_or_carrier_provenance +# requires: pytest, pinned_ucns +# mutates: filesystem +# cleanup: pytest_fixture_teardown +# id: check_english_partial_corpus_and_whole_lexical_owner +# proves: english_attachment_source_structure, english_attachment_lexical_owner +# call: self::test_partial_corpus_and_whole_lexical_owner +# requires: pytest, pinned_ucns +# mutates: filesystem +# cleanup: pytest_fixture_teardown +# === END CHECKS === +# === CHECKS === +# id: check_attachment_census_rejects_shared_regressions +# proves: english_attachment_census_baseline +# call: self::test_census_rejects_shared_regressions +# mutates: none +# cleanup: none +# id: check_attachment_audit_refuses_disabled_assertions +# proves: english_attachment_census_baseline +# call: self::test_audit_refuses_disabled_assertions +# mutates: none +# cleanup: subprocess_exit +# === END CHECKS === +# SPDX-License-Identifier: FSL-1.1-ALv2 +# Copyright 2026 Erin Spencer +"""Native consumer tests: pytest -c /dev/null ordinal_tests/test_attachment_construction.py. + +GPT generated; context, prompt Erin Spencer. +Corpus fixtures test admission refusals and typed ownership only; no partial +fixture is represented as verified Public Gonol corpus geometry. +""" +from copy import deepcopy +from fractions import Fraction +import json +from pathlib import Path +import subprocess +import sys + +import pytest + +from english_gonol import attachment_construction as api +from english_gonol.attachment_audit import verify_report +from english_gonol.ordinal_construction import OrdinalGeometryError +from english_gonol.language.source import LexemeRecord, SenseRecord, SynsetRecord, WordnetSnapshot +from english_gonol.structural_construct import build +from ucns.attachment_stack import DiskStack, Closed, stack, display +from ucns.attachment_codec import export_graph, replay_graph + + +def test_word_uses_native_attachment_and_exact_views(): + word = api.construct_word('bull') + assert isinstance(word, DiskStack) + assert [r.radius for r in word.rays] == [Fraction(1, 16), Fraction(1, 8), Fraction(1, 4), Fraction(1, 2)] + assert [r.heading.turn for r in word.rays] == [Fraction(i, 157) for i in (83, 66, 22, 135)] + packet = json.loads(json.dumps(api.word_record(word))) + assert packet['geometry_authority'] == api.authority() + assert replay_graph(packet['graph']).recover() == tuple('bull') + assert packet['disk_depths'] == [4, 3, 2, 1] + + +def test_recursive_word_stack_requires_explicit_candidate(): + words = tuple(api.construct_word(w) for w in ('on', 'the', 'on')) + with pytest.raises(OrdinalGeometryError, match='CLOSED_WORD_BEARING_POLICY_REQUIRED'): + api.construct_sequence(words) + for policy in ('root-endpoint-v1', 'exit-heading-v1'): + obj = api.construct_sequence(words, bearing=policy) + assert [obj.depth(i) for i in range(3)] == [3, 2, 1] + assert obj.recover() == tuple('ontheon') + assert obj.participants[0].interior is words[0] + assert replay_graph(export_graph(obj)).recover() == obj.recover() + assert abs(display(obj.endpoint)) > 0 + with pytest.raises(OrdinalGeometryError, match='CLOSED_WORD_PARTICIPANTS_REQUIRED'): + api.construct_sequence((), bearing='exit-heading-v1') + + +def test_compound_keeps_boundary_and_replays(): + left, right = api.construct_word('bull'), api.construct_word('shit') + record = api.construct_compound(left, right) + assert record['attachment_ordinal'] == 3 + assert api.replay_compound(json.loads(json.dumps(record))) == record + assert record['components'][0]['graph']['root'] == left.receipt + assert record['components'][1]['graph']['root'] == right.receipt + compound = replay_graph(record['graph']) + for policy in ('root-endpoint-v1', 'exit-heading-v1'): + parent = api.construct_sequence((compound, left), bearing=policy) + assert parent.recover() == tuple('bullshitbull') + for mutate in ( + lambda r: r.update(attachment_ordinal=2), + lambda r: r['components'].reverse(), + lambda r: r['incoming_rows'][0].update(origin=[]), + lambda r: r['geometry_authority'].update(commit='0' * 40), + ): + bad = deepcopy(record); mutate(bad) + with pytest.raises(OrdinalGeometryError, match='COMPOUND_REPLAY_MISMATCH'): + api.replay_compound(bad) + + +def test_no_false_native_or_carrier_provenance(tmp_path, monkeypatch): + native, _codec = api._native() + forged = tmp_path / 'producer.py'; forged.write_text('changed producer\n') + with monkeypatch.context() as patch: + patch.setattr(native, '__file__', str(forged)) + api._native.cache_clear() + with pytest.raises(OrdinalGeometryError, match='UCNS_ATTACHMENT_PRODUCER_DRIFT'): + api.construct_word('word') + api._native.cache_clear() + with monkeypatch.context() as patch: + patch.setattr(native, '__file__', str(tmp_path / 'missing.py')) + api._native.cache_clear() + with pytest.raises(OrdinalGeometryError, match='UCNS_ATTACHMENT_PRODUCER_REQUIRED'): + api.construct_word('word') + api._native.cache_clear() + importer = api.importlib.import_module + with monkeypatch.context() as patch: + def missing(name): + if name == 'ucns.attachment_stack': + raise ModuleNotFoundError(name) + return importer(name) + patch.setattr(api.importlib, 'import_module', missing) + api._native.cache_clear() + with pytest.raises(OrdinalGeometryError, match='UCNS_ATTACHMENT_PRODUCER_REQUIRED'): + api.construct_word('word') + api._native.cache_clear() + for text in ('word word', 'é', '🦄', ''): + with pytest.raises(OrdinalGeometryError): + api.construct_word(text) + word = api.construct_word('word') + other = stack(word.identity, word.participants, relation='unrelated', source=word.source) + with pytest.raises(OrdinalGeometryError, match='PUBLIC_GONOL_WORD_STACK_REQUIRED'): + api.word_record(other) + + +def test_partial_corpus_and_whole_lexical_owner(tmp_path): + source = WordnetSnapshot( + lexemes=(LexemeRecord('bull shit', 'n', (), (SenseRecord('s1', 'n1', ()),)),), + synsets=(SynsetRecord('n1', 'n', ('bull shit',), ('bull shit.',), ()),), + source_tree_sha256='0' * 64, source_file_count=1) + output = tmp_path / 'fixture' + build(source, out_dir=output, public_position=lambda _c: None, producer={'standing': 'fixture-only'}) + with api.RecursiveStructuralField(output, bearing='exit-heading-v1') as field: + query = field.construct(' bull shit. ') + assert field.geometry(query, operation='recursive-stack')['code'] == 'COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL' + assert field.compose(field.construct('bull shit'), relation='sentence')['code'] == 'SENTENCE_CLOSURE_UNRESOLVED' + rid = field.db.execute("SELECT id FROM records WHERE kind='definition'").fetchone()[0] + definition = field.definition(rid) + owner = definition['lexical_owner'] + assert owner['kind'] == 'lexical-construction' and owner['text'] == 'bull shit' + assert [p['kind'] for p in owner['parts']] == ['word', 'character', 'word'] + assert definition['origin']['owner_record_id'] == owner['record_id'] + assert 'word_id' not in definition['origin'] + assert definition['definition_succession']['ordinal'] == 0 + assert definition['historical_origin']['state'] == 'hmmm:compound-lexical-origin' + assert all(p['owner'] == definition['origin'] for p in definition['constituent_direct']) +def test_census_rejects_shared_regressions(): + """Equal consumer outputs must still fail when both regress from the baseline.""" + baseline = {'counts': {'words': 103053, 'constructed_words': 103027, + 'refused_words': 26, 'definitions': 185155, + 'formerly_compound_definitions': 57155}, + 'word_stream_sha256': 'a' * 64, 'definition_stream_sha256': 'b' * 64, + 'unplaced_glyph_word_counts': {'é': 8}, 'field_receipt': 'c' * 64, + 'geometry_authority': {'commit': api.UCNS_COMMIT}} + verify_report(json.loads(json.dumps(baseline)), baseline) + for mutate in ( + lambda r: r['counts'].update(constructed_words=103026, refused_words=27), + lambda r: r['counts'].update(definitions=185154), + lambda r: r.update(word_stream_sha256='0' * 64), + lambda r: r.update(definition_stream_sha256='0' * 64), + lambda r: r['unplaced_glyph_word_counts'].update(é=7), + lambda r: r.update(field_receipt='0' * 64), + lambda r: r['geometry_authority'].update(commit='0' * 40), + ): + forge = deepcopy(baseline) + mutate(forge) + installed = deepcopy(forge) + assert installed == forge + for observed in (forge, installed): + with pytest.raises(ValueError, match='CENSUS_BASELINE_MISMATCH'): + verify_report(observed, baseline) + + +def test_audit_refuses_disabled_assertions(): + """Reject -O before opening a corpus or reporting verification success.""" + package_root = str(Path(api.__file__).resolve().parents[1]) + code = (f'import sys; sys.path.insert(0, {package_root!r}); ' + 'from english_gonol.attachment_audit import audit; audit("unused")') + result = subprocess.run([sys.executable, '-I', '-O', '-c', code], capture_output=True, text=True) + assert result.returncode != 0 and not result.stdout + assert 'OPTIMIZED_AUDIT_FORBIDDEN' in result.stderr +# ratios: loc_comments=141:53 imports_exports=14:7 calls_definitions=86:7 diff --git a/research/english-gonol/ordinal_tests/test_attachment_corpus.py b/research/english-gonol/ordinal_tests/test_attachment_corpus.py new file mode 100644 index 00000000..3bb851a3 --- /dev/null +++ b/research/english-gonol/ordinal_tests/test_attachment_corpus.py @@ -0,0 +1,96 @@ +# ratios: loc_comments=56:27 imports_exports=5:4 calls_definitions=22:4 +# === CHECKS === +# id: check_english_complete_query_retains_source_and_occurrences +# proves: english_attachment_source_structure +# call: self::test_complete_query_retains_source_and_occurrences +# requires: pytest, pinned_ucns +# mutates: none +# cleanup: context_manager +# id: check_english_no_policy_is_a_narrow_bearing_boundary +# proves: english_attachment_bearing_boundary +# call: self::test_no_policy_is_a_narrow_bearing_boundary +# requires: pytest, pinned_ucns +# mutates: none +# cleanup: context_manager +# id: check_english_endpoint_candidate_preserves_corpus_closure +# proves: english_attachment_source_structure +# call: self::test_endpoint_candidate_preserves_corpus_closure +# requires: pytest, pinned_ucns +# mutates: none +# cleanup: context_manager +# === END CHECKS === +# SPDX-License-Identifier: FSL-1.1-ALv2 +# Copyright 2026 Erin Spencer +"""Complete-corpus consumer acceptance, with no admission or geometry mocks. + +GPT generated; context, prompt Erin Spencer. +Usage: UCHC_STRUCTURAL_FIELD=/path/to/verified/field pytest -c /dev/null +ordinal_tests/test_attachment_corpus.py. Missing corpus is a failure. +""" +import json +import os + +import pytest + +from english_gonol.attachment_construction import RecursiveStructuralField, authority +from ucns.attachment_codec import replay_graph + + +@pytest.fixture(scope='module') +def field(): + path = os.environ.get('UCHC_STRUCTURAL_FIELD') + if not path: + pytest.fail('UCHC_STRUCTURAL_FIELD must name the complete verified corpus') + with RecursiveStructuralField(path, bearing='exit-heading-v1') as opened: + assert opened.complete_corpus + yield opened + + +@pytest.mark.parametrize('text', ('word', 'word word', ' word word ', 'word word.')) +def test_complete_query_retains_source_and_occurrences(field, text): + word = field.word('word') + assert word['gonal_order'] == word['attachment_geometry']['graph'] + assert 'attachment' not in word and 'definition_attachment' not in word + assert word['historical_structural_geometry']['gonal_order'] == 'hmmm:UCNS_OPERATION_REQUIRED' + query = field.construct(text) + result = field.geometry(query, operation='recursive-stack') + assert result['standing'] == 'constructed' + assert result['source_structure'] == query + assert result['geometry_authority'] == authority() + assert result['bearing_standing'] == 'unselected-candidate' + words = [p for p in query['parts'] if p['kind'] == 'word'] + assert len(result['word_occurrences']) == len(words) + assert len(result['word_interiors']) == 1 + obj = replay_graph(json.loads(json.dumps(result['word_stack']))) + assert len(obj.participants) == len(words) + assert obj.recover() == tuple('word' * len(words)) + assert result['source_structure']['word_sites'] == query['word_sites'] + assert [p['part_ordinal'] for p in result['word_occurrences']] == [p['ordinal'] for p in words] + sentence = field.compose(query, relation='sentence') + assert sentence['standing'] == ('logically-closed' if text.endswith('.') else 'refused') + + +def test_no_policy_is_a_narrow_bearing_boundary(field): + old = field.bearing + try: + field.bearing = None + result = field.geometry(field.construct('word word'), operation='recursive-stack') + assert result['standing'] == 'partial' + assert result['code'] == 'CLOSED_WORD_BEARING_POLICY_REQUIRED' + assert len(result['word_occurrences']) == 2 and len(result['word_interiors']) == 1 + finally: + field.bearing = old + + +def test_endpoint_candidate_preserves_corpus_closure(field): + old = field.bearing + try: + field.bearing = 'root-endpoint-v1' + query = field.construct('word word.') + result = field.compose(query, relation='sentence') + assert result['standing'] == 'logically-closed' + obj = replay_graph(result['attachment_geometry']['word_stack']) + assert obj.recover() == tuple('wordword') + finally: + field.bearing = old +# ratios: loc_comments=56:27 imports_exports=5:4 calls_definitions=22:4 diff --git a/research/english-gonol/ordinal_tests/test_ordinal_construction.py b/research/english-gonol/ordinal_tests/test_ordinal_construction.py new file mode 100644 index 00000000..ade9fe22 --- /dev/null +++ b/research/english-gonol/ordinal_tests/test_ordinal_construction.py @@ -0,0 +1,247 @@ +# ratios: loc_comments=155:63 imports_exports=8:10 calls_definitions=76:10 +# SPDX-License-Identifier: FSL-1.1-ALv2 +# Copyright 2026 Erin Spencer +# === CHECKS === +# id: check_ordinal_ucns_exact_prefixes +# proves: uchc_ordinal_ucns_is_the_sole_geometry_authority, uchc_ordinal_glyph_occurrences_preserve_geometry +# call: self::test_word_prefixes_and_exact_positions +# requires: python3, pytest +# timeout: 30 +# mutates: none +# cleanup: none +# id: check_ordinal_repeated_glyphs +# proves: uchc_ordinal_glyph_occurrences_preserve_geometry +# call: self::test_repeated_glyphs_keep_angle_and_distinct_radii +# requires: python3, pytest +# timeout: 30 +# mutates: none +# cleanup: none +# id: check_ordinal_missing_public_angles +# proves: uchc_ordinal_no_fabricated_angles +# call: self::test_missing_public_gonol_angles_fail_closed +# requires: python3, pytest +# timeout: 30 +# mutates: none +# cleanup: none +# id: check_ordinal_space_is_reference +# proves: uchc_ordinal_no_fabricated_angles +# call: self::test_space_is_origin_not_radial_glyph +# requires: python3, pytest +# timeout: 30 +# mutates: none +# cleanup: none +# id: check_ordinal_source_drift +# proves: uchc_ordinal_no_fabricated_angles +# call: self::test_source_drift_refuses +# requires: python3, pytest +# timeout: 30 +# mutates: filesystem +# cleanup: pytest_tmp_path +# id: check_ordinal_rejects_unrelated_ucns_frames +# proves: uchc_ordinal_ucns_is_the_sole_geometry_authority, uchc_ordinal_no_fabricated_angles +# call: self::test_geometry_record_never_mislabels_non_glyph_frames +# requires: python3, pytest +# timeout: 30 +# mutates: none +# cleanup: none +# id: check_ordinal_partial_corpus +# proves: uchc_ordinal_no_fabricated_angles, uchc_ordinal_query_consumes_verified_word_interiors +# call: self::test_partial_corpus_refuses_public_binding +# requires: python3, pytest +# timeout: 60 +# mutates: filesystem +# cleanup: pytest_tmp_path +# id: check_ordinal_reconstruction +# proves: uchc_ordinal_glyph_occurrences_preserve_geometry +# call: self::test_all_short_sequences_match_independent_append_oracle +# requires: python3, pytest +# timeout: 30 +# mutates: none +# cleanup: none +# === END CHECKS === + +"""UCHC consumer contract: run with pinned UCNS installed (no UCNS stubs).""" +from fractions import Fraction +from itertools import product +import importlib +from pathlib import Path + +import pytest + +from english_gonol.ordinal_construction import ( + OrdinalGeometryError, + OrdinalStructuralField, + _ucns, + construct_glyph_gonol, + geometry_record, + PUBLIC_GONOL_SHA256, + UCNS_COMMIT, +) +from english_gonol.language.source import LexemeRecord, SenseRecord, SynsetRecord, WordnetSnapshot +from english_gonol.structural_construct import build + +ordinal = importlib.import_module("ucns.ordinal_affixiation") +public = importlib.import_module("ucns.public_gonol") + + +def test_word_prefixes_and_exact_positions(): + assert public.public_gonol_position(" ") == 0 + cases = ("w", "wo", "wor", "word") + for source in cases: + result = construct_glyph_gonol(source) + assert isinstance(result, ordinal.Construction) + assert result.origin == "SPACE" + assert result.recover() == tuple(source) + assert [result.placement(i).radius() for i in range(len(source))] == [ + Fraction(1, 2 ** (len(source) - i)) for i in range(len(source)) + ] + assert [result.placement(i).turn for i in range(len(source))] == [ + Fraction(public.public_gonol_position(glyph), 157) for glyph in source + ] + + word = construct_glyph_gonol("word") + assert [word.placement(i).radius() for i in range(4)] == [ + Fraction(1, 16), Fraction(1, 8), Fraction(1, 4), Fraction(1, 2) + ] + record = geometry_record(word) + assert record["geometry_authority"]["commit"] == UCNS_COMMIT + assert record["geometry_authority"]["public_gonol_sha256"] == PUBLIC_GONOL_SHA256 + assert record["recovered_glyphs"] == list("word") + assert [p["radius"]["power_of_two_denominator"] for p in record["construction"]["placements"]] == [4, 3, 2, 1] + assert record["receipt"] == word.receipt + + +def test_repeated_glyphs_keep_angle_and_distinct_radii(): + obj = construct_glyph_gonol("wow") + assert obj.participants[0].identity == obj.participants[2].identity == "w" + assert obj.placement(0).turn == obj.placement(2).turn + assert obj.placement(0).radius() == Fraction(1, 8) + assert obj.placement(2).radius() == Fraction(1, 2) + assert obj.recover() == ("w", "o", "w") + assert construct_glyph_gonol("wow", source="v1").receipt != construct_glyph_gonol("wow", source="v2").receipt + + +def test_all_short_sequences_match_independent_append_oracle(): + for n in range(1, 6): + for chars in product("wo", repeat=n): + obj = construct_glyph_gonol("".join(chars)) + radii = [] + for _ in chars: + radii = [old / 2 for old in radii] + [Fraction(1, 2)] + assert [obj.placement(i).radius() for i in range(n)] == radii + assert obj.recover() == chars + + +def test_missing_public_gonol_angles_fail_closed(): + for invalid, code in ( + ("", "NONEMPTY_GLYPH_SEQUENCE_REQUIRED"), + (None, "NONEMPTY_GLYPH_SEQUENCE_REQUIRED"), + ("\ud800", "UNICODE_SCALAR_REQUIRED"), + ("w🦄", "PUBLIC_GONOL_ANGLE_UNAVAILABLE"), + ("é", "PUBLIC_GONOL_ANGLE_UNAVAILABLE"), + ): + with pytest.raises(OrdinalGeometryError) as exc: + construct_glyph_gonol(invalid) + assert exc.value.code == code + with pytest.raises(OrdinalGeometryError) as exc: + construct_glyph_gonol("word", source="") + assert exc.value.code == "SOURCE_IDENTITY_REQUIRED" + assert public.public_gonol_sha256() == PUBLIC_GONOL_SHA256 + + +def test_space_is_origin_not_radial_glyph(): + assert public.public_gonol_position(" ") == 0 + for text in (" ", "w o", "word "): + with pytest.raises(OrdinalGeometryError) as exc: + construct_glyph_gonol(text) + assert exc.value.code == "SPACE_SEAM_REQUIRES_FRAME_ATTACHMENT" + + +def test_source_drift_refuses(tmp_path, monkeypatch): + fixture = tmp_path / "forged.py" + fixture.write_text("def affine_radius(i): return 17\n", encoding="utf-8") + with monkeypatch.context() as patch: + patch.setattr(ordinal, "__file__", str(fixture)) + _ucns.cache_clear() + with pytest.raises(OrdinalGeometryError) as exc: + construct_glyph_gonol("word") + assert exc.value.code == "UCNS_PRODUCER_DRIFT" + _ucns.cache_clear() + assert construct_glyph_gonol("word").recover() == tuple("word") + + with monkeypatch.context() as patch: + patch.setattr(public, "PUBLIC_GONOL_SHA256", "0" * 64) + _ucns.cache_clear() + with pytest.raises(OrdinalGeometryError) as exc: + construct_glyph_gonol("word") + assert exc.value.code == "PUBLIC_GONOL_CARRIER_DRIFT" + _ucns.cache_clear() + + +def test_partial_corpus_refuses_public_binding(tmp_path): + source = WordnetSnapshot( + lexemes=(LexemeRecord("word", "n", (), (SenseRecord("s1", "n1", ()),)),), + synsets=(SynsetRecord("n1", "n", ("word",), ("word",), ()),), + source_tree_sha256="0" * 64, + source_file_count=1, + ) + state = tmp_path / "partial" + build(source, out_dir=state, public_position=lambda _c: None, + producer={"standing": "fixture-only"}) + with OrdinalStructuralField(state) as field: + graph = field.construct("word") + assert graph["logical_state"] == "closed" + result = field.geometry(graph, operation="ordinal-affixiation") + assert result["standing"] == "refused" + assert result["code"] == "COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL" + logical = field.compose(graph, relation="ordered-text") + assert logical["standing"] == "logically-closed" + assert logical["geometry_state"] == "hmmm:COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL" + with pytest.raises(OrdinalGeometryError) as exc: + field.word("word") + assert exc.value.code == "COMPLETE_CORPUS_REQUIRED_FOR_PUBLIC_GONOL" + assert field.geometry(graph, operation="displacement")["code"] == "UCNS_OPERATION_REQUIRED" + + +def test_ucns_nested_construction_retains_word_interior(): + first = construct_glyph_gonol("word") + # No higher-order English angle is asserted: the word carrier is an + # explicitly supplied test relation, and UCNS owns its geometry. + carrier = ordinal.Carrier(("word", "other"), "test:explicit-word-carrier") + sentence = ordinal.affixiate( + "test:word-twice", + (ordinal.Participant.closed(carrier, first), + ordinal.Participant.closed(carrier, first)), + origin="SPACE", relation="test:declared", source="test:nesting", + ) + assert sentence.recover() == tuple("wordword") + assert sentence.participants[0].interior is first + assert sentence.participants[1].interior is first + + + +def test_geometry_record_never_mislabels_non_glyph_frames(): + public_word = construct_glyph_gonol("word") + other = ordinal.Carrier(("word", "other"), "fixture:word-carrier") + unrelated = ordinal.affixiate( + "test:word", (ordinal.Participant.closed(other, public_word),), + origin="SPACE", relation="test:word-promotion", source="fixture", + ) + for obj in (unrelated, ordinal.affixiate( + "word", public_word.participants, + origin="OTHER", relation=public_word.relation, source="fixture", + ), ordinal.affixiate( + "word", public_word.participants, + origin="SPACE", relation="unrelated-relation", source="fixture", + )): + with pytest.raises(OrdinalGeometryError) as exc: + geometry_record(obj) + assert exc.value.code == "UCNS_PUBLIC_GLYPH_CONSTRUCTION_REQUIRED" + assert geometry_record(public_word)["receipt"] == public_word.receipt + + +def test_geometry_record_refuses_fake_construction(): + with pytest.raises(OrdinalGeometryError) as exc: + geometry_record({"receipt": "made-up"}) + assert exc.value.code == "UCNS_CONSTRUCTION_REQUIRED" +# ratios: loc_comments=155:63 imports_exports=8:10 calls_definitions=76:10 diff --git a/research/english-gonol/ordinal_tests/test_ordinal_corpus.py b/research/english-gonol/ordinal_tests/test_ordinal_corpus.py new file mode 100644 index 00000000..c5ae0315 --- /dev/null +++ b/research/english-gonol/ordinal_tests/test_ordinal_corpus.py @@ -0,0 +1,75 @@ +# ratios: loc_comments=45:17 imports_exports=5:2 calls_definitions=12:2 +# SPDX-License-Identifier: FSL-1.1-ALv2 +# Copyright 2026 Erin Spencer +"""Real-corpus ordinal acceptance; no replacement corpus or geometry mocks. + +Usage: set UCHC_STRUCTURAL_FIELD to a verified complete structural field, then +run pytest on this file with pinned UCNS and the selected English package. +The structural workflow runs these checks against both Stack source and the +clean-installed UCHC wheel. Missing corpus configuration is a failure. +""" +from __future__ import annotations + +import json +import os + +import pytest + +from english_gonol.ordinal_construction import OrdinalStructuralField + +# === CHECKS === +# id: check_detached_ordinal_interiors_keep_authority +# proves: uchc_ordinal_detached_interiors_keep_authority +# call: self::test_detached_word_and_query_interiors_keep_authority +# requires: pytest, pinned_ucns, complete_structural_corpus +# mutates: none +# cleanup: context_manager_closes_read_only_field +# === END CHECKS === + +EXPECTED_AUTHORITY = { + "repository": "The-Interdependency/ucns", + "commit": "ed0b0760f05cd975a7a811f8abeb70a11d09f00b", + "ordinal_blob": "9fa84ef20f19fe0c04df680f49b50ea307e6d624", + "public_gonol_blob": "c1955e46e2dc918fb657cb346e42106d71937e91", + "public_gonol_sha256": "55d10c84529a4d7bc7714786357e977b68d9df2ac3f73d20e229580b552c2ef5", +} + + +@pytest.fixture(scope="module") +def field(): + path = os.environ.get("UCHC_STRUCTURAL_FIELD") + if not path: + pytest.fail("UCHC_STRUCTURAL_FIELD must name a verified complete corpus") + with OrdinalStructuralField(path) as opened: + assert opened.complete_corpus + yield opened + + +@pytest.mark.parametrize("text", ["word", "word word", " word word "]) +def test_detached_word_and_query_interiors_keep_authority(field, text): + word = json.loads(json.dumps(field.word("word"))) + assert word["geometry_authority"] == EXPECTED_AUTHORITY + assert word["gonal_order"]["identity"] == "word" + assert [p["radius"]["power_of_two_denominator"] + for p in word["gonal_order"]["placements"]] == [4, 3, 2, 1] + + query = field.construct(text) + geometry = field.geometry(query, operation="ordinal-affixiation") + expected_standing = "partial" if " " in text else "constructed" + assert geometry["standing"] == expected_standing + if expected_standing == "partial": + assert geometry["code"] == "SPACE_SEAM_FRAME_NOT_SELECTED" + assert "glyph_frame" not in geometry + else: + assert geometry["glyph_frame"]["geometry_authority"] == EXPECTED_AUTHORITY + assert len(geometry["word_interiors"]) == 1 + assert len(geometry["ordered_word_references"]) == len(text.split()) + # Serialized alone, the interior must still name its verified producer. + interior = json.loads(json.dumps(geometry["word_interiors"][0])) + assert interior["geometry_authority"] == EXPECTED_AUTHORITY + assert interior["construction"] == word["gonal_order"] + assert interior["receipt"] == word["geometry_receipt"] + composed = field.compose(query, relation="ordered-text") + assert composed["word_interiors"] == geometry["word_interiors"] + assert composed["word_interiors"][0]["geometry_authority"] == EXPECTED_AUTHORITY +# ratios: loc_comments=45:17 imports_exports=5:2 calls_definitions=12:2 diff --git a/research/english-gonol/tests/test_edcm_metric_origins.py b/research/english-gonol/tests/test_edcm_metric_origins.py index 6f9c9035..1a3c08ab 100644 --- a/research/english-gonol/tests/test_edcm_metric_origins.py +++ b/research/english-gonol/tests/test_edcm_metric_origins.py @@ -254,9 +254,12 @@ def test_unregistered_or_modified_fixture_fails_closed(tmp_path, mutation): def test_registered_producer_and_all_projections_agree(): - workspace = origins.FIXTURE.parent + workspace = Path(__file__).resolve().parents[1] stack = workspace.parents[1] fixture = origins.load_metric_origin_specs() + assert origins.FIXTURE.read_bytes() == (workspace / "EDCM_METRIC_ORIGINS_SOURCE.json").read_bytes() + packaged = json.loads(origins.BASE.read_text())["metric_origin_source"] + assert packaged == json.loads((workspace / "BASE.json").read_text())["metric_origin_source"] producer = fixture["producer_commit"] graph = json.loads((workspace / "docs/work-graphs/metric-origin-space-v0.json").read_text()) participant = next(x for x in graph["repositories"] if x["repository"] == fixture["producer_repository"]) diff --git a/stack-manifest.json b/stack-manifest.json index 39a09830..e91a04e4 100644 --- a/stack-manifest.json +++ b/stack-manifest.json @@ -1,7 +1,7 @@ { "schema": "the-interdependency.stack-manifest", "version": "1.1.0", - "work_graph_sha256": "88049d2bcc65315fde82e4713a424e20b1537ff68d46b42285ce4bc0b461b3f4", + "work_graph_sha256": "38d0295cf7e7aa4a82aea203c5e8dad91aeb08d897bf3bf623daa3b254326213", "repositories": [ { "repository": "The-Interdependency/skill-lib", @@ -472,6 +472,76 @@ "relation": "pinned doctrine for the module, tests, research receipts and Stack transaction; no authority transfer", "authority_transfer": false, "canonical_release": false + }, + { + "workspace": "research/english-gonol/", + "participant_id": "ordinal-ucns", + "repository": "The-Interdependency/ucns", + "commit": "ed0b0760f05cd975a7a811f8abeb70a11d09f00b", + "authority": "Public Gonol and ordinal geometry", + "relation": "exact native producer", + "canonical_release": false, + "authority_transfer": false + }, + { + "workspace": "research/english-gonol/", + "participant_id": "ordinal-proposal", + "repository": "The-Interdependency/uchc", + "commit": "c514e1a2a3f3da5ffae9ebf76d67a1d348845842", + "authority": "unmerged ordinal proposal; not English implementation authority", + "relation": "source provenance preserved before rehoming and review repairs", + "canonical_release": false, + "authority_transfer": false + }, + { + "workspace": "research/english-gonol/", + "participant_id": "ordinal-doctrine", + "repository": "The-Interdependency/skill-lib", + "commit": "e46accffcb67a10630516d486c89e67f6ad19c7a", + "authority": "build, extraction and review discipline", + "relation": "governing source; no geometry authority", + "canonical_release": false, + "authority_transfer": false + }, + { + "workspace": "research/english-gonol/", + "participant_id": "recursive-ucns", + "repository": "The-Interdependency/ucns", + "commit": "9cc00771e54336d58ee377faeec87a3a33dbd4bf", + "authority": "native recursive planar attachment and exact expression geometry", + "relation": "exact producer; historical ordinal modules unchanged", + "canonical_release": false, + "authority_transfer": false + }, + { + "workspace": "research/english-gonol/", + "participant_id": "recursive-stack", + "repository": "The-Interdependency/stack", + "commit": "f19389bd7b15e6540f812ec47d67274e429daec5", + "authority": "English construction forge pending domain graduation", + "relation": "input baseline; output extraction must pin the resulting forge commit", + "canonical_release": false, + "authority_transfer": false + }, + { + "workspace": "research/english-gonol/", + "participant_id": "recursive-uchc", + "repository": "The-Interdependency/uchc", + "commit": "f2528c7f4cc182912df11b92fa355b16231b1fb5", + "authority": "verified extraction consumer baseline", + "relation": "input baseline; candidate output identity is separate", + "canonical_release": false, + "authority_transfer": false + }, + { + "workspace": "research/english-gonol/", + "participant_id": "recursive-skill-lib", + "repository": "The-Interdependency/skill-lib", + "commit": "d71a3a938cb6d646ffc0b59186452117e4a37d13", + "authority": "build and verification discipline", + "relation": "resolved governing skills; no geometry authority", + "canonical_release": false, + "authority_transfer": false } ] }