Conversation
Completes the (hash, length) pairing across every hosted payload: adds optional `provenance_length` (section, companion to `provenance_hash`) and source `content_length` (companion to source `content_hash`), mirroring the existing section `content_length` / `guide_length` size hints. Both are advisory, untrusted size hints for pull budgeting, never content-verified. Lands spec, schema, and running code together (AGENTS.md): - schema/v1/openakb.schema.json plus both byte-identical vendored copies - specs/v1/spec.md: field tables (§4.2, §4.3), the §5 serve table, and the §5.1 detach procedure (provenance_length is a publish-time stamp that goes stale after edits -> step 4 keep-list; source content_length describes the immutable capture bytes -> step 1, alongside source content_hash) - widget-platform (authoring) and widget-platform-served examples, stamped with the real byte counts of the referenced payloads - validator version bumps: python 0.1.1 -> 0.1.2, rust 0.1.0 -> 0.1.1. The strict-mode known-member allowlist is derived from the schema properties, so recognizing the new fields needs no validator code change. Closes #29 Signed-off-by: Frank Fang <fj@nurok.ai>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c1968edec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… scope Follow-up on the length-stamp review (#29): - conformance: add a valid fixture exercising all four length stamps (strict-clean and agreed across both validators) plus an invalid negative-length fixture (AKB011), so the shared cross-validator suite covers the new fields — AGENTS.md requires conformance to move with a schema/spec change. - spec §4.2: a redacted source omits `content_length` too, so a withheld source's captured size stays undisclosed. - spec §5 serve table: qualify the publish-time row as section `content_length` now that Source also carries a `content_length`. Refs #29 Signed-off-by: Frank Fang <fj@nurok.ai>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f47b115a80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Follow-up review (#29): now that Source also has `content_length`, the §5.1 detach step-4 keep-list qualifies the section `content_hash`/`content_length`, `provenance_*`, and top-level `guide_*` stamps, and states explicitly that source `content_hash`/`content_length` are excluded — they pin immutable capture evidence (step 1) and stay truthful across section edits, so a detach tool must not drop the captured size on the first section edit. Refs #29 Signed-off-by: Frank Fang <fj@nurok.ai>
Summary
Closes #29.
Every hosted-payload
*_hashin v1 now has an optional*_lengthsize-hintcompanion. Two were missing:
provenance_lengthon the section — companion toprovenance_hash(thesidecar bytes).
content_length— companion to the sourcecontent_hash(thecaptured-evidence bytes; one length covers both
type: fileandcapture_uribytes, so no separate
capture_length).Both are
{ "type": "integer", "minimum": 0 }, optional — the same advisory,untrusted size hint already carried by section
content_lengthandguide_length, extended to the remaining payloads.Everything moves together, per the "spec + running code" rule:
schema/v1/openakb.schema.json+ both vendored copies(byte-identical;
check-schema-sync.shgreen).specs/v1/spec.md: §4.2 and §4.3 field tables, the §5 servetable, and the §5.1 detach procedure. Placement in detach reflects lifetime:
provenance_lengthis a publish-time stamp that goes stale after edits (step-4keep-list, beside
provenance_hash); sourcecontent_lengthdescribesimmutable capture bytes (step 1, beside source
content_hash).widget-platform(authoring) andwidget-platform-served(served), stamped with the real byte counts of the referenced payloads (537 B
sidecar, 750 B capture).
schema's
properties). Version bumps only: python0.1.1 → 0.1.2, rust0.1.0 → 0.1.1, with lockfiles and the python version-pin test updated.provenance.schema.jsonis unaffected — the fields are descriptor-side pointers,not sidecar contents.
Test coverage: the new fields are exercised end-to-end in both packages —
test_example_validates(Python) andtest_examples_validate(Rust) validatethe stamped served + authoring examples in strict mode, asserting the fields
are accepted and not flagged AKB006. This is the round-trip coverage the issue
recommends; the
minimum: 0 → AKB011constraint is already pinned by therepresentative
test_negative_guide_length.Type of change
Checklist
git commit -s).CHANGELOG.mdupdated if the change is notable.