#!/usr/bin/env python3 """Verify the public LakeIce contribution and value-sharing boundary offline.""" import json from pathlib import Path import sys PACKET = "6ae81c8a8c6ffafc6e8378a6908547d479cdcd81036385529e0432fc7528e0cb" def main(): path = Path(sys.argv[1]) if len(sys.argv) > 1 else Path(__file__).with_name("contribution-boundary.json") value = json.loads(path.read_text(encoding="utf-8")) if value.get("schema_version") != "kiwerb-lakeice-contribution-boundary-v1" or value.get("status") != "public_notice_not_contract_or_intake": raise ValueError("wrong boundary schema or status") if value.get("packet_sha256") != PACKET: raise ValueError("packet binding mismatch") current = value.get("current_local_work", {}) required_true = {"performed_on_participant_device", "participant_keeps_own_material_rights"} required_false = {"license_to_kiwerb_created_by_download_or_local_work", "submission_or_transfer_requested", "expenses_reimbursed", "payment_bounty_token_authorship_or_patent_interest_promised", "eligible_for_retroactive_value_sharing"} if any(current.get(k) is not True for k in required_true) or any(current.get(k) is not False for k in required_false): raise ValueError("current-work rights or compensation boundary changed") future = value.get("possible_future_funded_project", {}) if future.get("separate_signed_agreement_required_before_its_compensated_work") is not True or future.get("earlier_volunteer_work_cannot_be_reclassified_retroactively") is not True: raise ValueError("future agreement timing boundary changed") if future.get("current_task_is_funded_project") is not False or future.get("current_payment_claim") is not False: raise ValueError("current funding claim prohibited") if any(value.get("operations", {}).values()): raise ValueError("operational and scientific claims must remain false") print(json.dumps({"status": "offline_contribution_boundary_verified", "current_license_to_kiwerb": False, "retroactive_value_sharing": False, "current_payment_claim": False})) if __name__ == "__main__": main()