# Native GPT parser observation
Observed 2026-10-21. Original method and code: MIT (see LICENSE).
This extends the six byte fixtures; it does not replace their results or the
original twelve ddrescue observations.

## Question and protocol
Can a successful process exit, partition listing or verification summary establish
that both original GPT copies conform and agree?

Run python3 native.py > a-new-receipt.json with Ubuntu/Debian sfdisk and sgdisk
installed at /usr/sbin. No image or device argument is accepted. The driver creates
six private 65,536-byte regular files, 512-byte logical blocks, sets mode 0400,
runs four fixed read-only commands per file and removes the temporary directory.
The fixture entry spans LBA 34 through 94 inclusive: 61 sectors. Its EFI System
Partition type labels a byte pattern, not a FAT filesystem.

The fixture SHA-256 values must match observe.py. Every invocation records
stdout, stderr, status and hashes before and after; a changed hash stops the run.
Only temporary filenames are replaced with <fixture>. No repair/write option,
loop device, mount or elevated privilege is used. LC_ALL=C fixes diagnostic locale.
Binary hashes, package versions, platform and Python version are in the receipt.
The retained run used fdisk/libfdisk1 2.39.3-9ubuntu6.6 and gdisk 1.0.10-1build1.
No third-party executable or source code is redistributed.

Run python3 -m unittest -v test_observe test_native, also with python3 -O.
Run python3 summarize_native.py to regenerate native-summary.json.
The summarizer accepts only the reviewed diagnostic patterns. A new tool version
or different result requires review rather than silently labeling it a pass.

## Findings and interpretation
All 24 commands exited zero. The two primary-corruption fixtures nevertheless
produced backup-selection warnings. sfdisk --verify then reported no errors in
its loaded state. On the independently CRC-valid but inconsistent backup-name
fixture, sgdisk warned about different tables while sfdisk's output matched its
baseline. sgdisk's backup-array CRC diagnostic must not replace the independent
per-copy CRC calculation: both original arrays match their own stored CRCs here.

For both tools, payload-byte and reserved-header-byte outputs matched baseline
after pathname normalization. sgdisk --verify emits a partition-end alignment
caution even on baseline. Thus baseline-equivalent does NOT mean warning-free.

## Primary sources reviewed
- util-linux v2.39.3 sfdisk manual, --json and --verify:
  https://raw.githubusercontent.com/util-linux/util-linux/v2.39.3/disk-utils/sfdisk.8.adoc
- util-linux v2.39.3 libfdisk GPT reader/prober/verifier:
  https://raw.githubusercontent.com/util-linux/util-linux/v2.39.3/libfdisk/src/gpt.c
  gpt_probe_label selects/reconstructs in-memory metadata before verification.
  This explains the observation; the installed Ubuntu package may carry patches.
- GPT fdisk 1.0.10 installed sgdisk(8), --verify and RETURN VALUES.
  Project documentation: https://www.rodsbooks.com/gdisk/sgdisk.html
  The web copy was inaccessible in this run; the installed versioned manual was
  read locally. Its zero status denotes normal execution, not a clean table.
- UEFI 2.10 chapter 5, retained format review in SOURCES.md:
  https://uefi.org/specs/UEFI/2.10/05_GUID_Partition_Table_Format.html
  A fresh web fetch was blocked; this run adds parser observations, not a new
  interpretation of the already published reserved-zero requirement.
- Bairavasundaram et al., FAST 2008, sections 2.2 and 3.2:
  https://static.usenix.org/events/fast08/tech/full_papers/bairavasundaram/bairavasundaram_html/index.html
  Re-read the distinction between block-content and block-identity checks. The
  field study supports layered validation, not these GPT-specific outcomes.

## Limits
Six purposively constructed cases in one environment, not a random sample,
failure rate, benchmark or complete conformance suite. No confidence interval is
appropriate for this deterministic case list. No firmware, boot, kernel parser,
filesystem, damaged media or write-repair behavior was tested. Other releases,
sector geometries and inputs may differ. A zero status must be interpreted with
both output streams, selected copy, original-copy checks and the recovery goal.
Repeat runs are validation, not additional independent evidence.
