Skip to content

feat: add OpenTimestamps temporal-anchor profile#169

Draft
safal207 wants to merge 6 commits into
mainfrom
agent/ots-temporal-anchor-profile
Draft

feat: add OpenTimestamps temporal-anchor profile#169
safal207 wants to merge 6 commits into
mainfrom
agent/ots-temporal-anchor-profile

Conversation

@safal207

Copy link
Copy Markdown
Owner

What changed

Adds an experimental Bitcoin OpenTimestamps sidecar profile for independently bounding when exact decision bytes existed:

  • a live adapter that invokes the official ots verify client against exact temporary copies of the target and proof;
  • fail-closed result states: TEMPORALLY_ANCHORED, PENDING, INVALID, and UNAVAILABLE;
  • eight deterministic conformance vectors for verified, pending, nonzero-exit, unknown, missing, duplicate, and conflicting attestation outputs;
  • a bounded integration shape for GuardrailDecision temporal-anchor sidecars;
  • a read-only CI gate for the deterministic parser contract.

Why

issued_at inside a hashed record is tamper-evident after issuance but does not prevent the issuer from choosing a favorable timestamp before hashing. A verified OpenTimestamps proof can establish that the exact subject bytes existed no later than an attested Bitcoin block.

The profile deliberately does not promote a URL, claimed block height, proof filename, exit code, or success-looking string by itself. It also keeps pending calendar proofs pending rather than treating them as anchored.

Validation

PASS verified-bitcoin-attestation -> TEMPORALLY_ANCHORED/BITCOIN_ATTESTATION_VERIFIED
PASS pending-calendar-proof-stays-pending -> PENDING/BITCOIN_CONFIRMATION_PENDING
PASS success-looking-output-with-nonzero-exit-fails-closed -> INVALID/VERIFIER_EXIT_NONZERO
PASS zero-exit-without-bitcoin-attestation-fails-closed -> INVALID/NO_BITCOIN_ATTESTATION
PASS unknown-attestation-is-not-bitcoin-proof -> INVALID/UNKNOWN_ATTESTATION
PASS conflicting-block-attestations-fail-closed -> INVALID/CONFLICTING_BITCOIN_ATTESTATIONS
PASS duplicate-attestations-are-ambiguous -> INVALID/AMBIGUOUS_MULTIPLE_ATTESTATIONS
PASS pending-and-confirmed-output-is-conflicting -> INVALID/CONFLICTING_PENDING_AND_CONFIRMED

OTS temporal-anchor conformance passed: 8

Run with:

python3 scripts/check_ots_anchor_vectors.py \
  conformance/guardrail-decision-v1/ots/manifest.json

Scope boundary

This PR does not reimplement OpenTimestamps cryptography, run a Bitcoin node in CI, stamp production decisions, or claim authorship/correctness/freshness from a temporal proof. Live cryptographic verification remains delegated to the official OpenTimestamps client and its Bitcoin data source.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c4688417-eaf2-4103-97df-92d49abb8144

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/ots-temporal-anchor-profile

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

Comment @coderabbitai help to get the list of available commands.

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