[codex] Ship v1.5 conformance and package docs#20
Draft
LakshmanTurlapati wants to merge 202 commits into
Draft
Conversation
…ctors + Python Client
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)
…y and state updates
…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)
…ROADMAP, REQUIREMENTS
…aps (attemptNumber maximum, additionalProperties scope claim)
…ckbox after blocker fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Impact
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.sha256pnpm check:tarballpnpm check:package-versiontectonic main.texfrompaper/(PDF rendered; TeX warnings only)Note:
make -C paperwas attempted earlier butlatexmkis not installed in this workspace, so the documentedtectonicfallback was used.