Skip to content

Construct element gonols and test molecular affixiation - #1

Merged
erinepshovel-code merged 21 commits into
mainfrom
agent/epac-element-gonol-molecules
Aug 23, 2026
Merged

erinepshovel-code merged 21 commits into
mainfrom
agent/epac-element-gonol-molecules

Conversation

@erinepshovel-code

@erinepshovel-code erinepshovel-code commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

stack is the research aggregation. This candidate lives in research/epac/ (energy particle affixiation coupling placeholder).

Constructor: epac.public_gonol on the pinned UCNS Public Gonol carrier. Not edcm.gonol.

Pipeline

element gonols (nucleus + electron shells)
→ every electron instance: (nucleus, electron_i) with charges (Z, -1)
→ close that atomic 3-structure inside the element gonol
→ unpaired-valence attachment sites
→ declared oriented (center, ligand_i) couplings
→ molecular 3-structure = those couplings + charge states + degree
→ sealed known chemistry comparison (after construction only)

Molecules: H₂, H₂O, NH₃, CH₄, CO₂.

Letters and abbreviations are nomenclature, not physics axes.

Result standing

UCNS Möbius coupling invariants are identical across all five molecules. Topology of H₂O and CO₂ also collapses (two arity-2 hub couplings). Charged atom-instance structure distinguishes formulas but splits the sealed linear class (H₂ vs CO₂). Standing for the sealed-shape prediction question: FALSIFIED-as-prediction. Not canon.

Usage

cd research/epac
PYTHONPATH=".:../ucns/src" python3 -m unittest discover -s tests -q

Recognize stack/research/epac as the research surface for energy
particle affixiation coupling. Close Z=1-18 element gonols from atomic
structure only, affixiate H2, H2O, NH3, CH4, and CO2 through valence
arity and implemented UCNS Möbius coupling, and compare to sealed
known chemistry only after construction.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6bca32370

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/epac/epac_molecular.py Outdated
relation=RELATION,
geometry_authority=__import__("ucns.public_gonol", fromlist=["public_gonol"]),
)
mobius = _mobius_coupling()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bind molecular inputs into the Möbius coupling

For every declared molecule, the gonol receipt is finalized before this call, and _mobius_coupling() accepts neither the participants nor the computed valence occupancy. It therefore adds the same standalone Möbius trace as an unbound sidecar to every construction, making the uniform ucns_coupling_signature—and thus the reported FALSIFIED-as-prediction result—guaranteed by implementation rather than an outcome of the preregistered affixiation-to-coupling pipeline. The coupling must consume or be bound into the molecular construction before this comparison can test the stated hypothesis.

Useful? React with 👍 / 👎.

