Skip to content

Commit f0376a8

Browse files
Merge pull request #38: character-first Python gonol affixiation
Repair Python Gonol Construction to close exact source characters and character definitions before lexical and recursive constructions; preserve CPython tokenize/AST as recognition witnesses only; add replay, Python 3.12 surface, and stack-consistency gates.
2 parents 557aea3 + e46d927 commit f0376a8

16 files changed

Lines changed: 2870 additions & 2 deletions

.github/workflows/python-gonol.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: python-gonol
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "research/python-gonol/**"
7+
- "libs/ucns/**"
8+
- "README.md"
9+
- "AGENTS.md"
10+
- "STACK_MANIFEST.md"
11+
- "stack-manifest.json"
12+
- ".github/workflows/python-gonol.yml"
13+
push:
14+
branches: [main]
15+
paths:
16+
- "research/python-gonol/**"
17+
- "libs/ucns/**"
18+
- "README.md"
19+
- "AGENTS.md"
20+
- "STACK_MANIFEST.md"
21+
- "stack-manifest.json"
22+
- ".github/workflows/python-gonol.yml"
23+
24+
permissions:
25+
contents: read
26+
27+
jobs:
28+
contracts:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v6
32+
- uses: actions/setup-python@v6
33+
with:
34+
python-version: "3.12"
35+
- name: Install pytest
36+
run: python -m pip install pytest
37+
- name: Stack structural consistency
38+
run: python tools/check_stack_consistency.py
39+
- name: Python Gonol construction tests
40+
working-directory: research/python-gonol
41+
run: python -m pytest -q tests

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ projects may later graduate into their own repositories.
1313
- `research/english-gonol/` is a distinct stack-local English lexical/gonol construction
1414
component. UCNS owns consumed geometry; EDCM may evaluate outputs but does not define
1515
the English Gonol construction.
16+
- `research/python-gonol/` is a distinct stack-local Python source/gonol construction
17+
component. It owns Python source admission and bottom-up affixiation only; METAPAT owns
18+
affixiation semantics, UCNS owns consumed geometry, and parser objects are witnesses
19+
rather than gonol identities.
1620
- root-level emerging projects such as `ahbg/` may be close to external repo-hood; root
1721
placement does not transfer authority from their inputs.
1822
- `STACK_MANIFEST.md` and `stack-manifest.json` own stack-level participant provenance.
@@ -105,6 +109,8 @@ coherence; it does not replace workspace behavioral tests.
105109
- Organization aggregate and website-projection derivation specs are not yet registered.
106110
- English Gonol Construction has distinct stack-local authority but has not yet gained an
107111
independent repository/release authority boundary.
112+
- Python Gonol Construction has distinct stack-local authority but has not yet gained an
113+
independent repository/release authority boundary; exact UCNS affixiation geometry is unresolved.
108114
- The complete root `skill-lib/` snapshot refresh remains separate because the current
109115
provenance-bound fresh-making doctrine is newer than the local generator snapshot.
110116
- Project graduation automation remains unimplemented.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ stack/
3333
│ ├── metapat/ # current METAPAT research + BASE.json
3434
│ ├── ucns/ # current UCNS research + BASE.json
3535
│ ├── english-gonol/ # English lexical/gonol construction; distinct from EDCM
36+
│ ├── python-gonol/ # Python 3.12 source affixiation from characters upward
3637
│ ├── edcm/ # current EDCM measurement research + BASE.json
3738
│ ├── pcea/ # current PCEA research + BASE.json
3839
│ ├── ptcna/ # current PTCNA research + BASE.json
@@ -77,6 +78,14 @@ English Gonol Construction is a separated stack-local component at
7778
English text-domain construction candidate. EDCM may evaluate those outputs but does
7879
not define the construction.
7980

81+
Python Gonol Construction is a separate stack-local component at
82+
`research/python-gonol/`. It admits every exact Python source occurrence as a character
83+
gonol, closes the occurrence's applicable character-definition gonols, then affixiates
84+
lexical forms, delimiters, grammar constructions, and the module from already-closed
85+
participants. METAPAT owns affixiation semantics; UCNS owns optional consumed geometry;
86+
Python Gonol owns Python source construction. Tokens and AST nodes are recognition
87+
witnesses, never gonol substitutes.
88+
8089
### Change stack structure
8190

