Skip to content

Bind the validated byte model to the linked Zig export - #38

Merged
hyperpolymath merged 2 commits into
hyperpolymath:mainfrom
metadatastician:codex/native-byte-binding-20261130
Nov 30, 2026
Merged

hyperpolymath merged 2 commits into
hyperpolymath:mainfrom
metadatastician:codex/native-byte-binding-20261130

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

The previous translation gate checks the Zig source and the compiled Coq model. This change adds an observation of the actual linked Zig export for each input in the closed byte profile.

  • Build the accepted source for baseline x86-64 Linux with Zig 0.15.2 and a separate, statically linked pure-Zig observer. Check the export and the observer's undefined symbol before linking.
  • Capture all 256 return bytes from each of advance_five and nudge_byte. Check the captured vector against the validated Coq model, audit assumptions, run coqchk, and replay the archived executable.
  • Exercise seven negative controls covering the wrong object, a changed final byte, a short trace, a substituted model, an edited source, a substituted executable, and the reserved Linux entry symbol.
  • Keep the Proven public-header and UAA registry-lifetime jobs and both required upstream gate contexts.

The intended result covers the recorded native executions for the identified binaries and build profile. Compiler-wide refinement and other targets remain open. Receipts retain the INCOMPLETE status.

The hosted native byte job checked 256/256 outputs for each export and independently replayed both executables. Each native capsule reports three closed theorems. The wrong object returned 4 where the model requires 5 at input 0. Changing only the final byte produced 5 where the model requires 4 at input 255. The source model accepted the reserved export and the native observer explicitly refused it. The evidence archive contains the raw traces, binaries, manifests and Coq closures.

The Proven public-header pilot replayed revision 7c726bf43ffc455c394b6dafa3a04b3608b9654d. Its evidence archive contains 60 native benchmark observations across four Zig modes. Every row reports passing correctness guards.

The UAA registry-lifetime pilot replayed revision 3738d5467908374f13546a9744093bdaf5cbb63a. The raw benchmark records three samples per mode across four Zig modes. Every sample observed exactly 20,000 callbacks over 20,000 iterations.

@gitnotebooks

gitnotebooks Bot commented Nov 30, 2026

Copy link
Copy Markdown

Review these changes at https://app.gitnotebooks.com/hyperpolymath/atoma/pull/38

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T10:33:21.428263Z b26d0cf New commits
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR adds native byte observation and Coq checks for two exports. It builds and replays archived native evidence, adds refusal controls to the translation gate, and updates the workflow labels and decision document.

Changes: Native Byte Validation

Layer / File(s) Summary
Source parsing and byte proofs
verification/atoma/consumer/coq/U8Source.v, verification/atoma/consumer/coq/U8Native.v
The source parser exposes the exported function name while preserving the original parse result. New Coq proofs connect that name and the 256-byte trace to the model, specification, and source runner.
Native byte evidence and replay
examples/atoma/source-u8/native-observer.zig, scripts/atoma-native-byte.sh, docs/decisions/ATOMA-BYTE-TRANSLATION.adoc
The observer writes one result for each byte input. The script builds the static native executable, checks and records its trace, writes an INCOMPLETE receipt, and validates archived evidence during replay. The decision document describes the evidence and its scope.
Gate integration and refusal controls
.github/workflows/atoma.yml, scripts/atoma-translation-gate.sh, docs/decisions/ATOMA-BYTE-TRANSLATION.adoc
The gate checks and replays advance-five and nudge. It adds refusal controls for incorrect outputs, altered or truncated traces, model substitution, and stale archived inputs. Workflow labels and decision text describe the native checks.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant Script as atoma-native-byte.sh
  participant Observer as native-observer.zig
  participant Export as ATOMA_EXPORT
  participant Checker as Coq checker
  Script->>Observer: Build and run observer
  Observer->>Export: Call export for inputs 0–255
  Export-->>Observer: Return one byte per input
  Observer-->>Script: Write 256-byte trace
  Script->>Checker: Check trace against model and source proofs
  Script->>Script: Replay archived executable and compare output
Loading

Possibly related PRs

  • hyperpolymath/atoma#37: Adds source-side Coq validation for the byte profile that this PR connects to native export observations.
  • hyperpolymath/atoma#2: Introduces the u8 verification pilot extended here with native byte observation and replay.
Merge Risk: Minimal · up to b021b

The change adds a recorded native observation of two Zig exports across all 256 byte inputs. It checks the observation against the validated Coq model and adds refusal controls for wrong, altered or short evidence. I found no concrete merge-blocking risk. The evidence is deliberately scoped to one build profile and stays marked incomplete.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Bind the validated byte model to the linked Zig export" names the main change: the PR adds an observation of the linked Zig export for each input in the byte profile and checks it against t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the summary, the native byte validation scope, the negative controls, the retained jobs, and the evidence links. It follows the template's Summary-style content but has no Chang…
Full details: Title check

Explanation

The title "Bind the validated byte model to the linked Zig export" names the main change: the PR adds an observation of the linked Zig export for each input in the byte profile and checks it against the validated Coq model. It is specific and matches the changeset and PR objectives.

Full details: Description check

Explanation

The description covers the summary, the native byte validation scope, the negative controls, the retained jobs, and the evidence links. It follows the template's Summary-style content but has no Changes list, no RSR Quality Checklist, and no Testing section. The Testing content is in the body text as CI run results. Most required information is present, so the description is mostly complete. The missing checklist items are not verifiable from the text alone.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7a184f7 and b021bfb.

Files selected for processing: 7

  • .github/workflows/atoma.yml
  • docs/decisions/ATOMA-BYTE-TRANSLATION.adoc
  • examples/atoma/source-u8/native-observer.zig
  • scripts/atoma-native-byte.sh
  • scripts/atoma-translation-gate.sh
  • verification/atoma/consumer/coq/U8Native.v
  • verification/atoma/consumer/coq/U8Source.v

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@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: b021bfb155

ℹ️ 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 scripts/atoma-native-byte.sh Resolved
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit d1ad9c6 into hyperpolymath:main Nov 30, 2026
60 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