Skip to content

Check a new nested Zig expression through the source proof path - #36

Merged
hyperpolymath merged 1 commit into
mainfrom
codex/beta-unseen-zig-20261130
Nov 30, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
codex/beta-unseen-zig-20261130

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

The alpha pilots qualified source profiles written for specific Proven and UAA entry points. This beta slice takes a new Zig export through the ordinary source checker by lowering its returned AST expression to a bounded byte model.

The new fixture uses nested wrapping addition under an independently written postcondition. The hosted gate compares the emitted SMT and Coq obligations against that contract, runs the compiled export over all 256 inputs, and checks refusal of a body-only mutation, unsupported ordinary addition and a stale proof capsule.

The model receipt stays INCOMPLETE. Parser, lowering and compiler correspondence are still open. The existing Proven and UAA pilot gates are part of the required hosted run.

Hosted validation passed in run 46340626518. The compiled export matched the widened oracle for 256 inputs on Zig 0.15.2, native x86_64 Linux, Debug. Z3 returned unsat for the original and sat for the source-only mutant. At input 0 the mutant returned 4 against an expected 5. The unsupported ordinary addition was located at line 5, column 19. ECHIDNA and coqchk accepted the independently audited theorem with no axioms and refused the mutant obligation and stale proof. Both pilot replays and required gates passed.

@gitnotebooks

gitnotebooks Bot commented Nov 30, 2026

Copy link
Copy Markdown

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

@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-30T02:26:03.023764Z eb0abce PR opened
🔒 Security Review ✅ Completed 2026-11-30T02:27:33.296542Z eb0abce 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.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Atoma now parses nested expressions in its closed u8 source profile. The change adds source diagnostics and advance-five fixtures, then checks their source proofs, native results, and replay evidence.

Changes: Scalar Source Extension

Layer / File(s) Summary
Bounded source model and diagnostics
tools/atoma/src/source.zig, tools/atoma/src/main.zig, docs/decisions/ATOMA-BETA-SCALAR.adoc, docs/decisions/ATOMA-SOURCE-TO-PROOF.adoc
The source parser now lowers bounded expression trees with input, literals, grouping, and wrapping addition. It stores the body and contract separately and records diagnostic locations. The command-line report includes diagnostic details and derives expected values from the contract. The decision documents describe the beta scope and evidence checks.
Source and native witness checks
examples/atoma/source-u8/advance-five*.zig, scripts/atoma-gate.sh
The examples define the correct, incorrect, and unsupported advance_five bodies, plus an exhaustive native witness. The gate checks source results and solver verdicts, builds the positive and mutant examples, and checks their native witnesses.
Proof replay checks
scripts/atoma-replay-gate.sh
The replay gate checks evidence hashes and rejects a proof used with a mismatched source or a proof that Echidna does not verify.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Gate as atoma-gate.sh
  participant CLI as Atoma CLI
  participant Lowering as source.lower
  participant Z3
  participant Zig as Zig build and test
  participant Witness as advance-five-witness
  Gate->>CLI: Check the advance-five source fixtures
  CLI->>Lowering: Parse and lower source and contract
  Lowering-->>CLI: Return Program or diagnostic
  Gate->>Z3: Check positive and mutant solver verdicts
  Gate->>Zig: Build positive and mutant native examples
  Zig->>Witness: Run exhaustive native witness
  Witness-->>Gate: Return test result
Loading

Possibly related PRs

  • hyperpolymath/atoma#2: Adds the closed u8 source-to-proof pilot and executable checks that this change extends for a nested expression.
  • hyperpolymath/atoma#30: Defines the Coq and scalar consumer gates that this change continues to use.
Merge Risk: Minimal · up to eb0ab

