Bind the budget memo and point sitting admission at compact-sitting v2

attach_compact_bindings takes --sitting/--batches (defaults unchanged).
b01 is bound to the existing named recipient and native approval
ba5ce2d8. sitting-admission.json moves to package v2
(sha256:24a52478...) and the currently served image ef6fdd61, so the
cutover does not roll back the 2026-09-16 login fixes. Not yet applied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 272244@bnt-lap001
Assistant-Session: c8962fa7-b290-47df-865f-403ddb6c77e9
This commit is contained in:
tegwick 2026-09-21 21:34:55 +02:00
parent e99fb5892a
commit 6d0a81f728
5 changed files with 78 additions and 6 deletions

View file

@ -45,13 +45,13 @@ def _approval(row: dict, memo_id: str) -> dict:
return approval
def attach(principal: str, receipt: dict, root: Path = ROOT) -> dict:
def attach(principal: str, receipt: dict, root: Path = ROOT, batches: tuple[str, ...] = ("credentials", "decisions")) -> dict:
actor = _principal(principal)
if receipt.get("status") != "created":
raise ValueError("created native receipt required")
sitting = json.loads((root / "sitting.json").read_text())
expected = []
for name in ("credentials", "decisions"):
for name in batches:
index = json.loads((root / name / "index.json").read_text())
for row in index["ordinal"]:
expected.append((name, row["memo_id"], row["memo"], row["packet"]))
@ -108,9 +108,14 @@ def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--principal", required=True, help="exact live KeyCape subject")
parser.add_argument("--receipt", type=Path, required=True, help="native created-approval receipt")
parser.add_argument("--sitting", help="batch date directory under docs/batches; default 2026-09-14")
parser.add_argument("--batches", default="credentials,decisions", help="comma-separated batch directories")
args = parser.parse_args()
receipt = json.loads(args.receipt.read_text())
index = attach(args.principal, receipt)
root = ROOT.parent / args.sitting if args.sitting else ROOT
if args.sitting and "/" in args.sitting:
raise SystemExit("sitting must be a directory name")
index = attach(args.principal, receipt, root, tuple(b for b in args.batches.split(",") if b))
print(json.dumps({"status": "bound_copies_written", "count": len(index["memos"])}, indent=2))
print("No presentations, dispositions, or approval entries created.")