8291
Any change that alters a participant, pin, authority, relation, research workspace,
@@ -103,6 +112,8 @@ stack-local implementation.
103112

104113
English Gonol Construction is currently a distinct stack-local research component,
105114
separated from EDCM but not independently graduated.
115+
Python Gonol Construction is likewise stack-local and ungraduated; its Python 3.12
116+
constructor is an implemented candidate, not stack or language canon.
106117
EPAC and psychsocio metafauna are currently in this pre-graduation state.
107118
EPAC is further along: it has an independent extracted repository, but extraction is not
108119
graduation, so its forge research remains here until EPAC completes its release,
@@ -177,6 +188,8 @@ merge.
177188
is not yet implemented.
178189
- English Gonol Construction has distinct stack-local authority but has not yet gained an
179190
independent repository/release authority boundary.
191+
- Python Gonol Construction has distinct stack-local authority but has not yet gained an
192+
independent repository/release authority boundary; UCNS affixiation geometry remains unresolved.
180193
- Actual VM PostgreSQL/service-account/storage state and the independent backup device
181194
remain deployment observations until inspected on the VM.
182195
- A GitHub-hosted executor remains optional and unimplemented; VM-local execution is the

STACK_MANIFEST.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ Provenance and authority-boundary record for `The-Interdependency/stack`.
77
- PCEA canonical refresh UTC: `2026-08-31T07:49:28Z` at `91ffa8c7249dfb810ca64a0bbc500481c0bd12a9`
88
- EPAC extraction reconciliation UTC: `2026-09-05` at `d8868858b2e455381ce670797bdbe47189bdc496`
99
- English Gonol separation reconciliation UTC: `2026-09-12` at `030022948fb7c749961ae65743a4448c4bb6cbbe`
10+
- Python Gonol construction baseline UTC: `2026-09-12` at `0e8384bbb60e4c2189016a212bdd0030d04aed7d`
1011
- Stack-manifest schema: `the-interdependency.stack-manifest` version `1.1.0`
1112
- Work-graph digest (SHA-256 over canonical `repositories` + `research_participants` + `boundaries` JSON):
12-
`9ab3b3f75a32f5f73b5df68419148181fc632593babe4ec6adf4269d4f35badb`
13+
`482e9a4f70c18ad4888d1fab32e44a6ab550fe7486fabd2f1253876c266212eb`
1314
- Machine-readable copy: [`stack-manifest.json`](stack-manifest.json)
1415

1516
## Directory contract
@@ -52,6 +53,7 @@ release identity.
5253
| Workspace | Participant | Exact commit | Relation | Canonical release |
5354
|---|---|---|---|---|
5455
| `research/english-gonol/` | `The-Interdependency/stack` | `030022948fb7c749961ae65743a4448c4bb6cbbe` | stack-local English lexical/gonol construction separated from EDCM; consumes UCNS geometry; EDCM may evaluate outputs but does not define construction | no |
56+
| `research/python-gonol/` | `The-Interdependency/stack` | `0e8384bbb60e4c2189016a212bdd0030d04aed7d` | stack-local bottom-up Python 3.12 source gonol construction; applies METAPAT affixiation semantics, consumes optional UCNS geometry, and transfers no language authority to UCNS or EDCM | no |
5557
| `research/ucns/` | `The-Interdependency/ucns` | `1975fe70cf4e0826a8020c2da3047569e277af64` | explicit source base for integrated stack-local UCNS research; does not refresh or replace the manifest-pinned `libs/ucns` canonical view | no |
5658
| `research/from-photons-to-macroverse/` | `The-Interdependency/stack` | `77ef8c7fb0ff75a524181655ee9f9641372768f7` | target composition forge baseline at audit start | no |
5759
| `research/from-photons-to-macroverse/` | `The-Interdependency/skill-lib` | `61eb3b14db440e6ee9b7bf8de3b646dbfd00fb32` | audit, domain-claim, work-graph, and hmmm doctrine | no |
@@ -139,9 +141,14 @@ immutable release, downstream stack reconsumption, and authority-transition rece
139141
English Gonol Construction is earlier in that lifecycle: it is a distinct stack-local
140142
research component, not EDCM and not an independent canonical release.
141143

