Integrate reviewed full action pack admission and bounded idle scheduling
This commit is contained in:
@@ -1,10 +1,28 @@
|
||||
"""Ephemeral one-owner, one-connection action tickets. No persistence or replay."""
|
||||
from dataclasses import dataclass
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import secrets
|
||||
import time
|
||||
|
||||
|
||||
def configured_packs():
|
||||
"""Public coordinator-reviewed registry plus explicit private operator overrides.
|
||||
Invalid registry/config fails closed; no client can add a pack through HELLO.
|
||||
"""
|
||||
path=Path(__file__).with_name('reviewed_action_packs.json')
|
||||
try:
|
||||
if path.exists() and path.stat().st_size>8192: return {}
|
||||
public=json.loads(path.read_text()) if path.exists() else {}
|
||||
private=json.loads(os.environ.get('LAN_ACTION_PACKS','{}'))
|
||||
if not isinstance(public,dict) or not isinstance(private,dict): return {}
|
||||
# The immutable public pin's measured bounds cannot be shortened by env config.
|
||||
return {**private,**public}
|
||||
except (ValueError,OSError):return {}
|
||||
|
||||
|
||||
def negotiate(hello, configured):
|
||||
"""Server configuration pins independently reviewed manifests, never client claims."""
|
||||
if hello.get('action_protocol') != 1 or hello.get('action_kinds') != ['dance']:
|
||||
|
||||
Reference in New Issue
Block a user