Genesis / pre-alphaE1 implementedP1 in progressRead-onlyLocal-firstHosted CI: not executed

Not yet a public arbitrary-URL or multi-tenant service.

TWIRX Typed Web Commons

Implemented proof

Gate 1: source-statement fidelity, independently checked

Gate 1 proves the smallest complete epistemic spine of TWIRX. This page is an evidence record. Every figure on it is copied from the committed report, including the figures that are unflattering.

Read this first

Gate E1 is not a public arbitrary-URL service and is not production multi-tenant infrastructure. It is a controlled, read-only, local slice built to test one question: can a typed value carry a complete and independently checkable account of where it came from?

What Gate E1 proves Implemented

For the controlled source representation and the committed adversarial corpus, the implementation can bind retrieved bytes to a canonical observation, independently verify those bytes in Go and in C, and deterministically extract a source-native statement plus an explicit semantic interpretation and a complete derivation record — while offline.

It also proves rejection behaviour for the bounded classes represented by the public vectors, and it proves that the local demonstration does not need the origin to remain available after observation. Those two properties are what make the evidence claim meaningful: a result that can be recomputed from stored bytes after the source is gone is a result that can be audited.

Everything on this page is copied from reports/gate-1-genesis.md, the committed evidence report. Where this page and the report disagree, the report is authoritative. The same figures are published as project-status.json.

The path it proves

  1. Controlled originA local fixture server, not a production source. Loopback access is denied unless explicitly enabled.
  2. Policy-constrained observationHTTP GET under an explicit URL policy with bounded time, size, redirects, and ports.
  3. Content-addressed evidenceThe response body is stored under its SHA-256 digest and retrieved by that digest.
  4. Deterministic CBOR envelopeRetrieval metadata is bound to the evidence digest in a canonical encoding with a normative CDDL schema.
  5. Go verifier and independent C verifierTwo implementations validate the same envelope and body against the same committed vectors.
  6. Origin stoppedThe fixture server is shut down. Nothing after this point may contact the network.
  7. Deterministic offline extractionA manually admitted adapter reads the stored bytes. No shell, no network, no model.
  8. Native statement and semantic viewThe provider's own term and lexical value are retained beside the transformed value.
  9. Field-level provenanceEvery emitted field carries request URL, final URL, retrieval time, body and observation digests, adapter identity and digest, extraction method, locator, transform chain, and mapping relation.

Reproduce it

The acceptance sequence runs from a clean generated-artefact state and requires no public internet. Requirements are Go 1.23 or later (1.26 recommended), GCC with C2x support, Clang 17 or later for the sanitizer tests, plus Bash, Python 3, and curl.

git clone https://github.com/banga-agents/TWIRX.git
cd TWIRX

make clean && make build && make test && make demo

make test runs the normal Go tests, all four Go fuzz targets, the Clang ASan/UBSan C corpus, 5,000 libFuzzer executions, the offline end-to-end test, and the documentation navigation check. make demo observes the local fixture, verifies it in Go and C, stops the origin, and completes extraction from evidence.

Inspect a single result by hand

bin/tw observe --url http://127.0.0.1:18080/product/sku-001 \
  --out var/demo --cas var/cas --allow-loopback

bin/tw verify --observation var/demo/observation.cbor --cas var/cas
bin/tw-verify-c var/demo/observation.cbor var/cas

# This command does not contact the origin.
bin/tw extract --observation var/demo/observation.cbor --cas var/cas \
  --adapter adapters/testorigin-product/adapter.json \
  --out var/demo/result.json

The --allow-loopback flag weakens the public network policy for local fixtures only. It must never become an option on a public service.

Evidence record

Commits and status
Evidence date2026-08-10
StatusLocal acceptance passed. Hosted CI has not executed.
Baseline commit6df221bde6f2f7e0535df178104e8b1a93c11bb8
Implementation commit tested1d17d5b541176fdb6b742caa48f0f55a14dfa206
Evidence commit40210f3cf73004d454733d8b09048c2c5391b4d4
Merge commitac4f9948ad21b319b11f9caeee9bd4e472c39780
Reportreports/gate-1-genesis.md

The report is committed after the implementation it describes, so its own commit identifier is intentionally not the tested implementation identifier.

Toolchain and host

Versions used for the recorded run
ComponentVersion
HostLinux 7.1.3-arch1-1, x86_64
Gogo1.26.5-X:nodwarf5 linux/amd64
GCC16.1.1 20260625
Clang22.1.8
Python3.14.6
Bash5.3.15(1)-release
MakeGNU Make 4.4.1
ShellCheck0.11.0
Git2.55.0

The repository has no go.sum, and this gate adds no third-party Go runtime dependency. A repository scan for common private-key, GitHub token, AWS access-key, and Slack token patterns returned no match outside generated directories and Git metadata.

Conformance totals

