Skip to content

feat: compile and enforce declared model policy#89

Merged
mostlydev merged 11 commits intomasterfrom
feat/cllama-model-policy-enforcement
Mar 28, 2026
Merged

feat: compile and enforce declared model policy#89
mostlydev merged 11 commits intomasterfrom
feat/cllama-model-policy-enforcement

Conversation

@mostlydev
Copy link
Copy Markdown
Owner

@mostlydev mostlydev commented Mar 27, 2026

Problem

This change moves model/provider authority to the infrastructure layer instead of leaving it to individual runners.

The immediate driver was cllama model-policy work, but the merged branch also carried adjacent CLI and spike-harness changes that were needed to make the behavior testable and usable end to end.

What Changed

Compile model policy during claw up

  • added policy compilation in internal/cllama/modelpolicy.go
  • claw up now emits per-agent model_policy metadata into cllama context from the Clawfile MODEL directives
  • this gives cllama a compiled allowlist/failover view of what each agent is allowed to use

Document the trust-boundary decision

  • added ADR 019 to make the model-authority decision explicit
  • added a detailed implementation plan covering policy compilation, enforcement, failover boundaries, and testing expectations

Wire in the proxy enforcement change

Improve rollcall spike coverage

  • rollcall spike now builds the local cllama/ under test instead of accidentally reusing a stale cached image
  • PicoClaw now runs through its native path in the spike image instead of a background responder shortcut, so the spike exercises real proxy/session-history behavior
  • added xAI seed support in the rollcall fixture so the spike can validate that path too

Improve update UX while this branch was open

These changes also landed on the same merged branch:

  • added claw update
  • changed release checks back to an hourly interval during active development
  • updated user-facing guidance so the notice tells users to run claw update

Files of Interest

  • internal/cllama/modelpolicy.go
  • cmd/claw/compose_up.go
  • cmd/claw/compose_up_test.go
  • cmd/claw/spike_test.go
  • cmd/claw/spike_rollcall_test.go
  • examples/rollcall/Dockerfile.picoclaw-base
  • cmd/claw/update.go
  • cmd/claw/update_check.go
  • docs/decisions/019-model-policy-authority-and-declared-failover.md

Testing

  • go test ./...
  • go test ./... in cllama/
  • go test -tags spike -v -run TestSpikeRollCall -timeout 45m ./cmd/claw/...

Depends On

claw now checks GitHub releases once per 24h and prints a notice at
the end of any command when a newer version is available. Skipped for
dev builds. Cache lives at ~/.claw/.claw-update-check. Added ## Update
section to README documenting the install.sh update path.
Adds `claw update` which pipes install.sh through sh — same verified
install path as the initial install. Update notices now say
"run: claw update" instead of the raw curl.
@mostlydev mostlydev merged commit 361be4c into master Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant