Repository navigation
Build expanded English public gonol and recursive ordinal construction #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4bb56be
2cf9d50
0e0ea9e
4c9470d
4dea37a
37adccb
174f96a
68d6fe2
b7f8672
69559d3
ee130be
1434180
7c91215
f44e9f0
06bf3e4
878428a
3153700
f1ae89a
2bca0cb
8a048fd
2ebf149
34fdda5
2ba7131
3c8e405
08ccfe6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,213 @@ | ||
| name: English ordinal affixiation | ||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| paths: | ||
| - 'research/english-gonol/english_gonol/**' | ||
| - 'research/english-gonol/ACTIVE_CONSTRUCTION.json' | ||
| - 'research/english-gonol/BASE.json' | ||
| - 'stack-manifest.json' | ||
| - 'STACK_MANIFEST.md' | ||
| - 'research/english-gonol/tests/test_active_construction.py' | ||
| - 'research/english-gonol/tests/test_ordinal_construct.py' | ||
| - 'research/english-gonol/tests/test_ordinal_definitions.py' | ||
| - 'research/english-gonol/tests/test_ordinal_source_inputs.py' | ||
| - 'research/english-gonol/docs/ordinal-*' | ||
|
erinepshovel-code marked this conversation as resolved.
|
||
| - '.github/workflows/english-ordinal-affixiation.yml' | ||
|
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a PR changes only Useful? React with 👍 / 👎. |
||
| permissions: | ||
| contents: read | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| jobs: | ||
| full-corpus: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||
| with: | ||
| repository: The-Interdependency/ucns | ||
| ref: a7bfa0c96daca1f7445ba57c39fa6d8fd62e51eb | ||
| path: _inputs/ucns | ||
| persist-credentials: false | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||
| with: | ||
| repository: The-Interdependency/ucns | ||
| ref: 4f863ad37096b7baab8f62820ad5cb937b62a3a7 | ||
| path: _inputs/admission-carrier | ||
|
erinepshovel-code marked this conversation as resolved.
|
||
| persist-credentials: false | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||
| with: | ||
| repository: globalwordnet/english-wordnet | ||
| ref: dc343f2683279ecbb13fab4e2fd778d7b162d287 | ||
| path: _inputs/oewn | ||
| persist-credentials: false | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||
| with: | ||
| repository: The-Interdependency/skill-lib | ||
| ref: e74ce1ee8a2cea50b0a6acce7697a6d3d9b2e128 | ||
| path: _inputs/skill-lib | ||
| persist-credentials: false | ||
| sparse-checkout: | | ||
| wdll | ||
| gonol-build | ||
| msdmd | ||
| meta-module-build | ||
| interdependent-work-graph | ||
| tools/skill_usage.py | ||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 | ||
| with: | ||
| python-version: '3.12.14' | ||
| - name: Preflight resources and install exact build dependencies | ||
| run: | | ||
| python - <<'PY' | ||
| import json, pathlib, platform, shutil, sqlite3 | ||
| free = shutil.disk_usage('.').free | ||
| # Source, two verified SQLite bundles, dependencies and retained evidence. | ||
| assert free >= 4 * 1024**3, '4 GiB working space required before full build' | ||
| print(json.dumps({'python':platform.python_version(),'sqlite':sqlite3.sqlite_version,'free_bytes':free})) | ||
| PY | ||
| python -m pip install uv==0.11.18 PyYAML==6.0.2 | ||
| uv sync --project _inputs/ucns --locked --python python --extra test | ||
| uv pip install --python _inputs/ucns/.venv/bin/python PyYAML==6.0.2 | ||
| - name: Acquire declared Unicode release and license | ||
| env: | ||
| SOURCE_HEAD: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| run: | | ||
| mkdir -p _inputs/ucd _evidence | ||
| for name in UnicodeData.txt DerivedCoreProperties.txt ReadMe.txt; do | ||
| curl --fail --location --retry 3 --proto '=https' --tlsv1.2 \ | ||
| "https://www.unicode.org/Public/18.0.0/ucd/$name" -o "_inputs/ucd/$name" | ||
| done | ||
| curl --fail --location --retry 3 --proto '=https' --tlsv1.2 \ | ||
| https://www.unicode.org/license.txt -o _inputs/ucd/LICENSE-Unicode.txt | ||
| sha256sum _inputs/ucd/* | tee _evidence/unicode-acquisition.sha256 | ||
| git rev-parse HEAD > _evidence/stack-tested-merge.txt | ||
| printf '%s\n' "$SOURCE_HEAD" > _evidence/stack-head.txt | ||
| git -C _inputs/ucns rev-parse HEAD > _evidence/ucns-head.txt | ||
| git -C _inputs/oewn rev-parse HEAD > _evidence/corpus-head.txt | ||
| # CI source provenance is separate from the artifact verifier's data contract. | ||
| cp research/english-gonol/docs/ordinal-work-graph.json _evidence/source-work-graph.json | ||
| - name: Verify exact participant graph and unchanged source reader | ||
| env: | ||
| PYTHONPATH: research/english-gonol | ||
| run: | | ||
| git fetch --no-tags --depth=1 origin e3eb83764355b4b760a79323cda6a6d75c3a501a | ||
| _inputs/ucns/.venv/bin/python - <<'PY' | ||
| import ast,hashlib,json,pathlib,subprocess | ||
| graph=json.loads(pathlib.Path('research/english-gonol/docs/ordinal-work-graph.json').read_text()) | ||
| body={k:graph[k] for k in ('repositories','boundaries')} | ||
| assert hashlib.sha256(json.dumps(body,sort_keys=True,separators=(',',':')).encode()).hexdigest()==graph['work_graph_sha256'] | ||
|
Comment on lines
+100
to
+102
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a provenance repin changes AGENTS.md reference: AGENTS.md:L72-L75 Useful? React with 👍 / 👎. |
||
| git_roots={ | ||
| ('The-Interdependency/ucns','a7bfa0c96daca1f7445ba57c39fa6d8fd62e51eb'):'_inputs/ucns', | ||
| ('The-Interdependency/ucns','4f863ad37096b7baab8f62820ad5cb937b62a3a7'):'_inputs/admission-carrier', | ||
| ('globalwordnet/english-wordnet','dc343f2683279ecbb13fab4e2fd778d7b162d287'):'_inputs/oewn', | ||
| ('The-Interdependency/skill-lib','e74ce1ee8a2cea50b0a6acce7697a6d3d9b2e128'):'_inputs/skill-lib', | ||
| } | ||
| artifact_roots={ | ||
| 'unicode.org/Public/18.0.0/ucd/UnicodeData.txt':'_inputs/ucd/UnicodeData.txt', | ||
| 'unicode.org/Public/18.0.0/ucd/DerivedCoreProperties.txt':'_inputs/ucd/DerivedCoreProperties.txt', | ||
| } | ||
| baseline_key=('The-Interdependency/stack','e3eb83764355b4b760a79323cda6a6d75c3a501a') | ||
| expected=set(git_roots) | {(name,None) for name in artifact_roots} | {baseline_key} | ||
| seen=set() | ||
| for item in graph['repositories']: | ||
| key=(item['repository'],item.get('commit')) | ||
| assert key in expected and key not in seen, f'unmapped or duplicate participant: {key}' | ||
| seen.add(key) | ||
| if key in git_roots: | ||
| assert subprocess.check_output(['git','-C',git_roots[key],'rev-parse','HEAD'],text=True).strip()==item['commit'] | ||
| elif item['repository'] in artifact_roots: | ||
| raw=pathlib.Path(artifact_roots[item['repository']]).read_bytes() | ||
| assert hashlib.sha256(raw).hexdigest()==item['artifact_sha256'] | ||
|
erinepshovel-code marked this conversation as resolved.
erinepshovel-code marked this conversation as resolved.
|
||
| elif key==baseline_key: | ||
| # The actual consumed files are byte-compared to this commit below. | ||
| assert subprocess.check_output(['git','rev-parse',item['commit']+'^{commit}'],text=True).strip()==item['commit'] | ||
| else: | ||
| raise AssertionError(f'unverified participant: {key}') | ||
| assert seen==expected, 'participant graph omits acquired inputs' | ||
| active_base=json.loads(pathlib.Path('research/english-gonol/BASE.json').read_text()) | ||
| selected=active_base['active_construction']['source_commit'] | ||
| assert len(selected)==40 and all(c in '0123456789abcdef' for c in selected) | ||
| subprocess.run(['git','fetch','--no-tags','--depth=1','origin',selected],check=True) | ||
| for relative in ('english_gonol/ordinal_construct.py','english_gonol/__main__.py', | ||
| 'english_gonol/ordinal_definitions.py', | ||
| 'english_gonol/language/character_definitions.py', | ||
| 'english_gonol/language/data/character_definitions_v1.json', | ||
| 'ACTIVE_CONSTRUCTION.json','docs/ordinal-work-graph.json'): | ||
|
Comment on lines
+135
to
+139
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Fresh evidence after the earlier admission-closure fix is that the new AGENTS.md reference: AGENTS.md:L72-L75 Useful? React with 👍 / 👎. |
||
| path='research/english-gonol/'+relative | ||
| assert pathlib.Path(path).read_bytes()==subprocess.check_output(['git','show',selected+':'+path]),path | ||
| base=next(r['commit'] for r in graph['repositories'] if r['repository']=='The-Interdependency/stack') | ||
| baseline_path='research/english-gonol/english_gonol/structural_construct.py' | ||
| baseline_source=subprocess.check_output(['git','show',base+':'+baseline_path],text=True) | ||
| tree=ast.parse(baseline_source) | ||
| assignment=next(node for node in tree.body if isinstance(node,(ast.Assign,ast.AnnAssign)) | ||
| and ((isinstance(node,ast.Assign) and any(isinstance(t,ast.Name) and t.id=='IMPLEMENTATION_FILES' for t in node.targets)) | ||
| or (isinstance(node,ast.AnnAssign) and isinstance(node.target,ast.Name) and node.target.id=='IMPLEMENTATION_FILES'))) | ||
| IMPLEMENTATION_FILES=tuple(ast.literal_eval(assignment.value)) | ||
| assert IMPLEMENTATION_FILES, 'pinned admission closure must be nonempty' | ||
| for name in IMPLEMENTATION_FILES: | ||
| path='research/english-gonol/english_gonol/'+name | ||
| assert pathlib.Path(path).read_bytes()==subprocess.check_output(['git','show',base+':'+path]),path | ||
| PY | ||
| - name: Unit and cross-repository geometry tests | ||
| env: | ||
| PYTHONPATH: research/english-gonol | ||
| run: | | ||
| _inputs/ucns/.venv/bin/python -m pytest -q \ | ||
| _inputs/ucns/tests/test_ordinal_affixiation.py \ | ||
| research/english-gonol/tests/test_ordinal_construct.py \ | ||
| research/english-gonol/tests/test_ordinal_definitions.py \ | ||
| research/english-gonol/tests/test_ordinal_source_inputs.py \ | ||
| research/english-gonol/tests/test_active_construction.py \ | ||
| | tee _evidence/tests.txt | ||
| - name: Build complete source admission then the replacement geometry | ||
| env: | ||
| PYTHONPATH: research/english-gonol | ||
| run: | | ||
| /usr/bin/time -v _inputs/ucns/.venv/bin/python -m english_gonol.structural_construct build \ | ||
| --source-root _inputs/oewn/src/yaml \ | ||
| --ucns-source-root _inputs/admission-carrier \ | ||
| --out-dir _admission 2> _evidence/admission-resources.txt | ||
| /usr/bin/time -v _inputs/ucns/.venv/bin/python -m english_gonol build \ | ||
| _admission _inputs/ucd _constructed \ | ||
| 2> _evidence/geometry-resources.txt | tee _evidence/full-verification.json | ||
| mkdir -p _constructed/licenses | ||
| cp _inputs/oewn/LICENSE.md _constructed/licenses/OEWN-LICENSE.md | ||
| cp _inputs/oewn/README.md _constructed/licenses/OEWN-README.md | ||
| cp _inputs/ucd/LICENSE-Unicode.txt _constructed/licenses/ | ||
| cp _inputs/ucd/ReadMe.txt _constructed/licenses/Unicode-ReadMe.txt | ||
| cp _constructed/public-gonol.json _constructed/manifest.json _constructed/verification.json _evidence/ | ||
| python - <<'PY' | ||
| import json,pathlib | ||
| p=json.loads(pathlib.Path('_constructed/public-gonol.json').read_text()) | ||
| n=len(p['identities']) | ||
| lines=['index\tcodepoint\tscalar_json\tangle_turns'] | ||
| lines += [f'{i}\tU+{ord(c):04X}\t{json.dumps(c,ensure_ascii=False)}\t{i}/{n}' for i,c in enumerate(p['identities'])] | ||
| pathlib.Path('_evidence/public-gonol.tsv').write_text('\n'.join(lines)+'\n') | ||
| print(json.dumps(p['admission_counts'],indent=2)) | ||
| PY | ||
| - name: Exercise source-exact text query on the completed field | ||
| env: | ||
| PYTHONPATH: research/english-gonol | ||
| run: | | ||
| _inputs/ucns/.venv/bin/python -m english_gonol query \ | ||
| _constructed 'the geometry' > _evidence/query.json | ||
| - name: Retain evidence even after a deterministic failure | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | ||
| with: | ||
| name: english-ordinal-evidence | ||
| path: _evidence/ | ||
| if-no-files-found: error | ||
| retention-days: 30 | ||
| - name: Retain the actual completed construction, including constitutive source | ||
| if: success() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | ||
| with: | ||
| name: english-ordinal-construction | ||
| path: _constructed/ | ||
| if-no-files-found: error | ||
| retention-days: 30 | ||
Uh oh!
There was an error while loading. Please reload this page.