wai-pack: the packaging policy, scene cuts, and the one integer video encoder #168
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/w4-wai-pack"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
wai-pack is the segmenter and packager, and this pull request adds its first two parts: the policy that drives it, and the one encoder for WAI's integer video payload.
The policy.
wai.pack.policy/1is a TOML 1.0 document that is read in three stages, each refusal named.policy-toml.Sources and scene cuts.
The integer video encoder (
int_video_enc.rs) writes the pinnedWIV1payload. It is the only WIV1 encoder; the zero-motion writer is a case of it, and its bytes are unchanged.The step
qis chosen per piece from the policy's candidates under its distortion bound (packaging §5.6). wai-pack does not write objects yet; the base encode will call this rule.Capability refusals. A packager refuses a candidate, unknown or non-payload capability, a wrong role, and an unclassified licence.
The corpus (
pack-conformance/) holds policies, sources, scene cuts and golden payloads, andpack_verify.pyre-derives all of it independently:q.Seeded differentials compare Rust and Python on policies, sources and scene cuts.
CI (
wai-pack.yml):Also:
energy-hardware.ymldeclares its concurrency group. It reached main just before the workflow guard did, so main's ownworkflow-hygienerun fails on it.Text:
extensions/packaging.md§1–§4, §3.6, §5.5, §5.6 and §12. The remaining sections are reserved headings until the packer writes objects.Checked locally on macOS arm64: the link gate,
pack_verify.py, the wai-pack conformance check, the three differentials, the staged corpus, clippy, cargo-deny and the public-text checks. The forge CI runs on this pull request.🤖 Generated with Claude Code
A new crate beside wai-rs, with its own workspace and lock: the reference packager of the packaging extension, built so far as far as a plan. - policy.rs: wai.pack.policy/1 read in three stages (value kinds a canonical JSON cannot carry; the schema with every default written in; the constraints across members), each refusal named. The effective policy's canonical JSON goes through wai::jcs, and its digest is BLAKE3("wai:pack-policy\x01" || JCS). - source/: Y4M to RGB8 (BT.709 limited range, integer), WAV PCM s16le. - scenecut.rs: wai.pack.scenecut/1, one streaming segmenter with a bounded lookahead and the return and revisit clauses, so live and on-demand packing cut alike at equal lookahead; plan digest. - classify.rs: static, synthetic, high motion, natural. - fixture.rs: integer-generated Y4M fixtures (cuts-01, kinds-01). - conformance.rs and wai-pack conformance regen|check. pack-conformance/ holds the policy digests and equal-spelling pairs, a refusal case per reason, the unit and colour conversions, and the scene-cut vectors; pack_verify.py recomputes every one of them from the rules, with its own TOML schema, JCS, readers, fixture generator and segmenter. It found one defect while it was written: a millisecond bound converted to an extreme timebase wrapped past 2^64; both conversions now saturate. Co-Authored-By: Claude Opus 5.5 <[email protected]>06f7de0a) into wai/w4-wai-pack 596134ccc3