Repository navigation
feat(assurance): gateway, audit, /assurance routes, sandbox, MCP resources+prompts (KR-A06..A08) - #93
Merged
Merged
Conversation
…urces+prompts (KR-A06..A08) - gateway: per-identity grants (tokens stored as SHA-256), every route classified in gateway::ROUTES (a test fails if a route is added unclassified or a row names no route), deny by default, decision audited BEFORE the handler runs, fail closed if the audit log cannot be written. Enforced in the server, so MCP and direct HTTP are covered alike. - audit: hash-chained log called from the gateway; GET /assurance/audit (audit.read). - /assurance/* routes over AssuranceService; propose/validate/commit with expected revision. - KR-A07: deploy/sandbox/run-sandboxed.sh (bubblewrap): read-only root and baseline, one scratch tmpfs, no network, cleared env; /dev closed after the test found it writable. - bridge: resources/* and prompts/* (manifest-driven), X-Kr0ki-Transport: mcp on MCP calls. - acceptance cases VC-A06, VC-A07, VC-A08 incl. the real Python bridge as a subprocess. - baseline: implementation paths for CTL-A06..A08; AGENTS.md env table. cargo fmt/clippy -D warnings clean; cargo test --workspace --no-fail-fast: 44 suites ok. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
…ehavior in the gateway The route-consistency guard failed after merging main: /render/rust-behavior (new on main) was not in gateway::ROUTES, so it would have required admin. It parses a request body and renders; it writes nothing to the model, so it is a render operation. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
Member
Author
Evidence recorded on the clean committed tree
All 8 artifacts verify intact against their recorded digests; Read this before relying on it
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
elasticdotventures
added a commit
that referenced
this pull request
Oct 7, 2026
…#94) * feat(playbook): Assurance view (requirements, drawer, diagram, audit) + session-only token + opt-in public UI Playb00k Assurance tab over the /assurance/* routes: - requirement table with the five assurance states shown as label + symbol (never colour alone), state chips with counts, server-side filters (state/status/owner/gap), source-kind badges; - detail drawer with the whole thread (obligations, element, control + implementation path, case, revision-bound evidence with which revision moved, links resolved/dangling, gaps); - run a case from the page: explicit confirm step, runs at the revision shown, refusals explained; - diagram panel (authenticated blob, fit/2x/3x zoom in a scrolling frame, open full size); - audit panel (hash-chain status, decisions, denials). Setup gains an optional access token kept in sessionStorage only. lib/assurance.js is the client. Server: KR0KI_PUBLIC_UI (default off) serves only the static /playbook GET routes without a token, because a browser navigation cannot send Authorization; data routes still require one. Tested both ways (default behind the gateway; opt-in public; data/POST/lookalike paths still 401). Verified in a real browser against a real server (gateway on, real baseline and evidence): 401 -> Setup token -> list, drawer, diagram, audit, and a VC-A02 run flipping the row from stale to verified. Fixtures are the server's real JSON. Playb00k tests 206; cargo workspace 50 suites; fmt and clippy -D warnings clean. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X * test(playbook): scrub a local path from a captured fixture Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X * feat: SysMD constraint-solver sidecar (container, soundly-parsing client, /sysmd/solve, MCP solve_constraints) SysMD runs headless in a hardened container (read-only root, tmpfs store, 1 GiB, cap-drop ALL, loopback). kr0ki talks REST only. - sysmd_client: project+session per solve, deleted afterwards; parses SysMD's display strings into closed intervals widened outward for the Representer's 5-decimal rounding and its dropped-upper-bound / literal-0 cases (verified live), unbounded/empty/NaN kept distinct, SI-base compound units mapped by dimension, standard library and bookkeeping variables filtered - POST /sysmd/solve (gateway: model.read), MCP solve_constraints (33 tools), KR0KI_SYSMD_URL, sysmd health check - just sysmd-image|sysmd-up|sysmd-down|test-live-sysmd, systemd unit, scripts/build-sysmd.sh (fork branch kr0ki/sidecar) - docs/SYSMD-SIDECAR.md Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X * fix(sysmd): store on a uid-owned named volume instead of mode=1777 tmpfs; document revision-bound evidence policy Evidence is re-verified on minor releases, not patch bumps. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #89 (merged with KR-A01..A05). This completes the assurance thread's enforcement side and the MCP surface. Also pins
ufo-typesto the merge commit of PromptExecution/ufo-types#31 (1846e6f).What this adds
gateway::ROUTES, deny by default (unclassified or unmatched =admin). Enforced in the server, so MCP and direct HTTP are covered alike.tests/assurance_a06.rs: a read-only identity reads (200) and its commit is refused (403) over direct HTTP and through the realbridge.pystarted with the same token. The commit tool is listed; visibility is not what protects it.GET /assurance/auditneedsaudit.read.tests/assurance_a08.rs: records for the permitted and denied calls over both transports with caller, operation, decision, model revision, correlation id; tokens never appear in the log; chain verifies; reading the log without the grant is denied and itself recorded.deploy/sandbox/run-sandboxed.sh(bubblewrap): read-only root and baseline, one scratch tmpfs, no network, cleared env. Enforcement stays in the deployment component; kr0ki holds the evidence.tests/assurance_a07.rs: scratch output permitted; writes to the baseline (append, truncate, create, rm, mv,..) refused and the host file's digest unchanged. The test found/devwritable (bwrap's--devtmpfs isn't covered by a root remount); fixed and now asserted.resources/*andprompts/*in the bridge, manifest-driven like tools; resource reads go through the same gateway as the equivalent HTTP request.X-Kr0ki-Transport: mcprecorded in audit (informational; nothing is authorised on it).test_bridge.py(14), and end-to-end inassurance_a06.rs./assurance/*: requirements, trace, view (json/table/d2/svg), evidence, propose/validate/commit (expected revision), verify, audit, skills.Baseline: implementation paths recorded for CTL-A06..A08;
kr0ki-assurance lintnow reports 0 dangling links and onlysatisfied_untestedx8 (no evidence recorded yet).Verification
cargo fmt --check;cargo clippy --workspace --all-targets -- -D warnings;cargo test --workspace --no-fail-faston the merged result: all suites pass except the one noted below, which this PR fixes.main:/render/rust-behavior(new on main) was unclassified and would have requiredadmin. It parses a body and renders, writes nothing to the model, so it is classifiedrender. That is the guard working as designed.assurance_servicetests encoded "later controls are still unimplemented", which stopped being true. They now build their own conditions (a temp baseline with a deliberately dangling path and test target).Needs a human decision / still open
KR0KI_IDENTITIES_FILEis documented in AGENTS.md but no file is provisioned. Until one is, the server runs in shared-token/open mode exactly as before (no behaviour change for existing deployments).just assurance-verifyshould be run once this is merged (evidence is revision-bound and the store is gitignored).previousCommit(found in feat(assurance): versioned assurance thread (KR-A01..A05 done; A06-A08 in progress) #89): the change service is the only guard for writers that go through it.ToolGateway::AuditRecordersub-part andowner = kr0ki-maintainersremain modelling placeholders to confirm.🤖 Generated with Claude Code
https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X