Skip to content

[codex] Ship v1.5 conformance and package docs#20

Draft
LakshmanTurlapati wants to merge 202 commits into
mainfrom
changeset-release/main-v1
Draft

[codex] Ship v1.5 conformance and package docs#20
LakshmanTurlapati wants to merge 202 commits into
mainfrom
changeset-release/main-v1

Conversation

@LakshmanTurlapati

Copy link
Copy Markdown
Collaborator

Summary

  • Ship the v1.5 polyglot receipt protocol/conformance milestone: normative spec, v1.1/v1.2/v1.3 schemas, committed conformance vectors, TypeScript verifier, Python verify/replay/mint client, cross-mint parity, and conformance CI.
  • Refresh the IEEE paper for v1.5 so it no longer describes shipped v1.4/v1.5 features as future work.
  • Address review/package docs follow-up: fix NEG-01 malformed-envelope signature encoding, regenerate the vector manifest, include package-local READMEs in runtime/CLI tarballs, and guard tarball README presence.

Impact

  • Receipt protocol behavior is now documented and tested across TypeScript and Python clients.
  • Published package pages will render package-specific README docs.
  • The paper and spec now agree that the spec is normative while the paper is explanatory.

Validation

  • pnpm --filter @lattice-conformance/generate test (28 passed)
  • pnpm --filter @lattice-conformance/verify-ts test (33 passed, 1 skipped without cross-mint env)
  • cd conformance/vectors && sha256sum --check MANIFEST.sha256
  • pnpm check:tarball
  • pnpm check:package-version
  • tectonic main.tex from paper/ (PDF rendered; TeX warnings only)

Note: make -C paper was attempted earlier but latexmk is not installed in this workspace, so the documented tectonic fallback was used.

Audited canonical.ts, envelope.ts, cid.ts, verify.ts, sign.ts, receipt.ts,
redact.ts, fingerprint.ts, and create-ai.ts to ground every normative clause
in the exact reference implementation behavior.
…aves)

Wave 1: Plan 01 — generate vector #0 script and committed fixture
Wave 2: Plan 02 — author spec/SPEC.md normative prose (SPEC-01..06)
Wave 2: Plan 03 — author JSON Schema files v1.1/v1.2/v1.3 + CHANGELOG.md (SPEC-07, parallel)
- Adds throwaway generator that imports real receipts pipeline (canonical,
  envelope, redact, sign, cid) and runs redact→canonicalize→base64→PAE→sign→encode→CID
- Embeds EXAMPLE/TEST-ONLY Ed25519 keypair as a committed constant
- Fixed body includes stepName "分析-step" (non-ASCII JCS edge case) and
  tripwireEvidence: { kind: "no-pii" } to guarantee ≥1 redaction (D-04)
- In-script assertion: redactedBody.redactions.length >= 1
- Adds tsx ^4.22.4 to root devDependencies (run via pnpm exec tsx)
- Runs spec/generate-vector0.ts via pnpm exec tsx; exits 0
- Fixture contains all 9 required fields: body, canonicalBytesHex,
  payloadBase64, paeHex, signatureHex (128 hex), envelope, cid, publicKeyJwk, WARNING
- cid: sha256:d8bc75e07072455cd8d234d86e2b7d7444ef5233ad71e62586ac7a358ae0cf63 (71 chars)
- body.stepName: "分析-step" (non-ASCII JCS edge case)
- body.redactions.length: 1 (D-04 satisfied — tripwireEvidence trigger fired)
- pnpm @full-self-browsing/lattice tests: 1059/1059 passed (reference impl unchanged)
- Creates 50-01-SUMMARY.md with verification results and deviations
- Updates STATE.md: Plan 2 of 3, decisions logged, session continuity
- Updates ROADMAP.md: 50-01 marked complete, Phase 50 shows 1/3 plans done
…ion algorithm)

- Preamble with status, spec version, normative tie-breaker (D-02), normative references
- §1 Terminology: RFC 2119/BCP 14 keyword stanza + 9 defined terms
- §2 Overview (non-normative): high-level pipeline description
- §3 Receipt Body Schema: all-version fields table, version-specific fields (v1.1/v1.2/v1.3), I-JSON constraints (safe integers, costUsd decimal string, bare hex outputHash), JSON Schema declaration normative
- §4 Signing Pipeline: 8 steps with MUST clauses covering assemble/redact/JCS/base64/PAE/Ed25519/DSSE/CID; §4.9 worked example threads vector #0 bytes from spec/vector0-fixture.json
- §5 Verification Algorithm: 10-step decision tree with schema-version-too-low (step 4) explicitly before key-not-found (step 5); §5.2 all 7 VerifyErrorKind values; §5.3 CRYPTO-01 downgrade defense ordering normative statement
…y model, versioning, references)

- §6 outputHash Algorithm: normative type-dispatch (fingerprintArtifactValue, 6 branches null/string/Uint8Array/ArrayBuffer/Blob/object); §6.2 non-normative D-10 cross-language divergence caveat (6 known JS/Python differences); §6.3 D-11 conformance boundary (object-output out of v1.5 scope)
- §7 Key Model: KeySet/KeyEntry/KeyState interfaces; §7.2 JWK OKP base64url vs standard base64 distinction explicit; §7.3 kid cross-check invariant
- §8 Schema Versioning: §8.1 exact accepted version set (EXACT STRING EQUALITY, no prefix match); §8.2 version string format; §8.3 D-11 conformance boundary cross-reference
- §9 Normative References: all 8 citations (RFC 2119, 8174, 8785, 4648, 7493, 8037, 8032, DSSE)
- Appendix A: informative references (paper/main.tex caps at v1.2; canonicalize@3.0.0)
…v1.2, v1.3

- spec/schema/v1.1.json: base schema, 14 required fields + 8 optional common fields
- spec/schema/v1.2.json: adds optional modelClass with 5-value TrainingClass enum
- spec/schema/v1.3.json: adds optional parentReceiptCid + lineageMerkleRoot (sha256: prefix pattern)
- All files: additionalProperties:false, I-JSON constraints (max 9007199254740991), costUsd decimal-string pattern
- D-08 backstop $comment on promptTokens, completionTokens, stepIndex, costUsd, outputHash
- outputHash: bare hex pattern ^[0-9a-f]{64}$ (no sha256: prefix) per T-50-09
- Structural validation of vector0-fixture.json body against v1.3 passes
… deltas

- Three sections (v1.3, v1.2, v1.1) in descending order per plan
- v1.3: parentReceiptCid + lineageMerkleRoot with sha256: pattern, citing Phase 39 + Phase 46
- v1.2: modelClass optional enum with all 5 TrainingClass values from profile.ts
- v1.1: 6 step-marker fields, redactionPolicyId, redactions[] with path+reason manifest
- Footer note: lattice-receipt/v1 permanently rejected at verifier step 4 (downgrade defense)
…aps (attemptNumber maximum, additionalProperties scope claim)
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