Skip to content

Prove line-ending normalization and the header/streaming boundaries - #15

Merged
hyperpolymath merged 4 commits into
mainfrom
codex/line-ending-proof-20261116
Nov 16, 2026
Merged

hyperpolymath merged 4 commits into
mainfrom
codex/line-ending-proof-20261116

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Sholes described line-ending proofs at paths that were absent. This adds the canonical token model and checked laws for LF/CR/CRLF normalization, then proves the specific header and chunk-boundary results needed by Atoma and Proven.

  • Agda source: idempotence, equivalence preservation/reflection, hash congruence, conditional binary preservation, qualified lens laws, header-break preservation, and streaming composition/refinement.
  • Counterexamples: canonical bytes cannot recover every original spelling; a CRLF-pair-only detector misses canonical breaks; resetting state between CR and LF changes the result.
  • Numeric octets: a checked finite bijection and list-level normalization/header laws in Agda, Lean and Rocq. All 256 values are covered by finite reflection with a proved coverage lemma; no unchecked native evaluator is used.
  • Lean and Rocq hand re-proofs for the core/header/lens/streaming statements; explicit source correspondence and limitations in verification/proofs/SHOLES.adoc. These are not automatically exported Agda objects.
  • README/EXPLAINME now distinguish delivered proof sources from the unimplemented Rust/classifier/Git-driver design.

Validation at signed commit b9256fd6090af9199d7307e2381f7a5e9c5cad44 (local files matched the committed tree):

  • Agda 2.6.4.3: --safe --without-K --cubical-compatible --double-check --warning=error.
  • Separate full Cubical path consumer: --safe --cubical --double-check --warning=error.
  • Lean 4.15.0; every named theorem audited without additional axioms.
  • Rocq 9.2 plus coqchk; every named lemma audited without additional axioms.
  • All three provers reject the same deliberately false header-preservation claim.
  • Existing Agda/Lean/Rocq manifest gates pass, including the new sources.
  • Reproduce with just check-line-endings (or bash scripts/check-line-endings.sh); the runner emits version, source-hash and checker logs.

Consumer evidence: at Proven c13619f9a67a1b9e8234e22e22dae0940d2480cb, actual RefC-compiled hasCRLF returns true for lone CR/LF and embedded CR, while the compiled Zig export returns false. This proof explains why normalization cannot repair that pair-only detector; it does not claim that the runtime mismatch is fixed.

Open boundaries: automatic witness correspondence, executable/compiler refinement, real classifier soundness, buffer/ownership proof and matching Lean4Lean replay. The installed Lean4Lean binary rejected object headers, so that leg is explicitly not passed. No PWG grade or verified runtime claim is made.

The proof sources use the canonical verification/proofs/ tree. The root-shape and AsciiDoc failures introduced during preparation were repaired without weakening gates. Local commit signature checks report G for the final head. Companion consumer design and executable diagnostic: hyperpolymath/atoma#26.

…position

Add safe compatible Agda source, a full Cubical consumer, Lean/Rocq hand re-proofs, finite octet correspondence, audited assumptions and rejecting controls. Qualify normalization lens laws and separate checked mathematics from the unimplemented runtime.
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Hypatia grid green

🟢 clean · commit b9256fd6090a · run 43783724491 · scope: this change (19 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: 36 (36 reporter observations; 20 without sufficient identity to corroborate). Row counts remain per reporter; unique totals do not change gating.
Raw Hypatia alert-derived observations: 36 (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 8 — 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 18 1 — 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: 1 finding(s)
  • 1 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
panic-attack assail: 18 finding(s)
  • 18 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 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): 87 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.
  • info VIS-005 — EXPLAINME.adoc:24 — Line 97 characters exceeds max length of 80.
  • info VIS-005 — README.adoc:22 — Line 145 characters exceeds max length of 80.
  • info VIS-005 — verification/proofs/SHOLES.adoc:92 — Line 83 characters exceeds max length of 80.
  • 79 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): 176 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 127 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
  • medium PH-004 — Justfile:585 — Found 'HACK' in: @grep -rn "TODO|FIXME|HACK|XXX" --include=".rs" --include=".ex" --include=".res" --include=".gleam" --include=".zig" --include=".idr" --include="*.hs" . 2>/dev/null || echo "No TODOs"
  • medium PH-003 — Justfile:585 — Found 'XXX' in: @grep -rn "TODO|FIXME|HACK|XXX" --include=".rs" --include=".ex" --include=".res" --include=".gleam" --include=".zig" --include=".idr" --include="*.hs" . 2>/dev/null || echo "No TODOs"
  • medium PH-002 — Justfile:585 — Found 'FIXME' in: @grep -rn "TODO|FIXME|HACK|XXX" --include=".rs" --include=".ex" --include=".res" --include=".gleam" --include=".zig" --include=".idr" --include="*.hs" . 2>/dev/null || echo "No TODOs"
  • medium PH-001 — Justfile:585 — Found 'TODO' in: @grep -rn "TODO|FIXME|HACK|XXX" --include=".rs" --include=".ex" --include=".res" --include=".gleam" --include=".zig" --include=".idr" --include="*.hs" . 2>/dev/null || echo "No TODOs"
  • medium PH-001 — Justfile:583 — Found 'TODO' in: # Show TODO comments
  • medium PH-001 — Justfile:309 — Found 'TODO' in: # TODO: Replace with your audit command
  • 8 more graded finding(s); see the structured report in the artifact.
  • 148 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.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 16, 2026 07:42
@hyperpolymath
hyperpolymath merged commit c28993a into main Nov 16, 2026
46 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 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-16T07:47:51.160001Z b9256fd Draft marked ready
🔒 Security Review ✅ Completed 2026-11-16T07:46:01.739698Z b9256fd Draft marked ready
ℹ️ 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: b9256fd609

ℹ️ 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 Justfile
Comment on lines +769 to +770
check-line-endings:
bash scripts/check-line-endings.sh

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 Wire the strict line-ending gate into CI

This recipe is currently only a manual entry point. I checked .github/workflows, the ci recipe, and build/just/proofs.just; none invokes check-line-endings, while proof-check-all only scans the existing prover manifests and therefore never checks verification/proofs/cubical/SholesCubical.agda or runs the new assumption audits and rejection controls. A later regression in those checks can consequently merge without any automated failure, so this recipe should be added to the CI dependency chain or an equivalent workflow step.

Useful? React with 👍 / 👎.

Comment on lines +5 to +6
These are source proofs, not a verified Rust implementation. The initial
checked work is dated 2026-11-16. Run `bash scripts/check-line-endings.sh`

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 Add these proofs to the canonical proof census

The repository's verification/proofs/README.adoc procedure requires every new obligation to be recorded in docs/status/PROOF-NEEDS.adoc and every completed proof and recheck leg in docs/status/PROOF-STATUS.adoc, but this commit leaves the project-specific needs table empty and the status page reporting 0% proven with “No proofs completed yet.” Readers and tooling that use those canonical status files therefore receive the opposite result from this new checked-work claim, so both census files need entries for the Agda statements and their Lean/Rocq legs.

Useful? React with 👍 / 👎.

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.

2 participants