This change extends the closed u8 source profile to nested wrapping-add expressions and adds fixtures plus gate checks. No actionable merge-blocking issue was found. The remaining trust assumptions about the Zig frontend, lowering and compiler are documented as intentionally open.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description covers the purpose, the verification scope, and the validation results. It explains the new nested-expression fixture, the hosted gate checks (SMT/Coq obligations, 256-input execution,… Restructure the description to follow the repository template. Add a Summary section that links related issues (or states none). Add a Changes section that lists the key changes, including the new decision document, the fixtures (advance-fi…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: a new nested Zig expression is checked through the source proof path. The changeset adds a bounded expression tree lowering in tools/atoma/src/source.zig, a new advanc…
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.
Full details: Title check

Explanation

The title names the main change: a new nested Zig expression is checked through the source proof path. The changeset adds a bounded expression tree lowering in tools/atoma/src/source.zig, a new advance-five fixture with nested wrapping addition, and a gate script that runs the source checker on it. The title is specific and matches the primary objective in the PR objectives.

Full details: Description check

Explanation

The description covers the purpose, the verification scope, and the validation results. It explains the new nested-expression fixture, the hosted gate checks (SMT/Coq obligations, 256-input execution, body-only mutation refusal, unsupported addition refusal, stale proof refusal), and the INCOMPLETE model receipt. It also cites a hosted run with concrete results. However, it does not follow the repository template. It has no Summary or Changes headings, and the Changes section lists no file-level changes. The RSR Quality Checklist is absent, so the author did not state whether tests, formatting, linting, banned-pattern checks, SPDX headers, or the deed and ROADMAP updates were completed. The Testing section is present only as a narrative, and the Screenshots section is absent, which is acceptable because it is marked as applicable only when relevant.

Resolution

Restructure the description to follow the repository template. Add a Summary section that links related issues (or states none). Add a Changes section that lists the key changes, including the new decision document, the fixtures (advance-five.zig, advance-five-wrong-body.zig, advance-five-unsupported.zig, advance-five-witness.zig), the gate scripts (atoma-gate.sh, atoma-replay-gate.sh), and the source.zig and main.zig API changes. Add the RSR Quality Checklist and mark each required item, including tests, formatting, linter, banned patterns, unsafe blocks, banned functions, SPDX headers, and secrets. Mark the applicable items, such as the decision document update under docs/decisions/ and the CHANGELOG or ROADMAP status if they changed. Note the breaking public API changes to Program, lower, and the removed Expr type in the Changes section.

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 72c2800 and eb0abce.

Files selected for processing: 10

  • docs/decisions/ATOMA-BETA-SCALAR.adoc
  • docs/decisions/ATOMA-SOURCE-TO-PROOF.adoc
  • examples/atoma/source-u8/advance-five-unsupported.zig
  • examples/atoma/source-u8/advance-five-witness.zig
  • examples/atoma/source-u8/advance-five-wrong-body.zig
  • examples/atoma/source-u8/advance-five.zig
  • scripts/atoma-gate.sh
  • scripts/atoma-replay-gate.sh
  • tools/atoma/src/main.zig
  • tools/atoma/src/source.zig

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

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Hypatia grid green

🟢 clean · commit eb0abce3faed · run 46341147261 · scope: this change (10 file(s))

Advisory: 11 row(s), worst 🔴 high (0 critical, 9 high in grid scope) — reported, never grading the change.

Unique graded findings across gating and advisory rows: 19 (19 reporter observations; 19 without sufficient identity to corroborate). Row counts remain per reporter; unique totals do not change gating.
Raw Hypatia alert-derived observations: 49 (code-scanning, Dependabot and secret-scanning; some may also be in SARIF; not an extra total).

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — same commit (no revision comparison)
panic-attack assail advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
pons asinorum advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
echidnabot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
rhodibot (RSR compliance) advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
panicbot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
sustainabot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
glambot (presentation quality) advisory 🔵 minor 0 0 0 5 — same commit (no revision comparison)
seambot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
finishingbot (release readiness) advisory 🔴 high 0 9 5 0 — same commit (no revision comparison)
cipherbot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
Hypatia scan: 4 finding(s)
  • 4 further finding(s) in files this change does not touch: reported, not graded (0 critical, 3 high).
panic-attack assail: 22 finding(s)
  • 22 further finding(s) in files this change does not touch: reported, not graded (0 critical, 3 high).
pons asinorum: 9 finding(s)
  • 9 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
echidnabot: not_applicable — template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
  • ⚪ not applicable: template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
rhodibot (RSR compliance): 11 finding(s)
  • 11 further finding(s) in files this change does not touch: reported, not graded (0 critical, 10 high).
panicbot: not_applicable — panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
  • ⚪ not applicable: panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
  • ⚪ not applicable: reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
glambot (presentation quality): 104 finding(s)
  • info GS-001 — Install git-seo for comprehensive SEO analysis: https://github.com/hyperpolymath/git-seo
  • info MACH-007 — ECOSYSTEM.scm not found in .machine_readable/ directory.
  • info MACH-007 — META.scm not found in .machine_readable/ directory.
  • info MACH-007 — STATE.scm not found in .machine_readable/ directory.
  • info MACH-005 — No robots.txt found. Consider adding one for crawler control.
  • 99 further finding(s) in files this change does not touch: reported, not graded (0 critical, 2 high).
seambot: not_applicable — template default: enrol once a seam register exists at spec/seams/seam-register.json
  • ⚪ not applicable: template default: enrol once a seam register exists at spec/seams/seam-register.json
finishingbot (release readiness): 185 finding(s)
  • high V1-DOC-ROADMAP.adoc — Required file ROADMAP.adoc not found (Project roadmap).
  • high TOOL-001 — .tool-versions file not found for asdf/mise version management.
  • high SCM-001-NEUROSYM.scm — Required SCM file NEUROSYM.scm not found (Neurosymbolic AI documentation).
  • high SCM-001-AGENTIC.scm — Required SCM file AGENTIC.scm not found (Agentic AI integration documentation).
  • high SCM-001-PLAYBOOK.scm — Required SCM file PLAYBOOK.scm not found (Operational playbooks and procedures).
  • high SCM-001-ECOSYSTEM.scm — Required SCM file ECOSYSTEM.scm not found (Project's place in the ecosystem).
  • high SCM-001-META.scm — Required SCM file META.scm not found (Meta-level information and architectural decisions).
  • high SCM-001-STATE.scm — Required SCM file STATE.scm not found (Project state and progress tracking).
  • high PH-100 — Found 128 placeholders, exceeds maximum allowed (0)
  • medium V1-COM-CONTRIBUTING.md — CONTRIBUTING.md file not found (Contribution guidelines).
  • medium V1-COM-CODE_OF_CONDUCT.md — CODE_OF_CONDUCT.md file not found (Code of conduct).
  • medium V1-SEC-001 — SECURITY.md not found for responsible disclosure.
  • medium TEST-001 — Could not determine if this is a Rust or Deno project.
  • medium REL-004 — No SECURITY.md file found
  • 171 further finding(s) in files this change does not touch: reported, not graded (0 critical, 4 high).
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
  • ⚪ not applicable: template default: enrol once the repository implements cryptography
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
  • ⚪ not applicable: template default: enrol once the repository serves HTML

Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run.

@hyperpolymath
hyperpolymath merged commit 6ac14ff into 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