Repository navigation
fix(wcm-examples): pin manifest identity in revocation and LoRA demos - #405
Conversation
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
dinakarjs
left a comment
There was a problem hiding this comment.
Bounded source/CI review at 63fdc07. The LoRA path now calls the same build_kbs helper exercised by the new test, so the test observes the actual broker construction rather than rebuilding an equivalent broker in the test. The revocation demo positively requires exactly one successful manifest_authorized check, avoiding a vacuous "not among failures" assertion. Moving model_signing into sign_artifact makes the broker helper testable without the training/download extras.
All 28 returned hosted checks are successful. I found no additional blocking issue in this inspected delta. Keep the validation scope explicit: the offline broker/helper tests do not execute LoRA training, model download or the complete real_lora_custody.main path, and software evidence does not establish hardware custody.
I did not run a fresh local suite or guard-removal experiment in this pass; this is a source/CI COMMENT, not an approval or full end-to-end validation claim. Reviewed with OpenAI Codex.
carloshvp
left a comment
There was a problem hiding this comment.
Reviewed current head 63fdc07aa9384ebb99ffe32c2014f11029a74bc0.
The revoked broker now positively establishes manifest authorization before isolating attestation revocation. The LoRA path uses the tested pinned broker constructor, so a valid attestation alone cannot substitute for a trusted manifest. I installed the published WCM SDK and documented signing dependencies in a fresh environment: all 13 offline demos, the unit tests and pip check pass. The two real-model scripts remain outside this offline validation; no training, model download or hardware run was performed. No code blocker found in the four-file diff.
Prepared with OpenAI Codex.
Two of the offline examples build a KeyBrokerService without trusted_manifest_identities, so verify_and_release refuses on
manifest_authorized before anything else gets checked.
revocation_kill_switch.py: the second (revoked) broker wasn't pinned, so the release was failing on both manifest_authorized and attestation_revocation. It happened to print the right reason anyway since checks aren't short-circuited, but the demo wasn't actually isolating what it claims to show. Pinned it the same way as the first broker, and added an assertion so it fails loudly if this regresses.
real_lora_custody.py: no pinning at all, so verify_and_release always returns released=False and the script raises a RuntimeError on every real run. This path needs torch + a model download, so run_demos.py skips it and the unit tests only cover the encrypt/decrypt helpers, that's why it was never caught.
Also fixed a stale version in the README setup line (weight-custody-manifest>=0.21.0 -> >=0.33.1).
Verified both fixes in isolation (before/after behavior), and ran the full demo + pytest suite via run_demos.py - all 13 demos and unit tests pass.