Test and conformance evidence
Evidence Passed Failed Notes
Named Go test events 940 7 tested packages; two command packages have no test files
Observation vectors in Go 160 2 accepted, 12 envelope rejects, 2 evidence rejects
Observation vectors in C 160 The same committed inputs and expectations as Go
Corrupted CAS checks 20 One Go check and one C check
Extraction vectors 110 5 accepted, 6 rejected
Network-policy tests 80 Local fixtures only
Offline end-to-end test 10 Extraction succeeds after the origin stops
Documentation navigation 10 Configuration parsed and all navigation targets existed

Static and hygiene checks

Race detector, go vet, gofmt, ShellCheck, Clang static analysis, secret scan, and the stopped-origin demonstration all passed. The C verifier was additionally built under both GCC and Clang with -Wall -Wextra -Werror -Wconversion -Wshadow -Wpedantic.

Fuzzing and sanitizers

Four Go fuzz targets and one C libFuzzer target ran clean. The independent verifier was compiled with -fsanitize=address,undefined -fno-omit-frame-pointer; ASan and UBSan emitted 0 findings. The parser-only C harness ran 5,000 mutations seeded by every shared observation vector without a crash or sanitizer finding. That harness performs no filesystem or network operation.

Go fuzz smoke-run executions
TargetExecutions
Observation parser138,620
JSON Pointer55,183
Manifest decoder83,640
Bounded extraction72,160

How to read these numbers

The execution counts are host- and scheduling-dependent. The gate is the absence of a panic or a failing invariant, not a throughput claim. Short fuzz runs over a small corpus do not prove parser correctness; they only fail to disprove it. This is unresolved risk R5 below.

Coverage

Statement coverage from go test -cover ./...
PackageCoverage
internal/adapter71.3%
internal/atomicfile56.8%
internal/cas63.0%
internal/cborlite61.3%
internal/jsonbounded76.5%
internal/observation56.1%
internal/safefetch76.7%

Command packages report 0% because they have no direct Go tests; their current path is exercised by the shell end-to-end test and the demonstration. Adding CLI error-path tests is unresolved risk R6.

Benchmark scope

BenchmarkResolveJSONPointer-16  271.7 ns/op  128 B/op  8 allocs/op

Recorded on AMD Ryzen 7 6800U, Linux/amd64, 16 logical workers.

What this figure is not

A narrow extraction primitive measured on one recorded host. It is not an end-to-end throughput figure and it is not evidence that TWIRX is faster than browser execution.

Remote CI status Not proven

GitHub-hosted Actions failed during check-suite startup before creating any job, so no intended CI command reached a runner.

The `ci` workflow is reported active with zero associated runs. Repository events are recorded against a separate deleted workflow with an empty name and no jobs. A byte-identical rename to ci.yaml, actionlint validation, disabling and re-enabling the workflow, and closing and reopening the pull request all reproduced the same startup failure.

Remaining cause: External to the workflow document: GitHub Actions availability, budget, or account eligibility for hosted runners on this private repository.

Consequence

Local Gate 1 evidence is currently the only executed validation evidence. Until a hosted runner executes the suite, no reader should treat Gate E1 as independently reproduced. The evidence is real, it is reproducible from the commands above, and it has been produced on exactly one host by exactly one party. Independent reproduction is the next admission condition, not a formality.

What Gate E1 does not prove

  1. That provider content, a semantic mapping, or a retrieval timestamp is objectively true.
  2. Publisher identity or authority.
  3. Arbitrary websites, HTML, JavaScript, browser execution, model output, writes, payments, registry operation, or multi-tenant service.
  4. Production DNS-rebinding resistance, egress isolation, or safe public arbitrary-URL deployment.
  5. Signatures, release provenance, external transparency, or protection against a host compromise that replaces code and evidence.
  6. The absence of parser defects. Finite tests and short fuzz runs cannot establish it.

Unresolved risks

Seven risks remain open against Gate E1. They are published here in full and unedited because a risk register that only appears in a repository file is a risk register designed not to be read.

  1. URL and resolved-address checks are application-layer controls. Production deployment still needs separate worker and control networks, DNS and egress enforcement, metadata isolation, and quotas.
  2. Observation v1 records the request and final URL but not the redirect chain or selected transport headers. A later immutable transport-evidence artifact is needed without mutating v1.
  3. The adapter runtime has no independent second implementation. Its manifest and result formats remain pre-stable and unsigned.
  4. Atomic publication is per file, not a transaction spanning every file in an observation bundle. Destination directories and CAS roots are assumed to be trusted configuration, and filesystem durability semantics vary.
  5. The corpus is intentionally small and the fuzz durations in normal tests are smoke tests. Longer scheduled fuzzing and external review remain necessary.
  6. Direct command-package coverage is absent even though the shell workflow exercises their current happy path. CLI error-path tests should be added at the next maintenance gate.
  7. Local filesystem compromise can replace implementation and evidence together. Signed releases and external transparency are out of Gate 1.

R1 is expanded on the security page. R3 and R4 are admission conditions for later gates on the progress page.