144+
Python Gonol Construction is also stack-local research. Its Python 3.12 source
145+
constructor has no independent repository/release authority, and its successful replay
146+
transfers no semantic, geometric, measurement, or language-canon status.
147+
142148
## hmmm
143149

144150
- UCNS has no `LICENSE` file at pinned commit `828c0b8`.
145151
- EPAC clean install, license, stable release, downstream reconsumption, and authority-transition receipt remain incomplete; `libs/epac/` stays unpopulated until graduation.
146152
- English Gonol Construction remains stack-local research; independent repository/release authority has not been established.
153+
- Python Gonol Construction remains stack-local research; independent repository/release authority and exact UCNS affixiation geometry remain unresolved.
147154
- `skill-lib/` remains a special operational snapshot at stack root rather than following the ordinary `libs/` + `research/` pair.

research/python-gonol/BASE.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"schema": "the-interdependency.stack-research-base",
3+
"version": "1.0.0",
4+
"project": "python-gonol",
5+
"source_repository": "The-Interdependency/stack",
6+
"source_commit": "0e8384bbb60e4c2189016a212bdd0030d04aed7d",
7+
"metapat_prerequisite": {
8+
"repository": "The-Interdependency/metapat",
9+
"commit": "510e0171f4ecc6d1889e66bb66a8734c49c3b1fa",
10+
"relation": "METAPAT owns affixiation semantics; Python Gonol applies them without root impact"
11+
},
12+
"ucns_prerequisite": {
13+
"repository": "The-Interdependency/ucns",
14+
"commit": "31bb761e49307b04a7c7dd7c7c2059ea35fdc089",
15+
"relation": "UCNS owns geometry and Public Gonol positions; Python Gonol owns no UCNS operation"
16+
},
17+
"python_language_profile": {
18+
"repository": "python/cpython",
19+
"tag": "v3.12.14",
20+
"commit": "2d7d957248038635334b62b27f650220213d8e5d",
21+
"profile": "Python 3.12 file input"
22+
},
23+
"canon_path": null,
24+
"authority": "stack-local Python source gonol construction",
25+
"standing": "stack-local-research"
26+
}