geometry_authority=__import__("ucns.public_gonol", fromlist=["public_gonol"]),
)
mobius = _mobius_coupling()
invariants = {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Freeze construction invariants before opening labels

Although MolecularConstruction is frozen and exposes invariants as a Mapping, this literal produces a mutable dictionary containing mutable lists and a nested mutable Möbius dictionary. Any comparison or caller can therefore alter the recorded center, occupancy, or coupling state after construction—including after opening the sealed labels—without replacing the construction object, silently changing the experimental readout and defeating the declared construction-before-comparison boundary. Deep-freeze these values when the construction is created.

Useful? React with 👍 / 👎.

Close each Z=1-18 element from nucleus plus every electron's n, l, m_l,
m_s, hydrogenic angular id, Slater Z_eff, and Rydberg energy. Molecular
affixiation uses unpaired valence (l, m_l) and atomic s-to-p promotion,
not a scalar typical-valence shortcut.
Identity-only H/He/Li/C element-gonol candidates over established UCNS
carrier identity and native Möbius framing. 5 tests pass; CONTRACTS vs
CHECKS audit closed; sealed receipts replay byte-identically.
Status: CROSS-DOMAIN-HYPOTHESIS / provisional.

Signed-off-by: erinepshovel-code <250928284+erinepshovel-code@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61804b92fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/epac/README.md Outdated
From this directory:

```bash
PYTHONPATH=".:../edcm:../ucns/src" python3 -m unittest discover -s tests -q

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run the subatomic witnesses in the documented test command

Running this command from research/epac discovers only the 9 tests under tests/; it never executes the five pytest-style witnesses in subatomic/test_element_affixiation_candidate.py. This follows the CLI's own help (-s is the “Directory to start discovery”), and those module-level pytest functions would not be collected by unittest anyway. Consequently, users following the only documented test command can receive a clean result while the subatomic construction and receipt contracts are broken; add an explicit pytest invocation or integrate these witnesses into the advertised suite.

Useful? React with 👍 / 👎.

# Promote one valence s electron into the first empty p m, unpairing s and adding p.
promoted_from_s = s_pairs[0]
new_p = ElectronState(
index=promoted_from_s.index,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve distinct electron indices during promotion

For atoms that use the s→p promotion path (including Be, B, C, Mg, Al, and Si), new_p receives promoted_from_s.index, and the synthesized unpaired_s below receives that same index as well. For carbon this produces promoted states with indices (2, 2, 4, 5), dropping the other original 2s electron at index 3 and representing one electron twice. Any caller consuming AtomicRecord.promoted_unpaired_valence as the advertised tuple of one-electron states therefore gets corrupted identities, and using these indices for gonol source IDs would create a collision; retain the remaining s electron's index and assign the moved electron's distinct index to the new p state.

Useful? React with 👍 / 👎.

Comment thread research/epac/epac_molecular.py Outdated
used_promotion = False
else:
ligands = tuple(item for item in participants if item is not center)
needed = len(ligands)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use valence arity instead of ligand count for CO2

For CO2, len(ligands) is 2, so this requests only two carbon attachment sites and _attachment_set returns carbon's ground-state p pair. Each oxygen nevertheless contributes both of its unpaired sites, leaving the recorded construction with two center sites versus four ligand sites; it therefore models two unmatched single attachments rather than the carbon valence-4/two-double-bond occupancy implied by the commit's own periodic typical_valence input. Because this incorrect occupancy feeds atomic_coupling_signature, the sealed comparison is evaluating a corrupted CO2 construction; derive attachment multiplicity from the declared valence arities rather than equating sites with ligand atoms.

Useful? React with 👍 / 👎.

Subatomic gonol closes nucleus identity + Mobius framing + nuclear
harmonic relations + quantum-layer electron shells via edcm.gonol/v1.
15/15 tests pass; 15 contracts / 15 checks audit closed; replay
byte-identical. Standing: implemented-candidate, CROSS-DOMAIN-HYPOTHESIS.

Signed-off-by: erinepshovel-code <250928284+erinepshovel-code@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49161f790c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

harmonic_surviving = ",".join(
candidate.candidate_id
for candidate in _harmonic_rows(symbol)
if any(harmonics.recurrence_test(candidate).values())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Evaluate harmonic survival for the current nuclide

When constructing Li, the non-alpha recurrence tests return {"Li-7": false, "C-12": true}, but any(...values()) marks them as surviving because C-12 passed; the emitted Li receipt consequently claims that N/Z, spin-parity, and binding-energy commensurability survive even though each test explicitly rejects Li-7. H and He are also labeled from Li/C-only results. Select the result for the element being constructed, or represent cross-nuclide survival separately.

Useful? React with 👍 / 👎.

for n, l in SUBSHELL_ORDER:
capacity = 2 * (2 * l + 1)
take = min(remaining, capacity)
slots = [(m_l, 1) for m_l in _ml_down(l)] + [(m_l, -1) for m_l in _ml_down(l)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Store physical half-integer spin projections

For every atom, this records electron spin magnetic quantum numbers as m_s = ±1, although the public ElectronState.m_s field and carried quantum-layer data identify these as actual quantum numbers, whose allowed electron values are ±1/2. This places incorrect quantum states into every element gonol and its receipt; use a half-integer representation or explicitly rename and document the field as doubled spin.

Useful? React with 👍 / 👎.

candidate_id: str
relation_kind: str
participants: tuple[str, ...]
ordered_parameter: dict

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Freeze the ordered parameter captured by sealed candidates

Each frozen HarmonicCandidate retains the mutable shared ORDERED_PARAMETER dictionary. A caller can mutate candidate.ordered_parameter after _seal() computes the receipt, changing that candidate—and every other candidate—without changing any stored receipt, so the public record no longer replays to its advertised digest. Store an immutable mapping or copy and deep-freeze it during sealing.

Useful? React with 👍 / 👎.


# Atomic shell/unpaired-(l,m) signatures distinguish the formulas, but
# they are functions of the atoms already named in the formula.
atomic_equals_control = set(atomic.values()) == set(control.values())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Compare signature partitions instead of raw tuple values

In the declared run, both the atomic signature and matched-information control assign a distinct value to each of the five formulas, so they induce the same partition and the atomic signature adds no distinguishing power over the control. Comparing their raw value sets nevertheless always reports false because the two signatures use unrelated tuple schemas, not because their distinguishing behavior differs. This defeats the preregistered control subtraction and can produce the wrong experimental interpretation; compare which formula pairs each signature groups or separates instead.

Useful? React with 👍 / 👎.

Comment on lines +48 to +49
import element_affixiation_candidate as identity # noqa: E402
import nuclear_harmonic_candidates as harmonics # noqa: E402

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use package-relative imports for subatomic dependencies

When callers put the documented epac root on PYTHONPATH and import subatomic.subatomic_gonol, this bare import fails with ModuleNotFoundError because only the parent epac directory is added to sys.path, not the subatomic directory. The advertised from subatomic_gonol import ... form is likewise not discoverable from the epac root; the tests pass only because pytest adds the test directory to the import path. Use package-relative imports or expose and document a consistently importable module path.

Useful? React with 👍 / 👎.

Arity is the number of dimensions in one explicit coupling, not how
many axes exist. Geometry is generated only from declared couplings.
Overlapping binaries such as zx and zy do not create xy or xyz.
Coupling order identity remains hmmm.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0b291a1e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +225 to +229
t_states=record["t_states"],
relation_id=record["relation_id"],
ordered_parameter_id=record["ordered_parameter_id"],
closure_scale=record["closure_scale"],
source_commits=SOURCE_COMMITS,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Freeze nested state stored in element candidates

When a caller retains an ElementCandidate, candidate.t_states[0]["frame"] = ... remains possible because the tuple contains mutable dictionaries; source_commits is also the shared mutable SOURCE_COMMITS dictionary. Either mutation changes the supposedly frozen construction record without updating receipt (and mutating the shared dictionary changes every candidate), so the public candidate can no longer replay to its advertised digest. Deep-freeze or defensively copy these nested values before storing them.

Useful? React with 👍 / 👎.

Comment on lines +252 to +253
replay_receipt = element_receipt(record)
return (replay_receipt == candidate.receipt, replay_receipt)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compare replay against an external receipt

If a saved or published receipt is stale or corrupted, replay_element(symbol) still returns matches=True because it creates a fresh candidate and compares the reconstructed digest only with the receipt produced by that same in-memory construction. Since no expected candidate or receipt is accepted, the documented ok result cannot validate any prior receipt; compare the replay digest with a caller-supplied or sealed receipt instead.

Useful? React with 👍 / 👎.

Comment thread research/epac/epac_dimensional_arity.py Outdated
Comment on lines +186 to +187
target = tuple(dimension_ids)
return any(item.declared_ids == target for item in declared.couplings)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject scalar strings in coupling lookups

When callers accidentally pass a string rather than a sequence of dimension IDs, this converts its characters into the lookup tuple: for example, has_declared_coupling(space(["z", "x"], [["z", "x"]]), "zx") returns True. The construction APIs explicitly reject strings as declaration sequences, so accepting one here can falsely confirm a coupling that was never supplied in that form; apply the same string/bytes validation used by coupling() and space().

Useful? React with 👍 / 👎.

Comment on lines +293 to +295
he4 = NUCLIDE_FACTS["He-4"]
li7 = NUCLIDE_FACTS["Li-7"]
c12 = NUCLIDE_FACTS["C-12"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bind nuclide facts into harmonic receipts

When the public NUCLIDE_FACTS table is corrected or mutated, these lookups can change recurrence_test(candidate) while candidate.receipt remains identical because _canonical_record() does not include the facts or the resulting recurrence map. For example, changing C-12's BE_per_A_MeV flips the binding candidate's C-12 result without changing its digest, so the sealed receipt cannot reproduce or authenticate the advertised experimental outcome. Include the exact fact subset and/or tested outcome in the sealed record.

Useful? React with 👍 / 👎.

(z, x) is not (x, z). (x, z) and (y, z) do not yield (x, y, z) without
an explicit non-overlap proof. Degree records incidence and slot of each
dimension on declared couplings so shared-axis binaries remain binaries.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a41bbd3ce6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/epac/epac_dimensional_arity.py Outdated
Comment on lines +142 to +143

def dimension(id: str) -> Dimension:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject proofs whose conclusion is not declared

When callers pass proofs directly through the public space(..., proofs=...) API, this loop validates only their premises. A proof whose conclusion uses an undeclared dimension—or is simply absent from couplings—is therefore accepted and emitted by geometry_from_declared_couplings() as a certificate for nonexistent geometry, bypassing the checks in install_proven_coupling(). Validate each proof conclusion against the ambient dimensions and declared couplings before accepting the space.

Useful? React with 👍 / 👎.

"proton_glyphs": list(proton_glyphs),
"neutron_positions": list(neutron_positions),
"neutron_glyphs": list(neutron_glyphs),
"relation_id": CONSTRUCTION_IDS["relation"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep hydrogen's single participant relationless

When affixiate_element("H") constructs the H-1 baseline, this unconditionally records metapat.affixiation_harmonics.affixiation, even though the frozen baseline defines hydrogen as one proton with relation: none and reserves affixiation for the multi-participant elements. The resulting H receipt therefore authenticates a unary affixiation that the declared construction explicitly excludes; select the relation from the participant count or element case before sealing the record.

Useful? React with 👍 / 👎.

Comment on lines +135 to +138
carried = [
("Z", str(element.Z)),
("A", str(element.A)),
("proton-positions", ",".join(str(i) for i in element.proton_positions)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bind the identity receipt into the nucleus participant

When the upstream identity candidate's declared relation or pinned source commits change without changing Z, A, positions, glyphs, or Möbius frames, this projection produces an identical nucleus and therefore an identical final subatomic gonol digest, even though element.receipt changes. The supposedly combined, source-bound identity layer is thus not authenticated by the outer receipt; carry the identity candidate receipt (or its relation and source provenance) into the nucleus participant.

Useful? React with 👍 / 👎.

EPAC construction now closes on the UCNS Public Gonol carrier. Oriented
couplings plus each arity's charge state (nuclear Z and Möbius ε at t=0)
and degree are the three-dimensional structure already in the math.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1d7ae7253

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +308 to +309
frozen_couplings = tuple(_freeze_json(item) for item in couplings)
frozen_structure = None if structure is None else _freeze_json(structure)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Deep-freeze public gonol coupling state

When a caller supplies nested coupling or structure data, _freeze_json() returns mutable dictionaries and lists, so these supposedly frozen values can still be changed through receipt.gonol.couplings or .structure after receipt_digest is computed. For example, appending to a nested coupling list leaves the stored digest unchanged while replay_public_gonol(receipt) produces a different digest, breaking the public replay and closure contract for every consumer of this constructor. Store recursively immutable containers rather than JSON-shaped mutable copies.

Useful? React with 👍 / 👎.

Comment thread research/epac/epac_dimensional_arity.py Outdated
)
return DimensionalSpace(
ambient_dimensions=declared.ambient_dimensions,
couplings=declared.couplings + (proof.conclusion,),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve ambient charges on proven couplings

When a charged space installs a conclusion created through the public coupling(["x", "y", "z"]) helper, the conclusion contains fresh dimensions whose charges default to None, and this line appends those objects directly instead of binding them to the ambient dimensions. Consequently, a proof over ambient charges (1, 2, 3) emits a new ternary coupling with slot_charges == (None, None, None), corrupting the charged structure that this module advertises; rebuild the conclusion from the matching ambient axes or reject inconsistent charges.

Useful? React with 👍 / 👎.


CONSTRUCTOR_ID = "epac.public_gonol"
CONSTRUCTOR_VERSION = "v1"
PINNED_PUBLIC_GONOL_SHA256 = PUBLIC_GONOL_SHA256

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pin the carrier digest independently

When UCNS deliberately updates both its carrier and exported digest, assigning the EPAC pin from that exported value makes the _geometry() mismatch check automatically accept the new carrier. The unchanged epac.public_gonol v1 constructor will then produce different identities and receipts instead of failing closed on the carrier it claims to pin, so retain the expected digest as an EPAC-owned literal that must be updated explicitly with the constructor version.

Useful? React with 👍 / 👎.

Construction still has no chemistry shape names. After closure, the readout
is oriented couplings plus each arity's charge state and degree. Topology
without charge collapses H2O with CO2; charge distinguishes them; neither
recovers the sealed linear class.
Each instance has its own oriented hub coupling. (z, x0) does not cover x1,
and (x, z) does not satisfy (z, x).
- extended_atomic: Z=1..26 quantum layer (Z<=18 delegates to epac_atomic;
  declared ground-state configs K..Fe incl Cr 4s1.3d5)
- subatomic_gonol: 26 supported symbols via epac_public_gonol
- symbol_coupling: one/two-letter abbreviation gonol coupled to element
  gonol at declared arity 2 (epac.symbol-coupling)
- 26/26 subatomic tests pass; 29 sibling tests OK; audit closed 26/26

Signed-off-by: erinepshovel-code <250928284+erinepshovel-code@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61002c8dd4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/epac/epac_dimensional_arity.py Outdated
"""

parts = tuple(
sorted(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize optional charges before sorting readouts

When a valid space mixes charged and uncharged dimensions, this sort compares None with an integer and raises TypeError; for example, couplings (z, x) and (z, y) with charges {"z": 1, "y": 2} produce charge states (1, None) and (1, 2). Because Dimension.charge explicitly permits None, both charged_structure_readout() and topology_structure_readout() must provide a sortable representation for absent charges rather than crashing on supported input.

Useful? React with 👍 / 👎.

Comment on lines +308 to +309
frozen_couplings = tuple(_freeze_json(item) for item in couplings)
frozen_structure = None if structure is None else _freeze_json(structure)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive the stored structure from the supplied couplings

When callers supply both public arguments, they can describe unrelated geometries and this constructor accepts and authenticates them without validation—for example, couplings can declare binary (x, y) while structure describes unary (a). Downstream comparison reads receipt.structure, while other consumers can read gonol.couplings, and replay preserves the contradiction, so a construction can have two incompatible declared structures under one valid digest; derive the structure from the couplings or cross-check them before closure.

Useful? React with 👍 / 👎.

Comment on lines +140 to +144
if on == n and ol == l:
same_group += 1
elif on < n:
sigma += 1.00
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count same-shell s/p electrons when screening d orbitals

For every added 3d element (Sc through Fe), a target 3d electron sees the occupied 3s/3p electrons with on == n and ol != l, so neither branch counts them before this unconditional continue. The standard Slater d-electron rule promised by this module counts those earlier same-principal-shell s/p groups with weight 1.0; for Fe the omission yields Z_eff = 14.25 instead of 6.25, corrupting the recorded effective charges and Rydberg energies for all 3d electrons.

Useful? React with 👍 / 👎.

Comment thread research/epac/epac_dimensional_arity.py Outdated
Comment on lines +374 to +378
(
int(part["arity"]),
_tuple_tree(part["charge_state"]),
)
for part in structure["parts"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve coupling incidence in structure readouts

When dimensions have uniform charges, this readout discards which endpoints belong to each coupling and retains only the multiset of edge charge states plus per-axis degree tuples. Consequently, a connected directed four-cycle and two disconnected reciprocal pairs both produce exactly the same charged_structure_readout() (and topology readout), despite having different connectivity. Because this value is used as the order-invariant structure comparison, preserve adjacency under dimension relabeling rather than dropping coupling incidence entirely.

Useful? React with 👍 / 👎.

- .gitignore now covers .skill-lib/ (local usage state, never committed)
- remove superseded coupling_arity duplicates; canonical implementation is
  epac_dimensional_arity.py

Signed-off-by: erinepshovel-code <250928284+erinepshovel-code@users.noreply.github.com>
Two-letter abbreviations are (z,x) and (z,y) on three participating
dimensions. The charged 3-structure readout keeps those instance ids.
Abbreviations are nomenclature. Physical (z, x_i)/(z, y_j) couplings stay
on atom instances; letter characters do not take nuclear Z or dimensional
arity.
Atomic 3-structure is one (nucleus, electron_i) coupling per electron,
with slot charges (Z, -1). That closure stays inside the element gonol.
Molecular water remains (O#2, H#0) and (O#2, H#1). Letters stay names.
Four components hold one 3: Möbius ε plus the three axis charges.
The extra coordinate is the scalar, not a fourth ambient axis.
Hamilton product is not a coupling proof and does not install (x,y,z).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b262735fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +167 to +169
for item in self.couplings:
missing = [name for name in item.declared_ids if name not in ambient]
if missing:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject coupling charges that conflict with ambient axes

When callers use the exported DimensionalSpace constructor directly, this validates only each coupling's dimension IDs, not that its Dimension objects carry the ambient charges. For example, ambient charges (x=1, y=2) with a coupling built from (x=9, y=8) is accepted, after which structure_from_charged_couplings() reports (9, 8) in the coupling charge state but (1, 2) in its degree records. Reject inconsistent charges or normalize every coupling to the corresponding ambient Dimension objects so a valid space cannot emit contradictory charged structure.

Useful? React with 👍 / 👎.

Comment on lines +364 to +365
charges = {axis.id: axis.charge for axis in declared.ambient_dimensions}
hub_id, first_id, second_id = represented_ids

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require the quaternion triple to exist in the declared space

When callers use this exported helper directly, represented_ids is never checked against local_three_structures(declared) or even against the ambient axes. Thus quaternion_of_local_three(space(["x", "y", "z"]), ("x", "y", "z")) emits a purported three-dimensional quaternion despite the space declaring no couplings at all, and unknown IDs merely receive None charges. This bypasses the module's rule that a local three exists only from two declared hub-first binary couplings; reject triples that are not present in local_three_structures(declared).

Useful? React with 👍 / 👎.

Comment on lines +348 to +350
for index, first in enumerate(instance_ids):
for second in instance_ids[index + 1 :]:
threes.append((hub_id, first, second))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject duplicate edges before forming a local three

When the public space() API receives the same binary declaration twice, both copies add the same instance ID here, so the pair loop emits ("z", "x", "x") as a local three. The resulting structure has only two participating dimensions but contains a quaternion labeled as a represented three-dimensional structure with the x axis repeated. Either reject duplicate coupling declarations or require the two instance IDs to be distinct before constructing the triple.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44877be6d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +538 to +544
sorted(
(
_tuple_tree(item["components"]),
_tuple_tree(item["represented_ids"]),
)
for item in structure.get("quaternions", ())
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Sort quaternion components with a total ordering

When a valid local-three structure mixes charged and uncharged dimensions, the generated component tuples contain both integers and None; sorting multiple such quaternions can then compare those values directly and raise TypeError. For example, declarations (z,x), (z,y), and (z,w) with charges only for z, y, and w produce components (1,1,None,2) and (1,1,2,3), causing quaternion_structure_readout() to fail on supported input. Use the module's total-order normalization (as the charged readout does) for this sort.

Useful? React with 👍 / 👎.

Comment on lines +249 to +251
expected = tuple(sorted((_coupling_signature(item) for item in couplings), key=repr))
actual = tuple(sorted((_structure_part_signature(item) for item in parts), key=repr))
if expected != actual:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate the complete structure against its couplings

The newly added consistency check compares only structure["parts"], so a caller can keep those parts valid while supplying fabricated degree records, quaternion data, participating_dimension_count, or ternary flags. For example, a single (x,y) coupling is accepted with empty degree data and a participating count of 99, after which charged_structure_readout() reports that contradictory authenticated structure. Derive these fields from the couplings or validate the entire structure before computing the receipt.

Useful? React with 👍 / 👎.

Comment on lines +357 to +360
closed_participants = tuple(participants)
for item in closed_participants:
if not isinstance(item, ClosedPublicGonol):
raise PublicGonolConstructionError("participants must already be closed EPAC public gonols")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify closed participants before sealing the parent

When a caller directly instantiates the exported ClosedPublicGonol dataclass with inconsistent fields or bogus digests, this type-only check accepts it as a closed participant and seals it into a parent with a valid new receipt. For example, a participant whose atomic_id, receipt_digest, and geometry_digest are all arbitrary text is accepted unchanged, so the parent's authenticated payload contains a participant that was never produced by this constructor. Recompute and validate each participant's identities recursively before accepting it.

Useful? React with 👍 / 👎.

Element construction starts with nucleon precursors. Each proton and
neutron is a closed gonol; the nucleus is their affixiation. Neutrons
couple to protons as (proton, neutron) with charges (+1, 0). Electrons
still couple to the closed nucleus. Molecular couplings do not reopen
nucleons.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7ec865c78

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +217 to +223
receipt = construct_public_gonol(
source_id=f"epac.molecule:{formula}",
relation=RELATION,
participants=participants,
couplings=geometry["couplings"],
structure=geometry["structure"],
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Seal molecular evidence into the receipt

When attachment-site selection or the Möbius binding changes while the atom participants and atom-level dimensional couplings remain the same, this call produces the same receipt because neither center_sites, ligand_sites, nor mobius is supplied to construct_public_gonol. The comparison nevertheless derives its atomic and UCNS standings from those unsealed values in construction.invariants, and replay_molecule() can reproduce only the receipt, so a saved construction cannot authenticate or reconstruct two of the reported experimental readouts. Include the attachment and Möbius evidence in the closed gonol payload before computing its receipt.

Useful? React with 👍 / 👎.

Comment on lines +99 to +103
def _harmonic_rows(symbol: str) -> tuple[harmonics.HarmonicCandidate, ...]:
return tuple(
candidate
for candidate in harmonics.CANDIDATES
if any(participant.startswith(f"{symbol}-") for participant in candidate.participants)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match harmonic candidates to the constructed isotope

When constructing the default H-1 nucleus, this symbol-prefix filter also selects candidates whose only hydrogen participant is H-2; for example, the resulting H-1 gonol carries harmonic:binding_per_nucleon_commensurability even though that candidate declares H-2, He-4, Li-7, and C-12. This binds evidence for a different nuclide into the authenticated H-1 participant. Filter using the constructed (symbol, A) rather than the element prefix.

Useful? React with 👍 / 👎.

"CROSS-DOMAIN-HYPOTHESIS"
]
],
"constructor_id": "edcm.gonol",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate the subatomic gonol receipt artifacts

The committed gonol_h.json artifact still identifies its constructor as edcm.gonol, even though the new implementation and its stated contract require epac.public_gonol and explicitly prohibit the EDCM constructor; the He, Li, and C artifacts have the same stale value. Reconstructing H with the documented EPAC/UCNS PYTHONPATH produces receipt digest 2fe9597f... rather than the stored 3191f743..., so these published receipts no longer authenticate the code in this commit and consumers will read obsolete harmonic standings and constructor provenance. Regenerate all four artifacts from the current constructor and add a snapshot check.

Useful? React with 👍 / 👎.

Comment on lines +361 to +367
options = tuple(
(
_require_text(key, field="carried option key"),
_require_text(value, field="carried option value"),
)
for key, value in carried_options
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject duplicate carried-option keys

When a caller supplies duplicate carried-option keys, this constructor authenticates both values without defining which one is authoritative. The repository already interprets the result inconsistently: epac_periodic.carried() and symbol_of() return the first matching value, while the subatomic code and tests commonly use dict(gonol.carried_options), which retains the last value. A gonol containing ("Z", "1"), ("Z", "8") can therefore produce different charges or identities depending on the consumer despite having one valid receipt; reject duplicate keys during closure.

Useful? React with 👍 / 👎.

@erinepshovel-code
erinepshovel-code merged commit 7857875 into main Aug 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant