Skip to content

feat(binary): native byte-origin sequence closure and recovery for Weave - #7

Closed
erinepshovel-code wants to merge 1 commit into
mainfrom
weave-binary-origin-cycle
Closed

erinepshovel-code wants to merge 1 commit into
mainfrom
weave-binary-origin-cycle

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

Delivered

New explicit binary-domain UCHC construction, consuming actual source-pinned UCNS AxisCirclePosition and NativeMobiusState objects. One message-origin retains its identity across round-specific byte-axis frames. Selected repeated multi-byte sequences close at whole-circle attachments; seven occurrence circles preserve ordered native participation. recover_sequences inverts their exact space displacements and reconstructs the source from definitions and circle positions, without an original-message copy or encoder trace.

This is a working domain producer, not a metadata surrogate or a cryptographic trapdoor. No English/Python migration, language semantics, UCNS ownership, or security status transfers.

Explicit candidate choices

The first selected occurrence supplies a sequence's native whole-circle attachment. Circle assignments and eight exact space offsets remain caller data. The candidate retains 360-degree visible / 720-degree complete-return distinctions through the real native producer. No universal selection or space law is introduced.

File plan

Path Change Purpose / risk Validation
binary/uchc_binary/origin.py add Source-bearing byte origins, native closure and coordinate recovery; source substitution, lost order, incorrect lift 13 producer tests plus cross-repo cycle tests
binary/uchc_binary/init.py add Public binary API source and installed-wheel imports
binary/tests/test_origin.py add Source-owned contract witnesses all pass, zero skips
binary/README.md add Usage, explicit candidate, boundaries and rollback runnable examples
binary/work-graph.json add Exact starting authorities; no pretending baseline contains new module deterministic digest test
pyproject.toml modify Include new domain in existing wheel clean build/install and replay
.github/workflows/binary.yml add Read-only exact-event and isolated PR validation against pinned UCNS source tests and clean installed-wheel tests

Observed local evidence

13 tests passed, zero failures/errors/skips, on Python 3.13.5. Includes all 256 byte values, occurrence distinctions, repeated/residual closure, seven-circle recovery, native 360/720 return, effective circle-space changes, per-round identity, leading zero/empty input, invalid partitions/positions, work-graph identity, and changed-source refusal before execution.

Uploaded implementation blob 300db7383b403acbff7ce9a94f7536ad047bc78b and test blob 5a58c326c071f60bc91e004535b5007ed36d2414 exactly match locally tested bytes. UCNS commit: 905e66964a495d7596a577bb64e4158db9465864.

The local Stack consumer also completed its three-round normalized/affixiated/interleaved cycle, including a 64 KiB case and fresh-process recovery. Consumer publication follows the producer; no dependent consumer merge before producer validation.

Usage

PYTHONPATH=binary UCNS_ROOT=/checkout/ucns python3 -m unittest discover -s binary/tests -v

Read binary/README.md. Work-graph identity: 8ffd01a53c59a4d964ab714f70835113e240e9d90eeafd9ed774db05c37c8ec0.

hmmm: this is native positional representation and exact recovery, not public-key secrecy, authentication, a general cross-origin metric, or a completed English/Python graduation.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T17:53:04.109746Z 65ac43d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 65ac43d5d4

ℹ️ 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 binary/README.md
@@ -0,0 +1,82 @@
# Binary origin and repeated-sequence construction

This is a new, executable UCHC binary-domain candidate. It does not move the

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 Keep the candidate implementation in its owning forge

This explicitly introduces a new executable candidate, while the patch provides no migration record or replay/equivalence evidence and its own hmmm leaves the attachment rule and release qualification unresolved. Packaging uchc_binary in the UCHC wheel therefore promotes a speculative domain into this implementation/public-contract repository prematurely; keep it in the owning Stack forge or complete and record the migration gates before shipping it here.

AGENTS.md reference: AGENTS.md:L34-L38

Useful? React with 👍 / 👎.



@dataclass(frozen=True)
class SequenceTable:

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 Validate closed records before emitting source-bound receipts

Because the exported frozen record classes enforce no invariants, a consumer can directly instantiate SequenceTable or use dataclasses.replace(table, order=()); restore() then returns data different from origin.source, while receipt() still emits the unchanged source-bound origin identity. This allows inconsistent order, definitions, occurrences, and provenance to masquerade as a closed table, so validate the complete relation during construction or keep these constructors private and reject records not produced by the closure path.

AGENTS.md reference: AGENTS.md:L34-L35

Useful? React with 👍 / 👎.

except BaseException:
sys.modules.pop(name, None)
raise
return sys.modules[name]

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 Do not trust mutable module-cache entries as verified geometry

When a producer blob has already been loaded, this returns whatever mutable object currently occupies the predictable sys.modules entry rather than the module compiled from the just-verified bytes. Since Geometry.axis_module and mobius_module expose those modules, ordinary test instrumentation or consumer monkeypatching can alter a function and cause every later Geometry instance to silently use non-UCNS construction despite rechecking the checkout; retain and validate a private immutable loader result or execute an independently verified module for each instance.

AGENTS.md reference: AGENTS.md:L16-L17

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Withdrawing this premature UCHC placement rather than waiving the domain-migration gate. The candidate and all 13 producer tests are preserved, repaired and integrated in the owning Stack forge in The-Interdependency/stack#77 at c360b92e101ff4ac2af7dc33155edec95d7f5887.

Current source: research/weave/native_binary.py (blob 8b22cefa39129a6e1ab41de6ac7d495e8b90542e). NATIVE_BINARY_PROVENANCE.json retains this exact proposal commit/path/blob, the FSL-1.1-ALv2 license/notice links and original copyright. UCNS geometry is unchanged. UCHC remains the architecture/migration reference, not a new binary runtime dependency.

The other two P1 findings are repaired in that preserved source: complete SequenceTable validation checks source/order/definitions/occurrences/native axes/frames/space relations before closure or receipts; each Geometry executes freshly checked source bytes without trusting prior mutable module-cache entries. Twelve new repair regressions join the 13 original producer tests; the full Stack workspace passes 125 tests locally with no failures/errors/skips.

This PR will not be merged or packaged. The code is not discarded, and no passing test is being treated as domain graduation or cryptographic evidence. Hosted Stack validation and current review remain separate gates on #77.

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