research/python-gonol/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Python Gonol Construction
2+
3+
Stack-local research implementation for affixiating Python source into gonols from its lowest admitted source units upward.
4+
5+
## Construction
6+
7+
```text
8+
exact decoded source occurrences
9+
-> character gonols
10+
-> character-definition gonols sharing each character origin
11+
-> Python lexical-form gonols from closed character occurrences
12+
-> matched delimiter gonols
13+
-> recursive Python grammar-construction gonols
14+
-> module gonol
15+
```
16+
17+
Every source occurrence remains independently addressable. Every character may close multiple definition gonols without changing the character's identity: Unicode category/name, Python identifier eligibility, exact-token membership, layout role, quote/comment introducer role, and other profile-backed definitions may coexist. Lexical forms consume the already-closed character occurrences atomically; larger constructions consume already-closed lexical or construction gonols atomically.
18+
19+
`character` means one exact decoded Unicode scalar occurrence. Spaces, newlines, digits, operators, delimiters, letters, and punctuation are all character gonols. Nothing is normalized, deduplicated, trimmed, or silently discarded.
20+
21+
## Recognition boundary
22+
23+
```text
24+
METAPAT affixiation semantics
25+
-> UCNS geometry and Public Gonol positions
26+
-> Python Gonol Python source admission and construction
27+
-> CPython pinned recognition witness only
28+
```
29+
30+
The private `_recognition` module uses CPython 3.12 `tokenize` and `ast` after the source occurrence floor has been admitted. Its former public "letter" vocabulary is deprecated and removed from the public receipt: it is now only an internal recognition plan. Token, AST, compiler, and code objects never become gonols and never replace the source-built relation graph.
31+
32+
Any valid Python 3.12 file-input source accepted by the pinned recognition witness is traversed recursively without a grammar-node whitelist. The broad Python 3.12 surface fixture remains a regression witness; exhaustive parity against CPython's complete grammar/test corpus remains `hmmm` rather than being claimed from that fixture alone.
33+
34+
Standing: **implemented stack-local candidate; not canon and not an independent release**.
35+
36+
## Usage guidance
37+
38+
Run from this directory with Python 3.12:
39+
40+
```bash
41+
python -m python_gonol path/to/source.py --out source.gonol.json --pretty
42+
python -m python_gonol --verify source.gonol.json
43+
python -m pytest -q tests
44+
```
45+
46+
Use the bytes entry point for files so an encoding declaration and exact original bytes remain bound:
47+
48+
```python
49+
from pathlib import Path
50+
from python_gonol import affixiate_python_bytes, replay_python_affixiation
51+
52+
path = Path("example.py")
53+
receipt = affixiate_python_bytes(path.read_bytes(), source_id=path.as_posix())
54+
replay_python_affixiation(receipt)
55+
```
56+
57+
For invalid or unfinished source, the constructor retains every admitted character, character-definition, lexical, and matched-delimiter closure available beneath the failure, closes a `python.source.hmmm` root, records the exact tokenizer/delimiter/grammar boundary, and the CLI exits `2`. A missing end parenthesis therefore remains visible without discarding prior construction.
58+
59+
See [`docs/PYTHON_AFFIXIATION_BOUNDARY.md`](docs/PYTHON_AFFIXIATION_BOUNDARY.md) for the contract and [`WORK_GRAPH.json`](WORK_GRAPH.json) for exact inputs.
60+
61+
## hmmm
62+
63+
- exact UCNS geometric operation of Public Gonol function positions;
64+
- exact UCNS Möbius-carrier affixiation/coupling law;
65+
- exhaustive parity replay against the complete CPython 3.12 grammar/test corpus;
66+
- Python language profiles after Python 3.12 file input;
67+
- streaming/checkpointed receipt materialization for unusually large source trees.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"schema": "the-interdependency.stack-manifest",
3+
"version": "1.0.0",
4+
"work_graph_sha256": "f677e63e96d1d27db543391a0999ed5f89ad1e3cb82656771137f3022cef4660",
5+
"repositories": [
6+
{
7+
"repository": "The-Interdependency/stack",
8+
"commit": "0e8384bbb60e4c2189016a212bdd0030d04aed7d",
9+
"authority": "stack-local Python Gonol implementation owner",
10+
"relation": "construction workspace and starting identity"
11+
},
12+
{
13+
"repository": "The-Interdependency/metapat",
14+
"commit": "510e0171f4ecc6d1889e66bb66a8734c49c3b1fa",
15+
"authority": "affixiation semantic authority",
16+
"relation": "defines identity-preserving recursive affixiation meaning"
17+
},
18+
{
19+
"repository": "The-Interdependency/ucns",
20+
"commit": "31bb761e49307b04a7c7dd7c7c2059ea35fdc089",
21+
"authority": "geometry and Public Gonol position authority",
22+
"relation": "optional explicit geometry observation; no semantic or language authority transfer"
23+
},
24+
{
25+
"repository": "The-Interdependency/skill-lib",
26+
"commit": "c3fe833cdd3a35c5dc12b0678e5489c9b6a18741",
27+
"authority": "organization-wide construction and evidence discipline",
28+
"relation": "gonol-build, work-graph, module, test, and hmmm discipline"
29+
},
30+
{
31+
"repository": "python/cpython",
32+
"commit": "2d7d957248038635334b62b27f650220213d8e5d",
33+
"authority": "Python 3.12.14 language and CPython recognition witness",
34+
"relation": "exact Python language profile source at tag v3.12.14"
35+
}
36+
],
37+
"boundaries": {
38+
"authority_transfer": false,
39+
"proof_status_transfer": false,
40+
"measurement_status_transfer": false,
41+
"semantic_mapping": "external-provenance",
42+
"agent_scope": "cross-repository-work-graph",
43+
"hmmm": [
44+
"exact UCNS Public Gonol function operations remain unresolved",
45+
"exact UCNS Mobius-carrier affixiation/coupling law remains unresolved",
46+
"Python language profiles after 3.12 remain unresolved"
47+
]
48+
}
49+
}

0 commit comments

Comments
 (0)